From e610c853bc789bee4bbf3f14433fdfd98e4d2e5d Mon Sep 17 00:00:00 2001 From: Jan Roehrich Date: Mon, 16 Sep 2024 15:42:12 +0200 Subject: [PATCH 1/3] feat: register machines in Route53 zone and use host lookup when connect --- cmd/command.go | 51 +- cmd/delete.go | 8 +- cmd/start.go | 8 +- cmd/stop.go | 6 +- go.mod | 7 +- go.sum | 11 +- hack/provider/provider.yaml | 4 + pkg/aws/aws.go | 306 +- pkg/options/options.go | 3 + .../github.com/aws/aws-sdk-go-v2/CHANGELOG.md | 540 + .../aws-sdk-go-v2/aws/go_module_metadata.go | 2 +- .../aws/aws-sdk-go-v2/aws/retryer.go | 2 +- .../internal/configsources/CHANGELOG.md | 4 + .../configsources/go_module_metadata.go | 2 +- .../internal/endpoints/v2/CHANGELOG.md | 4 + .../endpoints/v2/go_module_metadata.go | 2 +- .../service/route53/CHANGELOG.md | 270 + .../aws-sdk-go-v2/service/route53/LICENSE.txt | 202 + .../service/route53/api_client.go | 681 + .../route53/api_op_ActivateKeySigningKey.go | 138 + .../api_op_AssociateVPCWithHostedZone.go | 160 + .../route53/api_op_ChangeCidrCollection.go | 155 + .../api_op_ChangeResourceRecordSets.go | 195 + .../route53/api_op_ChangeTagsForResource.go | 141 + .../route53/api_op_CreateCidrCollection.go | 135 + .../route53/api_op_CreateHealthCheck.go | 175 + .../route53/api_op_CreateHostedZone.go | 227 + .../route53/api_op_CreateKeySigningKey.go | 179 + .../api_op_CreateQueryLoggingConfig.go | 224 + .../api_op_CreateReusableDelegationSet.go | 173 + .../route53/api_op_CreateTrafficPolicy.go | 147 + .../api_op_CreateTrafficPolicyInstance.go | 169 + .../api_op_CreateTrafficPolicyVersion.go | 154 + ...pi_op_CreateVPCAssociationAuthorization.go | 154 + .../route53/api_op_DeactivateKeySigningKey.go | 136 + .../route53/api_op_DeleteCidrCollection.go | 120 + .../route53/api_op_DeleteHealthCheck.go | 133 + .../route53/api_op_DeleteHostedZone.go | 164 + .../route53/api_op_DeleteKeySigningKey.go | 140 + .../api_op_DeleteQueryLoggingConfig.go | 123 + .../api_op_DeleteReusableDelegationSet.go | 129 + .../route53/api_op_DeleteTrafficPolicy.go | 134 + .../api_op_DeleteTrafficPolicyInstance.go | 125 + ...pi_op_DeleteVPCAssociationAuthorization.go | 145 + .../route53/api_op_DisableHostedZoneDNSSEC.go | 131 + .../api_op_DisassociateVPCFromHostedZone.go | 171 + .../route53/api_op_EnableHostedZoneDNSSEC.go | 130 + .../service/route53/api_op_GetAccountLimit.go | 159 + .../service/route53/api_op_GetChange.go | 314 + .../route53/api_op_GetCheckerIpRanges.go | 124 + .../service/route53/api_op_GetDNSSEC.go | 135 + .../service/route53/api_op_GetGeoLocation.go | 157 + .../service/route53/api_op_GetHealthCheck.go | 131 + .../route53/api_op_GetHealthCheckCount.go | 121 + .../api_op_GetHealthCheckLastFailureReason.go | 135 + .../route53/api_op_GetHealthCheckStatus.go | 136 + .../service/route53/api_op_GetHostedZone.go | 141 + .../route53/api_op_GetHostedZoneCount.go | 121 + .../route53/api_op_GetHostedZoneLimit.go | 155 + .../route53/api_op_GetQueryLoggingConfig.go | 132 + .../api_op_GetReusableDelegationSet.go | 134 + .../api_op_GetReusableDelegationSetLimit.go | 148 + .../route53/api_op_GetTrafficPolicy.go | 136 + .../api_op_GetTrafficPolicyInstance.go | 134 + .../api_op_GetTrafficPolicyInstanceCount.go | 122 + .../service/route53/api_op_ListCidrBlocks.go | 230 + .../route53/api_op_ListCidrCollections.go | 222 + .../route53/api_op_ListCidrLocations.go | 229 + .../route53/api_op_ListGeoLocations.go | 187 + .../route53/api_op_ListHealthChecks.go | 256 + .../service/route53/api_op_ListHostedZones.go | 267 + .../route53/api_op_ListHostedZonesByName.go | 218 + .../route53/api_op_ListHostedZonesByVPC.go | 182 + .../route53/api_op_ListQueryLoggingConfigs.go | 257 + .../route53/api_op_ListResourceRecordSets.go | 226 + .../api_op_ListReusableDelegationSets.go | 163 + .../route53/api_op_ListTagsForResource.go | 139 + .../route53/api_op_ListTagsForResources.go | 140 + .../route53/api_op_ListTrafficPolicies.go | 163 + .../api_op_ListTrafficPolicyInstances.go | 199 + ..._ListTrafficPolicyInstancesByHostedZone.go | 192 + ...i_op_ListTrafficPolicyInstancesByPolicy.go | 215 + .../api_op_ListTrafficPolicyVersions.go | 170 + ...api_op_ListVPCAssociationAuthorizations.go | 161 + .../service/route53/api_op_TestDNSAnswer.go | 200 + .../route53/api_op_UpdateHealthCheck.go | 339 + .../route53/api_op_UpdateHostedZoneComment.go | 137 + .../api_op_UpdateTrafficPolicyComment.go | 140 + .../api_op_UpdateTrafficPolicyInstance.go | 161 + .../service/route53/deserializers.go | 22379 ++++++++++++++++ .../aws/aws-sdk-go-v2/service/route53/doc.go | 18 + .../service/route53/endpoints.go | 200 + .../service/route53/generated.json | 98 + .../service/route53/go_module_metadata.go | 6 + .../service/route53/handwritten_paginators.go | 113 + .../customizations/custom_error_deser.go | 94 + .../route53/internal/customizations/doc.go | 53 + .../internal/customizations/sanitizeurl.go | 63 + .../route53/internal/endpoints/endpoints.go | 387 + .../service/route53/serializers.go | 6215 +++++ .../service/route53/types/enums.go | 577 + .../service/route53/types/errors.go | 1933 ++ .../service/route53/types/types.go | 1766 ++ .../service/route53/validators.go | 2564 ++ vendor/modules.txt | 12 +- 105 files changed, 50226 insertions(+), 100 deletions(-) create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/CHANGELOG.md create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/LICENSE.txt create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_client.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ActivateKeySigningKey.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_AssociateVPCWithHostedZone.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ChangeCidrCollection.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ChangeResourceRecordSets.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ChangeTagsForResource.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_CreateCidrCollection.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_CreateHealthCheck.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_CreateHostedZone.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_CreateKeySigningKey.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_CreateQueryLoggingConfig.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_CreateReusableDelegationSet.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_CreateTrafficPolicy.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_CreateTrafficPolicyInstance.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_CreateTrafficPolicyVersion.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_CreateVPCAssociationAuthorization.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_DeactivateKeySigningKey.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_DeleteCidrCollection.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_DeleteHealthCheck.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_DeleteHostedZone.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_DeleteKeySigningKey.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_DeleteQueryLoggingConfig.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_DeleteReusableDelegationSet.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_DeleteTrafficPolicy.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_DeleteTrafficPolicyInstance.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_DeleteVPCAssociationAuthorization.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_DisableHostedZoneDNSSEC.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_DisassociateVPCFromHostedZone.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_EnableHostedZoneDNSSEC.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetAccountLimit.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetChange.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetCheckerIpRanges.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetDNSSEC.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetGeoLocation.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetHealthCheck.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetHealthCheckCount.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetHealthCheckLastFailureReason.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetHealthCheckStatus.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetHostedZone.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetHostedZoneCount.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetHostedZoneLimit.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetQueryLoggingConfig.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetReusableDelegationSet.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetReusableDelegationSetLimit.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetTrafficPolicy.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetTrafficPolicyInstance.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetTrafficPolicyInstanceCount.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListCidrBlocks.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListCidrCollections.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListCidrLocations.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListGeoLocations.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListHealthChecks.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListHostedZones.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListHostedZonesByName.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListHostedZonesByVPC.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListQueryLoggingConfigs.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListResourceRecordSets.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListReusableDelegationSets.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListTagsForResource.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListTagsForResources.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListTrafficPolicies.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListTrafficPolicyInstances.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListTrafficPolicyInstancesByHostedZone.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListTrafficPolicyInstancesByPolicy.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListTrafficPolicyVersions.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListVPCAssociationAuthorizations.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_TestDNSAnswer.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_UpdateHealthCheck.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_UpdateHostedZoneComment.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_UpdateTrafficPolicyComment.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_UpdateTrafficPolicyInstance.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/deserializers.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/endpoints.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/generated.json create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/go_module_metadata.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/handwritten_paginators.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/internal/customizations/custom_error_deser.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/internal/customizations/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/internal/customizations/sanitizeurl.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/internal/endpoints/endpoints.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/serializers.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/types/enums.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/types/errors.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/types/types.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/validators.go diff --git a/cmd/command.go b/cmd/command.go index 8efea40..626aa01 100644 --- a/cmd/command.go +++ b/cmd/command.go @@ -70,12 +70,11 @@ func (cmd *CommandCmd) Run( ) if err != nil { return err - } else if len(instance.Reservations) == 0 { + } else if instance.Status == "" { return fmt.Errorf("instance %s doesn't exist", providerAws.Config.MachineID) } if providerAws.Config.UseInstanceConnectEndpoint { - instanceID := *instance.Reservations[0].Instances[0].InstanceId endpointID := providerAws.Config.InstanceConnectEndpointID var err error @@ -90,7 +89,7 @@ func (cmd *CommandCmd) Run( connectArgs := []string{ "ec2-instance-connect", "open-tunnel", - "--instance-id", instanceID, + "--instance-id", instance.InstanceID, "--local-port", portStr, } if endpointID != "" { @@ -124,8 +123,6 @@ func (cmd *CommandCmd) Run( // try session manager if providerAws.Config.UseSessionManager { - instanceID := *instance.Reservations[0].Instances[0].InstanceId - cancelCtx, cancel := context.WithCancel(ctx) defer cancel() @@ -136,7 +133,7 @@ func (cmd *CommandCmd) Run( } addr := fmt.Sprintf("localhost:%d", port) - connectArgs, err := aws.CommandArgsSSMTunneling(instanceID, port) + connectArgs, err := aws.CommandArgsSSMTunneling(instance.InstanceID, port) if err != nil { return err } @@ -163,40 +160,16 @@ func (cmd *CommandCmd) Run( return ssh.Run(ctx, client, command, os.Stdin, os.Stdout, os.Stderr) } - // try public ip - if instance.Reservations[0].Instances[0].PublicIpAddress != nil { - ip := *instance.Reservations[0].Instances[0].PublicIpAddress - - sshClient, err := ssh.NewSSHClient("devpod", ip+":22", privateKey) - if err != nil { - logs.Debugf("error connecting to public ip [%s]: %v", ip, err) - } else { - // successfully connected to the public ip - defer sshClient.Close() - - return ssh.Run(ctx, sshClient, command, os.Stdin, os.Stdout, os.Stderr) - } - } - - // try private ip - if instance.Reservations[0].Instances[0].PrivateIpAddress != nil { - ip := *instance.Reservations[0].Instances[0].PrivateIpAddress - - sshClient, err := ssh.NewSSHClient("devpod", ip+":22", privateKey) - if err != nil { - logs.Debugf("error connecting to private ip [%s]: %v", ip, err) - } else { - // successfully connected to the private ip - defer sshClient.Close() - - return ssh.Run(ctx, sshClient, command, os.Stdin, os.Stdout, os.Stderr) - } + host := instance.Host() + sshClient, err := ssh.NewSSHClient("devpod", host+":22", privateKey) + if err != nil { + logs.Debugf("error connecting to ip [%s]: %v", host, err) + return err + } else { + // successfully connected to the public ip + defer sshClient.Close() + return ssh.Run(ctx, sshClient, command, os.Stdin, os.Stdout, os.Stderr) } - - return fmt.Errorf( - "instance %s is not reachable", - providerAws.Config.MachineID, - ) } func waitForPort(ctx context.Context, addr string) { diff --git a/cmd/delete.go b/cmd/delete.go index 6d9fb98..5c94cd5 100644 --- a/cmd/delete.go +++ b/cmd/delete.go @@ -44,7 +44,7 @@ func (cmd *DeleteCmd) Run( machine *provider.Machine, logs log.Logger, ) error { - instances, err := aws.GetDevpodInstance( + instance, err := aws.GetDevpodInstance( ctx, providerAws.AwsConfig, providerAws.Config.MachineID, @@ -53,10 +53,8 @@ func (cmd *DeleteCmd) Run( return err } - if len(instances.Reservations) > 0 { - instance := instances.Reservations[0].Instances[0] - - err = aws.Delete(ctx, providerAws.AwsConfig, instance) + if instance.Status != "" { + err = aws.Delete(ctx, providerAws, instance) if err != nil { return err } diff --git a/cmd/start.go b/cmd/start.go index b44d0e9..8a63194 100644 --- a/cmd/start.go +++ b/cmd/start.go @@ -44,7 +44,7 @@ func (cmd *StartCmd) Run( machine *provider.Machine, logs log.Logger, ) error { - instances, err := aws.GetDevpodStoppedInstance( + instance, err := aws.GetDevpodStoppedInstance( ctx, providerAws.AwsConfig, providerAws.Config.MachineID, @@ -53,10 +53,8 @@ func (cmd *StartCmd) Run( return err } - if len(instances.Reservations) > 0 { - targetID := instances.Reservations[0].Instances[0].InstanceId - - err = aws.Start(ctx, providerAws.AwsConfig, *targetID) + if instance.Status != "" { + err = aws.Start(ctx, providerAws.AwsConfig, instance.InstanceID) if err != nil { return err } diff --git a/cmd/stop.go b/cmd/stop.go index d65be95..6af8c64 100644 --- a/cmd/stop.go +++ b/cmd/stop.go @@ -53,10 +53,8 @@ func (cmd *StopCmd) Run( return err } - if len(instances.Reservations) > 0 { - targetID := instances.Reservations[0].Instances[0].InstanceId - - err = aws.Stop(ctx, providerAws.AwsConfig, *targetID) + if instances.Status != "" { + err = aws.Stop(ctx, providerAws.AwsConfig, instances.InstanceID) if err != nil { return err } diff --git a/go.mod b/go.mod index 492b4a4..6d0b172 100644 --- a/go.mod +++ b/go.mod @@ -3,10 +3,11 @@ module github.com/loft-sh/devpod-provider-aws go 1.19 require ( - github.com/aws/aws-sdk-go-v2 v1.18.0 + github.com/aws/aws-sdk-go-v2 v1.18.1 github.com/aws/aws-sdk-go-v2/config v1.18.25 github.com/aws/aws-sdk-go-v2/service/ec2 v1.98.0 github.com/aws/aws-sdk-go-v2/service/iam v1.19.12 + github.com/aws/aws-sdk-go-v2/service/route53 v1.28.3 github.com/loft-sh/devpod v0.0.3-0.20230512100016-aee23bbc9aad github.com/pkg/errors v0.9.1 github.com/spf13/cobra v1.6.1 @@ -19,8 +20,8 @@ require ( github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d // indirect github.com/aws/aws-sdk-go-v2/credentials v1.13.24 // indirect github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.3 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.33 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.27 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.34 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.28 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.3.34 // indirect github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.27 // indirect github.com/aws/aws-sdk-go-v2/service/sso v1.12.10 // indirect diff --git a/go.sum b/go.sum index 26b9bda..36e7008 100644 --- a/go.sum +++ b/go.sum @@ -6,18 +6,21 @@ github.com/Netflix/go-expect v0.0.0-20220104043353-73e0943537d2 h1:+vx7roKuyA63n github.com/Netflix/go-expect v0.0.0-20220104043353-73e0943537d2/go.mod h1:HBCaDeC1lPdgDeDbhX8XFpy1jqjK0IBG8W5K+xYqA0w= github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d h1:licZJFw2RwpHMqeKTCYkitsPqHNxTmd4SNR5r94FGM8= github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d/go.mod h1:asat636LX7Bqt5lYEZ27JNDcqxfjdBQuJ/MM4CN/Lzo= -github.com/aws/aws-sdk-go-v2 v1.18.0 h1:882kkTpSFhdgYRKVZ/VCgf7sd0ru57p2JCxz4/oN5RY= github.com/aws/aws-sdk-go-v2 v1.18.0/go.mod h1:uzbQtefpm44goOPmdKyAlXSNcwlRgF3ePWVW6EtJvvw= +github.com/aws/aws-sdk-go-v2 v1.18.1 h1:+tefE750oAb7ZQGzla6bLkOwfcQCEtC5y2RqoqCeqKo= +github.com/aws/aws-sdk-go-v2 v1.18.1/go.mod h1:uzbQtefpm44goOPmdKyAlXSNcwlRgF3ePWVW6EtJvvw= github.com/aws/aws-sdk-go-v2/config v1.18.25 h1:JuYyZcnMPBiFqn87L2cRppo+rNwgah6YwD3VuyvaW6Q= github.com/aws/aws-sdk-go-v2/config v1.18.25/go.mod h1:dZnYpD5wTW/dQF0rRNLVypB396zWCcPiBIvdvSWHEg4= github.com/aws/aws-sdk-go-v2/credentials v1.13.24 h1:PjiYyls3QdCrzqUN35jMWtUK1vqVZ+zLfdOa/UPFDp0= github.com/aws/aws-sdk-go-v2/credentials v1.13.24/go.mod h1:jYPYi99wUOPIFi0rhiOvXeSEReVOzBqFNOX5bXYoG2o= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.3 h1:jJPgroehGvjrde3XufFIJUZVK5A2L9a3KwSFgKy9n8w= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.3/go.mod h1:4Q0UFP0YJf0NrsEuEYHpM9fTSEVnD16Z3uyEF7J9JGM= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.33 h1:kG5eQilShqmJbv11XL1VpyDbaEJzWxd4zRiCG30GSn4= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.33/go.mod h1:7i0PF1ME/2eUPFcjkVIwq+DOygHEoK92t5cDqNgYbIw= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.27 h1:vFQlirhuM8lLlpI7imKOMsjdQLuN9CPi+k44F/OFVsk= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.34 h1:A5UqQEmPaCFpedKouS4v+dHCTUo2sKqhoKO9U5kxyWo= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.34/go.mod h1:wZpTEecJe0Btj3IYnDx/VlUzor9wm3fJHyvLpQF0VwY= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.27/go.mod h1:UrHnn3QV/d0pBZ6QBAEQcqFLf8FAzLmoUfPVIueOvoM= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.28 h1:srIVS45eQuewqz6fKKu6ZGXaq6FuFg5NzgQBAM6g8Y4= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.28/go.mod h1:7VRpKQQedkfIEXb4k52I7swUnZP0wohVajJMRn3vsUw= github.com/aws/aws-sdk-go-v2/internal/ini v1.3.34 h1:gGLG7yKaXG02/jBlg210R7VgQIotiQntNhsCFejawx8= github.com/aws/aws-sdk-go-v2/internal/ini v1.3.34/go.mod h1:Etz2dj6UHYuw+Xw830KfzCfWGMzqvUTCjUj5b76GVDc= github.com/aws/aws-sdk-go-v2/service/ec2 v1.98.0 h1:WblDV33AG9dhv0zFEPEmGtD5UECSNpKMxtdENULfR8M= @@ -26,6 +29,8 @@ github.com/aws/aws-sdk-go-v2/service/iam v1.19.12 h1:JH1H7POlsZt41X9JYIBLZoXW0Qv github.com/aws/aws-sdk-go-v2/service/iam v1.19.12/go.mod h1:kAnokExGCYs7zfvZEZdFHvQ/x4ZKIci0Raps6mZI1Ag= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.27 h1:0iKliEXAcCa2qVtRs7Ot5hItA2MsufrphbRFlz1Owxo= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.27/go.mod h1:EOwBD4J4S5qYszS5/3DpkejfuK+Z5/1uzICfPaZLtqw= +github.com/aws/aws-sdk-go-v2/service/route53 v1.28.3 h1:nJbE4+tHd8xpM1RB1ZF0/xTJnFd/ATz42ZC35lwXx0w= +github.com/aws/aws-sdk-go-v2/service/route53 v1.28.3/go.mod h1:Cd4MnFoV+6fELBrgWXJ4Y09FrSkn/VjNPkOr1Yr1muU= github.com/aws/aws-sdk-go-v2/service/sso v1.12.10 h1:UBQjaMTCKwyUYwiVnUt6toEJwGXsLBI6al083tpjJzY= github.com/aws/aws-sdk-go-v2/service/sso v1.12.10/go.mod h1:ouy2P4z6sJN70fR3ka3wD3Ro3KezSxU6eKGQI2+2fjI= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.10 h1:PkHIIJs8qvq0e5QybnZoG1K/9QTrLr9OsqCIo59jOBA= diff --git a/hack/provider/provider.yaml b/hack/provider/provider.yaml index 47ce5ef..7270e18 100644 --- a/hack/provider/provider.yaml +++ b/hack/provider/provider.yaml @@ -23,6 +23,7 @@ optionGroups: - AWS_USE_SPOT_INSTANCE - AWS_USE_SESSION_MANAGER - AWS_KMS_KEY_ARN_FOR_SESSION_MANAGER + - AWS_ROUTE53_ZONE_NAME name: "AWS options" defaultVisible: false - options: @@ -251,6 +252,9 @@ options: AWS_KMS_KEY_ARN_FOR_SESSION_MANAGER: description: "Specify the KMS key ARN to use for the AWS Session Manager" default: "" + AWS_ROUTE53_ZONE_NAME: + description: "The zone name of a Route53 hosted zone to use for the machine's DNS name" + default: "" INACTIVITY_TIMEOUT: description: If defined, will automatically stop the VM after the inactivity period. default: 10m diff --git a/pkg/aws/aws.go b/pkg/aws/aws.go index a21dbdc..51b90bb 100644 --- a/pkg/aws/aws.go +++ b/pkg/aws/aws.go @@ -4,8 +4,13 @@ import ( "context" "encoding/base64" "fmt" + "github.com/aws/aws-sdk-go-v2/service/route53" + r53types "github.com/aws/aws-sdk-go-v2/service/route53/types" + "github.com/aws/smithy-go" + "maps" "net/http" "regexp" + "slices" "sort" "strings" "time" @@ -22,6 +27,65 @@ import ( "github.com/pkg/errors" ) +const tagKeyHostname = "devpod:hostname" + +type Machine struct { + Status string + InstanceID string + SpotInstanceRequestId string + PublicIP string + PrivateIP string + Hostname string +} + +func (m Machine) Host() string { + if m.Hostname != "" { + return m.Hostname + } + if m.PublicIP != "" { + return m.PublicIP + } + return m.PrivateIP +} + +type route53Zone struct { + id string + Name string + private bool +} + +// NewMachineFromInstance creates a new Machine struct from an AWS ec2 Instance struct +func NewMachineFromInstance(instance types.Instance) Machine { + var hostname string + for _, t := range instance.Tags { + if *t.Key != tagKeyHostname { + continue + } + hostname = *t.Value + break + } + + publicIP := "" + if instance.PublicIpAddress != nil { + publicIP = *instance.PublicIpAddress + } + + spotInstanceRequestID := "" + if instance.SpotInstanceRequestId != nil { + spotInstanceRequestID = *instance.SpotInstanceRequestId + } + + return Machine{ + InstanceID: *instance.InstanceId, + Hostname: hostname, + PrivateIP: *instance.PrivateIpAddress, + PublicIP: publicIP, + Status: string(instance.State.Name), + SpotInstanceRequestId: spotInstanceRequestID, + } + +} + // detect if we're in an ec2 instance func isEC2Instance() bool { client := &http.Client{} @@ -430,7 +494,7 @@ func GetDevpodSecurityGroups(ctx context.Context, provider *AwsProvider) ([]stri result, err := svc.DescribeSecurityGroups(ctx, input) // It it is not created, do it - if len(result.SecurityGroups) == 0 || err != nil { + if result == nil || len(result.SecurityGroups) == 0 || err != nil { sg, err := CreateDevpodSecurityGroup(ctx, provider) if err != nil { return nil, err @@ -519,11 +583,145 @@ func CreateDevpodSecurityGroup(ctx context.Context, provider *AwsProvider) (stri return groupID, nil } +// GetDevpodRoute53Zone retrieves the Route53 zone for the devpod if applicable. A zone name can either be specified +// in the provider configuration or be detected by looking for a Route53 zone with a tag "devpod" with value "devpod". +func GetDevpodRoute53Zone(ctx context.Context, provider *AwsProvider) (route53Zone, error) { + r53client := route53.NewFromConfig(provider.AwsConfig) + if provider.Config.Route53ZoneName != "" { + listZonesOut, err := r53client.ListHostedZonesByName(ctx, &route53.ListHostedZonesByNameInput{ + DNSName: aws.String(provider.Config.Route53ZoneName), + }) + if err != nil { + return route53Zone{}, fmt.Errorf("find Route53 zone %s: %w", provider.Config.Route53ZoneName, err) + } + + zoneName := provider.Config.Route53ZoneName + if !strings.HasSuffix(zoneName, ".") { + zoneName += "." + } + for _, zone := range listZonesOut.HostedZones { + if *zone.Name == zoneName { + return route53Zone{ + id: *zone.Id, + Name: zoneName, + private: zone.Config.PrivateZone, + }, nil + } + } + return route53Zone{}, fmt.Errorf("unable to find Route53 zone %s", provider.Config.Route53ZoneName) + } + + truncated := true + var marker *string + for truncated { + hostedZoneList, err := r53client.ListHostedZones(ctx, &route53.ListHostedZonesInput{ + MaxItems: aws.Int32(100), + Marker: marker, + }) + if err != nil { + var apiErr smithy.APIError + if errors.As(err, &apiErr) && apiErr.ErrorCode() == "AccessDenied" { + provider.Log.Debugf("Access denied to list hosted zones, skipping Route53 zone detection: %v", err) + return route53Zone{}, nil + } + + return route53Zone{}, fmt.Errorf("list hosted zones: %w", err) + } + hostedZoneById := make(map[string]*r53types.HostedZone) + for _, hostedZone := range hostedZoneList.HostedZones { + hostedZoneById[strings.TrimPrefix(*hostedZone.Id, "/"+string(r53types.TagResourceTypeHostedzone)+"/")] = &hostedZone + } + resources, err := r53client.ListTagsForResources(ctx, &route53.ListTagsForResourcesInput{ + ResourceType: r53types.TagResourceTypeHostedzone, + ResourceIds: slices.Collect(maps.Keys(hostedZoneById)), + }) + if err != nil { + return route53Zone{}, fmt.Errorf("list tags for resources: %w", err) + } + for _, resourceTagSet := range resources.ResourceTagSets { + for _, tag := range resourceTagSet.Tags { + if *tag.Key == "devpod" && *tag.Value == "devpod" { + return route53Zone{ + id: *resourceTagSet.ResourceId, + Name: strings.TrimSuffix(*hostedZoneById[*resourceTagSet.ResourceId].Name, "."), + }, nil + } + } + } + + truncated = hostedZoneList.IsTruncated + marker = hostedZoneList.NextMarker + } + return route53Zone{}, nil +} + +// UpsertDevpodRoute53Record creates or updates a Route53 A record for the devpod hostname in the specified zone. +func UpsertDevpodRoute53Record(ctx context.Context, provider *AwsProvider, route53ZoneId string, hostname string, ip string) error { + r53client := route53.NewFromConfig(provider.AwsConfig) + if _, err := r53client.ChangeResourceRecordSets(ctx, &route53.ChangeResourceRecordSetsInput{ + HostedZoneId: aws.String(route53ZoneId), + ChangeBatch: &r53types.ChangeBatch{ + Changes: []r53types.Change{ + { + Action: r53types.ChangeActionCreate, + ResourceRecordSet: &r53types.ResourceRecordSet{ + Name: aws.String(hostname), + Type: r53types.RRTypeA, + ResourceRecords: []r53types.ResourceRecord{{Value: &ip}}, + TTL: aws.Int64(300), + }, + }, + }, + }, + }); err != nil { + return fmt.Errorf("upsert A record %q in zone %q to value %q: %w", hostname, route53ZoneId, ip, err) + } + return nil +} + +// DeleteDevpodRoute53Record deletes a Route53 A record for the devpod hostname in the specified zone. +func DeleteDevpodRoute53Record(ctx context.Context, provider *AwsProvider, zone route53Zone, machine Machine) error { + ip := machine.PrivateIP + if !zone.private { + ip = machine.PrivateIP + } + + r53client := route53.NewFromConfig(provider.AwsConfig) + if _, err := r53client.ChangeResourceRecordSets(ctx, &route53.ChangeResourceRecordSetsInput{ + HostedZoneId: aws.String(zone.id), + ChangeBatch: &r53types.ChangeBatch{ + Changes: []r53types.Change{ + { + Action: r53types.ChangeActionDelete, + ResourceRecordSet: &r53types.ResourceRecordSet{ + Name: aws.String(machine.Hostname), + Type: r53types.RRTypeA, + ResourceRecords: []r53types.ResourceRecord{ + { + Value: aws.String(ip), + }, + }, + TTL: aws.Int64(300), + }, + }, + }, + }, + }); err != nil { + var recordNotFoundErr *r53types.InvalidChangeBatch + if errors.As(err, &recordNotFoundErr) { + provider.Log.Warnf("A record %q in zone %q with value %q not found, skipping deletion: %v", machine.Hostname, zone.id, ip, err) + return nil + } + return fmt.Errorf("delete A record %q in zone %q with value %q: %w", machine.Hostname, zone.id, ip, err) + } + return nil +} + func GetDevpodInstance( ctx context.Context, cfg aws.Config, name string, -) (*ec2.DescribeInstancesOutput, error) { +) (Machine, error) { svc := ec2.NewFromConfig(cfg) input := &ec2.DescribeInstancesInput{ @@ -549,7 +747,7 @@ func GetDevpodInstance( result, err := svc.DescribeInstances(ctx, input) if err != nil { - return nil, err + return Machine{}, err } // Sort slice in order to have the newest result first @@ -559,14 +757,17 @@ func GetDevpodInstance( ) }) - return result, nil + if len(result.Reservations) == 0 || len(result.Reservations[0].Instances) == 0 { + return Machine{}, nil + } + return NewMachineFromInstance(result.Reservations[0].Instances[0]), nil } func GetDevpodStoppedInstance( ctx context.Context, cfg aws.Config, name string, -) (*ec2.DescribeInstancesOutput, error) { +) (Machine, error) { svc := ec2.NewFromConfig(cfg) input := &ec2.DescribeInstancesInput{ @@ -588,7 +789,7 @@ func GetDevpodStoppedInstance( result, err := svc.DescribeInstances(ctx, input) if err != nil { - return nil, err + return Machine{}, err } // Sort slice in order to have the newest result first @@ -598,14 +799,17 @@ func GetDevpodStoppedInstance( ) }) - return result, nil + if len(result.Reservations) == 0 || len(result.Reservations[0].Instances) == 0 { + return Machine{}, nil + } + return NewMachineFromInstance(result.Reservations[0].Instances[0]), nil } func GetDevpodRunningInstance( ctx context.Context, cfg aws.Config, name string, -) (*ec2.DescribeInstancesOutput, error) { +) (Machine, error) { svc := ec2.NewFromConfig(cfg) input := &ec2.DescribeInstancesInput{ @@ -627,7 +831,7 @@ func GetDevpodRunningInstance( result, err := svc.DescribeInstances(ctx, input) if err != nil { - return nil, err + return Machine{}, err } // Sort slice in order to have the newest result first @@ -637,19 +841,33 @@ func GetDevpodRunningInstance( ) }) - return result, nil + if len(result.Reservations) == 0 || len(result.Reservations[0].Instances) == 0 { + return Machine{}, nil + } + return NewMachineFromInstance(result.Reservations[0].Instances[0]), nil } -func GetInstanceTags(providerAws *AwsProvider) []types.TagSpecification { +func GetInstanceTags(providerAws *AwsProvider, zone route53Zone) []types.TagSpecification { + tags := []types.Tag{ + { + Key: aws.String("devpod"), + Value: aws.String(providerAws.Config.MachineID), + }, + } + + // in case a Route53 zone is configured, we add the hostname of the machine as a tag in order to simplify looking up + // the machine's hostname on access. + if zone.id != "" { + tags = append(tags, types.Tag{ + Key: aws.String(tagKeyHostname), + Value: aws.String(providerAws.Config.MachineID + "." + zone.Name), + }) + } + result := []types.TagSpecification{ { ResourceType: "instance", - Tags: []types.Tag{ - { - Key: aws.String("devpod"), - Value: aws.String(providerAws.Config.MachineID), - }, - }, + Tags: tags, }, } @@ -681,19 +899,24 @@ func Create( ctx context.Context, cfg aws.Config, providerAws *AwsProvider, -) (*ec2.RunInstancesOutput, error) { +) (Machine, error) { svc := ec2.NewFromConfig(cfg) devpodSG, err := GetDevpodSecurityGroups(ctx, providerAws) if err != nil { - return nil, err + return Machine{}, err } volSizeI32 := int32(providerAws.Config.DiskSizeGB) userData, err := GetInjectKeypairScript(providerAws.Config.MachineFolder) if err != nil { - return nil, err + return Machine{}, err + } + + r53Zone, err := GetDevpodRoute53Zone(ctx, providerAws) + if err != nil { + return Machine{}, err } instance := &ec2.RunInstancesInput{ @@ -715,7 +938,7 @@ func Create( }, }, }, - TagSpecifications: GetInstanceTags(providerAws), + TagSpecifications: GetInstanceTags(providerAws, r53Zone), UserData: &userData, } if providerAws.Config.UseSpotInstance { @@ -738,11 +961,11 @@ func Create( if providerAws.Config.VpcID != "" && providerAws.Config.SubnetID == "" { subnetID, err := GetSubnetID(ctx, providerAws) if err != nil { - return nil, err + return Machine{}, err } if subnetID == "" { - return nil, fmt.Errorf("could not find a matching SubnetID in VPC %s, please specify one", providerAws.Config.VpcID) + return Machine{}, fmt.Errorf("could not find a matching SubnetID in VPC %s, please specify one", providerAws.Config.VpcID) } instance.SubnetId = &subnetID @@ -754,10 +977,16 @@ func Create( result, err := svc.RunInstances(ctx, instance) if err != nil { - return nil, err + return Machine{}, err + } + + if r53Zone.id != "" { + if err := UpsertDevpodRoute53Record(ctx, providerAws, r53Zone.id, providerAws.Config.MachineID+"."+r53Zone.Name, *result.Instances[0].PrivateIpAddress); err != nil { + return Machine{}, err + } } - return result, nil + return NewMachineFromInstance(result.Instances[0]), nil } func Start(ctx context.Context, cfg aws.Config, instanceID string) error { @@ -800,12 +1029,11 @@ func Status(ctx context.Context, cfg aws.Config, name string) (client.Status, er return client.StatusNotFound, err } - if len(result.Reservations) == 0 { + if result.Status == "" { return client.StatusNotFound, nil } - status := result.Reservations[0].Instances[0].State.Name - + status := result.Status switch { case status == "running": return client.StatusRunning, nil @@ -818,12 +1046,12 @@ func Status(ctx context.Context, cfg aws.Config, name string) (client.Status, er } } -func Delete(ctx context.Context, cfg aws.Config, instance types.Instance) error { - svc := ec2.NewFromConfig(cfg) +func Delete(ctx context.Context, provider *AwsProvider, machine Machine) error { + svc := ec2.NewFromConfig(provider.AwsConfig) input := &ec2.TerminateInstancesInput{ InstanceIds: []string{ - *instance.InstanceId, + machine.InstanceID, }, } @@ -832,10 +1060,10 @@ func Delete(ctx context.Context, cfg aws.Config, instance types.Instance) error return err } - if instance.SpotInstanceRequestId != nil { + if machine.SpotInstanceRequestId != "" { _, err = svc.CancelSpotInstanceRequests(ctx, &ec2.CancelSpotInstanceRequestsInput{ SpotInstanceRequestIds: []string{ - *instance.SpotInstanceRequestId, + machine.SpotInstanceRequestId, }, }) if err != nil { @@ -843,7 +1071,17 @@ func Delete(ctx context.Context, cfg aws.Config, instance types.Instance) error } } - return err + route53Zone, err := GetDevpodRoute53Zone(ctx, provider) + if err != nil { + return err + } + if route53Zone.id != "" { + if err := DeleteDevpodRoute53Record(ctx, provider, route53Zone, machine); err != nil { + return err + } + } + + return nil } func GetInjectKeypairScript(dir string) (string, error) { diff --git a/pkg/options/options.go b/pkg/options/options.go index 96c3237..c15715a 100644 --- a/pkg/options/options.go +++ b/pkg/options/options.go @@ -22,6 +22,7 @@ var ( AWS_USE_SPOT_INSTANCE = "AWS_USE_SPOT_INSTANCE" AWS_USE_SESSION_MANAGER = "AWS_USE_SESSION_MANAGER" AWS_KMS_KEY_ARN_FOR_SESSION_MANAGER = "AWS_KMS_KEY_ARN_FOR_SESSION_MANAGER" + AWS_ROUTE53_ZONE_NAME = "AWS_ROUTE53_ZONE_NAME" ) type Options struct { @@ -42,6 +43,7 @@ type Options struct { UseSpotInstance bool UseSessionManager bool KmsKeyARNForSessionManager string + Route53ZoneName string } func FromEnv(init bool) (*Options, error) { @@ -77,6 +79,7 @@ func FromEnv(init bool) (*Options, error) { retOptions.UseSpotInstance = os.Getenv(AWS_USE_SPOT_INSTANCE) == "true" retOptions.UseSessionManager = os.Getenv(AWS_USE_SESSION_MANAGER) == "true" retOptions.KmsKeyARNForSessionManager = os.Getenv(AWS_KMS_KEY_ARN_FOR_SESSION_MANAGER) + retOptions.Route53ZoneName = os.Getenv(AWS_ROUTE53_ZONE_NAME) // Return eraly if we're just doing init if init { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/CHANGELOG.md index 7e053de..c3512dd 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/CHANGELOG.md @@ -1,3 +1,543 @@ +# Release (2023-06-13) + +## General Highlights +* **Dependency Update**: Updated to the latest SDK module versions + +## Module Highlights +* `github.com/aws/aws-sdk-go-v2/service/cloudtrail`: [v1.27.0](service/cloudtrail/CHANGELOG.md#v1270-2023-06-13) + * **Feature**: This feature allows users to view dashboards for CloudTrail Lake event data stores. +* `github.com/aws/aws-sdk-go-v2/service/codegurusecurity`: [v1.0.0](service/codegurusecurity/CHANGELOG.md#v100-2023-06-13) + * **Release**: New AWS service client module + * **Feature**: Initial release of Amazon CodeGuru Security APIs +* `github.com/aws/aws-sdk-go-v2/service/drs`: [v1.14.0](service/drs/CHANGELOG.md#v1140-2023-06-13) + * **Feature**: Added APIs to support network replication and recovery using AWS Elastic Disaster Recovery. +* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.100.0](service/ec2/CHANGELOG.md#v11000-2023-06-13) + * **Feature**: This release introduces a new feature, EC2 Instance Connect Endpoint, that enables you to connect to a resource over TCP, without requiring the resource to have a public IPv4 address. +* `github.com/aws/aws-sdk-go-v2/service/imagebuilder`: [v1.23.5](service/imagebuilder/CHANGELOG.md#v1235-2023-06-13) + * **Documentation**: Change the Image Builder ImagePipeline dateNextRun field to more accurately describe the data. +* `github.com/aws/aws-sdk-go-v2/service/lightsail`: [v1.27.0](service/lightsail/CHANGELOG.md#v1270-2023-06-13) + * **Feature**: This release adds pagination for the Get Certificates API operation. +* `github.com/aws/aws-sdk-go-v2/service/s3`: [v1.34.0](service/s3/CHANGELOG.md#v1340-2023-06-13) + * **Feature**: Integrate double encryption feature to SDKs. + * **Bug Fix**: Fix HeadObject to return types.Nound when an object does not exist. Fixes [2084](https://github.com/aws/aws-sdk-go-v2/issues/2084) +* `github.com/aws/aws-sdk-go-v2/service/securityhub`: [v1.33.0](service/securityhub/CHANGELOG.md#v1330-2023-06-13) + * **Feature**: Add support for Security Hub Automation Rules +* `github.com/aws/aws-sdk-go-v2/service/simspaceweaver`: [v1.3.0](service/simspaceweaver/CHANGELOG.md#v130-2023-06-13) + * **Feature**: This release fixes using aws-us-gov ARNs in API calls and adds documentation for snapshot APIs. +* `github.com/aws/aws-sdk-go-v2/service/verifiedpermissions`: [v1.0.0](service/verifiedpermissions/CHANGELOG.md#v100-2023-06-13) + * **Release**: New AWS service client module + * **Feature**: GA release of Amazon Verified Permissions. +* `github.com/aws/aws-sdk-go-v2/service/wafv2`: [v1.35.0](service/wafv2/CHANGELOG.md#v1350-2023-06-13) + * **Feature**: You can now detect and block fraudulent account creation attempts with the new AWS WAF Fraud Control account creation fraud prevention (ACFP) managed rule group AWSManagedRulesACFPRuleSet. +* `github.com/aws/aws-sdk-go-v2/service/wellarchitected`: [v1.21.0](service/wellarchitected/CHANGELOG.md#v1210-2023-06-13) + * **Feature**: AWS Well-Architected now supports Profiles that help customers prioritize which questions to focus on first by providing a list of prioritized questions that are better aligned with their business goals and outcomes. + +# Release (2023-06-12) + +## General Highlights +* **Dependency Update**: Updated to the latest SDK module versions + +## Module Highlights +* `github.com/aws/aws-sdk-go-v2/service/amplifyuibuilder`: [v1.11.0](service/amplifyuibuilder/CHANGELOG.md#v1110-2023-06-12) + * **Feature**: AWS Amplify UIBuilder is launching Codegen UI, a new feature that enables you to generate your amplify uibuilder components and forms. +* `github.com/aws/aws-sdk-go-v2/service/dynamodb`: [v1.19.8](service/dynamodb/CHANGELOG.md#v1198-2023-06-12) + * **Documentation**: Documentation updates for DynamoDB +* `github.com/aws/aws-sdk-go-v2/service/dynamodbstreams`: [v1.14.12](service/dynamodbstreams/CHANGELOG.md#v11412-2023-06-12) + * **Documentation**: Documentation updates for DynamoDB Streams +* `github.com/aws/aws-sdk-go-v2/service/fsx`: [v1.29.0](service/fsx/CHANGELOG.md#v1290-2023-06-12) + * **Feature**: Amazon FSx for NetApp ONTAP now supports joining a storage virtual machine (SVM) to Active Directory after the SVM has been created. +* `github.com/aws/aws-sdk-go-v2/service/opensearch`: [v1.18.0](service/opensearch/CHANGELOG.md#v1180-2023-06-12) + * **Feature**: This release adds support for SkipUnavailable connection property for cross cluster search +* `github.com/aws/aws-sdk-go-v2/service/rekognition`: [v1.29.0](service/rekognition/CHANGELOG.md#v1290-2023-06-12) + * **Feature**: This release adds support for improved accuracy with user vector in Amazon Rekognition Face Search. Adds new APIs: AssociateFaces, CreateUser, DeleteUser, DisassociateFaces, ListUsers, SearchUsers, SearchUsersByImage. Also adds new face metadata that can be stored: user vector. +* `github.com/aws/aws-sdk-go-v2/service/sagemaker`: [v1.84.0](service/sagemaker/CHANGELOG.md#v1840-2023-06-12) + * **Feature**: Sagemaker Neo now supports compilation for inferentia2 (ML_INF2) and Trainium1 (ML_TRN1) as available targets. With these devices, you can run your workloads at highest performance with lowest cost. inferentia2 (ML_INF2) is available in CMH and Trainium1 (ML_TRN1) is available in IAD currently + +# Release (2023-06-09) + +## Module Highlights +* `github.com/aws/aws-sdk-go-v2/service/acmpca`: [v1.21.13](service/acmpca/CHANGELOG.md#v12113-2023-06-09) + * **Documentation**: Document-only update to refresh CLI documentation for AWS Private CA. No change to the service. +* `github.com/aws/aws-sdk-go-v2/service/connect`: [v1.58.0](service/connect/CHANGELOG.md#v1580-2023-06-09) + * **Feature**: This release adds search APIs for Prompts, Quick Connects and Hours of Operations, which can be used to search for those resources within a Connect Instance. + +# Release (2023-06-08) + +## Module Highlights +* `github.com/aws/aws-sdk-go-v2/service/athena`: [v1.30.0](service/athena/CHANGELOG.md#v1300-2023-06-08) + * **Feature**: You can now define custom spark properties at start of the session for use cases like cluster encryption, table formats, and general Spark tuning. +* `github.com/aws/aws-sdk-go-v2/service/comprehendmedical`: [v1.16.0](service/comprehendmedical/CHANGELOG.md#v1160-2023-06-08) + * **Feature**: This release supports a new set of entities and traits. +* `github.com/aws/aws-sdk-go-v2/service/paymentcryptography`: [v1.0.0](service/paymentcryptography/CHANGELOG.md#v100-2023-06-08) + * **Release**: New AWS service client module + * **Feature**: Initial release of AWS Payment Cryptography Control Plane service for creating and managing cryptographic keys used during card payment processing. +* `github.com/aws/aws-sdk-go-v2/service/paymentcryptographydata`: [v1.0.0](service/paymentcryptographydata/CHANGELOG.md#v100-2023-06-08) + * **Release**: New AWS service client module + * **Feature**: Initial release of AWS Payment Cryptography DataPlane Plane service for performing cryptographic operations typically used during card payment processing. +* `github.com/aws/aws-sdk-go-v2/service/servicecatalog`: [v1.19.0](service/servicecatalog/CHANGELOG.md#v1190-2023-06-08) + * **Feature**: New parameter added in ServiceCatalog DescribeProvisioningArtifact api - IncludeProvisioningArtifactParameters. This parameter can be used to return information about the parameters used to provision the product +* `github.com/aws/aws-sdk-go-v2/service/timestreamwrite`: [v1.17.0](service/timestreamwrite/CHANGELOG.md#v1170-2023-06-08) + * **Feature**: This release adds the capability for customers to define how their data should be partitioned, optimizing for certain access patterns. This definition will take place as a part of the table creation. + +# Release (2023-06-07) + +## Module Highlights +* `github.com/aws/aws-sdk-go-v2/service/cloudformation`: [v1.29.0](service/cloudformation/CHANGELOG.md#v1290-2023-06-07) + * **Feature**: AWS CloudFormation StackSets is updating the deployment experience for all stackset operations to skip suspended AWS accounts during deployments. StackSets will skip target AWS accounts that are suspended and set the Detailed Status of the corresponding stack instances as SKIPPED_SUSPENDED_ACCOUNT +* `github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs`: [v1.21.0](service/cloudwatchlogs/CHANGELOG.md#v1210-2023-06-07) + * **Feature**: This change adds support for account level data protection policies using 3 new APIs, PutAccountPolicy, DeleteAccountPolicy and DescribeAccountPolicy. DescribeLogGroup API has been modified to indicate if account level policy is applied to the LogGroup via "inheritedProperties" list in the response. +* `github.com/aws/aws-sdk-go-v2/service/customerprofiles`: [v1.25.0](service/customerprofiles/CHANGELOG.md#v1250-2023-06-07) + * **Feature**: This release introduces event stream related APIs. +* `github.com/aws/aws-sdk-go-v2/service/directconnect`: [v1.18.15](service/directconnect/CHANGELOG.md#v11815-2023-06-07) + * **Documentation**: This update corrects the jumbo frames mtu values from 9100 to 8500 for transit virtual interfaces. +* `github.com/aws/aws-sdk-go-v2/service/emrcontainers`: [v1.19.0](service/emrcontainers/CHANGELOG.md#v1190-2023-06-07) + * **Feature**: EMR on EKS adds support for log rotation of Spark container logs with EMR-6.11.0 onwards, to the StartJobRun API. +* `github.com/aws/aws-sdk-go-v2/service/iotdeviceadvisor`: [v1.19.0](service/iotdeviceadvisor/CHANGELOG.md#v1190-2023-06-07) + * **Feature**: AWS IoT Core Device Advisor now supports new Qualification Suite test case list. With this update, customers can more easily create new qualification test suite with an empty rootGroup input. + +# Release (2023-06-06) + +## Module Highlights +* `github.com/aws/aws-sdk-go-v2/service/connect`: [v1.57.1](service/connect/CHANGELOG.md#v1571-2023-06-06) + * **Documentation**: GetMetricDataV2 API is now available in AWS GovCloud(US) region. +* `github.com/aws/aws-sdk-go-v2/service/emr`: [v1.26.0](service/emr/CHANGELOG.md#v1260-2023-06-06) + * **Feature**: This release provides customers the ability to specify an allocation strategies amongst PRICE_CAPACITY_OPTIMIZED, CAPACITY_OPTIMIZED, LOWEST_PRICE, DIVERSIFIED for Spot instances in Instance Feet cluster. This enables customers to choose an allocation strategy best suited for their workload. +* `github.com/aws/aws-sdk-go-v2/service/iam`: [v1.20.0](service/iam/CHANGELOG.md#v1200-2023-06-06) + * **Feature**: This release updates the AccountAlias regex pattern with the same length restrictions enforced by the length constraint. +* `github.com/aws/aws-sdk-go-v2/service/inspector2`: [v1.14.0](service/inspector2/CHANGELOG.md#v1140-2023-06-06) + * **Feature**: Adds new response properties and request parameters for 'last scanned at' on the ListCoverage operation. This feature allows you to search and view the date of which your resources were last scanned by Inspector. +* `github.com/aws/aws-sdk-go-v2/service/iot`: [v1.38.0](service/iot/CHANGELOG.md#v1380-2023-06-06) + * **Feature**: Adding IoT Device Management Software Package Catalog APIs to register, store, and report system software packages, along with their versions and metadata in a centralized location. +* `github.com/aws/aws-sdk-go-v2/service/lexmodelsv2`: [v1.29.0](service/lexmodelsv2/CHANGELOG.md#v1290-2023-06-06) + * **Feature**: This release adds support for Lex Developers to create test sets and to execute those test-sets against their bots. +* `github.com/aws/aws-sdk-go-v2/service/quicksight`: [v1.37.0](service/quicksight/CHANGELOG.md#v1370-2023-06-06) + * **Feature**: QuickSight support for pivot table field collapse state, radar chart range scale and multiple scope options in conditional formatting. +* `github.com/aws/aws-sdk-go-v2/service/signer`: [v1.15.0](service/signer/CHANGELOG.md#v1150-2023-06-06) + * **Feature**: AWS Signer is launching Container Image Signing, a new feature that enables you to sign and verify container images. This feature enables you to validate that only container images you approve are used in your enterprise. +* `github.com/aws/aws-sdk-go-v2/service/sqs`: [v1.23.0](service/sqs/CHANGELOG.md#v1230-2023-06-06) + * **Feature**: Amazon SQS adds three new APIs - StartMessageMoveTask, CancelMessageMoveTask, and ListMessageMoveTasks to automate redriving messages from dead-letter queues to source queues or a custom destination. + +# Release (2023-06-05) + +## Module Highlights +* `github.com/aws/aws-sdk-go-v2/service/cloudformation`: [v1.28.0](service/cloudformation/CHANGELOG.md#v1280-2023-06-05) + * **Feature**: AWS CloudFormation StackSets provides customers with three new APIs to activate, deactivate, and describe AWS Organizations trusted access which is needed to get started with service-managed StackSets. +* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.99.0](service/ec2/CHANGELOG.md#v1990-2023-06-05) + * **Feature**: Making InstanceTagAttribute as the required parameter for the DeregisterInstanceEventNotificationAttributes and RegisterInstanceEventNotificationAttributes APIs. +* `github.com/aws/aws-sdk-go-v2/service/finspace`: [v1.10.0](service/finspace/CHANGELOG.md#v1100-2023-06-05) + * **Feature**: Releasing new Managed kdb Insights APIs +* `github.com/aws/aws-sdk-go-v2/service/frauddetector`: [v1.25.0](service/frauddetector/CHANGELOG.md#v1250-2023-06-05) + * **Feature**: Added new variable types, new DateTime data type, and new rules engine functions for interacting and working with DateTime data types. +* `github.com/aws/aws-sdk-go-v2/service/keyspaces`: [v1.3.0](service/keyspaces/CHANGELOG.md#v130-2023-06-05) + * **Feature**: This release adds support for MRR GA launch, and includes multiregion support in create-keyspace, get-keyspace, and list-keyspace. +* `github.com/aws/aws-sdk-go-v2/service/kms`: [v1.22.0](service/kms/CHANGELOG.md#v1220-2023-06-05) + * **Feature**: This release includes feature to import customer's asymmetric (RSA and ECC) and HMAC keys into KMS. It also includes feature to allow customers to specify number of days to schedule a KMS key deletion as a policy condition key. +* `github.com/aws/aws-sdk-go-v2/service/lambda`: [v1.35.0](service/lambda/CHANGELOG.md#v1350-2023-06-05) + * **Feature**: Add Ruby 3.2 (ruby3.2) Runtime support to AWS Lambda. +* `github.com/aws/aws-sdk-go-v2/service/mwaa`: [v1.16.0](service/mwaa/CHANGELOG.md#v1160-2023-06-05) + * **Feature**: This release adds ROLLING_BACK and CREATING_SNAPSHOT environment statuses for Amazon MWAA environments. + +# Release (2023-06-02) + +## Module Highlights +* `github.com/aws/aws-sdk-go-v2/service/athena`: [v1.29.0](service/athena/CHANGELOG.md#v1290-2023-06-02) + * **Feature**: This release introduces the DeleteCapacityReservation API and the ability to manage capacity reservations using CloudFormation +* `github.com/aws/aws-sdk-go-v2/service/cloudtrail`: [v1.26.0](service/cloudtrail/CHANGELOG.md#v1260-2023-06-02) + * **Feature**: This feature allows users to start and stop event ingestion on a CloudTrail Lake event data store. +* `github.com/aws/aws-sdk-go-v2/service/sagemaker`: [v1.83.0](service/sagemaker/CHANGELOG.md#v1830-2023-06-02) + * **Feature**: This release adds Selective Execution feature that allows SageMaker Pipelines users to run selected steps in a pipeline. +* `github.com/aws/aws-sdk-go-v2/service/wafv2`: [v1.34.0](service/wafv2/CHANGELOG.md#v1340-2023-06-02) + * **Feature**: Added APIs to describe managed products. The APIs retrieve information about rule groups that are managed by AWS and by AWS Marketplace sellers. + +# Release (2023-06-01) + +## Module Highlights +* `github.com/aws/aws-sdk-go-v2/service/alexaforbusiness`: [v1.15.11](service/alexaforbusiness/CHANGELOG.md#v11511-2023-06-01) + * **Documentation**: Alexa for Business has been deprecated and is no longer supported. +* `github.com/aws/aws-sdk-go-v2/service/appflow`: [v1.30.0](service/appflow/CHANGELOG.md#v1300-2023-06-01) + * **Feature**: Added ability to select DataTransferApiType for DescribeConnector and CreateFlow requests when using Async supported connectors. Added supportedDataTransferType to DescribeConnector/DescribeConnectors/ListConnector response. +* `github.com/aws/aws-sdk-go-v2/service/customerprofiles`: [v1.24.0](service/customerprofiles/CHANGELOG.md#v1240-2023-06-01) + * **Feature**: This release introduces calculated attribute related APIs. +* `github.com/aws/aws-sdk-go-v2/service/ivs`: [v1.22.0](service/ivs/CHANGELOG.md#v1220-2023-06-01) + * **Feature**: API Update for IVS Advanced Channel type +* `github.com/aws/aws-sdk-go-v2/service/sagemaker`: [v1.82.1](service/sagemaker/CHANGELOG.md#v1821-2023-06-01) + * **Documentation**: Amazon Sagemaker Autopilot adds support for Parquet file input to NLP text classification jobs. +* `github.com/aws/aws-sdk-go-v2/service/wafv2`: [v1.33.1](service/wafv2/CHANGELOG.md#v1331-2023-06-01) + * **Documentation**: Corrected the information for the header order FieldToMatch setting + +# Release (2023-05-31) + +## Module Highlights +* `github.com/aws/aws-sdk-go-v2/service/configservice`: [v1.33.0](service/configservice/CHANGELOG.md#v1330-2023-05-31) + * **Feature**: Resource Types Exclusion feature launch by AWS Config +* `github.com/aws/aws-sdk-go-v2/service/frauddetector`: [v1.24.0](service/frauddetector/CHANGELOG.md#v1240-2023-05-31) + * **Feature**: This release enables publishing event predictions from Amazon Fraud Detector (AFD) to Amazon EventBridge. For example, after getting predictions from AFD, Amazon EventBridge rules can be configured to trigger notification through an SNS topic, send a message with SES, or trigger Lambda workflows. +* `github.com/aws/aws-sdk-go-v2/service/healthlake`: [v1.16.0](service/healthlake/CHANGELOG.md#v1160-2023-05-31) + * **Feature**: This release adds a new request parameter to the CreateFHIRDatastore API operation. IdentityProviderConfiguration specifies how you want to authenticate incoming requests to your Healthlake Data Store. +* `github.com/aws/aws-sdk-go-v2/service/m2`: [v1.5.0](service/m2/CHANGELOG.md#v150-2023-05-31) + * **Feature**: Adds an optional create-only 'roleArn' property to Application resources. Enables PS and PO data set org types. +* `github.com/aws/aws-sdk-go-v2/service/rds`: [v1.45.0](service/rds/CHANGELOG.md#v1450-2023-05-31) + * **Feature**: This release adds support for changing the engine for Oracle using the ModifyDbInstance API +* `github.com/aws/aws-sdk-go-v2/service/servicecatalog`: [v1.18.5](service/servicecatalog/CHANGELOG.md#v1185-2023-05-31) + * **Documentation**: Documentation updates for ServiceCatalog. +* `github.com/aws/aws-sdk-go-v2/service/workspacesweb`: [v1.10.0](service/workspacesweb/CHANGELOG.md#v1100-2023-05-31) + * **Feature**: WorkSpaces Web now allows you to control which IP addresses your WorkSpaces Web portal may be accessed from. + +# Release (2023-05-30) + +## Module Highlights +* `github.com/aws/aws-sdk-go-v2/service/chimesdkvoice`: [v1.6.0](service/chimesdkvoice/CHANGELOG.md#v160-2023-05-30) + * **Feature**: Added optional CallLeg field to StartSpeakerSearchTask API request +* `github.com/aws/aws-sdk-go-v2/service/glue`: [v1.50.0](service/glue/CHANGELOG.md#v1500-2023-05-30) + * **Feature**: Added Runtime parameter to allow selection of Ray Runtime +* `github.com/aws/aws-sdk-go-v2/service/groundstation`: [v1.18.3](service/groundstation/CHANGELOG.md#v1183-2023-05-30) + * **Documentation**: Updating description of GetMinuteUsage to be clearer. +* `github.com/aws/aws-sdk-go-v2/service/iotfleetwise`: [v1.4.0](service/iotfleetwise/CHANGELOG.md#v140-2023-05-30) + * **Feature**: Campaigns now support selecting Timestream or S3 as the data destination, Signal catalogs now support "Deprecation" keyword released in VSS v2.1 and "Comment" keyword released in VSS v3.0 +* `github.com/aws/aws-sdk-go-v2/service/location`: [v1.23.0](service/location/CHANGELOG.md#v1230-2023-05-30) + * **Feature**: This release adds API support for political views for the maps service APIs: CreateMap, UpdateMap, DescribeMap. +* `github.com/aws/aws-sdk-go-v2/service/memorydb`: [v1.13.0](service/memorydb/CHANGELOG.md#v1130-2023-05-30) + * **Feature**: Amazon MemoryDB for Redis now supports AWS Identity and Access Management authentication access to Redis clusters starting with redis-engine version 7.0 +* `github.com/aws/aws-sdk-go-v2/service/personalize`: [v1.24.0](service/personalize/CHANGELOG.md#v1240-2023-05-30) + * **Feature**: This release provides support for the exclusion of certain columns for training when creating a solution and creating or updating a recommender with Amazon Personalize. +* `github.com/aws/aws-sdk-go-v2/service/polly`: [v1.26.0](service/polly/CHANGELOG.md#v1260-2023-05-30) + * **Feature**: Amazon Polly adds 2 new voices - Sofie (da-DK) and Niamh (en-IE) +* `github.com/aws/aws-sdk-go-v2/service/securityhub`: [v1.32.0](service/securityhub/CHANGELOG.md#v1320-2023-05-30) + * **Feature**: Added new resource detail objects to ASFF, including resources for AwsGuardDutyDetector, AwsAmazonMqBroker, AwsEventSchemasRegistry, AwsAppSyncGraphQlApi and AwsStepFunctionStateMachine. +* `github.com/aws/aws-sdk-go-v2/service/securitylake`: [v1.4.0](service/securitylake/CHANGELOG.md#v140-2023-05-30) + * **Feature**: Log sources are now versioned. AWS log sources and custom sources will now come with a version identifier that enables producers to vend multiple schema versions to subscribers. Security Lake API have been refactored to more closely align with AWS API conventions. +* `github.com/aws/aws-sdk-go-v2/service/wafv2`: [v1.33.0](service/wafv2/CHANGELOG.md#v1330-2023-05-30) + * **Feature**: This SDK release provides customers the ability to use Header Order as a field to match. + +# Release (2023-05-26) + +## Module Highlights +* `github.com/aws/aws-sdk-go-v2/service/connect`: [v1.57.0](service/connect/CHANGELOG.md#v1570-2023-05-26) + * **Feature**: Documentation update for a new Initiation Method value in DescribeContact API +* `github.com/aws/aws-sdk-go-v2/service/iotwireless`: [v1.28.0](service/iotwireless/CHANGELOG.md#v1280-2023-05-26) + * **Feature**: Add Multicast Group support in Network Analyzer Configuration. +* `github.com/aws/aws-sdk-go-v2/service/sagemaker`: [v1.82.0](service/sagemaker/CHANGELOG.md#v1820-2023-05-26) + * **Feature**: Added ml.p4d and ml.inf1 as supported instance type families for SageMaker Notebook Instances. + +# Release (2023-05-25) + +## Module Highlights +* `github.com/aws/aws-sdk-go-v2/service/applicationautoscaling`: [v1.21.0](service/applicationautoscaling/CHANGELOG.md#v1210-2023-05-25) + * **Feature**: With this release, ElastiCache customers will be able to use predefined metricType "ElastiCacheDatabaseCapacityUsageCountedForEvictPercentage" for their ElastiCache instances. +* `github.com/aws/aws-sdk-go-v2/service/codepipeline`: [v1.15.0](service/codepipeline/CHANGELOG.md#v1150-2023-05-25) + * **Feature**: Add PollingDisabledAt time information in PipelineMetadata object of GetPipeline API. +* `github.com/aws/aws-sdk-go-v2/service/gamelift`: [v1.19.0](service/gamelift/CHANGELOG.md#v1190-2023-05-25) + * **Feature**: GameLift FleetIQ users can now filter game server claim requests to exclude servers on instances that are draining. +* `github.com/aws/aws-sdk-go-v2/service/glue`: [v1.49.0](service/glue/CHANGELOG.md#v1490-2023-05-25) + * **Feature**: Added ability to create data quality rulesets for shared, cross-account Glue Data Catalog tables. Added support for dataset comparison rules through a new parameter called AdditionalDataSources. Enhanced the data quality results with a map containing profiled metric values. +* `github.com/aws/aws-sdk-go-v2/service/migrationhubrefactorspaces`: [v1.10.0](service/migrationhubrefactorspaces/CHANGELOG.md#v1100-2023-05-25) + * **Feature**: This SDK update allows for path parameter syntax to be passed to the CreateRoute API. Path parameter syntax require parameters to be enclosed in {} characters. This update also includes a new AppendSourcePath field which lets users forward the source path to the Service URL endpoint. +* `github.com/aws/aws-sdk-go-v2/service/sagemaker`: [v1.81.0](service/sagemaker/CHANGELOG.md#v1810-2023-05-25) + * **Feature**: Amazon SageMaker Automatic Model Tuning now supports enabling Autotune for tuning jobs which can choose tuning job configurations. + +# Release (2023-05-24) + +## Module Highlights +* `github.com/aws/aws-sdk-go-v2/service/appsync`: [v1.21.0](service/appsync/CHANGELOG.md#v1210-2023-05-24) + * **Feature**: This release introduces AppSync Merged APIs, which provide the ability to compose multiple source APIs into a single federated/merged API. +* `github.com/aws/aws-sdk-go-v2/service/connect`: [v1.56.0](service/connect/CHANGELOG.md#v1560-2023-05-24) + * **Feature**: Amazon Connect Evaluation Capabilities: validation improvements +* `github.com/aws/aws-sdk-go-v2/service/costandusagereportservice`: [v1.16.0](service/costandusagereportservice/CHANGELOG.md#v1160-2023-05-24) + * **Feature**: Add support for split cost allocation data on a report. +* `github.com/aws/aws-sdk-go-v2/service/sagemaker`: [v1.80.0](service/sagemaker/CHANGELOG.md#v1800-2023-05-24) + * **Feature**: SageMaker now provides an instantaneous deployment recommendation through the DescribeModel API + +# Release (2023-05-23) + +## Module Highlights +* `github.com/aws/aws-sdk-go-v2/service/fms`: [v1.24.0](service/fms/CHANGELOG.md#v1240-2023-05-23) + * **Feature**: Fixes issue that could cause calls to GetAdminScope and ListAdminAccountsForOrganization to return a 500 Internal Server error. +* `github.com/aws/aws-sdk-go-v2/service/sagemaker`: [v1.79.0](service/sagemaker/CHANGELOG.md#v1790-2023-05-23) + * **Feature**: Added ModelNameEquals, ModelPackageVersionArnEquals in request and ModelName, SamplePayloadUrl, ModelPackageVersionArn in response of ListInferenceRecommendationsJobs API. Added Invocation timestamps in response of DescribeInferenceRecommendationsJob API & ListInferenceRecommendationsJobSteps API. +* `github.com/aws/aws-sdk-go-v2/service/translate`: [v1.18.0](service/translate/CHANGELOG.md#v1180-2023-05-23) + * **Feature**: Added support for calling TranslateDocument API. + +# Release (2023-05-22) + +## Module Highlights +* `github.com/aws/aws-sdk-go-v2/service/backup`: [v1.22.0](service/backup/CHANGELOG.md#v1220-2023-05-22) + * **Feature**: Added support for tags on restore. +* `github.com/aws/aws-sdk-go-v2/service/pinpoint`: [v1.19.2](service/pinpoint/CHANGELOG.md#v1192-2023-05-22) + * **Documentation**: Amazon Pinpoint is deprecating the tags parameter in the UpdateSegment, UpdateCampaign, UpdateEmailTemplate, UpdateSmsTemplate, UpdatePushTemplate, UpdateInAppTemplate and UpdateVoiceTemplate. Amazon Pinpoint will end support tags parameter by May 22, 2023. +* `github.com/aws/aws-sdk-go-v2/service/quicksight`: [v1.36.0](service/quicksight/CHANGELOG.md#v1360-2023-05-22) + * **Feature**: Add support for Asset Bundle, Geospatial Heatmaps. + +# Release (2023-05-19) + +## Module Highlights +* `github.com/aws/aws-sdk-go-v2/service/backup`: [v1.21.0](service/backup/CHANGELOG.md#v1210-2023-05-19) + * **Feature**: Add ResourceArn, ResourceType, and BackupVaultName to ListRecoveryPointsByLegalHold API response. +* `github.com/aws/aws-sdk-go-v2/service/connectcases`: [v1.4.0](service/connectcases/CHANGELOG.md#v140-2023-05-19) + * **Feature**: This release adds the ability to create fields with type Url through the CreateField API. For more information see https://docs.aws.amazon.com/cases/latest/APIReference/Welcome.html +* `github.com/aws/aws-sdk-go-v2/service/mediapackagev2`: [v1.0.0](service/mediapackagev2/CHANGELOG.md#v100-2023-05-19) + * **Release**: New AWS service client module + * **Feature**: Adds support for the MediaPackage Live v2 API +* `github.com/aws/aws-sdk-go-v2/service/sesv2`: [v1.18.0](service/sesv2/CHANGELOG.md#v1180-2023-05-19) + * **Feature**: This release allows customers to update scaling mode property of dedicated IP pools with PutDedicatedIpPoolScalingAttributes call. + +# Release (2023-05-18) + +## Module Highlights +* `github.com/aws/aws-sdk-go-v2/service/athena`: [v1.28.0](service/athena/CHANGELOG.md#v1280-2023-05-18) + * **Feature**: Removing SparkProperties from EngineConfiguration object for StartSession API call +* `github.com/aws/aws-sdk-go-v2/service/cloudtrail`: [v1.25.0](service/cloudtrail/CHANGELOG.md#v1250-2023-05-18) + * **Feature**: Add ConflictException to PutEventSelectors, add (Channel/EDS)ARNInvalidException to Tag APIs. These exceptions provide customers with more specific error messages instead of internal errors. +* `github.com/aws/aws-sdk-go-v2/service/computeoptimizer`: [v1.24.0](service/computeoptimizer/CHANGELOG.md#v1240-2023-05-18) + * **Feature**: In this launch, we add support for showing integration status with external metric providers such as Instana, Datadog ...etc in GetEC2InstanceRecommendations and ExportEC2InstanceRecommendations apis +* `github.com/aws/aws-sdk-go-v2/service/connect`: [v1.55.0](service/connect/CHANGELOG.md#v1550-2023-05-18) + * **Feature**: You can programmatically create and manage prompts using APIs, for example, to extract prompts stored within Amazon Connect and add them to your Amazon S3 bucket. AWS CloudTrail, AWS CloudFormation and tagging are supported. +* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.98.0](service/ec2/CHANGELOG.md#v1980-2023-05-18) + * **Feature**: Add support for i4g.large, i4g.xlarge, i4g.2xlarge, i4g.4xlarge, i4g.8xlarge and i4g.16xlarge instances powered by AWS Graviton2 processors that deliver up to 15% better compute performance than our other storage-optimized instances. +* `github.com/aws/aws-sdk-go-v2/service/ecs`: [v1.27.1](service/ecs/CHANGELOG.md#v1271-2023-05-18) + * **Documentation**: Documentation only release to address various tickets. +* `github.com/aws/aws-sdk-go-v2/service/mediaconvert`: [v1.37.0](service/mediaconvert/CHANGELOG.md#v1370-2023-05-18) + * **Feature**: This release introduces a new MXF Profile for XDCAM which is strictly compliant with the SMPTE RDD 9 standard and improved handling of output name modifiers. +* `github.com/aws/aws-sdk-go-v2/service/rds`: [v1.44.1](service/rds/CHANGELOG.md#v1441-2023-05-18) + * **Documentation**: RDS documentation update for the EngineVersion parameter of ModifyDBSnapshot +* `github.com/aws/aws-sdk-go-v2/service/sagemakergeospatial`: [v1.3.0](service/sagemakergeospatial/CHANGELOG.md#v130-2023-05-18) + * **Feature**: This release makes ExecutionRoleArn a required field in the StartEarthObservationJob API. + +# Release (2023-05-16) + +## Module Highlights +* `github.com/aws/aws-sdk-go-v2/service/detective`: [v1.19.0](service/detective/CHANGELOG.md#v1190-2023-05-16) + * **Feature**: Added and updated API operations in Detective to support the integration of ASFF Security Hub findings. +* `github.com/aws/aws-sdk-go-v2/service/directconnect`: [v1.18.14](service/directconnect/CHANGELOG.md#v11814-2023-05-16) + * **Documentation**: This release includes an update to the mtu value for CreateTransitVirtualInterface from 9001 mtu to 8500 mtu. +* `github.com/aws/aws-sdk-go-v2/service/glue`: [v1.48.0](service/glue/CHANGELOG.md#v1480-2023-05-16) + * **Feature**: Add Support for Tags for Custom Entity Types +* `github.com/aws/aws-sdk-go-v2/service/secretsmanager`: [v1.19.8](service/secretsmanager/CHANGELOG.md#v1198-2023-05-16) + * **Documentation**: Documentation updates for Secrets Manager +* `github.com/aws/aws-sdk-go-v2/service/wafv2`: [v1.32.0](service/wafv2/CHANGELOG.md#v1320-2023-05-16) + * **Feature**: My AWS Service (placeholder) - You can now rate limit web requests based on aggregation keys other than IP addresses, and you can aggregate using combinations of keys. You can also rate limit all requests that match a scope-down statement, without further aggregation. + +# Release (2023-05-15) + +## Module Highlights +* `github.com/aws/aws-sdk-go-v2/service/athena`: [v1.27.0](service/athena/CHANGELOG.md#v1270-2023-05-15) + * **Feature**: You can now define custom spark properties at start of the session for use cases like cluster encryption, table formats, and general Spark tuning. +* `github.com/aws/aws-sdk-go-v2/service/codecatalyst`: [v1.3.0](service/codecatalyst/CHANGELOG.md#v130-2023-05-15) + * **Feature**: With this release, the users can list the active sessions connected to their Dev Environment on AWS CodeCatalyst +* `github.com/aws/aws-sdk-go-v2/service/rekognition`: [v1.28.0](service/rekognition/CHANGELOG.md#v1280-2023-05-15) + * **Feature**: This release adds a new EyeDirection attribute in Amazon Rekognition DetectFaces and IndexFaces APIs which predicts the yaw and pitch angles of a person's eye gaze direction for each face detected in the image. +* `github.com/aws/aws-sdk-go-v2/service/rolesanywhere`: [v1.2.0](service/rolesanywhere/CHANGELOG.md#v120-2023-05-15) + * **Feature**: Adds support for custom notification settings in a trust anchor. Introduces PutNotificationSettings and ResetNotificationSettings API's. Updates DurationSeconds max value to 3600. +* `github.com/aws/aws-sdk-go-v2/service/transfer`: [v1.29.0](service/transfer/CHANGELOG.md#v1290-2023-05-15) + * **Feature**: This release introduces the ability to require both password and SSH key when users authenticate to your Transfer Family servers that use the SFTP protocol. + +# Release (2023-05-11) + +## Module Highlights +* `github.com/aws/aws-sdk-go-v2/service/connect`: [v1.54.2](service/connect/CHANGELOG.md#v1542-2023-05-11) + * **Documentation**: This release updates GetMetricDataV2 API, to support metric data up-to last 35 days +* `github.com/aws/aws-sdk-go-v2/service/elasticache`: [v1.27.0](service/elasticache/CHANGELOG.md#v1270-2023-05-11) + * **Feature**: Added support to modify the cluster mode configuration for the existing ElastiCache ReplicationGroups. Customers can now modify the configuration from cluster mode disabled to cluster mode enabled. +* `github.com/aws/aws-sdk-go-v2/service/elasticsearchservice`: [v1.19.0](service/elasticsearchservice/CHANGELOG.md#v1190-2023-05-11) + * **Feature**: This release fixes DescribePackages API error with null filter value parameter. +* `github.com/aws/aws-sdk-go-v2/service/health`: [v1.17.0](service/health/CHANGELOG.md#v1170-2023-05-11) + * **Feature**: Add support for regional endpoints +* `github.com/aws/aws-sdk-go-v2/service/ivsrealtime`: [v1.2.0](service/ivsrealtime/CHANGELOG.md#v120-2023-05-11) + * **Feature**: Add methods for inspecting and debugging stages: ListStageSessions, GetStageSession, ListParticipants, GetParticipant, and ListParticipantEvents. +* `github.com/aws/aws-sdk-go-v2/service/omics`: [v1.4.0](service/omics/CHANGELOG.md#v140-2023-05-11) + * **Feature**: This release provides support for Ready2Run and GPU workflows, an improved read set filter, the direct upload of read sets into Omics Storage, and annotation parsing for analytics stores. +* `github.com/aws/aws-sdk-go-v2/service/support`: [v1.15.0](service/support/CHANGELOG.md#v1150-2023-05-11) + * **Feature**: This release adds 2 new Support APIs, DescribeCreateCaseOptions and DescribeSupportedLanguages. You can use these new APIs to get available support languages. + +# Release (2023-05-10) + +## Module Highlights +* `github.com/aws/aws-sdk-go-v2/service/emr`: [v1.25.0](service/emr/CHANGELOG.md#v1250-2023-05-10) + * **Feature**: EMR Studio now supports programmatically executing a Notebooks on an EMR on EKS cluster. In addition, notebooks can now be executed by specifying its location in S3. +* `github.com/aws/aws-sdk-go-v2/service/rds`: [v1.44.0](service/rds/CHANGELOG.md#v1440-2023-05-10) + * **Feature**: Amazon Relational Database Service (RDS) updates for the new Aurora I/O-Optimized storage type for Amazon Aurora DB clusters +* `github.com/aws/aws-sdk-go-v2/service/swf`: [v1.15.0](service/swf/CHANGELOG.md#v1150-2023-05-10) + * **Feature**: This release adds a new API parameter to exclude old history events from decision tasks. + +# Release (2023-05-09) + +## General Highlights +* **Dependency Update**: Updated to the latest SDK module versions + +## Module Highlights +* `github.com/aws/aws-sdk-go-v2/service/applicationautoscaling`: [v1.20.0](service/applicationautoscaling/CHANGELOG.md#v1200-2023-05-09) + * **Feature**: With this release, Amazon SageMaker Serverless Inference customers can use Application Auto Scaling to auto scale the provisioned concurrency of their serverless endpoints. +* `github.com/aws/aws-sdk-go-v2/service/glue`: [v1.47.0](service/glue/CHANGELOG.md#v1470-2023-05-09) + * **Feature**: This release adds AmazonRedshift Source and Target nodes in addition to DynamicTransform OutputSchemas +* `github.com/aws/aws-sdk-go-v2/service/sagemaker`: [v1.78.0](service/sagemaker/CHANGELOG.md#v1780-2023-05-09) + * **Feature**: This release includes support for (1) Provisioned Concurrency for Amazon SageMaker Serverless Inference and (2) UpdateEndpointWeightsAndCapacities API for Serverless endpoints. + +# Release (2023-05-08) + +## General Highlights +* **Dependency Update**: Updated to the latest SDK module versions + +## Module Highlights +* `github.com/aws/aws-sdk-go-v2/service/glue`: [v1.46.0](service/glue/CHANGELOG.md#v1460-2023-05-08) + * **Feature**: Support large worker types G.4x and G.8x for Glue Spark +* `github.com/aws/aws-sdk-go-v2/service/guardduty`: [v1.23.0](service/guardduty/CHANGELOG.md#v1230-2023-05-08) + * **Feature**: Add AccessDeniedException 403 Error message code to support 3 Tagging related APIs +* `github.com/aws/aws-sdk-go-v2/service/iotsitewise`: [v1.29.0](service/iotsitewise/CHANGELOG.md#v1290-2023-05-08) + * **Feature**: Provide support for 20,000 max results for GetAssetPropertyValueHistory/BatchGetAssetPropertyValueHistory and 15 minute aggregate resolution for GetAssetPropertyAggregates/BatchGetAssetPropertyAggregates +* `github.com/aws/aws-sdk-go-v2/service/sts`: [v1.19.0](service/sts/CHANGELOG.md#v1190-2023-05-08) + * **Feature**: Documentation updates for AWS Security Token Service. + +# Release (2023-05-05) + +## Module Highlights +* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.97.0](service/ec2/CHANGELOG.md#v1970-2023-05-05) + * **Feature**: This release adds support the inf2 and trn1n instances. inf2 instances are purpose built for deep learning inference while trn1n instances are powered by AWS Trainium accelerators and they build on the capabilities of Trainium-powered trn1 instances. +* `github.com/aws/aws-sdk-go-v2/service/inspector2`: [v1.13.0](service/inspector2/CHANGELOG.md#v1130-2023-05-05) + * **Feature**: Amazon Inspector now allows customers to search its vulnerability intelligence database if any of the Inspector scanning types are activated. +* `github.com/aws/aws-sdk-go-v2/service/mediatailor`: [v1.23.0](service/mediatailor/CHANGELOG.md#v1230-2023-05-05) + * **Feature**: This release adds support for AFTER_LIVE_EDGE mode configuration for avail suppression, and adding a fill-policy setting that sets the avail suppression to PARTIAL_AVAIL or FULL_AVAIL_ONLY when AFTER_LIVE_EDGE is enabled. +* `github.com/aws/aws-sdk-go-v2/service/sqs`: [v1.22.0](service/sqs/CHANGELOG.md#v1220-2023-05-05) + * **Feature**: Revert previous SQS protocol change. + +# Release (2023-05-04) + +## General Highlights +* **Dependency Update**: Updated to the latest SDK module versions + +## Module Highlights +* `github.com/aws/aws-sdk-go-v2/service/cloudwatch`: [v1.26.0](service/cloudwatch/CHANGELOG.md#v1260-2023-05-04) + * **Feature**: Adds support for filtering by metric names in CloudWatch Metric Streams. +* `github.com/aws/aws-sdk-go-v2/service/configservice`: [v1.32.0](service/configservice/CHANGELOG.md#v1320-2023-05-04) + * **Feature**: Updated ResourceType enum with new resource types onboarded by AWS Config in April 2023. +* `github.com/aws/aws-sdk-go-v2/service/connect`: [v1.54.1](service/connect/CHANGELOG.md#v1541-2023-05-04) + * **Documentation**: Remove unused InvalidParameterException from CreateParticipant API +* `github.com/aws/aws-sdk-go-v2/service/ecs`: [v1.27.0](service/ecs/CHANGELOG.md#v1270-2023-05-04) + * **Feature**: Documentation update for new error type NamespaceNotFoundException for CreateCluster and UpdateCluster +* `github.com/aws/aws-sdk-go-v2/service/networkfirewall`: [v1.28.0](service/networkfirewall/CHANGELOG.md#v1280-2023-05-04) + * **Feature**: This release adds support for the Suricata REJECT option in midstream exception configurations. +* `github.com/aws/aws-sdk-go-v2/service/opensearch`: [v1.17.0](service/opensearch/CHANGELOG.md#v1170-2023-05-04) + * **Feature**: DescribeDomainNodes: A new API that provides configuration information for nodes part of the domain +* `github.com/aws/aws-sdk-go-v2/service/quicksight`: [v1.35.0](service/quicksight/CHANGELOG.md#v1350-2023-05-04) + * **Feature**: Add support for Topic, Dataset parameters and VPC +* `github.com/aws/aws-sdk-go-v2/service/rekognition`: [v1.27.0](service/rekognition/CHANGELOG.md#v1270-2023-05-04) + * **Feature**: This release adds a new attribute FaceOccluded. Additionally, you can now select attributes individually (e.g. ["DEFAULT", "FACE_OCCLUDED", "AGE_RANGE"] instead of ["ALL"]), which can reduce response time. +* `github.com/aws/aws-sdk-go-v2/service/s3`: [v1.33.1](service/s3/CHANGELOG.md#v1331-2023-05-04) + * **Documentation**: Documentation updates for Amazon S3 +* `github.com/aws/aws-sdk-go-v2/service/sagemaker`: [v1.77.0](service/sagemaker/CHANGELOG.md#v1770-2023-05-04) + * **Feature**: We added support for ml.inf2 and ml.trn1 family of instances on Amazon SageMaker for deploying machine learning (ML) models for Real-time and Asynchronous inference. You can use these instances to achieve high performance at a low cost for generative artificial intelligence (AI) models. +* `github.com/aws/aws-sdk-go-v2/service/securityhub`: [v1.31.0](service/securityhub/CHANGELOG.md#v1310-2023-05-04) + * **Feature**: Add support for Finding History. +* `github.com/aws/aws-sdk-go-v2/service/sqs`: [v1.21.0](service/sqs/CHANGELOG.md#v1210-2023-05-04) + * **Feature**: This release enables customers to call SQS using AWS JSON-1.0 protocol. + +# Release (2023-05-03) + +## Module Highlights +* `github.com/aws/aws-sdk-go-v2/service/appsync`: [v1.20.0](service/appsync/CHANGELOG.md#v1200-2023-05-03) + * **Feature**: Private API support for AWS AppSync. With Private APIs, you can now create GraphQL APIs that can only be accessed from your Amazon Virtual Private Cloud ("VPC"). +* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.96.0](service/ec2/CHANGELOG.md#v1960-2023-05-03) + * **Feature**: Adds an SDK paginator for GetNetworkInsightsAccessScopeAnalysisFindings +* `github.com/aws/aws-sdk-go-v2/service/inspector2`: [v1.12.0](service/inspector2/CHANGELOG.md#v1120-2023-05-03) + * **Feature**: This feature provides deep inspection for linux based instance +* `github.com/aws/aws-sdk-go-v2/service/iottwinmaker`: [v1.12.0](service/iottwinmaker/CHANGELOG.md#v1120-2023-05-03) + * **Feature**: This release adds a field for GetScene API to return error code and message from dependency services. +* `github.com/aws/aws-sdk-go-v2/service/networkfirewall`: [v1.27.0](service/networkfirewall/CHANGELOG.md#v1270-2023-05-03) + * **Feature**: AWS Network Firewall now supports policy level HOME_NET variable overrides. +* `github.com/aws/aws-sdk-go-v2/service/opensearch`: [v1.16.0](service/opensearch/CHANGELOG.md#v1160-2023-05-03) + * **Feature**: Amazon OpenSearch Service adds the option to deploy a domain across multiple Availability Zones, with each AZ containing a complete copy of data and with nodes in one AZ acting as a standby. This option provides 99.99% availability and consistent performance in the event of infrastructure failure. +* `github.com/aws/aws-sdk-go-v2/service/wellarchitected`: [v1.20.0](service/wellarchitected/CHANGELOG.md#v1200-2023-05-03) + * **Feature**: This release deepens integration with AWS Service Catalog AppRegistry to improve workload resource discovery. + +# Release (2023-05-02) + +## Module Highlights +* `github.com/aws/aws-sdk-go-v2/service/appflow`: [v1.29.0](service/appflow/CHANGELOG.md#v1290-2023-05-02) + * **Feature**: This release adds new API to cancel flow executions. +* `github.com/aws/aws-sdk-go-v2/service/connect`: [v1.54.0](service/connect/CHANGELOG.md#v1540-2023-05-02) + * **Feature**: Amazon Connect Service Rules API update: Added OnContactEvaluationSubmit event source to support user configuring evaluation form rules. +* `github.com/aws/aws-sdk-go-v2/service/ecs`: [v1.26.3](service/ecs/CHANGELOG.md#v1263-2023-05-02) + * **Documentation**: Documentation only update to address Amazon ECS tickets. +* `github.com/aws/aws-sdk-go-v2/service/kendra`: [v1.40.0](service/kendra/CHANGELOG.md#v1400-2023-05-02) + * **Feature**: AWS Kendra now supports configuring document fields/attributes via the GetQuerySuggestions API. You can now base query suggestions on the contents of document fields. +* `github.com/aws/aws-sdk-go-v2/service/resiliencehub`: [v1.11.0](service/resiliencehub/CHANGELOG.md#v1110-2023-05-02) + * **Feature**: This release will improve resource level transparency in applications by discovering previously hidden resources. +* `github.com/aws/aws-sdk-go-v2/service/sagemaker`: [v1.76.0](service/sagemaker/CHANGELOG.md#v1760-2023-05-02) + * **Feature**: Amazon Sagemaker Autopilot supports training models with sample weights and additional objective metrics. + +# Release (2023-05-01) + +## Module Highlights +* `github.com/aws/aws-sdk-go-v2/service/computeoptimizer`: [v1.23.0](service/computeoptimizer/CHANGELOG.md#v1230-2023-05-01) + * **Feature**: support for tag filtering within compute optimizer. ability to filter recommendation results by tag and tag key value pairs. ability to filter by inferred workload type added. +* `github.com/aws/aws-sdk-go-v2/service/kms`: [v1.21.0](service/kms/CHANGELOG.md#v1210-2023-05-01) + * **Feature**: This release makes the NitroEnclave request parameter Recipient and the response field for CiphertextForRecipient available in AWS SDKs. It also adds the regex pattern for CloudHsmClusterId validation. + +# Release (2023-04-28) + +## Module Highlights +* `github.com/aws/aws-sdk-go-v2/service/appflow`: [v1.28.0](service/appflow/CHANGELOG.md#v1280-2023-04-28) + * **Feature**: Adds Jwt Support for Salesforce Credentials. +* `github.com/aws/aws-sdk-go-v2/service/athena`: [v1.26.0](service/athena/CHANGELOG.md#v1260-2023-04-28) + * **Feature**: You can now use capacity reservations on Amazon Athena to run SQL queries on fully-managed compute capacity. +* `github.com/aws/aws-sdk-go-v2/service/directconnect`: [v1.18.12](service/directconnect/CHANGELOG.md#v11812-2023-04-28) + * **Documentation**: This release corrects the jumbo frames MTU from 9100 to 8500. +* `github.com/aws/aws-sdk-go-v2/service/efs`: [v1.20.0](service/efs/CHANGELOG.md#v1200-2023-04-28) + * **Feature**: This release adds PAUSED and PAUSING state as a returned value for DescribeReplicationConfigurations response. +* `github.com/aws/aws-sdk-go-v2/service/grafana`: [v1.13.0](service/grafana/CHANGELOG.md#v1130-2023-04-28) + * **Feature**: This release adds support for the grafanaVersion parameter in CreateWorkspace. +* `github.com/aws/aws-sdk-go-v2/service/iot`: [v1.37.0](service/iot/CHANGELOG.md#v1370-2023-04-28) + * **Feature**: This release allows AWS IoT Core users to specify a TLS security policy when creating and updating AWS IoT Domain Configurations. +* `github.com/aws/aws-sdk-go-v2/service/rekognition`: [v1.26.0](service/rekognition/CHANGELOG.md#v1260-2023-04-28) + * **Feature**: Added support for aggregating moderation labels by video segment timestamps for Stored Video Content Moderation APIs and added additional information about the job to all Stored Video Get API responses. +* `github.com/aws/aws-sdk-go-v2/service/simspaceweaver`: [v1.2.0](service/simspaceweaver/CHANGELOG.md#v120-2023-04-28) + * **Feature**: Added a new CreateSnapshot API. For the StartSimulation API, SchemaS3Location is now optional, added a new SnapshotS3Location parameter. For the DescribeSimulation API, added SNAPSHOT_IN_PROGRESS simulation state, deprecated SchemaError, added new fields: StartError and SnapshotS3Location. +* `github.com/aws/aws-sdk-go-v2/service/wafv2`: [v1.31.0](service/wafv2/CHANGELOG.md#v1310-2023-04-28) + * **Feature**: You can now associate a web ACL with a Verified Access instance. +* `github.com/aws/aws-sdk-go-v2/service/workspaces`: [v1.28.11](service/workspaces/CHANGELOG.md#v12811-2023-04-28) + * **Documentation**: Added Windows 11 to support Microsoft_Office_2019 + +# Release (2023-04-27) + +## Module Highlights +* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.95.0](service/ec2/CHANGELOG.md#v1950-2023-04-27) + * **Feature**: This release adds support for AMD SEV-SNP on EC2 instances. +* `github.com/aws/aws-sdk-go-v2/service/emrcontainers`: [v1.18.0](service/emrcontainers/CHANGELOG.md#v1180-2023-04-27) + * **Feature**: This release adds GetManagedEndpointSessionCredentials, a new API that allows customers to generate an auth token to connect to a managed endpoint, enabling features such as self-hosted Jupyter notebooks for EMR on EKS. +* `github.com/aws/aws-sdk-go-v2/service/guardduty`: [v1.22.0](service/guardduty/CHANGELOG.md#v1220-2023-04-27) + * **Feature**: Added API support to initiate on-demand malware scan on specific resources. +* `github.com/aws/aws-sdk-go-v2/service/iotdeviceadvisor`: [v1.18.0](service/iotdeviceadvisor/CHANGELOG.md#v1180-2023-04-27) + * **Feature**: AWS IoT Core Device Advisor now supports MQTT over WebSocket. With this update, customers can run all three test suites of AWS IoT Core Device Advisor - qualification, custom, and long duration tests - using Signature Version 4 for MQTT over WebSocket. +* `github.com/aws/aws-sdk-go-v2/service/kafka`: [v1.20.0](service/kafka/CHANGELOG.md#v1200-2023-04-27) + * **Feature**: Amazon MSK has added new APIs that allows multi-VPC private connectivity and cluster policy support for Amazon MSK clusters that simplify connectivity and access between your Apache Kafka clients hosted in different VPCs and AWS accounts and your Amazon MSK clusters. +* `github.com/aws/aws-sdk-go-v2/service/lambda`: [v1.34.0](service/lambda/CHANGELOG.md#v1340-2023-04-27) + * **Feature**: Add Java 17 (java17) support to AWS Lambda +* `github.com/aws/aws-sdk-go-v2/service/osis`: [v1.0.1](service/osis/CHANGELOG.md#v101-2023-04-27) + * **Documentation**: Documentation updates for OpenSearch Ingestion +* `github.com/aws/aws-sdk-go-v2/service/qldb`: [v1.15.10](service/qldb/CHANGELOG.md#v11510-2023-04-27) + * **Documentation**: Documentation updates for Amazon QLDB +* `github.com/aws/aws-sdk-go-v2/service/sagemaker`: [v1.75.0](service/sagemaker/CHANGELOG.md#v1750-2023-04-27) + * **Feature**: Added ml.p4d.24xlarge and ml.p4de.24xlarge as supported instances for SageMaker Studio + +# Release (2023-04-26) + +## Module Highlights +* `github.com/aws/aws-sdk-go-v2/service/osis`: [v1.0.0](service/osis/CHANGELOG.md#v100-2023-04-26) + * **Release**: New AWS service client module + * **Feature**: Initial release for OpenSearch Ingestion + +# Release (2023-04-25) + +## Module Highlights +* `github.com/aws/aws-sdk-go-v2/service/chimesdkmessaging`: [v1.15.0](service/chimesdkmessaging/CHANGELOG.md#v1150-2023-04-25) + * **Feature**: Remove non actionable field from UpdateChannelReadMarker and DeleteChannelRequest. Add precise exceptions to DeleteChannel and DeleteStreamingConfigurations error cases. +* `github.com/aws/aws-sdk-go-v2/service/connect`: [v1.53.0](service/connect/CHANGELOG.md#v1530-2023-04-25) + * **Feature**: Amazon Connect, Contact Lens Evaluation API release including ability to manage forms and to submit contact evaluations. +* `github.com/aws/aws-sdk-go-v2/service/datasync`: [v1.24.0](service/datasync/CHANGELOG.md#v1240-2023-04-25) + * **Feature**: This release adds 13 new APIs to support AWS DataSync Discovery GA. +* `github.com/aws/aws-sdk-go-v2/service/directoryservice`: [v1.17.0](service/directoryservice/CHANGELOG.md#v1170-2023-04-25) + * **Feature**: New field added in AWS Managed Microsoft AD DescribeSettings response and regex pattern update for UpdateSettings value. Added length validation to RemoteDomainName. +* `github.com/aws/aws-sdk-go-v2/service/pinpoint`: [v1.19.0](service/pinpoint/CHANGELOG.md#v1190-2023-04-25) + * **Feature**: Adds support for journey runs and querying journey execution metrics based on journey runs. Adds execution metrics to campaign activities. Updates docs for Advanced Quiet Time. + # Release (2023-04-24) ## General Highlights diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/go_module_metadata.go index 38edf04..abee83b 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/go_module_metadata.go @@ -3,4 +3,4 @@ package aws // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.18.0" +const goModuleVersion = "1.18.1" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/retryer.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/retryer.go index 6777e21..b0ba4cb 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/retryer.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/retryer.go @@ -54,7 +54,7 @@ type Retryer interface { MaxAttempts() int // RetryDelay returns the delay that should be used before retrying the - // attempt. Will return error if the if the delay could not be determined. + // attempt. Will return error if the delay could not be determined. RetryDelay(attempt int, opErr error) (time.Duration, error) // GetRetryToken attempts to deduct the retry cost from the retry token pool. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/CHANGELOG.md index e454f48..297f1e4 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/CHANGELOG.md @@ -1,3 +1,7 @@ +# v1.1.34 (2023-06-13) + +* **Dependency Update**: Updated to the latest SDK module versions + # v1.1.33 (2023-04-24) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go index 17cd026..2948b31 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go @@ -3,4 +3,4 @@ package configsources // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.1.33" +const goModuleVersion = "1.1.34" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/CHANGELOG.md index ec1fb79..0ffc56c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/CHANGELOG.md @@ -1,3 +1,7 @@ +# v2.4.28 (2023-06-13) + +* **Dependency Update**: Updated to the latest SDK module versions + # v2.4.27 (2023-04-24) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go index 6812eb2..0a8b690 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go @@ -3,4 +3,4 @@ package endpoints // goModuleVersion is the tagged release for this module -const goModuleVersion = "2.4.27" +const goModuleVersion = "2.4.28" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/CHANGELOG.md new file mode 100644 index 0000000..f29d4ae --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/CHANGELOG.md @@ -0,0 +1,270 @@ +# v1.28.3 (2023-06-15) + +* No change notes available for this release. + +# v1.28.2 (2023-06-13) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.28.1 (2023-05-04) + +* No change notes available for this release. + +# v1.28.0 (2023-04-24) + +* **Feature**: added paginator for listResourceRecordSets +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.7 (2023-04-10) + +* No change notes available for this release. + +# v1.27.6 (2023-04-07) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.5 (2023-03-21) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.4 (2023-03-10) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.3 (2023-02-22) + +* **Bug Fix**: Prevent nil pointer dereference when retrieving error codes. + +# v1.27.2 (2023-02-20) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.1 (2023-02-03) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.0 (2023-01-24) + +* **Feature**: Amazon Route 53 now supports the Asia Pacific (Melbourne) Region (ap-southeast-4) for latency records, geoproximity records, and private DNS for Amazon VPCs in that region. + +# v1.26.0 (2023-01-05) + +* **Feature**: Add `ErrorCodeOverride` field to all error structs (aws/smithy-go#401). + +# v1.25.2 (2022-12-15) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.25.1 (2022-12-02) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.25.0 (2022-11-21) + +* **Feature**: Amazon Route 53 now supports the Asia Pacific (Hyderabad) Region (ap-south-2) for latency records, geoproximity records, and private DNS for Amazon VPCs in that region. + +# v1.24.0 (2022-11-15) + +* **Feature**: Amazon Route 53 now supports the Europe (Spain) Region (eu-south-2) for latency records, geoproximity records, and private DNS for Amazon VPCs in that region. + +# v1.23.0 (2022-11-08) + +* **Feature**: Amazon Route 53 now supports the Europe (Zurich) Region (eu-central-2) for latency records, geoproximity records, and private DNS for Amazon VPCs in that region. + +# v1.22.4 (2022-10-24) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.22.3 (2022-10-21) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.22.2 (2022-09-21) + +* **Bug Fix**: Updated GetChange to sanitize /change/ prefix of the changeId returned from the service. + +# v1.22.1 (2022-09-20) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.22.0 (2022-09-14) + +* **Feature**: Amazon Route 53 now supports the Middle East (UAE) Region (me-central-1) for latency records, geoproximity records, and private DNS for Amazon VPCs in that region. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.21.11 (2022-09-02) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.21.10 (2022-09-01) + +* **Documentation**: Documentation updates for Amazon Route 53. + +# v1.21.9 (2022-08-31) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.21.8 (2022-08-29) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.21.7 (2022-08-11) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.21.6 (2022-08-09) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.21.5 (2022-08-08) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.21.4 (2022-08-01) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.21.3 (2022-07-05) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.21.2 (2022-06-29) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.21.1 (2022-06-07) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.21.0 (2022-06-01) + +* **Feature**: Add new APIs to support Route 53 IP Based Routing + +# v1.20.5 (2022-05-17) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.20.4 (2022-04-25) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.20.3 (2022-03-30) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.20.2 (2022-03-24) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.20.1 (2022-03-23) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.20.0 (2022-03-08) + +* **Feature**: Updated `github.com/aws/smithy-go` to latest version +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.19.0 (2022-02-24.2) + +* **Feature**: API client updated + +# v1.18.0 (2022-02-24) + +* **Feature**: API client updated +* **Feature**: Adds RetryMaxAttempts and RetryMod to API client Options. This allows the API clients' default Retryer to be configured from the shared configuration files or environment variables. Adding a new Retry mode of `Adaptive`. `Adaptive` retry mode is an experimental mode, adding client rate limiting when throttles reponses are received from an API. See [retry.AdaptiveMode](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/aws/retry#AdaptiveMode) for more details, and configuration options. +* **Feature**: Updated `github.com/aws/smithy-go` to latest version +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.17.0 (2022-01-14) + +* **Feature**: Updated `github.com/aws/smithy-go` to latest version +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.16.0 (2022-01-07) + +* **Feature**: Updated `github.com/aws/smithy-go` to latest version +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.15.0 (2021-12-21) + +* **Feature**: API Paginators now support specifying the initial starting token, and support stopping on empty string tokens. +* **Feature**: API client updated + +# v1.14.2 (2021-12-02) + +* **Bug Fix**: Fixes a bug that prevented aws.EndpointResolverWithOptions from being used by the service client. ([#1514](https://github.com/aws/aws-sdk-go-v2/pull/1514)) +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.14.1 (2021-11-19) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.14.0 (2021-11-12) + +* **Feature**: Waiters now have a `WaitForOutput` method, which can be used to retrieve the output of the successful wait operation. Thank you to [Andrew Haines](https://github.com/haines) for contributing this feature. + +# v1.13.0 (2021-11-06) + +* **Feature**: The SDK now supports configuration of FIPS and DualStack endpoints using environment variables, shared configuration, or programmatically. +* **Feature**: Updated `github.com/aws/smithy-go` to latest version +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.12.0 (2021-10-21) + +* **Feature**: Updated to latest version +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.11.2 (2021-10-11) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.11.1 (2021-09-17) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.11.0 (2021-08-27) + +* **Feature**: Updated `github.com/aws/smithy-go` to latest version +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.10.0 (2021-08-19) + +* **Feature**: API client updated +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.9.0 (2021-08-12) + +* **Feature**: API client updated + +# v1.8.0 (2021-08-04) + +* **Feature**: Updated to latest API model. +* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.7.1 (2021-07-15) + +* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.7.0 (2021-06-25) + +* **Feature**: API client updated +* **Feature**: Updated `github.com/aws/smithy-go` to latest version +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.6.2 (2021-06-04) + +* **Documentation**: Updated service client to latest API model. + +# v1.6.1 (2021-05-20) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.6.0 (2021-05-14) + +* **Feature**: Constant has been added to modules to enable runtime version inspection for reporting. +* **Feature**: Updated to latest service API model. +* **Dependency Update**: Updated to the latest SDK module versions + diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/LICENSE.txt b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/LICENSE.txt new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/LICENSE.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_client.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_client.go new file mode 100644 index 0000000..28543a1 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_client.go @@ -0,0 +1,681 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package route53 + +import ( + "context" + "github.com/aws/aws-sdk-go-v2/aws" + "github.com/aws/aws-sdk-go-v2/aws/defaults" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/retry" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + awshttp "github.com/aws/aws-sdk-go-v2/aws/transport/http" + internalConfig "github.com/aws/aws-sdk-go-v2/internal/configsources" + route53cust "github.com/aws/aws-sdk-go-v2/service/route53/internal/customizations" + smithy "github.com/aws/smithy-go" + smithydocument "github.com/aws/smithy-go/document" + "github.com/aws/smithy-go/logging" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "net" + "net/http" + "strings" + "time" +) + +const ServiceID = "Route 53" +const ServiceAPIVersion = "2013-04-01" + +// Client provides the API client to make operations call for Amazon Route 53. +type Client struct { + options Options +} + +// New returns an initialized Client based on the functional options. Provide +// additional functional options to further configure the behavior of the client, +// such as changing the client's endpoint or adding custom middleware behavior. +func New(options Options, optFns ...func(*Options)) *Client { + options = options.Copy() + + resolveDefaultLogger(&options) + + setResolvedDefaultsMode(&options) + + resolveRetryer(&options) + + resolveHTTPClient(&options) + + resolveHTTPSignerV4(&options) + + resolveDefaultEndpointConfiguration(&options) + + for _, fn := range optFns { + fn(&options) + } + + client := &Client{ + options: options, + } + + return client +} + +type Options struct { + // Set of options to modify how an operation is invoked. These apply to all + // operations invoked for this client. Use functional options on operation call to + // modify this list for per operation behavior. + APIOptions []func(*middleware.Stack) error + + // Configures the events that will be sent to the configured logger. + ClientLogMode aws.ClientLogMode + + // The credentials object to use when signing requests. + Credentials aws.CredentialsProvider + + // The configuration DefaultsMode that the SDK should use when constructing the + // clients initial default settings. + DefaultsMode aws.DefaultsMode + + // The endpoint options to be used when attempting to resolve an endpoint. + EndpointOptions EndpointResolverOptions + + // The service endpoint resolver. + EndpointResolver EndpointResolver + + // Signature Version 4 (SigV4) Signer + HTTPSignerV4 HTTPSignerV4 + + // The logger writer interface to write logging messages to. + Logger logging.Logger + + // The region to send requests to. (Required) + Region string + + // RetryMaxAttempts specifies the maximum number attempts an API client will call + // an operation that fails with a retryable error. A value of 0 is ignored, and + // will not be used to configure the API client created default retryer, or modify + // per operation call's retry max attempts. When creating a new API Clients this + // member will only be used if the Retryer Options member is nil. This value will + // be ignored if Retryer is not nil. If specified in an operation call's functional + // options with a value that is different than the constructed client's Options, + // the Client's Retryer will be wrapped to use the operation's specific + // RetryMaxAttempts value. + RetryMaxAttempts int + + // RetryMode specifies the retry mode the API client will be created with, if + // Retryer option is not also specified. When creating a new API Clients this + // member will only be used if the Retryer Options member is nil. This value will + // be ignored if Retryer is not nil. Currently does not support per operation call + // overrides, may in the future. + RetryMode aws.RetryMode + + // Retryer guides how HTTP requests should be retried in case of recoverable + // failures. When nil the API client will use a default retryer. The kind of + // default retry created by the API client can be changed with the RetryMode + // option. + Retryer aws.Retryer + + // The RuntimeEnvironment configuration, only populated if the DefaultsMode is set + // to DefaultsModeAuto and is initialized using config.LoadDefaultConfig . You + // should not populate this structure programmatically, or rely on the values here + // within your applications. + RuntimeEnvironment aws.RuntimeEnvironment + + // The initial DefaultsMode used when the client options were constructed. If the + // DefaultsMode was set to aws.DefaultsModeAuto this will store what the resolved + // value was at that point in time. Currently does not support per operation call + // overrides, may in the future. + resolvedDefaultsMode aws.DefaultsMode + + // The HTTP client to invoke API calls with. Defaults to client's default HTTP + // implementation if nil. + HTTPClient HTTPClient +} + +// WithAPIOptions returns a functional option for setting the Client's APIOptions +// option. +func WithAPIOptions(optFns ...func(*middleware.Stack) error) func(*Options) { + return func(o *Options) { + o.APIOptions = append(o.APIOptions, optFns...) + } +} + +// WithEndpointResolver returns a functional option for setting the Client's +// EndpointResolver option. +func WithEndpointResolver(v EndpointResolver) func(*Options) { + return func(o *Options) { + o.EndpointResolver = v + } +} + +type HTTPClient interface { + Do(*http.Request) (*http.Response, error) +} + +// Copy creates a clone where the APIOptions list is deep copied. +func (o Options) Copy() Options { + to := o + to.APIOptions = make([]func(*middleware.Stack) error, len(o.APIOptions)) + copy(to.APIOptions, o.APIOptions) + + return to +} +func (c *Client) invokeOperation(ctx context.Context, opID string, params interface{}, optFns []func(*Options), stackFns ...func(*middleware.Stack, Options) error) (result interface{}, metadata middleware.Metadata, err error) { + ctx = middleware.ClearStackValues(ctx) + stack := middleware.NewStack(opID, smithyhttp.NewStackRequest) + options := c.options.Copy() + for _, fn := range optFns { + fn(&options) + } + + finalizeRetryMaxAttemptOptions(&options, *c) + + finalizeClientEndpointResolverOptions(&options) + + for _, fn := range stackFns { + if err := fn(stack, options); err != nil { + return nil, metadata, err + } + } + + for _, fn := range options.APIOptions { + if err := fn(stack); err != nil { + return nil, metadata, err + } + } + + handler := middleware.DecorateHandler(smithyhttp.NewClientHandler(options.HTTPClient), stack) + result, metadata, err = handler.Handle(ctx, params) + if err != nil { + err = &smithy.OperationError{ + ServiceID: ServiceID, + OperationName: opID, + Err: err, + } + } + return result, metadata, err +} + +type noSmithyDocumentSerde = smithydocument.NoSerde + +func resolveDefaultLogger(o *Options) { + if o.Logger != nil { + return + } + o.Logger = logging.Nop{} +} + +func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { + return middleware.AddSetLoggerMiddleware(stack, o.Logger) +} + +func setResolvedDefaultsMode(o *Options) { + if len(o.resolvedDefaultsMode) > 0 { + return + } + + var mode aws.DefaultsMode + mode.SetFromString(string(o.DefaultsMode)) + + if mode == aws.DefaultsModeAuto { + mode = defaults.ResolveDefaultsModeAuto(o.Region, o.RuntimeEnvironment) + } + + o.resolvedDefaultsMode = mode +} + +// NewFromConfig returns a new client from the provided config. +func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { + opts := Options{ + Region: cfg.Region, + DefaultsMode: cfg.DefaultsMode, + RuntimeEnvironment: cfg.RuntimeEnvironment, + HTTPClient: cfg.HTTPClient, + Credentials: cfg.Credentials, + APIOptions: cfg.APIOptions, + Logger: cfg.Logger, + ClientLogMode: cfg.ClientLogMode, + } + resolveAWSRetryerProvider(cfg, &opts) + resolveAWSRetryMaxAttempts(cfg, &opts) + resolveAWSRetryMode(cfg, &opts) + resolveAWSEndpointResolver(cfg, &opts) + resolveUseDualStackEndpoint(cfg, &opts) + resolveUseFIPSEndpoint(cfg, &opts) + return New(opts, optFns...) +} + +func resolveHTTPClient(o *Options) { + var buildable *awshttp.BuildableClient + + if o.HTTPClient != nil { + var ok bool + buildable, ok = o.HTTPClient.(*awshttp.BuildableClient) + if !ok { + return + } + } else { + buildable = awshttp.NewBuildableClient() + } + + modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode) + if err == nil { + buildable = buildable.WithDialerOptions(func(dialer *net.Dialer) { + if dialerTimeout, ok := modeConfig.GetConnectTimeout(); ok { + dialer.Timeout = dialerTimeout + } + }) + + buildable = buildable.WithTransportOptions(func(transport *http.Transport) { + if tlsHandshakeTimeout, ok := modeConfig.GetTLSNegotiationTimeout(); ok { + transport.TLSHandshakeTimeout = tlsHandshakeTimeout + } + }) + } + + o.HTTPClient = buildable +} + +func resolveRetryer(o *Options) { + if o.Retryer != nil { + return + } + + if len(o.RetryMode) == 0 { + modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode) + if err == nil { + o.RetryMode = modeConfig.RetryMode + } + } + if len(o.RetryMode) == 0 { + o.RetryMode = aws.RetryModeStandard + } + + var standardOptions []func(*retry.StandardOptions) + if v := o.RetryMaxAttempts; v != 0 { + standardOptions = append(standardOptions, func(so *retry.StandardOptions) { + so.MaxAttempts = v + }) + } + + switch o.RetryMode { + case aws.RetryModeAdaptive: + var adaptiveOptions []func(*retry.AdaptiveModeOptions) + if len(standardOptions) != 0 { + adaptiveOptions = append(adaptiveOptions, func(ao *retry.AdaptiveModeOptions) { + ao.StandardOptions = append(ao.StandardOptions, standardOptions...) + }) + } + o.Retryer = retry.NewAdaptiveMode(adaptiveOptions...) + + default: + o.Retryer = retry.NewStandard(standardOptions...) + } +} + +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + +func resolveAWSRetryMode(cfg aws.Config, o *Options) { + if len(cfg.RetryMode) == 0 { + return + } + o.RetryMode = cfg.RetryMode +} +func resolveAWSRetryMaxAttempts(cfg aws.Config, o *Options) { + if cfg.RetryMaxAttempts == 0 { + return + } + o.RetryMaxAttempts = cfg.RetryMaxAttempts +} + +func finalizeRetryMaxAttemptOptions(o *Options, client Client) { + if v := o.RetryMaxAttempts; v == 0 || v == client.options.RetryMaxAttempts { + return + } + + o.Retryer = retry.AddWithMaxAttempts(o.Retryer, o.RetryMaxAttempts) +} + +func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { + if cfg.EndpointResolver == nil && cfg.EndpointResolverWithOptions == nil { + return + } + o.EndpointResolver = withEndpointResolver(cfg.EndpointResolver, cfg.EndpointResolverWithOptions, NewDefaultEndpointResolver()) +} + +func addClientUserAgent(stack *middleware.Stack) error { + return awsmiddleware.AddSDKAgentKeyValue(awsmiddleware.APIMetadata, "route53", goModuleVersion)(stack) +} + +func addHTTPSignerV4Middleware(stack *middleware.Stack, o Options) error { + mw := v4.NewSignHTTPRequestMiddleware(v4.SignHTTPRequestMiddlewareOptions{ + CredentialsProvider: o.Credentials, + Signer: o.HTTPSignerV4, + LogSigning: o.ClientLogMode.IsSigning(), + }) + return stack.Finalize.Add(mw, middleware.After) +} + +type HTTPSignerV4 interface { + SignHTTP(ctx context.Context, credentials aws.Credentials, r *http.Request, payloadHash string, service string, region string, signingTime time.Time, optFns ...func(*v4.SignerOptions)) error +} + +func resolveHTTPSignerV4(o *Options) { + if o.HTTPSignerV4 != nil { + return + } + o.HTTPSignerV4 = newDefaultV4Signer(*o) +} + +func newDefaultV4Signer(o Options) *v4.Signer { + return v4.NewSigner(func(so *v4.SignerOptions) { + so.Logger = o.Logger + so.LogSigning = o.ClientLogMode.IsSigning() + }) +} + +func addRetryMiddlewares(stack *middleware.Stack, o Options) error { + mo := retry.AddRetryMiddlewaresOptions{ + Retryer: o.Retryer, + LogRetryAttempts: o.ClientLogMode.IsRetries(), + } + return retry.AddRetryMiddlewares(stack, mo) +} + +// resolves dual-stack endpoint configuration +func resolveUseDualStackEndpoint(cfg aws.Config, o *Options) error { + if len(cfg.ConfigSources) == 0 { + return nil + } + value, found, err := internalConfig.ResolveUseDualStackEndpoint(context.Background(), cfg.ConfigSources) + if err != nil { + return err + } + if found { + o.EndpointOptions.UseDualStackEndpoint = value + } + return nil +} + +// resolves FIPS endpoint configuration +func resolveUseFIPSEndpoint(cfg aws.Config, o *Options) error { + if len(cfg.ConfigSources) == 0 { + return nil + } + value, found, err := internalConfig.ResolveUseFIPSEndpoint(context.Background(), cfg.ConfigSources) + if err != nil { + return err + } + if found { + o.EndpointOptions.UseFIPSEndpoint = value + } + return nil +} + +func addRequestIDRetrieverMiddleware(stack *middleware.Stack) error { + return awsmiddleware.AddRequestIDRetrieverMiddleware(stack) +} + +func addResponseErrorMiddleware(stack *middleware.Stack) error { + return awshttp.AddResponseErrorMiddleware(stack) +} + +func addSanitizeURLMiddleware(stack *middleware.Stack) error { + return route53cust.AddSanitizeURLMiddleware(stack, route53cust.AddSanitizeURLMiddlewareOptions{SanitizeURLInput: sanitizeURLInput}) +} + +// Check for and split apart Route53 resource IDs, setting only the last piece. +// This allows the output of one operation e.g. foo/1234 to be used as input in +// another operation (e.g. it expects just '1234') +func sanitizeURLInput(input interface{}) error { + switch i := input.(type) { + case *ActivateKeySigningKeyInput: + if i.HostedZoneId != nil { + idx := strings.LastIndex(*i.HostedZoneId, `/`) + v := (*i.HostedZoneId)[idx+1:] + i.HostedZoneId = &v + } + + case *AssociateVPCWithHostedZoneInput: + if i.HostedZoneId != nil { + idx := strings.LastIndex(*i.HostedZoneId, `/`) + v := (*i.HostedZoneId)[idx+1:] + i.HostedZoneId = &v + } + + case *ChangeResourceRecordSetsInput: + if i.HostedZoneId != nil { + idx := strings.LastIndex(*i.HostedZoneId, `/`) + v := (*i.HostedZoneId)[idx+1:] + i.HostedZoneId = &v + } + + case *CreateHostedZoneInput: + if i.DelegationSetId != nil { + idx := strings.LastIndex(*i.DelegationSetId, `/`) + v := (*i.DelegationSetId)[idx+1:] + i.DelegationSetId = &v + } + + case *CreateKeySigningKeyInput: + if i.HostedZoneId != nil { + idx := strings.LastIndex(*i.HostedZoneId, `/`) + v := (*i.HostedZoneId)[idx+1:] + i.HostedZoneId = &v + } + + case *CreateQueryLoggingConfigInput: + if i.HostedZoneId != nil { + idx := strings.LastIndex(*i.HostedZoneId, `/`) + v := (*i.HostedZoneId)[idx+1:] + i.HostedZoneId = &v + } + + case *CreateReusableDelegationSetInput: + if i.HostedZoneId != nil { + idx := strings.LastIndex(*i.HostedZoneId, `/`) + v := (*i.HostedZoneId)[idx+1:] + i.HostedZoneId = &v + } + + case *CreateTrafficPolicyInstanceInput: + if i.HostedZoneId != nil { + idx := strings.LastIndex(*i.HostedZoneId, `/`) + v := (*i.HostedZoneId)[idx+1:] + i.HostedZoneId = &v + } + + case *CreateVPCAssociationAuthorizationInput: + if i.HostedZoneId != nil { + idx := strings.LastIndex(*i.HostedZoneId, `/`) + v := (*i.HostedZoneId)[idx+1:] + i.HostedZoneId = &v + } + + case *DeactivateKeySigningKeyInput: + if i.HostedZoneId != nil { + idx := strings.LastIndex(*i.HostedZoneId, `/`) + v := (*i.HostedZoneId)[idx+1:] + i.HostedZoneId = &v + } + + case *DeleteHostedZoneInput: + if i.Id != nil { + idx := strings.LastIndex(*i.Id, `/`) + v := (*i.Id)[idx+1:] + i.Id = &v + } + + case *DeleteKeySigningKeyInput: + if i.HostedZoneId != nil { + idx := strings.LastIndex(*i.HostedZoneId, `/`) + v := (*i.HostedZoneId)[idx+1:] + i.HostedZoneId = &v + } + + case *DeleteReusableDelegationSetInput: + if i.Id != nil { + idx := strings.LastIndex(*i.Id, `/`) + v := (*i.Id)[idx+1:] + i.Id = &v + } + + case *DeleteVPCAssociationAuthorizationInput: + if i.HostedZoneId != nil { + idx := strings.LastIndex(*i.HostedZoneId, `/`) + v := (*i.HostedZoneId)[idx+1:] + i.HostedZoneId = &v + } + + case *DisableHostedZoneDNSSECInput: + if i.HostedZoneId != nil { + idx := strings.LastIndex(*i.HostedZoneId, `/`) + v := (*i.HostedZoneId)[idx+1:] + i.HostedZoneId = &v + } + + case *DisassociateVPCFromHostedZoneInput: + if i.HostedZoneId != nil { + idx := strings.LastIndex(*i.HostedZoneId, `/`) + v := (*i.HostedZoneId)[idx+1:] + i.HostedZoneId = &v + } + + case *EnableHostedZoneDNSSECInput: + if i.HostedZoneId != nil { + idx := strings.LastIndex(*i.HostedZoneId, `/`) + v := (*i.HostedZoneId)[idx+1:] + i.HostedZoneId = &v + } + + case *GetChangeInput: + if i.Id != nil { + idx := strings.LastIndex(*i.Id, `/`) + v := (*i.Id)[idx+1:] + i.Id = &v + } + + case *GetDNSSECInput: + if i.HostedZoneId != nil { + idx := strings.LastIndex(*i.HostedZoneId, `/`) + v := (*i.HostedZoneId)[idx+1:] + i.HostedZoneId = &v + } + + case *GetHostedZoneInput: + if i.Id != nil { + idx := strings.LastIndex(*i.Id, `/`) + v := (*i.Id)[idx+1:] + i.Id = &v + } + + case *GetHostedZoneLimitInput: + if i.HostedZoneId != nil { + idx := strings.LastIndex(*i.HostedZoneId, `/`) + v := (*i.HostedZoneId)[idx+1:] + i.HostedZoneId = &v + } + + case *GetReusableDelegationSetInput: + if i.Id != nil { + idx := strings.LastIndex(*i.Id, `/`) + v := (*i.Id)[idx+1:] + i.Id = &v + } + + case *GetReusableDelegationSetLimitInput: + if i.DelegationSetId != nil { + idx := strings.LastIndex(*i.DelegationSetId, `/`) + v := (*i.DelegationSetId)[idx+1:] + i.DelegationSetId = &v + } + + case *ListHostedZonesInput: + if i.DelegationSetId != nil { + idx := strings.LastIndex(*i.DelegationSetId, `/`) + v := (*i.DelegationSetId)[idx+1:] + i.DelegationSetId = &v + } + + case *ListHostedZonesByNameInput: + if i.HostedZoneId != nil { + idx := strings.LastIndex(*i.HostedZoneId, `/`) + v := (*i.HostedZoneId)[idx+1:] + i.HostedZoneId = &v + } + + case *ListQueryLoggingConfigsInput: + if i.HostedZoneId != nil { + idx := strings.LastIndex(*i.HostedZoneId, `/`) + v := (*i.HostedZoneId)[idx+1:] + i.HostedZoneId = &v + } + + case *ListResourceRecordSetsInput: + if i.HostedZoneId != nil { + idx := strings.LastIndex(*i.HostedZoneId, `/`) + v := (*i.HostedZoneId)[idx+1:] + i.HostedZoneId = &v + } + + case *ListTrafficPolicyInstancesInput: + if i.HostedZoneIdMarker != nil { + idx := strings.LastIndex(*i.HostedZoneIdMarker, `/`) + v := (*i.HostedZoneIdMarker)[idx+1:] + i.HostedZoneIdMarker = &v + } + + case *ListTrafficPolicyInstancesByHostedZoneInput: + if i.HostedZoneId != nil { + idx := strings.LastIndex(*i.HostedZoneId, `/`) + v := (*i.HostedZoneId)[idx+1:] + i.HostedZoneId = &v + } + + case *ListTrafficPolicyInstancesByPolicyInput: + if i.HostedZoneIdMarker != nil { + idx := strings.LastIndex(*i.HostedZoneIdMarker, `/`) + v := (*i.HostedZoneIdMarker)[idx+1:] + i.HostedZoneIdMarker = &v + } + + case *ListVPCAssociationAuthorizationsInput: + if i.HostedZoneId != nil { + idx := strings.LastIndex(*i.HostedZoneId, `/`) + v := (*i.HostedZoneId)[idx+1:] + i.HostedZoneId = &v + } + + case *TestDNSAnswerInput: + if i.HostedZoneId != nil { + idx := strings.LastIndex(*i.HostedZoneId, `/`) + v := (*i.HostedZoneId)[idx+1:] + i.HostedZoneId = &v + } + + case *UpdateHostedZoneCommentInput: + if i.Id != nil { + idx := strings.LastIndex(*i.Id, `/`) + v := (*i.Id)[idx+1:] + i.Id = &v + } + + default: + break + } + return nil +} + +func addRequestResponseLogging(stack *middleware.Stack, o Options) error { + return stack.Deserialize.Add(&smithyhttp.RequestResponseLogger{ + LogRequest: o.ClientLogMode.IsRequest(), + LogRequestWithBody: o.ClientLogMode.IsRequestWithBody(), + LogResponse: o.ClientLogMode.IsResponse(), + LogResponseWithBody: o.ClientLogMode.IsResponseWithBody(), + }, middleware.After) +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ActivateKeySigningKey.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ActivateKeySigningKey.go new file mode 100644 index 0000000..cc3b3fa --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ActivateKeySigningKey.go @@ -0,0 +1,138 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package route53 + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/route53/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Activates a key-signing key (KSK) so that it can be used for signing by DNSSEC. +// This operation changes the KSK status to ACTIVE . +func (c *Client) ActivateKeySigningKey(ctx context.Context, params *ActivateKeySigningKeyInput, optFns ...func(*Options)) (*ActivateKeySigningKeyOutput, error) { + if params == nil { + params = &ActivateKeySigningKeyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ActivateKeySigningKey", params, optFns, c.addOperationActivateKeySigningKeyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ActivateKeySigningKeyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ActivateKeySigningKeyInput struct { + + // A unique string used to identify a hosted zone. + // + // This member is required. + HostedZoneId *string + + // A string used to identify a key-signing key (KSK). Name can include numbers, + // letters, and underscores (_). Name must be unique for each key-signing key in + // the same hosted zone. + // + // This member is required. + Name *string + + noSmithyDocumentSerde +} + +type ActivateKeySigningKeyOutput struct { + + // A complex type that describes change information about changes made to your + // hosted zone. + // + // This member is required. + ChangeInfo *types.ChangeInfo + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationActivateKeySigningKeyMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestxml_serializeOpActivateKeySigningKey{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpActivateKeySigningKey{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpActivateKeySigningKeyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opActivateKeySigningKey(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addSanitizeURLMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opActivateKeySigningKey(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "route53", + OperationName: "ActivateKeySigningKey", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_AssociateVPCWithHostedZone.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_AssociateVPCWithHostedZone.go new file mode 100644 index 0000000..5e720e8 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_AssociateVPCWithHostedZone.go @@ -0,0 +1,160 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package route53 + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/route53/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Associates an Amazon VPC with a private hosted zone. To perform the +// association, the VPC and the private hosted zone must already exist. You can't +// convert a public hosted zone into a private hosted zone. If you want to +// associate a VPC that was created by using one Amazon Web Services account with a +// private hosted zone that was created by using a different account, the Amazon +// Web Services account that created the private hosted zone must first submit a +// CreateVPCAssociationAuthorization request. Then the account that created the VPC +// must submit an AssociateVPCWithHostedZone request. When granting access, the +// hosted zone and the Amazon VPC must belong to the same partition. A partition is +// a group of Amazon Web Services Regions. Each Amazon Web Services account is +// scoped to one partition. The following are the supported partitions: +// - aws - Amazon Web Services Regions +// - aws-cn - China Regions +// - aws-us-gov - Amazon Web Services GovCloud (US) Region +// +// For more information, see Access Management (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) +// in the Amazon Web Services General Reference. +func (c *Client) AssociateVPCWithHostedZone(ctx context.Context, params *AssociateVPCWithHostedZoneInput, optFns ...func(*Options)) (*AssociateVPCWithHostedZoneOutput, error) { + if params == nil { + params = &AssociateVPCWithHostedZoneInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "AssociateVPCWithHostedZone", params, optFns, c.addOperationAssociateVPCWithHostedZoneMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*AssociateVPCWithHostedZoneOutput) + out.ResultMetadata = metadata + return out, nil +} + +// A complex type that contains information about the request to associate a VPC +// with a private hosted zone. +type AssociateVPCWithHostedZoneInput struct { + + // The ID of the private hosted zone that you want to associate an Amazon VPC + // with. Note that you can't associate a VPC with a hosted zone that doesn't have + // an existing VPC association. + // + // This member is required. + HostedZoneId *string + + // A complex type that contains information about the VPC that you want to + // associate with a private hosted zone. + // + // This member is required. + VPC *types.VPC + + // Optional: A comment about the association request. + Comment *string + + noSmithyDocumentSerde +} + +// A complex type that contains the response information for the +// AssociateVPCWithHostedZone request. +type AssociateVPCWithHostedZoneOutput struct { + + // A complex type that describes the changes made to your hosted zone. + // + // This member is required. + ChangeInfo *types.ChangeInfo + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationAssociateVPCWithHostedZoneMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestxml_serializeOpAssociateVPCWithHostedZone{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpAssociateVPCWithHostedZone{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpAssociateVPCWithHostedZoneValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssociateVPCWithHostedZone(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addSanitizeURLMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opAssociateVPCWithHostedZone(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "route53", + OperationName: "AssociateVPCWithHostedZone", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ChangeCidrCollection.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ChangeCidrCollection.go new file mode 100644 index 0000000..d75efc3 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ChangeCidrCollection.go @@ -0,0 +1,155 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package route53 + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/route53/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates, changes, or deletes CIDR blocks within a collection. Contains +// authoritative IP information mapping blocks to one or multiple locations. A +// change request can update multiple locations in a collection at a time, which is +// helpful if you want to move one or more CIDR blocks from one location to another +// in one transaction, without downtime. Limits The max number of CIDR blocks +// included in the request is 1000. As a result, big updates require multiple API +// calls. PUT and DELETE_IF_EXISTS Use ChangeCidrCollection to perform the +// following actions: +// - PUT : Create a CIDR block within the specified collection. +// - DELETE_IF_EXISTS : Delete an existing CIDR block from the collection. +func (c *Client) ChangeCidrCollection(ctx context.Context, params *ChangeCidrCollectionInput, optFns ...func(*Options)) (*ChangeCidrCollectionOutput, error) { + if params == nil { + params = &ChangeCidrCollectionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ChangeCidrCollection", params, optFns, c.addOperationChangeCidrCollectionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ChangeCidrCollectionOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ChangeCidrCollectionInput struct { + + // Information about changes to a CIDR collection. + // + // This member is required. + Changes []types.CidrCollectionChange + + // The UUID of the CIDR collection to update. + // + // This member is required. + Id *string + + // A sequential counter that Amazon Route 53 sets to 1 when you create a + // collection and increments it by 1 each time you update the collection. We + // recommend that you use ListCidrCollection to get the current value of + // CollectionVersion for the collection that you want to update, and then include + // that value with the change request. This prevents Route 53 from overwriting an + // intervening update: + // - If the value in the request matches the value of CollectionVersion in the + // collection, Route 53 updates the collection. + // - If the value of CollectionVersion in the collection is greater than the + // value in the request, the collection was changed after you got the version + // number. Route 53 does not update the collection, and it returns a + // CidrCollectionVersionMismatch error. + CollectionVersion *int64 + + noSmithyDocumentSerde +} + +type ChangeCidrCollectionOutput struct { + + // The ID that is returned by ChangeCidrCollection . You can use it as input to + // GetChange to see if a CIDR collection change has propagated or not. + // + // This member is required. + Id *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationChangeCidrCollectionMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestxml_serializeOpChangeCidrCollection{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpChangeCidrCollection{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpChangeCidrCollectionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opChangeCidrCollection(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opChangeCidrCollection(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "route53", + OperationName: "ChangeCidrCollection", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ChangeResourceRecordSets.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ChangeResourceRecordSets.go new file mode 100644 index 0000000..a28b286 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ChangeResourceRecordSets.go @@ -0,0 +1,195 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package route53 + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + route53cust "github.com/aws/aws-sdk-go-v2/service/route53/internal/customizations" + "github.com/aws/aws-sdk-go-v2/service/route53/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates, changes, or deletes a resource record set, which contains +// authoritative DNS information for a specified domain name or subdomain name. For +// example, you can use ChangeResourceRecordSets to create a resource record set +// that routes traffic for test.example.com to a web server that has an IP address +// of 192.0.2.44. Deleting Resource Record Sets To delete a resource record set, +// you must specify all the same values that you specified when you created it. +// Change Batches and Transactional Changes The request body must include a +// document with a ChangeResourceRecordSetsRequest element. The request body +// contains a list of change items, known as a change batch. Change batches are +// considered transactional changes. Route 53 validates the changes in the request +// and then either makes all or none of the changes in the change batch request. +// This ensures that DNS routing isn't adversely affected by partial changes to the +// resource record sets in a hosted zone. For example, suppose a change batch +// request contains two changes: it deletes the CNAME resource record set for +// www.example.com and creates an alias resource record set for www.example.com. If +// validation for both records succeeds, Route 53 deletes the first resource record +// set and creates the second resource record set in a single operation. If +// validation for either the DELETE or the CREATE action fails, then the request +// is canceled, and the original CNAME record continues to exist. If you try to +// delete the same resource record set more than once in a single change batch, +// Route 53 returns an InvalidChangeBatch error. Traffic Flow To create resource +// record sets for complex routing configurations, use either the traffic flow +// visual editor in the Route 53 console or the API actions for traffic policies +// and traffic policy instances. Save the configuration as a traffic policy, then +// associate the traffic policy with one or more domain names (such as example.com) +// or subdomain names (such as www.example.com), in the same hosted zone or in +// multiple hosted zones. You can roll back the updates if the new configuration +// isn't performing as expected. For more information, see Using Traffic Flow to +// Route DNS Traffic (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/traffic-flow.html) +// in the Amazon Route 53 Developer Guide. Create, Delete, and Upsert Use +// ChangeResourceRecordsSetsRequest to perform the following actions: +// - CREATE : Creates a resource record set that has the specified values. +// - DELETE : Deletes an existing resource record set that has the specified +// values. +// - UPSERT : If a resource set exists Route 53 updates it with the values in the +// request. +// +// Syntaxes for Creating, Updating, and Deleting Resource Record Sets The syntax +// for a request depends on the type of resource record set that you want to +// create, delete, or update, such as weighted, alias, or failover. The XML +// elements in your request must appear in the order listed in the syntax. For an +// example for each type of resource record set, see "Examples." Don't refer to the +// syntax in the "Parameter Syntax" section, which includes all of the elements for +// every kind of resource record set that you can create, delete, or update by +// using ChangeResourceRecordSets . Change Propagation to Route 53 DNS Servers When +// you submit a ChangeResourceRecordSets request, Route 53 propagates your changes +// to all of the Route 53 authoritative DNS servers. While your changes are +// propagating, GetChange returns a status of PENDING . When propagation is +// complete, GetChange returns a status of INSYNC . Changes generally propagate to +// all Route 53 name servers within 60 seconds. For more information, see GetChange (https://docs.aws.amazon.com/Route53/latest/APIReference/API_GetChange.html) +// . Limits on ChangeResourceRecordSets Requests For information about the limits +// on a ChangeResourceRecordSets request, see Limits (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/DNSLimitations.html) +// in the Amazon Route 53 Developer Guide. +func (c *Client) ChangeResourceRecordSets(ctx context.Context, params *ChangeResourceRecordSetsInput, optFns ...func(*Options)) (*ChangeResourceRecordSetsOutput, error) { + if params == nil { + params = &ChangeResourceRecordSetsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ChangeResourceRecordSets", params, optFns, c.addOperationChangeResourceRecordSetsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ChangeResourceRecordSetsOutput) + out.ResultMetadata = metadata + return out, nil +} + +// A complex type that contains change information for the resource record set. +type ChangeResourceRecordSetsInput struct { + + // A complex type that contains an optional comment and the Changes element. + // + // This member is required. + ChangeBatch *types.ChangeBatch + + // The ID of the hosted zone that contains the resource record sets that you want + // to change. + // + // This member is required. + HostedZoneId *string + + noSmithyDocumentSerde +} + +// A complex type containing the response for the request. +type ChangeResourceRecordSetsOutput struct { + + // A complex type that contains information about changes made to your hosted + // zone. This element contains an ID that you use when performing a GetChange (https://docs.aws.amazon.com/Route53/latest/APIReference/API_GetChange.html) + // action to get detailed information about the change. + // + // This member is required. + ChangeInfo *types.ChangeInfo + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationChangeResourceRecordSetsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestxml_serializeOpChangeResourceRecordSets{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpChangeResourceRecordSets{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpChangeResourceRecordSetsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opChangeResourceRecordSets(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = route53cust.HandleCustomErrorDeserialization(stack); err != nil { + return err + } + if err = addSanitizeURLMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opChangeResourceRecordSets(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "route53", + OperationName: "ChangeResourceRecordSets", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ChangeTagsForResource.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ChangeTagsForResource.go new file mode 100644 index 0000000..b494dcd --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ChangeTagsForResource.go @@ -0,0 +1,141 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package route53 + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/route53/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Adds, edits, or deletes tags for a health check or a hosted zone. For +// information about using tags for cost allocation, see Using Cost Allocation Tags (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html) +// in the Billing and Cost Management User Guide. +func (c *Client) ChangeTagsForResource(ctx context.Context, params *ChangeTagsForResourceInput, optFns ...func(*Options)) (*ChangeTagsForResourceOutput, error) { + if params == nil { + params = &ChangeTagsForResourceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ChangeTagsForResource", params, optFns, c.addOperationChangeTagsForResourceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ChangeTagsForResourceOutput) + out.ResultMetadata = metadata + return out, nil +} + +// A complex type that contains information about the tags that you want to add, +// edit, or delete. +type ChangeTagsForResourceInput struct { + + // The ID of the resource for which you want to add, change, or delete tags. + // + // This member is required. + ResourceId *string + + // The type of the resource. + // - The resource type for health checks is healthcheck . + // - The resource type for hosted zones is hostedzone . + // + // This member is required. + ResourceType types.TagResourceType + + // A complex type that contains a list of the tags that you want to add to the + // specified health check or hosted zone and/or the tags that you want to edit + // Value for. You can add a maximum of 10 tags to a health check or a hosted zone. + AddTags []types.Tag + + // A complex type that contains a list of the tags that you want to delete from + // the specified health check or hosted zone. You can specify up to 10 keys. + RemoveTagKeys []string + + noSmithyDocumentSerde +} + +// Empty response for the request. +type ChangeTagsForResourceOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationChangeTagsForResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestxml_serializeOpChangeTagsForResource{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpChangeTagsForResource{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpChangeTagsForResourceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opChangeTagsForResource(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opChangeTagsForResource(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "route53", + OperationName: "ChangeTagsForResource", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_CreateCidrCollection.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_CreateCidrCollection.go new file mode 100644 index 0000000..283ae01 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_CreateCidrCollection.go @@ -0,0 +1,135 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package route53 + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/route53/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a CIDR collection in the current Amazon Web Services account. +func (c *Client) CreateCidrCollection(ctx context.Context, params *CreateCidrCollectionInput, optFns ...func(*Options)) (*CreateCidrCollectionOutput, error) { + if params == nil { + params = &CreateCidrCollectionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateCidrCollection", params, optFns, c.addOperationCreateCidrCollectionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateCidrCollectionOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateCidrCollectionInput struct { + + // A client-specific token that allows requests to be securely retried so that the + // intended outcome will only occur once, retries receive a similar response, and + // there are no additional edge cases to handle. + // + // This member is required. + CallerReference *string + + // A unique identifier for the account that can be used to reference the + // collection from other API calls. + // + // This member is required. + Name *string + + noSmithyDocumentSerde +} + +type CreateCidrCollectionOutput struct { + + // A complex type that contains information about the CIDR collection. + Collection *types.CidrCollection + + // A unique URL that represents the location for the CIDR collection. + Location *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateCidrCollectionMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestxml_serializeOpCreateCidrCollection{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpCreateCidrCollection{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpCreateCidrCollectionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateCidrCollection(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateCidrCollection(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "route53", + OperationName: "CreateCidrCollection", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_CreateHealthCheck.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_CreateHealthCheck.go new file mode 100644 index 0000000..4b347a5 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_CreateHealthCheck.go @@ -0,0 +1,175 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package route53 + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/route53/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a new health check. For information about adding health checks to +// resource record sets, see HealthCheckId (https://docs.aws.amazon.com/Route53/latest/APIReference/API_ResourceRecordSet.html#Route53-Type-ResourceRecordSet-HealthCheckId) +// in ChangeResourceRecordSets (https://docs.aws.amazon.com/Route53/latest/APIReference/API_ChangeResourceRecordSets.html) +// . ELB Load Balancers If you're registering EC2 instances with an Elastic Load +// Balancing (ELB) load balancer, do not create Amazon Route 53 health checks for +// the EC2 instances. When you register an EC2 instance with a load balancer, you +// configure settings for an ELB health check, which performs a similar function to +// a Route 53 health check. Private Hosted Zones You can associate health checks +// with failover resource record sets in a private hosted zone. Note the following: +// +// - Route 53 health checkers are outside the VPC. To check the health of an +// endpoint within a VPC by IP address, you must assign a public IP address to the +// instance in the VPC. +// - You can configure a health checker to check the health of an external +// resource that the instance relies on, such as a database server. +// - You can create a CloudWatch metric, associate an alarm with the metric, and +// then create a health check that is based on the state of the alarm. For example, +// you might create a CloudWatch metric that checks the status of the Amazon EC2 +// StatusCheckFailed metric, add an alarm to the metric, and then create a health +// check that is based on the state of the alarm. For information about creating +// CloudWatch metrics and alarms by using the CloudWatch console, see the Amazon +// CloudWatch User Guide (https://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/WhatIsCloudWatch.html) +// . +func (c *Client) CreateHealthCheck(ctx context.Context, params *CreateHealthCheckInput, optFns ...func(*Options)) (*CreateHealthCheckOutput, error) { + if params == nil { + params = &CreateHealthCheckInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateHealthCheck", params, optFns, c.addOperationCreateHealthCheckMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateHealthCheckOutput) + out.ResultMetadata = metadata + return out, nil +} + +// A complex type that contains the health check request information. +type CreateHealthCheckInput struct { + + // A unique string that identifies the request and that allows you to retry a + // failed CreateHealthCheck request without the risk of creating two identical + // health checks: + // - If you send a CreateHealthCheck request with the same CallerReference and + // settings as a previous request, and if the health check doesn't exist, Amazon + // Route 53 creates the health check. If the health check does exist, Route 53 + // returns the settings for the existing health check. + // - If you send a CreateHealthCheck request with the same CallerReference as a + // deleted health check, regardless of the settings, Route 53 returns a + // HealthCheckAlreadyExists error. + // - If you send a CreateHealthCheck request with the same CallerReference as an + // existing health check but with different settings, Route 53 returns a + // HealthCheckAlreadyExists error. + // - If you send a CreateHealthCheck request with a unique CallerReference but + // settings identical to an existing health check, Route 53 creates the health + // check. + // + // This member is required. + CallerReference *string + + // A complex type that contains settings for a new health check. + // + // This member is required. + HealthCheckConfig *types.HealthCheckConfig + + noSmithyDocumentSerde +} + +// A complex type containing the response information for the new health check. +type CreateHealthCheckOutput struct { + + // A complex type that contains identifying information about the health check. + // + // This member is required. + HealthCheck *types.HealthCheck + + // The unique URL representing the new health check. + // + // This member is required. + Location *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateHealthCheckMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestxml_serializeOpCreateHealthCheck{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpCreateHealthCheck{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpCreateHealthCheckValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateHealthCheck(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateHealthCheck(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "route53", + OperationName: "CreateHealthCheck", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_CreateHostedZone.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_CreateHostedZone.go new file mode 100644 index 0000000..0169023 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_CreateHostedZone.go @@ -0,0 +1,227 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package route53 + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/route53/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a new public or private hosted zone. You create records in a public +// hosted zone to define how you want to route traffic on the internet for a +// domain, such as example.com, and its subdomains (apex.example.com, +// acme.example.com). You create records in a private hosted zone to define how you +// want to route traffic for a domain and its subdomains within one or more Amazon +// Virtual Private Clouds (Amazon VPCs). You can't convert a public hosted zone to +// a private hosted zone or vice versa. Instead, you must create a new hosted zone +// with the same name and create new resource record sets. For more information +// about charges for hosted zones, see Amazon Route 53 Pricing (http://aws.amazon.com/route53/pricing/) +// . Note the following: +// - You can't create a hosted zone for a top-level domain (TLD) such as .com. +// - For public hosted zones, Route 53 automatically creates a default SOA +// record and four NS records for the zone. For more information about SOA and NS +// records, see NS and SOA Records that Route 53 Creates for a Hosted Zone (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/SOA-NSrecords.html) +// in the Amazon Route 53 Developer Guide. If you want to use the same name servers +// for multiple public hosted zones, you can optionally associate a reusable +// delegation set with the hosted zone. See the DelegationSetId element. +// - If your domain is registered with a registrar other than Route 53, you must +// update the name servers with your registrar to make Route 53 the DNS service for +// the domain. For more information, see Migrating DNS Service for an Existing +// Domain to Amazon Route 53 (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/MigratingDNS.html) +// in the Amazon Route 53 Developer Guide. +// +// When you submit a CreateHostedZone request, the initial status of the hosted +// zone is PENDING . For public hosted zones, this means that the NS and SOA +// records are not yet available on all Route 53 DNS servers. When the NS and SOA +// records are available, the status of the zone changes to INSYNC . The +// CreateHostedZone request requires the caller to have an ec2:DescribeVpcs +// permission. When creating private hosted zones, the Amazon VPC must belong to +// the same partition where the hosted zone is created. A partition is a group of +// Amazon Web Services Regions. Each Amazon Web Services account is scoped to one +// partition. The following are the supported partitions: +// - aws - Amazon Web Services Regions +// - aws-cn - China Regions +// - aws-us-gov - Amazon Web Services GovCloud (US) Region +// +// For more information, see Access Management (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) +// in the Amazon Web Services General Reference. +func (c *Client) CreateHostedZone(ctx context.Context, params *CreateHostedZoneInput, optFns ...func(*Options)) (*CreateHostedZoneOutput, error) { + if params == nil { + params = &CreateHostedZoneInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateHostedZone", params, optFns, c.addOperationCreateHostedZoneMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateHostedZoneOutput) + out.ResultMetadata = metadata + return out, nil +} + +// A complex type that contains information about the request to create a public +// or private hosted zone. +type CreateHostedZoneInput struct { + + // A unique string that identifies the request and that allows failed + // CreateHostedZone requests to be retried without the risk of executing the + // operation twice. You must use a unique CallerReference string every time you + // submit a CreateHostedZone request. CallerReference can be any unique string, + // for example, a date/time stamp. + // + // This member is required. + CallerReference *string + + // The name of the domain. Specify a fully qualified domain name, for example, + // www.example.com. The trailing dot is optional; Amazon Route 53 assumes that the + // domain name is fully qualified. This means that Route 53 treats www.example.com + // (without a trailing dot) and www.example.com. (with a trailing dot) as + // identical. If you're creating a public hosted zone, this is the name you have + // registered with your DNS registrar. If your domain name is registered with a + // registrar other than Route 53, change the name servers for your domain to the + // set of NameServers that CreateHostedZone returns in DelegationSet . + // + // This member is required. + Name *string + + // If you want to associate a reusable delegation set with this hosted zone, the + // ID that Amazon Route 53 assigned to the reusable delegation set when you created + // it. For more information about reusable delegation sets, see + // CreateReusableDelegationSet (https://docs.aws.amazon.com/Route53/latest/APIReference/API_CreateReusableDelegationSet.html) + // . + DelegationSetId *string + + // (Optional) A complex type that contains the following optional values: + // - For public and private hosted zones, an optional comment + // - For private hosted zones, an optional PrivateZone element + // If you don't specify a comment or the PrivateZone element, omit HostedZoneConfig + // and the other elements. + HostedZoneConfig *types.HostedZoneConfig + + // (Private hosted zones only) A complex type that contains information about the + // Amazon VPC that you're associating with this hosted zone. You can specify only + // one Amazon VPC when you create a private hosted zone. If you are associating a + // VPC with a hosted zone with this request, the paramaters VPCId and VPCRegion + // are also required. To associate additional Amazon VPCs with the hosted zone, use + // AssociateVPCWithHostedZone (https://docs.aws.amazon.com/Route53/latest/APIReference/API_AssociateVPCWithHostedZone.html) + // after you create a hosted zone. + VPC *types.VPC + + noSmithyDocumentSerde +} + +// A complex type containing the response information for the hosted zone. +type CreateHostedZoneOutput struct { + + // A complex type that contains information about the CreateHostedZone request. + // + // This member is required. + ChangeInfo *types.ChangeInfo + + // A complex type that describes the name servers for this hosted zone. + // + // This member is required. + DelegationSet *types.DelegationSet + + // A complex type that contains general information about the hosted zone. + // + // This member is required. + HostedZone *types.HostedZone + + // The unique URL representing the new hosted zone. + // + // This member is required. + Location *string + + // A complex type that contains information about an Amazon VPC that you + // associated with this hosted zone. + VPC *types.VPC + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateHostedZoneMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestxml_serializeOpCreateHostedZone{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpCreateHostedZone{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpCreateHostedZoneValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateHostedZone(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addSanitizeURLMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateHostedZone(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "route53", + OperationName: "CreateHostedZone", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_CreateKeySigningKey.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_CreateKeySigningKey.go new file mode 100644 index 0000000..7268fec --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_CreateKeySigningKey.go @@ -0,0 +1,179 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package route53 + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/route53/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a new key-signing key (KSK) associated with a hosted zone. You can only +// have two KSKs per hosted zone. +func (c *Client) CreateKeySigningKey(ctx context.Context, params *CreateKeySigningKeyInput, optFns ...func(*Options)) (*CreateKeySigningKeyOutput, error) { + if params == nil { + params = &CreateKeySigningKeyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateKeySigningKey", params, optFns, c.addOperationCreateKeySigningKeyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateKeySigningKeyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateKeySigningKeyInput struct { + + // A unique string that identifies the request. + // + // This member is required. + CallerReference *string + + // The unique string (ID) used to identify a hosted zone. + // + // This member is required. + HostedZoneId *string + + // The Amazon resource name (ARN) for a customer managed key in Key Management + // Service (KMS). The KeyManagementServiceArn must be unique for each key-signing + // key (KSK) in a single hosted zone. To see an example of KeyManagementServiceArn + // that grants the correct permissions for DNSSEC, scroll down to Example. You must + // configure the customer managed customer managed key as follows: Status Enabled + // Key spec ECC_NIST_P256 Key usage Sign and verify Key policy The key policy must + // give permission for the following actions: + // - DescribeKey + // - GetPublicKey + // - Sign + // The key policy must also include the Amazon Route 53 service in the principal + // for your account. Specify the following: + // - "Service": "dnssec-route53.amazonaws.com" + // For more information about working with a customer managed key in KMS, see Key + // Management Service concepts (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html) + // . + // + // This member is required. + KeyManagementServiceArn *string + + // A string used to identify a key-signing key (KSK). Name can include numbers, + // letters, and underscores (_). Name must be unique for each key-signing key in + // the same hosted zone. + // + // This member is required. + Name *string + + // A string specifying the initial status of the key-signing key (KSK). You can + // set the value to ACTIVE or INACTIVE . + // + // This member is required. + Status *string + + noSmithyDocumentSerde +} + +type CreateKeySigningKeyOutput struct { + + // A complex type that describes change information about changes made to your + // hosted zone. + // + // This member is required. + ChangeInfo *types.ChangeInfo + + // The key-signing key (KSK) that the request creates. + // + // This member is required. + KeySigningKey *types.KeySigningKey + + // The unique URL representing the new key-signing key (KSK). + // + // This member is required. + Location *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateKeySigningKeyMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestxml_serializeOpCreateKeySigningKey{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpCreateKeySigningKey{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpCreateKeySigningKeyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateKeySigningKey(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addSanitizeURLMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateKeySigningKey(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "route53", + OperationName: "CreateKeySigningKey", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_CreateQueryLoggingConfig.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_CreateQueryLoggingConfig.go new file mode 100644 index 0000000..77e7197 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_CreateQueryLoggingConfig.go @@ -0,0 +1,224 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package route53 + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/route53/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a configuration for DNS query logging. After you create a query logging +// configuration, Amazon Route 53 begins to publish log data to an Amazon +// CloudWatch Logs log group. DNS query logs contain information about the queries +// that Route 53 receives for a specified public hosted zone, such as the +// following: +// - Route 53 edge location that responded to the DNS query +// - Domain or subdomain that was requested +// - DNS record type, such as A or AAAA +// - DNS response code, such as NoError or ServFail +// +// Log Group and Resource Policy Before you create a query logging configuration, +// perform the following operations. If you create a query logging configuration +// using the Route 53 console, Route 53 performs these operations automatically. +// - Create a CloudWatch Logs log group, and make note of the ARN, which you +// specify when you create a query logging configuration. Note the following: +// - You must create the log group in the us-east-1 region. +// - You must use the same Amazon Web Services account to create the log group +// and the hosted zone that you want to configure query logging for. +// - When you create log groups for query logging, we recommend that you use a +// consistent prefix, for example: /aws/route53/hosted zone name In the next +// step, you'll create a resource policy, which controls access to one or more log +// groups and the associated Amazon Web Services resources, such as Route 53 hosted +// zones. There's a limit on the number of resource policies that you can create, +// so we recommend that you use a consistent prefix so you can use the same +// resource policy for all the log groups that you create for query logging. +// - Create a CloudWatch Logs resource policy, and give it the permissions that +// Route 53 needs to create log streams and to send query logs to log streams. For +// the value of Resource , specify the ARN for the log group that you created in +// the previous step. To use the same resource policy for all the CloudWatch Logs +// log groups that you created for query logging configurations, replace the hosted +// zone name with * , for example: +// arn:aws:logs:us-east-1:123412341234:log-group:/aws/route53/* To avoid the +// confused deputy problem, a security issue where an entity without a permission +// for an action can coerce a more-privileged entity to perform it, you can +// optionally limit the permissions that a service has to a resource in a +// resource-based policy by supplying the following values: +// - For aws:SourceArn , supply the hosted zone ARN used in creating the query +// logging configuration. For example, aws:SourceArn: +// arn:aws:route53:::hostedzone/hosted zone ID . +// - For aws:SourceAccount , supply the account ID for the account that creates +// the query logging configuration. For example, aws:SourceAccount:111111111111 . +// For more information, see The confused deputy problem (https://docs.aws.amazon.com/IAM/latest/UserGuide/confused-deputy.html) +// in the Amazon Web Services IAM User Guide. You can't use the CloudWatch console +// to create or edit a resource policy. You must use the CloudWatch API, one of the +// Amazon Web Services SDKs, or the CLI. +// +// Log Streams and Edge Locations When Route 53 finishes creating the +// configuration for DNS query logging, it does the following: +// - Creates a log stream for an edge location the first time that the edge +// location responds to DNS queries for the specified hosted zone. That log stream +// is used to log all queries that Route 53 responds to for that edge location. +// - Begins to send query logs to the applicable log stream. +// +// The name of each log stream is in the following format: hosted zone ID/edge +// location code The edge location code is a three-letter code and an arbitrarily +// assigned number, for example, DFW3. The three-letter code typically corresponds +// with the International Air Transport Association airport code for an airport +// near the edge location. (These abbreviations might change in the future.) For a +// list of edge locations, see "The Route 53 Global Network" on the Route 53 +// Product Details (http://aws.amazon.com/route53/details/) page. Queries That Are +// Logged Query logs contain only the queries that DNS resolvers forward to Route +// 53. If a DNS resolver has already cached the response to a query (such as the IP +// address for a load balancer for example.com), the resolver will continue to +// return the cached response. It doesn't forward another query to Route 53 until +// the TTL for the corresponding resource record set expires. Depending on how many +// DNS queries are submitted for a resource record set, and depending on the TTL +// for that resource record set, query logs might contain information about only +// one query out of every several thousand queries that are submitted to DNS. For +// more information about how DNS works, see Routing Internet Traffic to Your +// Website or Web Application (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/welcome-dns-service.html) +// in the Amazon Route 53 Developer Guide. Log File Format For a list of the values +// in each query log and the format of each value, see Logging DNS Queries (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/query-logs.html) +// in the Amazon Route 53 Developer Guide. Pricing For information about charges +// for query logs, see Amazon CloudWatch Pricing (http://aws.amazon.com/cloudwatch/pricing/) +// . How to Stop Logging If you want Route 53 to stop sending query logs to +// CloudWatch Logs, delete the query logging configuration. For more information, +// see DeleteQueryLoggingConfig (https://docs.aws.amazon.com/Route53/latest/APIReference/API_DeleteQueryLoggingConfig.html) +// . +func (c *Client) CreateQueryLoggingConfig(ctx context.Context, params *CreateQueryLoggingConfigInput, optFns ...func(*Options)) (*CreateQueryLoggingConfigOutput, error) { + if params == nil { + params = &CreateQueryLoggingConfigInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateQueryLoggingConfig", params, optFns, c.addOperationCreateQueryLoggingConfigMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateQueryLoggingConfigOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateQueryLoggingConfigInput struct { + + // The Amazon Resource Name (ARN) for the log group that you want to Amazon Route + // 53 to send query logs to. This is the format of the ARN: + // arn:aws:logs:region:account-id:log-group:log_group_name To get the ARN for a log + // group, you can use the CloudWatch console, the DescribeLogGroups (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DescribeLogGroups.html) + // API action, the describe-log-groups (https://docs.aws.amazon.com/cli/latest/reference/logs/describe-log-groups.html) + // command, or the applicable command in one of the Amazon Web Services SDKs. + // + // This member is required. + CloudWatchLogsLogGroupArn *string + + // The ID of the hosted zone that you want to log queries for. You can log queries + // only for public hosted zones. + // + // This member is required. + HostedZoneId *string + + noSmithyDocumentSerde +} + +type CreateQueryLoggingConfigOutput struct { + + // The unique URL representing the new query logging configuration. + // + // This member is required. + Location *string + + // A complex type that contains the ID for a query logging configuration, the ID + // of the hosted zone that you want to log queries for, and the ARN for the log + // group that you want Amazon Route 53 to send query logs to. + // + // This member is required. + QueryLoggingConfig *types.QueryLoggingConfig + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateQueryLoggingConfigMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestxml_serializeOpCreateQueryLoggingConfig{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpCreateQueryLoggingConfig{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpCreateQueryLoggingConfigValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateQueryLoggingConfig(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addSanitizeURLMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateQueryLoggingConfig(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "route53", + OperationName: "CreateQueryLoggingConfig", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_CreateReusableDelegationSet.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_CreateReusableDelegationSet.go new file mode 100644 index 0000000..5df348d --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_CreateReusableDelegationSet.go @@ -0,0 +1,173 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package route53 + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/route53/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a delegation set (a group of four name servers) that can be reused by +// multiple hosted zones that were created by the same Amazon Web Services account. +// You can also create a reusable delegation set that uses the four name servers +// that are associated with an existing hosted zone. Specify the hosted zone ID in +// the CreateReusableDelegationSet request. You can't associate a reusable +// delegation set with a private hosted zone. For information about using a +// reusable delegation set to configure white label name servers, see Configuring +// White Label Name Servers (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/white-label-name-servers.html) +// . The process for migrating existing hosted zones to use a reusable delegation +// set is comparable to the process for configuring white label name servers. You +// need to perform the following steps: +// - Create a reusable delegation set. +// - Recreate hosted zones, and reduce the TTL to 60 seconds or less. +// - Recreate resource record sets in the new hosted zones. +// - Change the registrar's name servers to use the name servers for the new +// hosted zones. +// - Monitor traffic for the website or application. +// - Change TTLs back to their original values. +// +// If you want to migrate existing hosted zones to use a reusable delegation set, +// the existing hosted zones can't use any of the name servers that are assigned to +// the reusable delegation set. If one or more hosted zones do use one or more name +// servers that are assigned to the reusable delegation set, you can do one of the +// following: +// - For small numbers of hosted zones—up to a few hundred—it's relatively easy +// to create reusable delegation sets until you get one that has four name servers +// that don't overlap with any of the name servers in your hosted zones. +// - For larger numbers of hosted zones, the easiest solution is to use more +// than one reusable delegation set. +// - For larger numbers of hosted zones, you can also migrate hosted zones that +// have overlapping name servers to hosted zones that don't have overlapping name +// servers, then migrate the hosted zones again to use the reusable delegation set. +func (c *Client) CreateReusableDelegationSet(ctx context.Context, params *CreateReusableDelegationSetInput, optFns ...func(*Options)) (*CreateReusableDelegationSetOutput, error) { + if params == nil { + params = &CreateReusableDelegationSetInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateReusableDelegationSet", params, optFns, c.addOperationCreateReusableDelegationSetMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateReusableDelegationSetOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateReusableDelegationSetInput struct { + + // A unique string that identifies the request, and that allows you to retry + // failed CreateReusableDelegationSet requests without the risk of executing the + // operation twice. You must use a unique CallerReference string every time you + // submit a CreateReusableDelegationSet request. CallerReference can be any unique + // string, for example a date/time stamp. + // + // This member is required. + CallerReference *string + + // If you want to mark the delegation set for an existing hosted zone as reusable, + // the ID for that hosted zone. + HostedZoneId *string + + noSmithyDocumentSerde +} + +type CreateReusableDelegationSetOutput struct { + + // A complex type that contains name server information. + // + // This member is required. + DelegationSet *types.DelegationSet + + // The unique URL representing the new reusable delegation set. + // + // This member is required. + Location *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateReusableDelegationSetMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestxml_serializeOpCreateReusableDelegationSet{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpCreateReusableDelegationSet{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpCreateReusableDelegationSetValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateReusableDelegationSet(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addSanitizeURLMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateReusableDelegationSet(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "route53", + OperationName: "CreateReusableDelegationSet", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_CreateTrafficPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_CreateTrafficPolicy.go new file mode 100644 index 0000000..271934b --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_CreateTrafficPolicy.go @@ -0,0 +1,147 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package route53 + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/route53/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a traffic policy, which you use to create multiple DNS resource record +// sets for one domain name (such as example.com) or one subdomain name (such as +// www.example.com). +func (c *Client) CreateTrafficPolicy(ctx context.Context, params *CreateTrafficPolicyInput, optFns ...func(*Options)) (*CreateTrafficPolicyOutput, error) { + if params == nil { + params = &CreateTrafficPolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateTrafficPolicy", params, optFns, c.addOperationCreateTrafficPolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateTrafficPolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +// A complex type that contains information about the traffic policy that you want +// to create. +type CreateTrafficPolicyInput struct { + + // The definition of this traffic policy in JSON format. For more information, see + // Traffic Policy Document Format (https://docs.aws.amazon.com/Route53/latest/APIReference/api-policies-traffic-policy-document-format.html) + // . + // + // This member is required. + Document *string + + // The name of the traffic policy. + // + // This member is required. + Name *string + + // (Optional) Any comments that you want to include about the traffic policy. + Comment *string + + noSmithyDocumentSerde +} + +// A complex type that contains the response information for the +// CreateTrafficPolicy request. +type CreateTrafficPolicyOutput struct { + + // A unique URL that represents a new traffic policy. + // + // This member is required. + Location *string + + // A complex type that contains settings for the new traffic policy. + // + // This member is required. + TrafficPolicy *types.TrafficPolicy + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateTrafficPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestxml_serializeOpCreateTrafficPolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpCreateTrafficPolicy{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpCreateTrafficPolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateTrafficPolicy(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateTrafficPolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "route53", + OperationName: "CreateTrafficPolicy", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_CreateTrafficPolicyInstance.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_CreateTrafficPolicyInstance.go new file mode 100644 index 0000000..49b664a --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_CreateTrafficPolicyInstance.go @@ -0,0 +1,169 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package route53 + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/route53/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates resource record sets in a specified hosted zone based on the settings +// in a specified traffic policy version. In addition, CreateTrafficPolicyInstance +// associates the resource record sets with a specified domain name (such as +// example.com) or subdomain name (such as www.example.com). Amazon Route 53 +// responds to DNS queries for the domain or subdomain name by using the resource +// record sets that CreateTrafficPolicyInstance created. +func (c *Client) CreateTrafficPolicyInstance(ctx context.Context, params *CreateTrafficPolicyInstanceInput, optFns ...func(*Options)) (*CreateTrafficPolicyInstanceOutput, error) { + if params == nil { + params = &CreateTrafficPolicyInstanceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateTrafficPolicyInstance", params, optFns, c.addOperationCreateTrafficPolicyInstanceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateTrafficPolicyInstanceOutput) + out.ResultMetadata = metadata + return out, nil +} + +// A complex type that contains information about the resource record sets that +// you want to create based on a specified traffic policy. +type CreateTrafficPolicyInstanceInput struct { + + // The ID of the hosted zone that you want Amazon Route 53 to create resource + // record sets in by using the configuration in a traffic policy. + // + // This member is required. + HostedZoneId *string + + // The domain name (such as example.com) or subdomain name (such as + // www.example.com) for which Amazon Route 53 responds to DNS queries by using the + // resource record sets that Route 53 creates for this traffic policy instance. + // + // This member is required. + Name *string + + // (Optional) The TTL that you want Amazon Route 53 to assign to all of the + // resource record sets that it creates in the specified hosted zone. + // + // This member is required. + TTL *int64 + + // The ID of the traffic policy that you want to use to create resource record + // sets in the specified hosted zone. + // + // This member is required. + TrafficPolicyId *string + + // The version of the traffic policy that you want to use to create resource + // record sets in the specified hosted zone. + // + // This member is required. + TrafficPolicyVersion *int32 + + noSmithyDocumentSerde +} + +// A complex type that contains the response information for the +// CreateTrafficPolicyInstance request. +type CreateTrafficPolicyInstanceOutput struct { + + // A unique URL that represents a new traffic policy instance. + // + // This member is required. + Location *string + + // A complex type that contains settings for the new traffic policy instance. + // + // This member is required. + TrafficPolicyInstance *types.TrafficPolicyInstance + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateTrafficPolicyInstanceMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestxml_serializeOpCreateTrafficPolicyInstance{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpCreateTrafficPolicyInstance{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpCreateTrafficPolicyInstanceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateTrafficPolicyInstance(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addSanitizeURLMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateTrafficPolicyInstance(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "route53", + OperationName: "CreateTrafficPolicyInstance", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_CreateTrafficPolicyVersion.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_CreateTrafficPolicyVersion.go new file mode 100644 index 0000000..7ad3943 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_CreateTrafficPolicyVersion.go @@ -0,0 +1,154 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package route53 + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/route53/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a new version of an existing traffic policy. When you create a new +// version of a traffic policy, you specify the ID of the traffic policy that you +// want to update and a JSON-formatted document that describes the new version. You +// use traffic policies to create multiple DNS resource record sets for one domain +// name (such as example.com) or one subdomain name (such as www.example.com). You +// can create a maximum of 1000 versions of a traffic policy. If you reach the +// limit and need to create another version, you'll need to start a new traffic +// policy. +func (c *Client) CreateTrafficPolicyVersion(ctx context.Context, params *CreateTrafficPolicyVersionInput, optFns ...func(*Options)) (*CreateTrafficPolicyVersionOutput, error) { + if params == nil { + params = &CreateTrafficPolicyVersionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateTrafficPolicyVersion", params, optFns, c.addOperationCreateTrafficPolicyVersionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateTrafficPolicyVersionOutput) + out.ResultMetadata = metadata + return out, nil +} + +// A complex type that contains information about the traffic policy that you want +// to create a new version for. +type CreateTrafficPolicyVersionInput struct { + + // The definition of this version of the traffic policy, in JSON format. You + // specified the JSON in the CreateTrafficPolicyVersion request. For more + // information about the JSON format, see CreateTrafficPolicy (https://docs.aws.amazon.com/Route53/latest/APIReference/API_CreateTrafficPolicy.html) + // . + // + // This member is required. + Document *string + + // The ID of the traffic policy for which you want to create a new version. + // + // This member is required. + Id *string + + // The comment that you specified in the CreateTrafficPolicyVersion request, if + // any. + Comment *string + + noSmithyDocumentSerde +} + +// A complex type that contains the response information for the +// CreateTrafficPolicyVersion request. +type CreateTrafficPolicyVersionOutput struct { + + // A unique URL that represents a new traffic policy version. + // + // This member is required. + Location *string + + // A complex type that contains settings for the new version of the traffic policy. + // + // This member is required. + TrafficPolicy *types.TrafficPolicy + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateTrafficPolicyVersionMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestxml_serializeOpCreateTrafficPolicyVersion{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpCreateTrafficPolicyVersion{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpCreateTrafficPolicyVersionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateTrafficPolicyVersion(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateTrafficPolicyVersion(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "route53", + OperationName: "CreateTrafficPolicyVersion", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_CreateVPCAssociationAuthorization.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_CreateVPCAssociationAuthorization.go new file mode 100644 index 0000000..dc36dd4 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_CreateVPCAssociationAuthorization.go @@ -0,0 +1,154 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package route53 + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/route53/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Authorizes the Amazon Web Services account that created a specified VPC to +// submit an AssociateVPCWithHostedZone request to associate the VPC with a +// specified hosted zone that was created by a different account. To submit a +// CreateVPCAssociationAuthorization request, you must use the account that created +// the hosted zone. After you authorize the association, use the account that +// created the VPC to submit an AssociateVPCWithHostedZone request. If you want to +// associate multiple VPCs that you created by using one account with a hosted zone +// that you created by using a different account, you must submit one authorization +// request for each VPC. +func (c *Client) CreateVPCAssociationAuthorization(ctx context.Context, params *CreateVPCAssociationAuthorizationInput, optFns ...func(*Options)) (*CreateVPCAssociationAuthorizationOutput, error) { + if params == nil { + params = &CreateVPCAssociationAuthorizationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateVPCAssociationAuthorization", params, optFns, c.addOperationCreateVPCAssociationAuthorizationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateVPCAssociationAuthorizationOutput) + out.ResultMetadata = metadata + return out, nil +} + +// A complex type that contains information about the request to authorize +// associating a VPC with your private hosted zone. Authorization is only required +// when a private hosted zone and a VPC were created by using different accounts. +type CreateVPCAssociationAuthorizationInput struct { + + // The ID of the private hosted zone that you want to authorize associating a VPC + // with. + // + // This member is required. + HostedZoneId *string + + // A complex type that contains the VPC ID and region for the VPC that you want to + // authorize associating with your hosted zone. + // + // This member is required. + VPC *types.VPC + + noSmithyDocumentSerde +} + +// A complex type that contains the response information from a +// CreateVPCAssociationAuthorization request. +type CreateVPCAssociationAuthorizationOutput struct { + + // The ID of the hosted zone that you authorized associating a VPC with. + // + // This member is required. + HostedZoneId *string + + // The VPC that you authorized associating with a hosted zone. + // + // This member is required. + VPC *types.VPC + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateVPCAssociationAuthorizationMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestxml_serializeOpCreateVPCAssociationAuthorization{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpCreateVPCAssociationAuthorization{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpCreateVPCAssociationAuthorizationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateVPCAssociationAuthorization(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addSanitizeURLMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateVPCAssociationAuthorization(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "route53", + OperationName: "CreateVPCAssociationAuthorization", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_DeactivateKeySigningKey.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_DeactivateKeySigningKey.go new file mode 100644 index 0000000..01ef523 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_DeactivateKeySigningKey.go @@ -0,0 +1,136 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package route53 + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/route53/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deactivates a key-signing key (KSK) so that it will not be used for signing by +// DNSSEC. This operation changes the KSK status to INACTIVE . +func (c *Client) DeactivateKeySigningKey(ctx context.Context, params *DeactivateKeySigningKeyInput, optFns ...func(*Options)) (*DeactivateKeySigningKeyOutput, error) { + if params == nil { + params = &DeactivateKeySigningKeyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeactivateKeySigningKey", params, optFns, c.addOperationDeactivateKeySigningKeyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeactivateKeySigningKeyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeactivateKeySigningKeyInput struct { + + // A unique string used to identify a hosted zone. + // + // This member is required. + HostedZoneId *string + + // A string used to identify a key-signing key (KSK). + // + // This member is required. + Name *string + + noSmithyDocumentSerde +} + +type DeactivateKeySigningKeyOutput struct { + + // A complex type that describes change information about changes made to your + // hosted zone. + // + // This member is required. + ChangeInfo *types.ChangeInfo + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeactivateKeySigningKeyMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestxml_serializeOpDeactivateKeySigningKey{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpDeactivateKeySigningKey{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpDeactivateKeySigningKeyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeactivateKeySigningKey(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addSanitizeURLMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeactivateKeySigningKey(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "route53", + OperationName: "DeactivateKeySigningKey", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_DeleteCidrCollection.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_DeleteCidrCollection.go new file mode 100644 index 0000000..3b94a15 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_DeleteCidrCollection.go @@ -0,0 +1,120 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package route53 + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes a CIDR collection in the current Amazon Web Services account. The +// collection must be empty before it can be deleted. +func (c *Client) DeleteCidrCollection(ctx context.Context, params *DeleteCidrCollectionInput, optFns ...func(*Options)) (*DeleteCidrCollectionOutput, error) { + if params == nil { + params = &DeleteCidrCollectionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteCidrCollection", params, optFns, c.addOperationDeleteCidrCollectionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteCidrCollectionOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteCidrCollectionInput struct { + + // The UUID of the collection to delete. + // + // This member is required. + Id *string + + noSmithyDocumentSerde +} + +type DeleteCidrCollectionOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteCidrCollectionMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestxml_serializeOpDeleteCidrCollection{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpDeleteCidrCollection{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpDeleteCidrCollectionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteCidrCollection(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteCidrCollection(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "route53", + OperationName: "DeleteCidrCollection", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_DeleteHealthCheck.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_DeleteHealthCheck.go new file mode 100644 index 0000000..c20509a --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_DeleteHealthCheck.go @@ -0,0 +1,133 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package route53 + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes a health check. Amazon Route 53 does not prevent you from deleting a +// health check even if the health check is associated with one or more resource +// record sets. If you delete a health check and you don't update the associated +// resource record sets, the future status of the health check can't be predicted +// and may change. This will affect the routing of DNS queries for your DNS +// failover configuration. For more information, see Replacing and Deleting Health +// Checks (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/health-checks-creating-deleting.html#health-checks-deleting.html) +// in the Amazon Route 53 Developer Guide. If you're using Cloud Map and you +// configured Cloud Map to create a Route 53 health check when you register an +// instance, you can't use the Route 53 DeleteHealthCheck command to delete the +// health check. The health check is deleted automatically when you deregister the +// instance; there can be a delay of several hours before the health check is +// deleted from Route 53. +func (c *Client) DeleteHealthCheck(ctx context.Context, params *DeleteHealthCheckInput, optFns ...func(*Options)) (*DeleteHealthCheckOutput, error) { + if params == nil { + params = &DeleteHealthCheckInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteHealthCheck", params, optFns, c.addOperationDeleteHealthCheckMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteHealthCheckOutput) + out.ResultMetadata = metadata + return out, nil +} + +// This action deletes a health check. +type DeleteHealthCheckInput struct { + + // The ID of the health check that you want to delete. + // + // This member is required. + HealthCheckId *string + + noSmithyDocumentSerde +} + +// An empty element. +type DeleteHealthCheckOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteHealthCheckMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestxml_serializeOpDeleteHealthCheck{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpDeleteHealthCheck{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpDeleteHealthCheckValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteHealthCheck(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteHealthCheck(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "route53", + OperationName: "DeleteHealthCheck", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_DeleteHostedZone.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_DeleteHostedZone.go new file mode 100644 index 0000000..6cc5196 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_DeleteHostedZone.go @@ -0,0 +1,164 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package route53 + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/route53/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes a hosted zone. If the hosted zone was created by another service, such +// as Cloud Map, see Deleting Public Hosted Zones That Were Created by Another +// Service (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/DeleteHostedZone.html#delete-public-hosted-zone-created-by-another-service) +// in the Amazon Route 53 Developer Guide for information about how to delete it. +// (The process is the same for public and private hosted zones that were created +// by another service.) If you want to keep your domain registration but you want +// to stop routing internet traffic to your website or web application, we +// recommend that you delete resource record sets in the hosted zone instead of +// deleting the hosted zone. If you delete a hosted zone, you can't undelete it. +// You must create a new hosted zone and update the name servers for your domain +// registration, which can require up to 48 hours to take effect. (If you delegated +// responsibility for a subdomain to a hosted zone and you delete the child hosted +// zone, you must update the name servers in the parent hosted zone.) In addition, +// if you delete a hosted zone, someone could hijack the domain and route traffic +// to their own resources using your domain name. If you want to avoid the monthly +// charge for the hosted zone, you can transfer DNS service for the domain to a +// free DNS service. When you transfer DNS service, you have to update the name +// servers for the domain registration. If the domain is registered with Route 53, +// see UpdateDomainNameservers (https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_UpdateDomainNameservers.html) +// for information about how to replace Route 53 name servers with name servers for +// the new DNS service. If the domain is registered with another registrar, use the +// method provided by the registrar to update name servers for the domain +// registration. For more information, perform an internet search on "free DNS +// service." You can delete a hosted zone only if it contains only the default SOA +// record and NS resource record sets. If the hosted zone contains other resource +// record sets, you must delete them before you can delete the hosted zone. If you +// try to delete a hosted zone that contains other resource record sets, the +// request fails, and Route 53 returns a HostedZoneNotEmpty error. For information +// about deleting records from your hosted zone, see ChangeResourceRecordSets (https://docs.aws.amazon.com/Route53/latest/APIReference/API_ChangeResourceRecordSets.html) +// . To verify that the hosted zone has been deleted, do one of the following: +// - Use the GetHostedZone action to request information about the hosted zone. +// - Use the ListHostedZones action to get a list of the hosted zones associated +// with the current Amazon Web Services account. +func (c *Client) DeleteHostedZone(ctx context.Context, params *DeleteHostedZoneInput, optFns ...func(*Options)) (*DeleteHostedZoneOutput, error) { + if params == nil { + params = &DeleteHostedZoneInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteHostedZone", params, optFns, c.addOperationDeleteHostedZoneMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteHostedZoneOutput) + out.ResultMetadata = metadata + return out, nil +} + +// A request to delete a hosted zone. +type DeleteHostedZoneInput struct { + + // The ID of the hosted zone you want to delete. + // + // This member is required. + Id *string + + noSmithyDocumentSerde +} + +// A complex type that contains the response to a DeleteHostedZone request. +type DeleteHostedZoneOutput struct { + + // A complex type that contains the ID, the status, and the date and time of a + // request to delete a hosted zone. + // + // This member is required. + ChangeInfo *types.ChangeInfo + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteHostedZoneMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestxml_serializeOpDeleteHostedZone{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpDeleteHostedZone{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpDeleteHostedZoneValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteHostedZone(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addSanitizeURLMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteHostedZone(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "route53", + OperationName: "DeleteHostedZone", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_DeleteKeySigningKey.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_DeleteKeySigningKey.go new file mode 100644 index 0000000..94562a5 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_DeleteKeySigningKey.go @@ -0,0 +1,140 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package route53 + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/route53/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes a key-signing key (KSK). Before you can delete a KSK, you must +// deactivate it. The KSK must be deactivated before you can delete it regardless +// of whether the hosted zone is enabled for DNSSEC signing. You can use +// DeactivateKeySigningKey (https://docs.aws.amazon.com/Route53/latest/APIReference/API_DeactivateKeySigningKey.html) +// to deactivate the key before you delete it. Use GetDNSSEC (https://docs.aws.amazon.com/Route53/latest/APIReference/API_GetDNSSEC.html) +// to verify that the KSK is in an INACTIVE status. +func (c *Client) DeleteKeySigningKey(ctx context.Context, params *DeleteKeySigningKeyInput, optFns ...func(*Options)) (*DeleteKeySigningKeyOutput, error) { + if params == nil { + params = &DeleteKeySigningKeyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteKeySigningKey", params, optFns, c.addOperationDeleteKeySigningKeyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteKeySigningKeyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteKeySigningKeyInput struct { + + // A unique string used to identify a hosted zone. + // + // This member is required. + HostedZoneId *string + + // A string used to identify a key-signing key (KSK). + // + // This member is required. + Name *string + + noSmithyDocumentSerde +} + +type DeleteKeySigningKeyOutput struct { + + // A complex type that describes change information about changes made to your + // hosted zone. + // + // This member is required. + ChangeInfo *types.ChangeInfo + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteKeySigningKeyMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestxml_serializeOpDeleteKeySigningKey{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpDeleteKeySigningKey{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpDeleteKeySigningKeyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteKeySigningKey(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addSanitizeURLMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteKeySigningKey(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "route53", + OperationName: "DeleteKeySigningKey", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_DeleteQueryLoggingConfig.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_DeleteQueryLoggingConfig.go new file mode 100644 index 0000000..515886d --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_DeleteQueryLoggingConfig.go @@ -0,0 +1,123 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package route53 + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes a configuration for DNS query logging. If you delete a configuration, +// Amazon Route 53 stops sending query logs to CloudWatch Logs. Route 53 doesn't +// delete any logs that are already in CloudWatch Logs. For more information about +// DNS query logs, see CreateQueryLoggingConfig (https://docs.aws.amazon.com/Route53/latest/APIReference/API_CreateQueryLoggingConfig.html) +// . +func (c *Client) DeleteQueryLoggingConfig(ctx context.Context, params *DeleteQueryLoggingConfigInput, optFns ...func(*Options)) (*DeleteQueryLoggingConfigOutput, error) { + if params == nil { + params = &DeleteQueryLoggingConfigInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteQueryLoggingConfig", params, optFns, c.addOperationDeleteQueryLoggingConfigMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteQueryLoggingConfigOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteQueryLoggingConfigInput struct { + + // The ID of the configuration that you want to delete. + // + // This member is required. + Id *string + + noSmithyDocumentSerde +} + +type DeleteQueryLoggingConfigOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteQueryLoggingConfigMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestxml_serializeOpDeleteQueryLoggingConfig{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpDeleteQueryLoggingConfig{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpDeleteQueryLoggingConfigValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteQueryLoggingConfig(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteQueryLoggingConfig(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "route53", + OperationName: "DeleteQueryLoggingConfig", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_DeleteReusableDelegationSet.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_DeleteReusableDelegationSet.go new file mode 100644 index 0000000..7340fa8 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_DeleteReusableDelegationSet.go @@ -0,0 +1,129 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package route53 + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes a reusable delegation set. You can delete a reusable delegation set +// only if it isn't associated with any hosted zones. To verify that the reusable +// delegation set is not associated with any hosted zones, submit a +// GetReusableDelegationSet (https://docs.aws.amazon.com/Route53/latest/APIReference/API_GetReusableDelegationSet.html) +// request and specify the ID of the reusable delegation set that you want to +// delete. +func (c *Client) DeleteReusableDelegationSet(ctx context.Context, params *DeleteReusableDelegationSetInput, optFns ...func(*Options)) (*DeleteReusableDelegationSetOutput, error) { + if params == nil { + params = &DeleteReusableDelegationSetInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteReusableDelegationSet", params, optFns, c.addOperationDeleteReusableDelegationSetMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteReusableDelegationSetOutput) + out.ResultMetadata = metadata + return out, nil +} + +// A request to delete a reusable delegation set. +type DeleteReusableDelegationSetInput struct { + + // The ID of the reusable delegation set that you want to delete. + // + // This member is required. + Id *string + + noSmithyDocumentSerde +} + +// An empty element. +type DeleteReusableDelegationSetOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteReusableDelegationSetMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestxml_serializeOpDeleteReusableDelegationSet{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpDeleteReusableDelegationSet{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpDeleteReusableDelegationSetValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteReusableDelegationSet(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addSanitizeURLMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteReusableDelegationSet(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "route53", + OperationName: "DeleteReusableDelegationSet", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_DeleteTrafficPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_DeleteTrafficPolicy.go new file mode 100644 index 0000000..a7c5d28 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_DeleteTrafficPolicy.go @@ -0,0 +1,134 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package route53 + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes a traffic policy. When you delete a traffic policy, Route 53 sets a +// flag on the policy to indicate that it has been deleted. However, Route 53 never +// fully deletes the traffic policy. Note the following: +// - Deleted traffic policies aren't listed if you run ListTrafficPolicies (https://docs.aws.amazon.com/Route53/latest/APIReference/API_ListTrafficPolicies.html) +// . +// - There's no way to get a list of deleted policies. +// - If you retain the ID of the policy, you can get information about the +// policy, including the traffic policy document, by running GetTrafficPolicy (https://docs.aws.amazon.com/Route53/latest/APIReference/API_GetTrafficPolicy.html) +// . +func (c *Client) DeleteTrafficPolicy(ctx context.Context, params *DeleteTrafficPolicyInput, optFns ...func(*Options)) (*DeleteTrafficPolicyOutput, error) { + if params == nil { + params = &DeleteTrafficPolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteTrafficPolicy", params, optFns, c.addOperationDeleteTrafficPolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteTrafficPolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +// A request to delete a specified traffic policy version. +type DeleteTrafficPolicyInput struct { + + // The ID of the traffic policy that you want to delete. + // + // This member is required. + Id *string + + // The version number of the traffic policy that you want to delete. + // + // This member is required. + Version *int32 + + noSmithyDocumentSerde +} + +// An empty element. +type DeleteTrafficPolicyOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteTrafficPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestxml_serializeOpDeleteTrafficPolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpDeleteTrafficPolicy{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpDeleteTrafficPolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteTrafficPolicy(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteTrafficPolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "route53", + OperationName: "DeleteTrafficPolicy", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_DeleteTrafficPolicyInstance.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_DeleteTrafficPolicyInstance.go new file mode 100644 index 0000000..a903bbc --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_DeleteTrafficPolicyInstance.go @@ -0,0 +1,125 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package route53 + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes a traffic policy instance and all of the resource record sets that +// Amazon Route 53 created when you created the instance. In the Route 53 console, +// traffic policy instances are known as policy records. +func (c *Client) DeleteTrafficPolicyInstance(ctx context.Context, params *DeleteTrafficPolicyInstanceInput, optFns ...func(*Options)) (*DeleteTrafficPolicyInstanceOutput, error) { + if params == nil { + params = &DeleteTrafficPolicyInstanceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteTrafficPolicyInstance", params, optFns, c.addOperationDeleteTrafficPolicyInstanceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteTrafficPolicyInstanceOutput) + out.ResultMetadata = metadata + return out, nil +} + +// A request to delete a specified traffic policy instance. +type DeleteTrafficPolicyInstanceInput struct { + + // The ID of the traffic policy instance that you want to delete. When you delete + // a traffic policy instance, Amazon Route 53 also deletes all of the resource + // record sets that were created when you created the traffic policy instance. + // + // This member is required. + Id *string + + noSmithyDocumentSerde +} + +// An empty element. +type DeleteTrafficPolicyInstanceOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteTrafficPolicyInstanceMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestxml_serializeOpDeleteTrafficPolicyInstance{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpDeleteTrafficPolicyInstance{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpDeleteTrafficPolicyInstanceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteTrafficPolicyInstance(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteTrafficPolicyInstance(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "route53", + OperationName: "DeleteTrafficPolicyInstance", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_DeleteVPCAssociationAuthorization.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_DeleteVPCAssociationAuthorization.go new file mode 100644 index 0000000..209ea3c --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_DeleteVPCAssociationAuthorization.go @@ -0,0 +1,145 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package route53 + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/route53/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Removes authorization to submit an AssociateVPCWithHostedZone request to +// associate a specified VPC with a hosted zone that was created by a different +// account. You must use the account that created the hosted zone to submit a +// DeleteVPCAssociationAuthorization request. Sending this request only prevents +// the Amazon Web Services account that created the VPC from associating the VPC +// with the Amazon Route 53 hosted zone in the future. If the VPC is already +// associated with the hosted zone, DeleteVPCAssociationAuthorization won't +// disassociate the VPC from the hosted zone. If you want to delete an existing +// association, use DisassociateVPCFromHostedZone . +func (c *Client) DeleteVPCAssociationAuthorization(ctx context.Context, params *DeleteVPCAssociationAuthorizationInput, optFns ...func(*Options)) (*DeleteVPCAssociationAuthorizationOutput, error) { + if params == nil { + params = &DeleteVPCAssociationAuthorizationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteVPCAssociationAuthorization", params, optFns, c.addOperationDeleteVPCAssociationAuthorizationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteVPCAssociationAuthorizationOutput) + out.ResultMetadata = metadata + return out, nil +} + +// A complex type that contains information about the request to remove +// authorization to associate a VPC that was created by one Amazon Web Services +// account with a hosted zone that was created with a different Amazon Web Services +// account. +type DeleteVPCAssociationAuthorizationInput struct { + + // When removing authorization to associate a VPC that was created by one Amazon + // Web Services account with a hosted zone that was created with a different Amazon + // Web Services account, the ID of the hosted zone. + // + // This member is required. + HostedZoneId *string + + // When removing authorization to associate a VPC that was created by one Amazon + // Web Services account with a hosted zone that was created with a different Amazon + // Web Services account, a complex type that includes the ID and region of the VPC. + // + // This member is required. + VPC *types.VPC + + noSmithyDocumentSerde +} + +// Empty response for the request. +type DeleteVPCAssociationAuthorizationOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteVPCAssociationAuthorizationMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestxml_serializeOpDeleteVPCAssociationAuthorization{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpDeleteVPCAssociationAuthorization{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpDeleteVPCAssociationAuthorizationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteVPCAssociationAuthorization(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addSanitizeURLMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteVPCAssociationAuthorization(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "route53", + OperationName: "DeleteVPCAssociationAuthorization", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_DisableHostedZoneDNSSEC.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_DisableHostedZoneDNSSEC.go new file mode 100644 index 0000000..f179dec --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_DisableHostedZoneDNSSEC.go @@ -0,0 +1,131 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package route53 + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/route53/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Disables DNSSEC signing in a specific hosted zone. This action does not +// deactivate any key-signing keys (KSKs) that are active in the hosted zone. +func (c *Client) DisableHostedZoneDNSSEC(ctx context.Context, params *DisableHostedZoneDNSSECInput, optFns ...func(*Options)) (*DisableHostedZoneDNSSECOutput, error) { + if params == nil { + params = &DisableHostedZoneDNSSECInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DisableHostedZoneDNSSEC", params, optFns, c.addOperationDisableHostedZoneDNSSECMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DisableHostedZoneDNSSECOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DisableHostedZoneDNSSECInput struct { + + // A unique string used to identify a hosted zone. + // + // This member is required. + HostedZoneId *string + + noSmithyDocumentSerde +} + +type DisableHostedZoneDNSSECOutput struct { + + // A complex type that describes change information about changes made to your + // hosted zone. + // + // This member is required. + ChangeInfo *types.ChangeInfo + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDisableHostedZoneDNSSECMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestxml_serializeOpDisableHostedZoneDNSSEC{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpDisableHostedZoneDNSSEC{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpDisableHostedZoneDNSSECValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisableHostedZoneDNSSEC(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addSanitizeURLMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDisableHostedZoneDNSSEC(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "route53", + OperationName: "DisableHostedZoneDNSSEC", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_DisassociateVPCFromHostedZone.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_DisassociateVPCFromHostedZone.go new file mode 100644 index 0000000..ce83bd6 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_DisassociateVPCFromHostedZone.go @@ -0,0 +1,171 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package route53 + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/route53/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Disassociates an Amazon Virtual Private Cloud (Amazon VPC) from an Amazon Route +// 53 private hosted zone. Note the following: +// +// - You can't disassociate the last Amazon VPC from a private hosted zone. +// +// - You can't convert a private hosted zone into a public hosted zone. +// +// - You can submit a DisassociateVPCFromHostedZone request using either the +// account that created the hosted zone or the account that created the Amazon VPC. +// +// - Some services, such as Cloud Map and Amazon Elastic File System (Amazon +// EFS) automatically create hosted zones and associate VPCs with the hosted zones. +// A service can create a hosted zone using your account or using its own account. +// You can disassociate a VPC from a hosted zone only if the service created the +// hosted zone using your account. When you run DisassociateVPCFromHostedZone (https://docs.aws.amazon.com/Route53/latest/APIReference/API_ListHostedZonesByVPC.html) +// , if the hosted zone has a value for OwningAccount , you can use +// DisassociateVPCFromHostedZone . If the hosted zone has a value for +// OwningService , you can't use DisassociateVPCFromHostedZone . +// +// When revoking access, the hosted zone and the Amazon VPC must belong to the +// same partition. A partition is a group of Amazon Web Services Regions. Each +// Amazon Web Services account is scoped to one partition. The following are the +// supported partitions: +// - aws - Amazon Web Services Regions +// - aws-cn - China Regions +// - aws-us-gov - Amazon Web Services GovCloud (US) Region +// +// For more information, see Access Management (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) +// in the Amazon Web Services General Reference. +func (c *Client) DisassociateVPCFromHostedZone(ctx context.Context, params *DisassociateVPCFromHostedZoneInput, optFns ...func(*Options)) (*DisassociateVPCFromHostedZoneOutput, error) { + if params == nil { + params = &DisassociateVPCFromHostedZoneInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DisassociateVPCFromHostedZone", params, optFns, c.addOperationDisassociateVPCFromHostedZoneMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DisassociateVPCFromHostedZoneOutput) + out.ResultMetadata = metadata + return out, nil +} + +// A complex type that contains information about the VPC that you want to +// disassociate from a specified private hosted zone. +type DisassociateVPCFromHostedZoneInput struct { + + // The ID of the private hosted zone that you want to disassociate a VPC from. + // + // This member is required. + HostedZoneId *string + + // A complex type that contains information about the VPC that you're + // disassociating from the specified hosted zone. + // + // This member is required. + VPC *types.VPC + + // Optional: A comment about the disassociation request. + Comment *string + + noSmithyDocumentSerde +} + +// A complex type that contains the response information for the disassociate +// request. +type DisassociateVPCFromHostedZoneOutput struct { + + // A complex type that describes the changes made to the specified private hosted + // zone. + // + // This member is required. + ChangeInfo *types.ChangeInfo + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDisassociateVPCFromHostedZoneMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestxml_serializeOpDisassociateVPCFromHostedZone{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpDisassociateVPCFromHostedZone{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpDisassociateVPCFromHostedZoneValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisassociateVPCFromHostedZone(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addSanitizeURLMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDisassociateVPCFromHostedZone(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "route53", + OperationName: "DisassociateVPCFromHostedZone", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_EnableHostedZoneDNSSEC.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_EnableHostedZoneDNSSEC.go new file mode 100644 index 0000000..32ef038 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_EnableHostedZoneDNSSEC.go @@ -0,0 +1,130 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package route53 + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/route53/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Enables DNSSEC signing in a specific hosted zone. +func (c *Client) EnableHostedZoneDNSSEC(ctx context.Context, params *EnableHostedZoneDNSSECInput, optFns ...func(*Options)) (*EnableHostedZoneDNSSECOutput, error) { + if params == nil { + params = &EnableHostedZoneDNSSECInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "EnableHostedZoneDNSSEC", params, optFns, c.addOperationEnableHostedZoneDNSSECMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*EnableHostedZoneDNSSECOutput) + out.ResultMetadata = metadata + return out, nil +} + +type EnableHostedZoneDNSSECInput struct { + + // A unique string used to identify a hosted zone. + // + // This member is required. + HostedZoneId *string + + noSmithyDocumentSerde +} + +type EnableHostedZoneDNSSECOutput struct { + + // A complex type that describes change information about changes made to your + // hosted zone. + // + // This member is required. + ChangeInfo *types.ChangeInfo + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationEnableHostedZoneDNSSECMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestxml_serializeOpEnableHostedZoneDNSSEC{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpEnableHostedZoneDNSSEC{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpEnableHostedZoneDNSSECValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opEnableHostedZoneDNSSEC(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addSanitizeURLMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opEnableHostedZoneDNSSEC(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "route53", + OperationName: "EnableHostedZoneDNSSEC", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetAccountLimit.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetAccountLimit.go new file mode 100644 index 0000000..3c1479b --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetAccountLimit.go @@ -0,0 +1,159 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package route53 + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/route53/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets the specified limit for the current account, for example, the maximum +// number of health checks that you can create using the account. For the default +// limit, see Limits (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/DNSLimitations.html) +// in the Amazon Route 53 Developer Guide. To request a higher limit, open a case (https://console.aws.amazon.com/support/home#/case/create?issueType=service-limit-increase&limitType=service-code-route53) +// . You can also view account limits in Amazon Web Services Trusted Advisor. Sign +// in to the Amazon Web Services Management Console and open the Trusted Advisor +// console at https://console.aws.amazon.com/trustedadvisor/ (https://console.aws.amazon.com/trustedadvisor) +// . Then choose Service limits in the navigation pane. +func (c *Client) GetAccountLimit(ctx context.Context, params *GetAccountLimitInput, optFns ...func(*Options)) (*GetAccountLimitOutput, error) { + if params == nil { + params = &GetAccountLimitInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetAccountLimit", params, optFns, c.addOperationGetAccountLimitMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetAccountLimitOutput) + out.ResultMetadata = metadata + return out, nil +} + +// A complex type that contains information about the request to create a hosted +// zone. +type GetAccountLimitInput struct { + + // The limit that you want to get. Valid values include the following: + // - MAX_HEALTH_CHECKS_BY_OWNER: The maximum number of health checks that you + // can create using the current account. + // - MAX_HOSTED_ZONES_BY_OWNER: The maximum number of hosted zones that you can + // create using the current account. + // - MAX_REUSABLE_DELEGATION_SETS_BY_OWNER: The maximum number of reusable + // delegation sets that you can create using the current account. + // - MAX_TRAFFIC_POLICIES_BY_OWNER: The maximum number of traffic policies that + // you can create using the current account. + // - MAX_TRAFFIC_POLICY_INSTANCES_BY_OWNER: The maximum number of traffic policy + // instances that you can create using the current account. (Traffic policy + // instances are referred to as traffic flow policy records in the Amazon Route 53 + // console.) + // + // This member is required. + Type types.AccountLimitType + + noSmithyDocumentSerde +} + +// A complex type that contains the requested limit. +type GetAccountLimitOutput struct { + + // The current number of entities that you have created of the specified type. For + // example, if you specified MAX_HEALTH_CHECKS_BY_OWNER for the value of Type in + // the request, the value of Count is the current number of health checks that you + // have created using the current account. + // + // This member is required. + Count int64 + + // The current setting for the specified limit. For example, if you specified + // MAX_HEALTH_CHECKS_BY_OWNER for the value of Type in the request, the value of + // Limit is the maximum number of health checks that you can create using the + // current account. + // + // This member is required. + Limit *types.AccountLimit + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetAccountLimitMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestxml_serializeOpGetAccountLimit{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetAccountLimit{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpGetAccountLimitValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetAccountLimit(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetAccountLimit(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "route53", + OperationName: "GetAccountLimit", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetChange.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetChange.go new file mode 100644 index 0000000..70b2abd --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetChange.go @@ -0,0 +1,314 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package route53 + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/route53/types" + "github.com/aws/smithy-go/middleware" + smithytime "github.com/aws/smithy-go/time" + smithyhttp "github.com/aws/smithy-go/transport/http" + smithywaiter "github.com/aws/smithy-go/waiter" + "github.com/jmespath/go-jmespath" + "time" +) + +// Returns the current status of a change batch request. The status is one of the +// following values: +// - PENDING indicates that the changes in this request have not propagated to +// all Amazon Route 53 DNS servers. This is the initial status of all change batch +// requests. +// - INSYNC indicates that the changes have propagated to all Route 53 DNS +// servers. +func (c *Client) GetChange(ctx context.Context, params *GetChangeInput, optFns ...func(*Options)) (*GetChangeOutput, error) { + if params == nil { + params = &GetChangeInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetChange", params, optFns, c.addOperationGetChangeMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetChangeOutput) + out.ResultMetadata = metadata + return out, nil +} + +// The input for a GetChange request. +type GetChangeInput struct { + + // The ID of the change batch request. The value that you specify here is the + // value that ChangeResourceRecordSets returned in the Id element when you + // submitted the request. + // + // This member is required. + Id *string + + noSmithyDocumentSerde +} + +// A complex type that contains the ChangeInfo element. +type GetChangeOutput struct { + + // A complex type that contains information about the specified change batch. + // + // This member is required. + ChangeInfo *types.ChangeInfo + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetChangeMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestxml_serializeOpGetChange{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetChange{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpGetChangeValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetChange(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addSanitizeURLMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +// GetChangeAPIClient is a client that implements the GetChange operation. +type GetChangeAPIClient interface { + GetChange(context.Context, *GetChangeInput, ...func(*Options)) (*GetChangeOutput, error) +} + +var _ GetChangeAPIClient = (*Client)(nil) + +// ResourceRecordSetsChangedWaiterOptions are waiter options for +// ResourceRecordSetsChangedWaiter +type ResourceRecordSetsChangedWaiterOptions struct { + + // Set of options to modify how an operation is invoked. These apply to all + // operations invoked for this client. Use functional options on operation call to + // modify this list for per operation behavior. + APIOptions []func(*middleware.Stack) error + + // MinDelay is the minimum amount of time to delay between retries. If unset, + // ResourceRecordSetsChangedWaiter will use default minimum delay of 30 seconds. + // Note that MinDelay must resolve to a value lesser than or equal to the MaxDelay. + MinDelay time.Duration + + // MaxDelay is the maximum amount of time to delay between retries. If unset or + // set to zero, ResourceRecordSetsChangedWaiter will use default max delay of 120 + // seconds. Note that MaxDelay must resolve to value greater than or equal to the + // MinDelay. + MaxDelay time.Duration + + // LogWaitAttempts is used to enable logging for waiter retry attempts + LogWaitAttempts bool + + // Retryable is function that can be used to override the service defined + // waiter-behavior based on operation output, or returned error. This function is + // used by the waiter to decide if a state is retryable or a terminal state. By + // default service-modeled logic will populate this option. This option can thus be + // used to define a custom waiter state with fall-back to service-modeled waiter + // state mutators.The function returns an error in case of a failure state. In case + // of retry state, this function returns a bool value of true and nil error, while + // in case of success it returns a bool value of false and nil error. + Retryable func(context.Context, *GetChangeInput, *GetChangeOutput, error) (bool, error) +} + +// ResourceRecordSetsChangedWaiter defines the waiters for +// ResourceRecordSetsChanged +type ResourceRecordSetsChangedWaiter struct { + client GetChangeAPIClient + + options ResourceRecordSetsChangedWaiterOptions +} + +// NewResourceRecordSetsChangedWaiter constructs a ResourceRecordSetsChangedWaiter. +func NewResourceRecordSetsChangedWaiter(client GetChangeAPIClient, optFns ...func(*ResourceRecordSetsChangedWaiterOptions)) *ResourceRecordSetsChangedWaiter { + options := ResourceRecordSetsChangedWaiterOptions{} + options.MinDelay = 30 * time.Second + options.MaxDelay = 120 * time.Second + options.Retryable = resourceRecordSetsChangedStateRetryable + + for _, fn := range optFns { + fn(&options) + } + return &ResourceRecordSetsChangedWaiter{ + client: client, + options: options, + } +} + +// Wait calls the waiter function for ResourceRecordSetsChanged waiter. The +// maxWaitDur is the maximum wait duration the waiter will wait. The maxWaitDur is +// required and must be greater than zero. +func (w *ResourceRecordSetsChangedWaiter) Wait(ctx context.Context, params *GetChangeInput, maxWaitDur time.Duration, optFns ...func(*ResourceRecordSetsChangedWaiterOptions)) error { + _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...) + return err +} + +// WaitForOutput calls the waiter function for ResourceRecordSetsChanged waiter +// and returns the output of the successful operation. The maxWaitDur is the +// maximum wait duration the waiter will wait. The maxWaitDur is required and must +// be greater than zero. +func (w *ResourceRecordSetsChangedWaiter) WaitForOutput(ctx context.Context, params *GetChangeInput, maxWaitDur time.Duration, optFns ...func(*ResourceRecordSetsChangedWaiterOptions)) (*GetChangeOutput, error) { + if maxWaitDur <= 0 { + return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero") + } + + options := w.options + for _, fn := range optFns { + fn(&options) + } + + if options.MaxDelay <= 0 { + options.MaxDelay = 120 * time.Second + } + + if options.MinDelay > options.MaxDelay { + return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay) + } + + ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur) + defer cancelFn() + + logger := smithywaiter.Logger{} + remainingTime := maxWaitDur + + var attempt int64 + for { + + attempt++ + apiOptions := options.APIOptions + start := time.Now() + + if options.LogWaitAttempts { + logger.Attempt = attempt + apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...) + apiOptions = append(apiOptions, logger.AddLogger) + } + + out, err := w.client.GetChange(ctx, params, func(o *Options) { + o.APIOptions = append(o.APIOptions, apiOptions...) + }) + + retryable, err := options.Retryable(ctx, params, out, err) + if err != nil { + return nil, err + } + if !retryable { + return out, nil + } + + remainingTime -= time.Since(start) + if remainingTime < options.MinDelay || remainingTime <= 0 { + break + } + + // compute exponential backoff between waiter retries + delay, err := smithywaiter.ComputeDelay( + attempt, options.MinDelay, options.MaxDelay, remainingTime, + ) + if err != nil { + return nil, fmt.Errorf("error computing waiter delay, %w", err) + } + + remainingTime -= delay + // sleep for the delay amount before invoking a request + if err := smithytime.SleepWithContext(ctx, delay); err != nil { + return nil, fmt.Errorf("request cancelled while waiting, %w", err) + } + } + return nil, fmt.Errorf("exceeded max wait time for ResourceRecordSetsChanged waiter") +} + +func resourceRecordSetsChangedStateRetryable(ctx context.Context, input *GetChangeInput, output *GetChangeOutput, err error) (bool, error) { + + if err == nil { + pathValue, err := jmespath.Search("ChangeInfo.Status", output) + if err != nil { + return false, fmt.Errorf("error evaluating waiter state: %w", err) + } + + expectedValue := "INSYNC" + value, ok := pathValue.(types.ChangeStatus) + if !ok { + return false, fmt.Errorf("waiter comparator expected types.ChangeStatus value, got %T", pathValue) + } + + if string(value) == expectedValue { + return false, nil + } + } + + return true, nil +} + +func newServiceMetadataMiddleware_opGetChange(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "route53", + OperationName: "GetChange", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetCheckerIpRanges.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetCheckerIpRanges.go new file mode 100644 index 0000000..69df29c --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetCheckerIpRanges.go @@ -0,0 +1,124 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package route53 + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Route 53 does not perform authorization for this API because it retrieves +// information that is already available to the public. GetCheckerIpRanges still +// works, but we recommend that you download ip-ranges.json, which includes IP +// address ranges for all Amazon Web Services services. For more information, see +// IP Address Ranges of Amazon Route 53 Servers (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/route-53-ip-addresses.html) +// in the Amazon Route 53 Developer Guide. +func (c *Client) GetCheckerIpRanges(ctx context.Context, params *GetCheckerIpRangesInput, optFns ...func(*Options)) (*GetCheckerIpRangesOutput, error) { + if params == nil { + params = &GetCheckerIpRangesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetCheckerIpRanges", params, optFns, c.addOperationGetCheckerIpRangesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetCheckerIpRangesOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Empty request. +type GetCheckerIpRangesInput struct { + noSmithyDocumentSerde +} + +// A complex type that contains the CheckerIpRanges element. +type GetCheckerIpRangesOutput struct { + + // A complex type that contains sorted list of IP ranges in CIDR format for Amazon + // Route 53 health checkers. + // + // This member is required. + CheckerIpRanges []string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetCheckerIpRangesMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestxml_serializeOpGetCheckerIpRanges{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetCheckerIpRanges{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetCheckerIpRanges(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetCheckerIpRanges(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "route53", + OperationName: "GetCheckerIpRanges", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetDNSSEC.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetDNSSEC.go new file mode 100644 index 0000000..90c1bb2 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetDNSSEC.go @@ -0,0 +1,135 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package route53 + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/route53/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns information about DNSSEC for a specific hosted zone, including the +// key-signing keys (KSKs) in the hosted zone. +func (c *Client) GetDNSSEC(ctx context.Context, params *GetDNSSECInput, optFns ...func(*Options)) (*GetDNSSECOutput, error) { + if params == nil { + params = &GetDNSSECInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetDNSSEC", params, optFns, c.addOperationGetDNSSECMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetDNSSECOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetDNSSECInput struct { + + // A unique string used to identify a hosted zone. + // + // This member is required. + HostedZoneId *string + + noSmithyDocumentSerde +} + +type GetDNSSECOutput struct { + + // The key-signing keys (KSKs) in your account. + // + // This member is required. + KeySigningKeys []types.KeySigningKey + + // A string repesenting the status of DNSSEC. + // + // This member is required. + Status *types.DNSSECStatus + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetDNSSECMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestxml_serializeOpGetDNSSEC{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetDNSSEC{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpGetDNSSECValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetDNSSEC(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addSanitizeURLMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetDNSSEC(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "route53", + OperationName: "GetDNSSEC", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetGeoLocation.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetGeoLocation.go new file mode 100644 index 0000000..d8761a4 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetGeoLocation.go @@ -0,0 +1,157 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package route53 + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/route53/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets information about whether a specified geographic location is supported for +// Amazon Route 53 geolocation resource record sets. Route 53 does not perform +// authorization for this API because it retrieves information that is already +// available to the public. Use the following syntax to determine whether a +// continent is supported for geolocation: GET +// /2013-04-01/geolocation?continentcode=two-letter abbreviation for a continent +// Use the following syntax to determine whether a country is supported for +// geolocation: GET /2013-04-01/geolocation?countrycode=two-character country code +// Use the following syntax to determine whether a subdivision of a country is +// supported for geolocation: GET +// /2013-04-01/geolocation?countrycode=two-character country +// code&subdivisioncode=subdivision code +func (c *Client) GetGeoLocation(ctx context.Context, params *GetGeoLocationInput, optFns ...func(*Options)) (*GetGeoLocationOutput, error) { + if params == nil { + params = &GetGeoLocationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetGeoLocation", params, optFns, c.addOperationGetGeoLocationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetGeoLocationOutput) + out.ResultMetadata = metadata + return out, nil +} + +// A request for information about whether a specified geographic location is +// supported for Amazon Route 53 geolocation resource record sets. +type GetGeoLocationInput struct { + + // For geolocation resource record sets, a two-letter abbreviation that identifies + // a continent. Amazon Route 53 supports the following continent codes: + // - AF: Africa + // - AN: Antarctica + // - AS: Asia + // - EU: Europe + // - OC: Oceania + // - NA: North America + // - SA: South America + ContinentCode *string + + // Amazon Route 53 uses the two-letter country codes that are specified in ISO + // standard 3166-1 alpha-2 (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) . + CountryCode *string + + // The code for the subdivision, such as a particular state within the United + // States. For a list of US state abbreviations, see Appendix B: Two–Letter State + // and Possession Abbreviations (https://pe.usps.com/text/pub28/28apb.htm) on the + // United States Postal Service website. For a list of all supported subdivision + // codes, use the ListGeoLocations (https://docs.aws.amazon.com/Route53/latest/APIReference/API_ListGeoLocations.html) + // API. + SubdivisionCode *string + + noSmithyDocumentSerde +} + +// A complex type that contains the response information for the specified +// geolocation code. +type GetGeoLocationOutput struct { + + // A complex type that contains the codes and full continent, country, and + // subdivision names for the specified geolocation code. + // + // This member is required. + GeoLocationDetails *types.GeoLocationDetails + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetGeoLocationMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestxml_serializeOpGetGeoLocation{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetGeoLocation{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetGeoLocation(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetGeoLocation(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "route53", + OperationName: "GetGeoLocation", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetHealthCheck.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetHealthCheck.go new file mode 100644 index 0000000..8d6a962 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetHealthCheck.go @@ -0,0 +1,131 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package route53 + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/route53/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets information about a specified health check. +func (c *Client) GetHealthCheck(ctx context.Context, params *GetHealthCheckInput, optFns ...func(*Options)) (*GetHealthCheckOutput, error) { + if params == nil { + params = &GetHealthCheckInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetHealthCheck", params, optFns, c.addOperationGetHealthCheckMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetHealthCheckOutput) + out.ResultMetadata = metadata + return out, nil +} + +// A request to get information about a specified health check. +type GetHealthCheckInput struct { + + // The identifier that Amazon Route 53 assigned to the health check when you + // created it. When you add or update a resource record set, you use this value to + // specify which health check to use. The value can be up to 64 characters long. + // + // This member is required. + HealthCheckId *string + + noSmithyDocumentSerde +} + +// A complex type that contains the response to a GetHealthCheck request. +type GetHealthCheckOutput struct { + + // A complex type that contains information about one health check that is + // associated with the current Amazon Web Services account. + // + // This member is required. + HealthCheck *types.HealthCheck + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetHealthCheckMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestxml_serializeOpGetHealthCheck{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetHealthCheck{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpGetHealthCheckValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetHealthCheck(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetHealthCheck(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "route53", + OperationName: "GetHealthCheck", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetHealthCheckCount.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetHealthCheckCount.go new file mode 100644 index 0000000..746ae4f --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetHealthCheckCount.go @@ -0,0 +1,121 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package route53 + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves the number of health checks that are associated with the current +// Amazon Web Services account. +func (c *Client) GetHealthCheckCount(ctx context.Context, params *GetHealthCheckCountInput, optFns ...func(*Options)) (*GetHealthCheckCountOutput, error) { + if params == nil { + params = &GetHealthCheckCountInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetHealthCheckCount", params, optFns, c.addOperationGetHealthCheckCountMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetHealthCheckCountOutput) + out.ResultMetadata = metadata + return out, nil +} + +// A request for the number of health checks that are associated with the current +// Amazon Web Services account. +type GetHealthCheckCountInput struct { + noSmithyDocumentSerde +} + +// A complex type that contains the response to a GetHealthCheckCount request. +type GetHealthCheckCountOutput struct { + + // The number of health checks associated with the current Amazon Web Services + // account. + // + // This member is required. + HealthCheckCount *int64 + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetHealthCheckCountMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestxml_serializeOpGetHealthCheckCount{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetHealthCheckCount{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetHealthCheckCount(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetHealthCheckCount(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "route53", + OperationName: "GetHealthCheckCount", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetHealthCheckLastFailureReason.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetHealthCheckLastFailureReason.go new file mode 100644 index 0000000..47507ab --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetHealthCheckLastFailureReason.go @@ -0,0 +1,135 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package route53 + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/route53/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets the reason that a specified health check failed most recently. +func (c *Client) GetHealthCheckLastFailureReason(ctx context.Context, params *GetHealthCheckLastFailureReasonInput, optFns ...func(*Options)) (*GetHealthCheckLastFailureReasonOutput, error) { + if params == nil { + params = &GetHealthCheckLastFailureReasonInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetHealthCheckLastFailureReason", params, optFns, c.addOperationGetHealthCheckLastFailureReasonMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetHealthCheckLastFailureReasonOutput) + out.ResultMetadata = metadata + return out, nil +} + +// A request for the reason that a health check failed most recently. +type GetHealthCheckLastFailureReasonInput struct { + + // The ID for the health check for which you want the last failure reason. When + // you created the health check, CreateHealthCheck returned the ID in the + // response, in the HealthCheckId element. If you want to get the last failure + // reason for a calculated health check, you must use the Amazon Route 53 console + // or the CloudWatch console. You can't use GetHealthCheckLastFailureReason for a + // calculated health check. + // + // This member is required. + HealthCheckId *string + + noSmithyDocumentSerde +} + +// A complex type that contains the response to a GetHealthCheckLastFailureReason +// request. +type GetHealthCheckLastFailureReasonOutput struct { + + // A list that contains one Observation element for each Amazon Route 53 health + // checker that is reporting a last failure reason. + // + // This member is required. + HealthCheckObservations []types.HealthCheckObservation + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetHealthCheckLastFailureReasonMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestxml_serializeOpGetHealthCheckLastFailureReason{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetHealthCheckLastFailureReason{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpGetHealthCheckLastFailureReasonValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetHealthCheckLastFailureReason(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetHealthCheckLastFailureReason(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "route53", + OperationName: "GetHealthCheckLastFailureReason", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetHealthCheckStatus.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetHealthCheckStatus.go new file mode 100644 index 0000000..5899cd4 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetHealthCheckStatus.go @@ -0,0 +1,136 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package route53 + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/route53/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets status of a specified health check. This API is intended for use during +// development to diagnose behavior. It doesn’t support production use-cases with +// high query rates that require immediate and actionable responses. +func (c *Client) GetHealthCheckStatus(ctx context.Context, params *GetHealthCheckStatusInput, optFns ...func(*Options)) (*GetHealthCheckStatusOutput, error) { + if params == nil { + params = &GetHealthCheckStatusInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetHealthCheckStatus", params, optFns, c.addOperationGetHealthCheckStatusMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetHealthCheckStatusOutput) + out.ResultMetadata = metadata + return out, nil +} + +// A request to get the status for a health check. +type GetHealthCheckStatusInput struct { + + // The ID for the health check that you want the current status for. When you + // created the health check, CreateHealthCheck returned the ID in the response, in + // the HealthCheckId element. If you want to check the status of a calculated + // health check, you must use the Amazon Route 53 console or the CloudWatch + // console. You can't use GetHealthCheckStatus to get the status of a calculated + // health check. + // + // This member is required. + HealthCheckId *string + + noSmithyDocumentSerde +} + +// A complex type that contains the response to a GetHealthCheck request. +type GetHealthCheckStatusOutput struct { + + // A list that contains one HealthCheckObservation element for each Amazon Route + // 53 health checker that is reporting a status about the health check endpoint. + // + // This member is required. + HealthCheckObservations []types.HealthCheckObservation + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetHealthCheckStatusMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestxml_serializeOpGetHealthCheckStatus{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetHealthCheckStatus{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpGetHealthCheckStatusValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetHealthCheckStatus(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetHealthCheckStatus(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "route53", + OperationName: "GetHealthCheckStatus", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetHostedZone.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetHostedZone.go new file mode 100644 index 0000000..4e75165 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetHostedZone.go @@ -0,0 +1,141 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package route53 + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/route53/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets information about a specified hosted zone including the four name servers +// assigned to the hosted zone. +func (c *Client) GetHostedZone(ctx context.Context, params *GetHostedZoneInput, optFns ...func(*Options)) (*GetHostedZoneOutput, error) { + if params == nil { + params = &GetHostedZoneInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetHostedZone", params, optFns, c.addOperationGetHostedZoneMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetHostedZoneOutput) + out.ResultMetadata = metadata + return out, nil +} + +// A request to get information about a specified hosted zone. +type GetHostedZoneInput struct { + + // The ID of the hosted zone that you want to get information about. + // + // This member is required. + Id *string + + noSmithyDocumentSerde +} + +// A complex type that contain the response to a GetHostedZone request. +type GetHostedZoneOutput struct { + + // A complex type that contains general information about the specified hosted + // zone. + // + // This member is required. + HostedZone *types.HostedZone + + // A complex type that lists the Amazon Route 53 name servers for the specified + // hosted zone. + DelegationSet *types.DelegationSet + + // A complex type that contains information about the VPCs that are associated + // with the specified hosted zone. + VPCs []types.VPC + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetHostedZoneMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestxml_serializeOpGetHostedZone{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetHostedZone{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpGetHostedZoneValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetHostedZone(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addSanitizeURLMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetHostedZone(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "route53", + OperationName: "GetHostedZone", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetHostedZoneCount.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetHostedZoneCount.go new file mode 100644 index 0000000..37aa1fe --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetHostedZoneCount.go @@ -0,0 +1,121 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package route53 + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves the number of hosted zones that are associated with the current +// Amazon Web Services account. +func (c *Client) GetHostedZoneCount(ctx context.Context, params *GetHostedZoneCountInput, optFns ...func(*Options)) (*GetHostedZoneCountOutput, error) { + if params == nil { + params = &GetHostedZoneCountInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetHostedZoneCount", params, optFns, c.addOperationGetHostedZoneCountMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetHostedZoneCountOutput) + out.ResultMetadata = metadata + return out, nil +} + +// A request to retrieve a count of all the hosted zones that are associated with +// the current Amazon Web Services account. +type GetHostedZoneCountInput struct { + noSmithyDocumentSerde +} + +// A complex type that contains the response to a GetHostedZoneCount request. +type GetHostedZoneCountOutput struct { + + // The total number of public and private hosted zones that are associated with + // the current Amazon Web Services account. + // + // This member is required. + HostedZoneCount *int64 + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetHostedZoneCountMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestxml_serializeOpGetHostedZoneCount{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetHostedZoneCount{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetHostedZoneCount(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetHostedZoneCount(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "route53", + OperationName: "GetHostedZoneCount", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetHostedZoneLimit.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetHostedZoneLimit.go new file mode 100644 index 0000000..3524d53 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetHostedZoneLimit.go @@ -0,0 +1,155 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package route53 + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/route53/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets the specified limit for a specified hosted zone, for example, the maximum +// number of records that you can create in the hosted zone. For the default limit, +// see Limits (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/DNSLimitations.html) +// in the Amazon Route 53 Developer Guide. To request a higher limit, open a case (https://console.aws.amazon.com/support/home#/case/create?issueType=service-limit-increase&limitType=service-code-route53) +// . +func (c *Client) GetHostedZoneLimit(ctx context.Context, params *GetHostedZoneLimitInput, optFns ...func(*Options)) (*GetHostedZoneLimitOutput, error) { + if params == nil { + params = &GetHostedZoneLimitInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetHostedZoneLimit", params, optFns, c.addOperationGetHostedZoneLimitMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetHostedZoneLimitOutput) + out.ResultMetadata = metadata + return out, nil +} + +// A complex type that contains information about the request to create a hosted +// zone. +type GetHostedZoneLimitInput struct { + + // The ID of the hosted zone that you want to get a limit for. + // + // This member is required. + HostedZoneId *string + + // The limit that you want to get. Valid values include the following: + // - MAX_RRSETS_BY_ZONE: The maximum number of records that you can create in + // the specified hosted zone. + // - MAX_VPCS_ASSOCIATED_BY_ZONE: The maximum number of Amazon VPCs that you can + // associate with the specified private hosted zone. + // + // This member is required. + Type types.HostedZoneLimitType + + noSmithyDocumentSerde +} + +// A complex type that contains the requested limit. +type GetHostedZoneLimitOutput struct { + + // The current number of entities that you have created of the specified type. For + // example, if you specified MAX_RRSETS_BY_ZONE for the value of Type in the + // request, the value of Count is the current number of records that you have + // created in the specified hosted zone. + // + // This member is required. + Count int64 + + // The current setting for the specified limit. For example, if you specified + // MAX_RRSETS_BY_ZONE for the value of Type in the request, the value of Limit is + // the maximum number of records that you can create in the specified hosted zone. + // + // This member is required. + Limit *types.HostedZoneLimit + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetHostedZoneLimitMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestxml_serializeOpGetHostedZoneLimit{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetHostedZoneLimit{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpGetHostedZoneLimitValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetHostedZoneLimit(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addSanitizeURLMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetHostedZoneLimit(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "route53", + OperationName: "GetHostedZoneLimit", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetQueryLoggingConfig.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetQueryLoggingConfig.go new file mode 100644 index 0000000..a691c97 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetQueryLoggingConfig.go @@ -0,0 +1,132 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package route53 + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/route53/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets information about a specified configuration for DNS query logging. For +// more information about DNS query logs, see CreateQueryLoggingConfig (https://docs.aws.amazon.com/Route53/latest/APIReference/API_CreateQueryLoggingConfig.html) +// and Logging DNS Queries (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/query-logs.html) +// . +func (c *Client) GetQueryLoggingConfig(ctx context.Context, params *GetQueryLoggingConfigInput, optFns ...func(*Options)) (*GetQueryLoggingConfigOutput, error) { + if params == nil { + params = &GetQueryLoggingConfigInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetQueryLoggingConfig", params, optFns, c.addOperationGetQueryLoggingConfigMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetQueryLoggingConfigOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetQueryLoggingConfigInput struct { + + // The ID of the configuration for DNS query logging that you want to get + // information about. + // + // This member is required. + Id *string + + noSmithyDocumentSerde +} + +type GetQueryLoggingConfigOutput struct { + + // A complex type that contains information about the query logging configuration + // that you specified in a GetQueryLoggingConfig (https://docs.aws.amazon.com/Route53/latest/APIReference/API_GetQueryLoggingConfig.html) + // request. + // + // This member is required. + QueryLoggingConfig *types.QueryLoggingConfig + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetQueryLoggingConfigMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestxml_serializeOpGetQueryLoggingConfig{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetQueryLoggingConfig{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpGetQueryLoggingConfigValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetQueryLoggingConfig(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetQueryLoggingConfig(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "route53", + OperationName: "GetQueryLoggingConfig", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetReusableDelegationSet.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetReusableDelegationSet.go new file mode 100644 index 0000000..6da95e0 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetReusableDelegationSet.go @@ -0,0 +1,134 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package route53 + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/route53/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves information about a specified reusable delegation set, including the +// four name servers that are assigned to the delegation set. +func (c *Client) GetReusableDelegationSet(ctx context.Context, params *GetReusableDelegationSetInput, optFns ...func(*Options)) (*GetReusableDelegationSetOutput, error) { + if params == nil { + params = &GetReusableDelegationSetInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetReusableDelegationSet", params, optFns, c.addOperationGetReusableDelegationSetMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetReusableDelegationSetOutput) + out.ResultMetadata = metadata + return out, nil +} + +// A request to get information about a specified reusable delegation set. +type GetReusableDelegationSetInput struct { + + // The ID of the reusable delegation set that you want to get a list of name + // servers for. + // + // This member is required. + Id *string + + noSmithyDocumentSerde +} + +// A complex type that contains the response to the GetReusableDelegationSet +// request. +type GetReusableDelegationSetOutput struct { + + // A complex type that contains information about the reusable delegation set. + // + // This member is required. + DelegationSet *types.DelegationSet + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetReusableDelegationSetMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestxml_serializeOpGetReusableDelegationSet{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetReusableDelegationSet{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpGetReusableDelegationSetValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetReusableDelegationSet(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addSanitizeURLMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetReusableDelegationSet(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "route53", + OperationName: "GetReusableDelegationSet", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetReusableDelegationSetLimit.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetReusableDelegationSetLimit.go new file mode 100644 index 0000000..3df3015 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetReusableDelegationSetLimit.go @@ -0,0 +1,148 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package route53 + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/route53/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets the maximum number of hosted zones that you can associate with the +// specified reusable delegation set. For the default limit, see Limits (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/DNSLimitations.html) +// in the Amazon Route 53 Developer Guide. To request a higher limit, open a case (https://console.aws.amazon.com/support/home#/case/create?issueType=service-limit-increase&limitType=service-code-route53) +// . +func (c *Client) GetReusableDelegationSetLimit(ctx context.Context, params *GetReusableDelegationSetLimitInput, optFns ...func(*Options)) (*GetReusableDelegationSetLimitOutput, error) { + if params == nil { + params = &GetReusableDelegationSetLimitInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetReusableDelegationSetLimit", params, optFns, c.addOperationGetReusableDelegationSetLimitMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetReusableDelegationSetLimitOutput) + out.ResultMetadata = metadata + return out, nil +} + +// A complex type that contains information about the request to create a hosted +// zone. +type GetReusableDelegationSetLimitInput struct { + + // The ID of the delegation set that you want to get the limit for. + // + // This member is required. + DelegationSetId *string + + // Specify MAX_ZONES_BY_REUSABLE_DELEGATION_SET to get the maximum number of + // hosted zones that you can associate with the specified reusable delegation set. + // + // This member is required. + Type types.ReusableDelegationSetLimitType + + noSmithyDocumentSerde +} + +// A complex type that contains the requested limit. +type GetReusableDelegationSetLimitOutput struct { + + // The current number of hosted zones that you can associate with the specified + // reusable delegation set. + // + // This member is required. + Count int64 + + // The current setting for the limit on hosted zones that you can associate with + // the specified reusable delegation set. + // + // This member is required. + Limit *types.ReusableDelegationSetLimit + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetReusableDelegationSetLimitMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestxml_serializeOpGetReusableDelegationSetLimit{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetReusableDelegationSetLimit{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpGetReusableDelegationSetLimitValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetReusableDelegationSetLimit(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addSanitizeURLMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetReusableDelegationSetLimit(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "route53", + OperationName: "GetReusableDelegationSetLimit", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetTrafficPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetTrafficPolicy.go new file mode 100644 index 0000000..70df7c5 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetTrafficPolicy.go @@ -0,0 +1,136 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package route53 + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/route53/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets information about a specific traffic policy version. For information about +// how of deleting a traffic policy affects the response from GetTrafficPolicy , +// see DeleteTrafficPolicy (https://docs.aws.amazon.com/Route53/latest/APIReference/API_DeleteTrafficPolicy.html) +// . +func (c *Client) GetTrafficPolicy(ctx context.Context, params *GetTrafficPolicyInput, optFns ...func(*Options)) (*GetTrafficPolicyOutput, error) { + if params == nil { + params = &GetTrafficPolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetTrafficPolicy", params, optFns, c.addOperationGetTrafficPolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetTrafficPolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Gets information about a specific traffic policy version. +type GetTrafficPolicyInput struct { + + // The ID of the traffic policy that you want to get information about. + // + // This member is required. + Id *string + + // The version number of the traffic policy that you want to get information about. + // + // This member is required. + Version *int32 + + noSmithyDocumentSerde +} + +// A complex type that contains the response information for the request. +type GetTrafficPolicyOutput struct { + + // A complex type that contains settings for the specified traffic policy. + // + // This member is required. + TrafficPolicy *types.TrafficPolicy + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetTrafficPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestxml_serializeOpGetTrafficPolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetTrafficPolicy{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpGetTrafficPolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetTrafficPolicy(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetTrafficPolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "route53", + OperationName: "GetTrafficPolicy", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetTrafficPolicyInstance.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetTrafficPolicyInstance.go new file mode 100644 index 0000000..057bdfc --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetTrafficPolicyInstance.go @@ -0,0 +1,134 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package route53 + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/route53/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets information about a specified traffic policy instance. After you submit a +// CreateTrafficPolicyInstance or an UpdateTrafficPolicyInstance request, there's +// a brief delay while Amazon Route 53 creates the resource record sets that are +// specified in the traffic policy definition. For more information, see the State +// response element. In the Route 53 console, traffic policy instances are known as +// policy records. +func (c *Client) GetTrafficPolicyInstance(ctx context.Context, params *GetTrafficPolicyInstanceInput, optFns ...func(*Options)) (*GetTrafficPolicyInstanceOutput, error) { + if params == nil { + params = &GetTrafficPolicyInstanceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetTrafficPolicyInstance", params, optFns, c.addOperationGetTrafficPolicyInstanceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetTrafficPolicyInstanceOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Gets information about a specified traffic policy instance. +type GetTrafficPolicyInstanceInput struct { + + // The ID of the traffic policy instance that you want to get information about. + // + // This member is required. + Id *string + + noSmithyDocumentSerde +} + +// A complex type that contains information about the resource record sets that +// Amazon Route 53 created based on a specified traffic policy. +type GetTrafficPolicyInstanceOutput struct { + + // A complex type that contains settings for the traffic policy instance. + // + // This member is required. + TrafficPolicyInstance *types.TrafficPolicyInstance + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetTrafficPolicyInstanceMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestxml_serializeOpGetTrafficPolicyInstance{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetTrafficPolicyInstance{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpGetTrafficPolicyInstanceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetTrafficPolicyInstance(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetTrafficPolicyInstance(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "route53", + OperationName: "GetTrafficPolicyInstance", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetTrafficPolicyInstanceCount.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetTrafficPolicyInstanceCount.go new file mode 100644 index 0000000..04396e2 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetTrafficPolicyInstanceCount.go @@ -0,0 +1,122 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package route53 + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets the number of traffic policy instances that are associated with the +// current Amazon Web Services account. +func (c *Client) GetTrafficPolicyInstanceCount(ctx context.Context, params *GetTrafficPolicyInstanceCountInput, optFns ...func(*Options)) (*GetTrafficPolicyInstanceCountOutput, error) { + if params == nil { + params = &GetTrafficPolicyInstanceCountInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetTrafficPolicyInstanceCount", params, optFns, c.addOperationGetTrafficPolicyInstanceCountMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetTrafficPolicyInstanceCountOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Request to get the number of traffic policy instances that are associated with +// the current Amazon Web Services account. +type GetTrafficPolicyInstanceCountInput struct { + noSmithyDocumentSerde +} + +// A complex type that contains information about the resource record sets that +// Amazon Route 53 created based on a specified traffic policy. +type GetTrafficPolicyInstanceCountOutput struct { + + // The number of traffic policy instances that are associated with the current + // Amazon Web Services account. + // + // This member is required. + TrafficPolicyInstanceCount *int32 + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetTrafficPolicyInstanceCountMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestxml_serializeOpGetTrafficPolicyInstanceCount{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetTrafficPolicyInstanceCount{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetTrafficPolicyInstanceCount(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetTrafficPolicyInstanceCount(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "route53", + OperationName: "GetTrafficPolicyInstanceCount", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListCidrBlocks.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListCidrBlocks.go new file mode 100644 index 0000000..75e32c4 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListCidrBlocks.go @@ -0,0 +1,230 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package route53 + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/route53/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns a paginated list of location objects and their CIDR blocks. +func (c *Client) ListCidrBlocks(ctx context.Context, params *ListCidrBlocksInput, optFns ...func(*Options)) (*ListCidrBlocksOutput, error) { + if params == nil { + params = &ListCidrBlocksInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListCidrBlocks", params, optFns, c.addOperationListCidrBlocksMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListCidrBlocksOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListCidrBlocksInput struct { + + // The UUID of the CIDR collection. + // + // This member is required. + CollectionId *string + + // The name of the CIDR collection location. + LocationName *string + + // Maximum number of results you want returned. + MaxResults *int32 + + // An opaque pagination token to indicate where the service is to begin + // enumerating results. + NextToken *string + + noSmithyDocumentSerde +} + +type ListCidrBlocksOutput struct { + + // A complex type that contains information about the CIDR blocks. + CidrBlocks []types.CidrBlockSummary + + // An opaque pagination token to indicate where the service is to begin + // enumerating results. If no value is provided, the listing of results starts from + // the beginning. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListCidrBlocksMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestxml_serializeOpListCidrBlocks{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpListCidrBlocks{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpListCidrBlocksValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListCidrBlocks(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +// ListCidrBlocksAPIClient is a client that implements the ListCidrBlocks +// operation. +type ListCidrBlocksAPIClient interface { + ListCidrBlocks(context.Context, *ListCidrBlocksInput, ...func(*Options)) (*ListCidrBlocksOutput, error) +} + +var _ ListCidrBlocksAPIClient = (*Client)(nil) + +// ListCidrBlocksPaginatorOptions is the paginator options for ListCidrBlocks +type ListCidrBlocksPaginatorOptions struct { + // Maximum number of results you want returned. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListCidrBlocksPaginator is a paginator for ListCidrBlocks +type ListCidrBlocksPaginator struct { + options ListCidrBlocksPaginatorOptions + client ListCidrBlocksAPIClient + params *ListCidrBlocksInput + nextToken *string + firstPage bool +} + +// NewListCidrBlocksPaginator returns a new ListCidrBlocksPaginator +func NewListCidrBlocksPaginator(client ListCidrBlocksAPIClient, params *ListCidrBlocksInput, optFns ...func(*ListCidrBlocksPaginatorOptions)) *ListCidrBlocksPaginator { + if params == nil { + params = &ListCidrBlocksInput{} + } + + options := ListCidrBlocksPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListCidrBlocksPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListCidrBlocksPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListCidrBlocks page. +func (p *ListCidrBlocksPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListCidrBlocksOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + result, err := p.client.ListCidrBlocks(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListCidrBlocks(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "route53", + OperationName: "ListCidrBlocks", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListCidrCollections.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListCidrCollections.go new file mode 100644 index 0000000..1681261 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListCidrCollections.go @@ -0,0 +1,222 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package route53 + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/route53/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns a paginated list of CIDR collections in the Amazon Web Services account +// (metadata only). +func (c *Client) ListCidrCollections(ctx context.Context, params *ListCidrCollectionsInput, optFns ...func(*Options)) (*ListCidrCollectionsOutput, error) { + if params == nil { + params = &ListCidrCollectionsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListCidrCollections", params, optFns, c.addOperationListCidrCollectionsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListCidrCollectionsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListCidrCollectionsInput struct { + + // The maximum number of CIDR collections to return in the response. + MaxResults *int32 + + // An opaque pagination token to indicate where the service is to begin + // enumerating results. If no value is provided, the listing of results starts from + // the beginning. + NextToken *string + + noSmithyDocumentSerde +} + +type ListCidrCollectionsOutput struct { + + // A complex type with information about the CIDR collection. + CidrCollections []types.CollectionSummary + + // An opaque pagination token to indicate where the service is to begin + // enumerating results. If no value is provided, the listing of results starts from + // the beginning. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListCidrCollectionsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestxml_serializeOpListCidrCollections{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpListCidrCollections{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListCidrCollections(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +// ListCidrCollectionsAPIClient is a client that implements the +// ListCidrCollections operation. +type ListCidrCollectionsAPIClient interface { + ListCidrCollections(context.Context, *ListCidrCollectionsInput, ...func(*Options)) (*ListCidrCollectionsOutput, error) +} + +var _ ListCidrCollectionsAPIClient = (*Client)(nil) + +// ListCidrCollectionsPaginatorOptions is the paginator options for +// ListCidrCollections +type ListCidrCollectionsPaginatorOptions struct { + // The maximum number of CIDR collections to return in the response. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListCidrCollectionsPaginator is a paginator for ListCidrCollections +type ListCidrCollectionsPaginator struct { + options ListCidrCollectionsPaginatorOptions + client ListCidrCollectionsAPIClient + params *ListCidrCollectionsInput + nextToken *string + firstPage bool +} + +// NewListCidrCollectionsPaginator returns a new ListCidrCollectionsPaginator +func NewListCidrCollectionsPaginator(client ListCidrCollectionsAPIClient, params *ListCidrCollectionsInput, optFns ...func(*ListCidrCollectionsPaginatorOptions)) *ListCidrCollectionsPaginator { + if params == nil { + params = &ListCidrCollectionsInput{} + } + + options := ListCidrCollectionsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListCidrCollectionsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListCidrCollectionsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListCidrCollections page. +func (p *ListCidrCollectionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListCidrCollectionsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + result, err := p.client.ListCidrCollections(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListCidrCollections(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "route53", + OperationName: "ListCidrCollections", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListCidrLocations.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListCidrLocations.go new file mode 100644 index 0000000..dbd85f9 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListCidrLocations.go @@ -0,0 +1,229 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package route53 + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/route53/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns a paginated list of CIDR locations for the given collection (metadata +// only, does not include CIDR blocks). +func (c *Client) ListCidrLocations(ctx context.Context, params *ListCidrLocationsInput, optFns ...func(*Options)) (*ListCidrLocationsOutput, error) { + if params == nil { + params = &ListCidrLocationsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListCidrLocations", params, optFns, c.addOperationListCidrLocationsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListCidrLocationsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListCidrLocationsInput struct { + + // The CIDR collection ID. + // + // This member is required. + CollectionId *string + + // The maximum number of CIDR collection locations to return in the response. + MaxResults *int32 + + // An opaque pagination token to indicate where the service is to begin + // enumerating results. If no value is provided, the listing of results starts from + // the beginning. + NextToken *string + + noSmithyDocumentSerde +} + +type ListCidrLocationsOutput struct { + + // A complex type that contains information about the list of CIDR locations. + CidrLocations []types.LocationSummary + + // An opaque pagination token to indicate where the service is to begin + // enumerating results. If no value is provided, the listing of results starts from + // the beginning. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListCidrLocationsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestxml_serializeOpListCidrLocations{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpListCidrLocations{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpListCidrLocationsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListCidrLocations(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +// ListCidrLocationsAPIClient is a client that implements the ListCidrLocations +// operation. +type ListCidrLocationsAPIClient interface { + ListCidrLocations(context.Context, *ListCidrLocationsInput, ...func(*Options)) (*ListCidrLocationsOutput, error) +} + +var _ ListCidrLocationsAPIClient = (*Client)(nil) + +// ListCidrLocationsPaginatorOptions is the paginator options for ListCidrLocations +type ListCidrLocationsPaginatorOptions struct { + // The maximum number of CIDR collection locations to return in the response. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListCidrLocationsPaginator is a paginator for ListCidrLocations +type ListCidrLocationsPaginator struct { + options ListCidrLocationsPaginatorOptions + client ListCidrLocationsAPIClient + params *ListCidrLocationsInput + nextToken *string + firstPage bool +} + +// NewListCidrLocationsPaginator returns a new ListCidrLocationsPaginator +func NewListCidrLocationsPaginator(client ListCidrLocationsAPIClient, params *ListCidrLocationsInput, optFns ...func(*ListCidrLocationsPaginatorOptions)) *ListCidrLocationsPaginator { + if params == nil { + params = &ListCidrLocationsInput{} + } + + options := ListCidrLocationsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListCidrLocationsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListCidrLocationsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListCidrLocations page. +func (p *ListCidrLocationsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListCidrLocationsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + result, err := p.client.ListCidrLocations(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListCidrLocations(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "route53", + OperationName: "ListCidrLocations", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListGeoLocations.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListGeoLocations.go new file mode 100644 index 0000000..e3a232e --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListGeoLocations.go @@ -0,0 +1,187 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package route53 + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/route53/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves a list of supported geographic locations. Countries are listed first, +// and continents are listed last. If Amazon Route 53 supports subdivisions for a +// country (for example, states or provinces), the subdivisions for that country +// are listed in alphabetical order immediately after the corresponding country. +// Route 53 does not perform authorization for this API because it retrieves +// information that is already available to the public. For a list of supported +// geolocation codes, see the GeoLocation (https://docs.aws.amazon.com/Route53/latest/APIReference/API_GeoLocation.html) +// data type. +func (c *Client) ListGeoLocations(ctx context.Context, params *ListGeoLocationsInput, optFns ...func(*Options)) (*ListGeoLocationsOutput, error) { + if params == nil { + params = &ListGeoLocationsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListGeoLocations", params, optFns, c.addOperationListGeoLocationsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListGeoLocationsOutput) + out.ResultMetadata = metadata + return out, nil +} + +// A request to get a list of geographic locations that Amazon Route 53 supports +// for geolocation resource record sets. +type ListGeoLocationsInput struct { + + // (Optional) The maximum number of geolocations to be included in the response + // body for this request. If more than maxitems geolocations remain to be listed, + // then the value of the IsTruncated element in the response is true . + MaxItems *int32 + + // The code for the continent with which you want to start listing locations that + // Amazon Route 53 supports for geolocation. If Route 53 has already returned a + // page or more of results, if IsTruncated is true, and if NextContinentCode from + // the previous response has a value, enter that value in startcontinentcode to + // return the next page of results. Include startcontinentcode only if you want to + // list continents. Don't include startcontinentcode when you're listing countries + // or countries with their subdivisions. + StartContinentCode *string + + // The code for the country with which you want to start listing locations that + // Amazon Route 53 supports for geolocation. If Route 53 has already returned a + // page or more of results, if IsTruncated is true , and if NextCountryCode from + // the previous response has a value, enter that value in startcountrycode to + // return the next page of results. + StartCountryCode *string + + // The code for the state of the United States with which you want to start + // listing locations that Amazon Route 53 supports for geolocation. If Route 53 has + // already returned a page or more of results, if IsTruncated is true , and if + // NextSubdivisionCode from the previous response has a value, enter that value in + // startsubdivisioncode to return the next page of results. To list subdivisions + // (U.S. states), you must include both startcountrycode and startsubdivisioncode . + StartSubdivisionCode *string + + noSmithyDocumentSerde +} + +// A complex type containing the response information for the request. +type ListGeoLocationsOutput struct { + + // A complex type that contains one GeoLocationDetails element for each location + // that Amazon Route 53 supports for geolocation. + // + // This member is required. + GeoLocationDetailsList []types.GeoLocationDetails + + // A value that indicates whether more locations remain to be listed after the + // last location in this response. If so, the value of IsTruncated is true . To get + // more values, submit another request and include the values of NextContinentCode + // , NextCountryCode , and NextSubdivisionCode in the startcontinentcode , + // startcountrycode , and startsubdivisioncode , as applicable. + // + // This member is required. + IsTruncated bool + + // The value that you specified for MaxItems in the request. + // + // This member is required. + MaxItems *int32 + + // If IsTruncated is true , you can make a follow-up request to display more + // locations. Enter the value of NextContinentCode in the startcontinentcode + // parameter in another ListGeoLocations request. + NextContinentCode *string + + // If IsTruncated is true , you can make a follow-up request to display more + // locations. Enter the value of NextCountryCode in the startcountrycode parameter + // in another ListGeoLocations request. + NextCountryCode *string + + // If IsTruncated is true , you can make a follow-up request to display more + // locations. Enter the value of NextSubdivisionCode in the startsubdivisioncode + // parameter in another ListGeoLocations request. + NextSubdivisionCode *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListGeoLocationsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestxml_serializeOpListGeoLocations{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpListGeoLocations{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListGeoLocations(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opListGeoLocations(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "route53", + OperationName: "ListGeoLocations", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListHealthChecks.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListHealthChecks.go new file mode 100644 index 0000000..6df5c31 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListHealthChecks.go @@ -0,0 +1,256 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package route53 + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/route53/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieve a list of the health checks that are associated with the current +// Amazon Web Services account. +func (c *Client) ListHealthChecks(ctx context.Context, params *ListHealthChecksInput, optFns ...func(*Options)) (*ListHealthChecksOutput, error) { + if params == nil { + params = &ListHealthChecksInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListHealthChecks", params, optFns, c.addOperationListHealthChecksMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListHealthChecksOutput) + out.ResultMetadata = metadata + return out, nil +} + +// A request to retrieve a list of the health checks that are associated with the +// current Amazon Web Services account. +type ListHealthChecksInput struct { + + // If the value of IsTruncated in the previous response was true , you have more + // health checks. To get another group, submit another ListHealthChecks request. + // For the value of marker , specify the value of NextMarker from the previous + // response, which is the ID of the first health check that Amazon Route 53 will + // return if you submit another request. If the value of IsTruncated in the + // previous response was false , there are no more health checks to get. + Marker *string + + // The maximum number of health checks that you want ListHealthChecks to return in + // response to the current request. Amazon Route 53 returns a maximum of 100 items. + // If you set MaxItems to a value greater than 100, Route 53 returns only the + // first 100 health checks. + MaxItems *int32 + + noSmithyDocumentSerde +} + +// A complex type that contains the response to a ListHealthChecks request. +type ListHealthChecksOutput struct { + + // A complex type that contains one HealthCheck element for each health check that + // is associated with the current Amazon Web Services account. + // + // This member is required. + HealthChecks []types.HealthCheck + + // A flag that indicates whether there are more health checks to be listed. If the + // response was truncated, you can get the next group of health checks by + // submitting another ListHealthChecks request and specifying the value of + // NextMarker in the marker parameter. + // + // This member is required. + IsTruncated bool + + // For the second and subsequent calls to ListHealthChecks , Marker is the value + // that you specified for the marker parameter in the previous request. + // + // This member is required. + Marker *string + + // The value that you specified for the maxitems parameter in the call to + // ListHealthChecks that produced the current response. + // + // This member is required. + MaxItems *int32 + + // If IsTruncated is true , the value of NextMarker identifies the first health + // check that Amazon Route 53 returns if you submit another ListHealthChecks + // request and specify the value of NextMarker in the marker parameter. + NextMarker *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListHealthChecksMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestxml_serializeOpListHealthChecks{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpListHealthChecks{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListHealthChecks(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +// ListHealthChecksAPIClient is a client that implements the ListHealthChecks +// operation. +type ListHealthChecksAPIClient interface { + ListHealthChecks(context.Context, *ListHealthChecksInput, ...func(*Options)) (*ListHealthChecksOutput, error) +} + +var _ ListHealthChecksAPIClient = (*Client)(nil) + +// ListHealthChecksPaginatorOptions is the paginator options for ListHealthChecks +type ListHealthChecksPaginatorOptions struct { + // The maximum number of health checks that you want ListHealthChecks to return in + // response to the current request. Amazon Route 53 returns a maximum of 100 items. + // If you set MaxItems to a value greater than 100, Route 53 returns only the + // first 100 health checks. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListHealthChecksPaginator is a paginator for ListHealthChecks +type ListHealthChecksPaginator struct { + options ListHealthChecksPaginatorOptions + client ListHealthChecksAPIClient + params *ListHealthChecksInput + nextToken *string + firstPage bool +} + +// NewListHealthChecksPaginator returns a new ListHealthChecksPaginator +func NewListHealthChecksPaginator(client ListHealthChecksAPIClient, params *ListHealthChecksInput, optFns ...func(*ListHealthChecksPaginatorOptions)) *ListHealthChecksPaginator { + if params == nil { + params = &ListHealthChecksInput{} + } + + options := ListHealthChecksPaginatorOptions{} + if params.MaxItems != nil { + options.Limit = *params.MaxItems + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListHealthChecksPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.Marker, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListHealthChecksPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListHealthChecks page. +func (p *ListHealthChecksPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListHealthChecksOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.Marker = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxItems = limit + + result, err := p.client.ListHealthChecks(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextMarker + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListHealthChecks(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "route53", + OperationName: "ListHealthChecks", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListHostedZones.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListHostedZones.go new file mode 100644 index 0000000..6757aac --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListHostedZones.go @@ -0,0 +1,267 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package route53 + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/route53/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves a list of the public and private hosted zones that are associated +// with the current Amazon Web Services account. The response includes a +// HostedZones child element for each hosted zone. Amazon Route 53 returns a +// maximum of 100 items in each response. If you have a lot of hosted zones, you +// can use the maxitems parameter to list them in groups of up to 100. +func (c *Client) ListHostedZones(ctx context.Context, params *ListHostedZonesInput, optFns ...func(*Options)) (*ListHostedZonesOutput, error) { + if params == nil { + params = &ListHostedZonesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListHostedZones", params, optFns, c.addOperationListHostedZonesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListHostedZonesOutput) + out.ResultMetadata = metadata + return out, nil +} + +// A request to retrieve a list of the public and private hosted zones that are +// associated with the current Amazon Web Services account. +type ListHostedZonesInput struct { + + // If you're using reusable delegation sets and you want to list all of the hosted + // zones that are associated with a reusable delegation set, specify the ID of that + // reusable delegation set. + DelegationSetId *string + + // If the value of IsTruncated in the previous response was true , you have more + // hosted zones. To get more hosted zones, submit another ListHostedZones request. + // For the value of marker , specify the value of NextMarker from the previous + // response, which is the ID of the first hosted zone that Amazon Route 53 will + // return if you submit another request. If the value of IsTruncated in the + // previous response was false , there are no more hosted zones to get. + Marker *string + + // (Optional) The maximum number of hosted zones that you want Amazon Route 53 to + // return. If you have more than maxitems hosted zones, the value of IsTruncated + // in the response is true , and the value of NextMarker is the hosted zone ID of + // the first hosted zone that Route 53 will return if you submit another request. + MaxItems *int32 + + noSmithyDocumentSerde +} + +type ListHostedZonesOutput struct { + + // A complex type that contains general information about the hosted zone. + // + // This member is required. + HostedZones []types.HostedZone + + // A flag indicating whether there are more hosted zones to be listed. If the + // response was truncated, you can get more hosted zones by submitting another + // ListHostedZones request and specifying the value of NextMarker in the marker + // parameter. + // + // This member is required. + IsTruncated bool + + // For the second and subsequent calls to ListHostedZones , Marker is the value + // that you specified for the marker parameter in the request that produced the + // current response. + // + // This member is required. + Marker *string + + // The value that you specified for the maxitems parameter in the call to + // ListHostedZones that produced the current response. + // + // This member is required. + MaxItems *int32 + + // If IsTruncated is true , the value of NextMarker identifies the first hosted + // zone in the next group of hosted zones. Submit another ListHostedZones request, + // and specify the value of NextMarker from the response in the marker parameter. + // This element is present only if IsTruncated is true . + NextMarker *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListHostedZonesMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestxml_serializeOpListHostedZones{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpListHostedZones{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListHostedZones(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addSanitizeURLMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +// ListHostedZonesAPIClient is a client that implements the ListHostedZones +// operation. +type ListHostedZonesAPIClient interface { + ListHostedZones(context.Context, *ListHostedZonesInput, ...func(*Options)) (*ListHostedZonesOutput, error) +} + +var _ ListHostedZonesAPIClient = (*Client)(nil) + +// ListHostedZonesPaginatorOptions is the paginator options for ListHostedZones +type ListHostedZonesPaginatorOptions struct { + // (Optional) The maximum number of hosted zones that you want Amazon Route 53 to + // return. If you have more than maxitems hosted zones, the value of IsTruncated + // in the response is true , and the value of NextMarker is the hosted zone ID of + // the first hosted zone that Route 53 will return if you submit another request. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListHostedZonesPaginator is a paginator for ListHostedZones +type ListHostedZonesPaginator struct { + options ListHostedZonesPaginatorOptions + client ListHostedZonesAPIClient + params *ListHostedZonesInput + nextToken *string + firstPage bool +} + +// NewListHostedZonesPaginator returns a new ListHostedZonesPaginator +func NewListHostedZonesPaginator(client ListHostedZonesAPIClient, params *ListHostedZonesInput, optFns ...func(*ListHostedZonesPaginatorOptions)) *ListHostedZonesPaginator { + if params == nil { + params = &ListHostedZonesInput{} + } + + options := ListHostedZonesPaginatorOptions{} + if params.MaxItems != nil { + options.Limit = *params.MaxItems + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListHostedZonesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.Marker, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListHostedZonesPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListHostedZones page. +func (p *ListHostedZonesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListHostedZonesOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.Marker = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxItems = limit + + result, err := p.client.ListHostedZones(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextMarker + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListHostedZones(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "route53", + OperationName: "ListHostedZones", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListHostedZonesByName.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListHostedZonesByName.go new file mode 100644 index 0000000..c3403bb --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListHostedZonesByName.go @@ -0,0 +1,218 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package route53 + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/route53/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves a list of your hosted zones in lexicographic order. The response +// includes a HostedZones child element for each hosted zone created by the +// current Amazon Web Services account. ListHostedZonesByName sorts hosted zones +// by name with the labels reversed. For example: com.example.www. Note the +// trailing dot, which can change the sort order in some circumstances. If the +// domain name includes escape characters or Punycode, ListHostedZonesByName +// alphabetizes the domain name using the escaped or Punycoded value, which is the +// format that Amazon Route 53 saves in its database. For example, to create a +// hosted zone for exämple.com, you specify ex\344mple.com for the domain name. +// ListHostedZonesByName alphabetizes it as: com.ex\344mple. The labels are +// reversed and alphabetized using the escaped value. For more information about +// valid domain name formats, including internationalized domain names, see DNS +// Domain Name Format (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/DomainNameFormat.html) +// in the Amazon Route 53 Developer Guide. Route 53 returns up to 100 items in each +// response. If you have a lot of hosted zones, use the MaxItems parameter to list +// them in groups of up to 100. The response includes values that help navigate +// from one group of MaxItems hosted zones to the next: +// - The DNSName and HostedZoneId elements in the response contain the values, if +// any, specified for the dnsname and hostedzoneid parameters in the request that +// produced the current response. +// - The MaxItems element in the response contains the value, if any, that you +// specified for the maxitems parameter in the request that produced the current +// response. +// - If the value of IsTruncated in the response is true, there are more hosted +// zones associated with the current Amazon Web Services account. If IsTruncated +// is false, this response includes the last hosted zone that is associated with +// the current account. The NextDNSName element and NextHostedZoneId elements are +// omitted from the response. +// - The NextDNSName and NextHostedZoneId elements in the response contain the +// domain name and the hosted zone ID of the next hosted zone that is associated +// with the current Amazon Web Services account. If you want to list more hosted +// zones, make another call to ListHostedZonesByName , and specify the value of +// NextDNSName and NextHostedZoneId in the dnsname and hostedzoneid parameters, +// respectively. +func (c *Client) ListHostedZonesByName(ctx context.Context, params *ListHostedZonesByNameInput, optFns ...func(*Options)) (*ListHostedZonesByNameOutput, error) { + if params == nil { + params = &ListHostedZonesByNameInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListHostedZonesByName", params, optFns, c.addOperationListHostedZonesByNameMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListHostedZonesByNameOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Retrieves a list of the public and private hosted zones that are associated +// with the current Amazon Web Services account in ASCII order by domain name. +type ListHostedZonesByNameInput struct { + + // (Optional) For your first request to ListHostedZonesByName , include the dnsname + // parameter only if you want to specify the name of the first hosted zone in the + // response. If you don't include the dnsname parameter, Amazon Route 53 returns + // all of the hosted zones that were created by the current Amazon Web Services + // account, in ASCII order. For subsequent requests, include both dnsname and + // hostedzoneid parameters. For dnsname , specify the value of NextDNSName from + // the previous response. + DNSName *string + + // (Optional) For your first request to ListHostedZonesByName , do not include the + // hostedzoneid parameter. If you have more hosted zones than the value of maxitems + // , ListHostedZonesByName returns only the first maxitems hosted zones. To get + // the next group of maxitems hosted zones, submit another request to + // ListHostedZonesByName and include both dnsname and hostedzoneid parameters. For + // the value of hostedzoneid , specify the value of the NextHostedZoneId element + // from the previous response. + HostedZoneId *string + + // The maximum number of hosted zones to be included in the response body for this + // request. If you have more than maxitems hosted zones, then the value of the + // IsTruncated element in the response is true, and the values of NextDNSName and + // NextHostedZoneId specify the first hosted zone in the next group of maxitems + // hosted zones. + MaxItems *int32 + + noSmithyDocumentSerde +} + +// A complex type that contains the response information for the request. +type ListHostedZonesByNameOutput struct { + + // A complex type that contains general information about the hosted zone. + // + // This member is required. + HostedZones []types.HostedZone + + // A flag that indicates whether there are more hosted zones to be listed. If the + // response was truncated, you can get the next group of maxitems hosted zones by + // calling ListHostedZonesByName again and specifying the values of NextDNSName + // and NextHostedZoneId elements in the dnsname and hostedzoneid parameters. + // + // This member is required. + IsTruncated bool + + // The value that you specified for the maxitems parameter in the call to + // ListHostedZonesByName that produced the current response. + // + // This member is required. + MaxItems *int32 + + // For the second and subsequent calls to ListHostedZonesByName , DNSName is the + // value that you specified for the dnsname parameter in the request that produced + // the current response. + DNSName *string + + // The ID that Amazon Route 53 assigned to the hosted zone when you created it. + HostedZoneId *string + + // If IsTruncated is true, the value of NextDNSName is the name of the first + // hosted zone in the next group of maxitems hosted zones. Call + // ListHostedZonesByName again and specify the value of NextDNSName and + // NextHostedZoneId in the dnsname and hostedzoneid parameters, respectively. This + // element is present only if IsTruncated is true . + NextDNSName *string + + // If IsTruncated is true , the value of NextHostedZoneId identifies the first + // hosted zone in the next group of maxitems hosted zones. Call + // ListHostedZonesByName again and specify the value of NextDNSName and + // NextHostedZoneId in the dnsname and hostedzoneid parameters, respectively. This + // element is present only if IsTruncated is true . + NextHostedZoneId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListHostedZonesByNameMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestxml_serializeOpListHostedZonesByName{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpListHostedZonesByName{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListHostedZonesByName(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addSanitizeURLMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opListHostedZonesByName(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "route53", + OperationName: "ListHostedZonesByName", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListHostedZonesByVPC.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListHostedZonesByVPC.go new file mode 100644 index 0000000..4d35ef8 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListHostedZonesByVPC.go @@ -0,0 +1,182 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package route53 + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/route53/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists all the private hosted zones that a specified VPC is associated with, +// regardless of which Amazon Web Services account or Amazon Web Services service +// owns the hosted zones. The HostedZoneOwner structure in the response contains +// one of the following values: +// - An OwningAccount element, which contains the account number of either the +// current Amazon Web Services account or another Amazon Web Services account. Some +// services, such as Cloud Map, create hosted zones using the current account. +// - An OwningService element, which identifies the Amazon Web Services service +// that created and owns the hosted zone. For example, if a hosted zone was created +// by Amazon Elastic File System (Amazon EFS), the value of Owner is +// efs.amazonaws.com . +// +// When listing private hosted zones, the hosted zone and the Amazon VPC must +// belong to the same partition where the hosted zones were created. A partition is +// a group of Amazon Web Services Regions. Each Amazon Web Services account is +// scoped to one partition. The following are the supported partitions: +// - aws - Amazon Web Services Regions +// - aws-cn - China Regions +// - aws-us-gov - Amazon Web Services GovCloud (US) Region +// +// For more information, see Access Management (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) +// in the Amazon Web Services General Reference. +func (c *Client) ListHostedZonesByVPC(ctx context.Context, params *ListHostedZonesByVPCInput, optFns ...func(*Options)) (*ListHostedZonesByVPCOutput, error) { + if params == nil { + params = &ListHostedZonesByVPCInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListHostedZonesByVPC", params, optFns, c.addOperationListHostedZonesByVPCMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListHostedZonesByVPCOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Lists all the private hosted zones that a specified VPC is associated with, +// regardless of which Amazon Web Services account created the hosted zones. +type ListHostedZonesByVPCInput struct { + + // The ID of the Amazon VPC that you want to list hosted zones for. + // + // This member is required. + VPCId *string + + // For the Amazon VPC that you specified for VPCId , the Amazon Web Services Region + // that you created the VPC in. + // + // This member is required. + VPCRegion types.VPCRegion + + // (Optional) The maximum number of hosted zones that you want Amazon Route 53 to + // return. If the specified VPC is associated with more than MaxItems hosted + // zones, the response includes a NextToken element. NextToken contains an + // encrypted token that identifies the first hosted zone that Route 53 will return + // if you submit another request. + MaxItems *int32 + + // If the previous response included a NextToken element, the specified VPC is + // associated with more hosted zones. To get more hosted zones, submit another + // ListHostedZonesByVPC request. For the value of NextToken , specify the value of + // NextToken from the previous response. If the previous response didn't include a + // NextToken element, there are no more hosted zones to get. + NextToken *string + + noSmithyDocumentSerde +} + +type ListHostedZonesByVPCOutput struct { + + // A list that contains one HostedZoneSummary element for each hosted zone that + // the specified Amazon VPC is associated with. Each HostedZoneSummary element + // contains the hosted zone name and ID, and information about who owns the hosted + // zone. + // + // This member is required. + HostedZoneSummaries []types.HostedZoneSummary + + // The value that you specified for MaxItems in the most recent + // ListHostedZonesByVPC request. + // + // This member is required. + MaxItems *int32 + + // The value that you will use for NextToken in the next ListHostedZonesByVPC + // request. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListHostedZonesByVPCMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestxml_serializeOpListHostedZonesByVPC{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpListHostedZonesByVPC{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpListHostedZonesByVPCValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListHostedZonesByVPC(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opListHostedZonesByVPC(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "route53", + OperationName: "ListHostedZonesByVPC", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListQueryLoggingConfigs.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListQueryLoggingConfigs.go new file mode 100644 index 0000000..3043c78 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListQueryLoggingConfigs.go @@ -0,0 +1,257 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package route53 + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/route53/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists the configurations for DNS query logging that are associated with the +// current Amazon Web Services account or the configuration that is associated with +// a specified hosted zone. For more information about DNS query logs, see +// CreateQueryLoggingConfig (https://docs.aws.amazon.com/Route53/latest/APIReference/API_CreateQueryLoggingConfig.html) +// . Additional information, including the format of DNS query logs, appears in +// Logging DNS Queries (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/query-logs.html) +// in the Amazon Route 53 Developer Guide. +func (c *Client) ListQueryLoggingConfigs(ctx context.Context, params *ListQueryLoggingConfigsInput, optFns ...func(*Options)) (*ListQueryLoggingConfigsOutput, error) { + if params == nil { + params = &ListQueryLoggingConfigsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListQueryLoggingConfigs", params, optFns, c.addOperationListQueryLoggingConfigsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListQueryLoggingConfigsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListQueryLoggingConfigsInput struct { + + // (Optional) If you want to list the query logging configuration that is + // associated with a hosted zone, specify the ID in HostedZoneId . If you don't + // specify a hosted zone ID, ListQueryLoggingConfigs returns all of the + // configurations that are associated with the current Amazon Web Services account. + HostedZoneId *string + + // (Optional) The maximum number of query logging configurations that you want + // Amazon Route 53 to return in response to the current request. If the current + // Amazon Web Services account has more than MaxResults configurations, use the + // value of NextToken (https://docs.aws.amazon.com/Route53/latest/APIReference/API_ListQueryLoggingConfigs.html#API_ListQueryLoggingConfigs_RequestSyntax) + // in the response to get the next page of results. If you don't specify a value + // for MaxResults , Route 53 returns up to 100 configurations. + MaxResults *int32 + + // (Optional) If the current Amazon Web Services account has more than MaxResults + // query logging configurations, use NextToken to get the second and subsequent + // pages of results. For the first ListQueryLoggingConfigs request, omit this + // value. For the second and subsequent requests, get the value of NextToken from + // the previous response and specify that value for NextToken in the request. + NextToken *string + + noSmithyDocumentSerde +} + +type ListQueryLoggingConfigsOutput struct { + + // An array that contains one QueryLoggingConfig (https://docs.aws.amazon.com/Route53/latest/APIReference/API_QueryLoggingConfig.html) + // element for each configuration for DNS query logging that is associated with the + // current Amazon Web Services account. + // + // This member is required. + QueryLoggingConfigs []types.QueryLoggingConfig + + // If a response includes the last of the query logging configurations that are + // associated with the current Amazon Web Services account, NextToken doesn't + // appear in the response. If a response doesn't include the last of the + // configurations, you can get more configurations by submitting another + // ListQueryLoggingConfigs (https://docs.aws.amazon.com/Route53/latest/APIReference/API_ListQueryLoggingConfigs.html) + // request. Get the value of NextToken that Amazon Route 53 returned in the + // previous response and include it in NextToken in the next request. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListQueryLoggingConfigsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestxml_serializeOpListQueryLoggingConfigs{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpListQueryLoggingConfigs{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListQueryLoggingConfigs(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addSanitizeURLMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +// ListQueryLoggingConfigsAPIClient is a client that implements the +// ListQueryLoggingConfigs operation. +type ListQueryLoggingConfigsAPIClient interface { + ListQueryLoggingConfigs(context.Context, *ListQueryLoggingConfigsInput, ...func(*Options)) (*ListQueryLoggingConfigsOutput, error) +} + +var _ ListQueryLoggingConfigsAPIClient = (*Client)(nil) + +// ListQueryLoggingConfigsPaginatorOptions is the paginator options for +// ListQueryLoggingConfigs +type ListQueryLoggingConfigsPaginatorOptions struct { + // (Optional) The maximum number of query logging configurations that you want + // Amazon Route 53 to return in response to the current request. If the current + // Amazon Web Services account has more than MaxResults configurations, use the + // value of NextToken (https://docs.aws.amazon.com/Route53/latest/APIReference/API_ListQueryLoggingConfigs.html#API_ListQueryLoggingConfigs_RequestSyntax) + // in the response to get the next page of results. If you don't specify a value + // for MaxResults , Route 53 returns up to 100 configurations. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListQueryLoggingConfigsPaginator is a paginator for ListQueryLoggingConfigs +type ListQueryLoggingConfigsPaginator struct { + options ListQueryLoggingConfigsPaginatorOptions + client ListQueryLoggingConfigsAPIClient + params *ListQueryLoggingConfigsInput + nextToken *string + firstPage bool +} + +// NewListQueryLoggingConfigsPaginator returns a new +// ListQueryLoggingConfigsPaginator +func NewListQueryLoggingConfigsPaginator(client ListQueryLoggingConfigsAPIClient, params *ListQueryLoggingConfigsInput, optFns ...func(*ListQueryLoggingConfigsPaginatorOptions)) *ListQueryLoggingConfigsPaginator { + if params == nil { + params = &ListQueryLoggingConfigsInput{} + } + + options := ListQueryLoggingConfigsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListQueryLoggingConfigsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListQueryLoggingConfigsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListQueryLoggingConfigs page. +func (p *ListQueryLoggingConfigsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListQueryLoggingConfigsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + result, err := p.client.ListQueryLoggingConfigs(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListQueryLoggingConfigs(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "route53", + OperationName: "ListQueryLoggingConfigs", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListResourceRecordSets.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListResourceRecordSets.go new file mode 100644 index 0000000..a505902 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListResourceRecordSets.go @@ -0,0 +1,226 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package route53 + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/route53/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists the resource record sets in a specified hosted zone. +// ListResourceRecordSets returns up to 300 resource record sets at a time in ASCII +// order, beginning at a position specified by the name and type elements. Sort +// order ListResourceRecordSets sorts results first by DNS name with the labels +// reversed, for example: com.example.www. Note the trailing dot, which can change +// the sort order when the record name contains characters that appear before . +// (decimal 46) in the ASCII table. These characters include the following: ! " # +// $ % & ' ( ) * + , - When multiple records have the same DNS name, +// ListResourceRecordSets sorts results by the record type. Specifying where to +// start listing records You can use the name and type elements to specify the +// resource record set that the list begins with: If you do not specify Name or +// Type The results begin with the first resource record set that the hosted zone +// contains. If you specify Name but not Type The results begin with the first +// resource record set in the list whose name is greater than or equal to Name . If +// you specify Type but not Name Amazon Route 53 returns the InvalidInput error. +// If you specify both Name and Type The results begin with the first resource +// record set in the list whose name is greater than or equal to Name , and whose +// type is greater than or equal to Type . Resource record sets that are PENDING +// This action returns the most current version of the records. This includes +// records that are PENDING , and that are not yet available on all Route 53 DNS +// servers. Changing resource record sets To ensure that you get an accurate +// listing of the resource record sets for a hosted zone at a point in time, do not +// submit a ChangeResourceRecordSets request while you're paging through the +// results of a ListResourceRecordSets request. If you do, some pages may display +// results without the latest changes while other pages display results with the +// latest changes. Displaying the next page of results If a ListResourceRecordSets +// command returns more than one page of results, the value of IsTruncated is true +// . To display the next page of results, get the values of NextRecordName , +// NextRecordType , and NextRecordIdentifier (if any) from the response. Then +// submit another ListResourceRecordSets request, and specify those values for +// StartRecordName , StartRecordType , and StartRecordIdentifier . +func (c *Client) ListResourceRecordSets(ctx context.Context, params *ListResourceRecordSetsInput, optFns ...func(*Options)) (*ListResourceRecordSetsOutput, error) { + if params == nil { + params = &ListResourceRecordSetsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListResourceRecordSets", params, optFns, c.addOperationListResourceRecordSetsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListResourceRecordSetsOutput) + out.ResultMetadata = metadata + return out, nil +} + +// A request for the resource record sets that are associated with a specified +// hosted zone. +type ListResourceRecordSetsInput struct { + + // The ID of the hosted zone that contains the resource record sets that you want + // to list. + // + // This member is required. + HostedZoneId *string + + // (Optional) The maximum number of resource records sets to include in the + // response body for this request. If the response includes more than maxitems + // resource record sets, the value of the IsTruncated element in the response is + // true , and the values of the NextRecordName and NextRecordType elements in the + // response identify the first resource record set in the next group of maxitems + // resource record sets. + MaxItems *int32 + + // Resource record sets that have a routing policy other than simple: If results + // were truncated for a given DNS name and type, specify the value of + // NextRecordIdentifier from the previous response to get the next resource record + // set that has the current DNS name and type. + StartRecordIdentifier *string + + // The first name in the lexicographic ordering of resource record sets that you + // want to list. If the specified record name doesn't exist, the results begin with + // the first resource record set that has a name greater than the value of name . + StartRecordName *string + + // The type of resource record set to begin the record listing from. Valid values + // for basic resource record sets: A | AAAA | CAA | CNAME | MX | NAPTR | NS | PTR + // | SOA | SPF | SRV | TXT Values for weighted, latency, geolocation, and failover + // resource record sets: A | AAAA | CAA | CNAME | MX | NAPTR | PTR | SPF | SRV | + // TXT Values for alias resource record sets: + // - API Gateway custom regional API or edge-optimized API: A + // - CloudFront distribution: A or AAAA + // - Elastic Beanstalk environment that has a regionalized subdomain: A + // - Elastic Load Balancing load balancer: A | AAAA + // - S3 bucket: A + // - VPC interface VPC endpoint: A + // - Another resource record set in this hosted zone: The type of the resource + // record set that the alias references. + // Constraint: Specifying type without specifying name returns an InvalidInput + // error. + StartRecordType types.RRType + + noSmithyDocumentSerde +} + +// A complex type that contains list information for the resource record set. +type ListResourceRecordSetsOutput struct { + + // A flag that indicates whether more resource record sets remain to be listed. If + // your results were truncated, you can make a follow-up pagination request by + // using the NextRecordName element. + // + // This member is required. + IsTruncated bool + + // The maximum number of records you requested. + // + // This member is required. + MaxItems *int32 + + // Information about multiple resource record sets. + // + // This member is required. + ResourceRecordSets []types.ResourceRecordSet + + // Resource record sets that have a routing policy other than simple: If results + // were truncated for a given DNS name and type, the value of SetIdentifier for + // the next resource record set that has the current DNS name and type. For + // information about routing policies, see Choosing a Routing Policy (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/routing-policy.html) + // in the Amazon Route 53 Developer Guide. + NextRecordIdentifier *string + + // If the results were truncated, the name of the next record in the list. This + // element is present only if IsTruncated is true. + NextRecordName *string + + // If the results were truncated, the type of the next record in the list. This + // element is present only if IsTruncated is true. + NextRecordType types.RRType + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListResourceRecordSetsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestxml_serializeOpListResourceRecordSets{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpListResourceRecordSets{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpListResourceRecordSetsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListResourceRecordSets(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addSanitizeURLMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opListResourceRecordSets(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "route53", + OperationName: "ListResourceRecordSets", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListReusableDelegationSets.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListReusableDelegationSets.go new file mode 100644 index 0000000..d817f0a --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListReusableDelegationSets.go @@ -0,0 +1,163 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package route53 + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/route53/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves a list of the reusable delegation sets that are associated with the +// current Amazon Web Services account. +func (c *Client) ListReusableDelegationSets(ctx context.Context, params *ListReusableDelegationSetsInput, optFns ...func(*Options)) (*ListReusableDelegationSetsOutput, error) { + if params == nil { + params = &ListReusableDelegationSetsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListReusableDelegationSets", params, optFns, c.addOperationListReusableDelegationSetsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListReusableDelegationSetsOutput) + out.ResultMetadata = metadata + return out, nil +} + +// A request to get a list of the reusable delegation sets that are associated +// with the current Amazon Web Services account. +type ListReusableDelegationSetsInput struct { + + // If the value of IsTruncated in the previous response was true , you have more + // reusable delegation sets. To get another group, submit another + // ListReusableDelegationSets request. For the value of marker , specify the value + // of NextMarker from the previous response, which is the ID of the first reusable + // delegation set that Amazon Route 53 will return if you submit another request. + // If the value of IsTruncated in the previous response was false , there are no + // more reusable delegation sets to get. + Marker *string + + // The number of reusable delegation sets that you want Amazon Route 53 to return + // in the response to this request. If you specify a value greater than 100, Route + // 53 returns only the first 100 reusable delegation sets. + MaxItems *int32 + + noSmithyDocumentSerde +} + +// A complex type that contains information about the reusable delegation sets +// that are associated with the current Amazon Web Services account. +type ListReusableDelegationSetsOutput struct { + + // A complex type that contains one DelegationSet element for each reusable + // delegation set that was created by the current Amazon Web Services account. + // + // This member is required. + DelegationSets []types.DelegationSet + + // A flag that indicates whether there are more reusable delegation sets to be + // listed. + // + // This member is required. + IsTruncated bool + + // For the second and subsequent calls to ListReusableDelegationSets , Marker is + // the value that you specified for the marker parameter in the request that + // produced the current response. + // + // This member is required. + Marker *string + + // The value that you specified for the maxitems parameter in the call to + // ListReusableDelegationSets that produced the current response. + // + // This member is required. + MaxItems *int32 + + // If IsTruncated is true , the value of NextMarker identifies the next reusable + // delegation set that Amazon Route 53 will return if you submit another + // ListReusableDelegationSets request and specify the value of NextMarker in the + // marker parameter. + NextMarker *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListReusableDelegationSetsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestxml_serializeOpListReusableDelegationSets{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpListReusableDelegationSets{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListReusableDelegationSets(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opListReusableDelegationSets(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "route53", + OperationName: "ListReusableDelegationSets", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListTagsForResource.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListTagsForResource.go new file mode 100644 index 0000000..bde2937 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListTagsForResource.go @@ -0,0 +1,139 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package route53 + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/route53/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists tags for one health check or hosted zone. For information about using +// tags for cost allocation, see Using Cost Allocation Tags (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html) +// in the Billing and Cost Management User Guide. +func (c *Client) ListTagsForResource(ctx context.Context, params *ListTagsForResourceInput, optFns ...func(*Options)) (*ListTagsForResourceOutput, error) { + if params == nil { + params = &ListTagsForResourceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListTagsForResource", params, optFns, c.addOperationListTagsForResourceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListTagsForResourceOutput) + out.ResultMetadata = metadata + return out, nil +} + +// A complex type containing information about a request for a list of the tags +// that are associated with an individual resource. +type ListTagsForResourceInput struct { + + // The ID of the resource for which you want to retrieve tags. + // + // This member is required. + ResourceId *string + + // The type of the resource. + // - The resource type for health checks is healthcheck . + // - The resource type for hosted zones is hostedzone . + // + // This member is required. + ResourceType types.TagResourceType + + noSmithyDocumentSerde +} + +// A complex type that contains information about the health checks or hosted +// zones for which you want to list tags. +type ListTagsForResourceOutput struct { + + // A ResourceTagSet containing tags associated with the specified resource. + // + // This member is required. + ResourceTagSet *types.ResourceTagSet + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestxml_serializeOpListTagsForResource{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpListTagsForResource{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTagsForResource(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opListTagsForResource(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "route53", + OperationName: "ListTagsForResource", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListTagsForResources.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListTagsForResources.go new file mode 100644 index 0000000..f43dd9f --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListTagsForResources.go @@ -0,0 +1,140 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package route53 + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/route53/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists tags for up to 10 health checks or hosted zones. For information about +// using tags for cost allocation, see Using Cost Allocation Tags (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html) +// in the Billing and Cost Management User Guide. +func (c *Client) ListTagsForResources(ctx context.Context, params *ListTagsForResourcesInput, optFns ...func(*Options)) (*ListTagsForResourcesOutput, error) { + if params == nil { + params = &ListTagsForResourcesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListTagsForResources", params, optFns, c.addOperationListTagsForResourcesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListTagsForResourcesOutput) + out.ResultMetadata = metadata + return out, nil +} + +// A complex type that contains information about the health checks or hosted +// zones for which you want to list tags. +type ListTagsForResourcesInput struct { + + // A complex type that contains the ResourceId element for each resource for which + // you want to get a list of tags. + // + // This member is required. + ResourceIds []string + + // The type of the resources. + // - The resource type for health checks is healthcheck . + // - The resource type for hosted zones is hostedzone . + // + // This member is required. + ResourceType types.TagResourceType + + noSmithyDocumentSerde +} + +// A complex type containing tags for the specified resources. +type ListTagsForResourcesOutput struct { + + // A list of ResourceTagSet s containing tags associated with the specified + // resources. + // + // This member is required. + ResourceTagSets []types.ResourceTagSet + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListTagsForResourcesMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestxml_serializeOpListTagsForResources{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpListTagsForResources{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpListTagsForResourcesValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTagsForResources(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opListTagsForResources(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "route53", + OperationName: "ListTagsForResources", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListTrafficPolicies.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListTrafficPolicies.go new file mode 100644 index 0000000..53e2b0a --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListTrafficPolicies.go @@ -0,0 +1,163 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package route53 + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/route53/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets information about the latest version for every traffic policy that is +// associated with the current Amazon Web Services account. Policies are listed in +// the order that they were created in. For information about how of deleting a +// traffic policy affects the response from ListTrafficPolicies , see +// DeleteTrafficPolicy (https://docs.aws.amazon.com/Route53/latest/APIReference/API_DeleteTrafficPolicy.html) +// . +func (c *Client) ListTrafficPolicies(ctx context.Context, params *ListTrafficPoliciesInput, optFns ...func(*Options)) (*ListTrafficPoliciesOutput, error) { + if params == nil { + params = &ListTrafficPoliciesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListTrafficPolicies", params, optFns, c.addOperationListTrafficPoliciesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListTrafficPoliciesOutput) + out.ResultMetadata = metadata + return out, nil +} + +// A complex type that contains the information about the request to list the +// traffic policies that are associated with the current Amazon Web Services +// account. +type ListTrafficPoliciesInput struct { + + // (Optional) The maximum number of traffic policies that you want Amazon Route 53 + // to return in response to this request. If you have more than MaxItems traffic + // policies, the value of IsTruncated in the response is true , and the value of + // TrafficPolicyIdMarker is the ID of the first traffic policy that Route 53 will + // return if you submit another request. + MaxItems *int32 + + // (Conditional) For your first request to ListTrafficPolicies , don't include the + // TrafficPolicyIdMarker parameter. If you have more traffic policies than the + // value of MaxItems , ListTrafficPolicies returns only the first MaxItems traffic + // policies. To get the next group of policies, submit another request to + // ListTrafficPolicies . For the value of TrafficPolicyIdMarker , specify the value + // of TrafficPolicyIdMarker that was returned in the previous response. + TrafficPolicyIdMarker *string + + noSmithyDocumentSerde +} + +// A complex type that contains the response information for the request. +type ListTrafficPoliciesOutput struct { + + // A flag that indicates whether there are more traffic policies to be listed. If + // the response was truncated, you can get the next group of traffic policies by + // submitting another ListTrafficPolicies request and specifying the value of + // TrafficPolicyIdMarker in the TrafficPolicyIdMarker request parameter. + // + // This member is required. + IsTruncated bool + + // The value that you specified for the MaxItems parameter in the + // ListTrafficPolicies request that produced the current response. + // + // This member is required. + MaxItems *int32 + + // If the value of IsTruncated is true , TrafficPolicyIdMarker is the ID of the + // first traffic policy in the next group of MaxItems traffic policies. + // + // This member is required. + TrafficPolicyIdMarker *string + + // A list that contains one TrafficPolicySummary element for each traffic policy + // that was created by the current Amazon Web Services account. + // + // This member is required. + TrafficPolicySummaries []types.TrafficPolicySummary + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListTrafficPoliciesMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestxml_serializeOpListTrafficPolicies{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpListTrafficPolicies{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTrafficPolicies(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opListTrafficPolicies(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "route53", + OperationName: "ListTrafficPolicies", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListTrafficPolicyInstances.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListTrafficPolicyInstances.go new file mode 100644 index 0000000..3fbccf6 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListTrafficPolicyInstances.go @@ -0,0 +1,199 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package route53 + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/route53/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets information about the traffic policy instances that you created by using +// the current Amazon Web Services account. After you submit an +// UpdateTrafficPolicyInstance request, there's a brief delay while Amazon Route 53 +// creates the resource record sets that are specified in the traffic policy +// definition. For more information, see the State response element. Route 53 +// returns a maximum of 100 items in each response. If you have a lot of traffic +// policy instances, you can use the MaxItems parameter to list them in groups of +// up to 100. +func (c *Client) ListTrafficPolicyInstances(ctx context.Context, params *ListTrafficPolicyInstancesInput, optFns ...func(*Options)) (*ListTrafficPolicyInstancesOutput, error) { + if params == nil { + params = &ListTrafficPolicyInstancesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListTrafficPolicyInstances", params, optFns, c.addOperationListTrafficPolicyInstancesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListTrafficPolicyInstancesOutput) + out.ResultMetadata = metadata + return out, nil +} + +// A request to get information about the traffic policy instances that you +// created by using the current Amazon Web Services account. +type ListTrafficPolicyInstancesInput struct { + + // If the value of IsTruncated in the previous response was true , you have more + // traffic policy instances. To get more traffic policy instances, submit another + // ListTrafficPolicyInstances request. For the value of HostedZoneId , specify the + // value of HostedZoneIdMarker from the previous response, which is the hosted + // zone ID of the first traffic policy instance in the next group of traffic policy + // instances. If the value of IsTruncated in the previous response was false , + // there are no more traffic policy instances to get. + HostedZoneIdMarker *string + + // The maximum number of traffic policy instances that you want Amazon Route 53 to + // return in response to a ListTrafficPolicyInstances request. If you have more + // than MaxItems traffic policy instances, the value of the IsTruncated element in + // the response is true , and the values of HostedZoneIdMarker , + // TrafficPolicyInstanceNameMarker , and TrafficPolicyInstanceTypeMarker represent + // the first traffic policy instance in the next group of MaxItems traffic policy + // instances. + MaxItems *int32 + + // If the value of IsTruncated in the previous response was true , you have more + // traffic policy instances. To get more traffic policy instances, submit another + // ListTrafficPolicyInstances request. For the value of trafficpolicyinstancename , + // specify the value of TrafficPolicyInstanceNameMarker from the previous + // response, which is the name of the first traffic policy instance in the next + // group of traffic policy instances. If the value of IsTruncated in the previous + // response was false , there are no more traffic policy instances to get. + TrafficPolicyInstanceNameMarker *string + + // If the value of IsTruncated in the previous response was true , you have more + // traffic policy instances. To get more traffic policy instances, submit another + // ListTrafficPolicyInstances request. For the value of trafficpolicyinstancetype , + // specify the value of TrafficPolicyInstanceTypeMarker from the previous + // response, which is the type of the first traffic policy instance in the next + // group of traffic policy instances. If the value of IsTruncated in the previous + // response was false , there are no more traffic policy instances to get. + TrafficPolicyInstanceTypeMarker types.RRType + + noSmithyDocumentSerde +} + +// A complex type that contains the response information for the request. +type ListTrafficPolicyInstancesOutput struct { + + // A flag that indicates whether there are more traffic policy instances to be + // listed. If the response was truncated, you can get more traffic policy instances + // by calling ListTrafficPolicyInstances again and specifying the values of the + // HostedZoneIdMarker , TrafficPolicyInstanceNameMarker , and + // TrafficPolicyInstanceTypeMarker in the corresponding request parameters. + // + // This member is required. + IsTruncated bool + + // The value that you specified for the MaxItems parameter in the call to + // ListTrafficPolicyInstances that produced the current response. + // + // This member is required. + MaxItems *int32 + + // A list that contains one TrafficPolicyInstance element for each traffic policy + // instance that matches the elements in the request. + // + // This member is required. + TrafficPolicyInstances []types.TrafficPolicyInstance + + // If IsTruncated is true , HostedZoneIdMarker is the ID of the hosted zone of the + // first traffic policy instance that Route 53 will return if you submit another + // ListTrafficPolicyInstances request. + HostedZoneIdMarker *string + + // If IsTruncated is true , TrafficPolicyInstanceNameMarker is the name of the + // first traffic policy instance that Route 53 will return if you submit another + // ListTrafficPolicyInstances request. + TrafficPolicyInstanceNameMarker *string + + // If IsTruncated is true , TrafficPolicyInstanceTypeMarker is the DNS type of the + // resource record sets that are associated with the first traffic policy instance + // that Amazon Route 53 will return if you submit another + // ListTrafficPolicyInstances request. + TrafficPolicyInstanceTypeMarker types.RRType + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListTrafficPolicyInstancesMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestxml_serializeOpListTrafficPolicyInstances{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpListTrafficPolicyInstances{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTrafficPolicyInstances(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addSanitizeURLMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opListTrafficPolicyInstances(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "route53", + OperationName: "ListTrafficPolicyInstances", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListTrafficPolicyInstancesByHostedZone.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListTrafficPolicyInstancesByHostedZone.go new file mode 100644 index 0000000..69f50a0 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListTrafficPolicyInstancesByHostedZone.go @@ -0,0 +1,192 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package route53 + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/route53/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets information about the traffic policy instances that you created in a +// specified hosted zone. After you submit a CreateTrafficPolicyInstance or an +// UpdateTrafficPolicyInstance request, there's a brief delay while Amazon Route 53 +// creates the resource record sets that are specified in the traffic policy +// definition. For more information, see the State response element. Route 53 +// returns a maximum of 100 items in each response. If you have a lot of traffic +// policy instances, you can use the MaxItems parameter to list them in groups of +// up to 100. +func (c *Client) ListTrafficPolicyInstancesByHostedZone(ctx context.Context, params *ListTrafficPolicyInstancesByHostedZoneInput, optFns ...func(*Options)) (*ListTrafficPolicyInstancesByHostedZoneOutput, error) { + if params == nil { + params = &ListTrafficPolicyInstancesByHostedZoneInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListTrafficPolicyInstancesByHostedZone", params, optFns, c.addOperationListTrafficPolicyInstancesByHostedZoneMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListTrafficPolicyInstancesByHostedZoneOutput) + out.ResultMetadata = metadata + return out, nil +} + +// A request for the traffic policy instances that you created in a specified +// hosted zone. +type ListTrafficPolicyInstancesByHostedZoneInput struct { + + // The ID of the hosted zone that you want to list traffic policy instances for. + // + // This member is required. + HostedZoneId *string + + // The maximum number of traffic policy instances to be included in the response + // body for this request. If you have more than MaxItems traffic policy instances, + // the value of the IsTruncated element in the response is true , and the values of + // HostedZoneIdMarker , TrafficPolicyInstanceNameMarker , and + // TrafficPolicyInstanceTypeMarker represent the first traffic policy instance that + // Amazon Route 53 will return if you submit another request. + MaxItems *int32 + + // If the value of IsTruncated in the previous response is true, you have more + // traffic policy instances. To get more traffic policy instances, submit another + // ListTrafficPolicyInstances request. For the value of trafficpolicyinstancename , + // specify the value of TrafficPolicyInstanceNameMarker from the previous + // response, which is the name of the first traffic policy instance in the next + // group of traffic policy instances. If the value of IsTruncated in the previous + // response was false , there are no more traffic policy instances to get. + TrafficPolicyInstanceNameMarker *string + + // If the value of IsTruncated in the previous response is true, you have more + // traffic policy instances. To get more traffic policy instances, submit another + // ListTrafficPolicyInstances request. For the value of trafficpolicyinstancetype , + // specify the value of TrafficPolicyInstanceTypeMarker from the previous + // response, which is the type of the first traffic policy instance in the next + // group of traffic policy instances. If the value of IsTruncated in the previous + // response was false , there are no more traffic policy instances to get. + TrafficPolicyInstanceTypeMarker types.RRType + + noSmithyDocumentSerde +} + +// A complex type that contains the response information for the request. +type ListTrafficPolicyInstancesByHostedZoneOutput struct { + + // A flag that indicates whether there are more traffic policy instances to be + // listed. If the response was truncated, you can get the next group of traffic + // policy instances by submitting another ListTrafficPolicyInstancesByHostedZone + // request and specifying the values of HostedZoneIdMarker , + // TrafficPolicyInstanceNameMarker , and TrafficPolicyInstanceTypeMarker in the + // corresponding request parameters. + // + // This member is required. + IsTruncated bool + + // The value that you specified for the MaxItems parameter in the + // ListTrafficPolicyInstancesByHostedZone request that produced the current + // response. + // + // This member is required. + MaxItems *int32 + + // A list that contains one TrafficPolicyInstance element for each traffic policy + // instance that matches the elements in the request. + // + // This member is required. + TrafficPolicyInstances []types.TrafficPolicyInstance + + // If IsTruncated is true , TrafficPolicyInstanceNameMarker is the name of the + // first traffic policy instance in the next group of traffic policy instances. + TrafficPolicyInstanceNameMarker *string + + // If IsTruncated is true, TrafficPolicyInstanceTypeMarker is the DNS type of the + // resource record sets that are associated with the first traffic policy instance + // in the next group of traffic policy instances. + TrafficPolicyInstanceTypeMarker types.RRType + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListTrafficPolicyInstancesByHostedZoneMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestxml_serializeOpListTrafficPolicyInstancesByHostedZone{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpListTrafficPolicyInstancesByHostedZone{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpListTrafficPolicyInstancesByHostedZoneValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTrafficPolicyInstancesByHostedZone(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addSanitizeURLMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opListTrafficPolicyInstancesByHostedZone(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "route53", + OperationName: "ListTrafficPolicyInstancesByHostedZone", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListTrafficPolicyInstancesByPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListTrafficPolicyInstancesByPolicy.go new file mode 100644 index 0000000..92dcc07 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListTrafficPolicyInstancesByPolicy.go @@ -0,0 +1,215 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package route53 + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/route53/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets information about the traffic policy instances that you created by using a +// specify traffic policy version. After you submit a CreateTrafficPolicyInstance +// or an UpdateTrafficPolicyInstance request, there's a brief delay while Amazon +// Route 53 creates the resource record sets that are specified in the traffic +// policy definition. For more information, see the State response element. Route +// 53 returns a maximum of 100 items in each response. If you have a lot of traffic +// policy instances, you can use the MaxItems parameter to list them in groups of +// up to 100. +func (c *Client) ListTrafficPolicyInstancesByPolicy(ctx context.Context, params *ListTrafficPolicyInstancesByPolicyInput, optFns ...func(*Options)) (*ListTrafficPolicyInstancesByPolicyOutput, error) { + if params == nil { + params = &ListTrafficPolicyInstancesByPolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListTrafficPolicyInstancesByPolicy", params, optFns, c.addOperationListTrafficPolicyInstancesByPolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListTrafficPolicyInstancesByPolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +// A complex type that contains the information about the request to list your +// traffic policy instances. +type ListTrafficPolicyInstancesByPolicyInput struct { + + // The ID of the traffic policy for which you want to list traffic policy + // instances. + // + // This member is required. + TrafficPolicyId *string + + // The version of the traffic policy for which you want to list traffic policy + // instances. The version must be associated with the traffic policy that is + // specified by TrafficPolicyId . + // + // This member is required. + TrafficPolicyVersion *int32 + + // If the value of IsTruncated in the previous response was true , you have more + // traffic policy instances. To get more traffic policy instances, submit another + // ListTrafficPolicyInstancesByPolicy request. For the value of hostedzoneid , + // specify the value of HostedZoneIdMarker from the previous response, which is + // the hosted zone ID of the first traffic policy instance that Amazon Route 53 + // will return if you submit another request. If the value of IsTruncated in the + // previous response was false , there are no more traffic policy instances to get. + HostedZoneIdMarker *string + + // The maximum number of traffic policy instances to be included in the response + // body for this request. If you have more than MaxItems traffic policy instances, + // the value of the IsTruncated element in the response is true , and the values of + // HostedZoneIdMarker , TrafficPolicyInstanceNameMarker , and + // TrafficPolicyInstanceTypeMarker represent the first traffic policy instance that + // Amazon Route 53 will return if you submit another request. + MaxItems *int32 + + // If the value of IsTruncated in the previous response was true , you have more + // traffic policy instances. To get more traffic policy instances, submit another + // ListTrafficPolicyInstancesByPolicy request. For the value of + // trafficpolicyinstancename , specify the value of TrafficPolicyInstanceNameMarker + // from the previous response, which is the name of the first traffic policy + // instance that Amazon Route 53 will return if you submit another request. If the + // value of IsTruncated in the previous response was false , there are no more + // traffic policy instances to get. + TrafficPolicyInstanceNameMarker *string + + // If the value of IsTruncated in the previous response was true , you have more + // traffic policy instances. To get more traffic policy instances, submit another + // ListTrafficPolicyInstancesByPolicy request. For the value of + // trafficpolicyinstancetype , specify the value of TrafficPolicyInstanceTypeMarker + // from the previous response, which is the name of the first traffic policy + // instance that Amazon Route 53 will return if you submit another request. If the + // value of IsTruncated in the previous response was false , there are no more + // traffic policy instances to get. + TrafficPolicyInstanceTypeMarker types.RRType + + noSmithyDocumentSerde +} + +// A complex type that contains the response information for the request. +type ListTrafficPolicyInstancesByPolicyOutput struct { + + // A flag that indicates whether there are more traffic policy instances to be + // listed. If the response was truncated, you can get the next group of traffic + // policy instances by calling ListTrafficPolicyInstancesByPolicy again and + // specifying the values of the HostedZoneIdMarker , + // TrafficPolicyInstanceNameMarker , and TrafficPolicyInstanceTypeMarker elements + // in the corresponding request parameters. + // + // This member is required. + IsTruncated bool + + // The value that you specified for the MaxItems parameter in the call to + // ListTrafficPolicyInstancesByPolicy that produced the current response. + // + // This member is required. + MaxItems *int32 + + // A list that contains one TrafficPolicyInstance element for each traffic policy + // instance that matches the elements in the request. + // + // This member is required. + TrafficPolicyInstances []types.TrafficPolicyInstance + + // If IsTruncated is true , HostedZoneIdMarker is the ID of the hosted zone of the + // first traffic policy instance in the next group of traffic policy instances. + HostedZoneIdMarker *string + + // If IsTruncated is true , TrafficPolicyInstanceNameMarker is the name of the + // first traffic policy instance in the next group of MaxItems traffic policy + // instances. + TrafficPolicyInstanceNameMarker *string + + // If IsTruncated is true , TrafficPolicyInstanceTypeMarker is the DNS type of the + // resource record sets that are associated with the first traffic policy instance + // in the next group of MaxItems traffic policy instances. + TrafficPolicyInstanceTypeMarker types.RRType + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListTrafficPolicyInstancesByPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestxml_serializeOpListTrafficPolicyInstancesByPolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpListTrafficPolicyInstancesByPolicy{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpListTrafficPolicyInstancesByPolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTrafficPolicyInstancesByPolicy(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addSanitizeURLMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opListTrafficPolicyInstancesByPolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "route53", + OperationName: "ListTrafficPolicyInstancesByPolicy", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListTrafficPolicyVersions.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListTrafficPolicyVersions.go new file mode 100644 index 0000000..f3d96b7 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListTrafficPolicyVersions.go @@ -0,0 +1,170 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package route53 + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/route53/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets information about all of the versions for a specified traffic policy. +// Traffic policy versions are listed in numerical order by VersionNumber . +func (c *Client) ListTrafficPolicyVersions(ctx context.Context, params *ListTrafficPolicyVersionsInput, optFns ...func(*Options)) (*ListTrafficPolicyVersionsOutput, error) { + if params == nil { + params = &ListTrafficPolicyVersionsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListTrafficPolicyVersions", params, optFns, c.addOperationListTrafficPolicyVersionsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListTrafficPolicyVersionsOutput) + out.ResultMetadata = metadata + return out, nil +} + +// A complex type that contains the information about the request to list your +// traffic policies. +type ListTrafficPolicyVersionsInput struct { + + // Specify the value of Id of the traffic policy for which you want to list all + // versions. + // + // This member is required. + Id *string + + // The maximum number of traffic policy versions that you want Amazon Route 53 to + // include in the response body for this request. If the specified traffic policy + // has more than MaxItems versions, the value of IsTruncated in the response is + // true , and the value of the TrafficPolicyVersionMarker element is the ID of the + // first version that Route 53 will return if you submit another request. + MaxItems *int32 + + // For your first request to ListTrafficPolicyVersions , don't include the + // TrafficPolicyVersionMarker parameter. If you have more traffic policy versions + // than the value of MaxItems , ListTrafficPolicyVersions returns only the first + // group of MaxItems versions. To get more traffic policy versions, submit another + // ListTrafficPolicyVersions request. For the value of TrafficPolicyVersionMarker , + // specify the value of TrafficPolicyVersionMarker in the previous response. + TrafficPolicyVersionMarker *string + + noSmithyDocumentSerde +} + +// A complex type that contains the response information for the request. +type ListTrafficPolicyVersionsOutput struct { + + // A flag that indicates whether there are more traffic policies to be listed. If + // the response was truncated, you can get the next group of traffic policies by + // submitting another ListTrafficPolicyVersions request and specifying the value + // of NextMarker in the marker parameter. + // + // This member is required. + IsTruncated bool + + // The value that you specified for the maxitems parameter in the + // ListTrafficPolicyVersions request that produced the current response. + // + // This member is required. + MaxItems *int32 + + // A list that contains one TrafficPolicy element for each traffic policy version + // that is associated with the specified traffic policy. + // + // This member is required. + TrafficPolicies []types.TrafficPolicy + + // If IsTruncated is true , the value of TrafficPolicyVersionMarker identifies the + // first traffic policy that Amazon Route 53 will return if you submit another + // request. Call ListTrafficPolicyVersions again and specify the value of + // TrafficPolicyVersionMarker in the TrafficPolicyVersionMarker request parameter. + // This element is present only if IsTruncated is true . + // + // This member is required. + TrafficPolicyVersionMarker *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListTrafficPolicyVersionsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestxml_serializeOpListTrafficPolicyVersions{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpListTrafficPolicyVersions{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpListTrafficPolicyVersionsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTrafficPolicyVersions(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opListTrafficPolicyVersions(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "route53", + OperationName: "ListTrafficPolicyVersions", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListVPCAssociationAuthorizations.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListVPCAssociationAuthorizations.go new file mode 100644 index 0000000..58a84d7 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListVPCAssociationAuthorizations.go @@ -0,0 +1,161 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package route53 + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/route53/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets a list of the VPCs that were created by other accounts and that can be +// associated with a specified hosted zone because you've submitted one or more +// CreateVPCAssociationAuthorization requests. The response includes a VPCs +// element with a VPC child element for each VPC that can be associated with the +// hosted zone. +func (c *Client) ListVPCAssociationAuthorizations(ctx context.Context, params *ListVPCAssociationAuthorizationsInput, optFns ...func(*Options)) (*ListVPCAssociationAuthorizationsOutput, error) { + if params == nil { + params = &ListVPCAssociationAuthorizationsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListVPCAssociationAuthorizations", params, optFns, c.addOperationListVPCAssociationAuthorizationsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListVPCAssociationAuthorizationsOutput) + out.ResultMetadata = metadata + return out, nil +} + +// A complex type that contains information about that can be associated with your +// hosted zone. +type ListVPCAssociationAuthorizationsInput struct { + + // The ID of the hosted zone for which you want a list of VPCs that can be + // associated with the hosted zone. + // + // This member is required. + HostedZoneId *string + + // Optional: An integer that specifies the maximum number of VPCs that you want + // Amazon Route 53 to return. If you don't specify a value for MaxResults , Route + // 53 returns up to 50 VPCs per page. + MaxResults *int32 + + // Optional: If a response includes a NextToken element, there are more VPCs that + // can be associated with the specified hosted zone. To get the next page of + // results, submit another request, and include the value of NextToken from the + // response in the nexttoken parameter in another ListVPCAssociationAuthorizations + // request. + NextToken *string + + noSmithyDocumentSerde +} + +// A complex type that contains the response information for the request. +type ListVPCAssociationAuthorizationsOutput struct { + + // The ID of the hosted zone that you can associate the listed VPCs with. + // + // This member is required. + HostedZoneId *string + + // The list of VPCs that are authorized to be associated with the specified hosted + // zone. + // + // This member is required. + VPCs []types.VPC + + // When the response includes a NextToken element, there are more VPCs that can be + // associated with the specified hosted zone. To get the next page of VPCs, submit + // another ListVPCAssociationAuthorizations request, and include the value of the + // NextToken element from the response in the nexttoken request parameter. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListVPCAssociationAuthorizationsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestxml_serializeOpListVPCAssociationAuthorizations{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpListVPCAssociationAuthorizations{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpListVPCAssociationAuthorizationsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListVPCAssociationAuthorizations(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addSanitizeURLMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opListVPCAssociationAuthorizations(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "route53", + OperationName: "ListVPCAssociationAuthorizations", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_TestDNSAnswer.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_TestDNSAnswer.go new file mode 100644 index 0000000..2465d12 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_TestDNSAnswer.go @@ -0,0 +1,200 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package route53 + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/route53/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets the value that Amazon Route 53 returns in response to a DNS request for a +// specified record name and type. You can optionally specify the IP address of a +// DNS resolver, an EDNS0 client subnet IP address, and a subnet mask. This call +// only supports querying public hosted zones. +func (c *Client) TestDNSAnswer(ctx context.Context, params *TestDNSAnswerInput, optFns ...func(*Options)) (*TestDNSAnswerOutput, error) { + if params == nil { + params = &TestDNSAnswerInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "TestDNSAnswer", params, optFns, c.addOperationTestDNSAnswerMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*TestDNSAnswerOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Gets the value that Amazon Route 53 returns in response to a DNS request for a +// specified record name and type. You can optionally specify the IP address of a +// DNS resolver, an EDNS0 client subnet IP address, and a subnet mask. +type TestDNSAnswerInput struct { + + // The ID of the hosted zone that you want Amazon Route 53 to simulate a query for. + // + // This member is required. + HostedZoneId *string + + // The name of the resource record set that you want Amazon Route 53 to simulate a + // query for. + // + // This member is required. + RecordName *string + + // The type of the resource record set. + // + // This member is required. + RecordType types.RRType + + // If the resolver that you specified for resolverip supports EDNS0, specify the + // IPv4 or IPv6 address of a client in the applicable location, for example, + // 192.0.2.44 or 2001:db8:85a3::8a2e:370:7334 . + EDNS0ClientSubnetIP *string + + // If you specify an IP address for edns0clientsubnetip , you can optionally + // specify the number of bits of the IP address that you want the checking tool to + // include in the DNS query. For example, if you specify 192.0.2.44 for + // edns0clientsubnetip and 24 for edns0clientsubnetmask , the checking tool will + // simulate a request from 192.0.2.0/24. The default value is 24 bits for IPv4 + // addresses and 64 bits for IPv6 addresses. The range of valid values depends on + // whether edns0clientsubnetip is an IPv4 or an IPv6 address: + // - IPv4: Specify a value between 0 and 32 + // - IPv6: Specify a value between 0 and 128 + EDNS0ClientSubnetMask *string + + // If you want to simulate a request from a specific DNS resolver, specify the IP + // address for that resolver. If you omit this value, TestDnsAnswer uses the IP + // address of a DNS resolver in the Amazon Web Services US East (N. Virginia) + // Region ( us-east-1 ). + ResolverIP *string + + noSmithyDocumentSerde +} + +// A complex type that contains the response to a TestDNSAnswer request. +type TestDNSAnswerOutput struct { + + // The Amazon Route 53 name server used to respond to the request. + // + // This member is required. + Nameserver *string + + // The protocol that Amazon Route 53 used to respond to the request, either UDP or + // TCP . + // + // This member is required. + Protocol *string + + // A list that contains values that Amazon Route 53 returned for this resource + // record set. + // + // This member is required. + RecordData []string + + // The name of the resource record set that you submitted a request for. + // + // This member is required. + RecordName *string + + // The type of the resource record set that you submitted a request for. + // + // This member is required. + RecordType types.RRType + + // A code that indicates whether the request is valid or not. The most common + // response code is NOERROR , meaning that the request is valid. If the response is + // not valid, Amazon Route 53 returns a response code that describes the error. For + // a list of possible response codes, see DNS RCODES (http://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-6) + // on the IANA website. + // + // This member is required. + ResponseCode *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationTestDNSAnswerMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestxml_serializeOpTestDNSAnswer{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpTestDNSAnswer{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpTestDNSAnswerValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opTestDNSAnswer(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addSanitizeURLMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opTestDNSAnswer(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "route53", + OperationName: "TestDNSAnswer", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_UpdateHealthCheck.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_UpdateHealthCheck.go new file mode 100644 index 0000000..5042ad0 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_UpdateHealthCheck.go @@ -0,0 +1,339 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package route53 + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/route53/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Updates an existing health check. Note that some values can't be updated. For +// more information about updating health checks, see Creating, Updating, and +// Deleting Health Checks (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/health-checks-creating-deleting.html) +// in the Amazon Route 53 Developer Guide. +func (c *Client) UpdateHealthCheck(ctx context.Context, params *UpdateHealthCheckInput, optFns ...func(*Options)) (*UpdateHealthCheckOutput, error) { + if params == nil { + params = &UpdateHealthCheckInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateHealthCheck", params, optFns, c.addOperationUpdateHealthCheckMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateHealthCheckOutput) + out.ResultMetadata = metadata + return out, nil +} + +// A complex type that contains information about a request to update a health +// check. +type UpdateHealthCheckInput struct { + + // The ID for the health check for which you want detailed information. When you + // created the health check, CreateHealthCheck returned the ID in the response, in + // the HealthCheckId element. + // + // This member is required. + HealthCheckId *string + + // A complex type that identifies the CloudWatch alarm that you want Amazon Route + // 53 health checkers to use to determine whether the specified health check is + // healthy. + AlarmIdentifier *types.AlarmIdentifier + + // A complex type that contains one ChildHealthCheck element for each health check + // that you want to associate with a CALCULATED health check. + ChildHealthChecks []string + + // Stops Route 53 from performing health checks. When you disable a health check, + // here's what happens: + // - Health checks that check the health of endpoints: Route 53 stops submitting + // requests to your application, server, or other resource. + // - Calculated health checks: Route 53 stops aggregating the status of the + // referenced health checks. + // - Health checks that monitor CloudWatch alarms: Route 53 stops monitoring the + // corresponding CloudWatch metrics. + // After you disable a health check, Route 53 considers the status of the health + // check to always be healthy. If you configured DNS failover, Route 53 continues + // to route traffic to the corresponding resources. If you want to stop routing + // traffic to a resource, change the value of Inverted (https://docs.aws.amazon.com/Route53/latest/APIReference/API_UpdateHealthCheck.html#Route53-UpdateHealthCheck-request-Inverted) + // . Charges for a health check still apply when the health check is disabled. For + // more information, see Amazon Route 53 Pricing (http://aws.amazon.com/route53/pricing/) + // . + Disabled *bool + + // Specify whether you want Amazon Route 53 to send the value of + // FullyQualifiedDomainName to the endpoint in the client_hello message during TLS + // negotiation. This allows the endpoint to respond to HTTPS health check requests + // with the applicable SSL/TLS certificate. Some endpoints require that HTTPS + // requests include the host name in the client_hello message. If you don't enable + // SNI, the status of the health check will be SSL alert handshake_failure . A + // health check can also have that status for other reasons. If SNI is enabled and + // you're still getting the error, check the SSL/TLS configuration on your endpoint + // and confirm that your certificate is valid. The SSL/TLS certificate on your + // endpoint includes a domain name in the Common Name field and possibly several + // more in the Subject Alternative Names field. One of the domain names in the + // certificate should match the value that you specify for FullyQualifiedDomainName + // . If the endpoint responds to the client_hello message with a certificate that + // does not include the domain name that you specified in FullyQualifiedDomainName + // , a health checker will retry the handshake. In the second attempt, the health + // checker will omit FullyQualifiedDomainName from the client_hello message. + EnableSNI *bool + + // The number of consecutive health checks that an endpoint must pass or fail for + // Amazon Route 53 to change the current status of the endpoint from unhealthy to + // healthy or vice versa. For more information, see How Amazon Route 53 Determines + // Whether an Endpoint Is Healthy (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-determining-health-of-endpoints.html) + // in the Amazon Route 53 Developer Guide. If you don't specify a value for + // FailureThreshold , the default value is three health checks. + FailureThreshold *int32 + + // Amazon Route 53 behavior depends on whether you specify a value for IPAddress . + // If a health check already has a value for IPAddress , you can change the value. + // However, you can't update an existing health check to add or remove the value of + // IPAddress . If you specify a value for IPAddress : Route 53 sends health check + // requests to the specified IPv4 or IPv6 address and passes the value of + // FullyQualifiedDomainName in the Host header for all health checks except TCP + // health checks. This is typically the fully qualified DNS name of the endpoint on + // which you want Route 53 to perform health checks. When Route 53 checks the + // health of an endpoint, here is how it constructs the Host header: + // - If you specify a value of 80 for Port and HTTP or HTTP_STR_MATCH for Type , + // Route 53 passes the value of FullyQualifiedDomainName to the endpoint in the + // Host header. + // - If you specify a value of 443 for Port and HTTPS or HTTPS_STR_MATCH for Type + // , Route 53 passes the value of FullyQualifiedDomainName to the endpoint in the + // Host header. + // - If you specify another value for Port and any value except TCP for Type , + // Route 53 passes FullyQualifiedDomainName : Port to the endpoint in the Host + // header. + // If you don't specify a value for FullyQualifiedDomainName , Route 53 substitutes + // the value of IPAddress in the Host header in each of the above cases. If you + // don't specify a value for IPAddress : If you don't specify a value for IPAddress + // , Route 53 sends a DNS request to the domain that you specify in + // FullyQualifiedDomainName at the interval you specify in RequestInterval . Using + // an IPv4 address that is returned by DNS, Route 53 then checks the health of the + // endpoint. If you don't specify a value for IPAddress , Route 53 uses only IPv4 + // to send health checks to the endpoint. If there's no resource record set with a + // type of A for the name that you specify for FullyQualifiedDomainName , the + // health check fails with a "DNS resolution failed" error. If you want to check + // the health of weighted, latency, or failover resource record sets and you choose + // to specify the endpoint only by FullyQualifiedDomainName , we recommend that you + // create a separate health check for each endpoint. For example, create a health + // check for each HTTP server that is serving content for www.example.com. For the + // value of FullyQualifiedDomainName , specify the domain name of the server (such + // as us-east-2-www.example.com ), not the name of the resource record sets + // (www.example.com). In this configuration, if the value of + // FullyQualifiedDomainName matches the name of the resource record sets and you + // then associate the health check with those resource record sets, health check + // results will be unpredictable. In addition, if the value of Type is HTTP , HTTPS + // , HTTP_STR_MATCH , or HTTPS_STR_MATCH , Route 53 passes the value of + // FullyQualifiedDomainName in the Host header, as it does when you specify a + // value for IPAddress . If the value of Type is TCP , Route 53 doesn't pass a Host + // header. + FullyQualifiedDomainName *string + + // A sequential counter that Amazon Route 53 sets to 1 when you create a health + // check and increments by 1 each time you update settings for the health check. We + // recommend that you use GetHealthCheck or ListHealthChecks to get the current + // value of HealthCheckVersion for the health check that you want to update, and + // that you include that value in your UpdateHealthCheck request. This prevents + // Route 53 from overwriting an intervening update: + // - If the value in the UpdateHealthCheck request matches the value of + // HealthCheckVersion in the health check, Route 53 updates the health check with + // the new settings. + // - If the value of HealthCheckVersion in the health check is greater, the + // health check was changed after you got the version number. Route 53 does not + // update the health check, and it returns a HealthCheckVersionMismatch error. + HealthCheckVersion *int64 + + // The number of child health checks that are associated with a CALCULATED health + // that Amazon Route 53 must consider healthy for the CALCULATED health check to + // be considered healthy. To specify the child health checks that you want to + // associate with a CALCULATED health check, use the ChildHealthChecks and + // ChildHealthCheck elements. Note the following: + // - If you specify a number greater than the number of child health checks, + // Route 53 always considers this health check to be unhealthy. + // - If you specify 0 , Route 53 always considers this health check to be + // healthy. + HealthThreshold *int32 + + // The IPv4 or IPv6 IP address for the endpoint that you want Amazon Route 53 to + // perform health checks on. If you don't specify a value for IPAddress , Route 53 + // sends a DNS request to resolve the domain name that you specify in + // FullyQualifiedDomainName at the interval that you specify in RequestInterval . + // Using an IP address that is returned by DNS, Route 53 then checks the health of + // the endpoint. Use one of the following formats for the value of IPAddress : + // - IPv4 address: four values between 0 and 255, separated by periods (.), for + // example, 192.0.2.44 . + // - IPv6 address: eight groups of four hexadecimal values, separated by colons + // (:), for example, 2001:0db8:85a3:0000:0000:abcd:0001:2345 . You can also + // shorten IPv6 addresses as described in RFC 5952, for example, + // 2001:db8:85a3::abcd:1:2345 . + // If the endpoint is an EC2 instance, we recommend that you create an Elastic IP + // address, associate it with your EC2 instance, and specify the Elastic IP address + // for IPAddress . This ensures that the IP address of your instance never changes. + // For more information, see the applicable documentation: + // - Linux: Elastic IP Addresses (EIP) (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html) + // in the Amazon EC2 User Guide for Linux Instances + // - Windows: Elastic IP Addresses (EIP) (https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/elastic-ip-addresses-eip.html) + // in the Amazon EC2 User Guide for Windows Instances + // If a health check already has a value for IPAddress , you can change the value. + // However, you can't update an existing health check to add or remove the value of + // IPAddress . For more information, see FullyQualifiedDomainName (https://docs.aws.amazon.com/Route53/latest/APIReference/API_UpdateHealthCheck.html#Route53-UpdateHealthCheck-request-FullyQualifiedDomainName) + // . Constraints: Route 53 can't check the health of endpoints for which the IP + // address is in local, private, non-routable, or multicast ranges. For more + // information about IP addresses for which you can't create health checks, see the + // following documents: + // - RFC 5735, Special Use IPv4 Addresses (https://tools.ietf.org/html/rfc5735) + // - RFC 6598, IANA-Reserved IPv4 Prefix for Shared Address Space (https://tools.ietf.org/html/rfc6598) + // - RFC 5156, Special-Use IPv6 Addresses (https://tools.ietf.org/html/rfc5156) + IPAddress *string + + // When CloudWatch has insufficient data about the metric to determine the alarm + // state, the status that you want Amazon Route 53 to assign to the health check: + // - Healthy : Route 53 considers the health check to be healthy. + // - Unhealthy : Route 53 considers the health check to be unhealthy. + // - LastKnownStatus : By default, Route 53 uses the status of the health check + // from the last time CloudWatch had sufficient data to determine the alarm state. + // For new health checks that have no last known status, the status for the health + // check is healthy. + InsufficientDataHealthStatus types.InsufficientDataHealthStatus + + // Specify whether you want Amazon Route 53 to invert the status of a health + // check, for example, to consider a health check unhealthy when it otherwise would + // be considered healthy. + Inverted *bool + + // The port on the endpoint that you want Amazon Route 53 to perform health checks + // on. Don't specify a value for Port when you specify a value for Type of + // CLOUDWATCH_METRIC or CALCULATED . + Port *int32 + + // A complex type that contains one Region element for each region that you want + // Amazon Route 53 health checkers to check the specified endpoint from. + Regions []types.HealthCheckRegion + + // A complex type that contains one ResettableElementName element for each element + // that you want to reset to the default value. Valid values for + // ResettableElementName include the following: + // - ChildHealthChecks : Amazon Route 53 resets ChildHealthChecks (https://docs.aws.amazon.com/Route53/latest/APIReference/API_HealthCheckConfig.html#Route53-Type-HealthCheckConfig-ChildHealthChecks) + // to null. + // - FullyQualifiedDomainName : Route 53 resets FullyQualifiedDomainName (https://docs.aws.amazon.com/Route53/latest/APIReference/API_UpdateHealthCheck.html#Route53-UpdateHealthCheck-request-FullyQualifiedDomainName) + // . to null. + // - Regions : Route 53 resets the Regions (https://docs.aws.amazon.com/Route53/latest/APIReference/API_HealthCheckConfig.html#Route53-Type-HealthCheckConfig-Regions) + // list to the default set of regions. + // - ResourcePath : Route 53 resets ResourcePath (https://docs.aws.amazon.com/Route53/latest/APIReference/API_HealthCheckConfig.html#Route53-Type-HealthCheckConfig-ResourcePath) + // to null. + ResetElements []types.ResettableElementName + + // The path that you want Amazon Route 53 to request when performing health + // checks. The path can be any value for which your endpoint will return an HTTP + // status code of 2xx or 3xx when the endpoint is healthy, for example the file + // /docs/route53-health-check.html. You can also include query string parameters, + // for example, /welcome.html?language=jp&login=y . Specify this value only if you + // want to change it. + ResourcePath *string + + // If the value of Type is HTTP_STR_MATCH or HTTPS_STR_MATCH , the string that you + // want Amazon Route 53 to search for in the response body from the specified + // resource. If the string appears in the response body, Route 53 considers the + // resource healthy. (You can't change the value of Type when you update a health + // check.) + SearchString *string + + noSmithyDocumentSerde +} + +// A complex type that contains the response to the UpdateHealthCheck request. +type UpdateHealthCheckOutput struct { + + // A complex type that contains the response to an UpdateHealthCheck request. + // + // This member is required. + HealthCheck *types.HealthCheck + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateHealthCheckMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestxml_serializeOpUpdateHealthCheck{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpUpdateHealthCheck{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpUpdateHealthCheckValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateHealthCheck(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateHealthCheck(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "route53", + OperationName: "UpdateHealthCheck", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_UpdateHostedZoneComment.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_UpdateHostedZoneComment.go new file mode 100644 index 0000000..4ecd976 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_UpdateHostedZoneComment.go @@ -0,0 +1,137 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package route53 + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/route53/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Updates the comment for a specified hosted zone. +func (c *Client) UpdateHostedZoneComment(ctx context.Context, params *UpdateHostedZoneCommentInput, optFns ...func(*Options)) (*UpdateHostedZoneCommentOutput, error) { + if params == nil { + params = &UpdateHostedZoneCommentInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateHostedZoneComment", params, optFns, c.addOperationUpdateHostedZoneCommentMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateHostedZoneCommentOutput) + out.ResultMetadata = metadata + return out, nil +} + +// A request to update the comment for a hosted zone. +type UpdateHostedZoneCommentInput struct { + + // The ID for the hosted zone that you want to update the comment for. + // + // This member is required. + Id *string + + // The new comment for the hosted zone. If you don't specify a value for Comment , + // Amazon Route 53 deletes the existing value of the Comment element, if any. + Comment *string + + noSmithyDocumentSerde +} + +// A complex type that contains the response to the UpdateHostedZoneComment +// request. +type UpdateHostedZoneCommentOutput struct { + + // A complex type that contains the response to the UpdateHostedZoneComment + // request. + // + // This member is required. + HostedZone *types.HostedZone + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateHostedZoneCommentMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestxml_serializeOpUpdateHostedZoneComment{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpUpdateHostedZoneComment{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpUpdateHostedZoneCommentValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateHostedZoneComment(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addSanitizeURLMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateHostedZoneComment(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "route53", + OperationName: "UpdateHostedZoneComment", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_UpdateTrafficPolicyComment.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_UpdateTrafficPolicyComment.go new file mode 100644 index 0000000..2ab2902 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_UpdateTrafficPolicyComment.go @@ -0,0 +1,140 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package route53 + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/route53/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Updates the comment for a specified traffic policy version. +func (c *Client) UpdateTrafficPolicyComment(ctx context.Context, params *UpdateTrafficPolicyCommentInput, optFns ...func(*Options)) (*UpdateTrafficPolicyCommentOutput, error) { + if params == nil { + params = &UpdateTrafficPolicyCommentInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateTrafficPolicyComment", params, optFns, c.addOperationUpdateTrafficPolicyCommentMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateTrafficPolicyCommentOutput) + out.ResultMetadata = metadata + return out, nil +} + +// A complex type that contains information about the traffic policy that you want +// to update the comment for. +type UpdateTrafficPolicyCommentInput struct { + + // The new comment for the specified traffic policy and version. + // + // This member is required. + Comment *string + + // The value of Id for the traffic policy that you want to update the comment for. + // + // This member is required. + Id *string + + // The value of Version for the traffic policy that you want to update the comment + // for. + // + // This member is required. + Version *int32 + + noSmithyDocumentSerde +} + +// A complex type that contains the response information for the traffic policy. +type UpdateTrafficPolicyCommentOutput struct { + + // A complex type that contains settings for the specified traffic policy. + // + // This member is required. + TrafficPolicy *types.TrafficPolicy + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateTrafficPolicyCommentMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestxml_serializeOpUpdateTrafficPolicyComment{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpUpdateTrafficPolicyComment{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpUpdateTrafficPolicyCommentValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateTrafficPolicyComment(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateTrafficPolicyComment(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "route53", + OperationName: "UpdateTrafficPolicyComment", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_UpdateTrafficPolicyInstance.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_UpdateTrafficPolicyInstance.go new file mode 100644 index 0000000..0a2cf5f --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_UpdateTrafficPolicyInstance.go @@ -0,0 +1,161 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package route53 + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/route53/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Updates the resource record sets in a specified hosted zone that were created +// based on the settings in a specified traffic policy version. When you update a +// traffic policy instance, Amazon Route 53 continues to respond to DNS queries for +// the root resource record set name (such as example.com) while it replaces one +// group of resource record sets with another. Route 53 performs the following +// operations: +// - Route 53 creates a new group of resource record sets based on the specified +// traffic policy. This is true regardless of how significant the differences are +// between the existing resource record sets and the new resource record sets. +// - When all of the new resource record sets have been created, Route 53 starts +// to respond to DNS queries for the root resource record set name (such as +// example.com) by using the new resource record sets. +// - Route 53 deletes the old group of resource record sets that are associated +// with the root resource record set name. +func (c *Client) UpdateTrafficPolicyInstance(ctx context.Context, params *UpdateTrafficPolicyInstanceInput, optFns ...func(*Options)) (*UpdateTrafficPolicyInstanceOutput, error) { + if params == nil { + params = &UpdateTrafficPolicyInstanceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateTrafficPolicyInstance", params, optFns, c.addOperationUpdateTrafficPolicyInstanceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateTrafficPolicyInstanceOutput) + out.ResultMetadata = metadata + return out, nil +} + +// A complex type that contains information about the resource record sets that +// you want to update based on a specified traffic policy instance. +type UpdateTrafficPolicyInstanceInput struct { + + // The ID of the traffic policy instance that you want to update. + // + // This member is required. + Id *string + + // The TTL that you want Amazon Route 53 to assign to all of the updated resource + // record sets. + // + // This member is required. + TTL *int64 + + // The ID of the traffic policy that you want Amazon Route 53 to use to update + // resource record sets for the specified traffic policy instance. + // + // This member is required. + TrafficPolicyId *string + + // The version of the traffic policy that you want Amazon Route 53 to use to + // update resource record sets for the specified traffic policy instance. + // + // This member is required. + TrafficPolicyVersion *int32 + + noSmithyDocumentSerde +} + +// A complex type that contains information about the resource record sets that +// Amazon Route 53 created based on a specified traffic policy. +type UpdateTrafficPolicyInstanceOutput struct { + + // A complex type that contains settings for the updated traffic policy instance. + // + // This member is required. + TrafficPolicyInstance *types.TrafficPolicyInstance + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateTrafficPolicyInstanceMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestxml_serializeOpUpdateTrafficPolicyInstance{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpUpdateTrafficPolicyInstance{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpUpdateTrafficPolicyInstanceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateTrafficPolicyInstance(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateTrafficPolicyInstance(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "route53", + OperationName: "UpdateTrafficPolicyInstance", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/deserializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/deserializers.go new file mode 100644 index 0000000..b4af79c --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/deserializers.go @@ -0,0 +1,22379 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package route53 + +import ( + "bytes" + "context" + "encoding/xml" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + awsxml "github.com/aws/aws-sdk-go-v2/aws/protocol/xml" + "github.com/aws/aws-sdk-go-v2/service/route53/types" + smithy "github.com/aws/smithy-go" + smithyxml "github.com/aws/smithy-go/encoding/xml" + smithyio "github.com/aws/smithy-go/io" + "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/ptr" + smithytime "github.com/aws/smithy-go/time" + smithyhttp "github.com/aws/smithy-go/transport/http" + "io" + "strconv" + "strings" +) + +type awsRestxml_deserializeOpActivateKeySigningKey struct { +} + +func (*awsRestxml_deserializeOpActivateKeySigningKey) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpActivateKeySigningKey) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestxml_deserializeOpErrorActivateKeySigningKey(response, &metadata) + } + output := &ActivateKeySigningKeyOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeOpDocumentActivateKeySigningKeyOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorActivateKeySigningKey(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("ConcurrentModification", errorCode): + return awsRestxml_deserializeErrorConcurrentModification(response, errorBody) + + case strings.EqualFold("InvalidInput", errorCode): + return awsRestxml_deserializeErrorInvalidInput(response, errorBody) + + case strings.EqualFold("InvalidKMSArn", errorCode): + return awsRestxml_deserializeErrorInvalidKMSArn(response, errorBody) + + case strings.EqualFold("InvalidKeySigningKeyStatus", errorCode): + return awsRestxml_deserializeErrorInvalidKeySigningKeyStatus(response, errorBody) + + case strings.EqualFold("InvalidSigningStatus", errorCode): + return awsRestxml_deserializeErrorInvalidSigningStatus(response, errorBody) + + case strings.EqualFold("NoSuchKeySigningKey", errorCode): + return awsRestxml_deserializeErrorNoSuchKeySigningKey(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpDocumentActivateKeySigningKeyOutput(v **ActivateKeySigningKeyOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *ActivateKeySigningKeyOutput + if *v == nil { + sv = &ActivateKeySigningKeyOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("ChangeInfo", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentChangeInfo(&sv.ChangeInfo, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpAssociateVPCWithHostedZone struct { +} + +func (*awsRestxml_deserializeOpAssociateVPCWithHostedZone) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpAssociateVPCWithHostedZone) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestxml_deserializeOpErrorAssociateVPCWithHostedZone(response, &metadata) + } + output := &AssociateVPCWithHostedZoneOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeOpDocumentAssociateVPCWithHostedZoneOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorAssociateVPCWithHostedZone(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("ConflictingDomainExists", errorCode): + return awsRestxml_deserializeErrorConflictingDomainExists(response, errorBody) + + case strings.EqualFold("InvalidInput", errorCode): + return awsRestxml_deserializeErrorInvalidInput(response, errorBody) + + case strings.EqualFold("InvalidVPCId", errorCode): + return awsRestxml_deserializeErrorInvalidVPCId(response, errorBody) + + case strings.EqualFold("LimitsExceeded", errorCode): + return awsRestxml_deserializeErrorLimitsExceeded(response, errorBody) + + case strings.EqualFold("NoSuchHostedZone", errorCode): + return awsRestxml_deserializeErrorNoSuchHostedZone(response, errorBody) + + case strings.EqualFold("NotAuthorizedException", errorCode): + return awsRestxml_deserializeErrorNotAuthorizedException(response, errorBody) + + case strings.EqualFold("PriorRequestNotComplete", errorCode): + return awsRestxml_deserializeErrorPriorRequestNotComplete(response, errorBody) + + case strings.EqualFold("PublicZoneVPCAssociation", errorCode): + return awsRestxml_deserializeErrorPublicZoneVPCAssociation(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpDocumentAssociateVPCWithHostedZoneOutput(v **AssociateVPCWithHostedZoneOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *AssociateVPCWithHostedZoneOutput + if *v == nil { + sv = &AssociateVPCWithHostedZoneOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("ChangeInfo", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentChangeInfo(&sv.ChangeInfo, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpChangeCidrCollection struct { +} + +func (*awsRestxml_deserializeOpChangeCidrCollection) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpChangeCidrCollection) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestxml_deserializeOpErrorChangeCidrCollection(response, &metadata) + } + output := &ChangeCidrCollectionOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeOpDocumentChangeCidrCollectionOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorChangeCidrCollection(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("CidrBlockInUseException", errorCode): + return awsRestxml_deserializeErrorCidrBlockInUseException(response, errorBody) + + case strings.EqualFold("CidrCollectionVersionMismatchException", errorCode): + return awsRestxml_deserializeErrorCidrCollectionVersionMismatchException(response, errorBody) + + case strings.EqualFold("ConcurrentModification", errorCode): + return awsRestxml_deserializeErrorConcurrentModification(response, errorBody) + + case strings.EqualFold("InvalidInput", errorCode): + return awsRestxml_deserializeErrorInvalidInput(response, errorBody) + + case strings.EqualFold("LimitsExceeded", errorCode): + return awsRestxml_deserializeErrorLimitsExceeded(response, errorBody) + + case strings.EqualFold("NoSuchCidrCollectionException", errorCode): + return awsRestxml_deserializeErrorNoSuchCidrCollectionException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpDocumentChangeCidrCollectionOutput(v **ChangeCidrCollectionOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *ChangeCidrCollectionOutput + if *v == nil { + sv = &ChangeCidrCollectionOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Id", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Id = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpChangeResourceRecordSets struct { +} + +func (*awsRestxml_deserializeOpChangeResourceRecordSets) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpChangeResourceRecordSets) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestxml_deserializeOpErrorChangeResourceRecordSets(response, &metadata) + } + output := &ChangeResourceRecordSetsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeOpDocumentChangeResourceRecordSetsOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorChangeResourceRecordSets(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("InvalidChangeBatch", errorCode): + return awsRestxml_deserializeErrorInvalidChangeBatch(response, errorBody) + + case strings.EqualFold("InvalidInput", errorCode): + return awsRestxml_deserializeErrorInvalidInput(response, errorBody) + + case strings.EqualFold("NoSuchHealthCheck", errorCode): + return awsRestxml_deserializeErrorNoSuchHealthCheck(response, errorBody) + + case strings.EqualFold("NoSuchHostedZone", errorCode): + return awsRestxml_deserializeErrorNoSuchHostedZone(response, errorBody) + + case strings.EqualFold("PriorRequestNotComplete", errorCode): + return awsRestxml_deserializeErrorPriorRequestNotComplete(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpDocumentChangeResourceRecordSetsOutput(v **ChangeResourceRecordSetsOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *ChangeResourceRecordSetsOutput + if *v == nil { + sv = &ChangeResourceRecordSetsOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("ChangeInfo", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentChangeInfo(&sv.ChangeInfo, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpChangeTagsForResource struct { +} + +func (*awsRestxml_deserializeOpChangeTagsForResource) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpChangeTagsForResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestxml_deserializeOpErrorChangeTagsForResource(response, &metadata) + } + output := &ChangeTagsForResourceOutput{} + out.Result = output + + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorChangeTagsForResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("InvalidInput", errorCode): + return awsRestxml_deserializeErrorInvalidInput(response, errorBody) + + case strings.EqualFold("NoSuchHealthCheck", errorCode): + return awsRestxml_deserializeErrorNoSuchHealthCheck(response, errorBody) + + case strings.EqualFold("NoSuchHostedZone", errorCode): + return awsRestxml_deserializeErrorNoSuchHostedZone(response, errorBody) + + case strings.EqualFold("PriorRequestNotComplete", errorCode): + return awsRestxml_deserializeErrorPriorRequestNotComplete(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestxml_deserializeErrorThrottlingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestxml_deserializeOpCreateCidrCollection struct { +} + +func (*awsRestxml_deserializeOpCreateCidrCollection) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpCreateCidrCollection) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestxml_deserializeOpErrorCreateCidrCollection(response, &metadata) + } + output := &CreateCidrCollectionOutput{} + out.Result = output + + err = awsRestxml_deserializeOpHttpBindingsCreateCidrCollectionOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeOpDocumentCreateCidrCollectionOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorCreateCidrCollection(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("CidrCollectionAlreadyExistsException", errorCode): + return awsRestxml_deserializeErrorCidrCollectionAlreadyExistsException(response, errorBody) + + case strings.EqualFold("ConcurrentModification", errorCode): + return awsRestxml_deserializeErrorConcurrentModification(response, errorBody) + + case strings.EqualFold("InvalidInput", errorCode): + return awsRestxml_deserializeErrorInvalidInput(response, errorBody) + + case strings.EqualFold("LimitsExceeded", errorCode): + return awsRestxml_deserializeErrorLimitsExceeded(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpHttpBindingsCreateCidrCollectionOutput(v *CreateCidrCollectionOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("Location"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.Location = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestxml_deserializeOpDocumentCreateCidrCollectionOutput(v **CreateCidrCollectionOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *CreateCidrCollectionOutput + if *v == nil { + sv = &CreateCidrCollectionOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Collection", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentCidrCollection(&sv.Collection, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpCreateHealthCheck struct { +} + +func (*awsRestxml_deserializeOpCreateHealthCheck) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpCreateHealthCheck) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestxml_deserializeOpErrorCreateHealthCheck(response, &metadata) + } + output := &CreateHealthCheckOutput{} + out.Result = output + + err = awsRestxml_deserializeOpHttpBindingsCreateHealthCheckOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeOpDocumentCreateHealthCheckOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorCreateHealthCheck(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("HealthCheckAlreadyExists", errorCode): + return awsRestxml_deserializeErrorHealthCheckAlreadyExists(response, errorBody) + + case strings.EqualFold("InvalidInput", errorCode): + return awsRestxml_deserializeErrorInvalidInput(response, errorBody) + + case strings.EqualFold("TooManyHealthChecks", errorCode): + return awsRestxml_deserializeErrorTooManyHealthChecks(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpHttpBindingsCreateHealthCheckOutput(v *CreateHealthCheckOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("Location"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.Location = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestxml_deserializeOpDocumentCreateHealthCheckOutput(v **CreateHealthCheckOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *CreateHealthCheckOutput + if *v == nil { + sv = &CreateHealthCheckOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("HealthCheck", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentHealthCheck(&sv.HealthCheck, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpCreateHostedZone struct { +} + +func (*awsRestxml_deserializeOpCreateHostedZone) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpCreateHostedZone) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestxml_deserializeOpErrorCreateHostedZone(response, &metadata) + } + output := &CreateHostedZoneOutput{} + out.Result = output + + err = awsRestxml_deserializeOpHttpBindingsCreateHostedZoneOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeOpDocumentCreateHostedZoneOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorCreateHostedZone(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("ConflictingDomainExists", errorCode): + return awsRestxml_deserializeErrorConflictingDomainExists(response, errorBody) + + case strings.EqualFold("DelegationSetNotAvailable", errorCode): + return awsRestxml_deserializeErrorDelegationSetNotAvailable(response, errorBody) + + case strings.EqualFold("DelegationSetNotReusable", errorCode): + return awsRestxml_deserializeErrorDelegationSetNotReusable(response, errorBody) + + case strings.EqualFold("HostedZoneAlreadyExists", errorCode): + return awsRestxml_deserializeErrorHostedZoneAlreadyExists(response, errorBody) + + case strings.EqualFold("InvalidDomainName", errorCode): + return awsRestxml_deserializeErrorInvalidDomainName(response, errorBody) + + case strings.EqualFold("InvalidInput", errorCode): + return awsRestxml_deserializeErrorInvalidInput(response, errorBody) + + case strings.EqualFold("InvalidVPCId", errorCode): + return awsRestxml_deserializeErrorInvalidVPCId(response, errorBody) + + case strings.EqualFold("NoSuchDelegationSet", errorCode): + return awsRestxml_deserializeErrorNoSuchDelegationSet(response, errorBody) + + case strings.EqualFold("TooManyHostedZones", errorCode): + return awsRestxml_deserializeErrorTooManyHostedZones(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpHttpBindingsCreateHostedZoneOutput(v *CreateHostedZoneOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("Location"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.Location = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestxml_deserializeOpDocumentCreateHostedZoneOutput(v **CreateHostedZoneOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *CreateHostedZoneOutput + if *v == nil { + sv = &CreateHostedZoneOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("ChangeInfo", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentChangeInfo(&sv.ChangeInfo, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("DelegationSet", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentDelegationSet(&sv.DelegationSet, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("HostedZone", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentHostedZone(&sv.HostedZone, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("VPC", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentVPC(&sv.VPC, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpCreateKeySigningKey struct { +} + +func (*awsRestxml_deserializeOpCreateKeySigningKey) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpCreateKeySigningKey) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestxml_deserializeOpErrorCreateKeySigningKey(response, &metadata) + } + output := &CreateKeySigningKeyOutput{} + out.Result = output + + err = awsRestxml_deserializeOpHttpBindingsCreateKeySigningKeyOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeOpDocumentCreateKeySigningKeyOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorCreateKeySigningKey(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("ConcurrentModification", errorCode): + return awsRestxml_deserializeErrorConcurrentModification(response, errorBody) + + case strings.EqualFold("InvalidArgument", errorCode): + return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) + + case strings.EqualFold("InvalidInput", errorCode): + return awsRestxml_deserializeErrorInvalidInput(response, errorBody) + + case strings.EqualFold("InvalidKMSArn", errorCode): + return awsRestxml_deserializeErrorInvalidKMSArn(response, errorBody) + + case strings.EqualFold("InvalidKeySigningKeyName", errorCode): + return awsRestxml_deserializeErrorInvalidKeySigningKeyName(response, errorBody) + + case strings.EqualFold("InvalidKeySigningKeyStatus", errorCode): + return awsRestxml_deserializeErrorInvalidKeySigningKeyStatus(response, errorBody) + + case strings.EqualFold("InvalidSigningStatus", errorCode): + return awsRestxml_deserializeErrorInvalidSigningStatus(response, errorBody) + + case strings.EqualFold("KeySigningKeyAlreadyExists", errorCode): + return awsRestxml_deserializeErrorKeySigningKeyAlreadyExists(response, errorBody) + + case strings.EqualFold("NoSuchHostedZone", errorCode): + return awsRestxml_deserializeErrorNoSuchHostedZone(response, errorBody) + + case strings.EqualFold("TooManyKeySigningKeys", errorCode): + return awsRestxml_deserializeErrorTooManyKeySigningKeys(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpHttpBindingsCreateKeySigningKeyOutput(v *CreateKeySigningKeyOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("Location"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.Location = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestxml_deserializeOpDocumentCreateKeySigningKeyOutput(v **CreateKeySigningKeyOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *CreateKeySigningKeyOutput + if *v == nil { + sv = &CreateKeySigningKeyOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("ChangeInfo", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentChangeInfo(&sv.ChangeInfo, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("KeySigningKey", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentKeySigningKey(&sv.KeySigningKey, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpCreateQueryLoggingConfig struct { +} + +func (*awsRestxml_deserializeOpCreateQueryLoggingConfig) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpCreateQueryLoggingConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestxml_deserializeOpErrorCreateQueryLoggingConfig(response, &metadata) + } + output := &CreateQueryLoggingConfigOutput{} + out.Result = output + + err = awsRestxml_deserializeOpHttpBindingsCreateQueryLoggingConfigOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeOpDocumentCreateQueryLoggingConfigOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorCreateQueryLoggingConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("ConcurrentModification", errorCode): + return awsRestxml_deserializeErrorConcurrentModification(response, errorBody) + + case strings.EqualFold("InsufficientCloudWatchLogsResourcePolicy", errorCode): + return awsRestxml_deserializeErrorInsufficientCloudWatchLogsResourcePolicy(response, errorBody) + + case strings.EqualFold("InvalidInput", errorCode): + return awsRestxml_deserializeErrorInvalidInput(response, errorBody) + + case strings.EqualFold("NoSuchCloudWatchLogsLogGroup", errorCode): + return awsRestxml_deserializeErrorNoSuchCloudWatchLogsLogGroup(response, errorBody) + + case strings.EqualFold("NoSuchHostedZone", errorCode): + return awsRestxml_deserializeErrorNoSuchHostedZone(response, errorBody) + + case strings.EqualFold("QueryLoggingConfigAlreadyExists", errorCode): + return awsRestxml_deserializeErrorQueryLoggingConfigAlreadyExists(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpHttpBindingsCreateQueryLoggingConfigOutput(v *CreateQueryLoggingConfigOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("Location"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.Location = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestxml_deserializeOpDocumentCreateQueryLoggingConfigOutput(v **CreateQueryLoggingConfigOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *CreateQueryLoggingConfigOutput + if *v == nil { + sv = &CreateQueryLoggingConfigOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("QueryLoggingConfig", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentQueryLoggingConfig(&sv.QueryLoggingConfig, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpCreateReusableDelegationSet struct { +} + +func (*awsRestxml_deserializeOpCreateReusableDelegationSet) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpCreateReusableDelegationSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestxml_deserializeOpErrorCreateReusableDelegationSet(response, &metadata) + } + output := &CreateReusableDelegationSetOutput{} + out.Result = output + + err = awsRestxml_deserializeOpHttpBindingsCreateReusableDelegationSetOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeOpDocumentCreateReusableDelegationSetOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorCreateReusableDelegationSet(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("DelegationSetAlreadyCreated", errorCode): + return awsRestxml_deserializeErrorDelegationSetAlreadyCreated(response, errorBody) + + case strings.EqualFold("DelegationSetAlreadyReusable", errorCode): + return awsRestxml_deserializeErrorDelegationSetAlreadyReusable(response, errorBody) + + case strings.EqualFold("DelegationSetNotAvailable", errorCode): + return awsRestxml_deserializeErrorDelegationSetNotAvailable(response, errorBody) + + case strings.EqualFold("HostedZoneNotFound", errorCode): + return awsRestxml_deserializeErrorHostedZoneNotFound(response, errorBody) + + case strings.EqualFold("InvalidArgument", errorCode): + return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) + + case strings.EqualFold("InvalidInput", errorCode): + return awsRestxml_deserializeErrorInvalidInput(response, errorBody) + + case strings.EqualFold("LimitsExceeded", errorCode): + return awsRestxml_deserializeErrorLimitsExceeded(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpHttpBindingsCreateReusableDelegationSetOutput(v *CreateReusableDelegationSetOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("Location"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.Location = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestxml_deserializeOpDocumentCreateReusableDelegationSetOutput(v **CreateReusableDelegationSetOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *CreateReusableDelegationSetOutput + if *v == nil { + sv = &CreateReusableDelegationSetOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("DelegationSet", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentDelegationSet(&sv.DelegationSet, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpCreateTrafficPolicy struct { +} + +func (*awsRestxml_deserializeOpCreateTrafficPolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpCreateTrafficPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestxml_deserializeOpErrorCreateTrafficPolicy(response, &metadata) + } + output := &CreateTrafficPolicyOutput{} + out.Result = output + + err = awsRestxml_deserializeOpHttpBindingsCreateTrafficPolicyOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeOpDocumentCreateTrafficPolicyOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorCreateTrafficPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("InvalidInput", errorCode): + return awsRestxml_deserializeErrorInvalidInput(response, errorBody) + + case strings.EqualFold("InvalidTrafficPolicyDocument", errorCode): + return awsRestxml_deserializeErrorInvalidTrafficPolicyDocument(response, errorBody) + + case strings.EqualFold("TooManyTrafficPolicies", errorCode): + return awsRestxml_deserializeErrorTooManyTrafficPolicies(response, errorBody) + + case strings.EqualFold("TrafficPolicyAlreadyExists", errorCode): + return awsRestxml_deserializeErrorTrafficPolicyAlreadyExists(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpHttpBindingsCreateTrafficPolicyOutput(v *CreateTrafficPolicyOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("Location"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.Location = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestxml_deserializeOpDocumentCreateTrafficPolicyOutput(v **CreateTrafficPolicyOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *CreateTrafficPolicyOutput + if *v == nil { + sv = &CreateTrafficPolicyOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("TrafficPolicy", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentTrafficPolicy(&sv.TrafficPolicy, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpCreateTrafficPolicyInstance struct { +} + +func (*awsRestxml_deserializeOpCreateTrafficPolicyInstance) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpCreateTrafficPolicyInstance) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestxml_deserializeOpErrorCreateTrafficPolicyInstance(response, &metadata) + } + output := &CreateTrafficPolicyInstanceOutput{} + out.Result = output + + err = awsRestxml_deserializeOpHttpBindingsCreateTrafficPolicyInstanceOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeOpDocumentCreateTrafficPolicyInstanceOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorCreateTrafficPolicyInstance(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("InvalidInput", errorCode): + return awsRestxml_deserializeErrorInvalidInput(response, errorBody) + + case strings.EqualFold("NoSuchHostedZone", errorCode): + return awsRestxml_deserializeErrorNoSuchHostedZone(response, errorBody) + + case strings.EqualFold("NoSuchTrafficPolicy", errorCode): + return awsRestxml_deserializeErrorNoSuchTrafficPolicy(response, errorBody) + + case strings.EqualFold("TooManyTrafficPolicyInstances", errorCode): + return awsRestxml_deserializeErrorTooManyTrafficPolicyInstances(response, errorBody) + + case strings.EqualFold("TrafficPolicyInstanceAlreadyExists", errorCode): + return awsRestxml_deserializeErrorTrafficPolicyInstanceAlreadyExists(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpHttpBindingsCreateTrafficPolicyInstanceOutput(v *CreateTrafficPolicyInstanceOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("Location"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.Location = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestxml_deserializeOpDocumentCreateTrafficPolicyInstanceOutput(v **CreateTrafficPolicyInstanceOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *CreateTrafficPolicyInstanceOutput + if *v == nil { + sv = &CreateTrafficPolicyInstanceOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("TrafficPolicyInstance", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentTrafficPolicyInstance(&sv.TrafficPolicyInstance, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpCreateTrafficPolicyVersion struct { +} + +func (*awsRestxml_deserializeOpCreateTrafficPolicyVersion) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpCreateTrafficPolicyVersion) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestxml_deserializeOpErrorCreateTrafficPolicyVersion(response, &metadata) + } + output := &CreateTrafficPolicyVersionOutput{} + out.Result = output + + err = awsRestxml_deserializeOpHttpBindingsCreateTrafficPolicyVersionOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeOpDocumentCreateTrafficPolicyVersionOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorCreateTrafficPolicyVersion(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("ConcurrentModification", errorCode): + return awsRestxml_deserializeErrorConcurrentModification(response, errorBody) + + case strings.EqualFold("InvalidInput", errorCode): + return awsRestxml_deserializeErrorInvalidInput(response, errorBody) + + case strings.EqualFold("InvalidTrafficPolicyDocument", errorCode): + return awsRestxml_deserializeErrorInvalidTrafficPolicyDocument(response, errorBody) + + case strings.EqualFold("NoSuchTrafficPolicy", errorCode): + return awsRestxml_deserializeErrorNoSuchTrafficPolicy(response, errorBody) + + case strings.EqualFold("TooManyTrafficPolicyVersionsForCurrentPolicy", errorCode): + return awsRestxml_deserializeErrorTooManyTrafficPolicyVersionsForCurrentPolicy(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpHttpBindingsCreateTrafficPolicyVersionOutput(v *CreateTrafficPolicyVersionOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("Location"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.Location = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestxml_deserializeOpDocumentCreateTrafficPolicyVersionOutput(v **CreateTrafficPolicyVersionOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *CreateTrafficPolicyVersionOutput + if *v == nil { + sv = &CreateTrafficPolicyVersionOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("TrafficPolicy", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentTrafficPolicy(&sv.TrafficPolicy, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpCreateVPCAssociationAuthorization struct { +} + +func (*awsRestxml_deserializeOpCreateVPCAssociationAuthorization) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpCreateVPCAssociationAuthorization) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestxml_deserializeOpErrorCreateVPCAssociationAuthorization(response, &metadata) + } + output := &CreateVPCAssociationAuthorizationOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeOpDocumentCreateVPCAssociationAuthorizationOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorCreateVPCAssociationAuthorization(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("ConcurrentModification", errorCode): + return awsRestxml_deserializeErrorConcurrentModification(response, errorBody) + + case strings.EqualFold("InvalidInput", errorCode): + return awsRestxml_deserializeErrorInvalidInput(response, errorBody) + + case strings.EqualFold("InvalidVPCId", errorCode): + return awsRestxml_deserializeErrorInvalidVPCId(response, errorBody) + + case strings.EqualFold("NoSuchHostedZone", errorCode): + return awsRestxml_deserializeErrorNoSuchHostedZone(response, errorBody) + + case strings.EqualFold("TooManyVPCAssociationAuthorizations", errorCode): + return awsRestxml_deserializeErrorTooManyVPCAssociationAuthorizations(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpDocumentCreateVPCAssociationAuthorizationOutput(v **CreateVPCAssociationAuthorizationOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *CreateVPCAssociationAuthorizationOutput + if *v == nil { + sv = &CreateVPCAssociationAuthorizationOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("HostedZoneId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.HostedZoneId = ptr.String(xtv) + } + + case strings.EqualFold("VPC", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentVPC(&sv.VPC, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpDeactivateKeySigningKey struct { +} + +func (*awsRestxml_deserializeOpDeactivateKeySigningKey) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpDeactivateKeySigningKey) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestxml_deserializeOpErrorDeactivateKeySigningKey(response, &metadata) + } + output := &DeactivateKeySigningKeyOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeOpDocumentDeactivateKeySigningKeyOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorDeactivateKeySigningKey(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("ConcurrentModification", errorCode): + return awsRestxml_deserializeErrorConcurrentModification(response, errorBody) + + case strings.EqualFold("InvalidInput", errorCode): + return awsRestxml_deserializeErrorInvalidInput(response, errorBody) + + case strings.EqualFold("InvalidKeySigningKeyStatus", errorCode): + return awsRestxml_deserializeErrorInvalidKeySigningKeyStatus(response, errorBody) + + case strings.EqualFold("InvalidSigningStatus", errorCode): + return awsRestxml_deserializeErrorInvalidSigningStatus(response, errorBody) + + case strings.EqualFold("KeySigningKeyInParentDSRecord", errorCode): + return awsRestxml_deserializeErrorKeySigningKeyInParentDSRecord(response, errorBody) + + case strings.EqualFold("KeySigningKeyInUse", errorCode): + return awsRestxml_deserializeErrorKeySigningKeyInUse(response, errorBody) + + case strings.EqualFold("NoSuchKeySigningKey", errorCode): + return awsRestxml_deserializeErrorNoSuchKeySigningKey(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpDocumentDeactivateKeySigningKeyOutput(v **DeactivateKeySigningKeyOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *DeactivateKeySigningKeyOutput + if *v == nil { + sv = &DeactivateKeySigningKeyOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("ChangeInfo", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentChangeInfo(&sv.ChangeInfo, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpDeleteCidrCollection struct { +} + +func (*awsRestxml_deserializeOpDeleteCidrCollection) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpDeleteCidrCollection) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestxml_deserializeOpErrorDeleteCidrCollection(response, &metadata) + } + output := &DeleteCidrCollectionOutput{} + out.Result = output + + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorDeleteCidrCollection(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("CidrCollectionInUseException", errorCode): + return awsRestxml_deserializeErrorCidrCollectionInUseException(response, errorBody) + + case strings.EqualFold("ConcurrentModification", errorCode): + return awsRestxml_deserializeErrorConcurrentModification(response, errorBody) + + case strings.EqualFold("InvalidInput", errorCode): + return awsRestxml_deserializeErrorInvalidInput(response, errorBody) + + case strings.EqualFold("NoSuchCidrCollectionException", errorCode): + return awsRestxml_deserializeErrorNoSuchCidrCollectionException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestxml_deserializeOpDeleteHealthCheck struct { +} + +func (*awsRestxml_deserializeOpDeleteHealthCheck) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpDeleteHealthCheck) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestxml_deserializeOpErrorDeleteHealthCheck(response, &metadata) + } + output := &DeleteHealthCheckOutput{} + out.Result = output + + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorDeleteHealthCheck(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("HealthCheckInUse", errorCode): + return awsRestxml_deserializeErrorHealthCheckInUse(response, errorBody) + + case strings.EqualFold("InvalidInput", errorCode): + return awsRestxml_deserializeErrorInvalidInput(response, errorBody) + + case strings.EqualFold("NoSuchHealthCheck", errorCode): + return awsRestxml_deserializeErrorNoSuchHealthCheck(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestxml_deserializeOpDeleteHostedZone struct { +} + +func (*awsRestxml_deserializeOpDeleteHostedZone) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpDeleteHostedZone) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestxml_deserializeOpErrorDeleteHostedZone(response, &metadata) + } + output := &DeleteHostedZoneOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeOpDocumentDeleteHostedZoneOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorDeleteHostedZone(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("HostedZoneNotEmpty", errorCode): + return awsRestxml_deserializeErrorHostedZoneNotEmpty(response, errorBody) + + case strings.EqualFold("InvalidDomainName", errorCode): + return awsRestxml_deserializeErrorInvalidDomainName(response, errorBody) + + case strings.EqualFold("InvalidInput", errorCode): + return awsRestxml_deserializeErrorInvalidInput(response, errorBody) + + case strings.EqualFold("NoSuchHostedZone", errorCode): + return awsRestxml_deserializeErrorNoSuchHostedZone(response, errorBody) + + case strings.EqualFold("PriorRequestNotComplete", errorCode): + return awsRestxml_deserializeErrorPriorRequestNotComplete(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpDocumentDeleteHostedZoneOutput(v **DeleteHostedZoneOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *DeleteHostedZoneOutput + if *v == nil { + sv = &DeleteHostedZoneOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("ChangeInfo", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentChangeInfo(&sv.ChangeInfo, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpDeleteKeySigningKey struct { +} + +func (*awsRestxml_deserializeOpDeleteKeySigningKey) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpDeleteKeySigningKey) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestxml_deserializeOpErrorDeleteKeySigningKey(response, &metadata) + } + output := &DeleteKeySigningKeyOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeOpDocumentDeleteKeySigningKeyOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorDeleteKeySigningKey(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("ConcurrentModification", errorCode): + return awsRestxml_deserializeErrorConcurrentModification(response, errorBody) + + case strings.EqualFold("InvalidInput", errorCode): + return awsRestxml_deserializeErrorInvalidInput(response, errorBody) + + case strings.EqualFold("InvalidKMSArn", errorCode): + return awsRestxml_deserializeErrorInvalidKMSArn(response, errorBody) + + case strings.EqualFold("InvalidKeySigningKeyStatus", errorCode): + return awsRestxml_deserializeErrorInvalidKeySigningKeyStatus(response, errorBody) + + case strings.EqualFold("InvalidSigningStatus", errorCode): + return awsRestxml_deserializeErrorInvalidSigningStatus(response, errorBody) + + case strings.EqualFold("NoSuchKeySigningKey", errorCode): + return awsRestxml_deserializeErrorNoSuchKeySigningKey(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpDocumentDeleteKeySigningKeyOutput(v **DeleteKeySigningKeyOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *DeleteKeySigningKeyOutput + if *v == nil { + sv = &DeleteKeySigningKeyOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("ChangeInfo", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentChangeInfo(&sv.ChangeInfo, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpDeleteQueryLoggingConfig struct { +} + +func (*awsRestxml_deserializeOpDeleteQueryLoggingConfig) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpDeleteQueryLoggingConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestxml_deserializeOpErrorDeleteQueryLoggingConfig(response, &metadata) + } + output := &DeleteQueryLoggingConfigOutput{} + out.Result = output + + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorDeleteQueryLoggingConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("ConcurrentModification", errorCode): + return awsRestxml_deserializeErrorConcurrentModification(response, errorBody) + + case strings.EqualFold("InvalidInput", errorCode): + return awsRestxml_deserializeErrorInvalidInput(response, errorBody) + + case strings.EqualFold("NoSuchQueryLoggingConfig", errorCode): + return awsRestxml_deserializeErrorNoSuchQueryLoggingConfig(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestxml_deserializeOpDeleteReusableDelegationSet struct { +} + +func (*awsRestxml_deserializeOpDeleteReusableDelegationSet) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpDeleteReusableDelegationSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestxml_deserializeOpErrorDeleteReusableDelegationSet(response, &metadata) + } + output := &DeleteReusableDelegationSetOutput{} + out.Result = output + + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorDeleteReusableDelegationSet(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("DelegationSetInUse", errorCode): + return awsRestxml_deserializeErrorDelegationSetInUse(response, errorBody) + + case strings.EqualFold("DelegationSetNotReusable", errorCode): + return awsRestxml_deserializeErrorDelegationSetNotReusable(response, errorBody) + + case strings.EqualFold("InvalidInput", errorCode): + return awsRestxml_deserializeErrorInvalidInput(response, errorBody) + + case strings.EqualFold("NoSuchDelegationSet", errorCode): + return awsRestxml_deserializeErrorNoSuchDelegationSet(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestxml_deserializeOpDeleteTrafficPolicy struct { +} + +func (*awsRestxml_deserializeOpDeleteTrafficPolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpDeleteTrafficPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestxml_deserializeOpErrorDeleteTrafficPolicy(response, &metadata) + } + output := &DeleteTrafficPolicyOutput{} + out.Result = output + + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorDeleteTrafficPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("ConcurrentModification", errorCode): + return awsRestxml_deserializeErrorConcurrentModification(response, errorBody) + + case strings.EqualFold("InvalidInput", errorCode): + return awsRestxml_deserializeErrorInvalidInput(response, errorBody) + + case strings.EqualFold("NoSuchTrafficPolicy", errorCode): + return awsRestxml_deserializeErrorNoSuchTrafficPolicy(response, errorBody) + + case strings.EqualFold("TrafficPolicyInUse", errorCode): + return awsRestxml_deserializeErrorTrafficPolicyInUse(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestxml_deserializeOpDeleteTrafficPolicyInstance struct { +} + +func (*awsRestxml_deserializeOpDeleteTrafficPolicyInstance) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpDeleteTrafficPolicyInstance) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestxml_deserializeOpErrorDeleteTrafficPolicyInstance(response, &metadata) + } + output := &DeleteTrafficPolicyInstanceOutput{} + out.Result = output + + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorDeleteTrafficPolicyInstance(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("InvalidInput", errorCode): + return awsRestxml_deserializeErrorInvalidInput(response, errorBody) + + case strings.EqualFold("NoSuchTrafficPolicyInstance", errorCode): + return awsRestxml_deserializeErrorNoSuchTrafficPolicyInstance(response, errorBody) + + case strings.EqualFold("PriorRequestNotComplete", errorCode): + return awsRestxml_deserializeErrorPriorRequestNotComplete(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestxml_deserializeOpDeleteVPCAssociationAuthorization struct { +} + +func (*awsRestxml_deserializeOpDeleteVPCAssociationAuthorization) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpDeleteVPCAssociationAuthorization) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestxml_deserializeOpErrorDeleteVPCAssociationAuthorization(response, &metadata) + } + output := &DeleteVPCAssociationAuthorizationOutput{} + out.Result = output + + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorDeleteVPCAssociationAuthorization(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("ConcurrentModification", errorCode): + return awsRestxml_deserializeErrorConcurrentModification(response, errorBody) + + case strings.EqualFold("InvalidInput", errorCode): + return awsRestxml_deserializeErrorInvalidInput(response, errorBody) + + case strings.EqualFold("InvalidVPCId", errorCode): + return awsRestxml_deserializeErrorInvalidVPCId(response, errorBody) + + case strings.EqualFold("NoSuchHostedZone", errorCode): + return awsRestxml_deserializeErrorNoSuchHostedZone(response, errorBody) + + case strings.EqualFold("VPCAssociationAuthorizationNotFound", errorCode): + return awsRestxml_deserializeErrorVPCAssociationAuthorizationNotFound(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestxml_deserializeOpDisableHostedZoneDNSSEC struct { +} + +func (*awsRestxml_deserializeOpDisableHostedZoneDNSSEC) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpDisableHostedZoneDNSSEC) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestxml_deserializeOpErrorDisableHostedZoneDNSSEC(response, &metadata) + } + output := &DisableHostedZoneDNSSECOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeOpDocumentDisableHostedZoneDNSSECOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorDisableHostedZoneDNSSEC(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("ConcurrentModification", errorCode): + return awsRestxml_deserializeErrorConcurrentModification(response, errorBody) + + case strings.EqualFold("DNSSECNotFound", errorCode): + return awsRestxml_deserializeErrorDNSSECNotFound(response, errorBody) + + case strings.EqualFold("InvalidArgument", errorCode): + return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) + + case strings.EqualFold("InvalidInput", errorCode): + return awsRestxml_deserializeErrorInvalidInput(response, errorBody) + + case strings.EqualFold("InvalidKMSArn", errorCode): + return awsRestxml_deserializeErrorInvalidKMSArn(response, errorBody) + + case strings.EqualFold("InvalidKeySigningKeyStatus", errorCode): + return awsRestxml_deserializeErrorInvalidKeySigningKeyStatus(response, errorBody) + + case strings.EqualFold("KeySigningKeyInParentDSRecord", errorCode): + return awsRestxml_deserializeErrorKeySigningKeyInParentDSRecord(response, errorBody) + + case strings.EqualFold("NoSuchHostedZone", errorCode): + return awsRestxml_deserializeErrorNoSuchHostedZone(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpDocumentDisableHostedZoneDNSSECOutput(v **DisableHostedZoneDNSSECOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *DisableHostedZoneDNSSECOutput + if *v == nil { + sv = &DisableHostedZoneDNSSECOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("ChangeInfo", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentChangeInfo(&sv.ChangeInfo, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpDisassociateVPCFromHostedZone struct { +} + +func (*awsRestxml_deserializeOpDisassociateVPCFromHostedZone) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpDisassociateVPCFromHostedZone) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestxml_deserializeOpErrorDisassociateVPCFromHostedZone(response, &metadata) + } + output := &DisassociateVPCFromHostedZoneOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeOpDocumentDisassociateVPCFromHostedZoneOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorDisassociateVPCFromHostedZone(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("InvalidInput", errorCode): + return awsRestxml_deserializeErrorInvalidInput(response, errorBody) + + case strings.EqualFold("InvalidVPCId", errorCode): + return awsRestxml_deserializeErrorInvalidVPCId(response, errorBody) + + case strings.EqualFold("LastVPCAssociation", errorCode): + return awsRestxml_deserializeErrorLastVPCAssociation(response, errorBody) + + case strings.EqualFold("NoSuchHostedZone", errorCode): + return awsRestxml_deserializeErrorNoSuchHostedZone(response, errorBody) + + case strings.EqualFold("VPCAssociationNotFound", errorCode): + return awsRestxml_deserializeErrorVPCAssociationNotFound(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpDocumentDisassociateVPCFromHostedZoneOutput(v **DisassociateVPCFromHostedZoneOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *DisassociateVPCFromHostedZoneOutput + if *v == nil { + sv = &DisassociateVPCFromHostedZoneOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("ChangeInfo", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentChangeInfo(&sv.ChangeInfo, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpEnableHostedZoneDNSSEC struct { +} + +func (*awsRestxml_deserializeOpEnableHostedZoneDNSSEC) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpEnableHostedZoneDNSSEC) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestxml_deserializeOpErrorEnableHostedZoneDNSSEC(response, &metadata) + } + output := &EnableHostedZoneDNSSECOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeOpDocumentEnableHostedZoneDNSSECOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorEnableHostedZoneDNSSEC(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("ConcurrentModification", errorCode): + return awsRestxml_deserializeErrorConcurrentModification(response, errorBody) + + case strings.EqualFold("DNSSECNotFound", errorCode): + return awsRestxml_deserializeErrorDNSSECNotFound(response, errorBody) + + case strings.EqualFold("HostedZonePartiallyDelegated", errorCode): + return awsRestxml_deserializeErrorHostedZonePartiallyDelegated(response, errorBody) + + case strings.EqualFold("InvalidArgument", errorCode): + return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) + + case strings.EqualFold("InvalidInput", errorCode): + return awsRestxml_deserializeErrorInvalidInput(response, errorBody) + + case strings.EqualFold("InvalidKMSArn", errorCode): + return awsRestxml_deserializeErrorInvalidKMSArn(response, errorBody) + + case strings.EqualFold("InvalidKeySigningKeyStatus", errorCode): + return awsRestxml_deserializeErrorInvalidKeySigningKeyStatus(response, errorBody) + + case strings.EqualFold("KeySigningKeyWithActiveStatusNotFound", errorCode): + return awsRestxml_deserializeErrorKeySigningKeyWithActiveStatusNotFound(response, errorBody) + + case strings.EqualFold("NoSuchHostedZone", errorCode): + return awsRestxml_deserializeErrorNoSuchHostedZone(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpDocumentEnableHostedZoneDNSSECOutput(v **EnableHostedZoneDNSSECOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *EnableHostedZoneDNSSECOutput + if *v == nil { + sv = &EnableHostedZoneDNSSECOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("ChangeInfo", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentChangeInfo(&sv.ChangeInfo, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpGetAccountLimit struct { +} + +func (*awsRestxml_deserializeOpGetAccountLimit) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpGetAccountLimit) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestxml_deserializeOpErrorGetAccountLimit(response, &metadata) + } + output := &GetAccountLimitOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeOpDocumentGetAccountLimitOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorGetAccountLimit(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("InvalidInput", errorCode): + return awsRestxml_deserializeErrorInvalidInput(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpDocumentGetAccountLimitOutput(v **GetAccountLimitOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *GetAccountLimitOutput + if *v == nil { + sv = &GetAccountLimitOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Count", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.Count = i64 + } + + case strings.EqualFold("Limit", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentAccountLimit(&sv.Limit, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpGetChange struct { +} + +func (*awsRestxml_deserializeOpGetChange) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpGetChange) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestxml_deserializeOpErrorGetChange(response, &metadata) + } + output := &GetChangeOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeOpDocumentGetChangeOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorGetChange(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("InvalidInput", errorCode): + return awsRestxml_deserializeErrorInvalidInput(response, errorBody) + + case strings.EqualFold("NoSuchChange", errorCode): + return awsRestxml_deserializeErrorNoSuchChange(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpDocumentGetChangeOutput(v **GetChangeOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *GetChangeOutput + if *v == nil { + sv = &GetChangeOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("ChangeInfo", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentChangeInfo(&sv.ChangeInfo, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpGetCheckerIpRanges struct { +} + +func (*awsRestxml_deserializeOpGetCheckerIpRanges) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpGetCheckerIpRanges) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestxml_deserializeOpErrorGetCheckerIpRanges(response, &metadata) + } + output := &GetCheckerIpRangesOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeOpDocumentGetCheckerIpRangesOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorGetCheckerIpRanges(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpDocumentGetCheckerIpRangesOutput(v **GetCheckerIpRangesOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *GetCheckerIpRangesOutput + if *v == nil { + sv = &GetCheckerIpRangesOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("CheckerIpRanges", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentCheckerIpRanges(&sv.CheckerIpRanges, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpGetDNSSEC struct { +} + +func (*awsRestxml_deserializeOpGetDNSSEC) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpGetDNSSEC) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestxml_deserializeOpErrorGetDNSSEC(response, &metadata) + } + output := &GetDNSSECOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeOpDocumentGetDNSSECOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorGetDNSSEC(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("InvalidArgument", errorCode): + return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) + + case strings.EqualFold("InvalidInput", errorCode): + return awsRestxml_deserializeErrorInvalidInput(response, errorBody) + + case strings.EqualFold("NoSuchHostedZone", errorCode): + return awsRestxml_deserializeErrorNoSuchHostedZone(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpDocumentGetDNSSECOutput(v **GetDNSSECOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *GetDNSSECOutput + if *v == nil { + sv = &GetDNSSECOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("KeySigningKeys", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentKeySigningKeys(&sv.KeySigningKeys, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Status", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentDNSSECStatus(&sv.Status, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpGetGeoLocation struct { +} + +func (*awsRestxml_deserializeOpGetGeoLocation) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpGetGeoLocation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestxml_deserializeOpErrorGetGeoLocation(response, &metadata) + } + output := &GetGeoLocationOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeOpDocumentGetGeoLocationOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorGetGeoLocation(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("InvalidInput", errorCode): + return awsRestxml_deserializeErrorInvalidInput(response, errorBody) + + case strings.EqualFold("NoSuchGeoLocation", errorCode): + return awsRestxml_deserializeErrorNoSuchGeoLocation(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpDocumentGetGeoLocationOutput(v **GetGeoLocationOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *GetGeoLocationOutput + if *v == nil { + sv = &GetGeoLocationOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("GeoLocationDetails", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentGeoLocationDetails(&sv.GeoLocationDetails, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpGetHealthCheck struct { +} + +func (*awsRestxml_deserializeOpGetHealthCheck) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpGetHealthCheck) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestxml_deserializeOpErrorGetHealthCheck(response, &metadata) + } + output := &GetHealthCheckOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeOpDocumentGetHealthCheckOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorGetHealthCheck(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("IncompatibleVersion", errorCode): + return awsRestxml_deserializeErrorIncompatibleVersion(response, errorBody) + + case strings.EqualFold("InvalidInput", errorCode): + return awsRestxml_deserializeErrorInvalidInput(response, errorBody) + + case strings.EqualFold("NoSuchHealthCheck", errorCode): + return awsRestxml_deserializeErrorNoSuchHealthCheck(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpDocumentGetHealthCheckOutput(v **GetHealthCheckOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *GetHealthCheckOutput + if *v == nil { + sv = &GetHealthCheckOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("HealthCheck", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentHealthCheck(&sv.HealthCheck, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpGetHealthCheckCount struct { +} + +func (*awsRestxml_deserializeOpGetHealthCheckCount) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpGetHealthCheckCount) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestxml_deserializeOpErrorGetHealthCheckCount(response, &metadata) + } + output := &GetHealthCheckCountOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeOpDocumentGetHealthCheckCountOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorGetHealthCheckCount(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpDocumentGetHealthCheckCountOutput(v **GetHealthCheckCountOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *GetHealthCheckCountOutput + if *v == nil { + sv = &GetHealthCheckCountOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("HealthCheckCount", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.HealthCheckCount = ptr.Int64(i64) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpGetHealthCheckLastFailureReason struct { +} + +func (*awsRestxml_deserializeOpGetHealthCheckLastFailureReason) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpGetHealthCheckLastFailureReason) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestxml_deserializeOpErrorGetHealthCheckLastFailureReason(response, &metadata) + } + output := &GetHealthCheckLastFailureReasonOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeOpDocumentGetHealthCheckLastFailureReasonOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorGetHealthCheckLastFailureReason(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("InvalidInput", errorCode): + return awsRestxml_deserializeErrorInvalidInput(response, errorBody) + + case strings.EqualFold("NoSuchHealthCheck", errorCode): + return awsRestxml_deserializeErrorNoSuchHealthCheck(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpDocumentGetHealthCheckLastFailureReasonOutput(v **GetHealthCheckLastFailureReasonOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *GetHealthCheckLastFailureReasonOutput + if *v == nil { + sv = &GetHealthCheckLastFailureReasonOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("HealthCheckObservations", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentHealthCheckObservations(&sv.HealthCheckObservations, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpGetHealthCheckStatus struct { +} + +func (*awsRestxml_deserializeOpGetHealthCheckStatus) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpGetHealthCheckStatus) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestxml_deserializeOpErrorGetHealthCheckStatus(response, &metadata) + } + output := &GetHealthCheckStatusOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeOpDocumentGetHealthCheckStatusOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorGetHealthCheckStatus(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("InvalidInput", errorCode): + return awsRestxml_deserializeErrorInvalidInput(response, errorBody) + + case strings.EqualFold("NoSuchHealthCheck", errorCode): + return awsRestxml_deserializeErrorNoSuchHealthCheck(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpDocumentGetHealthCheckStatusOutput(v **GetHealthCheckStatusOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *GetHealthCheckStatusOutput + if *v == nil { + sv = &GetHealthCheckStatusOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("HealthCheckObservations", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentHealthCheckObservations(&sv.HealthCheckObservations, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpGetHostedZone struct { +} + +func (*awsRestxml_deserializeOpGetHostedZone) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpGetHostedZone) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestxml_deserializeOpErrorGetHostedZone(response, &metadata) + } + output := &GetHostedZoneOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeOpDocumentGetHostedZoneOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorGetHostedZone(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("InvalidInput", errorCode): + return awsRestxml_deserializeErrorInvalidInput(response, errorBody) + + case strings.EqualFold("NoSuchHostedZone", errorCode): + return awsRestxml_deserializeErrorNoSuchHostedZone(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpDocumentGetHostedZoneOutput(v **GetHostedZoneOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *GetHostedZoneOutput + if *v == nil { + sv = &GetHostedZoneOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("DelegationSet", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentDelegationSet(&sv.DelegationSet, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("HostedZone", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentHostedZone(&sv.HostedZone, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("VPCs", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentVPCs(&sv.VPCs, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpGetHostedZoneCount struct { +} + +func (*awsRestxml_deserializeOpGetHostedZoneCount) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpGetHostedZoneCount) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestxml_deserializeOpErrorGetHostedZoneCount(response, &metadata) + } + output := &GetHostedZoneCountOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeOpDocumentGetHostedZoneCountOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorGetHostedZoneCount(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("InvalidInput", errorCode): + return awsRestxml_deserializeErrorInvalidInput(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpDocumentGetHostedZoneCountOutput(v **GetHostedZoneCountOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *GetHostedZoneCountOutput + if *v == nil { + sv = &GetHostedZoneCountOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("HostedZoneCount", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.HostedZoneCount = ptr.Int64(i64) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpGetHostedZoneLimit struct { +} + +func (*awsRestxml_deserializeOpGetHostedZoneLimit) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpGetHostedZoneLimit) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestxml_deserializeOpErrorGetHostedZoneLimit(response, &metadata) + } + output := &GetHostedZoneLimitOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeOpDocumentGetHostedZoneLimitOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorGetHostedZoneLimit(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("HostedZoneNotPrivate", errorCode): + return awsRestxml_deserializeErrorHostedZoneNotPrivate(response, errorBody) + + case strings.EqualFold("InvalidInput", errorCode): + return awsRestxml_deserializeErrorInvalidInput(response, errorBody) + + case strings.EqualFold("NoSuchHostedZone", errorCode): + return awsRestxml_deserializeErrorNoSuchHostedZone(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpDocumentGetHostedZoneLimitOutput(v **GetHostedZoneLimitOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *GetHostedZoneLimitOutput + if *v == nil { + sv = &GetHostedZoneLimitOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Count", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.Count = i64 + } + + case strings.EqualFold("Limit", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentHostedZoneLimit(&sv.Limit, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpGetQueryLoggingConfig struct { +} + +func (*awsRestxml_deserializeOpGetQueryLoggingConfig) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpGetQueryLoggingConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestxml_deserializeOpErrorGetQueryLoggingConfig(response, &metadata) + } + output := &GetQueryLoggingConfigOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeOpDocumentGetQueryLoggingConfigOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorGetQueryLoggingConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("InvalidInput", errorCode): + return awsRestxml_deserializeErrorInvalidInput(response, errorBody) + + case strings.EqualFold("NoSuchQueryLoggingConfig", errorCode): + return awsRestxml_deserializeErrorNoSuchQueryLoggingConfig(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpDocumentGetQueryLoggingConfigOutput(v **GetQueryLoggingConfigOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *GetQueryLoggingConfigOutput + if *v == nil { + sv = &GetQueryLoggingConfigOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("QueryLoggingConfig", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentQueryLoggingConfig(&sv.QueryLoggingConfig, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpGetReusableDelegationSet struct { +} + +func (*awsRestxml_deserializeOpGetReusableDelegationSet) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpGetReusableDelegationSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestxml_deserializeOpErrorGetReusableDelegationSet(response, &metadata) + } + output := &GetReusableDelegationSetOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeOpDocumentGetReusableDelegationSetOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorGetReusableDelegationSet(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("DelegationSetNotReusable", errorCode): + return awsRestxml_deserializeErrorDelegationSetNotReusable(response, errorBody) + + case strings.EqualFold("InvalidInput", errorCode): + return awsRestxml_deserializeErrorInvalidInput(response, errorBody) + + case strings.EqualFold("NoSuchDelegationSet", errorCode): + return awsRestxml_deserializeErrorNoSuchDelegationSet(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpDocumentGetReusableDelegationSetOutput(v **GetReusableDelegationSetOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *GetReusableDelegationSetOutput + if *v == nil { + sv = &GetReusableDelegationSetOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("DelegationSet", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentDelegationSet(&sv.DelegationSet, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpGetReusableDelegationSetLimit struct { +} + +func (*awsRestxml_deserializeOpGetReusableDelegationSetLimit) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpGetReusableDelegationSetLimit) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestxml_deserializeOpErrorGetReusableDelegationSetLimit(response, &metadata) + } + output := &GetReusableDelegationSetLimitOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeOpDocumentGetReusableDelegationSetLimitOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorGetReusableDelegationSetLimit(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("InvalidInput", errorCode): + return awsRestxml_deserializeErrorInvalidInput(response, errorBody) + + case strings.EqualFold("NoSuchDelegationSet", errorCode): + return awsRestxml_deserializeErrorNoSuchDelegationSet(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpDocumentGetReusableDelegationSetLimitOutput(v **GetReusableDelegationSetLimitOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *GetReusableDelegationSetLimitOutput + if *v == nil { + sv = &GetReusableDelegationSetLimitOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Count", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.Count = i64 + } + + case strings.EqualFold("Limit", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentReusableDelegationSetLimit(&sv.Limit, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpGetTrafficPolicy struct { +} + +func (*awsRestxml_deserializeOpGetTrafficPolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpGetTrafficPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestxml_deserializeOpErrorGetTrafficPolicy(response, &metadata) + } + output := &GetTrafficPolicyOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeOpDocumentGetTrafficPolicyOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorGetTrafficPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("InvalidInput", errorCode): + return awsRestxml_deserializeErrorInvalidInput(response, errorBody) + + case strings.EqualFold("NoSuchTrafficPolicy", errorCode): + return awsRestxml_deserializeErrorNoSuchTrafficPolicy(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpDocumentGetTrafficPolicyOutput(v **GetTrafficPolicyOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *GetTrafficPolicyOutput + if *v == nil { + sv = &GetTrafficPolicyOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("TrafficPolicy", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentTrafficPolicy(&sv.TrafficPolicy, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpGetTrafficPolicyInstance struct { +} + +func (*awsRestxml_deserializeOpGetTrafficPolicyInstance) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpGetTrafficPolicyInstance) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestxml_deserializeOpErrorGetTrafficPolicyInstance(response, &metadata) + } + output := &GetTrafficPolicyInstanceOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeOpDocumentGetTrafficPolicyInstanceOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorGetTrafficPolicyInstance(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("InvalidInput", errorCode): + return awsRestxml_deserializeErrorInvalidInput(response, errorBody) + + case strings.EqualFold("NoSuchTrafficPolicyInstance", errorCode): + return awsRestxml_deserializeErrorNoSuchTrafficPolicyInstance(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpDocumentGetTrafficPolicyInstanceOutput(v **GetTrafficPolicyInstanceOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *GetTrafficPolicyInstanceOutput + if *v == nil { + sv = &GetTrafficPolicyInstanceOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("TrafficPolicyInstance", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentTrafficPolicyInstance(&sv.TrafficPolicyInstance, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpGetTrafficPolicyInstanceCount struct { +} + +func (*awsRestxml_deserializeOpGetTrafficPolicyInstanceCount) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpGetTrafficPolicyInstanceCount) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestxml_deserializeOpErrorGetTrafficPolicyInstanceCount(response, &metadata) + } + output := &GetTrafficPolicyInstanceCountOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeOpDocumentGetTrafficPolicyInstanceCountOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorGetTrafficPolicyInstanceCount(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpDocumentGetTrafficPolicyInstanceCountOutput(v **GetTrafficPolicyInstanceCountOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *GetTrafficPolicyInstanceCountOutput + if *v == nil { + sv = &GetTrafficPolicyInstanceCountOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("TrafficPolicyInstanceCount", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.TrafficPolicyInstanceCount = ptr.Int32(int32(i64)) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpListCidrBlocks struct { +} + +func (*awsRestxml_deserializeOpListCidrBlocks) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpListCidrBlocks) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestxml_deserializeOpErrorListCidrBlocks(response, &metadata) + } + output := &ListCidrBlocksOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeOpDocumentListCidrBlocksOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorListCidrBlocks(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("InvalidInput", errorCode): + return awsRestxml_deserializeErrorInvalidInput(response, errorBody) + + case strings.EqualFold("NoSuchCidrCollectionException", errorCode): + return awsRestxml_deserializeErrorNoSuchCidrCollectionException(response, errorBody) + + case strings.EqualFold("NoSuchCidrLocationException", errorCode): + return awsRestxml_deserializeErrorNoSuchCidrLocationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpDocumentListCidrBlocksOutput(v **ListCidrBlocksOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *ListCidrBlocksOutput + if *v == nil { + sv = &ListCidrBlocksOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("CidrBlocks", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentCidrBlockSummaries(&sv.CidrBlocks, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("NextToken", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.NextToken = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpListCidrCollections struct { +} + +func (*awsRestxml_deserializeOpListCidrCollections) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpListCidrCollections) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestxml_deserializeOpErrorListCidrCollections(response, &metadata) + } + output := &ListCidrCollectionsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeOpDocumentListCidrCollectionsOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorListCidrCollections(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("InvalidInput", errorCode): + return awsRestxml_deserializeErrorInvalidInput(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpDocumentListCidrCollectionsOutput(v **ListCidrCollectionsOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *ListCidrCollectionsOutput + if *v == nil { + sv = &ListCidrCollectionsOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("CidrCollections", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentCollectionSummaries(&sv.CidrCollections, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("NextToken", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.NextToken = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpListCidrLocations struct { +} + +func (*awsRestxml_deserializeOpListCidrLocations) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpListCidrLocations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestxml_deserializeOpErrorListCidrLocations(response, &metadata) + } + output := &ListCidrLocationsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeOpDocumentListCidrLocationsOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorListCidrLocations(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("InvalidInput", errorCode): + return awsRestxml_deserializeErrorInvalidInput(response, errorBody) + + case strings.EqualFold("NoSuchCidrCollectionException", errorCode): + return awsRestxml_deserializeErrorNoSuchCidrCollectionException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpDocumentListCidrLocationsOutput(v **ListCidrLocationsOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *ListCidrLocationsOutput + if *v == nil { + sv = &ListCidrLocationsOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("CidrLocations", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentLocationSummaries(&sv.CidrLocations, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("NextToken", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.NextToken = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpListGeoLocations struct { +} + +func (*awsRestxml_deserializeOpListGeoLocations) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpListGeoLocations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestxml_deserializeOpErrorListGeoLocations(response, &metadata) + } + output := &ListGeoLocationsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeOpDocumentListGeoLocationsOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorListGeoLocations(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("InvalidInput", errorCode): + return awsRestxml_deserializeErrorInvalidInput(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpDocumentListGeoLocationsOutput(v **ListGeoLocationsOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *ListGeoLocationsOutput + if *v == nil { + sv = &ListGeoLocationsOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("GeoLocationDetailsList", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentGeoLocationDetailsList(&sv.GeoLocationDetailsList, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("IsTruncated", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected PageTruncated to be of type *bool, got %T instead", val) + } + sv.IsTruncated = xtv + } + + case strings.EqualFold("MaxItems", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.MaxItems = ptr.Int32(int32(i64)) + } + + case strings.EqualFold("NextContinentCode", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.NextContinentCode = ptr.String(xtv) + } + + case strings.EqualFold("NextCountryCode", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.NextCountryCode = ptr.String(xtv) + } + + case strings.EqualFold("NextSubdivisionCode", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.NextSubdivisionCode = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpListHealthChecks struct { +} + +func (*awsRestxml_deserializeOpListHealthChecks) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpListHealthChecks) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestxml_deserializeOpErrorListHealthChecks(response, &metadata) + } + output := &ListHealthChecksOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeOpDocumentListHealthChecksOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorListHealthChecks(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("IncompatibleVersion", errorCode): + return awsRestxml_deserializeErrorIncompatibleVersion(response, errorBody) + + case strings.EqualFold("InvalidInput", errorCode): + return awsRestxml_deserializeErrorInvalidInput(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpDocumentListHealthChecksOutput(v **ListHealthChecksOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *ListHealthChecksOutput + if *v == nil { + sv = &ListHealthChecksOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("HealthChecks", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentHealthChecks(&sv.HealthChecks, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("IsTruncated", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected PageTruncated to be of type *bool, got %T instead", val) + } + sv.IsTruncated = xtv + } + + case strings.EqualFold("Marker", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Marker = ptr.String(xtv) + } + + case strings.EqualFold("MaxItems", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.MaxItems = ptr.Int32(int32(i64)) + } + + case strings.EqualFold("NextMarker", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.NextMarker = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpListHostedZones struct { +} + +func (*awsRestxml_deserializeOpListHostedZones) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpListHostedZones) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestxml_deserializeOpErrorListHostedZones(response, &metadata) + } + output := &ListHostedZonesOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeOpDocumentListHostedZonesOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorListHostedZones(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("DelegationSetNotReusable", errorCode): + return awsRestxml_deserializeErrorDelegationSetNotReusable(response, errorBody) + + case strings.EqualFold("InvalidInput", errorCode): + return awsRestxml_deserializeErrorInvalidInput(response, errorBody) + + case strings.EqualFold("NoSuchDelegationSet", errorCode): + return awsRestxml_deserializeErrorNoSuchDelegationSet(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpDocumentListHostedZonesOutput(v **ListHostedZonesOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *ListHostedZonesOutput + if *v == nil { + sv = &ListHostedZonesOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("HostedZones", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentHostedZones(&sv.HostedZones, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("IsTruncated", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected PageTruncated to be of type *bool, got %T instead", val) + } + sv.IsTruncated = xtv + } + + case strings.EqualFold("Marker", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Marker = ptr.String(xtv) + } + + case strings.EqualFold("MaxItems", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.MaxItems = ptr.Int32(int32(i64)) + } + + case strings.EqualFold("NextMarker", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.NextMarker = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpListHostedZonesByName struct { +} + +func (*awsRestxml_deserializeOpListHostedZonesByName) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpListHostedZonesByName) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestxml_deserializeOpErrorListHostedZonesByName(response, &metadata) + } + output := &ListHostedZonesByNameOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeOpDocumentListHostedZonesByNameOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorListHostedZonesByName(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("InvalidDomainName", errorCode): + return awsRestxml_deserializeErrorInvalidDomainName(response, errorBody) + + case strings.EqualFold("InvalidInput", errorCode): + return awsRestxml_deserializeErrorInvalidInput(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpDocumentListHostedZonesByNameOutput(v **ListHostedZonesByNameOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *ListHostedZonesByNameOutput + if *v == nil { + sv = &ListHostedZonesByNameOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("DNSName", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.DNSName = ptr.String(xtv) + } + + case strings.EqualFold("HostedZoneId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.HostedZoneId = ptr.String(xtv) + } + + case strings.EqualFold("HostedZones", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentHostedZones(&sv.HostedZones, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("IsTruncated", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected PageTruncated to be of type *bool, got %T instead", val) + } + sv.IsTruncated = xtv + } + + case strings.EqualFold("MaxItems", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.MaxItems = ptr.Int32(int32(i64)) + } + + case strings.EqualFold("NextDNSName", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.NextDNSName = ptr.String(xtv) + } + + case strings.EqualFold("NextHostedZoneId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.NextHostedZoneId = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpListHostedZonesByVPC struct { +} + +func (*awsRestxml_deserializeOpListHostedZonesByVPC) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpListHostedZonesByVPC) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestxml_deserializeOpErrorListHostedZonesByVPC(response, &metadata) + } + output := &ListHostedZonesByVPCOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeOpDocumentListHostedZonesByVPCOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorListHostedZonesByVPC(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("InvalidInput", errorCode): + return awsRestxml_deserializeErrorInvalidInput(response, errorBody) + + case strings.EqualFold("InvalidPaginationToken", errorCode): + return awsRestxml_deserializeErrorInvalidPaginationToken(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpDocumentListHostedZonesByVPCOutput(v **ListHostedZonesByVPCOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *ListHostedZonesByVPCOutput + if *v == nil { + sv = &ListHostedZonesByVPCOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("HostedZoneSummaries", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentHostedZoneSummaries(&sv.HostedZoneSummaries, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("MaxItems", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.MaxItems = ptr.Int32(int32(i64)) + } + + case strings.EqualFold("NextToken", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.NextToken = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpListQueryLoggingConfigs struct { +} + +func (*awsRestxml_deserializeOpListQueryLoggingConfigs) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpListQueryLoggingConfigs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestxml_deserializeOpErrorListQueryLoggingConfigs(response, &metadata) + } + output := &ListQueryLoggingConfigsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeOpDocumentListQueryLoggingConfigsOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorListQueryLoggingConfigs(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("InvalidInput", errorCode): + return awsRestxml_deserializeErrorInvalidInput(response, errorBody) + + case strings.EqualFold("InvalidPaginationToken", errorCode): + return awsRestxml_deserializeErrorInvalidPaginationToken(response, errorBody) + + case strings.EqualFold("NoSuchHostedZone", errorCode): + return awsRestxml_deserializeErrorNoSuchHostedZone(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpDocumentListQueryLoggingConfigsOutput(v **ListQueryLoggingConfigsOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *ListQueryLoggingConfigsOutput + if *v == nil { + sv = &ListQueryLoggingConfigsOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("NextToken", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.NextToken = ptr.String(xtv) + } + + case strings.EqualFold("QueryLoggingConfigs", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentQueryLoggingConfigs(&sv.QueryLoggingConfigs, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpListResourceRecordSets struct { +} + +func (*awsRestxml_deserializeOpListResourceRecordSets) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpListResourceRecordSets) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestxml_deserializeOpErrorListResourceRecordSets(response, &metadata) + } + output := &ListResourceRecordSetsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeOpDocumentListResourceRecordSetsOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorListResourceRecordSets(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("InvalidInput", errorCode): + return awsRestxml_deserializeErrorInvalidInput(response, errorBody) + + case strings.EqualFold("NoSuchHostedZone", errorCode): + return awsRestxml_deserializeErrorNoSuchHostedZone(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpDocumentListResourceRecordSetsOutput(v **ListResourceRecordSetsOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *ListResourceRecordSetsOutput + if *v == nil { + sv = &ListResourceRecordSetsOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("IsTruncated", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected PageTruncated to be of type *bool, got %T instead", val) + } + sv.IsTruncated = xtv + } + + case strings.EqualFold("MaxItems", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.MaxItems = ptr.Int32(int32(i64)) + } + + case strings.EqualFold("NextRecordIdentifier", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.NextRecordIdentifier = ptr.String(xtv) + } + + case strings.EqualFold("NextRecordName", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.NextRecordName = ptr.String(xtv) + } + + case strings.EqualFold("NextRecordType", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.NextRecordType = types.RRType(xtv) + } + + case strings.EqualFold("ResourceRecordSets", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentResourceRecordSets(&sv.ResourceRecordSets, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpListReusableDelegationSets struct { +} + +func (*awsRestxml_deserializeOpListReusableDelegationSets) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpListReusableDelegationSets) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestxml_deserializeOpErrorListReusableDelegationSets(response, &metadata) + } + output := &ListReusableDelegationSetsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeOpDocumentListReusableDelegationSetsOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorListReusableDelegationSets(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("InvalidInput", errorCode): + return awsRestxml_deserializeErrorInvalidInput(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpDocumentListReusableDelegationSetsOutput(v **ListReusableDelegationSetsOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *ListReusableDelegationSetsOutput + if *v == nil { + sv = &ListReusableDelegationSetsOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("DelegationSets", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentDelegationSets(&sv.DelegationSets, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("IsTruncated", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected PageTruncated to be of type *bool, got %T instead", val) + } + sv.IsTruncated = xtv + } + + case strings.EqualFold("Marker", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Marker = ptr.String(xtv) + } + + case strings.EqualFold("MaxItems", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.MaxItems = ptr.Int32(int32(i64)) + } + + case strings.EqualFold("NextMarker", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.NextMarker = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpListTagsForResource struct { +} + +func (*awsRestxml_deserializeOpListTagsForResource) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpListTagsForResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestxml_deserializeOpErrorListTagsForResource(response, &metadata) + } + output := &ListTagsForResourceOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeOpDocumentListTagsForResourceOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorListTagsForResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("InvalidInput", errorCode): + return awsRestxml_deserializeErrorInvalidInput(response, errorBody) + + case strings.EqualFold("NoSuchHealthCheck", errorCode): + return awsRestxml_deserializeErrorNoSuchHealthCheck(response, errorBody) + + case strings.EqualFold("NoSuchHostedZone", errorCode): + return awsRestxml_deserializeErrorNoSuchHostedZone(response, errorBody) + + case strings.EqualFold("PriorRequestNotComplete", errorCode): + return awsRestxml_deserializeErrorPriorRequestNotComplete(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestxml_deserializeErrorThrottlingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsForResourceOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *ListTagsForResourceOutput + if *v == nil { + sv = &ListTagsForResourceOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("ResourceTagSet", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentResourceTagSet(&sv.ResourceTagSet, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpListTagsForResources struct { +} + +func (*awsRestxml_deserializeOpListTagsForResources) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpListTagsForResources) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestxml_deserializeOpErrorListTagsForResources(response, &metadata) + } + output := &ListTagsForResourcesOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeOpDocumentListTagsForResourcesOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorListTagsForResources(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("InvalidInput", errorCode): + return awsRestxml_deserializeErrorInvalidInput(response, errorBody) + + case strings.EqualFold("NoSuchHealthCheck", errorCode): + return awsRestxml_deserializeErrorNoSuchHealthCheck(response, errorBody) + + case strings.EqualFold("NoSuchHostedZone", errorCode): + return awsRestxml_deserializeErrorNoSuchHostedZone(response, errorBody) + + case strings.EqualFold("PriorRequestNotComplete", errorCode): + return awsRestxml_deserializeErrorPriorRequestNotComplete(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestxml_deserializeErrorThrottlingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpDocumentListTagsForResourcesOutput(v **ListTagsForResourcesOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *ListTagsForResourcesOutput + if *v == nil { + sv = &ListTagsForResourcesOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("ResourceTagSets", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentResourceTagSetList(&sv.ResourceTagSets, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpListTrafficPolicies struct { +} + +func (*awsRestxml_deserializeOpListTrafficPolicies) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpListTrafficPolicies) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestxml_deserializeOpErrorListTrafficPolicies(response, &metadata) + } + output := &ListTrafficPoliciesOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeOpDocumentListTrafficPoliciesOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorListTrafficPolicies(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("InvalidInput", errorCode): + return awsRestxml_deserializeErrorInvalidInput(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpDocumentListTrafficPoliciesOutput(v **ListTrafficPoliciesOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *ListTrafficPoliciesOutput + if *v == nil { + sv = &ListTrafficPoliciesOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("IsTruncated", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected PageTruncated to be of type *bool, got %T instead", val) + } + sv.IsTruncated = xtv + } + + case strings.EqualFold("MaxItems", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.MaxItems = ptr.Int32(int32(i64)) + } + + case strings.EqualFold("TrafficPolicyIdMarker", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.TrafficPolicyIdMarker = ptr.String(xtv) + } + + case strings.EqualFold("TrafficPolicySummaries", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentTrafficPolicySummaries(&sv.TrafficPolicySummaries, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpListTrafficPolicyInstances struct { +} + +func (*awsRestxml_deserializeOpListTrafficPolicyInstances) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpListTrafficPolicyInstances) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestxml_deserializeOpErrorListTrafficPolicyInstances(response, &metadata) + } + output := &ListTrafficPolicyInstancesOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeOpDocumentListTrafficPolicyInstancesOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorListTrafficPolicyInstances(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("InvalidInput", errorCode): + return awsRestxml_deserializeErrorInvalidInput(response, errorBody) + + case strings.EqualFold("NoSuchTrafficPolicyInstance", errorCode): + return awsRestxml_deserializeErrorNoSuchTrafficPolicyInstance(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpDocumentListTrafficPolicyInstancesOutput(v **ListTrafficPolicyInstancesOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *ListTrafficPolicyInstancesOutput + if *v == nil { + sv = &ListTrafficPolicyInstancesOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("HostedZoneIdMarker", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.HostedZoneIdMarker = ptr.String(xtv) + } + + case strings.EqualFold("IsTruncated", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected PageTruncated to be of type *bool, got %T instead", val) + } + sv.IsTruncated = xtv + } + + case strings.EqualFold("MaxItems", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.MaxItems = ptr.Int32(int32(i64)) + } + + case strings.EqualFold("TrafficPolicyInstanceNameMarker", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.TrafficPolicyInstanceNameMarker = ptr.String(xtv) + } + + case strings.EqualFold("TrafficPolicyInstances", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentTrafficPolicyInstances(&sv.TrafficPolicyInstances, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("TrafficPolicyInstanceTypeMarker", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.TrafficPolicyInstanceTypeMarker = types.RRType(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpListTrafficPolicyInstancesByHostedZone struct { +} + +func (*awsRestxml_deserializeOpListTrafficPolicyInstancesByHostedZone) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpListTrafficPolicyInstancesByHostedZone) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestxml_deserializeOpErrorListTrafficPolicyInstancesByHostedZone(response, &metadata) + } + output := &ListTrafficPolicyInstancesByHostedZoneOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeOpDocumentListTrafficPolicyInstancesByHostedZoneOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorListTrafficPolicyInstancesByHostedZone(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("InvalidInput", errorCode): + return awsRestxml_deserializeErrorInvalidInput(response, errorBody) + + case strings.EqualFold("NoSuchHostedZone", errorCode): + return awsRestxml_deserializeErrorNoSuchHostedZone(response, errorBody) + + case strings.EqualFold("NoSuchTrafficPolicyInstance", errorCode): + return awsRestxml_deserializeErrorNoSuchTrafficPolicyInstance(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpDocumentListTrafficPolicyInstancesByHostedZoneOutput(v **ListTrafficPolicyInstancesByHostedZoneOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *ListTrafficPolicyInstancesByHostedZoneOutput + if *v == nil { + sv = &ListTrafficPolicyInstancesByHostedZoneOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("IsTruncated", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected PageTruncated to be of type *bool, got %T instead", val) + } + sv.IsTruncated = xtv + } + + case strings.EqualFold("MaxItems", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.MaxItems = ptr.Int32(int32(i64)) + } + + case strings.EqualFold("TrafficPolicyInstanceNameMarker", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.TrafficPolicyInstanceNameMarker = ptr.String(xtv) + } + + case strings.EqualFold("TrafficPolicyInstances", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentTrafficPolicyInstances(&sv.TrafficPolicyInstances, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("TrafficPolicyInstanceTypeMarker", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.TrafficPolicyInstanceTypeMarker = types.RRType(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpListTrafficPolicyInstancesByPolicy struct { +} + +func (*awsRestxml_deserializeOpListTrafficPolicyInstancesByPolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpListTrafficPolicyInstancesByPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestxml_deserializeOpErrorListTrafficPolicyInstancesByPolicy(response, &metadata) + } + output := &ListTrafficPolicyInstancesByPolicyOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeOpDocumentListTrafficPolicyInstancesByPolicyOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorListTrafficPolicyInstancesByPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("InvalidInput", errorCode): + return awsRestxml_deserializeErrorInvalidInput(response, errorBody) + + case strings.EqualFold("NoSuchTrafficPolicy", errorCode): + return awsRestxml_deserializeErrorNoSuchTrafficPolicy(response, errorBody) + + case strings.EqualFold("NoSuchTrafficPolicyInstance", errorCode): + return awsRestxml_deserializeErrorNoSuchTrafficPolicyInstance(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpDocumentListTrafficPolicyInstancesByPolicyOutput(v **ListTrafficPolicyInstancesByPolicyOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *ListTrafficPolicyInstancesByPolicyOutput + if *v == nil { + sv = &ListTrafficPolicyInstancesByPolicyOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("HostedZoneIdMarker", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.HostedZoneIdMarker = ptr.String(xtv) + } + + case strings.EqualFold("IsTruncated", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected PageTruncated to be of type *bool, got %T instead", val) + } + sv.IsTruncated = xtv + } + + case strings.EqualFold("MaxItems", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.MaxItems = ptr.Int32(int32(i64)) + } + + case strings.EqualFold("TrafficPolicyInstanceNameMarker", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.TrafficPolicyInstanceNameMarker = ptr.String(xtv) + } + + case strings.EqualFold("TrafficPolicyInstances", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentTrafficPolicyInstances(&sv.TrafficPolicyInstances, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("TrafficPolicyInstanceTypeMarker", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.TrafficPolicyInstanceTypeMarker = types.RRType(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpListTrafficPolicyVersions struct { +} + +func (*awsRestxml_deserializeOpListTrafficPolicyVersions) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpListTrafficPolicyVersions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestxml_deserializeOpErrorListTrafficPolicyVersions(response, &metadata) + } + output := &ListTrafficPolicyVersionsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeOpDocumentListTrafficPolicyVersionsOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorListTrafficPolicyVersions(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("InvalidInput", errorCode): + return awsRestxml_deserializeErrorInvalidInput(response, errorBody) + + case strings.EqualFold("NoSuchTrafficPolicy", errorCode): + return awsRestxml_deserializeErrorNoSuchTrafficPolicy(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpDocumentListTrafficPolicyVersionsOutput(v **ListTrafficPolicyVersionsOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *ListTrafficPolicyVersionsOutput + if *v == nil { + sv = &ListTrafficPolicyVersionsOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("IsTruncated", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected PageTruncated to be of type *bool, got %T instead", val) + } + sv.IsTruncated = xtv + } + + case strings.EqualFold("MaxItems", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.MaxItems = ptr.Int32(int32(i64)) + } + + case strings.EqualFold("TrafficPolicies", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentTrafficPolicies(&sv.TrafficPolicies, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("TrafficPolicyVersionMarker", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.TrafficPolicyVersionMarker = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpListVPCAssociationAuthorizations struct { +} + +func (*awsRestxml_deserializeOpListVPCAssociationAuthorizations) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpListVPCAssociationAuthorizations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestxml_deserializeOpErrorListVPCAssociationAuthorizations(response, &metadata) + } + output := &ListVPCAssociationAuthorizationsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeOpDocumentListVPCAssociationAuthorizationsOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorListVPCAssociationAuthorizations(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("InvalidInput", errorCode): + return awsRestxml_deserializeErrorInvalidInput(response, errorBody) + + case strings.EqualFold("InvalidPaginationToken", errorCode): + return awsRestxml_deserializeErrorInvalidPaginationToken(response, errorBody) + + case strings.EqualFold("NoSuchHostedZone", errorCode): + return awsRestxml_deserializeErrorNoSuchHostedZone(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpDocumentListVPCAssociationAuthorizationsOutput(v **ListVPCAssociationAuthorizationsOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *ListVPCAssociationAuthorizationsOutput + if *v == nil { + sv = &ListVPCAssociationAuthorizationsOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("HostedZoneId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.HostedZoneId = ptr.String(xtv) + } + + case strings.EqualFold("NextToken", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.NextToken = ptr.String(xtv) + } + + case strings.EqualFold("VPCs", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentVPCs(&sv.VPCs, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpTestDNSAnswer struct { +} + +func (*awsRestxml_deserializeOpTestDNSAnswer) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpTestDNSAnswer) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestxml_deserializeOpErrorTestDNSAnswer(response, &metadata) + } + output := &TestDNSAnswerOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeOpDocumentTestDNSAnswerOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorTestDNSAnswer(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("InvalidInput", errorCode): + return awsRestxml_deserializeErrorInvalidInput(response, errorBody) + + case strings.EqualFold("NoSuchHostedZone", errorCode): + return awsRestxml_deserializeErrorNoSuchHostedZone(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpDocumentTestDNSAnswerOutput(v **TestDNSAnswerOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *TestDNSAnswerOutput + if *v == nil { + sv = &TestDNSAnswerOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Nameserver", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Nameserver = ptr.String(xtv) + } + + case strings.EqualFold("Protocol", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Protocol = ptr.String(xtv) + } + + case strings.EqualFold("RecordData", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentRecordData(&sv.RecordData, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("RecordName", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.RecordName = ptr.String(xtv) + } + + case strings.EqualFold("RecordType", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.RecordType = types.RRType(xtv) + } + + case strings.EqualFold("ResponseCode", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.ResponseCode = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpUpdateHealthCheck struct { +} + +func (*awsRestxml_deserializeOpUpdateHealthCheck) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpUpdateHealthCheck) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestxml_deserializeOpErrorUpdateHealthCheck(response, &metadata) + } + output := &UpdateHealthCheckOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeOpDocumentUpdateHealthCheckOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorUpdateHealthCheck(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("HealthCheckVersionMismatch", errorCode): + return awsRestxml_deserializeErrorHealthCheckVersionMismatch(response, errorBody) + + case strings.EqualFold("InvalidInput", errorCode): + return awsRestxml_deserializeErrorInvalidInput(response, errorBody) + + case strings.EqualFold("NoSuchHealthCheck", errorCode): + return awsRestxml_deserializeErrorNoSuchHealthCheck(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpDocumentUpdateHealthCheckOutput(v **UpdateHealthCheckOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *UpdateHealthCheckOutput + if *v == nil { + sv = &UpdateHealthCheckOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("HealthCheck", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentHealthCheck(&sv.HealthCheck, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpUpdateHostedZoneComment struct { +} + +func (*awsRestxml_deserializeOpUpdateHostedZoneComment) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpUpdateHostedZoneComment) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestxml_deserializeOpErrorUpdateHostedZoneComment(response, &metadata) + } + output := &UpdateHostedZoneCommentOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeOpDocumentUpdateHostedZoneCommentOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorUpdateHostedZoneComment(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("InvalidInput", errorCode): + return awsRestxml_deserializeErrorInvalidInput(response, errorBody) + + case strings.EqualFold("NoSuchHostedZone", errorCode): + return awsRestxml_deserializeErrorNoSuchHostedZone(response, errorBody) + + case strings.EqualFold("PriorRequestNotComplete", errorCode): + return awsRestxml_deserializeErrorPriorRequestNotComplete(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpDocumentUpdateHostedZoneCommentOutput(v **UpdateHostedZoneCommentOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *UpdateHostedZoneCommentOutput + if *v == nil { + sv = &UpdateHostedZoneCommentOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("HostedZone", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentHostedZone(&sv.HostedZone, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpUpdateTrafficPolicyComment struct { +} + +func (*awsRestxml_deserializeOpUpdateTrafficPolicyComment) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpUpdateTrafficPolicyComment) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestxml_deserializeOpErrorUpdateTrafficPolicyComment(response, &metadata) + } + output := &UpdateTrafficPolicyCommentOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeOpDocumentUpdateTrafficPolicyCommentOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorUpdateTrafficPolicyComment(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("ConcurrentModification", errorCode): + return awsRestxml_deserializeErrorConcurrentModification(response, errorBody) + + case strings.EqualFold("InvalidInput", errorCode): + return awsRestxml_deserializeErrorInvalidInput(response, errorBody) + + case strings.EqualFold("NoSuchTrafficPolicy", errorCode): + return awsRestxml_deserializeErrorNoSuchTrafficPolicy(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpDocumentUpdateTrafficPolicyCommentOutput(v **UpdateTrafficPolicyCommentOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *UpdateTrafficPolicyCommentOutput + if *v == nil { + sv = &UpdateTrafficPolicyCommentOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("TrafficPolicy", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentTrafficPolicy(&sv.TrafficPolicy, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpUpdateTrafficPolicyInstance struct { +} + +func (*awsRestxml_deserializeOpUpdateTrafficPolicyInstance) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpUpdateTrafficPolicyInstance) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestxml_deserializeOpErrorUpdateTrafficPolicyInstance(response, &metadata) + } + output := &UpdateTrafficPolicyInstanceOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeOpDocumentUpdateTrafficPolicyInstanceOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorUpdateTrafficPolicyInstance(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("ConflictingTypes", errorCode): + return awsRestxml_deserializeErrorConflictingTypes(response, errorBody) + + case strings.EqualFold("InvalidInput", errorCode): + return awsRestxml_deserializeErrorInvalidInput(response, errorBody) + + case strings.EqualFold("NoSuchTrafficPolicy", errorCode): + return awsRestxml_deserializeErrorNoSuchTrafficPolicy(response, errorBody) + + case strings.EqualFold("NoSuchTrafficPolicyInstance", errorCode): + return awsRestxml_deserializeErrorNoSuchTrafficPolicyInstance(response, errorBody) + + case strings.EqualFold("PriorRequestNotComplete", errorCode): + return awsRestxml_deserializeErrorPriorRequestNotComplete(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpDocumentUpdateTrafficPolicyInstanceOutput(v **UpdateTrafficPolicyInstanceOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *UpdateTrafficPolicyInstanceOutput + if *v == nil { + sv = &UpdateTrafficPolicyInstanceOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("TrafficPolicyInstance", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentTrafficPolicyInstance(&sv.TrafficPolicyInstance, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeErrorCidrBlockInUseException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.CidrBlockInUseException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentCidrBlockInUseException(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorCidrCollectionAlreadyExistsException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.CidrCollectionAlreadyExistsException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentCidrCollectionAlreadyExistsException(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorCidrCollectionInUseException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.CidrCollectionInUseException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentCidrCollectionInUseException(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorCidrCollectionVersionMismatchException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.CidrCollectionVersionMismatchException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentCidrCollectionVersionMismatchException(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorConcurrentModification(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ConcurrentModification{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentConcurrentModification(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorConflictingDomainExists(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ConflictingDomainExists{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentConflictingDomainExists(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorConflictingTypes(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ConflictingTypes{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentConflictingTypes(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorDelegationSetAlreadyCreated(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.DelegationSetAlreadyCreated{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentDelegationSetAlreadyCreated(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorDelegationSetAlreadyReusable(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.DelegationSetAlreadyReusable{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentDelegationSetAlreadyReusable(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorDelegationSetInUse(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.DelegationSetInUse{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentDelegationSetInUse(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorDelegationSetNotAvailable(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.DelegationSetNotAvailable{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentDelegationSetNotAvailable(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorDelegationSetNotReusable(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.DelegationSetNotReusable{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentDelegationSetNotReusable(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorDNSSECNotFound(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.DNSSECNotFound{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentDNSSECNotFound(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorHealthCheckAlreadyExists(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.HealthCheckAlreadyExists{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentHealthCheckAlreadyExists(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorHealthCheckInUse(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.HealthCheckInUse{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentHealthCheckInUse(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorHealthCheckVersionMismatch(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.HealthCheckVersionMismatch{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentHealthCheckVersionMismatch(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorHostedZoneAlreadyExists(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.HostedZoneAlreadyExists{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentHostedZoneAlreadyExists(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorHostedZoneNotEmpty(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.HostedZoneNotEmpty{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentHostedZoneNotEmpty(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorHostedZoneNotFound(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.HostedZoneNotFound{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentHostedZoneNotFound(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorHostedZoneNotPrivate(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.HostedZoneNotPrivate{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentHostedZoneNotPrivate(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorHostedZonePartiallyDelegated(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.HostedZonePartiallyDelegated{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentHostedZonePartiallyDelegated(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorIncompatibleVersion(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.IncompatibleVersion{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentIncompatibleVersion(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorInsufficientCloudWatchLogsResourcePolicy(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InsufficientCloudWatchLogsResourcePolicy{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentInsufficientCloudWatchLogsResourcePolicy(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorInvalidArgument(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidArgument{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentInvalidArgument(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorInvalidChangeBatch(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidChangeBatch{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentInvalidChangeBatch(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorInvalidDomainName(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidDomainName{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentInvalidDomainName(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorInvalidInput(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidInput{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentInvalidInput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorInvalidKeySigningKeyName(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidKeySigningKeyName{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentInvalidKeySigningKeyName(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorInvalidKeySigningKeyStatus(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidKeySigningKeyStatus{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentInvalidKeySigningKeyStatus(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorInvalidKMSArn(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidKMSArn{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentInvalidKMSArn(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorInvalidPaginationToken(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidPaginationToken{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentInvalidPaginationToken(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorInvalidSigningStatus(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidSigningStatus{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentInvalidSigningStatus(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorInvalidTrafficPolicyDocument(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidTrafficPolicyDocument{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentInvalidTrafficPolicyDocument(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorInvalidVPCId(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidVPCId{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentInvalidVPCId(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorKeySigningKeyAlreadyExists(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.KeySigningKeyAlreadyExists{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentKeySigningKeyAlreadyExists(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorKeySigningKeyInParentDSRecord(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.KeySigningKeyInParentDSRecord{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentKeySigningKeyInParentDSRecord(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorKeySigningKeyInUse(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.KeySigningKeyInUse{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentKeySigningKeyInUse(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorKeySigningKeyWithActiveStatusNotFound(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.KeySigningKeyWithActiveStatusNotFound{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentKeySigningKeyWithActiveStatusNotFound(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorLastVPCAssociation(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.LastVPCAssociation{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentLastVPCAssociation(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorLimitsExceeded(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.LimitsExceeded{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentLimitsExceeded(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorNoSuchChange(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.NoSuchChange{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentNoSuchChange(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorNoSuchCidrCollectionException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.NoSuchCidrCollectionException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentNoSuchCidrCollectionException(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorNoSuchCidrLocationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.NoSuchCidrLocationException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentNoSuchCidrLocationException(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorNoSuchCloudWatchLogsLogGroup(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.NoSuchCloudWatchLogsLogGroup{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentNoSuchCloudWatchLogsLogGroup(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorNoSuchDelegationSet(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.NoSuchDelegationSet{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentNoSuchDelegationSet(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorNoSuchGeoLocation(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.NoSuchGeoLocation{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentNoSuchGeoLocation(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorNoSuchHealthCheck(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.NoSuchHealthCheck{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentNoSuchHealthCheck(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorNoSuchHostedZone(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.NoSuchHostedZone{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentNoSuchHostedZone(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorNoSuchKeySigningKey(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.NoSuchKeySigningKey{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentNoSuchKeySigningKey(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorNoSuchQueryLoggingConfig(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.NoSuchQueryLoggingConfig{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentNoSuchQueryLoggingConfig(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorNoSuchTrafficPolicy(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.NoSuchTrafficPolicy{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentNoSuchTrafficPolicy(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorNoSuchTrafficPolicyInstance(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.NoSuchTrafficPolicyInstance{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentNoSuchTrafficPolicyInstance(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorNotAuthorizedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.NotAuthorizedException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentNotAuthorizedException(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorPriorRequestNotComplete(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.PriorRequestNotComplete{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentPriorRequestNotComplete(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorPublicZoneVPCAssociation(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.PublicZoneVPCAssociation{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentPublicZoneVPCAssociation(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorQueryLoggingConfigAlreadyExists(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.QueryLoggingConfigAlreadyExists{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentQueryLoggingConfigAlreadyExists(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorThrottlingException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ThrottlingException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentThrottlingException(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorTooManyHealthChecks(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyHealthChecks{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentTooManyHealthChecks(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorTooManyHostedZones(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyHostedZones{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentTooManyHostedZones(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorTooManyKeySigningKeys(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyKeySigningKeys{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentTooManyKeySigningKeys(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorTooManyTrafficPolicies(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyTrafficPolicies{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentTooManyTrafficPolicies(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorTooManyTrafficPolicyInstances(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyTrafficPolicyInstances{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentTooManyTrafficPolicyInstances(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorTooManyTrafficPolicyVersionsForCurrentPolicy(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyTrafficPolicyVersionsForCurrentPolicy{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentTooManyTrafficPolicyVersionsForCurrentPolicy(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorTooManyVPCAssociationAuthorizations(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyVPCAssociationAuthorizations{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentTooManyVPCAssociationAuthorizations(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorTrafficPolicyAlreadyExists(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TrafficPolicyAlreadyExists{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentTrafficPolicyAlreadyExists(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorTrafficPolicyInstanceAlreadyExists(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TrafficPolicyInstanceAlreadyExists{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentTrafficPolicyInstanceAlreadyExists(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorTrafficPolicyInUse(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TrafficPolicyInUse{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentTrafficPolicyInUse(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorVPCAssociationAuthorizationNotFound(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.VPCAssociationAuthorizationNotFound{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentVPCAssociationAuthorizationNotFound(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorVPCAssociationNotFound(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.VPCAssociationNotFound{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentVPCAssociationNotFound(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeDocumentAccountLimit(v **types.AccountLimit, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.AccountLimit + if *v == nil { + sv = &types.AccountLimit{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Type", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Type = types.AccountLimitType(xtv) + } + + case strings.EqualFold("Value", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.Value = i64 + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentAlarmIdentifier(v **types.AlarmIdentifier, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.AlarmIdentifier + if *v == nil { + sv = &types.AlarmIdentifier{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Name", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Name = ptr.String(xtv) + } + + case strings.EqualFold("Region", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Region = types.CloudWatchRegion(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentAliasTarget(v **types.AliasTarget, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.AliasTarget + if *v == nil { + sv = &types.AliasTarget{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("DNSName", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.DNSName = ptr.String(xtv) + } + + case strings.EqualFold("EvaluateTargetHealth", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected AliasHealthEnabled to be of type *bool, got %T instead", val) + } + sv.EvaluateTargetHealth = xtv + } + + case strings.EqualFold("HostedZoneId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.HostedZoneId = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentChangeInfo(v **types.ChangeInfo, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.ChangeInfo + if *v == nil { + sv = &types.ChangeInfo{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Comment", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Comment = ptr.String(xtv) + } + + case strings.EqualFold("Id", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Id = ptr.String(xtv) + } + + case strings.EqualFold("Status", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Status = types.ChangeStatus(xtv) + } + + case strings.EqualFold("SubmittedAt", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + t, err := smithytime.ParseDateTime(xtv) + if err != nil { + return err + } + sv.SubmittedAt = ptr.Time(t) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentCheckerIpRanges(v *[]string, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []string + if *v == nil { + sv = make([]string, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + decoder = memberDecoder + switch { + case strings.EqualFold("member", t.Name.Local): + var col string + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + col = xtv + } + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentCheckerIpRangesUnwrapped(v *[]string, decoder smithyxml.NodeDecoder) error { + var sv []string + if *v == nil { + sv = make([]string, 0) + } else { + sv = *v + } + + switch { + default: + var mv string + t := decoder.StartEl + _ = t + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + mv = xtv + } + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsRestxml_deserializeDocumentChildHealthCheckList(v *[]string, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []string + if *v == nil { + sv = make([]string, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + decoder = memberDecoder + switch { + case strings.EqualFold("ChildHealthCheck", t.Name.Local): + var col string + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + col = xtv + } + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentChildHealthCheckListUnwrapped(v *[]string, decoder smithyxml.NodeDecoder) error { + var sv []string + if *v == nil { + sv = make([]string, 0) + } else { + sv = *v + } + + switch { + default: + var mv string + t := decoder.StartEl + _ = t + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + mv = xtv + } + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsRestxml_deserializeDocumentCidrBlockInUseException(v **types.CidrBlockInUseException, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.CidrBlockInUseException + if *v == nil { + sv = &types.CidrBlockInUseException{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentCidrBlockSummaries(v *[]types.CidrBlockSummary, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.CidrBlockSummary + if *v == nil { + sv = make([]types.CidrBlockSummary, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("member", t.Name.Local): + var col types.CidrBlockSummary + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsRestxml_deserializeDocumentCidrBlockSummary(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentCidrBlockSummariesUnwrapped(v *[]types.CidrBlockSummary, decoder smithyxml.NodeDecoder) error { + var sv []types.CidrBlockSummary + if *v == nil { + sv = make([]types.CidrBlockSummary, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.CidrBlockSummary + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsRestxml_deserializeDocumentCidrBlockSummary(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsRestxml_deserializeDocumentCidrBlockSummary(v **types.CidrBlockSummary, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.CidrBlockSummary + if *v == nil { + sv = &types.CidrBlockSummary{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("CidrBlock", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.CidrBlock = ptr.String(xtv) + } + + case strings.EqualFold("LocationName", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.LocationName = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentCidrCollection(v **types.CidrCollection, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.CidrCollection + if *v == nil { + sv = &types.CidrCollection{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Arn", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Arn = ptr.String(xtv) + } + + case strings.EqualFold("Id", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Id = ptr.String(xtv) + } + + case strings.EqualFold("Name", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Name = ptr.String(xtv) + } + + case strings.EqualFold("Version", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.Version = ptr.Int64(i64) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentCidrCollectionAlreadyExistsException(v **types.CidrCollectionAlreadyExistsException, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.CidrCollectionAlreadyExistsException + if *v == nil { + sv = &types.CidrCollectionAlreadyExistsException{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentCidrCollectionInUseException(v **types.CidrCollectionInUseException, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.CidrCollectionInUseException + if *v == nil { + sv = &types.CidrCollectionInUseException{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentCidrCollectionVersionMismatchException(v **types.CidrCollectionVersionMismatchException, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.CidrCollectionVersionMismatchException + if *v == nil { + sv = &types.CidrCollectionVersionMismatchException{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentCidrRoutingConfig(v **types.CidrRoutingConfig, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.CidrRoutingConfig + if *v == nil { + sv = &types.CidrRoutingConfig{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("CollectionId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.CollectionId = ptr.String(xtv) + } + + case strings.EqualFold("LocationName", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.LocationName = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentCloudWatchAlarmConfiguration(v **types.CloudWatchAlarmConfiguration, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.CloudWatchAlarmConfiguration + if *v == nil { + sv = &types.CloudWatchAlarmConfiguration{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("ComparisonOperator", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.ComparisonOperator = types.ComparisonOperator(xtv) + } + + case strings.EqualFold("Dimensions", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentDimensionList(&sv.Dimensions, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("EvaluationPeriods", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.EvaluationPeriods = ptr.Int32(int32(i64)) + } + + case strings.EqualFold("MetricName", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.MetricName = ptr.String(xtv) + } + + case strings.EqualFold("Namespace", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Namespace = ptr.String(xtv) + } + + case strings.EqualFold("Period", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.Period = ptr.Int32(int32(i64)) + } + + case strings.EqualFold("Statistic", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Statistic = types.Statistic(xtv) + } + + case strings.EqualFold("Threshold", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + f64, err := strconv.ParseFloat(xtv, 64) + if err != nil { + return err + } + sv.Threshold = ptr.Float64(f64) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentCollectionSummaries(v *[]types.CollectionSummary, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.CollectionSummary + if *v == nil { + sv = make([]types.CollectionSummary, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("member", t.Name.Local): + var col types.CollectionSummary + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsRestxml_deserializeDocumentCollectionSummary(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentCollectionSummariesUnwrapped(v *[]types.CollectionSummary, decoder smithyxml.NodeDecoder) error { + var sv []types.CollectionSummary + if *v == nil { + sv = make([]types.CollectionSummary, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.CollectionSummary + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsRestxml_deserializeDocumentCollectionSummary(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsRestxml_deserializeDocumentCollectionSummary(v **types.CollectionSummary, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.CollectionSummary + if *v == nil { + sv = &types.CollectionSummary{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Arn", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Arn = ptr.String(xtv) + } + + case strings.EqualFold("Id", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Id = ptr.String(xtv) + } + + case strings.EqualFold("Name", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Name = ptr.String(xtv) + } + + case strings.EqualFold("Version", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.Version = ptr.Int64(i64) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentConcurrentModification(v **types.ConcurrentModification, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.ConcurrentModification + if *v == nil { + sv = &types.ConcurrentModification{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentConflictingDomainExists(v **types.ConflictingDomainExists, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.ConflictingDomainExists + if *v == nil { + sv = &types.ConflictingDomainExists{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentConflictingTypes(v **types.ConflictingTypes, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.ConflictingTypes + if *v == nil { + sv = &types.ConflictingTypes{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentDelegationSet(v **types.DelegationSet, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.DelegationSet + if *v == nil { + sv = &types.DelegationSet{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("CallerReference", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.CallerReference = ptr.String(xtv) + } + + case strings.EqualFold("Id", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Id = ptr.String(xtv) + } + + case strings.EqualFold("NameServers", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentDelegationSetNameServers(&sv.NameServers, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentDelegationSetAlreadyCreated(v **types.DelegationSetAlreadyCreated, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.DelegationSetAlreadyCreated + if *v == nil { + sv = &types.DelegationSetAlreadyCreated{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentDelegationSetAlreadyReusable(v **types.DelegationSetAlreadyReusable, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.DelegationSetAlreadyReusable + if *v == nil { + sv = &types.DelegationSetAlreadyReusable{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentDelegationSetInUse(v **types.DelegationSetInUse, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.DelegationSetInUse + if *v == nil { + sv = &types.DelegationSetInUse{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentDelegationSetNameServers(v *[]string, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []string + if *v == nil { + sv = make([]string, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + decoder = memberDecoder + switch { + case strings.EqualFold("NameServer", t.Name.Local): + var col string + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + col = xtv + } + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentDelegationSetNameServersUnwrapped(v *[]string, decoder smithyxml.NodeDecoder) error { + var sv []string + if *v == nil { + sv = make([]string, 0) + } else { + sv = *v + } + + switch { + default: + var mv string + t := decoder.StartEl + _ = t + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + mv = xtv + } + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsRestxml_deserializeDocumentDelegationSetNotAvailable(v **types.DelegationSetNotAvailable, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.DelegationSetNotAvailable + if *v == nil { + sv = &types.DelegationSetNotAvailable{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentDelegationSetNotReusable(v **types.DelegationSetNotReusable, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.DelegationSetNotReusable + if *v == nil { + sv = &types.DelegationSetNotReusable{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentDelegationSets(v *[]types.DelegationSet, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.DelegationSet + if *v == nil { + sv = make([]types.DelegationSet, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("DelegationSet", t.Name.Local): + var col types.DelegationSet + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsRestxml_deserializeDocumentDelegationSet(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentDelegationSetsUnwrapped(v *[]types.DelegationSet, decoder smithyxml.NodeDecoder) error { + var sv []types.DelegationSet + if *v == nil { + sv = make([]types.DelegationSet, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.DelegationSet + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsRestxml_deserializeDocumentDelegationSet(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsRestxml_deserializeDocumentDimension(v **types.Dimension, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.Dimension + if *v == nil { + sv = &types.Dimension{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Name", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Name = ptr.String(xtv) + } + + case strings.EqualFold("Value", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Value = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentDimensionList(v *[]types.Dimension, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.Dimension + if *v == nil { + sv = make([]types.Dimension, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("Dimension", t.Name.Local): + var col types.Dimension + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsRestxml_deserializeDocumentDimension(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentDimensionListUnwrapped(v *[]types.Dimension, decoder smithyxml.NodeDecoder) error { + var sv []types.Dimension + if *v == nil { + sv = make([]types.Dimension, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.Dimension + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsRestxml_deserializeDocumentDimension(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsRestxml_deserializeDocumentDNSSECNotFound(v **types.DNSSECNotFound, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.DNSSECNotFound + if *v == nil { + sv = &types.DNSSECNotFound{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentDNSSECStatus(v **types.DNSSECStatus, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.DNSSECStatus + if *v == nil { + sv = &types.DNSSECStatus{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("ServeSignature", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.ServeSignature = ptr.String(xtv) + } + + case strings.EqualFold("StatusMessage", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.StatusMessage = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentErrorMessages(v *[]string, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []string + if *v == nil { + sv = make([]string, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + decoder = memberDecoder + switch { + case strings.EqualFold("Message", t.Name.Local): + var col string + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + col = xtv + } + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentErrorMessagesUnwrapped(v *[]string, decoder smithyxml.NodeDecoder) error { + var sv []string + if *v == nil { + sv = make([]string, 0) + } else { + sv = *v + } + + switch { + default: + var mv string + t := decoder.StartEl + _ = t + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + mv = xtv + } + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsRestxml_deserializeDocumentGeoLocation(v **types.GeoLocation, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.GeoLocation + if *v == nil { + sv = &types.GeoLocation{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("ContinentCode", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.ContinentCode = ptr.String(xtv) + } + + case strings.EqualFold("CountryCode", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.CountryCode = ptr.String(xtv) + } + + case strings.EqualFold("SubdivisionCode", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.SubdivisionCode = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentGeoLocationDetails(v **types.GeoLocationDetails, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.GeoLocationDetails + if *v == nil { + sv = &types.GeoLocationDetails{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("ContinentCode", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.ContinentCode = ptr.String(xtv) + } + + case strings.EqualFold("ContinentName", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.ContinentName = ptr.String(xtv) + } + + case strings.EqualFold("CountryCode", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.CountryCode = ptr.String(xtv) + } + + case strings.EqualFold("CountryName", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.CountryName = ptr.String(xtv) + } + + case strings.EqualFold("SubdivisionCode", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.SubdivisionCode = ptr.String(xtv) + } + + case strings.EqualFold("SubdivisionName", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.SubdivisionName = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentGeoLocationDetailsList(v *[]types.GeoLocationDetails, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.GeoLocationDetails + if *v == nil { + sv = make([]types.GeoLocationDetails, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("GeoLocationDetails", t.Name.Local): + var col types.GeoLocationDetails + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsRestxml_deserializeDocumentGeoLocationDetails(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentGeoLocationDetailsListUnwrapped(v *[]types.GeoLocationDetails, decoder smithyxml.NodeDecoder) error { + var sv []types.GeoLocationDetails + if *v == nil { + sv = make([]types.GeoLocationDetails, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.GeoLocationDetails + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsRestxml_deserializeDocumentGeoLocationDetails(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsRestxml_deserializeDocumentHealthCheck(v **types.HealthCheck, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.HealthCheck + if *v == nil { + sv = &types.HealthCheck{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("CallerReference", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.CallerReference = ptr.String(xtv) + } + + case strings.EqualFold("CloudWatchAlarmConfiguration", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentCloudWatchAlarmConfiguration(&sv.CloudWatchAlarmConfiguration, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("HealthCheckConfig", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentHealthCheckConfig(&sv.HealthCheckConfig, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("HealthCheckVersion", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.HealthCheckVersion = ptr.Int64(i64) + } + + case strings.EqualFold("Id", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Id = ptr.String(xtv) + } + + case strings.EqualFold("LinkedService", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentLinkedService(&sv.LinkedService, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentHealthCheckAlreadyExists(v **types.HealthCheckAlreadyExists, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.HealthCheckAlreadyExists + if *v == nil { + sv = &types.HealthCheckAlreadyExists{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentHealthCheckConfig(v **types.HealthCheckConfig, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.HealthCheckConfig + if *v == nil { + sv = &types.HealthCheckConfig{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("AlarmIdentifier", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentAlarmIdentifier(&sv.AlarmIdentifier, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("ChildHealthChecks", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentChildHealthCheckList(&sv.ChildHealthChecks, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Disabled", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected Disabled to be of type *bool, got %T instead", val) + } + sv.Disabled = ptr.Bool(xtv) + } + + case strings.EqualFold("EnableSNI", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected EnableSNI to be of type *bool, got %T instead", val) + } + sv.EnableSNI = ptr.Bool(xtv) + } + + case strings.EqualFold("FailureThreshold", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.FailureThreshold = ptr.Int32(int32(i64)) + } + + case strings.EqualFold("FullyQualifiedDomainName", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.FullyQualifiedDomainName = ptr.String(xtv) + } + + case strings.EqualFold("HealthThreshold", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.HealthThreshold = ptr.Int32(int32(i64)) + } + + case strings.EqualFold("InsufficientDataHealthStatus", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.InsufficientDataHealthStatus = types.InsufficientDataHealthStatus(xtv) + } + + case strings.EqualFold("Inverted", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected Inverted to be of type *bool, got %T instead", val) + } + sv.Inverted = ptr.Bool(xtv) + } + + case strings.EqualFold("IPAddress", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.IPAddress = ptr.String(xtv) + } + + case strings.EqualFold("MeasureLatency", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected MeasureLatency to be of type *bool, got %T instead", val) + } + sv.MeasureLatency = ptr.Bool(xtv) + } + + case strings.EqualFold("Port", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.Port = ptr.Int32(int32(i64)) + } + + case strings.EqualFold("Regions", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentHealthCheckRegionList(&sv.Regions, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("RequestInterval", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.RequestInterval = ptr.Int32(int32(i64)) + } + + case strings.EqualFold("ResourcePath", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.ResourcePath = ptr.String(xtv) + } + + case strings.EqualFold("RoutingControlArn", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.RoutingControlArn = ptr.String(xtv) + } + + case strings.EqualFold("SearchString", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.SearchString = ptr.String(xtv) + } + + case strings.EqualFold("Type", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Type = types.HealthCheckType(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentHealthCheckInUse(v **types.HealthCheckInUse, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.HealthCheckInUse + if *v == nil { + sv = &types.HealthCheckInUse{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentHealthCheckObservation(v **types.HealthCheckObservation, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.HealthCheckObservation + if *v == nil { + sv = &types.HealthCheckObservation{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("IPAddress", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.IPAddress = ptr.String(xtv) + } + + case strings.EqualFold("Region", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Region = types.HealthCheckRegion(xtv) + } + + case strings.EqualFold("StatusReport", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentStatusReport(&sv.StatusReport, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentHealthCheckObservations(v *[]types.HealthCheckObservation, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.HealthCheckObservation + if *v == nil { + sv = make([]types.HealthCheckObservation, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("HealthCheckObservation", t.Name.Local): + var col types.HealthCheckObservation + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsRestxml_deserializeDocumentHealthCheckObservation(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentHealthCheckObservationsUnwrapped(v *[]types.HealthCheckObservation, decoder smithyxml.NodeDecoder) error { + var sv []types.HealthCheckObservation + if *v == nil { + sv = make([]types.HealthCheckObservation, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.HealthCheckObservation + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsRestxml_deserializeDocumentHealthCheckObservation(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsRestxml_deserializeDocumentHealthCheckRegionList(v *[]types.HealthCheckRegion, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.HealthCheckRegion + if *v == nil { + sv = make([]types.HealthCheckRegion, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + decoder = memberDecoder + switch { + case strings.EqualFold("Region", t.Name.Local): + var col types.HealthCheckRegion + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + col = types.HealthCheckRegion(xtv) + } + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentHealthCheckRegionListUnwrapped(v *[]types.HealthCheckRegion, decoder smithyxml.NodeDecoder) error { + var sv []types.HealthCheckRegion + if *v == nil { + sv = make([]types.HealthCheckRegion, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.HealthCheckRegion + t := decoder.StartEl + _ = t + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + mv = types.HealthCheckRegion(xtv) + } + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsRestxml_deserializeDocumentHealthChecks(v *[]types.HealthCheck, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.HealthCheck + if *v == nil { + sv = make([]types.HealthCheck, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("HealthCheck", t.Name.Local): + var col types.HealthCheck + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsRestxml_deserializeDocumentHealthCheck(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentHealthChecksUnwrapped(v *[]types.HealthCheck, decoder smithyxml.NodeDecoder) error { + var sv []types.HealthCheck + if *v == nil { + sv = make([]types.HealthCheck, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.HealthCheck + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsRestxml_deserializeDocumentHealthCheck(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsRestxml_deserializeDocumentHealthCheckVersionMismatch(v **types.HealthCheckVersionMismatch, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.HealthCheckVersionMismatch + if *v == nil { + sv = &types.HealthCheckVersionMismatch{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentHostedZone(v **types.HostedZone, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.HostedZone + if *v == nil { + sv = &types.HostedZone{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("CallerReference", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.CallerReference = ptr.String(xtv) + } + + case strings.EqualFold("Config", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentHostedZoneConfig(&sv.Config, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Id", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Id = ptr.String(xtv) + } + + case strings.EqualFold("LinkedService", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentLinkedService(&sv.LinkedService, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Name", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Name = ptr.String(xtv) + } + + case strings.EqualFold("ResourceRecordSetCount", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.ResourceRecordSetCount = ptr.Int64(i64) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentHostedZoneAlreadyExists(v **types.HostedZoneAlreadyExists, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.HostedZoneAlreadyExists + if *v == nil { + sv = &types.HostedZoneAlreadyExists{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentHostedZoneConfig(v **types.HostedZoneConfig, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.HostedZoneConfig + if *v == nil { + sv = &types.HostedZoneConfig{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Comment", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Comment = ptr.String(xtv) + } + + case strings.EqualFold("PrivateZone", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected IsPrivateZone to be of type *bool, got %T instead", val) + } + sv.PrivateZone = xtv + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentHostedZoneLimit(v **types.HostedZoneLimit, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.HostedZoneLimit + if *v == nil { + sv = &types.HostedZoneLimit{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Type", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Type = types.HostedZoneLimitType(xtv) + } + + case strings.EqualFold("Value", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.Value = i64 + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentHostedZoneNotEmpty(v **types.HostedZoneNotEmpty, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.HostedZoneNotEmpty + if *v == nil { + sv = &types.HostedZoneNotEmpty{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentHostedZoneNotFound(v **types.HostedZoneNotFound, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.HostedZoneNotFound + if *v == nil { + sv = &types.HostedZoneNotFound{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentHostedZoneNotPrivate(v **types.HostedZoneNotPrivate, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.HostedZoneNotPrivate + if *v == nil { + sv = &types.HostedZoneNotPrivate{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentHostedZoneOwner(v **types.HostedZoneOwner, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.HostedZoneOwner + if *v == nil { + sv = &types.HostedZoneOwner{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("OwningAccount", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.OwningAccount = ptr.String(xtv) + } + + case strings.EqualFold("OwningService", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.OwningService = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentHostedZonePartiallyDelegated(v **types.HostedZonePartiallyDelegated, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.HostedZonePartiallyDelegated + if *v == nil { + sv = &types.HostedZonePartiallyDelegated{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentHostedZones(v *[]types.HostedZone, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.HostedZone + if *v == nil { + sv = make([]types.HostedZone, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("HostedZone", t.Name.Local): + var col types.HostedZone + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsRestxml_deserializeDocumentHostedZone(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentHostedZonesUnwrapped(v *[]types.HostedZone, decoder smithyxml.NodeDecoder) error { + var sv []types.HostedZone + if *v == nil { + sv = make([]types.HostedZone, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.HostedZone + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsRestxml_deserializeDocumentHostedZone(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsRestxml_deserializeDocumentHostedZoneSummaries(v *[]types.HostedZoneSummary, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.HostedZoneSummary + if *v == nil { + sv = make([]types.HostedZoneSummary, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("HostedZoneSummary", t.Name.Local): + var col types.HostedZoneSummary + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsRestxml_deserializeDocumentHostedZoneSummary(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentHostedZoneSummariesUnwrapped(v *[]types.HostedZoneSummary, decoder smithyxml.NodeDecoder) error { + var sv []types.HostedZoneSummary + if *v == nil { + sv = make([]types.HostedZoneSummary, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.HostedZoneSummary + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsRestxml_deserializeDocumentHostedZoneSummary(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsRestxml_deserializeDocumentHostedZoneSummary(v **types.HostedZoneSummary, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.HostedZoneSummary + if *v == nil { + sv = &types.HostedZoneSummary{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("HostedZoneId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.HostedZoneId = ptr.String(xtv) + } + + case strings.EqualFold("Name", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Name = ptr.String(xtv) + } + + case strings.EqualFold("Owner", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentHostedZoneOwner(&sv.Owner, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentIncompatibleVersion(v **types.IncompatibleVersion, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.IncompatibleVersion + if *v == nil { + sv = &types.IncompatibleVersion{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentInsufficientCloudWatchLogsResourcePolicy(v **types.InsufficientCloudWatchLogsResourcePolicy, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.InsufficientCloudWatchLogsResourcePolicy + if *v == nil { + sv = &types.InsufficientCloudWatchLogsResourcePolicy{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentInvalidArgument(v **types.InvalidArgument, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.InvalidArgument + if *v == nil { + sv = &types.InvalidArgument{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentInvalidChangeBatch(v **types.InvalidChangeBatch, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.InvalidChangeBatch + if *v == nil { + sv = &types.InvalidChangeBatch{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + case strings.EqualFold("messages", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentErrorMessages(&sv.Messages, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentInvalidDomainName(v **types.InvalidDomainName, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.InvalidDomainName + if *v == nil { + sv = &types.InvalidDomainName{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentInvalidInput(v **types.InvalidInput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.InvalidInput + if *v == nil { + sv = &types.InvalidInput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentInvalidKeySigningKeyName(v **types.InvalidKeySigningKeyName, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.InvalidKeySigningKeyName + if *v == nil { + sv = &types.InvalidKeySigningKeyName{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentInvalidKeySigningKeyStatus(v **types.InvalidKeySigningKeyStatus, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.InvalidKeySigningKeyStatus + if *v == nil { + sv = &types.InvalidKeySigningKeyStatus{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentInvalidKMSArn(v **types.InvalidKMSArn, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.InvalidKMSArn + if *v == nil { + sv = &types.InvalidKMSArn{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentInvalidPaginationToken(v **types.InvalidPaginationToken, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.InvalidPaginationToken + if *v == nil { + sv = &types.InvalidPaginationToken{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentInvalidSigningStatus(v **types.InvalidSigningStatus, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.InvalidSigningStatus + if *v == nil { + sv = &types.InvalidSigningStatus{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentInvalidTrafficPolicyDocument(v **types.InvalidTrafficPolicyDocument, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.InvalidTrafficPolicyDocument + if *v == nil { + sv = &types.InvalidTrafficPolicyDocument{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentInvalidVPCId(v **types.InvalidVPCId, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.InvalidVPCId + if *v == nil { + sv = &types.InvalidVPCId{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentKeySigningKey(v **types.KeySigningKey, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.KeySigningKey + if *v == nil { + sv = &types.KeySigningKey{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("CreatedDate", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + t, err := smithytime.ParseDateTime(xtv) + if err != nil { + return err + } + sv.CreatedDate = ptr.Time(t) + } + + case strings.EqualFold("DigestAlgorithmMnemonic", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.DigestAlgorithmMnemonic = ptr.String(xtv) + } + + case strings.EqualFold("DigestAlgorithmType", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.DigestAlgorithmType = int32(i64) + } + + case strings.EqualFold("DigestValue", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.DigestValue = ptr.String(xtv) + } + + case strings.EqualFold("DNSKEYRecord", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.DNSKEYRecord = ptr.String(xtv) + } + + case strings.EqualFold("DSRecord", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.DSRecord = ptr.String(xtv) + } + + case strings.EqualFold("Flag", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.Flag = int32(i64) + } + + case strings.EqualFold("KeyTag", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.KeyTag = int32(i64) + } + + case strings.EqualFold("KmsArn", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.KmsArn = ptr.String(xtv) + } + + case strings.EqualFold("LastModifiedDate", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + t, err := smithytime.ParseDateTime(xtv) + if err != nil { + return err + } + sv.LastModifiedDate = ptr.Time(t) + } + + case strings.EqualFold("Name", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Name = ptr.String(xtv) + } + + case strings.EqualFold("PublicKey", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.PublicKey = ptr.String(xtv) + } + + case strings.EqualFold("SigningAlgorithmMnemonic", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.SigningAlgorithmMnemonic = ptr.String(xtv) + } + + case strings.EqualFold("SigningAlgorithmType", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.SigningAlgorithmType = int32(i64) + } + + case strings.EqualFold("Status", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Status = ptr.String(xtv) + } + + case strings.EqualFold("StatusMessage", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.StatusMessage = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentKeySigningKeyAlreadyExists(v **types.KeySigningKeyAlreadyExists, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.KeySigningKeyAlreadyExists + if *v == nil { + sv = &types.KeySigningKeyAlreadyExists{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentKeySigningKeyInParentDSRecord(v **types.KeySigningKeyInParentDSRecord, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.KeySigningKeyInParentDSRecord + if *v == nil { + sv = &types.KeySigningKeyInParentDSRecord{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentKeySigningKeyInUse(v **types.KeySigningKeyInUse, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.KeySigningKeyInUse + if *v == nil { + sv = &types.KeySigningKeyInUse{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentKeySigningKeys(v *[]types.KeySigningKey, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.KeySigningKey + if *v == nil { + sv = make([]types.KeySigningKey, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("member", t.Name.Local): + var col types.KeySigningKey + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsRestxml_deserializeDocumentKeySigningKey(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentKeySigningKeysUnwrapped(v *[]types.KeySigningKey, decoder smithyxml.NodeDecoder) error { + var sv []types.KeySigningKey + if *v == nil { + sv = make([]types.KeySigningKey, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.KeySigningKey + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsRestxml_deserializeDocumentKeySigningKey(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsRestxml_deserializeDocumentKeySigningKeyWithActiveStatusNotFound(v **types.KeySigningKeyWithActiveStatusNotFound, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.KeySigningKeyWithActiveStatusNotFound + if *v == nil { + sv = &types.KeySigningKeyWithActiveStatusNotFound{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentLastVPCAssociation(v **types.LastVPCAssociation, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.LastVPCAssociation + if *v == nil { + sv = &types.LastVPCAssociation{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentLimitsExceeded(v **types.LimitsExceeded, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.LimitsExceeded + if *v == nil { + sv = &types.LimitsExceeded{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentLinkedService(v **types.LinkedService, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.LinkedService + if *v == nil { + sv = &types.LinkedService{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Description", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Description = ptr.String(xtv) + } + + case strings.EqualFold("ServicePrincipal", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.ServicePrincipal = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentLocationSummaries(v *[]types.LocationSummary, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.LocationSummary + if *v == nil { + sv = make([]types.LocationSummary, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("member", t.Name.Local): + var col types.LocationSummary + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsRestxml_deserializeDocumentLocationSummary(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentLocationSummariesUnwrapped(v *[]types.LocationSummary, decoder smithyxml.NodeDecoder) error { + var sv []types.LocationSummary + if *v == nil { + sv = make([]types.LocationSummary, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.LocationSummary + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsRestxml_deserializeDocumentLocationSummary(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsRestxml_deserializeDocumentLocationSummary(v **types.LocationSummary, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.LocationSummary + if *v == nil { + sv = &types.LocationSummary{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("LocationName", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.LocationName = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentNoSuchChange(v **types.NoSuchChange, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.NoSuchChange + if *v == nil { + sv = &types.NoSuchChange{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentNoSuchCidrCollectionException(v **types.NoSuchCidrCollectionException, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.NoSuchCidrCollectionException + if *v == nil { + sv = &types.NoSuchCidrCollectionException{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentNoSuchCidrLocationException(v **types.NoSuchCidrLocationException, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.NoSuchCidrLocationException + if *v == nil { + sv = &types.NoSuchCidrLocationException{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentNoSuchCloudWatchLogsLogGroup(v **types.NoSuchCloudWatchLogsLogGroup, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.NoSuchCloudWatchLogsLogGroup + if *v == nil { + sv = &types.NoSuchCloudWatchLogsLogGroup{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentNoSuchDelegationSet(v **types.NoSuchDelegationSet, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.NoSuchDelegationSet + if *v == nil { + sv = &types.NoSuchDelegationSet{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentNoSuchGeoLocation(v **types.NoSuchGeoLocation, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.NoSuchGeoLocation + if *v == nil { + sv = &types.NoSuchGeoLocation{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentNoSuchHealthCheck(v **types.NoSuchHealthCheck, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.NoSuchHealthCheck + if *v == nil { + sv = &types.NoSuchHealthCheck{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentNoSuchHostedZone(v **types.NoSuchHostedZone, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.NoSuchHostedZone + if *v == nil { + sv = &types.NoSuchHostedZone{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentNoSuchKeySigningKey(v **types.NoSuchKeySigningKey, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.NoSuchKeySigningKey + if *v == nil { + sv = &types.NoSuchKeySigningKey{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentNoSuchQueryLoggingConfig(v **types.NoSuchQueryLoggingConfig, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.NoSuchQueryLoggingConfig + if *v == nil { + sv = &types.NoSuchQueryLoggingConfig{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentNoSuchTrafficPolicy(v **types.NoSuchTrafficPolicy, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.NoSuchTrafficPolicy + if *v == nil { + sv = &types.NoSuchTrafficPolicy{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentNoSuchTrafficPolicyInstance(v **types.NoSuchTrafficPolicyInstance, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.NoSuchTrafficPolicyInstance + if *v == nil { + sv = &types.NoSuchTrafficPolicyInstance{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentNotAuthorizedException(v **types.NotAuthorizedException, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.NotAuthorizedException + if *v == nil { + sv = &types.NotAuthorizedException{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentPriorRequestNotComplete(v **types.PriorRequestNotComplete, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.PriorRequestNotComplete + if *v == nil { + sv = &types.PriorRequestNotComplete{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentPublicZoneVPCAssociation(v **types.PublicZoneVPCAssociation, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.PublicZoneVPCAssociation + if *v == nil { + sv = &types.PublicZoneVPCAssociation{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentQueryLoggingConfig(v **types.QueryLoggingConfig, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.QueryLoggingConfig + if *v == nil { + sv = &types.QueryLoggingConfig{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("CloudWatchLogsLogGroupArn", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.CloudWatchLogsLogGroupArn = ptr.String(xtv) + } + + case strings.EqualFold("HostedZoneId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.HostedZoneId = ptr.String(xtv) + } + + case strings.EqualFold("Id", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Id = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentQueryLoggingConfigAlreadyExists(v **types.QueryLoggingConfigAlreadyExists, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.QueryLoggingConfigAlreadyExists + if *v == nil { + sv = &types.QueryLoggingConfigAlreadyExists{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentQueryLoggingConfigs(v *[]types.QueryLoggingConfig, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.QueryLoggingConfig + if *v == nil { + sv = make([]types.QueryLoggingConfig, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("QueryLoggingConfig", t.Name.Local): + var col types.QueryLoggingConfig + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsRestxml_deserializeDocumentQueryLoggingConfig(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentQueryLoggingConfigsUnwrapped(v *[]types.QueryLoggingConfig, decoder smithyxml.NodeDecoder) error { + var sv []types.QueryLoggingConfig + if *v == nil { + sv = make([]types.QueryLoggingConfig, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.QueryLoggingConfig + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsRestxml_deserializeDocumentQueryLoggingConfig(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsRestxml_deserializeDocumentRecordData(v *[]string, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []string + if *v == nil { + sv = make([]string, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + decoder = memberDecoder + switch { + case strings.EqualFold("RecordDataEntry", t.Name.Local): + var col string + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + col = xtv + } + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentRecordDataUnwrapped(v *[]string, decoder smithyxml.NodeDecoder) error { + var sv []string + if *v == nil { + sv = make([]string, 0) + } else { + sv = *v + } + + switch { + default: + var mv string + t := decoder.StartEl + _ = t + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + mv = xtv + } + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsRestxml_deserializeDocumentResourceRecord(v **types.ResourceRecord, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.ResourceRecord + if *v == nil { + sv = &types.ResourceRecord{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Value", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Value = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentResourceRecords(v *[]types.ResourceRecord, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.ResourceRecord + if *v == nil { + sv = make([]types.ResourceRecord, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("ResourceRecord", t.Name.Local): + var col types.ResourceRecord + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsRestxml_deserializeDocumentResourceRecord(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentResourceRecordsUnwrapped(v *[]types.ResourceRecord, decoder smithyxml.NodeDecoder) error { + var sv []types.ResourceRecord + if *v == nil { + sv = make([]types.ResourceRecord, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.ResourceRecord + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsRestxml_deserializeDocumentResourceRecord(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsRestxml_deserializeDocumentResourceRecordSet(v **types.ResourceRecordSet, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.ResourceRecordSet + if *v == nil { + sv = &types.ResourceRecordSet{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("AliasTarget", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentAliasTarget(&sv.AliasTarget, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("CidrRoutingConfig", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentCidrRoutingConfig(&sv.CidrRoutingConfig, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Failover", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Failover = types.ResourceRecordSetFailover(xtv) + } + + case strings.EqualFold("GeoLocation", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentGeoLocation(&sv.GeoLocation, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("HealthCheckId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.HealthCheckId = ptr.String(xtv) + } + + case strings.EqualFold("MultiValueAnswer", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected ResourceRecordSetMultiValueAnswer to be of type *bool, got %T instead", val) + } + sv.MultiValueAnswer = ptr.Bool(xtv) + } + + case strings.EqualFold("Name", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Name = ptr.String(xtv) + } + + case strings.EqualFold("Region", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Region = types.ResourceRecordSetRegion(xtv) + } + + case strings.EqualFold("ResourceRecords", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentResourceRecords(&sv.ResourceRecords, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("SetIdentifier", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.SetIdentifier = ptr.String(xtv) + } + + case strings.EqualFold("TrafficPolicyInstanceId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.TrafficPolicyInstanceId = ptr.String(xtv) + } + + case strings.EqualFold("TTL", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.TTL = ptr.Int64(i64) + } + + case strings.EqualFold("Type", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Type = types.RRType(xtv) + } + + case strings.EqualFold("Weight", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.Weight = ptr.Int64(i64) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentResourceRecordSets(v *[]types.ResourceRecordSet, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.ResourceRecordSet + if *v == nil { + sv = make([]types.ResourceRecordSet, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("ResourceRecordSet", t.Name.Local): + var col types.ResourceRecordSet + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsRestxml_deserializeDocumentResourceRecordSet(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentResourceRecordSetsUnwrapped(v *[]types.ResourceRecordSet, decoder smithyxml.NodeDecoder) error { + var sv []types.ResourceRecordSet + if *v == nil { + sv = make([]types.ResourceRecordSet, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.ResourceRecordSet + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsRestxml_deserializeDocumentResourceRecordSet(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsRestxml_deserializeDocumentResourceTagSet(v **types.ResourceTagSet, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.ResourceTagSet + if *v == nil { + sv = &types.ResourceTagSet{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("ResourceId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.ResourceId = ptr.String(xtv) + } + + case strings.EqualFold("ResourceType", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.ResourceType = types.TagResourceType(xtv) + } + + case strings.EqualFold("Tags", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentResourceTagSetList(v *[]types.ResourceTagSet, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.ResourceTagSet + if *v == nil { + sv = make([]types.ResourceTagSet, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("ResourceTagSet", t.Name.Local): + var col types.ResourceTagSet + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsRestxml_deserializeDocumentResourceTagSet(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentResourceTagSetListUnwrapped(v *[]types.ResourceTagSet, decoder smithyxml.NodeDecoder) error { + var sv []types.ResourceTagSet + if *v == nil { + sv = make([]types.ResourceTagSet, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.ResourceTagSet + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsRestxml_deserializeDocumentResourceTagSet(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsRestxml_deserializeDocumentReusableDelegationSetLimit(v **types.ReusableDelegationSetLimit, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.ReusableDelegationSetLimit + if *v == nil { + sv = &types.ReusableDelegationSetLimit{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Type", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Type = types.ReusableDelegationSetLimitType(xtv) + } + + case strings.EqualFold("Value", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.Value = i64 + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentStatusReport(v **types.StatusReport, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.StatusReport + if *v == nil { + sv = &types.StatusReport{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("CheckedTime", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + t, err := smithytime.ParseDateTime(xtv) + if err != nil { + return err + } + sv.CheckedTime = ptr.Time(t) + } + + case strings.EqualFold("Status", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Status = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentTag(v **types.Tag, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.Tag + if *v == nil { + sv = &types.Tag{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Key", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Key = ptr.String(xtv) + } + + case strings.EqualFold("Value", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Value = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentTagList(v *[]types.Tag, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.Tag + if *v == nil { + sv = make([]types.Tag, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("Tag", t.Name.Local): + var col types.Tag + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsRestxml_deserializeDocumentTag(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentTagListUnwrapped(v *[]types.Tag, decoder smithyxml.NodeDecoder) error { + var sv []types.Tag + if *v == nil { + sv = make([]types.Tag, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.Tag + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsRestxml_deserializeDocumentTag(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsRestxml_deserializeDocumentThrottlingException(v **types.ThrottlingException, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.ThrottlingException + if *v == nil { + sv = &types.ThrottlingException{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentTooManyHealthChecks(v **types.TooManyHealthChecks, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.TooManyHealthChecks + if *v == nil { + sv = &types.TooManyHealthChecks{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentTooManyHostedZones(v **types.TooManyHostedZones, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.TooManyHostedZones + if *v == nil { + sv = &types.TooManyHostedZones{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentTooManyKeySigningKeys(v **types.TooManyKeySigningKeys, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.TooManyKeySigningKeys + if *v == nil { + sv = &types.TooManyKeySigningKeys{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentTooManyTrafficPolicies(v **types.TooManyTrafficPolicies, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.TooManyTrafficPolicies + if *v == nil { + sv = &types.TooManyTrafficPolicies{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentTooManyTrafficPolicyInstances(v **types.TooManyTrafficPolicyInstances, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.TooManyTrafficPolicyInstances + if *v == nil { + sv = &types.TooManyTrafficPolicyInstances{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentTooManyTrafficPolicyVersionsForCurrentPolicy(v **types.TooManyTrafficPolicyVersionsForCurrentPolicy, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.TooManyTrafficPolicyVersionsForCurrentPolicy + if *v == nil { + sv = &types.TooManyTrafficPolicyVersionsForCurrentPolicy{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentTooManyVPCAssociationAuthorizations(v **types.TooManyVPCAssociationAuthorizations, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.TooManyVPCAssociationAuthorizations + if *v == nil { + sv = &types.TooManyVPCAssociationAuthorizations{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentTrafficPolicies(v *[]types.TrafficPolicy, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.TrafficPolicy + if *v == nil { + sv = make([]types.TrafficPolicy, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("TrafficPolicy", t.Name.Local): + var col types.TrafficPolicy + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsRestxml_deserializeDocumentTrafficPolicy(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentTrafficPoliciesUnwrapped(v *[]types.TrafficPolicy, decoder smithyxml.NodeDecoder) error { + var sv []types.TrafficPolicy + if *v == nil { + sv = make([]types.TrafficPolicy, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.TrafficPolicy + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsRestxml_deserializeDocumentTrafficPolicy(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsRestxml_deserializeDocumentTrafficPolicy(v **types.TrafficPolicy, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.TrafficPolicy + if *v == nil { + sv = &types.TrafficPolicy{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Comment", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Comment = ptr.String(xtv) + } + + case strings.EqualFold("Document", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Document = ptr.String(xtv) + } + + case strings.EqualFold("Id", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Id = ptr.String(xtv) + } + + case strings.EqualFold("Name", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Name = ptr.String(xtv) + } + + case strings.EqualFold("Type", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Type = types.RRType(xtv) + } + + case strings.EqualFold("Version", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.Version = ptr.Int32(int32(i64)) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentTrafficPolicyAlreadyExists(v **types.TrafficPolicyAlreadyExists, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.TrafficPolicyAlreadyExists + if *v == nil { + sv = &types.TrafficPolicyAlreadyExists{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentTrafficPolicyInstance(v **types.TrafficPolicyInstance, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.TrafficPolicyInstance + if *v == nil { + sv = &types.TrafficPolicyInstance{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("HostedZoneId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.HostedZoneId = ptr.String(xtv) + } + + case strings.EqualFold("Id", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Id = ptr.String(xtv) + } + + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + case strings.EqualFold("Name", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Name = ptr.String(xtv) + } + + case strings.EqualFold("State", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.State = ptr.String(xtv) + } + + case strings.EqualFold("TrafficPolicyId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.TrafficPolicyId = ptr.String(xtv) + } + + case strings.EqualFold("TrafficPolicyType", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.TrafficPolicyType = types.RRType(xtv) + } + + case strings.EqualFold("TrafficPolicyVersion", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.TrafficPolicyVersion = ptr.Int32(int32(i64)) + } + + case strings.EqualFold("TTL", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.TTL = ptr.Int64(i64) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentTrafficPolicyInstanceAlreadyExists(v **types.TrafficPolicyInstanceAlreadyExists, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.TrafficPolicyInstanceAlreadyExists + if *v == nil { + sv = &types.TrafficPolicyInstanceAlreadyExists{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentTrafficPolicyInstances(v *[]types.TrafficPolicyInstance, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.TrafficPolicyInstance + if *v == nil { + sv = make([]types.TrafficPolicyInstance, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("TrafficPolicyInstance", t.Name.Local): + var col types.TrafficPolicyInstance + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsRestxml_deserializeDocumentTrafficPolicyInstance(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentTrafficPolicyInstancesUnwrapped(v *[]types.TrafficPolicyInstance, decoder smithyxml.NodeDecoder) error { + var sv []types.TrafficPolicyInstance + if *v == nil { + sv = make([]types.TrafficPolicyInstance, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.TrafficPolicyInstance + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsRestxml_deserializeDocumentTrafficPolicyInstance(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsRestxml_deserializeDocumentTrafficPolicyInUse(v **types.TrafficPolicyInUse, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.TrafficPolicyInUse + if *v == nil { + sv = &types.TrafficPolicyInUse{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentTrafficPolicySummaries(v *[]types.TrafficPolicySummary, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.TrafficPolicySummary + if *v == nil { + sv = make([]types.TrafficPolicySummary, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("TrafficPolicySummary", t.Name.Local): + var col types.TrafficPolicySummary + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsRestxml_deserializeDocumentTrafficPolicySummary(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentTrafficPolicySummariesUnwrapped(v *[]types.TrafficPolicySummary, decoder smithyxml.NodeDecoder) error { + var sv []types.TrafficPolicySummary + if *v == nil { + sv = make([]types.TrafficPolicySummary, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.TrafficPolicySummary + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsRestxml_deserializeDocumentTrafficPolicySummary(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsRestxml_deserializeDocumentTrafficPolicySummary(v **types.TrafficPolicySummary, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.TrafficPolicySummary + if *v == nil { + sv = &types.TrafficPolicySummary{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Id", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Id = ptr.String(xtv) + } + + case strings.EqualFold("LatestVersion", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.LatestVersion = ptr.Int32(int32(i64)) + } + + case strings.EqualFold("Name", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Name = ptr.String(xtv) + } + + case strings.EqualFold("TrafficPolicyCount", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.TrafficPolicyCount = ptr.Int32(int32(i64)) + } + + case strings.EqualFold("Type", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Type = types.RRType(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentVPC(v **types.VPC, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.VPC + if *v == nil { + sv = &types.VPC{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("VPCId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.VPCId = ptr.String(xtv) + } + + case strings.EqualFold("VPCRegion", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.VPCRegion = types.VPCRegion(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentVPCAssociationAuthorizationNotFound(v **types.VPCAssociationAuthorizationNotFound, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.VPCAssociationAuthorizationNotFound + if *v == nil { + sv = &types.VPCAssociationAuthorizationNotFound{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentVPCAssociationNotFound(v **types.VPCAssociationNotFound, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.VPCAssociationNotFound + if *v == nil { + sv = &types.VPCAssociationNotFound{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentVPCs(v *[]types.VPC, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.VPC + if *v == nil { + sv = make([]types.VPC, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("VPC", t.Name.Local): + var col types.VPC + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsRestxml_deserializeDocumentVPC(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentVPCsUnwrapped(v *[]types.VPC, decoder smithyxml.NodeDecoder) error { + var sv []types.VPC + if *v == nil { + sv = make([]types.VPC, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.VPC + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsRestxml_deserializeDocumentVPC(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/doc.go new file mode 100644 index 0000000..d36233e --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/doc.go @@ -0,0 +1,18 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +// Package route53 provides the API client, operations, and parameter types for +// Amazon Route 53. +// +// Amazon Route 53 is a highly available and scalable Domain Name System (DNS) web +// service. You can use Route 53 to: +// - Register domain names. For more information, see How domain registration +// works (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/welcome-domain-registration.html) +// . +// - Route internet traffic to the resources for your domain For more +// information, see How internet traffic is routed to your website or web +// application (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/welcome-dns-service.html) +// . +// - Check the health of your resources. For more information, see How Route 53 +// checks the health of your resources (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/welcome-health-checks.html) +// . +package route53 diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/endpoints.go new file mode 100644 index 0000000..b765109 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/endpoints.go @@ -0,0 +1,200 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package route53 + +import ( + "context" + "errors" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + internalendpoints "github.com/aws/aws-sdk-go-v2/service/route53/internal/endpoints" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "net/url" + "strings" +) + +// EndpointResolverOptions is the service endpoint resolver options +type EndpointResolverOptions = internalendpoints.Options + +// EndpointResolver interface for resolving service endpoints. +type EndpointResolver interface { + ResolveEndpoint(region string, options EndpointResolverOptions) (aws.Endpoint, error) +} + +var _ EndpointResolver = &internalendpoints.Resolver{} + +// NewDefaultEndpointResolver constructs a new service endpoint resolver +func NewDefaultEndpointResolver() *internalendpoints.Resolver { + return internalendpoints.New() +} + +// EndpointResolverFunc is a helper utility that wraps a function so it satisfies +// the EndpointResolver interface. This is useful when you want to add additional +// endpoint resolving logic, or stub out specific endpoints with custom values. +type EndpointResolverFunc func(region string, options EndpointResolverOptions) (aws.Endpoint, error) + +func (fn EndpointResolverFunc) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) { + return fn(region, options) +} + +func resolveDefaultEndpointConfiguration(o *Options) { + if o.EndpointResolver != nil { + return + } + o.EndpointResolver = NewDefaultEndpointResolver() +} + +// EndpointResolverFromURL returns an EndpointResolver configured using the +// provided endpoint url. By default, the resolved endpoint resolver uses the +// client region as signing region, and the endpoint source is set to +// EndpointSourceCustom.You can provide functional options to configure endpoint +// values for the resolved endpoint. +func EndpointResolverFromURL(url string, optFns ...func(*aws.Endpoint)) EndpointResolver { + e := aws.Endpoint{URL: url, Source: aws.EndpointSourceCustom} + for _, fn := range optFns { + fn(&e) + } + + return EndpointResolverFunc( + func(region string, options EndpointResolverOptions) (aws.Endpoint, error) { + if len(e.SigningRegion) == 0 { + e.SigningRegion = region + } + return e, nil + }, + ) +} + +type ResolveEndpoint struct { + Resolver EndpointResolver + Options EndpointResolverOptions +} + +func (*ResolveEndpoint) ID() string { + return "ResolveEndpoint" +} + +func (m *ResolveEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + if m.Resolver == nil { + return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") + } + + eo := m.Options + eo.Logger = middleware.GetLogger(ctx) + + var endpoint aws.Endpoint + endpoint, err = m.Resolver.ResolveEndpoint(awsmiddleware.GetRegion(ctx), eo) + if err != nil { + return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) + } + + req.URL, err = url.Parse(endpoint.URL) + if err != nil { + return out, metadata, fmt.Errorf("failed to parse endpoint URL: %w", err) + } + + if len(awsmiddleware.GetSigningName(ctx)) == 0 { + signingName := endpoint.SigningName + if len(signingName) == 0 { + signingName = "route53" + } + ctx = awsmiddleware.SetSigningName(ctx, signingName) + } + ctx = awsmiddleware.SetEndpointSource(ctx, endpoint.Source) + ctx = smithyhttp.SetHostnameImmutable(ctx, endpoint.HostnameImmutable) + ctx = awsmiddleware.SetSigningRegion(ctx, endpoint.SigningRegion) + ctx = awsmiddleware.SetPartitionID(ctx, endpoint.PartitionID) + return next.HandleSerialize(ctx, in) +} +func addResolveEndpointMiddleware(stack *middleware.Stack, o Options) error { + return stack.Serialize.Insert(&ResolveEndpoint{ + Resolver: o.EndpointResolver, + Options: o.EndpointOptions, + }, "OperationSerializer", middleware.Before) +} + +func removeResolveEndpointMiddleware(stack *middleware.Stack) error { + _, err := stack.Serialize.Remove((&ResolveEndpoint{}).ID()) + return err +} + +type wrappedEndpointResolver struct { + awsResolver aws.EndpointResolverWithOptions + resolver EndpointResolver +} + +func (w *wrappedEndpointResolver) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) { + if w.awsResolver == nil { + goto fallback + } + endpoint, err = w.awsResolver.ResolveEndpoint(ServiceID, region, options) + if err == nil { + return endpoint, nil + } + + if nf := (&aws.EndpointNotFoundError{}); !errors.As(err, &nf) { + return endpoint, err + } + +fallback: + if w.resolver == nil { + return endpoint, fmt.Errorf("default endpoint resolver provided was nil") + } + return w.resolver.ResolveEndpoint(region, options) +} + +type awsEndpointResolverAdaptor func(service, region string) (aws.Endpoint, error) + +func (a awsEndpointResolverAdaptor) ResolveEndpoint(service, region string, options ...interface{}) (aws.Endpoint, error) { + return a(service, region) +} + +var _ aws.EndpointResolverWithOptions = awsEndpointResolverAdaptor(nil) + +// withEndpointResolver returns an EndpointResolver that first delegates endpoint resolution to the awsResolver. +// If awsResolver returns aws.EndpointNotFoundError error, the resolver will use the the provided +// fallbackResolver for resolution. +// +// fallbackResolver must not be nil +func withEndpointResolver(awsResolver aws.EndpointResolver, awsResolverWithOptions aws.EndpointResolverWithOptions, fallbackResolver EndpointResolver) EndpointResolver { + var resolver aws.EndpointResolverWithOptions + + if awsResolverWithOptions != nil { + resolver = awsResolverWithOptions + } else if awsResolver != nil { + resolver = awsEndpointResolverAdaptor(awsResolver.ResolveEndpoint) + } + + return &wrappedEndpointResolver{ + awsResolver: resolver, + resolver: fallbackResolver, + } +} + +func finalizeClientEndpointResolverOptions(options *Options) { + options.EndpointOptions.LogDeprecated = options.ClientLogMode.IsDeprecatedUsage() + + if len(options.EndpointOptions.ResolvedRegion) == 0 { + const fipsInfix = "-fips-" + const fipsPrefix = "fips-" + const fipsSuffix = "-fips" + + if strings.Contains(options.Region, fipsInfix) || + strings.Contains(options.Region, fipsPrefix) || + strings.Contains(options.Region, fipsSuffix) { + options.EndpointOptions.ResolvedRegion = strings.ReplaceAll(strings.ReplaceAll(strings.ReplaceAll( + options.Region, fipsInfix, "-"), fipsPrefix, ""), fipsSuffix, "") + options.EndpointOptions.UseFIPSEndpoint = aws.FIPSEndpointStateEnabled + } + } + +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/generated.json b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/generated.json new file mode 100644 index 0000000..b10577e --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/generated.json @@ -0,0 +1,98 @@ +{ + "dependencies": { + "github.com/aws/aws-sdk-go-v2": "v1.4.0", + "github.com/aws/aws-sdk-go-v2/internal/configsources": "v0.0.0-00010101000000-000000000000", + "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2": "v2.0.0-00010101000000-000000000000", + "github.com/aws/smithy-go": "v1.4.0", + "github.com/jmespath/go-jmespath": "v0.4.0" + }, + "files": [ + "api_client.go", + "api_client_test.go", + "api_op_ActivateKeySigningKey.go", + "api_op_AssociateVPCWithHostedZone.go", + "api_op_ChangeCidrCollection.go", + "api_op_ChangeResourceRecordSets.go", + "api_op_ChangeTagsForResource.go", + "api_op_CreateCidrCollection.go", + "api_op_CreateHealthCheck.go", + "api_op_CreateHostedZone.go", + "api_op_CreateKeySigningKey.go", + "api_op_CreateQueryLoggingConfig.go", + "api_op_CreateReusableDelegationSet.go", + "api_op_CreateTrafficPolicy.go", + "api_op_CreateTrafficPolicyInstance.go", + "api_op_CreateTrafficPolicyVersion.go", + "api_op_CreateVPCAssociationAuthorization.go", + "api_op_DeactivateKeySigningKey.go", + "api_op_DeleteCidrCollection.go", + "api_op_DeleteHealthCheck.go", + "api_op_DeleteHostedZone.go", + "api_op_DeleteKeySigningKey.go", + "api_op_DeleteQueryLoggingConfig.go", + "api_op_DeleteReusableDelegationSet.go", + "api_op_DeleteTrafficPolicy.go", + "api_op_DeleteTrafficPolicyInstance.go", + "api_op_DeleteVPCAssociationAuthorization.go", + "api_op_DisableHostedZoneDNSSEC.go", + "api_op_DisassociateVPCFromHostedZone.go", + "api_op_EnableHostedZoneDNSSEC.go", + "api_op_GetAccountLimit.go", + "api_op_GetChange.go", + "api_op_GetCheckerIpRanges.go", + "api_op_GetDNSSEC.go", + "api_op_GetGeoLocation.go", + "api_op_GetHealthCheck.go", + "api_op_GetHealthCheckCount.go", + "api_op_GetHealthCheckLastFailureReason.go", + "api_op_GetHealthCheckStatus.go", + "api_op_GetHostedZone.go", + "api_op_GetHostedZoneCount.go", + "api_op_GetHostedZoneLimit.go", + "api_op_GetQueryLoggingConfig.go", + "api_op_GetReusableDelegationSet.go", + "api_op_GetReusableDelegationSetLimit.go", + "api_op_GetTrafficPolicy.go", + "api_op_GetTrafficPolicyInstance.go", + "api_op_GetTrafficPolicyInstanceCount.go", + "api_op_ListCidrBlocks.go", + "api_op_ListCidrCollections.go", + "api_op_ListCidrLocations.go", + "api_op_ListGeoLocations.go", + "api_op_ListHealthChecks.go", + "api_op_ListHostedZones.go", + "api_op_ListHostedZonesByName.go", + "api_op_ListHostedZonesByVPC.go", + "api_op_ListQueryLoggingConfigs.go", + "api_op_ListResourceRecordSets.go", + "api_op_ListReusableDelegationSets.go", + "api_op_ListTagsForResource.go", + "api_op_ListTagsForResources.go", + "api_op_ListTrafficPolicies.go", + "api_op_ListTrafficPolicyInstances.go", + "api_op_ListTrafficPolicyInstancesByHostedZone.go", + "api_op_ListTrafficPolicyInstancesByPolicy.go", + "api_op_ListTrafficPolicyVersions.go", + "api_op_ListVPCAssociationAuthorizations.go", + "api_op_TestDNSAnswer.go", + "api_op_UpdateHealthCheck.go", + "api_op_UpdateHostedZoneComment.go", + "api_op_UpdateTrafficPolicyComment.go", + "api_op_UpdateTrafficPolicyInstance.go", + "deserializers.go", + "doc.go", + "endpoints.go", + "generated.json", + "internal/endpoints/endpoints.go", + "internal/endpoints/endpoints_test.go", + "protocol_test.go", + "serializers.go", + "types/enums.go", + "types/errors.go", + "types/types.go", + "validators.go" + ], + "go": "1.15", + "module": "github.com/aws/aws-sdk-go-v2/service/route53", + "unstable": false +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/go_module_metadata.go new file mode 100644 index 0000000..04251e5 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/go_module_metadata.go @@ -0,0 +1,6 @@ +// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT. + +package route53 + +// goModuleVersion is the tagged release for this module +const goModuleVersion = "1.28.3" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/handwritten_paginators.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/handwritten_paginators.go new file mode 100644 index 0000000..2f397c8 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/handwritten_paginators.go @@ -0,0 +1,113 @@ +package route53 + +import ( + "context" + "fmt" + "github.com/aws/aws-sdk-go-v2/service/route53/types" +) + +// ListResourceRecordSetsAPIClient is a client that implements the ListResourceRecordSets +// operation +type ListResourceRecordSetsAPIClient interface { + ListResourceRecordSets(context.Context, *ListResourceRecordSetsInput, ...func(*Options)) (*ListResourceRecordSetsOutput, error) +} + +var _ ListResourceRecordSetsAPIClient = (*Client)(nil) + +// ListResourceRecordSetsPaginatorOptions is the paginator options for ListResourceRecordSets +type ListResourceRecordSetsPaginatorOptions struct { + // (Optional) The maximum number of ResourceRecordSets that you want Amazon Route 53 to + // return. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListResourceRecordSetsPaginator is a paginator for ListResourceRecordSets +type ListResourceRecordSetsPaginator struct { + options ListResourceRecordSetsPaginatorOptions + client ListResourceRecordSetsAPIClient + params *ListResourceRecordSetsInput + firstPage bool + startRecordName *string + startRecordType types.RRType + startRecordIdentifier *string + isTruncated bool +} + +// NewListResourceRecordSetsPaginator returns a new ListResourceRecordSetsPaginator +func NewListResourceRecordSetsPaginator(client ListResourceRecordSetsAPIClient, params *ListResourceRecordSetsInput, optFns ...func(*ListResourceRecordSetsPaginatorOptions)) *ListResourceRecordSetsPaginator { + if params == nil { + params = &ListResourceRecordSetsInput{} + } + + options := ListResourceRecordSetsPaginatorOptions{} + if params.MaxItems != nil { + options.Limit = *params.MaxItems + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListResourceRecordSetsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + startRecordName: params.StartRecordName, + startRecordType: params.StartRecordType, + startRecordIdentifier: params.StartRecordIdentifier, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListResourceRecordSetsPaginator) HasMorePages() bool { + return p.firstPage || p.isTruncated +} + +// NextPage retrieves the next ListResourceRecordSets page. +func (p *ListResourceRecordSetsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListResourceRecordSetsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.StartRecordName = p.startRecordName + params.StartRecordIdentifier = p.startRecordIdentifier + params.StartRecordType = p.startRecordType + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxItems = limit + + result, err := p.client.ListResourceRecordSets(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.startRecordName + p.isTruncated = result.IsTruncated + p.startRecordName = nil + p.startRecordIdentifier = nil + p.startRecordType = "" + if result.IsTruncated { + p.startRecordName = result.NextRecordName + p.startRecordIdentifier = result.NextRecordIdentifier + p.startRecordType = result.NextRecordType + } + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.startRecordName != nil && + *prevToken == *p.startRecordName { + p.isTruncated = false + } + + return result, nil +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/internal/customizations/custom_error_deser.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/internal/customizations/custom_error_deser.go new file mode 100644 index 0000000..466627d --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/internal/customizations/custom_error_deser.go @@ -0,0 +1,94 @@ +package customizations + +import ( + "bytes" + "context" + "encoding/xml" + "fmt" + "io" + "io/ioutil" + "strings" + + "github.com/aws/smithy-go" + smithyxml "github.com/aws/smithy-go/encoding/xml" + "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/ptr" + smithyhttp "github.com/aws/smithy-go/transport/http" + + awsmiddle "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/route53/types" +) + +// HandleCustomErrorDeserialization check if Route53 response is an error and needs +// custom error deserialization. +func HandleCustomErrorDeserialization(stack *middleware.Stack) error { + return stack.Deserialize.Insert(&processResponse{}, "OperationDeserializer", middleware.After) +} + +// middleware to process raw response and look for error response with InvalidChangeBatch error tag +type processResponse struct{} + +// ID returns the middleware ID. +func (*processResponse) ID() string { + return "Route53:ProcessResponseForCustomErrorResponse" +} + +func (m *processResponse) HandleDeserialize( + ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + // check if success response + if response.StatusCode >= 200 && response.StatusCode < 300 { + return + } + + var readBuff bytes.Buffer + body := io.TeeReader(response.Body, &readBuff) + + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + + // rewind response body + response.Body = ioutil.NopCloser(io.MultiReader(&readBuff, response.Body)) + + // if start tag is "InvalidChangeBatch", the error response needs custom unmarshaling. + if strings.EqualFold(t.Name.Local, "InvalidChangeBatch") { + return out, metadata, route53CustomErrorDeser(&metadata, response) + } + + return out, metadata, err +} + +// error type for invalidChangeBatchError +type invalidChangeBatchError struct { + Messages []string `xml:"Messages>Message"` + RequestID string `xml:"RequestId"` +} + +func route53CustomErrorDeser(metadata *middleware.Metadata, response *smithyhttp.Response) error { + err := invalidChangeBatchError{} + xml.NewDecoder(response.Body).Decode(&err) + + // set request id in metadata + if len(err.RequestID) != 0 { + awsmiddle.SetRequestIDMetadata(metadata, err.RequestID) + } + + return &types.InvalidChangeBatch{ + Message: ptr.String("ChangeBatch errors occurred"), + Messages: err.Messages, + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/internal/customizations/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/internal/customizations/doc.go new file mode 100644 index 0000000..a787a63 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/internal/customizations/doc.go @@ -0,0 +1,53 @@ +// Package customizations provides customizations for the Amazon Route53 API client. +// +// This package provides support for following customizations +// +// Process Response Middleware: used for custom error deserializing +// Sanitize URL Middleware: used for sanitizing url with HostedZoneID member +// +// # Process Response Middleware +// +// Route53 operation "ChangeResourceRecordSets" can have an error response returned in +// a slightly different format. This customization is only applicable to +// ChangeResourceRecordSets operation of Route53. +// +// Here's a sample error response: +// +// +// +// +// Tried to create resource record set duplicate.example.com. type A, but it already exists +// +// +// +// The processResponse middleware customizations enables SDK to check for an error +// response starting with "InvalidChangeBatch" tag prior to deserialization. +// +// As this check in error response needs to be performed earlier than response +// deserialization. Since the behavior of Deserialization is in +// reverse order to the other stack steps its easier to consider that "after" means +// "before". +// +// Middleware layering: +// +// HTTP Response -> process response error -> deserialize +// +// In case the returned error response has `InvalidChangeBatch` format, the error is +// deserialized and returned. The operation deserializer does not attempt to deserialize +// as an error is returned by the process response error middleware. +// +// # Sanitize URL Middleware +// +// Route53 operations may return a response containing an id member value appended with +// a string, for example. an id 1234 may be returned as 'foo/1234'. While round-tripping such response +// id value into another operation request, SDK must strip out the additional prefix if any. +// The Sanitize URL Middleware strips out such additionally prepended string to the id. +// +// The Id member with such prepended strings target shape 'ResourceId' or 'DelegationSetId'. +// This customization thus is applied only for operations with id's targeting those target shapes. +// This customization has to be applied before the input is serialized. +// +// Middleware layering: +// +// Input -> Sanitize URL Middleware -> serialize -> next +package customizations diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/internal/customizations/sanitizeurl.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/internal/customizations/sanitizeurl.go new file mode 100644 index 0000000..b3b9205 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/internal/customizations/sanitizeurl.go @@ -0,0 +1,63 @@ +package customizations + +import ( + "context" + "fmt" + + "github.com/aws/smithy-go" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// AddSanitizeURLMiddlewareOptions provides the options for Route53SanitizeURL middleware setup +type AddSanitizeURLMiddlewareOptions struct { + // functional pointer to sanitize hosted zone id member + // The function is intended to take an input value, + // look for hosted zone id input member and sanitize the value + // to strip out an excess `/hostedzone/` prefix that can be present in + // the hosted zone id input member. + // + // returns an error if any. + SanitizeURLInput func(interface{}) error +} + +// AddSanitizeURLMiddleware add the middleware necessary to modify Route53 input before op serialization. +func AddSanitizeURLMiddleware(stack *middleware.Stack, options AddSanitizeURLMiddlewareOptions) error { + return stack.Serialize.Insert(&sanitizeURL{ + sanitizeURLInput: options.SanitizeURLInput, + }, "OperationSerializer", middleware.Before) +} + +// sanitizeURL cleans up potential formatting issues in the Route53 path. +// +// Notably it will strip out an excess `/hostedzone/` prefix that can be present in +// the hosted zone id input member. That excess prefix is there because some route53 apis return +// the id in that format, so this middleware enables round-tripping those values. +type sanitizeURL struct { + sanitizeURLInput func(interface{}) error +} + +// ID returns the id for the middleware. +func (*sanitizeURL) ID() string { + return "Route53:SanitizeURL" +} + +// HandleSerialize implements the SerializeMiddleware interface. +func (m *sanitizeURL) HandleSerialize( + ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler, +) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{ + Err: fmt.Errorf("unknown request type %T", in.Request), + } + } + + if err := m.sanitizeURLInput(in.Parameters); err != nil { + return out, metadata, err + } + + return next.HandleSerialize(ctx, in) +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/internal/endpoints/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/internal/endpoints/endpoints.go new file mode 100644 index 0000000..e594dbf --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/internal/endpoints/endpoints.go @@ -0,0 +1,387 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package endpoints + +import ( + "github.com/aws/aws-sdk-go-v2/aws" + endpoints "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2" + "github.com/aws/smithy-go/logging" + "regexp" +) + +// Options is the endpoint resolver configuration options +type Options struct { + // Logger is a logging implementation that log events should be sent to. + Logger logging.Logger + + // LogDeprecated indicates that deprecated endpoints should be logged to the + // provided logger. + LogDeprecated bool + + // ResolvedRegion is used to override the region to be resolved, rather then the + // using the value passed to the ResolveEndpoint method. This value is used by the + // SDK to translate regions like fips-us-east-1 or us-east-1-fips to an alternative + // name. You must not set this value directly in your application. + ResolvedRegion string + + // DisableHTTPS informs the resolver to return an endpoint that does not use the + // HTTPS scheme. + DisableHTTPS bool + + // UseDualStackEndpoint specifies the resolver must resolve a dual-stack endpoint. + UseDualStackEndpoint aws.DualStackEndpointState + + // UseFIPSEndpoint specifies the resolver must resolve a FIPS endpoint. + UseFIPSEndpoint aws.FIPSEndpointState +} + +func (o Options) GetResolvedRegion() string { + return o.ResolvedRegion +} + +func (o Options) GetDisableHTTPS() bool { + return o.DisableHTTPS +} + +func (o Options) GetUseDualStackEndpoint() aws.DualStackEndpointState { + return o.UseDualStackEndpoint +} + +func (o Options) GetUseFIPSEndpoint() aws.FIPSEndpointState { + return o.UseFIPSEndpoint +} + +func transformToSharedOptions(options Options) endpoints.Options { + return endpoints.Options{ + Logger: options.Logger, + LogDeprecated: options.LogDeprecated, + ResolvedRegion: options.ResolvedRegion, + DisableHTTPS: options.DisableHTTPS, + UseDualStackEndpoint: options.UseDualStackEndpoint, + UseFIPSEndpoint: options.UseFIPSEndpoint, + } +} + +// Resolver Route 53 endpoint resolver +type Resolver struct { + partitions endpoints.Partitions +} + +// ResolveEndpoint resolves the service endpoint for the given region and options +func (r *Resolver) ResolveEndpoint(region string, options Options) (endpoint aws.Endpoint, err error) { + if len(region) == 0 { + return endpoint, &aws.MissingRegionError{} + } + + opt := transformToSharedOptions(options) + return r.partitions.ResolveEndpoint(region, opt) +} + +// New returns a new Resolver +func New() *Resolver { + return &Resolver{ + partitions: defaultPartitions, + } +} + +var partitionRegexp = struct { + Aws *regexp.Regexp + AwsCn *regexp.Regexp + AwsIso *regexp.Regexp + AwsIsoB *regexp.Regexp + AwsIsoE *regexp.Regexp + AwsIsoF *regexp.Regexp + AwsUsGov *regexp.Regexp +}{ + + Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$"), + AwsCn: regexp.MustCompile("^cn\\-\\w+\\-\\d+$"), + AwsIso: regexp.MustCompile("^us\\-iso\\-\\w+\\-\\d+$"), + AwsIsoB: regexp.MustCompile("^us\\-isob\\-\\w+\\-\\d+$"), + AwsIsoE: regexp.MustCompile("^eu\\-isoe\\-\\w+\\-\\d+$"), + AwsIsoF: regexp.MustCompile("^us\\-isof\\-\\w+\\-\\d+$"), + AwsUsGov: regexp.MustCompile("^us\\-gov\\-\\w+\\-\\d+$"), +} + +var defaultPartitions = endpoints.Partitions{ + { + ID: "aws", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.DualStackVariant, + }: { + Hostname: "route53.{region}.api.aws", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "route53-fips.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "route53-fips.{region}.api.aws", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "route53.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.Aws, + IsRegionalized: false, + PartitionEndpoint: "aws-global", + Endpoints: endpoints.Endpoints{ + endpoints.EndpointKey{ + Region: "aws-global", + }: endpoints.Endpoint{ + Hostname: "route53.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "us-east-1", + }, + }, + endpoints.EndpointKey{ + Region: "aws-global", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "route53-fips.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "us-east-1", + }, + }, + endpoints.EndpointKey{ + Region: "fips-aws-global", + }: endpoints.Endpoint{ + Hostname: "route53-fips.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "us-east-1", + }, + Deprecated: aws.TrueTernary, + }, + }, + }, + { + ID: "aws-cn", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.DualStackVariant, + }: { + Hostname: "route53.{region}.api.amazonwebservices.com.cn", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "route53-fips.{region}.amazonaws.com.cn", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "route53-fips.{region}.api.amazonwebservices.com.cn", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "route53.{region}.amazonaws.com.cn", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsCn, + IsRegionalized: false, + PartitionEndpoint: "aws-cn-global", + Endpoints: endpoints.Endpoints{ + endpoints.EndpointKey{ + Region: "aws-cn-global", + }: endpoints.Endpoint{ + Hostname: "route53.amazonaws.com.cn", + CredentialScope: endpoints.CredentialScope{ + Region: "cn-northwest-1", + }, + }, + }, + }, + { + ID: "aws-iso", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "route53-fips.{region}.c2s.ic.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "route53.{region}.c2s.ic.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsIso, + IsRegionalized: false, + PartitionEndpoint: "aws-iso-global", + Endpoints: endpoints.Endpoints{ + endpoints.EndpointKey{ + Region: "aws-iso-global", + }: endpoints.Endpoint{ + Hostname: "route53.c2s.ic.gov", + CredentialScope: endpoints.CredentialScope{ + Region: "us-iso-east-1", + }, + }, + }, + }, + { + ID: "aws-iso-b", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "route53-fips.{region}.sc2s.sgov.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "route53.{region}.sc2s.sgov.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsIsoB, + IsRegionalized: false, + PartitionEndpoint: "aws-iso-b-global", + Endpoints: endpoints.Endpoints{ + endpoints.EndpointKey{ + Region: "aws-iso-b-global", + }: endpoints.Endpoint{ + Hostname: "route53.sc2s.sgov.gov", + CredentialScope: endpoints.CredentialScope{ + Region: "us-isob-east-1", + }, + }, + }, + }, + { + ID: "aws-iso-e", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "route53-fips.{region}.cloud.adc-e.uk", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "route53.{region}.cloud.adc-e.uk", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsIsoE, + IsRegionalized: true, + }, + { + ID: "aws-iso-f", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "route53-fips.{region}.csp.hci.ic.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "route53.{region}.csp.hci.ic.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsIsoF, + IsRegionalized: true, + }, + { + ID: "aws-us-gov", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.DualStackVariant, + }: { + Hostname: "route53.{region}.api.aws", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "route53-fips.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "route53-fips.{region}.api.aws", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "route53.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsUsGov, + IsRegionalized: false, + PartitionEndpoint: "aws-us-gov-global", + Endpoints: endpoints.Endpoints{ + endpoints.EndpointKey{ + Region: "aws-us-gov-global", + }: endpoints.Endpoint{ + Hostname: "route53.us-gov.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "us-gov-west-1", + }, + }, + endpoints.EndpointKey{ + Region: "aws-us-gov-global", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "route53.us-gov.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "us-gov-west-1", + }, + }, + endpoints.EndpointKey{ + Region: "fips-aws-us-gov-global", + }: endpoints.Endpoint{ + Hostname: "route53.us-gov.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "us-gov-west-1", + }, + Deprecated: aws.TrueTernary, + }, + }, + }, +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/serializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/serializers.go new file mode 100644 index 0000000..1e1720a --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/serializers.go @@ -0,0 +1,6215 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package route53 + +import ( + "bytes" + "context" + "fmt" + "github.com/aws/aws-sdk-go-v2/service/route53/types" + smithy "github.com/aws/smithy-go" + "github.com/aws/smithy-go/encoding/httpbinding" + smithyxml "github.com/aws/smithy-go/encoding/xml" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +type awsRestxml_serializeOpActivateKeySigningKey struct { +} + +func (*awsRestxml_serializeOpActivateKeySigningKey) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpActivateKeySigningKey) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ActivateKeySigningKeyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2013-04-01/keysigningkey/{HostedZoneId}/{Name}/activate") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestxml_serializeOpHttpBindingsActivateKeySigningKeyInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestxml_serializeOpHttpBindingsActivateKeySigningKeyInput(v *ActivateKeySigningKeyInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.HostedZoneId == nil || len(*v.HostedZoneId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member HostedZoneId must not be empty")} + } + if v.HostedZoneId != nil { + if err := encoder.SetURI("HostedZoneId").String(*v.HostedZoneId); err != nil { + return err + } + } + + if v.Name == nil || len(*v.Name) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Name must not be empty")} + } + if v.Name != nil { + if err := encoder.SetURI("Name").String(*v.Name); err != nil { + return err + } + } + + return nil +} + +type awsRestxml_serializeOpAssociateVPCWithHostedZone struct { +} + +func (*awsRestxml_serializeOpAssociateVPCWithHostedZone) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpAssociateVPCWithHostedZone) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*AssociateVPCWithHostedZoneInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2013-04-01/hostedzone/{HostedZoneId}/associatevpc") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestxml_serializeOpHttpBindingsAssociateVPCWithHostedZoneInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/xml") + + xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "AssociateVPCWithHostedZoneRequest", + }, + Attr: rootAttr, + } + root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "https://route53.amazonaws.com/doc/2013-04-01/")) + if err := awsRestxml_serializeOpDocumentAssociateVPCWithHostedZoneInput(input, xmlEncoder.RootElement(root)); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestxml_serializeOpHttpBindingsAssociateVPCWithHostedZoneInput(v *AssociateVPCWithHostedZoneInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.HostedZoneId == nil || len(*v.HostedZoneId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member HostedZoneId must not be empty")} + } + if v.HostedZoneId != nil { + if err := encoder.SetURI("HostedZoneId").String(*v.HostedZoneId); err != nil { + return err + } + } + + return nil +} + +func awsRestxml_serializeOpDocumentAssociateVPCWithHostedZoneInput(v *AssociateVPCWithHostedZoneInput, value smithyxml.Value) error { + defer value.Close() + if v.Comment != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Comment", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.Comment) + } + if v.VPC != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "VPC", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentVPC(v.VPC, el); err != nil { + return err + } + } + return nil +} + +type awsRestxml_serializeOpChangeCidrCollection struct { +} + +func (*awsRestxml_serializeOpChangeCidrCollection) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpChangeCidrCollection) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ChangeCidrCollectionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2013-04-01/cidrcollection/{Id}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestxml_serializeOpHttpBindingsChangeCidrCollectionInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/xml") + + xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "ChangeCidrCollectionRequest", + }, + Attr: rootAttr, + } + root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "https://route53.amazonaws.com/doc/2013-04-01/")) + if err := awsRestxml_serializeOpDocumentChangeCidrCollectionInput(input, xmlEncoder.RootElement(root)); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestxml_serializeOpHttpBindingsChangeCidrCollectionInput(v *ChangeCidrCollectionInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Id == nil || len(*v.Id) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} + } + if v.Id != nil { + if err := encoder.SetURI("Id").String(*v.Id); err != nil { + return err + } + } + + return nil +} + +func awsRestxml_serializeOpDocumentChangeCidrCollectionInput(v *ChangeCidrCollectionInput, value smithyxml.Value) error { + defer value.Close() + if v.Changes != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Changes", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentCidrCollectionChanges(v.Changes, el); err != nil { + return err + } + } + if v.CollectionVersion != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "CollectionVersion", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Long(*v.CollectionVersion) + } + return nil +} + +type awsRestxml_serializeOpChangeResourceRecordSets struct { +} + +func (*awsRestxml_serializeOpChangeResourceRecordSets) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpChangeResourceRecordSets) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ChangeResourceRecordSetsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2013-04-01/hostedzone/{HostedZoneId}/rrset") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestxml_serializeOpHttpBindingsChangeResourceRecordSetsInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/xml") + + xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "ChangeResourceRecordSetsRequest", + }, + Attr: rootAttr, + } + root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "https://route53.amazonaws.com/doc/2013-04-01/")) + if err := awsRestxml_serializeOpDocumentChangeResourceRecordSetsInput(input, xmlEncoder.RootElement(root)); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestxml_serializeOpHttpBindingsChangeResourceRecordSetsInput(v *ChangeResourceRecordSetsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.HostedZoneId == nil || len(*v.HostedZoneId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member HostedZoneId must not be empty")} + } + if v.HostedZoneId != nil { + if err := encoder.SetURI("HostedZoneId").String(*v.HostedZoneId); err != nil { + return err + } + } + + return nil +} + +func awsRestxml_serializeOpDocumentChangeResourceRecordSetsInput(v *ChangeResourceRecordSetsInput, value smithyxml.Value) error { + defer value.Close() + if v.ChangeBatch != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "ChangeBatch", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentChangeBatch(v.ChangeBatch, el); err != nil { + return err + } + } + return nil +} + +type awsRestxml_serializeOpChangeTagsForResource struct { +} + +func (*awsRestxml_serializeOpChangeTagsForResource) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpChangeTagsForResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ChangeTagsForResourceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2013-04-01/tags/{ResourceType}/{ResourceId}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestxml_serializeOpHttpBindingsChangeTagsForResourceInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/xml") + + xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "ChangeTagsForResourceRequest", + }, + Attr: rootAttr, + } + root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "https://route53.amazonaws.com/doc/2013-04-01/")) + if err := awsRestxml_serializeOpDocumentChangeTagsForResourceInput(input, xmlEncoder.RootElement(root)); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestxml_serializeOpHttpBindingsChangeTagsForResourceInput(v *ChangeTagsForResourceInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ResourceId == nil || len(*v.ResourceId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ResourceId must not be empty")} + } + if v.ResourceId != nil { + if err := encoder.SetURI("ResourceId").String(*v.ResourceId); err != nil { + return err + } + } + + if len(v.ResourceType) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ResourceType must not be empty")} + } + if len(v.ResourceType) > 0 { + if err := encoder.SetURI("ResourceType").String(string(v.ResourceType)); err != nil { + return err + } + } + + return nil +} + +func awsRestxml_serializeOpDocumentChangeTagsForResourceInput(v *ChangeTagsForResourceInput, value smithyxml.Value) error { + defer value.Close() + if v.AddTags != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "AddTags", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentTagList(v.AddTags, el); err != nil { + return err + } + } + if v.RemoveTagKeys != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "RemoveTagKeys", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentTagKeyList(v.RemoveTagKeys, el); err != nil { + return err + } + } + return nil +} + +type awsRestxml_serializeOpCreateCidrCollection struct { +} + +func (*awsRestxml_serializeOpCreateCidrCollection) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpCreateCidrCollection) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*CreateCidrCollectionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2013-04-01/cidrcollection") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/xml") + + xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "CreateCidrCollectionRequest", + }, + Attr: rootAttr, + } + root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "https://route53.amazonaws.com/doc/2013-04-01/")) + if err := awsRestxml_serializeOpDocumentCreateCidrCollectionInput(input, xmlEncoder.RootElement(root)); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestxml_serializeOpHttpBindingsCreateCidrCollectionInput(v *CreateCidrCollectionInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestxml_serializeOpDocumentCreateCidrCollectionInput(v *CreateCidrCollectionInput, value smithyxml.Value) error { + defer value.Close() + if v.CallerReference != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "CallerReference", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.CallerReference) + } + if v.Name != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Name", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.Name) + } + return nil +} + +type awsRestxml_serializeOpCreateHealthCheck struct { +} + +func (*awsRestxml_serializeOpCreateHealthCheck) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpCreateHealthCheck) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*CreateHealthCheckInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2013-04-01/healthcheck") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/xml") + + xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "CreateHealthCheckRequest", + }, + Attr: rootAttr, + } + root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "https://route53.amazonaws.com/doc/2013-04-01/")) + if err := awsRestxml_serializeOpDocumentCreateHealthCheckInput(input, xmlEncoder.RootElement(root)); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestxml_serializeOpHttpBindingsCreateHealthCheckInput(v *CreateHealthCheckInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestxml_serializeOpDocumentCreateHealthCheckInput(v *CreateHealthCheckInput, value smithyxml.Value) error { + defer value.Close() + if v.CallerReference != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "CallerReference", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.CallerReference) + } + if v.HealthCheckConfig != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "HealthCheckConfig", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentHealthCheckConfig(v.HealthCheckConfig, el); err != nil { + return err + } + } + return nil +} + +type awsRestxml_serializeOpCreateHostedZone struct { +} + +func (*awsRestxml_serializeOpCreateHostedZone) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpCreateHostedZone) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*CreateHostedZoneInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2013-04-01/hostedzone") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/xml") + + xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "CreateHostedZoneRequest", + }, + Attr: rootAttr, + } + root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "https://route53.amazonaws.com/doc/2013-04-01/")) + if err := awsRestxml_serializeOpDocumentCreateHostedZoneInput(input, xmlEncoder.RootElement(root)); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestxml_serializeOpHttpBindingsCreateHostedZoneInput(v *CreateHostedZoneInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestxml_serializeOpDocumentCreateHostedZoneInput(v *CreateHostedZoneInput, value smithyxml.Value) error { + defer value.Close() + if v.CallerReference != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "CallerReference", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.CallerReference) + } + if v.DelegationSetId != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "DelegationSetId", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.DelegationSetId) + } + if v.HostedZoneConfig != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "HostedZoneConfig", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentHostedZoneConfig(v.HostedZoneConfig, el); err != nil { + return err + } + } + if v.Name != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Name", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.Name) + } + if v.VPC != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "VPC", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentVPC(v.VPC, el); err != nil { + return err + } + } + return nil +} + +type awsRestxml_serializeOpCreateKeySigningKey struct { +} + +func (*awsRestxml_serializeOpCreateKeySigningKey) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpCreateKeySigningKey) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*CreateKeySigningKeyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2013-04-01/keysigningkey") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/xml") + + xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "CreateKeySigningKeyRequest", + }, + Attr: rootAttr, + } + root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "https://route53.amazonaws.com/doc/2013-04-01/")) + if err := awsRestxml_serializeOpDocumentCreateKeySigningKeyInput(input, xmlEncoder.RootElement(root)); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestxml_serializeOpHttpBindingsCreateKeySigningKeyInput(v *CreateKeySigningKeyInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestxml_serializeOpDocumentCreateKeySigningKeyInput(v *CreateKeySigningKeyInput, value smithyxml.Value) error { + defer value.Close() + if v.CallerReference != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "CallerReference", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.CallerReference) + } + if v.HostedZoneId != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "HostedZoneId", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.HostedZoneId) + } + if v.KeyManagementServiceArn != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "KeyManagementServiceArn", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.KeyManagementServiceArn) + } + if v.Name != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Name", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.Name) + } + if v.Status != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Status", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.Status) + } + return nil +} + +type awsRestxml_serializeOpCreateQueryLoggingConfig struct { +} + +func (*awsRestxml_serializeOpCreateQueryLoggingConfig) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpCreateQueryLoggingConfig) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*CreateQueryLoggingConfigInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2013-04-01/queryloggingconfig") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/xml") + + xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "CreateQueryLoggingConfigRequest", + }, + Attr: rootAttr, + } + root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "https://route53.amazonaws.com/doc/2013-04-01/")) + if err := awsRestxml_serializeOpDocumentCreateQueryLoggingConfigInput(input, xmlEncoder.RootElement(root)); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestxml_serializeOpHttpBindingsCreateQueryLoggingConfigInput(v *CreateQueryLoggingConfigInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestxml_serializeOpDocumentCreateQueryLoggingConfigInput(v *CreateQueryLoggingConfigInput, value smithyxml.Value) error { + defer value.Close() + if v.CloudWatchLogsLogGroupArn != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "CloudWatchLogsLogGroupArn", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.CloudWatchLogsLogGroupArn) + } + if v.HostedZoneId != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "HostedZoneId", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.HostedZoneId) + } + return nil +} + +type awsRestxml_serializeOpCreateReusableDelegationSet struct { +} + +func (*awsRestxml_serializeOpCreateReusableDelegationSet) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpCreateReusableDelegationSet) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*CreateReusableDelegationSetInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2013-04-01/delegationset") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/xml") + + xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "CreateReusableDelegationSetRequest", + }, + Attr: rootAttr, + } + root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "https://route53.amazonaws.com/doc/2013-04-01/")) + if err := awsRestxml_serializeOpDocumentCreateReusableDelegationSetInput(input, xmlEncoder.RootElement(root)); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestxml_serializeOpHttpBindingsCreateReusableDelegationSetInput(v *CreateReusableDelegationSetInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestxml_serializeOpDocumentCreateReusableDelegationSetInput(v *CreateReusableDelegationSetInput, value smithyxml.Value) error { + defer value.Close() + if v.CallerReference != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "CallerReference", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.CallerReference) + } + if v.HostedZoneId != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "HostedZoneId", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.HostedZoneId) + } + return nil +} + +type awsRestxml_serializeOpCreateTrafficPolicy struct { +} + +func (*awsRestxml_serializeOpCreateTrafficPolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpCreateTrafficPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*CreateTrafficPolicyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2013-04-01/trafficpolicy") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/xml") + + xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "CreateTrafficPolicyRequest", + }, + Attr: rootAttr, + } + root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "https://route53.amazonaws.com/doc/2013-04-01/")) + if err := awsRestxml_serializeOpDocumentCreateTrafficPolicyInput(input, xmlEncoder.RootElement(root)); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestxml_serializeOpHttpBindingsCreateTrafficPolicyInput(v *CreateTrafficPolicyInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestxml_serializeOpDocumentCreateTrafficPolicyInput(v *CreateTrafficPolicyInput, value smithyxml.Value) error { + defer value.Close() + if v.Comment != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Comment", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.Comment) + } + if v.Document != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Document", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.Document) + } + if v.Name != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Name", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.Name) + } + return nil +} + +type awsRestxml_serializeOpCreateTrafficPolicyInstance struct { +} + +func (*awsRestxml_serializeOpCreateTrafficPolicyInstance) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpCreateTrafficPolicyInstance) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*CreateTrafficPolicyInstanceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2013-04-01/trafficpolicyinstance") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/xml") + + xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "CreateTrafficPolicyInstanceRequest", + }, + Attr: rootAttr, + } + root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "https://route53.amazonaws.com/doc/2013-04-01/")) + if err := awsRestxml_serializeOpDocumentCreateTrafficPolicyInstanceInput(input, xmlEncoder.RootElement(root)); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestxml_serializeOpHttpBindingsCreateTrafficPolicyInstanceInput(v *CreateTrafficPolicyInstanceInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestxml_serializeOpDocumentCreateTrafficPolicyInstanceInput(v *CreateTrafficPolicyInstanceInput, value smithyxml.Value) error { + defer value.Close() + if v.HostedZoneId != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "HostedZoneId", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.HostedZoneId) + } + if v.Name != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Name", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.Name) + } + if v.TrafficPolicyId != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "TrafficPolicyId", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.TrafficPolicyId) + } + if v.TrafficPolicyVersion != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "TrafficPolicyVersion", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Integer(*v.TrafficPolicyVersion) + } + if v.TTL != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "TTL", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Long(*v.TTL) + } + return nil +} + +type awsRestxml_serializeOpCreateTrafficPolicyVersion struct { +} + +func (*awsRestxml_serializeOpCreateTrafficPolicyVersion) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpCreateTrafficPolicyVersion) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*CreateTrafficPolicyVersionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2013-04-01/trafficpolicy/{Id}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestxml_serializeOpHttpBindingsCreateTrafficPolicyVersionInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/xml") + + xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "CreateTrafficPolicyVersionRequest", + }, + Attr: rootAttr, + } + root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "https://route53.amazonaws.com/doc/2013-04-01/")) + if err := awsRestxml_serializeOpDocumentCreateTrafficPolicyVersionInput(input, xmlEncoder.RootElement(root)); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestxml_serializeOpHttpBindingsCreateTrafficPolicyVersionInput(v *CreateTrafficPolicyVersionInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Id == nil || len(*v.Id) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} + } + if v.Id != nil { + if err := encoder.SetURI("Id").String(*v.Id); err != nil { + return err + } + } + + return nil +} + +func awsRestxml_serializeOpDocumentCreateTrafficPolicyVersionInput(v *CreateTrafficPolicyVersionInput, value smithyxml.Value) error { + defer value.Close() + if v.Comment != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Comment", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.Comment) + } + if v.Document != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Document", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.Document) + } + return nil +} + +type awsRestxml_serializeOpCreateVPCAssociationAuthorization struct { +} + +func (*awsRestxml_serializeOpCreateVPCAssociationAuthorization) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpCreateVPCAssociationAuthorization) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*CreateVPCAssociationAuthorizationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2013-04-01/hostedzone/{HostedZoneId}/authorizevpcassociation") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestxml_serializeOpHttpBindingsCreateVPCAssociationAuthorizationInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/xml") + + xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "CreateVPCAssociationAuthorizationRequest", + }, + Attr: rootAttr, + } + root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "https://route53.amazonaws.com/doc/2013-04-01/")) + if err := awsRestxml_serializeOpDocumentCreateVPCAssociationAuthorizationInput(input, xmlEncoder.RootElement(root)); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestxml_serializeOpHttpBindingsCreateVPCAssociationAuthorizationInput(v *CreateVPCAssociationAuthorizationInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.HostedZoneId == nil || len(*v.HostedZoneId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member HostedZoneId must not be empty")} + } + if v.HostedZoneId != nil { + if err := encoder.SetURI("HostedZoneId").String(*v.HostedZoneId); err != nil { + return err + } + } + + return nil +} + +func awsRestxml_serializeOpDocumentCreateVPCAssociationAuthorizationInput(v *CreateVPCAssociationAuthorizationInput, value smithyxml.Value) error { + defer value.Close() + if v.VPC != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "VPC", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentVPC(v.VPC, el); err != nil { + return err + } + } + return nil +} + +type awsRestxml_serializeOpDeactivateKeySigningKey struct { +} + +func (*awsRestxml_serializeOpDeactivateKeySigningKey) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpDeactivateKeySigningKey) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeactivateKeySigningKeyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2013-04-01/keysigningkey/{HostedZoneId}/{Name}/deactivate") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestxml_serializeOpHttpBindingsDeactivateKeySigningKeyInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestxml_serializeOpHttpBindingsDeactivateKeySigningKeyInput(v *DeactivateKeySigningKeyInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.HostedZoneId == nil || len(*v.HostedZoneId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member HostedZoneId must not be empty")} + } + if v.HostedZoneId != nil { + if err := encoder.SetURI("HostedZoneId").String(*v.HostedZoneId); err != nil { + return err + } + } + + if v.Name == nil || len(*v.Name) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Name must not be empty")} + } + if v.Name != nil { + if err := encoder.SetURI("Name").String(*v.Name); err != nil { + return err + } + } + + return nil +} + +type awsRestxml_serializeOpDeleteCidrCollection struct { +} + +func (*awsRestxml_serializeOpDeleteCidrCollection) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpDeleteCidrCollection) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteCidrCollectionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2013-04-01/cidrcollection/{Id}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestxml_serializeOpHttpBindingsDeleteCidrCollectionInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestxml_serializeOpHttpBindingsDeleteCidrCollectionInput(v *DeleteCidrCollectionInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Id == nil || len(*v.Id) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} + } + if v.Id != nil { + if err := encoder.SetURI("Id").String(*v.Id); err != nil { + return err + } + } + + return nil +} + +type awsRestxml_serializeOpDeleteHealthCheck struct { +} + +func (*awsRestxml_serializeOpDeleteHealthCheck) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpDeleteHealthCheck) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteHealthCheckInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2013-04-01/healthcheck/{HealthCheckId}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestxml_serializeOpHttpBindingsDeleteHealthCheckInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestxml_serializeOpHttpBindingsDeleteHealthCheckInput(v *DeleteHealthCheckInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.HealthCheckId == nil || len(*v.HealthCheckId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member HealthCheckId must not be empty")} + } + if v.HealthCheckId != nil { + if err := encoder.SetURI("HealthCheckId").String(*v.HealthCheckId); err != nil { + return err + } + } + + return nil +} + +type awsRestxml_serializeOpDeleteHostedZone struct { +} + +func (*awsRestxml_serializeOpDeleteHostedZone) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpDeleteHostedZone) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteHostedZoneInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2013-04-01/hostedzone/{Id}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestxml_serializeOpHttpBindingsDeleteHostedZoneInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestxml_serializeOpHttpBindingsDeleteHostedZoneInput(v *DeleteHostedZoneInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Id == nil || len(*v.Id) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} + } + if v.Id != nil { + if err := encoder.SetURI("Id").String(*v.Id); err != nil { + return err + } + } + + return nil +} + +type awsRestxml_serializeOpDeleteKeySigningKey struct { +} + +func (*awsRestxml_serializeOpDeleteKeySigningKey) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpDeleteKeySigningKey) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteKeySigningKeyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2013-04-01/keysigningkey/{HostedZoneId}/{Name}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestxml_serializeOpHttpBindingsDeleteKeySigningKeyInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestxml_serializeOpHttpBindingsDeleteKeySigningKeyInput(v *DeleteKeySigningKeyInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.HostedZoneId == nil || len(*v.HostedZoneId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member HostedZoneId must not be empty")} + } + if v.HostedZoneId != nil { + if err := encoder.SetURI("HostedZoneId").String(*v.HostedZoneId); err != nil { + return err + } + } + + if v.Name == nil || len(*v.Name) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Name must not be empty")} + } + if v.Name != nil { + if err := encoder.SetURI("Name").String(*v.Name); err != nil { + return err + } + } + + return nil +} + +type awsRestxml_serializeOpDeleteQueryLoggingConfig struct { +} + +func (*awsRestxml_serializeOpDeleteQueryLoggingConfig) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpDeleteQueryLoggingConfig) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteQueryLoggingConfigInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2013-04-01/queryloggingconfig/{Id}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestxml_serializeOpHttpBindingsDeleteQueryLoggingConfigInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestxml_serializeOpHttpBindingsDeleteQueryLoggingConfigInput(v *DeleteQueryLoggingConfigInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Id == nil || len(*v.Id) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} + } + if v.Id != nil { + if err := encoder.SetURI("Id").String(*v.Id); err != nil { + return err + } + } + + return nil +} + +type awsRestxml_serializeOpDeleteReusableDelegationSet struct { +} + +func (*awsRestxml_serializeOpDeleteReusableDelegationSet) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpDeleteReusableDelegationSet) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteReusableDelegationSetInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2013-04-01/delegationset/{Id}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestxml_serializeOpHttpBindingsDeleteReusableDelegationSetInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestxml_serializeOpHttpBindingsDeleteReusableDelegationSetInput(v *DeleteReusableDelegationSetInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Id == nil || len(*v.Id) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} + } + if v.Id != nil { + if err := encoder.SetURI("Id").String(*v.Id); err != nil { + return err + } + } + + return nil +} + +type awsRestxml_serializeOpDeleteTrafficPolicy struct { +} + +func (*awsRestxml_serializeOpDeleteTrafficPolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpDeleteTrafficPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteTrafficPolicyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2013-04-01/trafficpolicy/{Id}/{Version}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestxml_serializeOpHttpBindingsDeleteTrafficPolicyInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestxml_serializeOpHttpBindingsDeleteTrafficPolicyInput(v *DeleteTrafficPolicyInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Id == nil || len(*v.Id) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} + } + if v.Id != nil { + if err := encoder.SetURI("Id").String(*v.Id); err != nil { + return err + } + } + + if v.Version == nil { + return &smithy.SerializationError{Err: fmt.Errorf("input member Version must not be empty")} + } + if v.Version != nil { + if err := encoder.SetURI("Version").Integer(*v.Version); err != nil { + return err + } + } + + return nil +} + +type awsRestxml_serializeOpDeleteTrafficPolicyInstance struct { +} + +func (*awsRestxml_serializeOpDeleteTrafficPolicyInstance) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpDeleteTrafficPolicyInstance) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteTrafficPolicyInstanceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2013-04-01/trafficpolicyinstance/{Id}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestxml_serializeOpHttpBindingsDeleteTrafficPolicyInstanceInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestxml_serializeOpHttpBindingsDeleteTrafficPolicyInstanceInput(v *DeleteTrafficPolicyInstanceInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Id == nil || len(*v.Id) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} + } + if v.Id != nil { + if err := encoder.SetURI("Id").String(*v.Id); err != nil { + return err + } + } + + return nil +} + +type awsRestxml_serializeOpDeleteVPCAssociationAuthorization struct { +} + +func (*awsRestxml_serializeOpDeleteVPCAssociationAuthorization) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpDeleteVPCAssociationAuthorization) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteVPCAssociationAuthorizationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2013-04-01/hostedzone/{HostedZoneId}/deauthorizevpcassociation") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestxml_serializeOpHttpBindingsDeleteVPCAssociationAuthorizationInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/xml") + + xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "DeleteVPCAssociationAuthorizationRequest", + }, + Attr: rootAttr, + } + root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "https://route53.amazonaws.com/doc/2013-04-01/")) + if err := awsRestxml_serializeOpDocumentDeleteVPCAssociationAuthorizationInput(input, xmlEncoder.RootElement(root)); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestxml_serializeOpHttpBindingsDeleteVPCAssociationAuthorizationInput(v *DeleteVPCAssociationAuthorizationInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.HostedZoneId == nil || len(*v.HostedZoneId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member HostedZoneId must not be empty")} + } + if v.HostedZoneId != nil { + if err := encoder.SetURI("HostedZoneId").String(*v.HostedZoneId); err != nil { + return err + } + } + + return nil +} + +func awsRestxml_serializeOpDocumentDeleteVPCAssociationAuthorizationInput(v *DeleteVPCAssociationAuthorizationInput, value smithyxml.Value) error { + defer value.Close() + if v.VPC != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "VPC", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentVPC(v.VPC, el); err != nil { + return err + } + } + return nil +} + +type awsRestxml_serializeOpDisableHostedZoneDNSSEC struct { +} + +func (*awsRestxml_serializeOpDisableHostedZoneDNSSEC) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpDisableHostedZoneDNSSEC) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DisableHostedZoneDNSSECInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2013-04-01/hostedzone/{HostedZoneId}/disable-dnssec") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestxml_serializeOpHttpBindingsDisableHostedZoneDNSSECInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestxml_serializeOpHttpBindingsDisableHostedZoneDNSSECInput(v *DisableHostedZoneDNSSECInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.HostedZoneId == nil || len(*v.HostedZoneId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member HostedZoneId must not be empty")} + } + if v.HostedZoneId != nil { + if err := encoder.SetURI("HostedZoneId").String(*v.HostedZoneId); err != nil { + return err + } + } + + return nil +} + +type awsRestxml_serializeOpDisassociateVPCFromHostedZone struct { +} + +func (*awsRestxml_serializeOpDisassociateVPCFromHostedZone) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpDisassociateVPCFromHostedZone) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DisassociateVPCFromHostedZoneInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2013-04-01/hostedzone/{HostedZoneId}/disassociatevpc") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestxml_serializeOpHttpBindingsDisassociateVPCFromHostedZoneInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/xml") + + xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "DisassociateVPCFromHostedZoneRequest", + }, + Attr: rootAttr, + } + root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "https://route53.amazonaws.com/doc/2013-04-01/")) + if err := awsRestxml_serializeOpDocumentDisassociateVPCFromHostedZoneInput(input, xmlEncoder.RootElement(root)); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestxml_serializeOpHttpBindingsDisassociateVPCFromHostedZoneInput(v *DisassociateVPCFromHostedZoneInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.HostedZoneId == nil || len(*v.HostedZoneId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member HostedZoneId must not be empty")} + } + if v.HostedZoneId != nil { + if err := encoder.SetURI("HostedZoneId").String(*v.HostedZoneId); err != nil { + return err + } + } + + return nil +} + +func awsRestxml_serializeOpDocumentDisassociateVPCFromHostedZoneInput(v *DisassociateVPCFromHostedZoneInput, value smithyxml.Value) error { + defer value.Close() + if v.Comment != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Comment", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.Comment) + } + if v.VPC != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "VPC", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentVPC(v.VPC, el); err != nil { + return err + } + } + return nil +} + +type awsRestxml_serializeOpEnableHostedZoneDNSSEC struct { +} + +func (*awsRestxml_serializeOpEnableHostedZoneDNSSEC) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpEnableHostedZoneDNSSEC) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*EnableHostedZoneDNSSECInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2013-04-01/hostedzone/{HostedZoneId}/enable-dnssec") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestxml_serializeOpHttpBindingsEnableHostedZoneDNSSECInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestxml_serializeOpHttpBindingsEnableHostedZoneDNSSECInput(v *EnableHostedZoneDNSSECInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.HostedZoneId == nil || len(*v.HostedZoneId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member HostedZoneId must not be empty")} + } + if v.HostedZoneId != nil { + if err := encoder.SetURI("HostedZoneId").String(*v.HostedZoneId); err != nil { + return err + } + } + + return nil +} + +type awsRestxml_serializeOpGetAccountLimit struct { +} + +func (*awsRestxml_serializeOpGetAccountLimit) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpGetAccountLimit) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetAccountLimitInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2013-04-01/accountlimit/{Type}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestxml_serializeOpHttpBindingsGetAccountLimitInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestxml_serializeOpHttpBindingsGetAccountLimitInput(v *GetAccountLimitInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if len(v.Type) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Type must not be empty")} + } + if len(v.Type) > 0 { + if err := encoder.SetURI("Type").String(string(v.Type)); err != nil { + return err + } + } + + return nil +} + +type awsRestxml_serializeOpGetChange struct { +} + +func (*awsRestxml_serializeOpGetChange) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpGetChange) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetChangeInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2013-04-01/change/{Id}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestxml_serializeOpHttpBindingsGetChangeInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestxml_serializeOpHttpBindingsGetChangeInput(v *GetChangeInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Id == nil || len(*v.Id) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} + } + if v.Id != nil { + if err := encoder.SetURI("Id").String(*v.Id); err != nil { + return err + } + } + + return nil +} + +type awsRestxml_serializeOpGetCheckerIpRanges struct { +} + +func (*awsRestxml_serializeOpGetCheckerIpRanges) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpGetCheckerIpRanges) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetCheckerIpRangesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2013-04-01/checkeripranges") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestxml_serializeOpHttpBindingsGetCheckerIpRangesInput(v *GetCheckerIpRangesInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +type awsRestxml_serializeOpGetDNSSEC struct { +} + +func (*awsRestxml_serializeOpGetDNSSEC) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpGetDNSSEC) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetDNSSECInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2013-04-01/hostedzone/{HostedZoneId}/dnssec") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestxml_serializeOpHttpBindingsGetDNSSECInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestxml_serializeOpHttpBindingsGetDNSSECInput(v *GetDNSSECInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.HostedZoneId == nil || len(*v.HostedZoneId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member HostedZoneId must not be empty")} + } + if v.HostedZoneId != nil { + if err := encoder.SetURI("HostedZoneId").String(*v.HostedZoneId); err != nil { + return err + } + } + + return nil +} + +type awsRestxml_serializeOpGetGeoLocation struct { +} + +func (*awsRestxml_serializeOpGetGeoLocation) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpGetGeoLocation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetGeoLocationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2013-04-01/geolocation") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestxml_serializeOpHttpBindingsGetGeoLocationInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestxml_serializeOpHttpBindingsGetGeoLocationInput(v *GetGeoLocationInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ContinentCode != nil { + encoder.SetQuery("continentcode").String(*v.ContinentCode) + } + + if v.CountryCode != nil { + encoder.SetQuery("countrycode").String(*v.CountryCode) + } + + if v.SubdivisionCode != nil { + encoder.SetQuery("subdivisioncode").String(*v.SubdivisionCode) + } + + return nil +} + +type awsRestxml_serializeOpGetHealthCheck struct { +} + +func (*awsRestxml_serializeOpGetHealthCheck) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpGetHealthCheck) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetHealthCheckInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2013-04-01/healthcheck/{HealthCheckId}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestxml_serializeOpHttpBindingsGetHealthCheckInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestxml_serializeOpHttpBindingsGetHealthCheckInput(v *GetHealthCheckInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.HealthCheckId == nil || len(*v.HealthCheckId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member HealthCheckId must not be empty")} + } + if v.HealthCheckId != nil { + if err := encoder.SetURI("HealthCheckId").String(*v.HealthCheckId); err != nil { + return err + } + } + + return nil +} + +type awsRestxml_serializeOpGetHealthCheckCount struct { +} + +func (*awsRestxml_serializeOpGetHealthCheckCount) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpGetHealthCheckCount) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetHealthCheckCountInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2013-04-01/healthcheckcount") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestxml_serializeOpHttpBindingsGetHealthCheckCountInput(v *GetHealthCheckCountInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +type awsRestxml_serializeOpGetHealthCheckLastFailureReason struct { +} + +func (*awsRestxml_serializeOpGetHealthCheckLastFailureReason) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpGetHealthCheckLastFailureReason) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetHealthCheckLastFailureReasonInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2013-04-01/healthcheck/{HealthCheckId}/lastfailurereason") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestxml_serializeOpHttpBindingsGetHealthCheckLastFailureReasonInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestxml_serializeOpHttpBindingsGetHealthCheckLastFailureReasonInput(v *GetHealthCheckLastFailureReasonInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.HealthCheckId == nil || len(*v.HealthCheckId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member HealthCheckId must not be empty")} + } + if v.HealthCheckId != nil { + if err := encoder.SetURI("HealthCheckId").String(*v.HealthCheckId); err != nil { + return err + } + } + + return nil +} + +type awsRestxml_serializeOpGetHealthCheckStatus struct { +} + +func (*awsRestxml_serializeOpGetHealthCheckStatus) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpGetHealthCheckStatus) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetHealthCheckStatusInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2013-04-01/healthcheck/{HealthCheckId}/status") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestxml_serializeOpHttpBindingsGetHealthCheckStatusInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestxml_serializeOpHttpBindingsGetHealthCheckStatusInput(v *GetHealthCheckStatusInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.HealthCheckId == nil || len(*v.HealthCheckId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member HealthCheckId must not be empty")} + } + if v.HealthCheckId != nil { + if err := encoder.SetURI("HealthCheckId").String(*v.HealthCheckId); err != nil { + return err + } + } + + return nil +} + +type awsRestxml_serializeOpGetHostedZone struct { +} + +func (*awsRestxml_serializeOpGetHostedZone) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpGetHostedZone) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetHostedZoneInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2013-04-01/hostedzone/{Id}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestxml_serializeOpHttpBindingsGetHostedZoneInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestxml_serializeOpHttpBindingsGetHostedZoneInput(v *GetHostedZoneInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Id == nil || len(*v.Id) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} + } + if v.Id != nil { + if err := encoder.SetURI("Id").String(*v.Id); err != nil { + return err + } + } + + return nil +} + +type awsRestxml_serializeOpGetHostedZoneCount struct { +} + +func (*awsRestxml_serializeOpGetHostedZoneCount) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpGetHostedZoneCount) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetHostedZoneCountInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2013-04-01/hostedzonecount") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestxml_serializeOpHttpBindingsGetHostedZoneCountInput(v *GetHostedZoneCountInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +type awsRestxml_serializeOpGetHostedZoneLimit struct { +} + +func (*awsRestxml_serializeOpGetHostedZoneLimit) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpGetHostedZoneLimit) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetHostedZoneLimitInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2013-04-01/hostedzonelimit/{HostedZoneId}/{Type}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestxml_serializeOpHttpBindingsGetHostedZoneLimitInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestxml_serializeOpHttpBindingsGetHostedZoneLimitInput(v *GetHostedZoneLimitInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.HostedZoneId == nil || len(*v.HostedZoneId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member HostedZoneId must not be empty")} + } + if v.HostedZoneId != nil { + if err := encoder.SetURI("HostedZoneId").String(*v.HostedZoneId); err != nil { + return err + } + } + + if len(v.Type) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Type must not be empty")} + } + if len(v.Type) > 0 { + if err := encoder.SetURI("Type").String(string(v.Type)); err != nil { + return err + } + } + + return nil +} + +type awsRestxml_serializeOpGetQueryLoggingConfig struct { +} + +func (*awsRestxml_serializeOpGetQueryLoggingConfig) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpGetQueryLoggingConfig) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetQueryLoggingConfigInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2013-04-01/queryloggingconfig/{Id}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestxml_serializeOpHttpBindingsGetQueryLoggingConfigInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestxml_serializeOpHttpBindingsGetQueryLoggingConfigInput(v *GetQueryLoggingConfigInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Id == nil || len(*v.Id) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} + } + if v.Id != nil { + if err := encoder.SetURI("Id").String(*v.Id); err != nil { + return err + } + } + + return nil +} + +type awsRestxml_serializeOpGetReusableDelegationSet struct { +} + +func (*awsRestxml_serializeOpGetReusableDelegationSet) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpGetReusableDelegationSet) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetReusableDelegationSetInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2013-04-01/delegationset/{Id}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestxml_serializeOpHttpBindingsGetReusableDelegationSetInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestxml_serializeOpHttpBindingsGetReusableDelegationSetInput(v *GetReusableDelegationSetInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Id == nil || len(*v.Id) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} + } + if v.Id != nil { + if err := encoder.SetURI("Id").String(*v.Id); err != nil { + return err + } + } + + return nil +} + +type awsRestxml_serializeOpGetReusableDelegationSetLimit struct { +} + +func (*awsRestxml_serializeOpGetReusableDelegationSetLimit) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpGetReusableDelegationSetLimit) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetReusableDelegationSetLimitInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2013-04-01/reusabledelegationsetlimit/{DelegationSetId}/{Type}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestxml_serializeOpHttpBindingsGetReusableDelegationSetLimitInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestxml_serializeOpHttpBindingsGetReusableDelegationSetLimitInput(v *GetReusableDelegationSetLimitInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.DelegationSetId == nil || len(*v.DelegationSetId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member DelegationSetId must not be empty")} + } + if v.DelegationSetId != nil { + if err := encoder.SetURI("DelegationSetId").String(*v.DelegationSetId); err != nil { + return err + } + } + + if len(v.Type) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Type must not be empty")} + } + if len(v.Type) > 0 { + if err := encoder.SetURI("Type").String(string(v.Type)); err != nil { + return err + } + } + + return nil +} + +type awsRestxml_serializeOpGetTrafficPolicy struct { +} + +func (*awsRestxml_serializeOpGetTrafficPolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpGetTrafficPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetTrafficPolicyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2013-04-01/trafficpolicy/{Id}/{Version}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestxml_serializeOpHttpBindingsGetTrafficPolicyInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestxml_serializeOpHttpBindingsGetTrafficPolicyInput(v *GetTrafficPolicyInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Id == nil || len(*v.Id) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} + } + if v.Id != nil { + if err := encoder.SetURI("Id").String(*v.Id); err != nil { + return err + } + } + + if v.Version == nil { + return &smithy.SerializationError{Err: fmt.Errorf("input member Version must not be empty")} + } + if v.Version != nil { + if err := encoder.SetURI("Version").Integer(*v.Version); err != nil { + return err + } + } + + return nil +} + +type awsRestxml_serializeOpGetTrafficPolicyInstance struct { +} + +func (*awsRestxml_serializeOpGetTrafficPolicyInstance) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpGetTrafficPolicyInstance) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetTrafficPolicyInstanceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2013-04-01/trafficpolicyinstance/{Id}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestxml_serializeOpHttpBindingsGetTrafficPolicyInstanceInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestxml_serializeOpHttpBindingsGetTrafficPolicyInstanceInput(v *GetTrafficPolicyInstanceInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Id == nil || len(*v.Id) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} + } + if v.Id != nil { + if err := encoder.SetURI("Id").String(*v.Id); err != nil { + return err + } + } + + return nil +} + +type awsRestxml_serializeOpGetTrafficPolicyInstanceCount struct { +} + +func (*awsRestxml_serializeOpGetTrafficPolicyInstanceCount) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpGetTrafficPolicyInstanceCount) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetTrafficPolicyInstanceCountInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2013-04-01/trafficpolicyinstancecount") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestxml_serializeOpHttpBindingsGetTrafficPolicyInstanceCountInput(v *GetTrafficPolicyInstanceCountInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +type awsRestxml_serializeOpListCidrBlocks struct { +} + +func (*awsRestxml_serializeOpListCidrBlocks) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpListCidrBlocks) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListCidrBlocksInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2013-04-01/cidrcollection/{CollectionId}/cidrblocks") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestxml_serializeOpHttpBindingsListCidrBlocksInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestxml_serializeOpHttpBindingsListCidrBlocksInput(v *ListCidrBlocksInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.CollectionId == nil || len(*v.CollectionId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member CollectionId must not be empty")} + } + if v.CollectionId != nil { + if err := encoder.SetURI("CollectionId").String(*v.CollectionId); err != nil { + return err + } + } + + if v.LocationName != nil { + encoder.SetQuery("location").String(*v.LocationName) + } + + if v.MaxResults != nil { + encoder.SetQuery("maxresults").Integer(*v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("nexttoken").String(*v.NextToken) + } + + return nil +} + +type awsRestxml_serializeOpListCidrCollections struct { +} + +func (*awsRestxml_serializeOpListCidrCollections) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpListCidrCollections) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListCidrCollectionsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2013-04-01/cidrcollection") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestxml_serializeOpHttpBindingsListCidrCollectionsInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestxml_serializeOpHttpBindingsListCidrCollectionsInput(v *ListCidrCollectionsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.MaxResults != nil { + encoder.SetQuery("maxresults").Integer(*v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("nexttoken").String(*v.NextToken) + } + + return nil +} + +type awsRestxml_serializeOpListCidrLocations struct { +} + +func (*awsRestxml_serializeOpListCidrLocations) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpListCidrLocations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListCidrLocationsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2013-04-01/cidrcollection/{CollectionId}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestxml_serializeOpHttpBindingsListCidrLocationsInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestxml_serializeOpHttpBindingsListCidrLocationsInput(v *ListCidrLocationsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.CollectionId == nil || len(*v.CollectionId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member CollectionId must not be empty")} + } + if v.CollectionId != nil { + if err := encoder.SetURI("CollectionId").String(*v.CollectionId); err != nil { + return err + } + } + + if v.MaxResults != nil { + encoder.SetQuery("maxresults").Integer(*v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("nexttoken").String(*v.NextToken) + } + + return nil +} + +type awsRestxml_serializeOpListGeoLocations struct { +} + +func (*awsRestxml_serializeOpListGeoLocations) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpListGeoLocations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListGeoLocationsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2013-04-01/geolocations") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestxml_serializeOpHttpBindingsListGeoLocationsInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestxml_serializeOpHttpBindingsListGeoLocationsInput(v *ListGeoLocationsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.MaxItems != nil { + encoder.SetQuery("maxitems").Integer(*v.MaxItems) + } + + if v.StartContinentCode != nil { + encoder.SetQuery("startcontinentcode").String(*v.StartContinentCode) + } + + if v.StartCountryCode != nil { + encoder.SetQuery("startcountrycode").String(*v.StartCountryCode) + } + + if v.StartSubdivisionCode != nil { + encoder.SetQuery("startsubdivisioncode").String(*v.StartSubdivisionCode) + } + + return nil +} + +type awsRestxml_serializeOpListHealthChecks struct { +} + +func (*awsRestxml_serializeOpListHealthChecks) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpListHealthChecks) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListHealthChecksInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2013-04-01/healthcheck") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestxml_serializeOpHttpBindingsListHealthChecksInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestxml_serializeOpHttpBindingsListHealthChecksInput(v *ListHealthChecksInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Marker != nil { + encoder.SetQuery("marker").String(*v.Marker) + } + + if v.MaxItems != nil { + encoder.SetQuery("maxitems").Integer(*v.MaxItems) + } + + return nil +} + +type awsRestxml_serializeOpListHostedZones struct { +} + +func (*awsRestxml_serializeOpListHostedZones) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpListHostedZones) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListHostedZonesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2013-04-01/hostedzone") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestxml_serializeOpHttpBindingsListHostedZonesInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestxml_serializeOpHttpBindingsListHostedZonesInput(v *ListHostedZonesInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.DelegationSetId != nil { + encoder.SetQuery("delegationsetid").String(*v.DelegationSetId) + } + + if v.Marker != nil { + encoder.SetQuery("marker").String(*v.Marker) + } + + if v.MaxItems != nil { + encoder.SetQuery("maxitems").Integer(*v.MaxItems) + } + + return nil +} + +type awsRestxml_serializeOpListHostedZonesByName struct { +} + +func (*awsRestxml_serializeOpListHostedZonesByName) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpListHostedZonesByName) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListHostedZonesByNameInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2013-04-01/hostedzonesbyname") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestxml_serializeOpHttpBindingsListHostedZonesByNameInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestxml_serializeOpHttpBindingsListHostedZonesByNameInput(v *ListHostedZonesByNameInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.DNSName != nil { + encoder.SetQuery("dnsname").String(*v.DNSName) + } + + if v.HostedZoneId != nil { + encoder.SetQuery("hostedzoneid").String(*v.HostedZoneId) + } + + if v.MaxItems != nil { + encoder.SetQuery("maxitems").Integer(*v.MaxItems) + } + + return nil +} + +type awsRestxml_serializeOpListHostedZonesByVPC struct { +} + +func (*awsRestxml_serializeOpListHostedZonesByVPC) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpListHostedZonesByVPC) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListHostedZonesByVPCInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2013-04-01/hostedzonesbyvpc") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestxml_serializeOpHttpBindingsListHostedZonesByVPCInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestxml_serializeOpHttpBindingsListHostedZonesByVPCInput(v *ListHostedZonesByVPCInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.MaxItems != nil { + encoder.SetQuery("maxitems").Integer(*v.MaxItems) + } + + if v.NextToken != nil { + encoder.SetQuery("nexttoken").String(*v.NextToken) + } + + if v.VPCId != nil { + encoder.SetQuery("vpcid").String(*v.VPCId) + } + + if len(v.VPCRegion) > 0 { + encoder.SetQuery("vpcregion").String(string(v.VPCRegion)) + } + + return nil +} + +type awsRestxml_serializeOpListQueryLoggingConfigs struct { +} + +func (*awsRestxml_serializeOpListQueryLoggingConfigs) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpListQueryLoggingConfigs) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListQueryLoggingConfigsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2013-04-01/queryloggingconfig") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestxml_serializeOpHttpBindingsListQueryLoggingConfigsInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestxml_serializeOpHttpBindingsListQueryLoggingConfigsInput(v *ListQueryLoggingConfigsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.HostedZoneId != nil { + encoder.SetQuery("hostedzoneid").String(*v.HostedZoneId) + } + + if v.MaxResults != nil { + encoder.SetQuery("maxresults").Integer(*v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("nexttoken").String(*v.NextToken) + } + + return nil +} + +type awsRestxml_serializeOpListResourceRecordSets struct { +} + +func (*awsRestxml_serializeOpListResourceRecordSets) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpListResourceRecordSets) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListResourceRecordSetsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2013-04-01/hostedzone/{HostedZoneId}/rrset") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestxml_serializeOpHttpBindingsListResourceRecordSetsInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestxml_serializeOpHttpBindingsListResourceRecordSetsInput(v *ListResourceRecordSetsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.HostedZoneId == nil || len(*v.HostedZoneId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member HostedZoneId must not be empty")} + } + if v.HostedZoneId != nil { + if err := encoder.SetURI("HostedZoneId").String(*v.HostedZoneId); err != nil { + return err + } + } + + if v.MaxItems != nil { + encoder.SetQuery("maxitems").Integer(*v.MaxItems) + } + + if v.StartRecordIdentifier != nil { + encoder.SetQuery("identifier").String(*v.StartRecordIdentifier) + } + + if v.StartRecordName != nil { + encoder.SetQuery("name").String(*v.StartRecordName) + } + + if len(v.StartRecordType) > 0 { + encoder.SetQuery("type").String(string(v.StartRecordType)) + } + + return nil +} + +type awsRestxml_serializeOpListReusableDelegationSets struct { +} + +func (*awsRestxml_serializeOpListReusableDelegationSets) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpListReusableDelegationSets) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListReusableDelegationSetsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2013-04-01/delegationset") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestxml_serializeOpHttpBindingsListReusableDelegationSetsInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestxml_serializeOpHttpBindingsListReusableDelegationSetsInput(v *ListReusableDelegationSetsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Marker != nil { + encoder.SetQuery("marker").String(*v.Marker) + } + + if v.MaxItems != nil { + encoder.SetQuery("maxitems").Integer(*v.MaxItems) + } + + return nil +} + +type awsRestxml_serializeOpListTagsForResource struct { +} + +func (*awsRestxml_serializeOpListTagsForResource) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpListTagsForResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListTagsForResourceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2013-04-01/tags/{ResourceType}/{ResourceId}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestxml_serializeOpHttpBindingsListTagsForResourceInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestxml_serializeOpHttpBindingsListTagsForResourceInput(v *ListTagsForResourceInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ResourceId == nil || len(*v.ResourceId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ResourceId must not be empty")} + } + if v.ResourceId != nil { + if err := encoder.SetURI("ResourceId").String(*v.ResourceId); err != nil { + return err + } + } + + if len(v.ResourceType) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ResourceType must not be empty")} + } + if len(v.ResourceType) > 0 { + if err := encoder.SetURI("ResourceType").String(string(v.ResourceType)); err != nil { + return err + } + } + + return nil +} + +type awsRestxml_serializeOpListTagsForResources struct { +} + +func (*awsRestxml_serializeOpListTagsForResources) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpListTagsForResources) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListTagsForResourcesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2013-04-01/tags/{ResourceType}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestxml_serializeOpHttpBindingsListTagsForResourcesInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/xml") + + xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "ListTagsForResourcesRequest", + }, + Attr: rootAttr, + } + root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "https://route53.amazonaws.com/doc/2013-04-01/")) + if err := awsRestxml_serializeOpDocumentListTagsForResourcesInput(input, xmlEncoder.RootElement(root)); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestxml_serializeOpHttpBindingsListTagsForResourcesInput(v *ListTagsForResourcesInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if len(v.ResourceType) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ResourceType must not be empty")} + } + if len(v.ResourceType) > 0 { + if err := encoder.SetURI("ResourceType").String(string(v.ResourceType)); err != nil { + return err + } + } + + return nil +} + +func awsRestxml_serializeOpDocumentListTagsForResourcesInput(v *ListTagsForResourcesInput, value smithyxml.Value) error { + defer value.Close() + if v.ResourceIds != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "ResourceIds", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentTagResourceIdList(v.ResourceIds, el); err != nil { + return err + } + } + return nil +} + +type awsRestxml_serializeOpListTrafficPolicies struct { +} + +func (*awsRestxml_serializeOpListTrafficPolicies) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpListTrafficPolicies) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListTrafficPoliciesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2013-04-01/trafficpolicies") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestxml_serializeOpHttpBindingsListTrafficPoliciesInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestxml_serializeOpHttpBindingsListTrafficPoliciesInput(v *ListTrafficPoliciesInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.MaxItems != nil { + encoder.SetQuery("maxitems").Integer(*v.MaxItems) + } + + if v.TrafficPolicyIdMarker != nil { + encoder.SetQuery("trafficpolicyid").String(*v.TrafficPolicyIdMarker) + } + + return nil +} + +type awsRestxml_serializeOpListTrafficPolicyInstances struct { +} + +func (*awsRestxml_serializeOpListTrafficPolicyInstances) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpListTrafficPolicyInstances) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListTrafficPolicyInstancesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2013-04-01/trafficpolicyinstances") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestxml_serializeOpHttpBindingsListTrafficPolicyInstancesInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestxml_serializeOpHttpBindingsListTrafficPolicyInstancesInput(v *ListTrafficPolicyInstancesInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.HostedZoneIdMarker != nil { + encoder.SetQuery("hostedzoneid").String(*v.HostedZoneIdMarker) + } + + if v.MaxItems != nil { + encoder.SetQuery("maxitems").Integer(*v.MaxItems) + } + + if v.TrafficPolicyInstanceNameMarker != nil { + encoder.SetQuery("trafficpolicyinstancename").String(*v.TrafficPolicyInstanceNameMarker) + } + + if len(v.TrafficPolicyInstanceTypeMarker) > 0 { + encoder.SetQuery("trafficpolicyinstancetype").String(string(v.TrafficPolicyInstanceTypeMarker)) + } + + return nil +} + +type awsRestxml_serializeOpListTrafficPolicyInstancesByHostedZone struct { +} + +func (*awsRestxml_serializeOpListTrafficPolicyInstancesByHostedZone) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpListTrafficPolicyInstancesByHostedZone) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListTrafficPolicyInstancesByHostedZoneInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2013-04-01/trafficpolicyinstances/hostedzone") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestxml_serializeOpHttpBindingsListTrafficPolicyInstancesByHostedZoneInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestxml_serializeOpHttpBindingsListTrafficPolicyInstancesByHostedZoneInput(v *ListTrafficPolicyInstancesByHostedZoneInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.HostedZoneId != nil { + encoder.SetQuery("id").String(*v.HostedZoneId) + } + + if v.MaxItems != nil { + encoder.SetQuery("maxitems").Integer(*v.MaxItems) + } + + if v.TrafficPolicyInstanceNameMarker != nil { + encoder.SetQuery("trafficpolicyinstancename").String(*v.TrafficPolicyInstanceNameMarker) + } + + if len(v.TrafficPolicyInstanceTypeMarker) > 0 { + encoder.SetQuery("trafficpolicyinstancetype").String(string(v.TrafficPolicyInstanceTypeMarker)) + } + + return nil +} + +type awsRestxml_serializeOpListTrafficPolicyInstancesByPolicy struct { +} + +func (*awsRestxml_serializeOpListTrafficPolicyInstancesByPolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpListTrafficPolicyInstancesByPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListTrafficPolicyInstancesByPolicyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2013-04-01/trafficpolicyinstances/trafficpolicy") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestxml_serializeOpHttpBindingsListTrafficPolicyInstancesByPolicyInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestxml_serializeOpHttpBindingsListTrafficPolicyInstancesByPolicyInput(v *ListTrafficPolicyInstancesByPolicyInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.HostedZoneIdMarker != nil { + encoder.SetQuery("hostedzoneid").String(*v.HostedZoneIdMarker) + } + + if v.MaxItems != nil { + encoder.SetQuery("maxitems").Integer(*v.MaxItems) + } + + if v.TrafficPolicyId != nil { + encoder.SetQuery("id").String(*v.TrafficPolicyId) + } + + if v.TrafficPolicyInstanceNameMarker != nil { + encoder.SetQuery("trafficpolicyinstancename").String(*v.TrafficPolicyInstanceNameMarker) + } + + if len(v.TrafficPolicyInstanceTypeMarker) > 0 { + encoder.SetQuery("trafficpolicyinstancetype").String(string(v.TrafficPolicyInstanceTypeMarker)) + } + + if v.TrafficPolicyVersion != nil { + encoder.SetQuery("version").Integer(*v.TrafficPolicyVersion) + } + + return nil +} + +type awsRestxml_serializeOpListTrafficPolicyVersions struct { +} + +func (*awsRestxml_serializeOpListTrafficPolicyVersions) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpListTrafficPolicyVersions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListTrafficPolicyVersionsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2013-04-01/trafficpolicies/{Id}/versions") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestxml_serializeOpHttpBindingsListTrafficPolicyVersionsInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestxml_serializeOpHttpBindingsListTrafficPolicyVersionsInput(v *ListTrafficPolicyVersionsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Id == nil || len(*v.Id) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} + } + if v.Id != nil { + if err := encoder.SetURI("Id").String(*v.Id); err != nil { + return err + } + } + + if v.MaxItems != nil { + encoder.SetQuery("maxitems").Integer(*v.MaxItems) + } + + if v.TrafficPolicyVersionMarker != nil { + encoder.SetQuery("trafficpolicyversion").String(*v.TrafficPolicyVersionMarker) + } + + return nil +} + +type awsRestxml_serializeOpListVPCAssociationAuthorizations struct { +} + +func (*awsRestxml_serializeOpListVPCAssociationAuthorizations) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpListVPCAssociationAuthorizations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListVPCAssociationAuthorizationsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2013-04-01/hostedzone/{HostedZoneId}/authorizevpcassociation") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestxml_serializeOpHttpBindingsListVPCAssociationAuthorizationsInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestxml_serializeOpHttpBindingsListVPCAssociationAuthorizationsInput(v *ListVPCAssociationAuthorizationsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.HostedZoneId == nil || len(*v.HostedZoneId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member HostedZoneId must not be empty")} + } + if v.HostedZoneId != nil { + if err := encoder.SetURI("HostedZoneId").String(*v.HostedZoneId); err != nil { + return err + } + } + + if v.MaxResults != nil { + encoder.SetQuery("maxresults").Integer(*v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("nexttoken").String(*v.NextToken) + } + + return nil +} + +type awsRestxml_serializeOpTestDNSAnswer struct { +} + +func (*awsRestxml_serializeOpTestDNSAnswer) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpTestDNSAnswer) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*TestDNSAnswerInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2013-04-01/testdnsanswer") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestxml_serializeOpHttpBindingsTestDNSAnswerInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestxml_serializeOpHttpBindingsTestDNSAnswerInput(v *TestDNSAnswerInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.EDNS0ClientSubnetIP != nil { + encoder.SetQuery("edns0clientsubnetip").String(*v.EDNS0ClientSubnetIP) + } + + if v.EDNS0ClientSubnetMask != nil { + encoder.SetQuery("edns0clientsubnetmask").String(*v.EDNS0ClientSubnetMask) + } + + if v.HostedZoneId != nil { + encoder.SetQuery("hostedzoneid").String(*v.HostedZoneId) + } + + if v.RecordName != nil { + encoder.SetQuery("recordname").String(*v.RecordName) + } + + if len(v.RecordType) > 0 { + encoder.SetQuery("recordtype").String(string(v.RecordType)) + } + + if v.ResolverIP != nil { + encoder.SetQuery("resolverip").String(*v.ResolverIP) + } + + return nil +} + +type awsRestxml_serializeOpUpdateHealthCheck struct { +} + +func (*awsRestxml_serializeOpUpdateHealthCheck) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpUpdateHealthCheck) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UpdateHealthCheckInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2013-04-01/healthcheck/{HealthCheckId}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestxml_serializeOpHttpBindingsUpdateHealthCheckInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/xml") + + xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "UpdateHealthCheckRequest", + }, + Attr: rootAttr, + } + root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "https://route53.amazonaws.com/doc/2013-04-01/")) + if err := awsRestxml_serializeOpDocumentUpdateHealthCheckInput(input, xmlEncoder.RootElement(root)); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestxml_serializeOpHttpBindingsUpdateHealthCheckInput(v *UpdateHealthCheckInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.HealthCheckId == nil || len(*v.HealthCheckId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member HealthCheckId must not be empty")} + } + if v.HealthCheckId != nil { + if err := encoder.SetURI("HealthCheckId").String(*v.HealthCheckId); err != nil { + return err + } + } + + return nil +} + +func awsRestxml_serializeOpDocumentUpdateHealthCheckInput(v *UpdateHealthCheckInput, value smithyxml.Value) error { + defer value.Close() + if v.AlarmIdentifier != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "AlarmIdentifier", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentAlarmIdentifier(v.AlarmIdentifier, el); err != nil { + return err + } + } + if v.ChildHealthChecks != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "ChildHealthChecks", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentChildHealthCheckList(v.ChildHealthChecks, el); err != nil { + return err + } + } + if v.Disabled != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Disabled", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Boolean(*v.Disabled) + } + if v.EnableSNI != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "EnableSNI", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Boolean(*v.EnableSNI) + } + if v.FailureThreshold != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "FailureThreshold", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Integer(*v.FailureThreshold) + } + if v.FullyQualifiedDomainName != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "FullyQualifiedDomainName", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.FullyQualifiedDomainName) + } + if v.HealthCheckVersion != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "HealthCheckVersion", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Long(*v.HealthCheckVersion) + } + if v.HealthThreshold != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "HealthThreshold", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Integer(*v.HealthThreshold) + } + if len(v.InsufficientDataHealthStatus) > 0 { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "InsufficientDataHealthStatus", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(string(v.InsufficientDataHealthStatus)) + } + if v.Inverted != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Inverted", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Boolean(*v.Inverted) + } + if v.IPAddress != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "IPAddress", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.IPAddress) + } + if v.Port != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Port", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Integer(*v.Port) + } + if v.Regions != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Regions", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentHealthCheckRegionList(v.Regions, el); err != nil { + return err + } + } + if v.ResetElements != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "ResetElements", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentResettableElementNameList(v.ResetElements, el); err != nil { + return err + } + } + if v.ResourcePath != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "ResourcePath", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.ResourcePath) + } + if v.SearchString != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "SearchString", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.SearchString) + } + return nil +} + +type awsRestxml_serializeOpUpdateHostedZoneComment struct { +} + +func (*awsRestxml_serializeOpUpdateHostedZoneComment) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpUpdateHostedZoneComment) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UpdateHostedZoneCommentInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2013-04-01/hostedzone/{Id}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestxml_serializeOpHttpBindingsUpdateHostedZoneCommentInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/xml") + + xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "UpdateHostedZoneCommentRequest", + }, + Attr: rootAttr, + } + root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "https://route53.amazonaws.com/doc/2013-04-01/")) + if err := awsRestxml_serializeOpDocumentUpdateHostedZoneCommentInput(input, xmlEncoder.RootElement(root)); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestxml_serializeOpHttpBindingsUpdateHostedZoneCommentInput(v *UpdateHostedZoneCommentInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Id == nil || len(*v.Id) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} + } + if v.Id != nil { + if err := encoder.SetURI("Id").String(*v.Id); err != nil { + return err + } + } + + return nil +} + +func awsRestxml_serializeOpDocumentUpdateHostedZoneCommentInput(v *UpdateHostedZoneCommentInput, value smithyxml.Value) error { + defer value.Close() + if v.Comment != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Comment", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.Comment) + } + return nil +} + +type awsRestxml_serializeOpUpdateTrafficPolicyComment struct { +} + +func (*awsRestxml_serializeOpUpdateTrafficPolicyComment) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpUpdateTrafficPolicyComment) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UpdateTrafficPolicyCommentInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2013-04-01/trafficpolicy/{Id}/{Version}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestxml_serializeOpHttpBindingsUpdateTrafficPolicyCommentInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/xml") + + xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "UpdateTrafficPolicyCommentRequest", + }, + Attr: rootAttr, + } + root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "https://route53.amazonaws.com/doc/2013-04-01/")) + if err := awsRestxml_serializeOpDocumentUpdateTrafficPolicyCommentInput(input, xmlEncoder.RootElement(root)); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestxml_serializeOpHttpBindingsUpdateTrafficPolicyCommentInput(v *UpdateTrafficPolicyCommentInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Id == nil || len(*v.Id) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} + } + if v.Id != nil { + if err := encoder.SetURI("Id").String(*v.Id); err != nil { + return err + } + } + + if v.Version == nil { + return &smithy.SerializationError{Err: fmt.Errorf("input member Version must not be empty")} + } + if v.Version != nil { + if err := encoder.SetURI("Version").Integer(*v.Version); err != nil { + return err + } + } + + return nil +} + +func awsRestxml_serializeOpDocumentUpdateTrafficPolicyCommentInput(v *UpdateTrafficPolicyCommentInput, value smithyxml.Value) error { + defer value.Close() + if v.Comment != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Comment", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.Comment) + } + return nil +} + +type awsRestxml_serializeOpUpdateTrafficPolicyInstance struct { +} + +func (*awsRestxml_serializeOpUpdateTrafficPolicyInstance) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpUpdateTrafficPolicyInstance) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UpdateTrafficPolicyInstanceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2013-04-01/trafficpolicyinstance/{Id}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestxml_serializeOpHttpBindingsUpdateTrafficPolicyInstanceInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/xml") + + xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "UpdateTrafficPolicyInstanceRequest", + }, + Attr: rootAttr, + } + root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "https://route53.amazonaws.com/doc/2013-04-01/")) + if err := awsRestxml_serializeOpDocumentUpdateTrafficPolicyInstanceInput(input, xmlEncoder.RootElement(root)); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestxml_serializeOpHttpBindingsUpdateTrafficPolicyInstanceInput(v *UpdateTrafficPolicyInstanceInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Id == nil || len(*v.Id) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} + } + if v.Id != nil { + if err := encoder.SetURI("Id").String(*v.Id); err != nil { + return err + } + } + + return nil +} + +func awsRestxml_serializeOpDocumentUpdateTrafficPolicyInstanceInput(v *UpdateTrafficPolicyInstanceInput, value smithyxml.Value) error { + defer value.Close() + if v.TrafficPolicyId != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "TrafficPolicyId", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.TrafficPolicyId) + } + if v.TrafficPolicyVersion != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "TrafficPolicyVersion", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Integer(*v.TrafficPolicyVersion) + } + if v.TTL != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "TTL", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Long(*v.TTL) + } + return nil +} + +func awsRestxml_serializeDocumentAlarmIdentifier(v *types.AlarmIdentifier, value smithyxml.Value) error { + defer value.Close() + if v.Name != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Name", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.Name) + } + if len(v.Region) > 0 { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Region", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(string(v.Region)) + } + return nil +} + +func awsRestxml_serializeDocumentAliasTarget(v *types.AliasTarget, value smithyxml.Value) error { + defer value.Close() + if v.DNSName != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "DNSName", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.DNSName) + } + { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "EvaluateTargetHealth", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Boolean(v.EvaluateTargetHealth) + } + if v.HostedZoneId != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "HostedZoneId", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.HostedZoneId) + } + return nil +} + +func awsRestxml_serializeDocumentChange(v *types.Change, value smithyxml.Value) error { + defer value.Close() + if len(v.Action) > 0 { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Action", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(string(v.Action)) + } + if v.ResourceRecordSet != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "ResourceRecordSet", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentResourceRecordSet(v.ResourceRecordSet, el); err != nil { + return err + } + } + return nil +} + +func awsRestxml_serializeDocumentChangeBatch(v *types.ChangeBatch, value smithyxml.Value) error { + defer value.Close() + if v.Changes != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Changes", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentChanges(v.Changes, el); err != nil { + return err + } + } + if v.Comment != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Comment", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.Comment) + } + return nil +} + +func awsRestxml_serializeDocumentChanges(v []types.Change, value smithyxml.Value) error { + var array *smithyxml.Array + if !value.IsFlattened() { + defer value.Close() + } + customMemberNameAttr := []smithyxml.Attr{} + customMemberName := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Change", + }, + Attr: customMemberNameAttr, + } + array = value.ArrayWithCustomName(customMemberName) + for i := range v { + am := array.Member() + if err := awsRestxml_serializeDocumentChange(&v[i], am); err != nil { + return err + } + } + return nil +} + +func awsRestxml_serializeDocumentChildHealthCheckList(v []string, value smithyxml.Value) error { + var array *smithyxml.Array + if !value.IsFlattened() { + defer value.Close() + } + customMemberNameAttr := []smithyxml.Attr{} + customMemberName := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "ChildHealthCheck", + }, + Attr: customMemberNameAttr, + } + array = value.ArrayWithCustomName(customMemberName) + for i := range v { + am := array.Member() + am.String(v[i]) + } + return nil +} + +func awsRestxml_serializeDocumentCidrCollectionChange(v *types.CidrCollectionChange, value smithyxml.Value) error { + defer value.Close() + if len(v.Action) > 0 { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Action", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(string(v.Action)) + } + if v.CidrList != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "CidrList", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentCidrList(v.CidrList, el); err != nil { + return err + } + } + if v.LocationName != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "LocationName", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.LocationName) + } + return nil +} + +func awsRestxml_serializeDocumentCidrCollectionChanges(v []types.CidrCollectionChange, value smithyxml.Value) error { + var array *smithyxml.Array + if !value.IsFlattened() { + defer value.Close() + } + array = value.Array() + for i := range v { + am := array.Member() + if err := awsRestxml_serializeDocumentCidrCollectionChange(&v[i], am); err != nil { + return err + } + } + return nil +} + +func awsRestxml_serializeDocumentCidrList(v []string, value smithyxml.Value) error { + var array *smithyxml.Array + if !value.IsFlattened() { + defer value.Close() + } + customMemberNameAttr := []smithyxml.Attr{} + customMemberName := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Cidr", + }, + Attr: customMemberNameAttr, + } + array = value.ArrayWithCustomName(customMemberName) + for i := range v { + am := array.Member() + am.String(v[i]) + } + return nil +} + +func awsRestxml_serializeDocumentCidrRoutingConfig(v *types.CidrRoutingConfig, value smithyxml.Value) error { + defer value.Close() + if v.CollectionId != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "CollectionId", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.CollectionId) + } + if v.LocationName != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "LocationName", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.LocationName) + } + return nil +} + +func awsRestxml_serializeDocumentGeoLocation(v *types.GeoLocation, value smithyxml.Value) error { + defer value.Close() + if v.ContinentCode != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "ContinentCode", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.ContinentCode) + } + if v.CountryCode != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "CountryCode", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.CountryCode) + } + if v.SubdivisionCode != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "SubdivisionCode", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.SubdivisionCode) + } + return nil +} + +func awsRestxml_serializeDocumentHealthCheckConfig(v *types.HealthCheckConfig, value smithyxml.Value) error { + defer value.Close() + if v.AlarmIdentifier != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "AlarmIdentifier", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentAlarmIdentifier(v.AlarmIdentifier, el); err != nil { + return err + } + } + if v.ChildHealthChecks != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "ChildHealthChecks", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentChildHealthCheckList(v.ChildHealthChecks, el); err != nil { + return err + } + } + if v.Disabled != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Disabled", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Boolean(*v.Disabled) + } + if v.EnableSNI != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "EnableSNI", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Boolean(*v.EnableSNI) + } + if v.FailureThreshold != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "FailureThreshold", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Integer(*v.FailureThreshold) + } + if v.FullyQualifiedDomainName != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "FullyQualifiedDomainName", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.FullyQualifiedDomainName) + } + if v.HealthThreshold != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "HealthThreshold", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Integer(*v.HealthThreshold) + } + if len(v.InsufficientDataHealthStatus) > 0 { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "InsufficientDataHealthStatus", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(string(v.InsufficientDataHealthStatus)) + } + if v.Inverted != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Inverted", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Boolean(*v.Inverted) + } + if v.IPAddress != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "IPAddress", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.IPAddress) + } + if v.MeasureLatency != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "MeasureLatency", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Boolean(*v.MeasureLatency) + } + if v.Port != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Port", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Integer(*v.Port) + } + if v.Regions != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Regions", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentHealthCheckRegionList(v.Regions, el); err != nil { + return err + } + } + if v.RequestInterval != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "RequestInterval", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Integer(*v.RequestInterval) + } + if v.ResourcePath != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "ResourcePath", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.ResourcePath) + } + if v.RoutingControlArn != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "RoutingControlArn", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.RoutingControlArn) + } + if v.SearchString != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "SearchString", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.SearchString) + } + if len(v.Type) > 0 { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Type", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(string(v.Type)) + } + return nil +} + +func awsRestxml_serializeDocumentHealthCheckRegionList(v []types.HealthCheckRegion, value smithyxml.Value) error { + var array *smithyxml.Array + if !value.IsFlattened() { + defer value.Close() + } + customMemberNameAttr := []smithyxml.Attr{} + customMemberName := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Region", + }, + Attr: customMemberNameAttr, + } + array = value.ArrayWithCustomName(customMemberName) + for i := range v { + am := array.Member() + am.String(string(v[i])) + } + return nil +} + +func awsRestxml_serializeDocumentHostedZoneConfig(v *types.HostedZoneConfig, value smithyxml.Value) error { + defer value.Close() + if v.Comment != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Comment", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.Comment) + } + if v.PrivateZone { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "PrivateZone", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Boolean(v.PrivateZone) + } + return nil +} + +func awsRestxml_serializeDocumentResettableElementNameList(v []types.ResettableElementName, value smithyxml.Value) error { + var array *smithyxml.Array + if !value.IsFlattened() { + defer value.Close() + } + customMemberNameAttr := []smithyxml.Attr{} + customMemberName := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "ResettableElementName", + }, + Attr: customMemberNameAttr, + } + array = value.ArrayWithCustomName(customMemberName) + for i := range v { + am := array.Member() + am.String(string(v[i])) + } + return nil +} + +func awsRestxml_serializeDocumentResourceRecord(v *types.ResourceRecord, value smithyxml.Value) error { + defer value.Close() + if v.Value != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Value", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.Value) + } + return nil +} + +func awsRestxml_serializeDocumentResourceRecords(v []types.ResourceRecord, value smithyxml.Value) error { + var array *smithyxml.Array + if !value.IsFlattened() { + defer value.Close() + } + customMemberNameAttr := []smithyxml.Attr{} + customMemberName := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "ResourceRecord", + }, + Attr: customMemberNameAttr, + } + array = value.ArrayWithCustomName(customMemberName) + for i := range v { + am := array.Member() + if err := awsRestxml_serializeDocumentResourceRecord(&v[i], am); err != nil { + return err + } + } + return nil +} + +func awsRestxml_serializeDocumentResourceRecordSet(v *types.ResourceRecordSet, value smithyxml.Value) error { + defer value.Close() + if v.AliasTarget != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "AliasTarget", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentAliasTarget(v.AliasTarget, el); err != nil { + return err + } + } + if v.CidrRoutingConfig != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "CidrRoutingConfig", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentCidrRoutingConfig(v.CidrRoutingConfig, el); err != nil { + return err + } + } + if len(v.Failover) > 0 { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Failover", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(string(v.Failover)) + } + if v.GeoLocation != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "GeoLocation", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentGeoLocation(v.GeoLocation, el); err != nil { + return err + } + } + if v.HealthCheckId != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "HealthCheckId", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.HealthCheckId) + } + if v.MultiValueAnswer != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "MultiValueAnswer", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Boolean(*v.MultiValueAnswer) + } + if v.Name != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Name", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.Name) + } + if len(v.Region) > 0 { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Region", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(string(v.Region)) + } + if v.ResourceRecords != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "ResourceRecords", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentResourceRecords(v.ResourceRecords, el); err != nil { + return err + } + } + if v.SetIdentifier != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "SetIdentifier", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.SetIdentifier) + } + if v.TrafficPolicyInstanceId != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "TrafficPolicyInstanceId", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.TrafficPolicyInstanceId) + } + if v.TTL != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "TTL", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Long(*v.TTL) + } + if len(v.Type) > 0 { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Type", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(string(v.Type)) + } + if v.Weight != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Weight", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Long(*v.Weight) + } + return nil +} + +func awsRestxml_serializeDocumentTag(v *types.Tag, value smithyxml.Value) error { + defer value.Close() + if v.Key != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Key", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.Key) + } + if v.Value != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Value", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.Value) + } + return nil +} + +func awsRestxml_serializeDocumentTagKeyList(v []string, value smithyxml.Value) error { + var array *smithyxml.Array + if !value.IsFlattened() { + defer value.Close() + } + customMemberNameAttr := []smithyxml.Attr{} + customMemberName := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Key", + }, + Attr: customMemberNameAttr, + } + array = value.ArrayWithCustomName(customMemberName) + for i := range v { + am := array.Member() + am.String(v[i]) + } + return nil +} + +func awsRestxml_serializeDocumentTagList(v []types.Tag, value smithyxml.Value) error { + var array *smithyxml.Array + if !value.IsFlattened() { + defer value.Close() + } + customMemberNameAttr := []smithyxml.Attr{} + customMemberName := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Tag", + }, + Attr: customMemberNameAttr, + } + array = value.ArrayWithCustomName(customMemberName) + for i := range v { + am := array.Member() + if err := awsRestxml_serializeDocumentTag(&v[i], am); err != nil { + return err + } + } + return nil +} + +func awsRestxml_serializeDocumentTagResourceIdList(v []string, value smithyxml.Value) error { + var array *smithyxml.Array + if !value.IsFlattened() { + defer value.Close() + } + customMemberNameAttr := []smithyxml.Attr{} + customMemberName := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "ResourceId", + }, + Attr: customMemberNameAttr, + } + array = value.ArrayWithCustomName(customMemberName) + for i := range v { + am := array.Member() + am.String(v[i]) + } + return nil +} + +func awsRestxml_serializeDocumentVPC(v *types.VPC, value smithyxml.Value) error { + defer value.Close() + if v.VPCId != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "VPCId", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.VPCId) + } + if len(v.VPCRegion) > 0 { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "VPCRegion", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(string(v.VPCRegion)) + } + return nil +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/types/enums.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/types/enums.go new file mode 100644 index 0000000..cc3464d --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/types/enums.go @@ -0,0 +1,577 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types + +type AccountLimitType string + +// Enum values for AccountLimitType +const ( + AccountLimitTypeMaxHealthChecksByOwner AccountLimitType = "MAX_HEALTH_CHECKS_BY_OWNER" + AccountLimitTypeMaxHostedZonesByOwner AccountLimitType = "MAX_HOSTED_ZONES_BY_OWNER" + AccountLimitTypeMaxTrafficPolicyInstancesByOwner AccountLimitType = "MAX_TRAFFIC_POLICY_INSTANCES_BY_OWNER" + AccountLimitTypeMaxReusableDelegationSetsByOwner AccountLimitType = "MAX_REUSABLE_DELEGATION_SETS_BY_OWNER" + AccountLimitTypeMaxTrafficPoliciesByOwner AccountLimitType = "MAX_TRAFFIC_POLICIES_BY_OWNER" +) + +// Values returns all known values for AccountLimitType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (AccountLimitType) Values() []AccountLimitType { + return []AccountLimitType{ + "MAX_HEALTH_CHECKS_BY_OWNER", + "MAX_HOSTED_ZONES_BY_OWNER", + "MAX_TRAFFIC_POLICY_INSTANCES_BY_OWNER", + "MAX_REUSABLE_DELEGATION_SETS_BY_OWNER", + "MAX_TRAFFIC_POLICIES_BY_OWNER", + } +} + +type ChangeAction string + +// Enum values for ChangeAction +const ( + ChangeActionCreate ChangeAction = "CREATE" + ChangeActionDelete ChangeAction = "DELETE" + ChangeActionUpsert ChangeAction = "UPSERT" +) + +// Values returns all known values for ChangeAction. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (ChangeAction) Values() []ChangeAction { + return []ChangeAction{ + "CREATE", + "DELETE", + "UPSERT", + } +} + +type ChangeStatus string + +// Enum values for ChangeStatus +const ( + ChangeStatusPending ChangeStatus = "PENDING" + ChangeStatusInsync ChangeStatus = "INSYNC" +) + +// Values returns all known values for ChangeStatus. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (ChangeStatus) Values() []ChangeStatus { + return []ChangeStatus{ + "PENDING", + "INSYNC", + } +} + +type CidrCollectionChangeAction string + +// Enum values for CidrCollectionChangeAction +const ( + CidrCollectionChangeActionPut CidrCollectionChangeAction = "PUT" + CidrCollectionChangeActionDeleteIfExists CidrCollectionChangeAction = "DELETE_IF_EXISTS" +) + +// Values returns all known values for CidrCollectionChangeAction. Note that this +// can be expanded in the future, and so it is only as up to date as the client. +// The ordering of this slice is not guaranteed to be stable across updates. +func (CidrCollectionChangeAction) Values() []CidrCollectionChangeAction { + return []CidrCollectionChangeAction{ + "PUT", + "DELETE_IF_EXISTS", + } +} + +type CloudWatchRegion string + +// Enum values for CloudWatchRegion +const ( + CloudWatchRegionUsEast1 CloudWatchRegion = "us-east-1" + CloudWatchRegionUsEast2 CloudWatchRegion = "us-east-2" + CloudWatchRegionUsWest1 CloudWatchRegion = "us-west-1" + CloudWatchRegionUsWest2 CloudWatchRegion = "us-west-2" + CloudWatchRegionCaCentral1 CloudWatchRegion = "ca-central-1" + CloudWatchRegionEuCentral1 CloudWatchRegion = "eu-central-1" + CloudWatchRegionEuCentral2 CloudWatchRegion = "eu-central-2" + CloudWatchRegionEuWest1 CloudWatchRegion = "eu-west-1" + CloudWatchRegionEuWest2 CloudWatchRegion = "eu-west-2" + CloudWatchRegionEuWest3 CloudWatchRegion = "eu-west-3" + CloudWatchRegionApEast1 CloudWatchRegion = "ap-east-1" + CloudWatchRegionMeSouth1 CloudWatchRegion = "me-south-1" + CloudWatchRegionMeCentral1 CloudWatchRegion = "me-central-1" + CloudWatchRegionApSouth1 CloudWatchRegion = "ap-south-1" + CloudWatchRegionApSouth2 CloudWatchRegion = "ap-south-2" + CloudWatchRegionApSoutheast1 CloudWatchRegion = "ap-southeast-1" + CloudWatchRegionApSoutheast2 CloudWatchRegion = "ap-southeast-2" + CloudWatchRegionApSoutheast3 CloudWatchRegion = "ap-southeast-3" + CloudWatchRegionApNortheast1 CloudWatchRegion = "ap-northeast-1" + CloudWatchRegionApNortheast2 CloudWatchRegion = "ap-northeast-2" + CloudWatchRegionApNortheast3 CloudWatchRegion = "ap-northeast-3" + CloudWatchRegionEuNorth1 CloudWatchRegion = "eu-north-1" + CloudWatchRegionSaEast1 CloudWatchRegion = "sa-east-1" + CloudWatchRegionCnNorthwest1 CloudWatchRegion = "cn-northwest-1" + CloudWatchRegionCnNorth1 CloudWatchRegion = "cn-north-1" + CloudWatchRegionAfSouth1 CloudWatchRegion = "af-south-1" + CloudWatchRegionEuSouth1 CloudWatchRegion = "eu-south-1" + CloudWatchRegionEuSouth2 CloudWatchRegion = "eu-south-2" + CloudWatchRegionUsGovWest1 CloudWatchRegion = "us-gov-west-1" + CloudWatchRegionUsGovEast1 CloudWatchRegion = "us-gov-east-1" + CloudWatchRegionUsIsoEast1 CloudWatchRegion = "us-iso-east-1" + CloudWatchRegionUsIsoWest1 CloudWatchRegion = "us-iso-west-1" + CloudWatchRegionUsIsobEast1 CloudWatchRegion = "us-isob-east-1" + CloudWatchRegionApSoutheast4 CloudWatchRegion = "ap-southeast-4" +) + +// Values returns all known values for CloudWatchRegion. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (CloudWatchRegion) Values() []CloudWatchRegion { + return []CloudWatchRegion{ + "us-east-1", + "us-east-2", + "us-west-1", + "us-west-2", + "ca-central-1", + "eu-central-1", + "eu-central-2", + "eu-west-1", + "eu-west-2", + "eu-west-3", + "ap-east-1", + "me-south-1", + "me-central-1", + "ap-south-1", + "ap-south-2", + "ap-southeast-1", + "ap-southeast-2", + "ap-southeast-3", + "ap-northeast-1", + "ap-northeast-2", + "ap-northeast-3", + "eu-north-1", + "sa-east-1", + "cn-northwest-1", + "cn-north-1", + "af-south-1", + "eu-south-1", + "eu-south-2", + "us-gov-west-1", + "us-gov-east-1", + "us-iso-east-1", + "us-iso-west-1", + "us-isob-east-1", + "ap-southeast-4", + } +} + +type ComparisonOperator string + +// Enum values for ComparisonOperator +const ( + ComparisonOperatorGreaterThanOrEqualToThreshold ComparisonOperator = "GreaterThanOrEqualToThreshold" + ComparisonOperatorGreaterThanThreshold ComparisonOperator = "GreaterThanThreshold" + ComparisonOperatorLessThanThreshold ComparisonOperator = "LessThanThreshold" + ComparisonOperatorLessThanOrEqualToThreshold ComparisonOperator = "LessThanOrEqualToThreshold" +) + +// Values returns all known values for ComparisonOperator. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (ComparisonOperator) Values() []ComparisonOperator { + return []ComparisonOperator{ + "GreaterThanOrEqualToThreshold", + "GreaterThanThreshold", + "LessThanThreshold", + "LessThanOrEqualToThreshold", + } +} + +type HealthCheckRegion string + +// Enum values for HealthCheckRegion +const ( + HealthCheckRegionUsEast1 HealthCheckRegion = "us-east-1" + HealthCheckRegionUsWest1 HealthCheckRegion = "us-west-1" + HealthCheckRegionUsWest2 HealthCheckRegion = "us-west-2" + HealthCheckRegionEuWest1 HealthCheckRegion = "eu-west-1" + HealthCheckRegionApSoutheast1 HealthCheckRegion = "ap-southeast-1" + HealthCheckRegionApSoutheast2 HealthCheckRegion = "ap-southeast-2" + HealthCheckRegionApNortheast1 HealthCheckRegion = "ap-northeast-1" + HealthCheckRegionSaEast1 HealthCheckRegion = "sa-east-1" +) + +// Values returns all known values for HealthCheckRegion. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (HealthCheckRegion) Values() []HealthCheckRegion { + return []HealthCheckRegion{ + "us-east-1", + "us-west-1", + "us-west-2", + "eu-west-1", + "ap-southeast-1", + "ap-southeast-2", + "ap-northeast-1", + "sa-east-1", + } +} + +type HealthCheckType string + +// Enum values for HealthCheckType +const ( + HealthCheckTypeHttp HealthCheckType = "HTTP" + HealthCheckTypeHttps HealthCheckType = "HTTPS" + HealthCheckTypeHttpStrMatch HealthCheckType = "HTTP_STR_MATCH" + HealthCheckTypeHttpsStrMatch HealthCheckType = "HTTPS_STR_MATCH" + HealthCheckTypeTcp HealthCheckType = "TCP" + HealthCheckTypeCalculated HealthCheckType = "CALCULATED" + HealthCheckTypeCloudwatchMetric HealthCheckType = "CLOUDWATCH_METRIC" + HealthCheckTypeRecoveryControl HealthCheckType = "RECOVERY_CONTROL" +) + +// Values returns all known values for HealthCheckType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (HealthCheckType) Values() []HealthCheckType { + return []HealthCheckType{ + "HTTP", + "HTTPS", + "HTTP_STR_MATCH", + "HTTPS_STR_MATCH", + "TCP", + "CALCULATED", + "CLOUDWATCH_METRIC", + "RECOVERY_CONTROL", + } +} + +type HostedZoneLimitType string + +// Enum values for HostedZoneLimitType +const ( + HostedZoneLimitTypeMaxRrsetsByZone HostedZoneLimitType = "MAX_RRSETS_BY_ZONE" + HostedZoneLimitTypeMaxVpcsAssociatedByZone HostedZoneLimitType = "MAX_VPCS_ASSOCIATED_BY_ZONE" +) + +// Values returns all known values for HostedZoneLimitType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (HostedZoneLimitType) Values() []HostedZoneLimitType { + return []HostedZoneLimitType{ + "MAX_RRSETS_BY_ZONE", + "MAX_VPCS_ASSOCIATED_BY_ZONE", + } +} + +type InsufficientDataHealthStatus string + +// Enum values for InsufficientDataHealthStatus +const ( + InsufficientDataHealthStatusHealthy InsufficientDataHealthStatus = "Healthy" + InsufficientDataHealthStatusUnhealthy InsufficientDataHealthStatus = "Unhealthy" + InsufficientDataHealthStatusLastKnownStatus InsufficientDataHealthStatus = "LastKnownStatus" +) + +// Values returns all known values for InsufficientDataHealthStatus. Note that +// this can be expanded in the future, and so it is only as up to date as the +// client. The ordering of this slice is not guaranteed to be stable across +// updates. +func (InsufficientDataHealthStatus) Values() []InsufficientDataHealthStatus { + return []InsufficientDataHealthStatus{ + "Healthy", + "Unhealthy", + "LastKnownStatus", + } +} + +type ResettableElementName string + +// Enum values for ResettableElementName +const ( + ResettableElementNameFullyQualifiedDomainName ResettableElementName = "FullyQualifiedDomainName" + ResettableElementNameRegions ResettableElementName = "Regions" + ResettableElementNameResourcePath ResettableElementName = "ResourcePath" + ResettableElementNameChildHealthChecks ResettableElementName = "ChildHealthChecks" +) + +// Values returns all known values for ResettableElementName. Note that this can +// be expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (ResettableElementName) Values() []ResettableElementName { + return []ResettableElementName{ + "FullyQualifiedDomainName", + "Regions", + "ResourcePath", + "ChildHealthChecks", + } +} + +type ResourceRecordSetFailover string + +// Enum values for ResourceRecordSetFailover +const ( + ResourceRecordSetFailoverPrimary ResourceRecordSetFailover = "PRIMARY" + ResourceRecordSetFailoverSecondary ResourceRecordSetFailover = "SECONDARY" +) + +// Values returns all known values for ResourceRecordSetFailover. Note that this +// can be expanded in the future, and so it is only as up to date as the client. +// The ordering of this slice is not guaranteed to be stable across updates. +func (ResourceRecordSetFailover) Values() []ResourceRecordSetFailover { + return []ResourceRecordSetFailover{ + "PRIMARY", + "SECONDARY", + } +} + +type ResourceRecordSetRegion string + +// Enum values for ResourceRecordSetRegion +const ( + ResourceRecordSetRegionUsEast1 ResourceRecordSetRegion = "us-east-1" + ResourceRecordSetRegionUsEast2 ResourceRecordSetRegion = "us-east-2" + ResourceRecordSetRegionUsWest1 ResourceRecordSetRegion = "us-west-1" + ResourceRecordSetRegionUsWest2 ResourceRecordSetRegion = "us-west-2" + ResourceRecordSetRegionCaCentral1 ResourceRecordSetRegion = "ca-central-1" + ResourceRecordSetRegionEuWest1 ResourceRecordSetRegion = "eu-west-1" + ResourceRecordSetRegionEuWest2 ResourceRecordSetRegion = "eu-west-2" + ResourceRecordSetRegionEuWest3 ResourceRecordSetRegion = "eu-west-3" + ResourceRecordSetRegionEuCentral1 ResourceRecordSetRegion = "eu-central-1" + ResourceRecordSetRegionEuCentral2 ResourceRecordSetRegion = "eu-central-2" + ResourceRecordSetRegionApSoutheast1 ResourceRecordSetRegion = "ap-southeast-1" + ResourceRecordSetRegionApSoutheast2 ResourceRecordSetRegion = "ap-southeast-2" + ResourceRecordSetRegionApSoutheast3 ResourceRecordSetRegion = "ap-southeast-3" + ResourceRecordSetRegionApNortheast1 ResourceRecordSetRegion = "ap-northeast-1" + ResourceRecordSetRegionApNortheast2 ResourceRecordSetRegion = "ap-northeast-2" + ResourceRecordSetRegionApNortheast3 ResourceRecordSetRegion = "ap-northeast-3" + ResourceRecordSetRegionEuNorth1 ResourceRecordSetRegion = "eu-north-1" + ResourceRecordSetRegionSaEast1 ResourceRecordSetRegion = "sa-east-1" + ResourceRecordSetRegionCnNorth1 ResourceRecordSetRegion = "cn-north-1" + ResourceRecordSetRegionCnNorthwest1 ResourceRecordSetRegion = "cn-northwest-1" + ResourceRecordSetRegionApEast1 ResourceRecordSetRegion = "ap-east-1" + ResourceRecordSetRegionMeSouth1 ResourceRecordSetRegion = "me-south-1" + ResourceRecordSetRegionMeCentral1 ResourceRecordSetRegion = "me-central-1" + ResourceRecordSetRegionApSouth1 ResourceRecordSetRegion = "ap-south-1" + ResourceRecordSetRegionApSouth2 ResourceRecordSetRegion = "ap-south-2" + ResourceRecordSetRegionAfSouth1 ResourceRecordSetRegion = "af-south-1" + ResourceRecordSetRegionEuSouth1 ResourceRecordSetRegion = "eu-south-1" + ResourceRecordSetRegionEuSouth2 ResourceRecordSetRegion = "eu-south-2" + ResourceRecordSetRegionApSoutheast4 ResourceRecordSetRegion = "ap-southeast-4" +) + +// Values returns all known values for ResourceRecordSetRegion. Note that this can +// be expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (ResourceRecordSetRegion) Values() []ResourceRecordSetRegion { + return []ResourceRecordSetRegion{ + "us-east-1", + "us-east-2", + "us-west-1", + "us-west-2", + "ca-central-1", + "eu-west-1", + "eu-west-2", + "eu-west-3", + "eu-central-1", + "eu-central-2", + "ap-southeast-1", + "ap-southeast-2", + "ap-southeast-3", + "ap-northeast-1", + "ap-northeast-2", + "ap-northeast-3", + "eu-north-1", + "sa-east-1", + "cn-north-1", + "cn-northwest-1", + "ap-east-1", + "me-south-1", + "me-central-1", + "ap-south-1", + "ap-south-2", + "af-south-1", + "eu-south-1", + "eu-south-2", + "ap-southeast-4", + } +} + +type ReusableDelegationSetLimitType string + +// Enum values for ReusableDelegationSetLimitType +const ( + ReusableDelegationSetLimitTypeMaxZonesByReusableDelegationSet ReusableDelegationSetLimitType = "MAX_ZONES_BY_REUSABLE_DELEGATION_SET" +) + +// Values returns all known values for ReusableDelegationSetLimitType. Note that +// this can be expanded in the future, and so it is only as up to date as the +// client. The ordering of this slice is not guaranteed to be stable across +// updates. +func (ReusableDelegationSetLimitType) Values() []ReusableDelegationSetLimitType { + return []ReusableDelegationSetLimitType{ + "MAX_ZONES_BY_REUSABLE_DELEGATION_SET", + } +} + +type RRType string + +// Enum values for RRType +const ( + RRTypeSoa RRType = "SOA" + RRTypeA RRType = "A" + RRTypeTxt RRType = "TXT" + RRTypeNs RRType = "NS" + RRTypeCname RRType = "CNAME" + RRTypeMx RRType = "MX" + RRTypeNaptr RRType = "NAPTR" + RRTypePtr RRType = "PTR" + RRTypeSrv RRType = "SRV" + RRTypeSpf RRType = "SPF" + RRTypeAaaa RRType = "AAAA" + RRTypeCaa RRType = "CAA" + RRTypeDs RRType = "DS" +) + +// Values returns all known values for RRType. Note that this can be expanded in +// the future, and so it is only as up to date as the client. The ordering of this +// slice is not guaranteed to be stable across updates. +func (RRType) Values() []RRType { + return []RRType{ + "SOA", + "A", + "TXT", + "NS", + "CNAME", + "MX", + "NAPTR", + "PTR", + "SRV", + "SPF", + "AAAA", + "CAA", + "DS", + } +} + +type Statistic string + +// Enum values for Statistic +const ( + StatisticAverage Statistic = "Average" + StatisticSum Statistic = "Sum" + StatisticSampleCount Statistic = "SampleCount" + StatisticMaximum Statistic = "Maximum" + StatisticMinimum Statistic = "Minimum" +) + +// Values returns all known values for Statistic. Note that this can be expanded +// in the future, and so it is only as up to date as the client. The ordering of +// this slice is not guaranteed to be stable across updates. +func (Statistic) Values() []Statistic { + return []Statistic{ + "Average", + "Sum", + "SampleCount", + "Maximum", + "Minimum", + } +} + +type TagResourceType string + +// Enum values for TagResourceType +const ( + TagResourceTypeHealthcheck TagResourceType = "healthcheck" + TagResourceTypeHostedzone TagResourceType = "hostedzone" +) + +// Values returns all known values for TagResourceType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (TagResourceType) Values() []TagResourceType { + return []TagResourceType{ + "healthcheck", + "hostedzone", + } +} + +type VPCRegion string + +// Enum values for VPCRegion +const ( + VPCRegionUsEast1 VPCRegion = "us-east-1" + VPCRegionUsEast2 VPCRegion = "us-east-2" + VPCRegionUsWest1 VPCRegion = "us-west-1" + VPCRegionUsWest2 VPCRegion = "us-west-2" + VPCRegionEuWest1 VPCRegion = "eu-west-1" + VPCRegionEuWest2 VPCRegion = "eu-west-2" + VPCRegionEuWest3 VPCRegion = "eu-west-3" + VPCRegionEuCentral1 VPCRegion = "eu-central-1" + VPCRegionEuCentral2 VPCRegion = "eu-central-2" + VPCRegionApEast1 VPCRegion = "ap-east-1" + VPCRegionMeSouth1 VPCRegion = "me-south-1" + VPCRegionUsGovWest1 VPCRegion = "us-gov-west-1" + VPCRegionUsGovEast1 VPCRegion = "us-gov-east-1" + VPCRegionUsIsoEast1 VPCRegion = "us-iso-east-1" + VPCRegionUsIsoWest1 VPCRegion = "us-iso-west-1" + VPCRegionUsIsobEast1 VPCRegion = "us-isob-east-1" + VPCRegionMeCentral1 VPCRegion = "me-central-1" + VPCRegionApSoutheast1 VPCRegion = "ap-southeast-1" + VPCRegionApSoutheast2 VPCRegion = "ap-southeast-2" + VPCRegionApSoutheast3 VPCRegion = "ap-southeast-3" + VPCRegionApSouth1 VPCRegion = "ap-south-1" + VPCRegionApSouth2 VPCRegion = "ap-south-2" + VPCRegionApNortheast1 VPCRegion = "ap-northeast-1" + VPCRegionApNortheast2 VPCRegion = "ap-northeast-2" + VPCRegionApNortheast3 VPCRegion = "ap-northeast-3" + VPCRegionEuNorth1 VPCRegion = "eu-north-1" + VPCRegionSaEast1 VPCRegion = "sa-east-1" + VPCRegionCaCentral1 VPCRegion = "ca-central-1" + VPCRegionCnNorth1 VPCRegion = "cn-north-1" + VPCRegionAfSouth1 VPCRegion = "af-south-1" + VPCRegionEuSouth1 VPCRegion = "eu-south-1" + VPCRegionEuSouth2 VPCRegion = "eu-south-2" + VPCRegionApSoutheast4 VPCRegion = "ap-southeast-4" +) + +// Values returns all known values for VPCRegion. Note that this can be expanded +// in the future, and so it is only as up to date as the client. The ordering of +// this slice is not guaranteed to be stable across updates. +func (VPCRegion) Values() []VPCRegion { + return []VPCRegion{ + "us-east-1", + "us-east-2", + "us-west-1", + "us-west-2", + "eu-west-1", + "eu-west-2", + "eu-west-3", + "eu-central-1", + "eu-central-2", + "ap-east-1", + "me-south-1", + "us-gov-west-1", + "us-gov-east-1", + "us-iso-east-1", + "us-iso-west-1", + "us-isob-east-1", + "me-central-1", + "ap-southeast-1", + "ap-southeast-2", + "ap-southeast-3", + "ap-south-1", + "ap-south-2", + "ap-northeast-1", + "ap-northeast-2", + "ap-northeast-3", + "eu-north-1", + "sa-east-1", + "ca-central-1", + "cn-north-1", + "af-south-1", + "eu-south-1", + "eu-south-2", + "ap-southeast-4", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/types/errors.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/types/errors.go new file mode 100644 index 0000000..1bb6aa0 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/types/errors.go @@ -0,0 +1,1933 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types + +import ( + "fmt" + smithy "github.com/aws/smithy-go" +) + +// This CIDR block is already in use. +type CidrBlockInUseException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *CidrBlockInUseException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *CidrBlockInUseException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *CidrBlockInUseException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "CidrBlockInUseException" + } + return *e.ErrorCodeOverride +} +func (e *CidrBlockInUseException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// A CIDR collection with this name and a different caller reference already +// exists in this account. +type CidrCollectionAlreadyExistsException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *CidrCollectionAlreadyExistsException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *CidrCollectionAlreadyExistsException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *CidrCollectionAlreadyExistsException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "CidrCollectionAlreadyExistsException" + } + return *e.ErrorCodeOverride +} +func (e *CidrCollectionAlreadyExistsException) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + +// This CIDR collection is in use, and isn't empty. +type CidrCollectionInUseException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *CidrCollectionInUseException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *CidrCollectionInUseException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *CidrCollectionInUseException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "CidrCollectionInUseException" + } + return *e.ErrorCodeOverride +} +func (e *CidrCollectionInUseException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The CIDR collection version you provided, doesn't match the one in the +// ListCidrCollections operation. +type CidrCollectionVersionMismatchException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *CidrCollectionVersionMismatchException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *CidrCollectionVersionMismatchException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *CidrCollectionVersionMismatchException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "CidrCollectionVersionMismatchException" + } + return *e.ErrorCodeOverride +} +func (e *CidrCollectionVersionMismatchException) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + +// Another user submitted a request to create, update, or delete the object at the +// same time that you did. Retry the request. +type ConcurrentModification struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *ConcurrentModification) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ConcurrentModification) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ConcurrentModification) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ConcurrentModification" + } + return *e.ErrorCodeOverride +} +func (e *ConcurrentModification) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The cause of this error depends on the operation that you're performing: +// - Create a public hosted zone: Two hosted zones that have the same name or +// that have a parent/child relationship (example.com and test.example.com) can't +// have any common name servers. You tried to create a hosted zone that has the +// same name as an existing hosted zone or that's the parent or child of an +// existing hosted zone, and you specified a delegation set that shares one or more +// name servers with the existing hosted zone. For more information, see +// CreateReusableDelegationSet (https://docs.aws.amazon.com/Route53/latest/APIReference/API_CreateReusableDelegationSet.html) +// . +// - Create a private hosted zone: A hosted zone with the specified name already +// exists and is already associated with the Amazon VPC that you specified. +// - Associate VPCs with a private hosted zone: The VPC that you specified is +// already associated with another hosted zone that has the same name. +type ConflictingDomainExists struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *ConflictingDomainExists) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ConflictingDomainExists) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ConflictingDomainExists) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ConflictingDomainExists" + } + return *e.ErrorCodeOverride +} +func (e *ConflictingDomainExists) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// You tried to update a traffic policy instance by using a traffic policy version +// that has a different DNS type than the current type for the instance. You +// specified the type in the JSON document in the CreateTrafficPolicy or +// CreateTrafficPolicyVersion request. +type ConflictingTypes struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *ConflictingTypes) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ConflictingTypes) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ConflictingTypes) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ConflictingTypes" + } + return *e.ErrorCodeOverride +} +func (e *ConflictingTypes) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// A delegation set with the same owner and caller reference combination has +// already been created. +type DelegationSetAlreadyCreated struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *DelegationSetAlreadyCreated) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *DelegationSetAlreadyCreated) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *DelegationSetAlreadyCreated) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "DelegationSetAlreadyCreated" + } + return *e.ErrorCodeOverride +} +func (e *DelegationSetAlreadyCreated) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The specified delegation set has already been marked as reusable. +type DelegationSetAlreadyReusable struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *DelegationSetAlreadyReusable) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *DelegationSetAlreadyReusable) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *DelegationSetAlreadyReusable) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "DelegationSetAlreadyReusable" + } + return *e.ErrorCodeOverride +} +func (e *DelegationSetAlreadyReusable) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The specified delegation contains associated hosted zones which must be deleted +// before the reusable delegation set can be deleted. +type DelegationSetInUse struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *DelegationSetInUse) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *DelegationSetInUse) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *DelegationSetInUse) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "DelegationSetInUse" + } + return *e.ErrorCodeOverride +} +func (e *DelegationSetInUse) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// You can create a hosted zone that has the same name as an existing hosted zone +// (example.com is common), but there is a limit to the number of hosted zones that +// have the same name. If you get this error, Amazon Route 53 has reached that +// limit. If you own the domain name and Route 53 generates this error, contact +// Customer Support. +type DelegationSetNotAvailable struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *DelegationSetNotAvailable) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *DelegationSetNotAvailable) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *DelegationSetNotAvailable) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "DelegationSetNotAvailable" + } + return *e.ErrorCodeOverride +} +func (e *DelegationSetNotAvailable) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// A reusable delegation set with the specified ID does not exist. +type DelegationSetNotReusable struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *DelegationSetNotReusable) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *DelegationSetNotReusable) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *DelegationSetNotReusable) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "DelegationSetNotReusable" + } + return *e.ErrorCodeOverride +} +func (e *DelegationSetNotReusable) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The hosted zone doesn't have any DNSSEC resources. +type DNSSECNotFound struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *DNSSECNotFound) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *DNSSECNotFound) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *DNSSECNotFound) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "DNSSECNotFound" + } + return *e.ErrorCodeOverride +} +func (e *DNSSECNotFound) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The health check you're attempting to create already exists. Amazon Route 53 +// returns this error when you submit a request that has the following values: +// - The same value for CallerReference as an existing health check, and one or +// more values that differ from the existing health check that has the same caller +// reference. +// - The same value for CallerReference as a health check that you created and +// later deleted, regardless of the other settings in the request. +type HealthCheckAlreadyExists struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *HealthCheckAlreadyExists) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *HealthCheckAlreadyExists) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *HealthCheckAlreadyExists) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "HealthCheckAlreadyExists" + } + return *e.ErrorCodeOverride +} +func (e *HealthCheckAlreadyExists) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// This error code is not in use. +type HealthCheckInUse struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *HealthCheckInUse) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *HealthCheckInUse) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *HealthCheckInUse) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "HealthCheckInUse" + } + return *e.ErrorCodeOverride +} +func (e *HealthCheckInUse) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The value of HealthCheckVersion in the request doesn't match the value of +// HealthCheckVersion in the health check. +type HealthCheckVersionMismatch struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *HealthCheckVersionMismatch) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *HealthCheckVersionMismatch) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *HealthCheckVersionMismatch) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "HealthCheckVersionMismatch" + } + return *e.ErrorCodeOverride +} +func (e *HealthCheckVersionMismatch) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The hosted zone you're trying to create already exists. Amazon Route 53 returns +// this error when a hosted zone has already been created with the specified +// CallerReference . +type HostedZoneAlreadyExists struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *HostedZoneAlreadyExists) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *HostedZoneAlreadyExists) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *HostedZoneAlreadyExists) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "HostedZoneAlreadyExists" + } + return *e.ErrorCodeOverride +} +func (e *HostedZoneAlreadyExists) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The hosted zone contains resource records that are not SOA or NS records. +type HostedZoneNotEmpty struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *HostedZoneNotEmpty) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *HostedZoneNotEmpty) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *HostedZoneNotEmpty) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "HostedZoneNotEmpty" + } + return *e.ErrorCodeOverride +} +func (e *HostedZoneNotEmpty) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The specified HostedZone can't be found. +type HostedZoneNotFound struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *HostedZoneNotFound) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *HostedZoneNotFound) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *HostedZoneNotFound) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "HostedZoneNotFound" + } + return *e.ErrorCodeOverride +} +func (e *HostedZoneNotFound) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The specified hosted zone is a public hosted zone, not a private hosted zone. +type HostedZoneNotPrivate struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *HostedZoneNotPrivate) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *HostedZoneNotPrivate) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *HostedZoneNotPrivate) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "HostedZoneNotPrivate" + } + return *e.ErrorCodeOverride +} +func (e *HostedZoneNotPrivate) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The hosted zone nameservers don't match the parent nameservers. The hosted zone +// and parent must have the same nameservers. +type HostedZonePartiallyDelegated struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *HostedZonePartiallyDelegated) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *HostedZonePartiallyDelegated) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *HostedZonePartiallyDelegated) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "HostedZonePartiallyDelegated" + } + return *e.ErrorCodeOverride +} +func (e *HostedZonePartiallyDelegated) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The resource you're trying to access is unsupported on this Amazon Route 53 +// endpoint. +type IncompatibleVersion struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *IncompatibleVersion) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *IncompatibleVersion) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *IncompatibleVersion) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "IncompatibleVersion" + } + return *e.ErrorCodeOverride +} +func (e *IncompatibleVersion) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// Amazon Route 53 doesn't have the permissions required to create log streams and +// send query logs to log streams. Possible causes include the following: +// - There is no resource policy that specifies the log group ARN in the value +// for Resource . +// - The resource policy that includes the log group ARN in the value for +// Resource doesn't have the necessary permissions. +// - The resource policy hasn't finished propagating yet. +// - The Key management service (KMS) key you specified doesn’t exist or it +// can’t be used with the log group associated with query log. Update or provide a +// resource policy to grant permissions for the KMS key. +// - The Key management service (KMS) key you specified is marked as disabled +// for the log group associated with query log. Update or provide a resource policy +// to grant permissions for the KMS key. +type InsufficientCloudWatchLogsResourcePolicy struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InsufficientCloudWatchLogsResourcePolicy) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InsufficientCloudWatchLogsResourcePolicy) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InsufficientCloudWatchLogsResourcePolicy) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InsufficientCloudWatchLogsResourcePolicy" + } + return *e.ErrorCodeOverride +} +func (e *InsufficientCloudWatchLogsResourcePolicy) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + +// Parameter name is not valid. +type InvalidArgument struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidArgument) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidArgument) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidArgument) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidArgument" + } + return *e.ErrorCodeOverride +} +func (e *InvalidArgument) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// This exception contains a list of messages that might contain one or more error +// messages. Each error message indicates one error in the change batch. +type InvalidChangeBatch struct { + Message *string + + ErrorCodeOverride *string + + Messages []string + + noSmithyDocumentSerde +} + +func (e *InvalidChangeBatch) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidChangeBatch) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidChangeBatch) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidChangeBatch" + } + return *e.ErrorCodeOverride +} +func (e *InvalidChangeBatch) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The specified domain name is not valid. +type InvalidDomainName struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidDomainName) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidDomainName) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidDomainName) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidDomainName" + } + return *e.ErrorCodeOverride +} +func (e *InvalidDomainName) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The input is not valid. +type InvalidInput struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidInput) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidInput) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidInput) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidInput" + } + return *e.ErrorCodeOverride +} +func (e *InvalidInput) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The key-signing key (KSK) name that you specified isn't a valid name. +type InvalidKeySigningKeyName struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidKeySigningKeyName) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidKeySigningKeyName) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidKeySigningKeyName) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidKeySigningKeyName" + } + return *e.ErrorCodeOverride +} +func (e *InvalidKeySigningKeyName) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The key-signing key (KSK) status isn't valid or another KSK has the status +// INTERNAL_FAILURE . +type InvalidKeySigningKeyStatus struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidKeySigningKeyStatus) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidKeySigningKeyStatus) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidKeySigningKeyStatus) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidKeySigningKeyStatus" + } + return *e.ErrorCodeOverride +} +func (e *InvalidKeySigningKeyStatus) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The KeyManagementServiceArn that you specified isn't valid to use with DNSSEC +// signing. +type InvalidKMSArn struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidKMSArn) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidKMSArn) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidKMSArn) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidKMSArn" + } + return *e.ErrorCodeOverride +} +func (e *InvalidKMSArn) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The value that you specified to get the second or subsequent page of results is +// invalid. +type InvalidPaginationToken struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidPaginationToken) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidPaginationToken) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidPaginationToken) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidPaginationToken" + } + return *e.ErrorCodeOverride +} +func (e *InvalidPaginationToken) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// Your hosted zone status isn't valid for this operation. In the hosted zone, +// change the status to enable DNSSEC or disable DNSSEC . +type InvalidSigningStatus struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidSigningStatus) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidSigningStatus) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidSigningStatus) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidSigningStatus" + } + return *e.ErrorCodeOverride +} +func (e *InvalidSigningStatus) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The format of the traffic policy document that you specified in the Document +// element is not valid. +type InvalidTrafficPolicyDocument struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidTrafficPolicyDocument) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidTrafficPolicyDocument) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidTrafficPolicyDocument) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidTrafficPolicyDocument" + } + return *e.ErrorCodeOverride +} +func (e *InvalidTrafficPolicyDocument) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The VPC ID that you specified either isn't a valid ID or the current account is +// not authorized to access this VPC. +type InvalidVPCId struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidVPCId) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidVPCId) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidVPCId) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidVPCId" + } + return *e.ErrorCodeOverride +} +func (e *InvalidVPCId) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// You've already created a key-signing key (KSK) with this name or with the same +// customer managed key ARN. +type KeySigningKeyAlreadyExists struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *KeySigningKeyAlreadyExists) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *KeySigningKeyAlreadyExists) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *KeySigningKeyAlreadyExists) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "KeySigningKeyAlreadyExists" + } + return *e.ErrorCodeOverride +} +func (e *KeySigningKeyAlreadyExists) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The key-signing key (KSK) is specified in a parent DS record. +type KeySigningKeyInParentDSRecord struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *KeySigningKeyInParentDSRecord) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *KeySigningKeyInParentDSRecord) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *KeySigningKeyInParentDSRecord) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "KeySigningKeyInParentDSRecord" + } + return *e.ErrorCodeOverride +} +func (e *KeySigningKeyInParentDSRecord) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The key-signing key (KSK) that you specified can't be deactivated because it's +// the only KSK for a currently-enabled DNSSEC. Disable DNSSEC signing, or add or +// enable another KSK. +type KeySigningKeyInUse struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *KeySigningKeyInUse) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *KeySigningKeyInUse) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *KeySigningKeyInUse) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "KeySigningKeyInUse" + } + return *e.ErrorCodeOverride +} +func (e *KeySigningKeyInUse) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// A key-signing key (KSK) with ACTIVE status wasn't found. +type KeySigningKeyWithActiveStatusNotFound struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *KeySigningKeyWithActiveStatusNotFound) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *KeySigningKeyWithActiveStatusNotFound) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *KeySigningKeyWithActiveStatusNotFound) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "KeySigningKeyWithActiveStatusNotFound" + } + return *e.ErrorCodeOverride +} +func (e *KeySigningKeyWithActiveStatusNotFound) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + +// The VPC that you're trying to disassociate from the private hosted zone is the +// last VPC that is associated with the hosted zone. Amazon Route 53 doesn't +// support disassociating the last VPC from a hosted zone. +type LastVPCAssociation struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *LastVPCAssociation) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *LastVPCAssociation) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *LastVPCAssociation) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "LastVPCAssociation" + } + return *e.ErrorCodeOverride +} +func (e *LastVPCAssociation) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// This operation can't be completed because the current account has reached the +// limit on the resource you are trying to create. To request a higher limit, +// create a case (http://aws.amazon.com/route53-request) with the Amazon Web +// Services Support Center. +type LimitsExceeded struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *LimitsExceeded) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *LimitsExceeded) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *LimitsExceeded) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "LimitsExceeded" + } + return *e.ErrorCodeOverride +} +func (e *LimitsExceeded) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// A change with the specified change ID does not exist. +type NoSuchChange struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *NoSuchChange) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *NoSuchChange) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *NoSuchChange) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "NoSuchChange" + } + return *e.ErrorCodeOverride +} +func (e *NoSuchChange) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The CIDR collection you specified, doesn't exist. +type NoSuchCidrCollectionException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *NoSuchCidrCollectionException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *NoSuchCidrCollectionException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *NoSuchCidrCollectionException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "NoSuchCidrCollectionException" + } + return *e.ErrorCodeOverride +} +func (e *NoSuchCidrCollectionException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The CIDR collection location doesn't match any locations in your account. +type NoSuchCidrLocationException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *NoSuchCidrLocationException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *NoSuchCidrLocationException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *NoSuchCidrLocationException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "NoSuchCidrLocationException" + } + return *e.ErrorCodeOverride +} +func (e *NoSuchCidrLocationException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// There is no CloudWatch Logs log group with the specified ARN. +type NoSuchCloudWatchLogsLogGroup struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *NoSuchCloudWatchLogsLogGroup) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *NoSuchCloudWatchLogsLogGroup) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *NoSuchCloudWatchLogsLogGroup) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "NoSuchCloudWatchLogsLogGroup" + } + return *e.ErrorCodeOverride +} +func (e *NoSuchCloudWatchLogsLogGroup) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// A reusable delegation set with the specified ID does not exist. +type NoSuchDelegationSet struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *NoSuchDelegationSet) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *NoSuchDelegationSet) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *NoSuchDelegationSet) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "NoSuchDelegationSet" + } + return *e.ErrorCodeOverride +} +func (e *NoSuchDelegationSet) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// Amazon Route 53 doesn't support the specified geographic location. For a list +// of supported geolocation codes, see the GeoLocation (https://docs.aws.amazon.com/Route53/latest/APIReference/API_GeoLocation.html) +// data type. +type NoSuchGeoLocation struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *NoSuchGeoLocation) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *NoSuchGeoLocation) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *NoSuchGeoLocation) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "NoSuchGeoLocation" + } + return *e.ErrorCodeOverride +} +func (e *NoSuchGeoLocation) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// No health check exists with the specified ID. +type NoSuchHealthCheck struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *NoSuchHealthCheck) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *NoSuchHealthCheck) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *NoSuchHealthCheck) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "NoSuchHealthCheck" + } + return *e.ErrorCodeOverride +} +func (e *NoSuchHealthCheck) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// No hosted zone exists with the ID that you specified. +type NoSuchHostedZone struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *NoSuchHostedZone) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *NoSuchHostedZone) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *NoSuchHostedZone) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "NoSuchHostedZone" + } + return *e.ErrorCodeOverride +} +func (e *NoSuchHostedZone) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The specified key-signing key (KSK) doesn't exist. +type NoSuchKeySigningKey struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *NoSuchKeySigningKey) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *NoSuchKeySigningKey) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *NoSuchKeySigningKey) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "NoSuchKeySigningKey" + } + return *e.ErrorCodeOverride +} +func (e *NoSuchKeySigningKey) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// There is no DNS query logging configuration with the specified ID. +type NoSuchQueryLoggingConfig struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *NoSuchQueryLoggingConfig) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *NoSuchQueryLoggingConfig) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *NoSuchQueryLoggingConfig) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "NoSuchQueryLoggingConfig" + } + return *e.ErrorCodeOverride +} +func (e *NoSuchQueryLoggingConfig) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// No traffic policy exists with the specified ID. +type NoSuchTrafficPolicy struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *NoSuchTrafficPolicy) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *NoSuchTrafficPolicy) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *NoSuchTrafficPolicy) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "NoSuchTrafficPolicy" + } + return *e.ErrorCodeOverride +} +func (e *NoSuchTrafficPolicy) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// No traffic policy instance exists with the specified ID. +type NoSuchTrafficPolicyInstance struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *NoSuchTrafficPolicyInstance) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *NoSuchTrafficPolicyInstance) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *NoSuchTrafficPolicyInstance) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "NoSuchTrafficPolicyInstance" + } + return *e.ErrorCodeOverride +} +func (e *NoSuchTrafficPolicyInstance) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// Associating the specified VPC with the specified hosted zone has not been +// authorized. +type NotAuthorizedException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *NotAuthorizedException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *NotAuthorizedException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *NotAuthorizedException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "NotAuthorizedException" + } + return *e.ErrorCodeOverride +} +func (e *NotAuthorizedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// If Amazon Route 53 can't process a request before the next request arrives, it +// will reject subsequent requests for the same hosted zone and return an HTTP 400 +// error ( Bad request ). If Route 53 returns this error repeatedly for the same +// request, we recommend that you wait, in intervals of increasing duration, before +// you try the request again. +type PriorRequestNotComplete struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *PriorRequestNotComplete) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *PriorRequestNotComplete) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *PriorRequestNotComplete) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "PriorRequestNotComplete" + } + return *e.ErrorCodeOverride +} +func (e *PriorRequestNotComplete) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// You're trying to associate a VPC with a public hosted zone. Amazon Route 53 +// doesn't support associating a VPC with a public hosted zone. +type PublicZoneVPCAssociation struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *PublicZoneVPCAssociation) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *PublicZoneVPCAssociation) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *PublicZoneVPCAssociation) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "PublicZoneVPCAssociation" + } + return *e.ErrorCodeOverride +} +func (e *PublicZoneVPCAssociation) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// You can create only one query logging configuration for a hosted zone, and a +// query logging configuration already exists for this hosted zone. +type QueryLoggingConfigAlreadyExists struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *QueryLoggingConfigAlreadyExists) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *QueryLoggingConfigAlreadyExists) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *QueryLoggingConfigAlreadyExists) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "QueryLoggingConfigAlreadyExists" + } + return *e.ErrorCodeOverride +} +func (e *QueryLoggingConfigAlreadyExists) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The limit on the number of requests per second was exceeded. +type ThrottlingException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *ThrottlingException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ThrottlingException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ThrottlingException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ThrottlingException" + } + return *e.ErrorCodeOverride +} +func (e *ThrottlingException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// This health check can't be created because the current account has reached the +// limit on the number of active health checks. For information about default +// limits, see Limits (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/DNSLimitations.html) +// in the Amazon Route 53 Developer Guide. For information about how to get the +// current limit for an account, see GetAccountLimit (https://docs.aws.amazon.com/Route53/latest/APIReference/API_GetAccountLimit.html) +// . To request a higher limit, create a case (http://aws.amazon.com/route53-request) +// with the Amazon Web Services Support Center. You have reached the maximum number +// of active health checks for an Amazon Web Services account. To request a higher +// limit, create a case (http://aws.amazon.com/route53-request) with the Amazon +// Web Services Support Center. +type TooManyHealthChecks struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *TooManyHealthChecks) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *TooManyHealthChecks) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *TooManyHealthChecks) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "TooManyHealthChecks" + } + return *e.ErrorCodeOverride +} +func (e *TooManyHealthChecks) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// This operation can't be completed either because the current account has +// reached the limit on the number of hosted zones or because you've reached the +// limit on the number of hosted zones that can be associated with a reusable +// delegation set. For information about default limits, see Limits (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/DNSLimitations.html) +// in the Amazon Route 53 Developer Guide. To get the current limit on hosted zones +// that can be created by an account, see GetAccountLimit (https://docs.aws.amazon.com/Route53/latest/APIReference/API_GetAccountLimit.html) +// . To get the current limit on hosted zones that can be associated with a +// reusable delegation set, see GetReusableDelegationSetLimit (https://docs.aws.amazon.com/Route53/latest/APIReference/API_GetReusableDelegationSetLimit.html) +// . To request a higher limit, create a case (http://aws.amazon.com/route53-request) +// with the Amazon Web Services Support Center. +type TooManyHostedZones struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *TooManyHostedZones) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *TooManyHostedZones) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *TooManyHostedZones) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "TooManyHostedZones" + } + return *e.ErrorCodeOverride +} +func (e *TooManyHostedZones) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// You've reached the limit for the number of key-signing keys (KSKs). Remove at +// least one KSK, and then try again. +type TooManyKeySigningKeys struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *TooManyKeySigningKeys) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *TooManyKeySigningKeys) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *TooManyKeySigningKeys) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "TooManyKeySigningKeys" + } + return *e.ErrorCodeOverride +} +func (e *TooManyKeySigningKeys) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// This traffic policy can't be created because the current account has reached +// the limit on the number of traffic policies. For information about default +// limits, see Limits (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/DNSLimitations.html) +// in the Amazon Route 53 Developer Guide. To get the current limit for an account, +// see GetAccountLimit (https://docs.aws.amazon.com/Route53/latest/APIReference/API_GetAccountLimit.html) +// . To request a higher limit, create a case (http://aws.amazon.com/route53-request) +// with the Amazon Web Services Support Center. +type TooManyTrafficPolicies struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *TooManyTrafficPolicies) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *TooManyTrafficPolicies) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *TooManyTrafficPolicies) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "TooManyTrafficPolicies" + } + return *e.ErrorCodeOverride +} +func (e *TooManyTrafficPolicies) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// This traffic policy instance can't be created because the current account has +// reached the limit on the number of traffic policy instances. For information +// about default limits, see Limits (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/DNSLimitations.html) +// in the Amazon Route 53 Developer Guide. For information about how to get the +// current limit for an account, see GetAccountLimit (https://docs.aws.amazon.com/Route53/latest/APIReference/API_GetAccountLimit.html) +// . To request a higher limit, create a case (http://aws.amazon.com/route53-request) +// with the Amazon Web Services Support Center. +type TooManyTrafficPolicyInstances struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *TooManyTrafficPolicyInstances) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *TooManyTrafficPolicyInstances) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *TooManyTrafficPolicyInstances) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "TooManyTrafficPolicyInstances" + } + return *e.ErrorCodeOverride +} +func (e *TooManyTrafficPolicyInstances) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// This traffic policy version can't be created because you've reached the limit +// of 1000 on the number of versions that you can create for the current traffic +// policy. To create more traffic policy versions, you can use GetTrafficPolicy (https://docs.aws.amazon.com/Route53/latest/APIReference/API_GetTrafficPolicy.html) +// to get the traffic policy document for a specified traffic policy version, and +// then use CreateTrafficPolicy (https://docs.aws.amazon.com/Route53/latest/APIReference/API_CreateTrafficPolicy.html) +// to create a new traffic policy using the traffic policy document. +type TooManyTrafficPolicyVersionsForCurrentPolicy struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *TooManyTrafficPolicyVersionsForCurrentPolicy) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *TooManyTrafficPolicyVersionsForCurrentPolicy) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *TooManyTrafficPolicyVersionsForCurrentPolicy) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "TooManyTrafficPolicyVersionsForCurrentPolicy" + } + return *e.ErrorCodeOverride +} +func (e *TooManyTrafficPolicyVersionsForCurrentPolicy) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + +// You've created the maximum number of authorizations that can be created for the +// specified hosted zone. To authorize another VPC to be associated with the hosted +// zone, submit a DeleteVPCAssociationAuthorization request to remove an existing +// authorization. To get a list of existing authorizations, submit a +// ListVPCAssociationAuthorizations request. +type TooManyVPCAssociationAuthorizations struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *TooManyVPCAssociationAuthorizations) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *TooManyVPCAssociationAuthorizations) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *TooManyVPCAssociationAuthorizations) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "TooManyVPCAssociationAuthorizations" + } + return *e.ErrorCodeOverride +} +func (e *TooManyVPCAssociationAuthorizations) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + +// A traffic policy that has the same value for Name already exists. +type TrafficPolicyAlreadyExists struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *TrafficPolicyAlreadyExists) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *TrafficPolicyAlreadyExists) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *TrafficPolicyAlreadyExists) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "TrafficPolicyAlreadyExists" + } + return *e.ErrorCodeOverride +} +func (e *TrafficPolicyAlreadyExists) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// There is already a traffic policy instance with the specified ID. +type TrafficPolicyInstanceAlreadyExists struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *TrafficPolicyInstanceAlreadyExists) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *TrafficPolicyInstanceAlreadyExists) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *TrafficPolicyInstanceAlreadyExists) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "TrafficPolicyInstanceAlreadyExists" + } + return *e.ErrorCodeOverride +} +func (e *TrafficPolicyInstanceAlreadyExists) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + +// One or more traffic policy instances were created by using the specified +// traffic policy. +type TrafficPolicyInUse struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *TrafficPolicyInUse) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *TrafficPolicyInUse) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *TrafficPolicyInUse) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "TrafficPolicyInUse" + } + return *e.ErrorCodeOverride +} +func (e *TrafficPolicyInUse) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The VPC that you specified is not authorized to be associated with the hosted +// zone. +type VPCAssociationAuthorizationNotFound struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *VPCAssociationAuthorizationNotFound) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *VPCAssociationAuthorizationNotFound) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *VPCAssociationAuthorizationNotFound) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "VPCAssociationAuthorizationNotFound" + } + return *e.ErrorCodeOverride +} +func (e *VPCAssociationAuthorizationNotFound) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + +// The specified VPC and hosted zone are not currently associated. +type VPCAssociationNotFound struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *VPCAssociationNotFound) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *VPCAssociationNotFound) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *VPCAssociationNotFound) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "VPCAssociationNotFound" + } + return *e.ErrorCodeOverride +} +func (e *VPCAssociationNotFound) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/types/types.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/types/types.go new file mode 100644 index 0000000..16e1d95 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/types/types.go @@ -0,0 +1,1766 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types + +import ( + smithydocument "github.com/aws/smithy-go/document" + "time" +) + +// A complex type that contains the type of limit that you specified in the +// request and the current value for that limit. +type AccountLimit struct { + + // The limit that you requested. Valid values include the following: + // - MAX_HEALTH_CHECKS_BY_OWNER: The maximum number of health checks that you + // can create using the current account. + // - MAX_HOSTED_ZONES_BY_OWNER: The maximum number of hosted zones that you can + // create using the current account. + // - MAX_REUSABLE_DELEGATION_SETS_BY_OWNER: The maximum number of reusable + // delegation sets that you can create using the current account. + // - MAX_TRAFFIC_POLICIES_BY_OWNER: The maximum number of traffic policies that + // you can create using the current account. + // - MAX_TRAFFIC_POLICY_INSTANCES_BY_OWNER: The maximum number of traffic policy + // instances that you can create using the current account. (Traffic policy + // instances are referred to as traffic flow policy records in the Amazon Route 53 + // console.) + // + // This member is required. + Type AccountLimitType + + // The current value for the limit that is specified by Type (https://docs.aws.amazon.com/Route53/latest/APIReference/API_AccountLimit.html#Route53-Type-AccountLimit-Type) + // . + // + // This member is required. + Value int64 + + noSmithyDocumentSerde +} + +// A complex type that identifies the CloudWatch alarm that you want Amazon Route +// 53 health checkers to use to determine whether the specified health check is +// healthy. +type AlarmIdentifier struct { + + // The name of the CloudWatch alarm that you want Amazon Route 53 health checkers + // to use to determine whether this health check is healthy. Route 53 supports + // CloudWatch alarms with the following features: + // - Standard-resolution metrics. High-resolution metrics aren't supported. For + // more information, see High-Resolution Metrics (https://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/publishingMetrics.html#high-resolution-metrics) + // in the Amazon CloudWatch User Guide. + // - Statistics: Average, Minimum, Maximum, Sum, and SampleCount. Extended + // statistics aren't supported. + // + // This member is required. + Name *string + + // For the CloudWatch alarm that you want Route 53 health checkers to use to + // determine whether this health check is healthy, the region that the alarm was + // created in. For the current list of CloudWatch regions, see Amazon CloudWatch + // endpoints and quotas (https://docs.aws.amazon.com/general/latest/gr/cw_region.html) + // in the Amazon Web Services General Reference. + // + // This member is required. + Region CloudWatchRegion + + noSmithyDocumentSerde +} + +// Alias resource record sets only: Information about the Amazon Web Services +// resource, such as a CloudFront distribution or an Amazon S3 bucket, that you +// want to route traffic to. When creating resource record sets for a private +// hosted zone, note the following: +// - For information about creating failover resource record sets in a private +// hosted zone, see Configuring Failover in a Private Hosted Zone (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-private-hosted-zones.html) +// . +type AliasTarget struct { + + // Alias resource record sets only: The value that you specify depends on where + // you want to route queries: Amazon API Gateway custom regional APIs and + // edge-optimized APIs Specify the applicable domain name for your API. You can get + // the applicable value using the CLI command get-domain-names (https://docs.aws.amazon.com/cli/latest/reference/apigateway/get-domain-names.html) + // : + // - For regional APIs, specify the value of regionalDomainName . + // - For edge-optimized APIs, specify the value of distributionDomainName . This + // is the name of the associated CloudFront distribution, such as + // da1b2c3d4e5.cloudfront.net . + // The name of the record that you're creating must match a custom domain name for + // your API, such as api.example.com . Amazon Virtual Private Cloud interface VPC + // endpoint Enter the API endpoint for the interface endpoint, such as + // vpce-123456789abcdef01-example-us-east-1a.elasticloadbalancing.us-east-1.vpce.amazonaws.com + // . For edge-optimized APIs, this is the domain name for the corresponding + // CloudFront distribution. You can get the value of DnsName using the CLI command + // describe-vpc-endpoints (https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-vpc-endpoints.html) + // . CloudFront distribution Specify the domain name that CloudFront assigned when + // you created your distribution. Your CloudFront distribution must include an + // alternate domain name that matches the name of the resource record set. For + // example, if the name of the resource record set is acme.example.com, your + // CloudFront distribution must include acme.example.com as one of the alternate + // domain names. For more information, see Using Alternate Domain Names (CNAMEs) (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/CNAMEs.html) + // in the Amazon CloudFront Developer Guide. You can't create a resource record set + // in a private hosted zone to route traffic to a CloudFront distribution. For + // failover alias records, you can't specify a CloudFront distribution for both the + // primary and secondary records. A distribution must include an alternate domain + // name that matches the name of the record. However, the primary and secondary + // records have the same name, and you can't include the same alternate domain name + // in more than one distribution. Elastic Beanstalk environment If the domain name + // for your Elastic Beanstalk environment includes the region that you deployed the + // environment in, you can create an alias record that routes traffic to the + // environment. For example, the domain name + // my-environment.us-west-2.elasticbeanstalk.com is a regionalized domain name. For + // environments that were created before early 2016, the domain name doesn't + // include the region. To route traffic to these environments, you must create a + // CNAME record instead of an alias record. Note that you can't create a CNAME + // record for the root domain name. For example, if your domain name is + // example.com, you can create a record that routes traffic for acme.example.com to + // your Elastic Beanstalk environment, but you can't create a record that routes + // traffic for example.com to your Elastic Beanstalk environment. For Elastic + // Beanstalk environments that have regionalized subdomains, specify the CNAME + // attribute for the environment. You can use the following methods to get the + // value of the CNAME attribute: + // - Amazon Web Services Management Console: For information about how to get + // the value by using the console, see Using Custom Domains with Elastic + // Beanstalk (https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/customdomains.html) + // in the Elastic Beanstalk Developer Guide. + // - Elastic Beanstalk API: Use the DescribeEnvironments action to get the value + // of the CNAME attribute. For more information, see DescribeEnvironments (https://docs.aws.amazon.com/elasticbeanstalk/latest/api/API_DescribeEnvironments.html) + // in the Elastic Beanstalk API Reference. + // - CLI: Use the describe-environments command to get the value of the CNAME + // attribute. For more information, see describe-environments (https://docs.aws.amazon.com/cli/latest/reference/elasticbeanstalk/describe-environments.html) + // in the CLI Command Reference. + // ELB load balancer Specify the DNS name that is associated with the load + // balancer. Get the DNS name by using the Amazon Web Services Management Console, + // the ELB API, or the CLI. + // - Amazon Web Services Management Console: Go to the EC2 page, choose Load + // Balancers in the navigation pane, choose the load balancer, choose the + // Description tab, and get the value of the DNS name field. If you're routing + // traffic to a Classic Load Balancer, get the value that begins with dualstack. If + // you're routing traffic to another type of load balancer, get the value that + // applies to the record type, A or AAAA. + // - Elastic Load Balancing API: Use DescribeLoadBalancers to get the value of + // DNSName . For more information, see the applicable guide: + // - Classic Load Balancers: DescribeLoadBalancers (https://docs.aws.amazon.com/elasticloadbalancing/2012-06-01/APIReference/API_DescribeLoadBalancers.html) + // - Application and Network Load Balancers: DescribeLoadBalancers (https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_DescribeLoadBalancers.html) + // - CLI: Use describe-load-balancers to get the value of DNSName . For more + // information, see the applicable guide: + // - Classic Load Balancers: describe-load-balancers (http://docs.aws.amazon.com/cli/latest/reference/elb/describe-load-balancers.html) + // - Application and Network Load Balancers: describe-load-balancers (http://docs.aws.amazon.com/cli/latest/reference/elbv2/describe-load-balancers.html) + // Global Accelerator accelerator Specify the DNS name for your accelerator: + // - Global Accelerator API: To get the DNS name, use DescribeAccelerator (https://docs.aws.amazon.com/global-accelerator/latest/api/API_DescribeAccelerator.html) + // . + // - CLI: To get the DNS name, use describe-accelerator (https://docs.aws.amazon.com/cli/latest/reference/globalaccelerator/describe-accelerator.html) + // . + // Amazon S3 bucket that is configured as a static website Specify the domain name + // of the Amazon S3 website endpoint that you created the bucket in, for example, + // s3-website.us-east-2.amazonaws.com . For more information about valid values, + // see the table Amazon S3 Website Endpoints (https://docs.aws.amazon.com/general/latest/gr/s3.html#s3_website_region_endpoints) + // in the Amazon Web Services General Reference. For more information about using + // S3 buckets for websites, see Getting Started with Amazon Route 53 (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/getting-started.html) + // in the Amazon Route 53 Developer Guide. Another Route 53 resource record set + // Specify the value of the Name element for a resource record set in the current + // hosted zone. If you're creating an alias record that has the same name as the + // hosted zone (known as the zone apex), you can't specify the domain name for a + // record for which the value of Type is CNAME . This is because the alias record + // must have the same type as the record that you're routing traffic to, and + // creating a CNAME record for the zone apex isn't supported even for an alias + // record. + // + // This member is required. + DNSName *string + + // Applies only to alias, failover alias, geolocation alias, latency alias, and + // weighted alias resource record sets: When EvaluateTargetHealth is true , an + // alias resource record set inherits the health of the referenced Amazon Web + // Services resource, such as an ELB load balancer or another resource record set + // in the hosted zone. Note the following: CloudFront distributions You can't set + // EvaluateTargetHealth to true when the alias target is a CloudFront + // distribution. Elastic Beanstalk environments that have regionalized subdomains + // If you specify an Elastic Beanstalk environment in DNSName and the environment + // contains an ELB load balancer, Elastic Load Balancing routes queries only to the + // healthy Amazon EC2 instances that are registered with the load balancer. (An + // environment automatically contains an ELB load balancer if it includes more than + // one Amazon EC2 instance.) If you set EvaluateTargetHealth to true and either no + // Amazon EC2 instances are healthy or the load balancer itself is unhealthy, Route + // 53 routes queries to other available resources that are healthy, if any. If the + // environment contains a single Amazon EC2 instance, there are no special + // requirements. ELB load balancers Health checking behavior depends on the type of + // load balancer: + // - Classic Load Balancers: If you specify an ELB Classic Load Balancer in + // DNSName , Elastic Load Balancing routes queries only to the healthy Amazon EC2 + // instances that are registered with the load balancer. If you set + // EvaluateTargetHealth to true and either no EC2 instances are healthy or the + // load balancer itself is unhealthy, Route 53 routes queries to other resources. + // - Application and Network Load Balancers: If you specify an ELB Application + // or Network Load Balancer and you set EvaluateTargetHealth to true , Route 53 + // routes queries to the load balancer based on the health of the target groups + // that are associated with the load balancer: + // - For an Application or Network Load Balancer to be considered healthy, every + // target group that contains targets must contain at least one healthy target. If + // any target group contains only unhealthy targets, the load balancer is + // considered unhealthy, and Route 53 routes queries to other resources. + // - A target group that has no registered targets is considered unhealthy. + // When you create a load balancer, you configure settings for Elastic Load + // Balancing health checks; they're not Route 53 health checks, but they perform a + // similar function. Do not create Route 53 health checks for the EC2 instances + // that you register with an ELB load balancer. S3 buckets There are no special + // requirements for setting EvaluateTargetHealth to true when the alias target is + // an S3 bucket. Other records in the same hosted zone If the Amazon Web Services + // resource that you specify in DNSName is a record or a group of records (for + // example, a group of weighted records) but is not another alias record, we + // recommend that you associate a health check with all of the records in the alias + // target. For more information, see What Happens When You Omit Health Checks? (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-complex-configs.html#dns-failover-complex-configs-hc-omitting) + // in the Amazon Route 53 Developer Guide. For more information and examples, see + // Amazon Route 53 Health Checks and DNS Failover (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover.html) + // in the Amazon Route 53 Developer Guide. + // + // This member is required. + EvaluateTargetHealth bool + + // Alias resource records sets only: The value used depends on where you want to + // route traffic: Amazon API Gateway custom regional APIs and edge-optimized APIs + // Specify the hosted zone ID for your API. You can get the applicable value using + // the CLI command get-domain-names (https://docs.aws.amazon.com/cli/latest/reference/apigateway/get-domain-names.html) + // : + // - For regional APIs, specify the value of regionalHostedZoneId . + // - For edge-optimized APIs, specify the value of distributionHostedZoneId . + // Amazon Virtual Private Cloud interface VPC endpoint Specify the hosted zone ID + // for your interface endpoint. You can get the value of HostedZoneId using the + // CLI command describe-vpc-endpoints (https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-vpc-endpoints.html) + // . CloudFront distribution Specify Z2FDTNDATAQYW2 . Alias resource record sets + // for CloudFront can't be created in a private zone. Elastic Beanstalk environment + // Specify the hosted zone ID for the region that you created the environment in. + // The environment must have a regionalized subdomain. For a list of regions and + // the corresponding hosted zone IDs, see Elastic Beanstalk endpoints and quotas (https://docs.aws.amazon.com/general/latest/gr/elasticbeanstalk.html) + // in the the Amazon Web Services General Reference. ELB load balancer Specify the + // value of the hosted zone ID for the load balancer. Use the following methods to + // get the hosted zone ID: + // - Elastic Load Balancing endpoints and quotas (https://docs.aws.amazon.com/general/latest/gr/elb.html) + // topic in the Amazon Web Services General Reference: Use the value that + // corresponds with the region that you created your load balancer in. Note that + // there are separate columns for Application and Classic Load Balancers and for + // Network Load Balancers. + // - Amazon Web Services Management Console: Go to the Amazon EC2 page, choose + // Load Balancers in the navigation pane, select the load balancer, and get the + // value of the Hosted zone field on the Description tab. + // - Elastic Load Balancing API: Use DescribeLoadBalancers to get the applicable + // value. For more information, see the applicable guide: + // - Classic Load Balancers: Use DescribeLoadBalancers (https://docs.aws.amazon.com/elasticloadbalancing/2012-06-01/APIReference/API_DescribeLoadBalancers.html) + // to get the value of CanonicalHostedZoneNameId . + // - Application and Network Load Balancers: Use DescribeLoadBalancers (https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_DescribeLoadBalancers.html) + // to get the value of CanonicalHostedZoneId . + // - CLI: Use describe-load-balancers to get the applicable value. For more + // information, see the applicable guide: + // - Classic Load Balancers: Use describe-load-balancers (http://docs.aws.amazon.com/cli/latest/reference/elb/describe-load-balancers.html) + // to get the value of CanonicalHostedZoneNameId . + // - Application and Network Load Balancers: Use describe-load-balancers (http://docs.aws.amazon.com/cli/latest/reference/elbv2/describe-load-balancers.html) + // to get the value of CanonicalHostedZoneId . + // Global Accelerator accelerator Specify Z2BJ6XQ5FK7U4H . An Amazon S3 bucket + // configured as a static website Specify the hosted zone ID for the region that + // you created the bucket in. For more information about valid values, see the + // table Amazon S3 Website Endpoints (https://docs.aws.amazon.com/general/latest/gr/s3.html#s3_website_region_endpoints) + // in the Amazon Web Services General Reference. Another Route 53 resource record + // set in your hosted zone Specify the hosted zone ID of your hosted zone. (An + // alias resource record set can't reference a resource record set in a different + // hosted zone.) + // + // This member is required. + HostedZoneId *string + + noSmithyDocumentSerde +} + +// The information for each resource record set that you want to change. +type Change struct { + + // The action to perform: + // - CREATE : Creates a resource record set that has the specified values. + // - DELETE : Deletes a existing resource record set. To delete the resource + // record set that is associated with a traffic policy instance, use + // DeleteTrafficPolicyInstance (https://docs.aws.amazon.com/Route53/latest/APIReference/API_DeleteTrafficPolicyInstance.html) + // . Amazon Route 53 will delete the resource record set automatically. If you + // delete the resource record set by using ChangeResourceRecordSets , Route 53 + // doesn't automatically delete the traffic policy instance, and you'll continue to + // be charged for it even though it's no longer in use. + // - UPSERT : If a resource record set doesn't already exist, Route 53 creates + // it. If a resource record set does exist, Route 53 updates it with the values in + // the request. + // + // This member is required. + Action ChangeAction + + // Information about the resource record set to create, delete, or update. + // + // This member is required. + ResourceRecordSet *ResourceRecordSet + + noSmithyDocumentSerde +} + +// The information for a change request. +type ChangeBatch struct { + + // Information about the changes to make to the record sets. + // + // This member is required. + Changes []Change + + // Optional: Any comments you want to include about a change batch request. + Comment *string + + noSmithyDocumentSerde +} + +// A complex type that describes change information about changes made to your +// hosted zone. +type ChangeInfo struct { + + // This element contains an ID that you use when performing a GetChange (https://docs.aws.amazon.com/Route53/latest/APIReference/API_GetChange.html) + // action to get detailed information about the change. + // + // This member is required. + Id *string + + // The current state of the request. PENDING indicates that this request has not + // yet been applied to all Amazon Route 53 DNS servers. + // + // This member is required. + Status ChangeStatus + + // The date and time that the change request was submitted in ISO 8601 format (https://en.wikipedia.org/wiki/ISO_8601) + // and Coordinated Universal Time (UTC). For example, the value + // 2017-03-27T17:48:16.751Z represents March 27, 2017 at 17:48:16.751 UTC. + // + // This member is required. + SubmittedAt *time.Time + + // A comment you can provide. + Comment *string + + noSmithyDocumentSerde +} + +// A complex type that lists the CIDR blocks. +type CidrBlockSummary struct { + + // Value for the CIDR block. + CidrBlock *string + + // The location name of the CIDR block. + LocationName *string + + noSmithyDocumentSerde +} + +// A complex type that identifies a CIDR collection. +type CidrCollection struct { + + // The ARN of the collection. Can be used to reference the collection in IAM + // policy or in another Amazon Web Services account. + Arn *string + + // The unique ID of the CIDR collection. + Id *string + + // The name of a CIDR collection. + Name *string + + // A sequential counter that Route 53 sets to 1 when you create a CIDR collection + // and increments by 1 each time you update settings for the CIDR collection. + Version *int64 + + noSmithyDocumentSerde +} + +// A complex type that contains information about the CIDR collection change. +type CidrCollectionChange struct { + + // CIDR collection change action. + // + // This member is required. + Action CidrCollectionChangeAction + + // List of CIDR blocks. + // + // This member is required. + CidrList []string + + // Name of the location that is associated with the CIDR collection. + // + // This member is required. + LocationName *string + + noSmithyDocumentSerde +} + +// The object that is specified in resource record set object when you are linking +// a resource record set to a CIDR location. A LocationName with an asterisk “*” +// can be used to create a default CIDR record. CollectionId is still required for +// default record. +type CidrRoutingConfig struct { + + // The CIDR collection ID. + // + // This member is required. + CollectionId *string + + // The CIDR collection location name. + // + // This member is required. + LocationName *string + + noSmithyDocumentSerde +} + +// A complex type that contains information about the CloudWatch alarm that Amazon +// Route 53 is monitoring for this health check. +type CloudWatchAlarmConfiguration struct { + + // For the metric that the CloudWatch alarm is associated with, the arithmetic + // operation that is used for the comparison. + // + // This member is required. + ComparisonOperator ComparisonOperator + + // For the metric that the CloudWatch alarm is associated with, the number of + // periods that the metric is compared to the threshold. + // + // This member is required. + EvaluationPeriods *int32 + + // The name of the CloudWatch metric that the alarm is associated with. + // + // This member is required. + MetricName *string + + // The namespace of the metric that the alarm is associated with. For more + // information, see Amazon CloudWatch Namespaces, Dimensions, and Metrics Reference (https://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/CW_Support_For_AWS.html) + // in the Amazon CloudWatch User Guide. + // + // This member is required. + Namespace *string + + // For the metric that the CloudWatch alarm is associated with, the duration of + // one evaluation period in seconds. + // + // This member is required. + Period *int32 + + // For the metric that the CloudWatch alarm is associated with, the statistic that + // is applied to the metric. + // + // This member is required. + Statistic Statistic + + // For the metric that the CloudWatch alarm is associated with, the value the + // metric is compared with. + // + // This member is required. + Threshold *float64 + + // For the metric that the CloudWatch alarm is associated with, a complex type + // that contains information about the dimensions for the metric. For information, + // see Amazon CloudWatch Namespaces, Dimensions, and Metrics Reference (https://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/CW_Support_For_AWS.html) + // in the Amazon CloudWatch User Guide. + Dimensions []Dimension + + noSmithyDocumentSerde +} + +// A complex type that is an entry in an CidrCollection (https://docs.aws.amazon.com/Route53/latest/APIReference/API_CidrCollection.html) +// array. +type CollectionSummary struct { + + // The ARN of the collection summary. Can be used to reference the collection in + // IAM policy or cross-account. + Arn *string + + // Unique ID for the CIDR collection. + Id *string + + // The name of a CIDR collection. + Name *string + + // A sequential counter that Route 53 sets to 1 when you create a CIDR collection + // and increments by 1 each time you update settings for the CIDR collection. + Version *int64 + + noSmithyDocumentSerde +} + +// A complex type that lists the name servers in a delegation set, as well as the +// CallerReference and the ID for the delegation set. +type DelegationSet struct { + + // A complex type that contains a list of the authoritative name servers for a + // hosted zone or for a reusable delegation set. + // + // This member is required. + NameServers []string + + // The value that you specified for CallerReference when you created the reusable + // delegation set. + CallerReference *string + + // The ID that Amazon Route 53 assigns to a reusable delegation set. + Id *string + + noSmithyDocumentSerde +} + +// For the metric that the CloudWatch alarm is associated with, a complex type +// that contains information about one dimension. +type Dimension struct { + + // For the metric that the CloudWatch alarm is associated with, the name of one + // dimension. + // + // This member is required. + Name *string + + // For the metric that the CloudWatch alarm is associated with, the value of one + // dimension. + // + // This member is required. + Value *string + + noSmithyDocumentSerde +} + +// A string repesenting the status of DNSSEC signing. +type DNSSECStatus struct { + + // A string that represents the current hosted zone signing status. Status can + // have one of the following values: SIGNING DNSSEC signing is enabled for the + // hosted zone. NOT_SIGNING DNSSEC signing is not enabled for the hosted zone. + // DELETING DNSSEC signing is in the process of being removed for the hosted zone. + // ACTION_NEEDED There is a problem with signing in the hosted zone that requires + // you to take action to resolve. For example, the customer managed key might have + // been deleted, or the permissions for the customer managed key might have been + // changed. INTERNAL_FAILURE There was an error during a request. Before you can + // continue to work with DNSSEC signing, including with key-signing keys (KSKs), + // you must correct the problem by enabling or disabling DNSSEC signing for the + // hosted zone. + ServeSignature *string + + // The status message provided for the following DNSSEC signing status: + // INTERNAL_FAILURE . The status message includes information about what the + // problem might be and steps that you can take to correct the issue. + StatusMessage *string + + noSmithyDocumentSerde +} + +// A complex type that contains information about a geographic location. +type GeoLocation struct { + + // The two-letter code for the continent. Amazon Route 53 supports the following + // continent codes: + // - AF: Africa + // - AN: Antarctica + // - AS: Asia + // - EU: Europe + // - OC: Oceania + // - NA: North America + // - SA: South America + // Constraint: Specifying ContinentCode with either CountryCode or SubdivisionCode + // returns an InvalidInput error. + ContinentCode *string + + // For geolocation resource record sets, the two-letter code for a country. Amazon + // Route 53 uses the two-letter country codes that are specified in ISO standard + // 3166-1 alpha-2 (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) . + CountryCode *string + + // For geolocation resource record sets, the two-letter code for a state of the + // United States. Route 53 doesn't support any other values for SubdivisionCode . + // For a list of state abbreviations, see Appendix B: Two–Letter State and + // Possession Abbreviations (https://pe.usps.com/text/pub28/28apb.htm) on the + // United States Postal Service website. If you specify subdivisioncode , you must + // also specify US for CountryCode . + SubdivisionCode *string + + noSmithyDocumentSerde +} + +// A complex type that contains the codes and full continent, country, and +// subdivision names for the specified geolocation code. +type GeoLocationDetails struct { + + // The two-letter code for the continent. + ContinentCode *string + + // The full name of the continent. + ContinentName *string + + // The two-letter code for the country. + CountryCode *string + + // The name of the country. + CountryName *string + + // The code for the subdivision, such as a particular state within the United + // States. For a list of US state abbreviations, see Appendix B: Two–Letter State + // and Possession Abbreviations (https://pe.usps.com/text/pub28/28apb.htm) on the + // United States Postal Service website. For a list of all supported subdivision + // codes, use the ListGeoLocations (https://docs.aws.amazon.com/Route53/latest/APIReference/API_ListGeoLocations.html) + // API. + SubdivisionCode *string + + // The full name of the subdivision. Route 53 currently supports only states in + // the United States. + SubdivisionName *string + + noSmithyDocumentSerde +} + +// A complex type that contains information about one health check that is +// associated with the current Amazon Web Services account. +type HealthCheck struct { + + // A unique string that you specified when you created the health check. + // + // This member is required. + CallerReference *string + + // A complex type that contains detailed information about one health check. + // + // This member is required. + HealthCheckConfig *HealthCheckConfig + + // The version of the health check. You can optionally pass this value in a call + // to UpdateHealthCheck to prevent overwriting another change to the health check. + // + // This member is required. + HealthCheckVersion *int64 + + // The identifier that Amazon Route 53 assigned to the health check when you + // created it. When you add or update a resource record set, you use this value to + // specify which health check to use. The value can be up to 64 characters long. + // + // This member is required. + Id *string + + // A complex type that contains information about the CloudWatch alarm that Amazon + // Route 53 is monitoring for this health check. + CloudWatchAlarmConfiguration *CloudWatchAlarmConfiguration + + // If the health check was created by another service, the service that created + // the health check. When a health check is created by another service, you can't + // edit or delete it using Amazon Route 53. + LinkedService *LinkedService + + noSmithyDocumentSerde +} + +// A complex type that contains information about the health check. +type HealthCheckConfig struct { + + // The type of health check that you want to create, which indicates how Amazon + // Route 53 determines whether an endpoint is healthy. You can't change the value + // of Type after you create a health check. You can create the following types of + // health checks: + // - HTTP: Route 53 tries to establish a TCP connection. If successful, Route 53 + // submits an HTTP request and waits for an HTTP status code of 200 or greater and + // less than 400. + // - HTTPS: Route 53 tries to establish a TCP connection. If successful, Route + // 53 submits an HTTPS request and waits for an HTTP status code of 200 or greater + // and less than 400. If you specify HTTPS for the value of Type , the endpoint + // must support TLS v1.0 or later. + // - HTTP_STR_MATCH: Route 53 tries to establish a TCP connection. If + // successful, Route 53 submits an HTTP request and searches the first 5,120 bytes + // of the response body for the string that you specify in SearchString . + // - HTTPS_STR_MATCH: Route 53 tries to establish a TCP connection. If + // successful, Route 53 submits an HTTPS request and searches the first 5,120 + // bytes of the response body for the string that you specify in SearchString . + // - TCP: Route 53 tries to establish a TCP connection. + // - CLOUDWATCH_METRIC: The health check is associated with a CloudWatch alarm. + // If the state of the alarm is OK , the health check is considered healthy. If + // the state is ALARM , the health check is considered unhealthy. If CloudWatch + // doesn't have sufficient data to determine whether the state is OK or ALARM , + // the health check status depends on the setting for + // InsufficientDataHealthStatus : Healthy , Unhealthy , or LastKnownStatus . + // - CALCULATED: For health checks that monitor the status of other health + // checks, Route 53 adds up the number of health checks that Route 53 health + // checkers consider to be healthy and compares that number with the value of + // HealthThreshold . + // - RECOVERY_CONTROL: The health check is assocated with a Route53 Application + // Recovery Controller routing control. If the routing control state is ON , the + // health check is considered healthy. If the state is OFF , the health check is + // considered unhealthy. + // For more information, see How Route 53 Determines Whether an Endpoint Is Healthy (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-determining-health-of-endpoints.html) + // in the Amazon Route 53 Developer Guide. + // + // This member is required. + Type HealthCheckType + + // A complex type that identifies the CloudWatch alarm that you want Amazon Route + // 53 health checkers to use to determine whether the specified health check is + // healthy. + AlarmIdentifier *AlarmIdentifier + + // (CALCULATED Health Checks Only) A complex type that contains one + // ChildHealthCheck element for each health check that you want to associate with a + // CALCULATED health check. + ChildHealthChecks []string + + // Stops Route 53 from performing health checks. When you disable a health check, + // here's what happens: + // - Health checks that check the health of endpoints: Route 53 stops submitting + // requests to your application, server, or other resource. + // - Calculated health checks: Route 53 stops aggregating the status of the + // referenced health checks. + // - Health checks that monitor CloudWatch alarms: Route 53 stops monitoring the + // corresponding CloudWatch metrics. + // After you disable a health check, Route 53 considers the status of the health + // check to always be healthy. If you configured DNS failover, Route 53 continues + // to route traffic to the corresponding resources. If you want to stop routing + // traffic to a resource, change the value of Inverted (https://docs.aws.amazon.com/Route53/latest/APIReference/API_UpdateHealthCheck.html#Route53-UpdateHealthCheck-request-Inverted) + // . Charges for a health check still apply when the health check is disabled. For + // more information, see Amazon Route 53 Pricing (http://aws.amazon.com/route53/pricing/) + // . + Disabled *bool + + // Specify whether you want Amazon Route 53 to send the value of + // FullyQualifiedDomainName to the endpoint in the client_hello message during TLS + // negotiation. This allows the endpoint to respond to HTTPS health check requests + // with the applicable SSL/TLS certificate. Some endpoints require that HTTPS + // requests include the host name in the client_hello message. If you don't enable + // SNI, the status of the health check will be SSL alert handshake_failure . A + // health check can also have that status for other reasons. If SNI is enabled and + // you're still getting the error, check the SSL/TLS configuration on your endpoint + // and confirm that your certificate is valid. The SSL/TLS certificate on your + // endpoint includes a domain name in the Common Name field and possibly several + // more in the Subject Alternative Names field. One of the domain names in the + // certificate should match the value that you specify for FullyQualifiedDomainName + // . If the endpoint responds to the client_hello message with a certificate that + // does not include the domain name that you specified in FullyQualifiedDomainName + // , a health checker will retry the handshake. In the second attempt, the health + // checker will omit FullyQualifiedDomainName from the client_hello message. + EnableSNI *bool + + // The number of consecutive health checks that an endpoint must pass or fail for + // Amazon Route 53 to change the current status of the endpoint from unhealthy to + // healthy or vice versa. For more information, see How Amazon Route 53 Determines + // Whether an Endpoint Is Healthy (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-determining-health-of-endpoints.html) + // in the Amazon Route 53 Developer Guide. If you don't specify a value for + // FailureThreshold , the default value is three health checks. + FailureThreshold *int32 + + // Amazon Route 53 behavior depends on whether you specify a value for IPAddress . + // If you specify a value for IPAddress : Amazon Route 53 sends health check + // requests to the specified IPv4 or IPv6 address and passes the value of + // FullyQualifiedDomainName in the Host header for all health checks except TCP + // health checks. This is typically the fully qualified DNS name of the endpoint on + // which you want Route 53 to perform health checks. When Route 53 checks the + // health of an endpoint, here is how it constructs the Host header: + // - If you specify a value of 80 for Port and HTTP or HTTP_STR_MATCH for Type , + // Route 53 passes the value of FullyQualifiedDomainName to the endpoint in the + // Host header. + // - If you specify a value of 443 for Port and HTTPS or HTTPS_STR_MATCH for Type + // , Route 53 passes the value of FullyQualifiedDomainName to the endpoint in the + // Host header. + // - If you specify another value for Port and any value except TCP for Type , + // Route 53 passes FullyQualifiedDomainName:Port to the endpoint in the Host + // header. + // If you don't specify a value for FullyQualifiedDomainName , Route 53 substitutes + // the value of IPAddress in the Host header in each of the preceding cases. If + // you don't specify a value for IPAddress : Route 53 sends a DNS request to the + // domain that you specify for FullyQualifiedDomainName at the interval that you + // specify for RequestInterval . Using an IPv4 address that DNS returns, Route 53 + // then checks the health of the endpoint. If you don't specify a value for + // IPAddress , Route 53 uses only IPv4 to send health checks to the endpoint. If + // there's no resource record set with a type of A for the name that you specify + // for FullyQualifiedDomainName , the health check fails with a "DNS resolution + // failed" error. If you want to check the health of weighted, latency, or failover + // resource record sets and you choose to specify the endpoint only by + // FullyQualifiedDomainName , we recommend that you create a separate health check + // for each endpoint. For example, create a health check for each HTTP server that + // is serving content for www.example.com. For the value of + // FullyQualifiedDomainName , specify the domain name of the server (such as + // us-east-2-www.example.com), not the name of the resource record sets + // (www.example.com). In this configuration, if you create a health check for which + // the value of FullyQualifiedDomainName matches the name of the resource record + // sets and you then associate the health check with those resource record sets, + // health check results will be unpredictable. In addition, if the value that you + // specify for Type is HTTP , HTTPS , HTTP_STR_MATCH , or HTTPS_STR_MATCH , Route + // 53 passes the value of FullyQualifiedDomainName in the Host header, as it does + // when you specify a value for IPAddress . If the value of Type is TCP , Route 53 + // doesn't pass a Host header. + FullyQualifiedDomainName *string + + // The number of child health checks that are associated with a CALCULATED health + // check that Amazon Route 53 must consider healthy for the CALCULATED health + // check to be considered healthy. To specify the child health checks that you want + // to associate with a CALCULATED health check, use the ChildHealthChecks (https://docs.aws.amazon.com/Route53/latest/APIReference/API_UpdateHealthCheck.html#Route53-UpdateHealthCheck-request-ChildHealthChecks) + // element. Note the following: + // - If you specify a number greater than the number of child health checks, + // Route 53 always considers this health check to be unhealthy. + // - If you specify 0 , Route 53 always considers this health check to be + // healthy. + HealthThreshold *int32 + + // The IPv4 or IPv6 IP address of the endpoint that you want Amazon Route 53 to + // perform health checks on. If you don't specify a value for IPAddress , Route 53 + // sends a DNS request to resolve the domain name that you specify in + // FullyQualifiedDomainName at the interval that you specify in RequestInterval . + // Using an IP address returned by DNS, Route 53 then checks the health of the + // endpoint. Use one of the following formats for the value of IPAddress : + // - IPv4 address: four values between 0 and 255, separated by periods (.), for + // example, 192.0.2.44 . + // - IPv6 address: eight groups of four hexadecimal values, separated by colons + // (:), for example, 2001:0db8:85a3:0000:0000:abcd:0001:2345 . You can also + // shorten IPv6 addresses as described in RFC 5952, for example, + // 2001:db8:85a3::abcd:1:2345 . + // If the endpoint is an EC2 instance, we recommend that you create an Elastic IP + // address, associate it with your EC2 instance, and specify the Elastic IP address + // for IPAddress . This ensures that the IP address of your instance will never + // change. For more information, see FullyQualifiedDomainName (https://docs.aws.amazon.com/Route53/latest/APIReference/API_UpdateHealthCheck.html#Route53-UpdateHealthCheck-request-FullyQualifiedDomainName) + // . Constraints: Route 53 can't check the health of endpoints for which the IP + // address is in local, private, non-routable, or multicast ranges. For more + // information about IP addresses for which you can't create health checks, see the + // following documents: + // - RFC 5735, Special Use IPv4 Addresses (https://tools.ietf.org/html/rfc5735) + // - RFC 6598, IANA-Reserved IPv4 Prefix for Shared Address Space (https://tools.ietf.org/html/rfc6598) + // - RFC 5156, Special-Use IPv6 Addresses (https://tools.ietf.org/html/rfc5156) + // When the value of Type is CALCULATED or CLOUDWATCH_METRIC , omit IPAddress . + IPAddress *string + + // When CloudWatch has insufficient data about the metric to determine the alarm + // state, the status that you want Amazon Route 53 to assign to the health check: + // - Healthy : Route 53 considers the health check to be healthy. + // - Unhealthy : Route 53 considers the health check to be unhealthy. + // - LastKnownStatus : Route 53 uses the status of the health check from the last + // time that CloudWatch had sufficient data to determine the alarm state. For new + // health checks that have no last known status, the default status for the health + // check is healthy. + InsufficientDataHealthStatus InsufficientDataHealthStatus + + // Specify whether you want Amazon Route 53 to invert the status of a health + // check, for example, to consider a health check unhealthy when it otherwise would + // be considered healthy. + Inverted *bool + + // Specify whether you want Amazon Route 53 to measure the latency between health + // checkers in multiple Amazon Web Services regions and your endpoint, and to + // display CloudWatch latency graphs on the Health Checks page in the Route 53 + // console. You can't change the value of MeasureLatency after you create a health + // check. + MeasureLatency *bool + + // The port on the endpoint that you want Amazon Route 53 to perform health checks + // on. Don't specify a value for Port when you specify a value for Type of + // CLOUDWATCH_METRIC or CALCULATED . + Port *int32 + + // A complex type that contains one Region element for each region from which you + // want Amazon Route 53 health checkers to check the specified endpoint. If you + // don't specify any regions, Route 53 health checkers automatically performs + // checks from all of the regions that are listed under Valid Values. If you update + // a health check to remove a region that has been performing health checks, Route + // 53 will briefly continue to perform checks from that region to ensure that some + // health checkers are always checking the endpoint (for example, if you replace + // three regions with four different regions). + Regions []HealthCheckRegion + + // The number of seconds between the time that Amazon Route 53 gets a response + // from your endpoint and the time that it sends the next health check request. + // Each Route 53 health checker makes requests at this interval. You can't change + // the value of RequestInterval after you create a health check. If you don't + // specify a value for RequestInterval , the default value is 30 seconds. + RequestInterval *int32 + + // The path, if any, that you want Amazon Route 53 to request when performing + // health checks. The path can be any value for which your endpoint will return an + // HTTP status code of 2xx or 3xx when the endpoint is healthy, for example, the + // file /docs/route53-health-check.html. You can also include query string + // parameters, for example, /welcome.html?language=jp&login=y . + ResourcePath *string + + // The Amazon Resource Name (ARN) for the Route 53 Application Recovery Controller + // routing control. For more information about Route 53 Application Recovery + // Controller, see Route 53 Application Recovery Controller Developer Guide. (https://docs.aws.amazon.com/r53recovery/latest/dg/what-is-route-53-recovery.html) + // . + RoutingControlArn *string + + // If the value of Type is HTTP_STR_MATCH or HTTPS_STR_MATCH , the string that you + // want Amazon Route 53 to search for in the response body from the specified + // resource. If the string appears in the response body, Route 53 considers the + // resource healthy. Route 53 considers case when searching for SearchString in + // the response body. + SearchString *string + + noSmithyDocumentSerde +} + +// A complex type that contains the last failure reason as reported by one Amazon +// Route 53 health checker. +type HealthCheckObservation struct { + + // The IP address of the Amazon Route 53 health checker that provided the failure + // reason in StatusReport . + IPAddress *string + + // The region of the Amazon Route 53 health checker that provided the status in + // StatusReport . + Region HealthCheckRegion + + // A complex type that contains the last failure reason as reported by one Amazon + // Route 53 health checker and the time of the failed health check. + StatusReport *StatusReport + + noSmithyDocumentSerde +} + +// A complex type that contains general information about the hosted zone. +type HostedZone struct { + + // The value that you specified for CallerReference when you created the hosted + // zone. + // + // This member is required. + CallerReference *string + + // The ID that Amazon Route 53 assigned to the hosted zone when you created it. + // + // This member is required. + Id *string + + // The name of the domain. For public hosted zones, this is the name that you have + // registered with your DNS registrar. For information about how to specify + // characters other than a-z , 0-9 , and - (hyphen) and how to specify + // internationalized domain names, see CreateHostedZone (https://docs.aws.amazon.com/Route53/latest/APIReference/API_CreateHostedZone.html) + // . + // + // This member is required. + Name *string + + // A complex type that includes the Comment and PrivateZone elements. If you + // omitted the HostedZoneConfig and Comment elements from the request, the Config + // and Comment elements don't appear in the response. + Config *HostedZoneConfig + + // If the hosted zone was created by another service, the service that created the + // hosted zone. When a hosted zone is created by another service, you can't edit or + // delete it using Route 53. + LinkedService *LinkedService + + // The number of resource record sets in the hosted zone. + ResourceRecordSetCount *int64 + + noSmithyDocumentSerde +} + +// A complex type that contains an optional comment about your hosted zone. If you +// don't want to specify a comment, omit both the HostedZoneConfig and Comment +// elements. +type HostedZoneConfig struct { + + // Any comments that you want to include about the hosted zone. + Comment *string + + // A value that indicates whether this is a private hosted zone. + PrivateZone bool + + noSmithyDocumentSerde +} + +// A complex type that contains the type of limit that you specified in the +// request and the current value for that limit. +type HostedZoneLimit struct { + + // The limit that you requested. Valid values include the following: + // - MAX_RRSETS_BY_ZONE: The maximum number of records that you can create in + // the specified hosted zone. + // - MAX_VPCS_ASSOCIATED_BY_ZONE: The maximum number of Amazon VPCs that you can + // associate with the specified private hosted zone. + // + // This member is required. + Type HostedZoneLimitType + + // The current value for the limit that is specified by Type . + // + // This member is required. + Value int64 + + noSmithyDocumentSerde +} + +// A complex type that identifies a hosted zone that a specified Amazon VPC is +// associated with and the owner of the hosted zone. If there is a value for +// OwningAccount , there is no value for OwningService , and vice versa. +type HostedZoneOwner struct { + + // If the hosted zone was created by an Amazon Web Services account, or was + // created by an Amazon Web Services service that creates hosted zones using the + // current account, OwningAccount contains the account ID of that account. For + // example, when you use Cloud Map to create a hosted zone, Cloud Map creates the + // hosted zone using the current Amazon Web Services account. + OwningAccount *string + + // If an Amazon Web Services service uses its own account to create a hosted zone + // and associate the specified VPC with that hosted zone, OwningService contains + // an abbreviation that identifies the service. For example, if Amazon Elastic File + // System (Amazon EFS) created a hosted zone and associated a VPC with the hosted + // zone, the value of OwningService is efs.amazonaws.com . + OwningService *string + + noSmithyDocumentSerde +} + +// In the response to a ListHostedZonesByVPC request, the HostedZoneSummaries +// element contains one HostedZoneSummary element for each hosted zone that the +// specified Amazon VPC is associated with. Each HostedZoneSummary element +// contains the hosted zone name and ID, and information about who owns the hosted +// zone. +type HostedZoneSummary struct { + + // The Route 53 hosted zone ID of a private hosted zone that the specified VPC is + // associated with. + // + // This member is required. + HostedZoneId *string + + // The name of the private hosted zone, such as example.com . + // + // This member is required. + Name *string + + // The owner of a private hosted zone that the specified VPC is associated with. + // The owner can be either an Amazon Web Services account or an Amazon Web Services + // service. + // + // This member is required. + Owner *HostedZoneOwner + + noSmithyDocumentSerde +} + +// A key-signing key (KSK) is a complex type that represents a public/private key +// pair. The private key is used to generate a digital signature for the zone +// signing key (ZSK). The public key is stored in the DNS and is used to +// authenticate the ZSK. A KSK is always associated with a hosted zone; it cannot +// exist by itself. +type KeySigningKey struct { + + // The date when the key-signing key (KSK) was created. + CreatedDate *time.Time + + // A string that represents a DNSKEY record. + DNSKEYRecord *string + + // A string that represents a delegation signer (DS) record. + DSRecord *string + + // A string used to represent the delegation signer digest algorithm. This value + // must follow the guidelines provided by RFC-8624 Section 3.3 (https://tools.ietf.org/html/rfc8624#section-3.3) + // . + DigestAlgorithmMnemonic *string + + // An integer used to represent the delegation signer digest algorithm. This value + // must follow the guidelines provided by RFC-8624 Section 3.3 (https://tools.ietf.org/html/rfc8624#section-3.3) + // . + DigestAlgorithmType int32 + + // A cryptographic digest of a DNSKEY resource record (RR). DNSKEY records are + // used to publish the public key that resolvers can use to verify DNSSEC + // signatures that are used to secure certain kinds of information provided by the + // DNS system. + DigestValue *string + + // An integer that specifies how the key is used. For key-signing key (KSK), this + // value is always 257. + Flag int32 + + // An integer used to identify the DNSSEC record for the domain name. The process + // used to calculate the value is described in RFC-4034 Appendix B (https://tools.ietf.org/rfc/rfc4034.txt) + // . + KeyTag int32 + + // The Amazon resource name (ARN) used to identify the customer managed key in Key + // Management Service (KMS). The KmsArn must be unique for each key-signing key + // (KSK) in a single hosted zone. You must configure the customer managed key as + // follows: Status Enabled Key spec ECC_NIST_P256 Key usage Sign and verify Key + // policy The key policy must give permission for the following actions: + // - DescribeKey + // - GetPublicKey + // - Sign + // The key policy must also include the Amazon Route 53 service in the principal + // for your account. Specify the following: + // - "Service": "dnssec-route53.amazonaws.com" + // For more information about working with the customer managed key in KMS, see + // Key Management Service concepts (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html) + // . + KmsArn *string + + // The last time that the key-signing key (KSK) was changed. + LastModifiedDate *time.Time + + // A string used to identify a key-signing key (KSK). Name can include numbers, + // letters, and underscores (_). Name must be unique for each key-signing key in + // the same hosted zone. + Name *string + + // The public key, represented as a Base64 encoding, as required by RFC-4034 Page + // 5 (https://tools.ietf.org/rfc/rfc4034.txt) . + PublicKey *string + + // A string used to represent the signing algorithm. This value must follow the + // guidelines provided by RFC-8624 Section 3.1 (https://tools.ietf.org/html/rfc8624#section-3.1) + // . + SigningAlgorithmMnemonic *string + + // An integer used to represent the signing algorithm. This value must follow the + // guidelines provided by RFC-8624 Section 3.1 (https://tools.ietf.org/html/rfc8624#section-3.1) + // . + SigningAlgorithmType int32 + + // A string that represents the current key-signing key (KSK) status. Status can + // have one of the following values: ACTIVE The KSK is being used for signing. + // INACTIVE The KSK is not being used for signing. DELETING The KSK is in the + // process of being deleted. ACTION_NEEDED There is a problem with the KSK that + // requires you to take action to resolve. For example, the customer managed key + // might have been deleted, or the permissions for the customer managed key might + // have been changed. INTERNAL_FAILURE There was an error during a request. Before + // you can continue to work with DNSSEC signing, including actions that involve + // this KSK, you must correct the problem. For example, you may need to activate or + // deactivate the KSK. + Status *string + + // The status message provided for the following key-signing key (KSK) statuses: + // ACTION_NEEDED or INTERNAL_FAILURE . The status message includes information + // about what the problem might be and steps that you can take to correct the + // issue. + StatusMessage *string + + noSmithyDocumentSerde +} + +// If a health check or hosted zone was created by another service, LinkedService +// is a complex type that describes the service that created the resource. When a +// resource is created by another service, you can't edit or delete it using Amazon +// Route 53. +type LinkedService struct { + + // If the health check or hosted zone was created by another service, an optional + // description that can be provided by the other service. When a resource is + // created by another service, you can't edit or delete it using Amazon Route 53. + Description *string + + // If the health check or hosted zone was created by another service, the service + // that created the resource. When a resource is created by another service, you + // can't edit or delete it using Amazon Route 53. + ServicePrincipal *string + + noSmithyDocumentSerde +} + +// A complex type that contains information about the CIDR location. +type LocationSummary struct { + + // A string that specifies a location name. + LocationName *string + + noSmithyDocumentSerde +} + +// A complex type that contains information about a configuration for DNS query +// logging. +type QueryLoggingConfig struct { + + // The Amazon Resource Name (ARN) of the CloudWatch Logs log group that Amazon + // Route 53 is publishing logs to. + // + // This member is required. + CloudWatchLogsLogGroupArn *string + + // The ID of the hosted zone that CloudWatch Logs is logging queries for. + // + // This member is required. + HostedZoneId *string + + // The ID for a configuration for DNS query logging. + // + // This member is required. + Id *string + + noSmithyDocumentSerde +} + +// Information specific to the resource record. If you're creating an alias +// resource record set, omit ResourceRecord . +type ResourceRecord struct { + + // The current or new DNS record value, not to exceed 4,000 characters. In the + // case of a DELETE action, if the current value does not match the actual value, + // an error is returned. For descriptions about how to format Value for different + // record types, see Supported DNS Resource Record Types (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/ResourceRecordTypes.html) + // in the Amazon Route 53 Developer Guide. You can specify more than one value for + // all record types except CNAME and SOA . If you're creating an alias resource + // record set, omit Value . + // + // This member is required. + Value *string + + noSmithyDocumentSerde +} + +// Information about the resource record set to create or delete. +type ResourceRecordSet struct { + + // For ChangeResourceRecordSets requests, the name of the record that you want to + // create, update, or delete. For ListResourceRecordSets responses, the name of a + // record in the specified hosted zone. ChangeResourceRecordSets Only Enter a fully + // qualified domain name, for example, www.example.com . You can optionally include + // a trailing dot. If you omit the trailing dot, Amazon Route 53 assumes that the + // domain name that you specify is fully qualified. This means that Route 53 treats + // www.example.com (without a trailing dot) and www.example.com. (with a trailing + // dot) as identical. For information about how to specify characters other than + // a-z , 0-9 , and - (hyphen) and how to specify internationalized domain names, + // see DNS Domain Name Format (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/DomainNameFormat.html) + // in the Amazon Route 53 Developer Guide. You can use the asterisk (*) wildcard to + // replace the leftmost label in a domain name, for example, *.example.com . Note + // the following: + // - The * must replace the entire label. For example, you can't specify + // *prod.example.com or prod*.example.com . + // - The * can't replace any of the middle labels, for example, + // marketing.*.example.com. + // - If you include * in any position other than the leftmost label in a domain + // name, DNS treats it as an * character (ASCII 42), not as a wildcard. You can't + // use the * wildcard for resource records sets that have a type of NS. + // You can use the * wildcard as the leftmost label in a domain name, for example, + // *.example.com . You can't use an * for one of the middle labels, for example, + // marketing.*.example.com . In addition, the * must replace the entire label; for + // example, you can't specify prod*.example.com . + // + // This member is required. + Name *string + + // The DNS record type. For information about different record types and how data + // is encoded for them, see Supported DNS Resource Record Types (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/ResourceRecordTypes.html) + // in the Amazon Route 53 Developer Guide. Valid values for basic resource record + // sets: A | AAAA | CAA | CNAME | DS | MX | NAPTR | NS | PTR | SOA | SPF | SRV | + // TXT Values for weighted, latency, geolocation, and failover resource record + // sets: A | AAAA | CAA | CNAME | MX | NAPTR | PTR | SPF | SRV | TXT . When + // creating a group of weighted, latency, geolocation, or failover resource record + // sets, specify the same value for all of the resource record sets in the group. + // Valid values for multivalue answer resource record sets: A | AAAA | MX | NAPTR + // | PTR | SPF | SRV | TXT SPF records were formerly used to verify the identity + // of the sender of email messages. However, we no longer recommend that you create + // resource record sets for which the value of Type is SPF . RFC 7208, Sender + // Policy Framework (SPF) for Authorizing Use of Domains in Email, Version 1, has + // been updated to say, "...[I]ts existence and mechanism defined in [RFC4408] have + // led to some interoperability issues. Accordingly, its use is no longer + // appropriate for SPF version 1; implementations are not to use it." In RFC 7208, + // see section 14.1, The SPF DNS Record Type (http://tools.ietf.org/html/rfc7208#section-14.1) + // . Values for alias resource record sets: + // - Amazon API Gateway custom regional APIs and edge-optimized APIs: A + // - CloudFront distributions: A If IPv6 is enabled for the distribution, create + // two resource record sets to route traffic to your distribution, one with a value + // of A and one with a value of AAAA . + // - Amazon API Gateway environment that has a regionalized subdomain: A + // - ELB load balancers: A | AAAA + // - Amazon S3 buckets: A + // - Amazon Virtual Private Cloud interface VPC endpoints A + // - Another resource record set in this hosted zone: Specify the type of the + // resource record set that you're creating the alias for. All values are supported + // except NS and SOA . If you're creating an alias record that has the same name + // as the hosted zone (known as the zone apex), you can't route traffic to a record + // for which the value of Type is CNAME . This is because the alias record must + // have the same type as the record you're routing traffic to, and creating a CNAME + // record for the zone apex isn't supported even for an alias record. + // + // This member is required. + Type RRType + + // Alias resource record sets only: Information about the Amazon Web Services + // resource, such as a CloudFront distribution or an Amazon S3 bucket, that you + // want to route traffic to. If you're creating resource records sets for a private + // hosted zone, note the following: + // - You can't create an alias resource record set in a private hosted zone to + // route traffic to a CloudFront distribution. + // - For information about creating failover resource record sets in a private + // hosted zone, see Configuring Failover in a Private Hosted Zone (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-private-hosted-zones.html) + // in the Amazon Route 53 Developer Guide. + AliasTarget *AliasTarget + + // The object that is specified in resource record set object when you are linking + // a resource record set to a CIDR location. A LocationName with an asterisk “*” + // can be used to create a default CIDR record. CollectionId is still required for + // default record. + CidrRoutingConfig *CidrRoutingConfig + + // Failover resource record sets only: To configure failover, you add the Failover + // element to two resource record sets. For one resource record set, you specify + // PRIMARY as the value for Failover ; for the other resource record set, you + // specify SECONDARY . In addition, you include the HealthCheckId element and + // specify the health check that you want Amazon Route 53 to perform for each + // resource record set. Except where noted, the following failover behaviors assume + // that you have included the HealthCheckId element in both resource record sets: + // - When the primary resource record set is healthy, Route 53 responds to DNS + // queries with the applicable value from the primary resource record set + // regardless of the health of the secondary resource record set. + // - When the primary resource record set is unhealthy and the secondary + // resource record set is healthy, Route 53 responds to DNS queries with the + // applicable value from the secondary resource record set. + // - When the secondary resource record set is unhealthy, Route 53 responds to + // DNS queries with the applicable value from the primary resource record set + // regardless of the health of the primary resource record set. + // - If you omit the HealthCheckId element for the secondary resource record set, + // and if the primary resource record set is unhealthy, Route 53 always responds to + // DNS queries with the applicable value from the secondary resource record set. + // This is true regardless of the health of the associated endpoint. + // You can't create non-failover resource record sets that have the same values + // for the Name and Type elements as failover resource record sets. For failover + // alias resource record sets, you must also include the EvaluateTargetHealth + // element and set the value to true. For more information about configuring + // failover for Route 53, see the following topics in the Amazon Route 53 Developer + // Guide: + // - Route 53 Health Checks and DNS Failover (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover.html) + // - Configuring Failover in a Private Hosted Zone (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-private-hosted-zones.html) + Failover ResourceRecordSetFailover + + // Geolocation resource record sets only: A complex type that lets you control how + // Amazon Route 53 responds to DNS queries based on the geographic origin of the + // query. For example, if you want all queries from Africa to be routed to a web + // server with an IP address of 192.0.2.111 , create a resource record set with a + // Type of A and a ContinentCode of AF . Although creating geolocation and + // geolocation alias resource record sets in a private hosted zone is allowed, it's + // not supported. If you create separate resource record sets for overlapping + // geographic regions (for example, one resource record set for a continent and one + // for a country on the same continent), priority goes to the smallest geographic + // region. This allows you to route most queries for a continent to one resource + // and to route queries for a country on that continent to a different resource. + // You can't create two geolocation resource record sets that specify the same + // geographic location. The value * in the CountryCode element matches all + // geographic locations that aren't specified in other geolocation resource record + // sets that have the same values for the Name and Type elements. Geolocation + // works by mapping IP addresses to locations. However, some IP addresses aren't + // mapped to geographic locations, so even if you create geolocation resource + // record sets that cover all seven continents, Route 53 will receive some DNS + // queries from locations that it can't identify. We recommend that you create a + // resource record set for which the value of CountryCode is * . Two groups of + // queries are routed to the resource that you specify in this record: queries that + // come from locations for which you haven't created geolocation resource record + // sets and queries from IP addresses that aren't mapped to a location. If you + // don't create a * resource record set, Route 53 returns a "no answer" response + // for queries from those locations. You can't create non-geolocation resource + // record sets that have the same values for the Name and Type elements as + // geolocation resource record sets. + GeoLocation *GeoLocation + + // If you want Amazon Route 53 to return this resource record set in response to a + // DNS query only when the status of a health check is healthy, include the + // HealthCheckId element and specify the ID of the applicable health check. Route + // 53 determines whether a resource record set is healthy based on one of the + // following: + // - By periodically sending a request to the endpoint that is specified in the + // health check + // - By aggregating the status of a specified group of health checks (calculated + // health checks) + // - By determining the current state of a CloudWatch alarm (CloudWatch metric + // health checks) + // Route 53 doesn't check the health of the endpoint that is specified in the + // resource record set, for example, the endpoint specified by the IP address in + // the Value element. When you add a HealthCheckId element to a resource record + // set, Route 53 checks the health of the endpoint that you specified in the health + // check. For more information, see the following topics in the Amazon Route 53 + // Developer Guide: + // - How Amazon Route 53 Determines Whether an Endpoint Is Healthy (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-determining-health-of-endpoints.html) + // - Route 53 Health Checks and DNS Failover (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover.html) + // - Configuring Failover in a Private Hosted Zone (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-private-hosted-zones.html) + // When to Specify HealthCheckId Specifying a value for HealthCheckId is useful + // only when Route 53 is choosing between two or more resource record sets to + // respond to a DNS query, and you want Route 53 to base the choice in part on the + // status of a health check. Configuring health checks makes sense only in the + // following configurations: + // - Non-alias resource record sets: You're checking the health of a group of + // non-alias resource record sets that have the same routing policy, name, and type + // (such as multiple weighted records named www.example.com with a type of A) and + // you specify health check IDs for all the resource record sets. If the health + // check status for a resource record set is healthy, Route 53 includes the record + // among the records that it responds to DNS queries with. If the health check + // status for a resource record set is unhealthy, Route 53 stops responding to DNS + // queries using the value for that resource record set. If the health check status + // for all resource record sets in the group is unhealthy, Route 53 considers all + // resource record sets in the group healthy and responds to DNS queries + // accordingly. + // - Alias resource record sets: You specify the following settings: + // - You set EvaluateTargetHealth to true for an alias resource record set in a + // group of resource record sets that have the same routing policy, name, and type + // (such as multiple weighted records named www.example.com with a type of A). + // - You configure the alias resource record set to route traffic to a non-alias + // resource record set in the same hosted zone. + // - You specify a health check ID for the non-alias resource record set. If the + // health check status is healthy, Route 53 considers the alias resource record set + // to be healthy and includes the alias record among the records that it responds + // to DNS queries with. If the health check status is unhealthy, Route 53 stops + // responding to DNS queries using the alias resource record set. The alias + // resource record set can also route traffic to a group of non-alias resource + // record sets that have the same routing policy, name, and type. In that + // configuration, associate health checks with all of the resource record sets in + // the group of non-alias resource record sets. + // Geolocation Routing For geolocation resource record sets, if an endpoint is + // unhealthy, Route 53 looks for a resource record set for the larger, associated + // geographic region. For example, suppose you have resource record sets for a + // state in the United States, for the entire United States, for North America, and + // a resource record set that has * for CountryCode is * , which applies to all + // locations. If the endpoint for the state resource record set is unhealthy, Route + // 53 checks for healthy resource record sets in the following order until it finds + // a resource record set for which the endpoint is healthy: + // - The United States + // - North America + // - The default resource record set + // Specifying the Health Check Endpoint by Domain Name If your health checks + // specify the endpoint only by domain name, we recommend that you create a + // separate health check for each endpoint. For example, create a health check for + // each HTTP server that is serving content for www.example.com . For the value of + // FullyQualifiedDomainName , specify the domain name of the server (such as + // us-east-2-www.example.com ), not the name of the resource record sets ( + // www.example.com ). Health check results will be unpredictable if you do the + // following: + // - Create a health check that has the same value for FullyQualifiedDomainName + // as the name of a resource record set. + // - Associate that health check with the resource record set. + HealthCheckId *string + + // Multivalue answer resource record sets only: To route traffic approximately + // randomly to multiple resources, such as web servers, create one multivalue + // answer record for each resource and specify true for MultiValueAnswer . Note the + // following: + // - If you associate a health check with a multivalue answer resource record + // set, Amazon Route 53 responds to DNS queries with the corresponding IP address + // only when the health check is healthy. + // - If you don't associate a health check with a multivalue answer record, + // Route 53 always considers the record to be healthy. + // - Route 53 responds to DNS queries with up to eight healthy records; if you + // have eight or fewer healthy records, Route 53 responds to all DNS queries with + // all the healthy records. + // - If you have more than eight healthy records, Route 53 responds to different + // DNS resolvers with different combinations of healthy records. + // - When all records are unhealthy, Route 53 responds to DNS queries with up to + // eight unhealthy records. + // - If a resource becomes unavailable after a resolver caches a response, + // client software typically tries another of the IP addresses in the response. + // You can't create multivalue answer alias records. + MultiValueAnswer *bool + + // Latency-based resource record sets only: The Amazon EC2 Region where you + // created the resource that this resource record set refers to. The resource + // typically is an Amazon Web Services resource, such as an EC2 instance or an ELB + // load balancer, and is referred to by an IP address or a DNS domain name, + // depending on the record type. When Amazon Route 53 receives a DNS query for a + // domain name and type for which you have created latency resource record sets, + // Route 53 selects the latency resource record set that has the lowest latency + // between the end user and the associated Amazon EC2 Region. Route 53 then returns + // the value that is associated with the selected resource record set. Note the + // following: + // - You can only specify one ResourceRecord per latency resource record set. + // - You can only create one latency resource record set for each Amazon EC2 + // Region. + // - You aren't required to create latency resource record sets for all Amazon + // EC2 Regions. Route 53 will choose the region with the best latency from among + // the regions that you create latency resource record sets for. + // - You can't create non-latency resource record sets that have the same values + // for the Name and Type elements as latency resource record sets. + Region ResourceRecordSetRegion + + // Information about the resource records to act upon. If you're creating an alias + // resource record set, omit ResourceRecords . + ResourceRecords []ResourceRecord + + // Resource record sets that have a routing policy other than simple: An + // identifier that differentiates among multiple resource record sets that have the + // same combination of name and type, such as multiple weighted resource record + // sets named acme.example.com that have a type of A. In a group of resource record + // sets that have the same name and type, the value of SetIdentifier must be + // unique for each resource record set. For information about routing policies, see + // Choosing a Routing Policy (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/routing-policy.html) + // in the Amazon Route 53 Developer Guide. + SetIdentifier *string + + // The resource record cache time to live (TTL), in seconds. Note the following: + // - If you're creating or updating an alias resource record set, omit TTL . + // Amazon Route 53 uses the value of TTL for the alias target. + // - If you're associating this resource record set with a health check (if + // you're adding a HealthCheckId element), we recommend that you specify a TTL of + // 60 seconds or less so clients respond quickly to changes in health status. + // - All of the resource record sets in a group of weighted resource record sets + // must have the same value for TTL . + // - If a group of weighted resource record sets includes one or more weighted + // alias resource record sets for which the alias target is an ELB load balancer, + // we recommend that you specify a TTL of 60 seconds for all of the non-alias + // weighted resource record sets that have the same name and type. Values other + // than 60 seconds (the TTL for load balancers) will change the effect of the + // values that you specify for Weight . + TTL *int64 + + // When you create a traffic policy instance, Amazon Route 53 automatically + // creates a resource record set. TrafficPolicyInstanceId is the ID of the traffic + // policy instance that Route 53 created this resource record set for. To delete + // the resource record set that is associated with a traffic policy instance, use + // DeleteTrafficPolicyInstance . Route 53 will delete the resource record set + // automatically. If you delete the resource record set by using + // ChangeResourceRecordSets , Route 53 doesn't automatically delete the traffic + // policy instance, and you'll continue to be charged for it even though it's no + // longer in use. + TrafficPolicyInstanceId *string + + // Weighted resource record sets only: Among resource record sets that have the + // same combination of DNS name and type, a value that determines the proportion of + // DNS queries that Amazon Route 53 responds to using the current resource record + // set. Route 53 calculates the sum of the weights for the resource record sets + // that have the same combination of DNS name and type. Route 53 then responds to + // queries based on the ratio of a resource's weight to the total. Note the + // following: + // - You must specify a value for the Weight element for every weighted resource + // record set. + // - You can only specify one ResourceRecord per weighted resource record set. + // - You can't create latency, failover, or geolocation resource record sets + // that have the same values for the Name and Type elements as weighted resource + // record sets. + // - You can create a maximum of 100 weighted resource record sets that have the + // same values for the Name and Type elements. + // - For weighted (but not weighted alias) resource record sets, if you set + // Weight to 0 for a resource record set, Route 53 never responds to queries with + // the applicable value for that resource record set. However, if you set Weight + // to 0 for all resource record sets that have the same combination of DNS name + // and type, traffic is routed to all resources with equal probability. The effect + // of setting Weight to 0 is different when you associate health checks with + // weighted resource record sets. For more information, see Options for + // Configuring Route 53 Active-Active and Active-Passive Failover (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-configuring-options.html) + // in the Amazon Route 53 Developer Guide. + Weight *int64 + + noSmithyDocumentSerde +} + +// A complex type containing a resource and its associated tags. +type ResourceTagSet struct { + + // The ID for the specified resource. + ResourceId *string + + // The type of the resource. + // - The resource type for health checks is healthcheck . + // - The resource type for hosted zones is hostedzone . + ResourceType TagResourceType + + // The tags associated with the specified resource. + Tags []Tag + + noSmithyDocumentSerde +} + +// A complex type that contains the type of limit that you specified in the +// request and the current value for that limit. +type ReusableDelegationSetLimit struct { + + // The limit that you requested: MAX_ZONES_BY_REUSABLE_DELEGATION_SET , the maximum + // number of hosted zones that you can associate with the specified reusable + // delegation set. + // + // This member is required. + Type ReusableDelegationSetLimitType + + // The current value for the MAX_ZONES_BY_REUSABLE_DELEGATION_SET limit. + // + // This member is required. + Value int64 + + noSmithyDocumentSerde +} + +// A complex type that contains the status that one Amazon Route 53 health checker +// reports and the time of the health check. +type StatusReport struct { + + // The date and time that the health checker performed the health check in ISO + // 8601 format (https://en.wikipedia.org/wiki/ISO_8601) and Coordinated Universal + // Time (UTC). For example, the value 2017-03-27T17:48:16.751Z represents March + // 27, 2017 at 17:48:16.751 UTC. + CheckedTime *time.Time + + // A description of the status of the health check endpoint as reported by one of + // the Amazon Route 53 health checkers. + Status *string + + noSmithyDocumentSerde +} + +// A complex type that contains information about a tag that you want to add or +// edit for the specified health check or hosted zone. +type Tag struct { + + // The value of Key depends on the operation that you want to perform: + // - Add a tag to a health check or hosted zone: Key is the name that you want to + // give the new tag. + // - Edit a tag: Key is the name of the tag that you want to change the Value + // for. + // - Delete a key: Key is the name of the tag you want to remove. + // - Give a name to a health check: Edit the default Name tag. In the Amazon + // Route 53 console, the list of your health checks includes a Name column that + // lets you see the name that you've given to each health check. + Key *string + + // The value of Value depends on the operation that you want to perform: + // - Add a tag to a health check or hosted zone: Value is the value that you want + // to give the new tag. + // - Edit a tag: Value is the new value that you want to assign the tag. + Value *string + + noSmithyDocumentSerde +} + +// A complex type that contains settings for a traffic policy. +type TrafficPolicy struct { + + // The definition of a traffic policy in JSON format. You specify the JSON + // document to use for a new traffic policy in the CreateTrafficPolicy request. + // For more information about the JSON format, see Traffic Policy Document Format (https://docs.aws.amazon.com/Route53/latest/APIReference/api-policies-traffic-policy-document-format.html) + // . + // + // This member is required. + Document *string + + // The ID that Amazon Route 53 assigned to a traffic policy when you created it. + // + // This member is required. + Id *string + + // The name that you specified when you created the traffic policy. + // + // This member is required. + Name *string + + // The DNS type of the resource record sets that Amazon Route 53 creates when you + // use a traffic policy to create a traffic policy instance. + // + // This member is required. + Type RRType + + // The version number that Amazon Route 53 assigns to a traffic policy. For a new + // traffic policy, the value of Version is always 1. + // + // This member is required. + Version *int32 + + // The comment that you specify in the CreateTrafficPolicy request, if any. + Comment *string + + noSmithyDocumentSerde +} + +// A complex type that contains settings for the new traffic policy instance. +type TrafficPolicyInstance struct { + + // The ID of the hosted zone that Amazon Route 53 created resource record sets in. + // + // This member is required. + HostedZoneId *string + + // The ID that Amazon Route 53 assigned to the new traffic policy instance. + // + // This member is required. + Id *string + + // If State is Failed , an explanation of the reason for the failure. If State is + // another value, Message is empty. + // + // This member is required. + Message *string + + // The DNS name, such as www.example.com, for which Amazon Route 53 responds to + // queries by using the resource record sets that are associated with this traffic + // policy instance. + // + // This member is required. + Name *string + + // The value of State is one of the following values: Applied Amazon Route 53 has + // finished creating resource record sets, and changes have propagated to all Route + // 53 edge locations. Creating Route 53 is creating the resource record sets. Use + // GetTrafficPolicyInstance to confirm that the CreateTrafficPolicyInstance + // request completed successfully. Failed Route 53 wasn't able to create or update + // the resource record sets. When the value of State is Failed , see Message for + // an explanation of what caused the request to fail. + // + // This member is required. + State *string + + // The TTL that Amazon Route 53 assigned to all of the resource record sets that + // it created in the specified hosted zone. + // + // This member is required. + TTL *int64 + + // The ID of the traffic policy that Amazon Route 53 used to create resource + // record sets in the specified hosted zone. + // + // This member is required. + TrafficPolicyId *string + + // The DNS type that Amazon Route 53 assigned to all of the resource record sets + // that it created for this traffic policy instance. + // + // This member is required. + TrafficPolicyType RRType + + // The version of the traffic policy that Amazon Route 53 used to create resource + // record sets in the specified hosted zone. + // + // This member is required. + TrafficPolicyVersion *int32 + + noSmithyDocumentSerde +} + +// A complex type that contains information about the latest version of one +// traffic policy that is associated with the current Amazon Web Services account. +type TrafficPolicySummary struct { + + // The ID that Amazon Route 53 assigned to the traffic policy when you created it. + // + // This member is required. + Id *string + + // The version number of the latest version of the traffic policy. + // + // This member is required. + LatestVersion *int32 + + // The name that you specified for the traffic policy when you created it. + // + // This member is required. + Name *string + + // The number of traffic policies that are associated with the current Amazon Web + // Services account. + // + // This member is required. + TrafficPolicyCount *int32 + + // The DNS type of the resource record sets that Amazon Route 53 creates when you + // use a traffic policy to create a traffic policy instance. + // + // This member is required. + Type RRType + + noSmithyDocumentSerde +} + +// (Private hosted zones only) A complex type that contains information about an +// Amazon VPC. If you associate a private hosted zone with an Amazon VPC when you +// make a CreateHostedZone (https://docs.aws.amazon.com/Route53/latest/APIReference/API_CreateHostedZone.html) +// request, the following parameters are also required. +type VPC struct { + + // (Private hosted zones only) The ID of an Amazon VPC. + VPCId *string + + // (Private hosted zones only) The region that an Amazon VPC was created in. + VPCRegion VPCRegion + + noSmithyDocumentSerde +} + +type noSmithyDocumentSerde = smithydocument.NoSerde diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/validators.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/validators.go new file mode 100644 index 0000000..3f1403f --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/validators.go @@ -0,0 +1,2564 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package route53 + +import ( + "context" + "fmt" + "github.com/aws/aws-sdk-go-v2/service/route53/types" + smithy "github.com/aws/smithy-go" + "github.com/aws/smithy-go/middleware" +) + +type validateOpActivateKeySigningKey struct { +} + +func (*validateOpActivateKeySigningKey) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpActivateKeySigningKey) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ActivateKeySigningKeyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpActivateKeySigningKeyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpAssociateVPCWithHostedZone struct { +} + +func (*validateOpAssociateVPCWithHostedZone) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpAssociateVPCWithHostedZone) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*AssociateVPCWithHostedZoneInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpAssociateVPCWithHostedZoneInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpChangeCidrCollection struct { +} + +func (*validateOpChangeCidrCollection) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpChangeCidrCollection) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ChangeCidrCollectionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpChangeCidrCollectionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpChangeResourceRecordSets struct { +} + +func (*validateOpChangeResourceRecordSets) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpChangeResourceRecordSets) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ChangeResourceRecordSetsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpChangeResourceRecordSetsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpChangeTagsForResource struct { +} + +func (*validateOpChangeTagsForResource) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpChangeTagsForResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ChangeTagsForResourceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpChangeTagsForResourceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateCidrCollection struct { +} + +func (*validateOpCreateCidrCollection) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateCidrCollection) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateCidrCollectionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateCidrCollectionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateHealthCheck struct { +} + +func (*validateOpCreateHealthCheck) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateHealthCheck) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateHealthCheckInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateHealthCheckInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateHostedZone struct { +} + +func (*validateOpCreateHostedZone) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateHostedZone) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateHostedZoneInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateHostedZoneInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateKeySigningKey struct { +} + +func (*validateOpCreateKeySigningKey) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateKeySigningKey) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateKeySigningKeyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateKeySigningKeyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateQueryLoggingConfig struct { +} + +func (*validateOpCreateQueryLoggingConfig) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateQueryLoggingConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateQueryLoggingConfigInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateQueryLoggingConfigInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateReusableDelegationSet struct { +} + +func (*validateOpCreateReusableDelegationSet) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateReusableDelegationSet) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateReusableDelegationSetInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateReusableDelegationSetInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateTrafficPolicy struct { +} + +func (*validateOpCreateTrafficPolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateTrafficPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateTrafficPolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateTrafficPolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateTrafficPolicyInstance struct { +} + +func (*validateOpCreateTrafficPolicyInstance) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateTrafficPolicyInstance) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateTrafficPolicyInstanceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateTrafficPolicyInstanceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateTrafficPolicyVersion struct { +} + +func (*validateOpCreateTrafficPolicyVersion) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateTrafficPolicyVersion) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateTrafficPolicyVersionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateTrafficPolicyVersionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateVPCAssociationAuthorization struct { +} + +func (*validateOpCreateVPCAssociationAuthorization) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateVPCAssociationAuthorization) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateVPCAssociationAuthorizationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateVPCAssociationAuthorizationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeactivateKeySigningKey struct { +} + +func (*validateOpDeactivateKeySigningKey) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeactivateKeySigningKey) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeactivateKeySigningKeyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeactivateKeySigningKeyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteCidrCollection struct { +} + +func (*validateOpDeleteCidrCollection) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteCidrCollection) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteCidrCollectionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteCidrCollectionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteHealthCheck struct { +} + +func (*validateOpDeleteHealthCheck) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteHealthCheck) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteHealthCheckInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteHealthCheckInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteHostedZone struct { +} + +func (*validateOpDeleteHostedZone) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteHostedZone) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteHostedZoneInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteHostedZoneInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteKeySigningKey struct { +} + +func (*validateOpDeleteKeySigningKey) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteKeySigningKey) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteKeySigningKeyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteKeySigningKeyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteQueryLoggingConfig struct { +} + +func (*validateOpDeleteQueryLoggingConfig) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteQueryLoggingConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteQueryLoggingConfigInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteQueryLoggingConfigInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteReusableDelegationSet struct { +} + +func (*validateOpDeleteReusableDelegationSet) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteReusableDelegationSet) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteReusableDelegationSetInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteReusableDelegationSetInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteTrafficPolicy struct { +} + +func (*validateOpDeleteTrafficPolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteTrafficPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteTrafficPolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteTrafficPolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteTrafficPolicyInstance struct { +} + +func (*validateOpDeleteTrafficPolicyInstance) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteTrafficPolicyInstance) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteTrafficPolicyInstanceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteTrafficPolicyInstanceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteVPCAssociationAuthorization struct { +} + +func (*validateOpDeleteVPCAssociationAuthorization) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteVPCAssociationAuthorization) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteVPCAssociationAuthorizationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteVPCAssociationAuthorizationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDisableHostedZoneDNSSEC struct { +} + +func (*validateOpDisableHostedZoneDNSSEC) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDisableHostedZoneDNSSEC) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DisableHostedZoneDNSSECInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDisableHostedZoneDNSSECInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDisassociateVPCFromHostedZone struct { +} + +func (*validateOpDisassociateVPCFromHostedZone) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDisassociateVPCFromHostedZone) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DisassociateVPCFromHostedZoneInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDisassociateVPCFromHostedZoneInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpEnableHostedZoneDNSSEC struct { +} + +func (*validateOpEnableHostedZoneDNSSEC) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpEnableHostedZoneDNSSEC) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*EnableHostedZoneDNSSECInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpEnableHostedZoneDNSSECInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetAccountLimit struct { +} + +func (*validateOpGetAccountLimit) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetAccountLimit) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetAccountLimitInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetAccountLimitInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetChange struct { +} + +func (*validateOpGetChange) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetChange) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetChangeInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetChangeInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetDNSSEC struct { +} + +func (*validateOpGetDNSSEC) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetDNSSEC) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetDNSSECInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetDNSSECInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetHealthCheck struct { +} + +func (*validateOpGetHealthCheck) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetHealthCheck) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetHealthCheckInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetHealthCheckInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetHealthCheckLastFailureReason struct { +} + +func (*validateOpGetHealthCheckLastFailureReason) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetHealthCheckLastFailureReason) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetHealthCheckLastFailureReasonInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetHealthCheckLastFailureReasonInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetHealthCheckStatus struct { +} + +func (*validateOpGetHealthCheckStatus) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetHealthCheckStatus) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetHealthCheckStatusInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetHealthCheckStatusInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetHostedZone struct { +} + +func (*validateOpGetHostedZone) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetHostedZone) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetHostedZoneInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetHostedZoneInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetHostedZoneLimit struct { +} + +func (*validateOpGetHostedZoneLimit) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetHostedZoneLimit) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetHostedZoneLimitInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetHostedZoneLimitInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetQueryLoggingConfig struct { +} + +func (*validateOpGetQueryLoggingConfig) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetQueryLoggingConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetQueryLoggingConfigInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetQueryLoggingConfigInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetReusableDelegationSet struct { +} + +func (*validateOpGetReusableDelegationSet) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetReusableDelegationSet) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetReusableDelegationSetInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetReusableDelegationSetInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetReusableDelegationSetLimit struct { +} + +func (*validateOpGetReusableDelegationSetLimit) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetReusableDelegationSetLimit) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetReusableDelegationSetLimitInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetReusableDelegationSetLimitInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetTrafficPolicy struct { +} + +func (*validateOpGetTrafficPolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetTrafficPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetTrafficPolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetTrafficPolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetTrafficPolicyInstance struct { +} + +func (*validateOpGetTrafficPolicyInstance) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetTrafficPolicyInstance) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetTrafficPolicyInstanceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetTrafficPolicyInstanceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListCidrBlocks struct { +} + +func (*validateOpListCidrBlocks) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListCidrBlocks) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListCidrBlocksInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListCidrBlocksInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListCidrLocations struct { +} + +func (*validateOpListCidrLocations) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListCidrLocations) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListCidrLocationsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListCidrLocationsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListHostedZonesByVPC struct { +} + +func (*validateOpListHostedZonesByVPC) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListHostedZonesByVPC) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListHostedZonesByVPCInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListHostedZonesByVPCInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListResourceRecordSets struct { +} + +func (*validateOpListResourceRecordSets) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListResourceRecordSets) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListResourceRecordSetsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListResourceRecordSetsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListTagsForResource struct { +} + +func (*validateOpListTagsForResource) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListTagsForResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListTagsForResourceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListTagsForResourceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListTagsForResources struct { +} + +func (*validateOpListTagsForResources) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListTagsForResources) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListTagsForResourcesInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListTagsForResourcesInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListTrafficPolicyInstancesByHostedZone struct { +} + +func (*validateOpListTrafficPolicyInstancesByHostedZone) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListTrafficPolicyInstancesByHostedZone) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListTrafficPolicyInstancesByHostedZoneInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListTrafficPolicyInstancesByHostedZoneInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListTrafficPolicyInstancesByPolicy struct { +} + +func (*validateOpListTrafficPolicyInstancesByPolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListTrafficPolicyInstancesByPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListTrafficPolicyInstancesByPolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListTrafficPolicyInstancesByPolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListTrafficPolicyVersions struct { +} + +func (*validateOpListTrafficPolicyVersions) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListTrafficPolicyVersions) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListTrafficPolicyVersionsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListTrafficPolicyVersionsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListVPCAssociationAuthorizations struct { +} + +func (*validateOpListVPCAssociationAuthorizations) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListVPCAssociationAuthorizations) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListVPCAssociationAuthorizationsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListVPCAssociationAuthorizationsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpTestDNSAnswer struct { +} + +func (*validateOpTestDNSAnswer) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpTestDNSAnswer) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*TestDNSAnswerInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpTestDNSAnswerInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateHealthCheck struct { +} + +func (*validateOpUpdateHealthCheck) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateHealthCheck) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateHealthCheckInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateHealthCheckInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateHostedZoneComment struct { +} + +func (*validateOpUpdateHostedZoneComment) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateHostedZoneComment) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateHostedZoneCommentInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateHostedZoneCommentInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateTrafficPolicyComment struct { +} + +func (*validateOpUpdateTrafficPolicyComment) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateTrafficPolicyComment) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateTrafficPolicyCommentInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateTrafficPolicyCommentInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateTrafficPolicyInstance struct { +} + +func (*validateOpUpdateTrafficPolicyInstance) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateTrafficPolicyInstance) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateTrafficPolicyInstanceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateTrafficPolicyInstanceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +func addOpActivateKeySigningKeyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpActivateKeySigningKey{}, middleware.After) +} + +func addOpAssociateVPCWithHostedZoneValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpAssociateVPCWithHostedZone{}, middleware.After) +} + +func addOpChangeCidrCollectionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpChangeCidrCollection{}, middleware.After) +} + +func addOpChangeResourceRecordSetsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpChangeResourceRecordSets{}, middleware.After) +} + +func addOpChangeTagsForResourceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpChangeTagsForResource{}, middleware.After) +} + +func addOpCreateCidrCollectionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateCidrCollection{}, middleware.After) +} + +func addOpCreateHealthCheckValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateHealthCheck{}, middleware.After) +} + +func addOpCreateHostedZoneValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateHostedZone{}, middleware.After) +} + +func addOpCreateKeySigningKeyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateKeySigningKey{}, middleware.After) +} + +func addOpCreateQueryLoggingConfigValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateQueryLoggingConfig{}, middleware.After) +} + +func addOpCreateReusableDelegationSetValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateReusableDelegationSet{}, middleware.After) +} + +func addOpCreateTrafficPolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateTrafficPolicy{}, middleware.After) +} + +func addOpCreateTrafficPolicyInstanceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateTrafficPolicyInstance{}, middleware.After) +} + +func addOpCreateTrafficPolicyVersionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateTrafficPolicyVersion{}, middleware.After) +} + +func addOpCreateVPCAssociationAuthorizationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateVPCAssociationAuthorization{}, middleware.After) +} + +func addOpDeactivateKeySigningKeyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeactivateKeySigningKey{}, middleware.After) +} + +func addOpDeleteCidrCollectionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteCidrCollection{}, middleware.After) +} + +func addOpDeleteHealthCheckValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteHealthCheck{}, middleware.After) +} + +func addOpDeleteHostedZoneValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteHostedZone{}, middleware.After) +} + +func addOpDeleteKeySigningKeyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteKeySigningKey{}, middleware.After) +} + +func addOpDeleteQueryLoggingConfigValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteQueryLoggingConfig{}, middleware.After) +} + +func addOpDeleteReusableDelegationSetValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteReusableDelegationSet{}, middleware.After) +} + +func addOpDeleteTrafficPolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteTrafficPolicy{}, middleware.After) +} + +func addOpDeleteTrafficPolicyInstanceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteTrafficPolicyInstance{}, middleware.After) +} + +func addOpDeleteVPCAssociationAuthorizationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteVPCAssociationAuthorization{}, middleware.After) +} + +func addOpDisableHostedZoneDNSSECValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDisableHostedZoneDNSSEC{}, middleware.After) +} + +func addOpDisassociateVPCFromHostedZoneValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDisassociateVPCFromHostedZone{}, middleware.After) +} + +func addOpEnableHostedZoneDNSSECValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpEnableHostedZoneDNSSEC{}, middleware.After) +} + +func addOpGetAccountLimitValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetAccountLimit{}, middleware.After) +} + +func addOpGetChangeValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetChange{}, middleware.After) +} + +func addOpGetDNSSECValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetDNSSEC{}, middleware.After) +} + +func addOpGetHealthCheckValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetHealthCheck{}, middleware.After) +} + +func addOpGetHealthCheckLastFailureReasonValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetHealthCheckLastFailureReason{}, middleware.After) +} + +func addOpGetHealthCheckStatusValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetHealthCheckStatus{}, middleware.After) +} + +func addOpGetHostedZoneValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetHostedZone{}, middleware.After) +} + +func addOpGetHostedZoneLimitValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetHostedZoneLimit{}, middleware.After) +} + +func addOpGetQueryLoggingConfigValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetQueryLoggingConfig{}, middleware.After) +} + +func addOpGetReusableDelegationSetValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetReusableDelegationSet{}, middleware.After) +} + +func addOpGetReusableDelegationSetLimitValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetReusableDelegationSetLimit{}, middleware.After) +} + +func addOpGetTrafficPolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetTrafficPolicy{}, middleware.After) +} + +func addOpGetTrafficPolicyInstanceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetTrafficPolicyInstance{}, middleware.After) +} + +func addOpListCidrBlocksValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListCidrBlocks{}, middleware.After) +} + +func addOpListCidrLocationsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListCidrLocations{}, middleware.After) +} + +func addOpListHostedZonesByVPCValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListHostedZonesByVPC{}, middleware.After) +} + +func addOpListResourceRecordSetsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListResourceRecordSets{}, middleware.After) +} + +func addOpListTagsForResourceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListTagsForResource{}, middleware.After) +} + +func addOpListTagsForResourcesValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListTagsForResources{}, middleware.After) +} + +func addOpListTrafficPolicyInstancesByHostedZoneValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListTrafficPolicyInstancesByHostedZone{}, middleware.After) +} + +func addOpListTrafficPolicyInstancesByPolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListTrafficPolicyInstancesByPolicy{}, middleware.After) +} + +func addOpListTrafficPolicyVersionsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListTrafficPolicyVersions{}, middleware.After) +} + +func addOpListVPCAssociationAuthorizationsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListVPCAssociationAuthorizations{}, middleware.After) +} + +func addOpTestDNSAnswerValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpTestDNSAnswer{}, middleware.After) +} + +func addOpUpdateHealthCheckValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateHealthCheck{}, middleware.After) +} + +func addOpUpdateHostedZoneCommentValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateHostedZoneComment{}, middleware.After) +} + +func addOpUpdateTrafficPolicyCommentValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateTrafficPolicyComment{}, middleware.After) +} + +func addOpUpdateTrafficPolicyInstanceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateTrafficPolicyInstance{}, middleware.After) +} + +func validateAlarmIdentifier(v *types.AlarmIdentifier) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AlarmIdentifier"} + if len(v.Region) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Region")) + } + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateAliasTarget(v *types.AliasTarget) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AliasTarget"} + if v.HostedZoneId == nil { + invalidParams.Add(smithy.NewErrParamRequired("HostedZoneId")) + } + if v.DNSName == nil { + invalidParams.Add(smithy.NewErrParamRequired("DNSName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateChange(v *types.Change) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "Change"} + if len(v.Action) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Action")) + } + if v.ResourceRecordSet == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceRecordSet")) + } else if v.ResourceRecordSet != nil { + if err := validateResourceRecordSet(v.ResourceRecordSet); err != nil { + invalidParams.AddNested("ResourceRecordSet", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateChangeBatch(v *types.ChangeBatch) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ChangeBatch"} + if v.Changes == nil { + invalidParams.Add(smithy.NewErrParamRequired("Changes")) + } else if v.Changes != nil { + if err := validateChanges(v.Changes); err != nil { + invalidParams.AddNested("Changes", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateChanges(v []types.Change) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "Changes"} + for i := range v { + if err := validateChange(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateCidrCollectionChange(v *types.CidrCollectionChange) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CidrCollectionChange"} + if v.LocationName == nil { + invalidParams.Add(smithy.NewErrParamRequired("LocationName")) + } + if len(v.Action) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Action")) + } + if v.CidrList == nil { + invalidParams.Add(smithy.NewErrParamRequired("CidrList")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateCidrCollectionChanges(v []types.CidrCollectionChange) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CidrCollectionChanges"} + for i := range v { + if err := validateCidrCollectionChange(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateCidrRoutingConfig(v *types.CidrRoutingConfig) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CidrRoutingConfig"} + if v.CollectionId == nil { + invalidParams.Add(smithy.NewErrParamRequired("CollectionId")) + } + if v.LocationName == nil { + invalidParams.Add(smithy.NewErrParamRequired("LocationName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateHealthCheckConfig(v *types.HealthCheckConfig) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "HealthCheckConfig"} + if len(v.Type) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Type")) + } + if v.AlarmIdentifier != nil { + if err := validateAlarmIdentifier(v.AlarmIdentifier); err != nil { + invalidParams.AddNested("AlarmIdentifier", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateResourceRecord(v *types.ResourceRecord) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ResourceRecord"} + if v.Value == nil { + invalidParams.Add(smithy.NewErrParamRequired("Value")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateResourceRecords(v []types.ResourceRecord) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ResourceRecords"} + for i := range v { + if err := validateResourceRecord(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateResourceRecordSet(v *types.ResourceRecordSet) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ResourceRecordSet"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if len(v.Type) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Type")) + } + if v.ResourceRecords != nil { + if err := validateResourceRecords(v.ResourceRecords); err != nil { + invalidParams.AddNested("ResourceRecords", err.(smithy.InvalidParamsError)) + } + } + if v.AliasTarget != nil { + if err := validateAliasTarget(v.AliasTarget); err != nil { + invalidParams.AddNested("AliasTarget", err.(smithy.InvalidParamsError)) + } + } + if v.CidrRoutingConfig != nil { + if err := validateCidrRoutingConfig(v.CidrRoutingConfig); err != nil { + invalidParams.AddNested("CidrRoutingConfig", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpActivateKeySigningKeyInput(v *ActivateKeySigningKeyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ActivateKeySigningKeyInput"} + if v.HostedZoneId == nil { + invalidParams.Add(smithy.NewErrParamRequired("HostedZoneId")) + } + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpAssociateVPCWithHostedZoneInput(v *AssociateVPCWithHostedZoneInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AssociateVPCWithHostedZoneInput"} + if v.HostedZoneId == nil { + invalidParams.Add(smithy.NewErrParamRequired("HostedZoneId")) + } + if v.VPC == nil { + invalidParams.Add(smithy.NewErrParamRequired("VPC")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpChangeCidrCollectionInput(v *ChangeCidrCollectionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ChangeCidrCollectionInput"} + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if v.Changes == nil { + invalidParams.Add(smithy.NewErrParamRequired("Changes")) + } else if v.Changes != nil { + if err := validateCidrCollectionChanges(v.Changes); err != nil { + invalidParams.AddNested("Changes", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpChangeResourceRecordSetsInput(v *ChangeResourceRecordSetsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ChangeResourceRecordSetsInput"} + if v.HostedZoneId == nil { + invalidParams.Add(smithy.NewErrParamRequired("HostedZoneId")) + } + if v.ChangeBatch == nil { + invalidParams.Add(smithy.NewErrParamRequired("ChangeBatch")) + } else if v.ChangeBatch != nil { + if err := validateChangeBatch(v.ChangeBatch); err != nil { + invalidParams.AddNested("ChangeBatch", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpChangeTagsForResourceInput(v *ChangeTagsForResourceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ChangeTagsForResourceInput"} + if len(v.ResourceType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("ResourceType")) + } + if v.ResourceId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateCidrCollectionInput(v *CreateCidrCollectionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateCidrCollectionInput"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.CallerReference == nil { + invalidParams.Add(smithy.NewErrParamRequired("CallerReference")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateHealthCheckInput(v *CreateHealthCheckInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateHealthCheckInput"} + if v.CallerReference == nil { + invalidParams.Add(smithy.NewErrParamRequired("CallerReference")) + } + if v.HealthCheckConfig == nil { + invalidParams.Add(smithy.NewErrParamRequired("HealthCheckConfig")) + } else if v.HealthCheckConfig != nil { + if err := validateHealthCheckConfig(v.HealthCheckConfig); err != nil { + invalidParams.AddNested("HealthCheckConfig", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateHostedZoneInput(v *CreateHostedZoneInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateHostedZoneInput"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.CallerReference == nil { + invalidParams.Add(smithy.NewErrParamRequired("CallerReference")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateKeySigningKeyInput(v *CreateKeySigningKeyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateKeySigningKeyInput"} + if v.CallerReference == nil { + invalidParams.Add(smithy.NewErrParamRequired("CallerReference")) + } + if v.HostedZoneId == nil { + invalidParams.Add(smithy.NewErrParamRequired("HostedZoneId")) + } + if v.KeyManagementServiceArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("KeyManagementServiceArn")) + } + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.Status == nil { + invalidParams.Add(smithy.NewErrParamRequired("Status")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateQueryLoggingConfigInput(v *CreateQueryLoggingConfigInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateQueryLoggingConfigInput"} + if v.HostedZoneId == nil { + invalidParams.Add(smithy.NewErrParamRequired("HostedZoneId")) + } + if v.CloudWatchLogsLogGroupArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("CloudWatchLogsLogGroupArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateReusableDelegationSetInput(v *CreateReusableDelegationSetInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateReusableDelegationSetInput"} + if v.CallerReference == nil { + invalidParams.Add(smithy.NewErrParamRequired("CallerReference")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateTrafficPolicyInput(v *CreateTrafficPolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateTrafficPolicyInput"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.Document == nil { + invalidParams.Add(smithy.NewErrParamRequired("Document")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateTrafficPolicyInstanceInput(v *CreateTrafficPolicyInstanceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateTrafficPolicyInstanceInput"} + if v.HostedZoneId == nil { + invalidParams.Add(smithy.NewErrParamRequired("HostedZoneId")) + } + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.TTL == nil { + invalidParams.Add(smithy.NewErrParamRequired("TTL")) + } + if v.TrafficPolicyId == nil { + invalidParams.Add(smithy.NewErrParamRequired("TrafficPolicyId")) + } + if v.TrafficPolicyVersion == nil { + invalidParams.Add(smithy.NewErrParamRequired("TrafficPolicyVersion")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateTrafficPolicyVersionInput(v *CreateTrafficPolicyVersionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateTrafficPolicyVersionInput"} + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if v.Document == nil { + invalidParams.Add(smithy.NewErrParamRequired("Document")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateVPCAssociationAuthorizationInput(v *CreateVPCAssociationAuthorizationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateVPCAssociationAuthorizationInput"} + if v.HostedZoneId == nil { + invalidParams.Add(smithy.NewErrParamRequired("HostedZoneId")) + } + if v.VPC == nil { + invalidParams.Add(smithy.NewErrParamRequired("VPC")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeactivateKeySigningKeyInput(v *DeactivateKeySigningKeyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeactivateKeySigningKeyInput"} + if v.HostedZoneId == nil { + invalidParams.Add(smithy.NewErrParamRequired("HostedZoneId")) + } + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteCidrCollectionInput(v *DeleteCidrCollectionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteCidrCollectionInput"} + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteHealthCheckInput(v *DeleteHealthCheckInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteHealthCheckInput"} + if v.HealthCheckId == nil { + invalidParams.Add(smithy.NewErrParamRequired("HealthCheckId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteHostedZoneInput(v *DeleteHostedZoneInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteHostedZoneInput"} + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteKeySigningKeyInput(v *DeleteKeySigningKeyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteKeySigningKeyInput"} + if v.HostedZoneId == nil { + invalidParams.Add(smithy.NewErrParamRequired("HostedZoneId")) + } + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteQueryLoggingConfigInput(v *DeleteQueryLoggingConfigInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteQueryLoggingConfigInput"} + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteReusableDelegationSetInput(v *DeleteReusableDelegationSetInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteReusableDelegationSetInput"} + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteTrafficPolicyInput(v *DeleteTrafficPolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteTrafficPolicyInput"} + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if v.Version == nil { + invalidParams.Add(smithy.NewErrParamRequired("Version")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteTrafficPolicyInstanceInput(v *DeleteTrafficPolicyInstanceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteTrafficPolicyInstanceInput"} + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteVPCAssociationAuthorizationInput(v *DeleteVPCAssociationAuthorizationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteVPCAssociationAuthorizationInput"} + if v.HostedZoneId == nil { + invalidParams.Add(smithy.NewErrParamRequired("HostedZoneId")) + } + if v.VPC == nil { + invalidParams.Add(smithy.NewErrParamRequired("VPC")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDisableHostedZoneDNSSECInput(v *DisableHostedZoneDNSSECInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DisableHostedZoneDNSSECInput"} + if v.HostedZoneId == nil { + invalidParams.Add(smithy.NewErrParamRequired("HostedZoneId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDisassociateVPCFromHostedZoneInput(v *DisassociateVPCFromHostedZoneInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DisassociateVPCFromHostedZoneInput"} + if v.HostedZoneId == nil { + invalidParams.Add(smithy.NewErrParamRequired("HostedZoneId")) + } + if v.VPC == nil { + invalidParams.Add(smithy.NewErrParamRequired("VPC")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpEnableHostedZoneDNSSECInput(v *EnableHostedZoneDNSSECInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "EnableHostedZoneDNSSECInput"} + if v.HostedZoneId == nil { + invalidParams.Add(smithy.NewErrParamRequired("HostedZoneId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetAccountLimitInput(v *GetAccountLimitInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetAccountLimitInput"} + if len(v.Type) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Type")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetChangeInput(v *GetChangeInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetChangeInput"} + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetDNSSECInput(v *GetDNSSECInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetDNSSECInput"} + if v.HostedZoneId == nil { + invalidParams.Add(smithy.NewErrParamRequired("HostedZoneId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetHealthCheckInput(v *GetHealthCheckInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetHealthCheckInput"} + if v.HealthCheckId == nil { + invalidParams.Add(smithy.NewErrParamRequired("HealthCheckId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetHealthCheckLastFailureReasonInput(v *GetHealthCheckLastFailureReasonInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetHealthCheckLastFailureReasonInput"} + if v.HealthCheckId == nil { + invalidParams.Add(smithy.NewErrParamRequired("HealthCheckId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetHealthCheckStatusInput(v *GetHealthCheckStatusInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetHealthCheckStatusInput"} + if v.HealthCheckId == nil { + invalidParams.Add(smithy.NewErrParamRequired("HealthCheckId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetHostedZoneInput(v *GetHostedZoneInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetHostedZoneInput"} + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetHostedZoneLimitInput(v *GetHostedZoneLimitInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetHostedZoneLimitInput"} + if len(v.Type) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Type")) + } + if v.HostedZoneId == nil { + invalidParams.Add(smithy.NewErrParamRequired("HostedZoneId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetQueryLoggingConfigInput(v *GetQueryLoggingConfigInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetQueryLoggingConfigInput"} + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetReusableDelegationSetInput(v *GetReusableDelegationSetInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetReusableDelegationSetInput"} + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetReusableDelegationSetLimitInput(v *GetReusableDelegationSetLimitInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetReusableDelegationSetLimitInput"} + if len(v.Type) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Type")) + } + if v.DelegationSetId == nil { + invalidParams.Add(smithy.NewErrParamRequired("DelegationSetId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetTrafficPolicyInput(v *GetTrafficPolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetTrafficPolicyInput"} + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if v.Version == nil { + invalidParams.Add(smithy.NewErrParamRequired("Version")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetTrafficPolicyInstanceInput(v *GetTrafficPolicyInstanceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetTrafficPolicyInstanceInput"} + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListCidrBlocksInput(v *ListCidrBlocksInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListCidrBlocksInput"} + if v.CollectionId == nil { + invalidParams.Add(smithy.NewErrParamRequired("CollectionId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListCidrLocationsInput(v *ListCidrLocationsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListCidrLocationsInput"} + if v.CollectionId == nil { + invalidParams.Add(smithy.NewErrParamRequired("CollectionId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListHostedZonesByVPCInput(v *ListHostedZonesByVPCInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListHostedZonesByVPCInput"} + if v.VPCId == nil { + invalidParams.Add(smithy.NewErrParamRequired("VPCId")) + } + if len(v.VPCRegion) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("VPCRegion")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListResourceRecordSetsInput(v *ListResourceRecordSetsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListResourceRecordSetsInput"} + if v.HostedZoneId == nil { + invalidParams.Add(smithy.NewErrParamRequired("HostedZoneId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListTagsForResourceInput(v *ListTagsForResourceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListTagsForResourceInput"} + if len(v.ResourceType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("ResourceType")) + } + if v.ResourceId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListTagsForResourcesInput(v *ListTagsForResourcesInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListTagsForResourcesInput"} + if len(v.ResourceType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("ResourceType")) + } + if v.ResourceIds == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceIds")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListTrafficPolicyInstancesByHostedZoneInput(v *ListTrafficPolicyInstancesByHostedZoneInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListTrafficPolicyInstancesByHostedZoneInput"} + if v.HostedZoneId == nil { + invalidParams.Add(smithy.NewErrParamRequired("HostedZoneId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListTrafficPolicyInstancesByPolicyInput(v *ListTrafficPolicyInstancesByPolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListTrafficPolicyInstancesByPolicyInput"} + if v.TrafficPolicyId == nil { + invalidParams.Add(smithy.NewErrParamRequired("TrafficPolicyId")) + } + if v.TrafficPolicyVersion == nil { + invalidParams.Add(smithy.NewErrParamRequired("TrafficPolicyVersion")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListTrafficPolicyVersionsInput(v *ListTrafficPolicyVersionsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListTrafficPolicyVersionsInput"} + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListVPCAssociationAuthorizationsInput(v *ListVPCAssociationAuthorizationsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListVPCAssociationAuthorizationsInput"} + if v.HostedZoneId == nil { + invalidParams.Add(smithy.NewErrParamRequired("HostedZoneId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpTestDNSAnswerInput(v *TestDNSAnswerInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "TestDNSAnswerInput"} + if v.HostedZoneId == nil { + invalidParams.Add(smithy.NewErrParamRequired("HostedZoneId")) + } + if v.RecordName == nil { + invalidParams.Add(smithy.NewErrParamRequired("RecordName")) + } + if len(v.RecordType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("RecordType")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateHealthCheckInput(v *UpdateHealthCheckInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateHealthCheckInput"} + if v.HealthCheckId == nil { + invalidParams.Add(smithy.NewErrParamRequired("HealthCheckId")) + } + if v.AlarmIdentifier != nil { + if err := validateAlarmIdentifier(v.AlarmIdentifier); err != nil { + invalidParams.AddNested("AlarmIdentifier", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateHostedZoneCommentInput(v *UpdateHostedZoneCommentInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateHostedZoneCommentInput"} + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateTrafficPolicyCommentInput(v *UpdateTrafficPolicyCommentInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateTrafficPolicyCommentInput"} + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if v.Version == nil { + invalidParams.Add(smithy.NewErrParamRequired("Version")) + } + if v.Comment == nil { + invalidParams.Add(smithy.NewErrParamRequired("Comment")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateTrafficPolicyInstanceInput(v *UpdateTrafficPolicyInstanceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateTrafficPolicyInstanceInput"} + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if v.TTL == nil { + invalidParams.Add(smithy.NewErrParamRequired("TTL")) + } + if v.TrafficPolicyId == nil { + invalidParams.Add(smithy.NewErrParamRequired("TrafficPolicyId")) + } + if v.TrafficPolicyVersion == nil { + invalidParams.Add(smithy.NewErrParamRequired("TrafficPolicyVersion")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} diff --git a/vendor/modules.txt b/vendor/modules.txt index ff4ac6d..42cabce 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -10,7 +10,7 @@ github.com/Azure/go-ansiterm/winterm # github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d ## explicit github.com/acarl005/stripansi -# github.com/aws/aws-sdk-go-v2 v1.18.0 +# github.com/aws/aws-sdk-go-v2 v1.18.1 ## explicit; go 1.15 github.com/aws/aws-sdk-go-v2 github.com/aws/aws-sdk-go-v2/aws @@ -48,10 +48,10 @@ github.com/aws/aws-sdk-go-v2/credentials/stscreds ## explicit; go 1.15 github.com/aws/aws-sdk-go-v2/feature/ec2/imds github.com/aws/aws-sdk-go-v2/feature/ec2/imds/internal/config -# github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.33 +# github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.34 ## explicit; go 1.15 github.com/aws/aws-sdk-go-v2/internal/configsources -# github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.27 +# github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.28 ## explicit; go 1.15 github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 # github.com/aws/aws-sdk-go-v2/internal/ini v1.3.34 @@ -70,6 +70,12 @@ github.com/aws/aws-sdk-go-v2/service/iam/types # github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.27 ## explicit; go 1.15 github.com/aws/aws-sdk-go-v2/service/internal/presigned-url +# github.com/aws/aws-sdk-go-v2/service/route53 v1.28.3 +## explicit; go 1.15 +github.com/aws/aws-sdk-go-v2/service/route53 +github.com/aws/aws-sdk-go-v2/service/route53/internal/customizations +github.com/aws/aws-sdk-go-v2/service/route53/internal/endpoints +github.com/aws/aws-sdk-go-v2/service/route53/types # github.com/aws/aws-sdk-go-v2/service/sso v1.12.10 ## explicit; go 1.15 github.com/aws/aws-sdk-go-v2/service/sso From bf87bf15cc9eaafb74653f3c9e6d8765feb94f1f Mon Sep 17 00:00:00 2001 From: Jan Roehrich Date: Wed, 9 Oct 2024 10:23:07 +0200 Subject: [PATCH 2/3] split aws.go into multiple files --- pkg/aws/aws.go | 196 --------------------------------------------- pkg/aws/route53.go | 148 ++++++++++++++++++++++++++++++++++ pkg/aws/types.go | 60 ++++++++++++++ 3 files changed, 208 insertions(+), 196 deletions(-) create mode 100644 pkg/aws/route53.go create mode 100644 pkg/aws/types.go diff --git a/pkg/aws/aws.go b/pkg/aws/aws.go index 51b90bb..8757100 100644 --- a/pkg/aws/aws.go +++ b/pkg/aws/aws.go @@ -4,13 +4,8 @@ import ( "context" "encoding/base64" "fmt" - "github.com/aws/aws-sdk-go-v2/service/route53" - r53types "github.com/aws/aws-sdk-go-v2/service/route53/types" - "github.com/aws/smithy-go" - "maps" "net/http" "regexp" - "slices" "sort" "strings" "time" @@ -29,63 +24,6 @@ import ( const tagKeyHostname = "devpod:hostname" -type Machine struct { - Status string - InstanceID string - SpotInstanceRequestId string - PublicIP string - PrivateIP string - Hostname string -} - -func (m Machine) Host() string { - if m.Hostname != "" { - return m.Hostname - } - if m.PublicIP != "" { - return m.PublicIP - } - return m.PrivateIP -} - -type route53Zone struct { - id string - Name string - private bool -} - -// NewMachineFromInstance creates a new Machine struct from an AWS ec2 Instance struct -func NewMachineFromInstance(instance types.Instance) Machine { - var hostname string - for _, t := range instance.Tags { - if *t.Key != tagKeyHostname { - continue - } - hostname = *t.Value - break - } - - publicIP := "" - if instance.PublicIpAddress != nil { - publicIP = *instance.PublicIpAddress - } - - spotInstanceRequestID := "" - if instance.SpotInstanceRequestId != nil { - spotInstanceRequestID = *instance.SpotInstanceRequestId - } - - return Machine{ - InstanceID: *instance.InstanceId, - Hostname: hostname, - PrivateIP: *instance.PrivateIpAddress, - PublicIP: publicIP, - Status: string(instance.State.Name), - SpotInstanceRequestId: spotInstanceRequestID, - } - -} - // detect if we're in an ec2 instance func isEC2Instance() bool { client := &http.Client{} @@ -583,140 +521,6 @@ func CreateDevpodSecurityGroup(ctx context.Context, provider *AwsProvider) (stri return groupID, nil } -// GetDevpodRoute53Zone retrieves the Route53 zone for the devpod if applicable. A zone name can either be specified -// in the provider configuration or be detected by looking for a Route53 zone with a tag "devpod" with value "devpod". -func GetDevpodRoute53Zone(ctx context.Context, provider *AwsProvider) (route53Zone, error) { - r53client := route53.NewFromConfig(provider.AwsConfig) - if provider.Config.Route53ZoneName != "" { - listZonesOut, err := r53client.ListHostedZonesByName(ctx, &route53.ListHostedZonesByNameInput{ - DNSName: aws.String(provider.Config.Route53ZoneName), - }) - if err != nil { - return route53Zone{}, fmt.Errorf("find Route53 zone %s: %w", provider.Config.Route53ZoneName, err) - } - - zoneName := provider.Config.Route53ZoneName - if !strings.HasSuffix(zoneName, ".") { - zoneName += "." - } - for _, zone := range listZonesOut.HostedZones { - if *zone.Name == zoneName { - return route53Zone{ - id: *zone.Id, - Name: zoneName, - private: zone.Config.PrivateZone, - }, nil - } - } - return route53Zone{}, fmt.Errorf("unable to find Route53 zone %s", provider.Config.Route53ZoneName) - } - - truncated := true - var marker *string - for truncated { - hostedZoneList, err := r53client.ListHostedZones(ctx, &route53.ListHostedZonesInput{ - MaxItems: aws.Int32(100), - Marker: marker, - }) - if err != nil { - var apiErr smithy.APIError - if errors.As(err, &apiErr) && apiErr.ErrorCode() == "AccessDenied" { - provider.Log.Debugf("Access denied to list hosted zones, skipping Route53 zone detection: %v", err) - return route53Zone{}, nil - } - - return route53Zone{}, fmt.Errorf("list hosted zones: %w", err) - } - hostedZoneById := make(map[string]*r53types.HostedZone) - for _, hostedZone := range hostedZoneList.HostedZones { - hostedZoneById[strings.TrimPrefix(*hostedZone.Id, "/"+string(r53types.TagResourceTypeHostedzone)+"/")] = &hostedZone - } - resources, err := r53client.ListTagsForResources(ctx, &route53.ListTagsForResourcesInput{ - ResourceType: r53types.TagResourceTypeHostedzone, - ResourceIds: slices.Collect(maps.Keys(hostedZoneById)), - }) - if err != nil { - return route53Zone{}, fmt.Errorf("list tags for resources: %w", err) - } - for _, resourceTagSet := range resources.ResourceTagSets { - for _, tag := range resourceTagSet.Tags { - if *tag.Key == "devpod" && *tag.Value == "devpod" { - return route53Zone{ - id: *resourceTagSet.ResourceId, - Name: strings.TrimSuffix(*hostedZoneById[*resourceTagSet.ResourceId].Name, "."), - }, nil - } - } - } - - truncated = hostedZoneList.IsTruncated - marker = hostedZoneList.NextMarker - } - return route53Zone{}, nil -} - -// UpsertDevpodRoute53Record creates or updates a Route53 A record for the devpod hostname in the specified zone. -func UpsertDevpodRoute53Record(ctx context.Context, provider *AwsProvider, route53ZoneId string, hostname string, ip string) error { - r53client := route53.NewFromConfig(provider.AwsConfig) - if _, err := r53client.ChangeResourceRecordSets(ctx, &route53.ChangeResourceRecordSetsInput{ - HostedZoneId: aws.String(route53ZoneId), - ChangeBatch: &r53types.ChangeBatch{ - Changes: []r53types.Change{ - { - Action: r53types.ChangeActionCreate, - ResourceRecordSet: &r53types.ResourceRecordSet{ - Name: aws.String(hostname), - Type: r53types.RRTypeA, - ResourceRecords: []r53types.ResourceRecord{{Value: &ip}}, - TTL: aws.Int64(300), - }, - }, - }, - }, - }); err != nil { - return fmt.Errorf("upsert A record %q in zone %q to value %q: %w", hostname, route53ZoneId, ip, err) - } - return nil -} - -// DeleteDevpodRoute53Record deletes a Route53 A record for the devpod hostname in the specified zone. -func DeleteDevpodRoute53Record(ctx context.Context, provider *AwsProvider, zone route53Zone, machine Machine) error { - ip := machine.PrivateIP - if !zone.private { - ip = machine.PrivateIP - } - - r53client := route53.NewFromConfig(provider.AwsConfig) - if _, err := r53client.ChangeResourceRecordSets(ctx, &route53.ChangeResourceRecordSetsInput{ - HostedZoneId: aws.String(zone.id), - ChangeBatch: &r53types.ChangeBatch{ - Changes: []r53types.Change{ - { - Action: r53types.ChangeActionDelete, - ResourceRecordSet: &r53types.ResourceRecordSet{ - Name: aws.String(machine.Hostname), - Type: r53types.RRTypeA, - ResourceRecords: []r53types.ResourceRecord{ - { - Value: aws.String(ip), - }, - }, - TTL: aws.Int64(300), - }, - }, - }, - }, - }); err != nil { - var recordNotFoundErr *r53types.InvalidChangeBatch - if errors.As(err, &recordNotFoundErr) { - provider.Log.Warnf("A record %q in zone %q with value %q not found, skipping deletion: %v", machine.Hostname, zone.id, ip, err) - return nil - } - return fmt.Errorf("delete A record %q in zone %q with value %q: %w", machine.Hostname, zone.id, ip, err) - } - return nil -} - func GetDevpodInstance( ctx context.Context, cfg aws.Config, diff --git a/pkg/aws/route53.go b/pkg/aws/route53.go new file mode 100644 index 0000000..d6551fe --- /dev/null +++ b/pkg/aws/route53.go @@ -0,0 +1,148 @@ +package aws + +import ( + "context" + "errors" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws" + "github.com/aws/aws-sdk-go-v2/service/route53" + r53types "github.com/aws/aws-sdk-go-v2/service/route53/types" + "github.com/aws/smithy-go" + "maps" + "slices" + "strings" +) + +// GetDevpodRoute53Zone retrieves the Route53 zone for the devpod if applicable. A zone name can either be specified +// in the provider configuration or be detected by looking for a Route53 zone with a tag "devpod" with value "devpod". +func GetDevpodRoute53Zone(ctx context.Context, provider *AwsProvider) (route53Zone, error) { + r53client := route53.NewFromConfig(provider.AwsConfig) + if provider.Config.Route53ZoneName != "" { + listZonesOut, err := r53client.ListHostedZonesByName(ctx, &route53.ListHostedZonesByNameInput{ + DNSName: aws.String(provider.Config.Route53ZoneName), + }) + if err != nil { + return route53Zone{}, fmt.Errorf("find Route53 zone %s: %w", provider.Config.Route53ZoneName, err) + } + + zoneName := provider.Config.Route53ZoneName + if !strings.HasSuffix(zoneName, ".") { + zoneName += "." + } + for _, zone := range listZonesOut.HostedZones { + if *zone.Name == zoneName { + return route53Zone{ + id: *zone.Id, + Name: zoneName, + private: zone.Config.PrivateZone, + }, nil + } + } + return route53Zone{}, fmt.Errorf("unable to find Route53 zone %s", provider.Config.Route53ZoneName) + } + + truncated := true + var marker *string + for truncated { + hostedZoneList, err := r53client.ListHostedZones(ctx, &route53.ListHostedZonesInput{ + MaxItems: aws.Int32(100), + Marker: marker, + }) + if err != nil { + var apiErr smithy.APIError + if errors.As(err, &apiErr) && apiErr.ErrorCode() == "AccessDenied" { + provider.Log.Debugf("Access denied to list hosted zones, skipping Route53 zone detection: %v", err) + return route53Zone{}, nil + } + + return route53Zone{}, fmt.Errorf("list hosted zones: %w", err) + } + hostedZoneById := make(map[string]*r53types.HostedZone) + for _, hostedZone := range hostedZoneList.HostedZones { + hostedZoneById[strings.TrimPrefix(*hostedZone.Id, "/"+string(r53types.TagResourceTypeHostedzone)+"/")] = &hostedZone + } + resources, err := r53client.ListTagsForResources(ctx, &route53.ListTagsForResourcesInput{ + ResourceType: r53types.TagResourceTypeHostedzone, + ResourceIds: slices.Collect(maps.Keys(hostedZoneById)), + }) + if err != nil { + return route53Zone{}, fmt.Errorf("list tags for resources: %w", err) + } + for _, resourceTagSet := range resources.ResourceTagSets { + for _, tag := range resourceTagSet.Tags { + if *tag.Key == "devpod" && *tag.Value == "devpod" { + return route53Zone{ + id: *resourceTagSet.ResourceId, + Name: strings.TrimSuffix(*hostedZoneById[*resourceTagSet.ResourceId].Name, "."), + }, nil + } + } + } + + truncated = hostedZoneList.IsTruncated + marker = hostedZoneList.NextMarker + } + return route53Zone{}, nil +} + +// UpsertDevpodRoute53Record creates or updates a Route53 A record for the devpod hostname in the specified zone. +func UpsertDevpodRoute53Record(ctx context.Context, provider *AwsProvider, route53ZoneId string, hostname string, ip string) error { + r53client := route53.NewFromConfig(provider.AwsConfig) + if _, err := r53client.ChangeResourceRecordSets(ctx, &route53.ChangeResourceRecordSetsInput{ + HostedZoneId: aws.String(route53ZoneId), + ChangeBatch: &r53types.ChangeBatch{ + Changes: []r53types.Change{ + { + Action: r53types.ChangeActionCreate, + ResourceRecordSet: &r53types.ResourceRecordSet{ + Name: aws.String(hostname), + Type: r53types.RRTypeA, + ResourceRecords: []r53types.ResourceRecord{{Value: &ip}}, + TTL: aws.Int64(300), + }, + }, + }, + }, + }); err != nil { + return fmt.Errorf("upsert A record %q in zone %q to value %q: %w", hostname, route53ZoneId, ip, err) + } + return nil +} + +// DeleteDevpodRoute53Record deletes a Route53 A record for the devpod hostname in the specified zone. +func DeleteDevpodRoute53Record(ctx context.Context, provider *AwsProvider, zone route53Zone, machine Machine) error { + ip := machine.PrivateIP + if !zone.private { + ip = machine.PrivateIP + } + + r53client := route53.NewFromConfig(provider.AwsConfig) + if _, err := r53client.ChangeResourceRecordSets(ctx, &route53.ChangeResourceRecordSetsInput{ + HostedZoneId: aws.String(zone.id), + ChangeBatch: &r53types.ChangeBatch{ + Changes: []r53types.Change{ + { + Action: r53types.ChangeActionDelete, + ResourceRecordSet: &r53types.ResourceRecordSet{ + Name: aws.String(machine.Hostname), + Type: r53types.RRTypeA, + ResourceRecords: []r53types.ResourceRecord{ + { + Value: aws.String(ip), + }, + }, + TTL: aws.Int64(300), + }, + }, + }, + }, + }); err != nil { + var recordNotFoundErr *r53types.InvalidChangeBatch + if errors.As(err, &recordNotFoundErr) { + provider.Log.Warnf("A record %q in zone %q with value %q not found, skipping deletion: %v", machine.Hostname, zone.id, ip, err) + return nil + } + return fmt.Errorf("delete A record %q in zone %q with value %q: %w", machine.Hostname, zone.id, ip, err) + } + return nil +} diff --git a/pkg/aws/types.go b/pkg/aws/types.go new file mode 100644 index 0000000..7a72cb7 --- /dev/null +++ b/pkg/aws/types.go @@ -0,0 +1,60 @@ +package aws + +import "github.com/aws/aws-sdk-go-v2/service/ec2/types" + +type Machine struct { + Status string + InstanceID string + SpotInstanceRequestId string + PublicIP string + PrivateIP string + Hostname string +} + +func (m Machine) Host() string { + if m.Hostname != "" { + return m.Hostname + } + if m.PublicIP != "" { + return m.PublicIP + } + return m.PrivateIP +} + +type route53Zone struct { + id string + Name string + private bool +} + +// NewMachineFromInstance creates a new Machine struct from an AWS ec2 Instance struct +func NewMachineFromInstance(instance types.Instance) Machine { + var hostname string + for _, t := range instance.Tags { + if *t.Key != tagKeyHostname { + continue + } + hostname = *t.Value + break + } + + publicIP := "" + if instance.PublicIpAddress != nil { + publicIP = *instance.PublicIpAddress + } + + spotInstanceRequestID := "" + if instance.SpotInstanceRequestId != nil { + spotInstanceRequestID = *instance.SpotInstanceRequestId + } + + return Machine{ + InstanceID: *instance.InstanceId, + Hostname: hostname, + PrivateIP: *instance.PrivateIpAddress, + PublicIP: publicIP, + Status: string(instance.State.Name), + SpotInstanceRequestId: spotInstanceRequestID, + } + +} From b89ce751a2a70865ebb93e9ba50367e2777fa943 Mon Sep 17 00:00:00 2001 From: Jan Roehrich Date: Wed, 9 Oct 2024 10:37:30 +0200 Subject: [PATCH 3/3] implement feature toggle for using Route53 hostnames --- hack/provider/provider.yaml | 5 +++++ pkg/aws/aws.go | 23 ++++++++++++++--------- pkg/options/options.go | 3 +++ 3 files changed, 22 insertions(+), 9 deletions(-) diff --git a/hack/provider/provider.yaml b/hack/provider/provider.yaml index 7270e18..509f88e 100644 --- a/hack/provider/provider.yaml +++ b/hack/provider/provider.yaml @@ -23,6 +23,7 @@ optionGroups: - AWS_USE_SPOT_INSTANCE - AWS_USE_SESSION_MANAGER - AWS_KMS_KEY_ARN_FOR_SESSION_MANAGER + - AWS_USE_ROUTE53 - AWS_ROUTE53_ZONE_NAME name: "AWS options" defaultVisible: false @@ -252,6 +253,10 @@ options: AWS_KMS_KEY_ARN_FOR_SESSION_MANAGER: description: "Specify the KMS key ARN to use for the AWS Session Manager" default: "" + AWS_USE_ROUTE53: + description: "If defined, will try to create a Route53 record for the machine's IP address and use that hostname upon machine connection. If activated, the Route53 zone can be configured by AWS_ROUTE53_ZONE_NAME or of not, it is tried to lookup by the tag `devpod=devpod`" + type: boolean + default: false AWS_ROUTE53_ZONE_NAME: description: "The zone name of a Route53 hosted zone to use for the machine's DNS name" default: "" diff --git a/pkg/aws/aws.go b/pkg/aws/aws.go index 8757100..06eb132 100644 --- a/pkg/aws/aws.go +++ b/pkg/aws/aws.go @@ -718,9 +718,12 @@ func Create( return Machine{}, err } - r53Zone, err := GetDevpodRoute53Zone(ctx, providerAws) - if err != nil { - return Machine{}, err + var r53Zone route53Zone + if providerAws.Config.UseRoute53Hostnames { + r53Zone, err = GetDevpodRoute53Zone(ctx, providerAws) + if err != nil { + return Machine{}, err + } } instance := &ec2.RunInstancesInput{ @@ -875,14 +878,16 @@ func Delete(ctx context.Context, provider *AwsProvider, machine Machine) error { } } - route53Zone, err := GetDevpodRoute53Zone(ctx, provider) - if err != nil { - return err - } - if route53Zone.id != "" { - if err := DeleteDevpodRoute53Record(ctx, provider, route53Zone, machine); err != nil { + if provider.Config.UseRoute53Hostnames { + r53Zone, err := GetDevpodRoute53Zone(ctx, provider) + if err != nil { return err } + if r53Zone.id != "" { + if err := DeleteDevpodRoute53Record(ctx, provider, r53Zone, machine); err != nil { + return err + } + } } return nil diff --git a/pkg/options/options.go b/pkg/options/options.go index c15715a..15caf37 100644 --- a/pkg/options/options.go +++ b/pkg/options/options.go @@ -22,6 +22,7 @@ var ( AWS_USE_SPOT_INSTANCE = "AWS_USE_SPOT_INSTANCE" AWS_USE_SESSION_MANAGER = "AWS_USE_SESSION_MANAGER" AWS_KMS_KEY_ARN_FOR_SESSION_MANAGER = "AWS_KMS_KEY_ARN_FOR_SESSION_MANAGER" + AWS_USE_ROUTE53 = "AWS_USE_ROUTE53" AWS_ROUTE53_ZONE_NAME = "AWS_ROUTE53_ZONE_NAME" ) @@ -43,6 +44,7 @@ type Options struct { UseSpotInstance bool UseSessionManager bool KmsKeyARNForSessionManager string + UseRoute53Hostnames bool Route53ZoneName string } @@ -79,6 +81,7 @@ func FromEnv(init bool) (*Options, error) { retOptions.UseSpotInstance = os.Getenv(AWS_USE_SPOT_INSTANCE) == "true" retOptions.UseSessionManager = os.Getenv(AWS_USE_SESSION_MANAGER) == "true" retOptions.KmsKeyARNForSessionManager = os.Getenv(AWS_KMS_KEY_ARN_FOR_SESSION_MANAGER) + retOptions.UseRoute53Hostnames = os.Getenv(AWS_USE_ROUTE53) == "true" retOptions.Route53ZoneName = os.Getenv(AWS_ROUTE53_ZONE_NAME) // Return eraly if we're just doing init