diff --git a/aws/asg.go b/aws/asg.go
index d1147edd..fcbe29a3 100644
--- a/aws/asg.go
+++ b/aws/asg.go
@@ -15,17 +15,19 @@
package aws
import (
+ "context"
"strings"
"time"
- "github.com/aws/aws-sdk-go/service/autoscaling"
+ "github.com/aws/aws-sdk-go-v2/service/autoscaling"
+ at "github.com/aws/aws-sdk-go-v2/service/autoscaling/types"
"github.com/pkg/errors"
)
// GetAllASGs returns all ASGs visible with your client, with no filters
-func (c *Clients) GetAllASGs() ([]*autoscaling.Group, error) {
+func (c *Clients) GetAllASGs(ctx context.Context) ([]*at.AutoScalingGroup, error) {
var nexttoken *string
- var asgs []*autoscaling.Group
+ var asgs []*at.AutoScalingGroup
var input *autoscaling.DescribeAutoScalingGroupsInput
var err error
var output *autoscaling.DescribeAutoScalingGroupsOutput
@@ -35,13 +37,13 @@ func (c *Clients) GetAllASGs() ([]*autoscaling.Group, error) {
NextToken: nexttoken,
}
- output, err = c.ASGClient.DescribeAutoScalingGroups(input)
+ output, err = c.ASGClient.DescribeAutoScalingGroups(ctx, input)
if err != nil {
return nil, errors.Wrap(err, "Error describing ASGs")
}
for _, asg := range output.AutoScalingGroups {
- asgs = append(asgs, asg)
+ asgs = append(asgs, &asg)
}
nexttoken = output.NextToken
@@ -56,34 +58,34 @@ func (c *Clients) GetAllASGs() ([]*autoscaling.Group, error) {
}
// GetASG gets the *autoscaling.Group that matches for the name given
-func (c *Clients) GetASG(asgName *string) (*autoscaling.Group, error) {
- var asgs []*autoscaling.Group
+func (c *Clients) GetASG(ctx context.Context, asgName string) (*at.AutoScalingGroup, error) {
+ var asgs []*at.AutoScalingGroup
input := &autoscaling.DescribeAutoScalingGroupsInput{
- AutoScalingGroupNames: []*string{asgName},
+ AutoScalingGroupNames: []string{asgName},
}
- output, err := c.ASGClient.DescribeAutoScalingGroups(input)
+ output, err := c.ASGClient.DescribeAutoScalingGroups(ctx, input)
if err != nil {
return nil, errors.Wrap(err, "Error describing ASGs")
}
for _, asg := range output.AutoScalingGroups {
- asgs = append(asgs, asg)
+ asgs = append(asgs, &asg)
}
if len(asgs) != 1 {
- return nil, errors.Errorf("ASG Name '%s' matched '%v' ASGs, expecting it to match 1 (looking in region %s, have you set AWS_DEFAULT_REGION?)", *asgName, len(asgs), c.ASGClient.SigningRegion)
+ return nil, errors.Errorf("ASG Name '%s' matched '%v' ASGs, expecting it to match 1 (have you set AWS_DEFAULT_REGION?)", asgName, len(asgs))
}
return asgs[0], nil
}
// GetASGTagValue returns a pointer to the value for the given tag key
-func GetASGTagValue(asg *autoscaling.Group, key string) *string {
+func GetASGTagValue(asg *at.AutoScalingGroup, key string) *string {
for _, tag := range asg.Tags {
- if tag != nil {
- if strings.ToLower(*tag.Key) == strings.ToLower(key) {
+ if tag.Key != nil {
+ if strings.EqualFold(*tag.Key, key) {
return tag.Value
}
}
@@ -92,21 +94,21 @@ func GetASGTagValue(asg *autoscaling.Group, key string) *string {
}
// GetLaunchConfiguration returns the LC object of the given ASG
-func (c *Clients) GetLaunchConfiguration(asg *autoscaling.Group) (*autoscaling.LaunchConfiguration, error) {
- var lcs []*string
- lcs = append(lcs, asg.LaunchConfigurationName)
+func (c *Clients) GetLaunchConfiguration(ctx context.Context, asg *at.AutoScalingGroup) (*at.LaunchConfiguration, error) {
+ var lcs []string
+ lcs = append(lcs, *asg.LaunchConfigurationName)
input := autoscaling.DescribeLaunchConfigurationsInput{
LaunchConfigurationNames: lcs,
}
- output, err := c.ASGClient.DescribeLaunchConfigurations(&input)
+ output, err := c.ASGClient.DescribeLaunchConfigurations(ctx, &input)
if err != nil {
return nil, errors.Wrapf(err, "Error describing launch configuration %s for ASG %s", *asg.LaunchConfigurationName, *asg.AutoScalingGroupName)
}
- return output.LaunchConfigurations[0], nil
+ return &output.LaunchConfigurations[0], nil
}
// GetLaunchTemplateSpec returns the LT spec for a given ASG, if it has one
-func (c *Clients) GetLaunchTemplateSpec(asg *autoscaling.Group) *autoscaling.LaunchTemplateSpecification {
+func (c *Clients) GetLaunchTemplateSpec(asg *at.AutoScalingGroup) *at.LaunchTemplateSpecification {
// First, let's check the direct launch template spec property of the ASG
if asg.LaunchTemplate != nil {
return asg.LaunchTemplate
@@ -122,7 +124,7 @@ func (c *Clients) GetLaunchTemplateSpec(asg *autoscaling.Group) *autoscaling.Lau
}
// CompleteLifecycleAction calls https://docs.aws.amazon.com/cli/latest/reference/autoscaling/complete-lifecycle-action.html
-func (c *Clients) CompleteLifecycleAction(asgName *string, instID *string, lifecycleHook *string, result *string) error {
+func (c *Clients) CompleteLifecycleAction(ctx context.Context, asgName *string, instID *string, lifecycleHook *string, result *string) error {
input := autoscaling.CompleteLifecycleActionInput{
AutoScalingGroupName: asgName,
InstanceId: instID,
@@ -130,26 +132,26 @@ func (c *Clients) CompleteLifecycleAction(asgName *string, instID *string, lifec
LifecycleHookName: lifecycleHook,
}
- _, err := c.ASGClient.CompleteLifecycleAction(&input)
+ _, err := c.ASGClient.CompleteLifecycleAction(ctx, &input)
return errors.Wrapf(err, "error completing lifecycle hook %s for instance %s", *lifecycleHook, *instID)
}
// TerminateInstanceInASG calls https://docs.aws.amazon.com/cli/latest/reference/autoscaling/terminate-instance-in-auto-scaling-group.html
-func (c *Clients) TerminateInstanceInASG(instID *string, decrement *bool) error {
+func (c *Clients) TerminateInstanceInASG(ctx context.Context, instID *string, decrement *bool) error {
input := autoscaling.TerminateInstanceInAutoScalingGroupInput{
InstanceId: instID,
ShouldDecrementDesiredCapacity: decrement,
}
- _, err := c.ASGClient.TerminateInstanceInAutoScalingGroup(&input)
+ _, err := c.ASGClient.TerminateInstanceInAutoScalingGroup(ctx, &input)
return errors.Wrapf(err, "error terminating instance %s", *instID)
}
// SetDesiredCapacity sets the desired capacity of given ASG to given value
-func (c *Clients) SetDesiredCapacity(asg *autoscaling.Group, desiredCapacity *int64) error {
+func (c *Clients) SetDesiredCapacity(ctx context.Context, asg *at.AutoScalingGroup, desiredCapacity *int32) error {
input := autoscaling.SetDesiredCapacityInput{
AutoScalingGroupName: asg.AutoScalingGroupName,
DesiredCapacity: desiredCapacity,
}
- _, err := c.ASGClient.SetDesiredCapacity(&input)
+ _, err := c.ASGClient.SetDesiredCapacity(ctx, &input)
return errors.Wrapf(err, "error setting desired capacity for %s", *asg.AutoScalingGroupName)
}
diff --git a/aws/aws.go b/aws/aws.go
index a8b4214c..c758e160 100644
--- a/aws/aws.go
+++ b/aws/aws.go
@@ -15,15 +15,17 @@
package aws
import (
+ "context"
"fmt"
"os"
"strconv"
"time"
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/session"
- "github.com/aws/aws-sdk-go/service/autoscaling"
- "github.com/aws/aws-sdk-go/service/ec2"
+ "github.com/aws/aws-sdk-go-v2/config"
+ "github.com/aws/aws-sdk-go-v2/service/autoscaling"
+ at "github.com/aws/aws-sdk-go-v2/service/autoscaling/types"
+ "github.com/aws/aws-sdk-go-v2/service/ec2"
+ et "github.com/aws/aws-sdk-go-v2/service/ec2/types"
"github.com/pkg/errors"
)
@@ -31,30 +33,24 @@ const apiSleepTime = 200 * time.Millisecond
// Clients holds the clients for this account's invocation of the APIs we'll need
type Clients struct {
- ASGClient *autoscaling.AutoScaling
- EC2Client *ec2.EC2
+ ASGClient *autoscaling.Client
+ EC2Client *ec2.Client
}
// GetAWSClients returns the AWS client objects we'll need
-func GetAWSClients() (*Clients, error) {
+func GetAWSClients(ctx context.Context) (*Clients, error) {
region := os.Getenv("AWS_DEFAULT_REGION")
if region == "" {
region = "us-east-1"
}
- awsConf := aws.Config{
- Region: ®ion,
- }
-
- sess, err := session.NewSessionWithOptions(session.Options{
- Config: awsConf,
- })
+ cfg, err := config.LoadDefaultConfig(ctx, config.WithRegion(region))
if err != nil {
- return nil, errors.Wrap(err, "Error opening AWS session")
+ return nil, errors.Wrap(err, "Error opening default AWS config")
}
- asg := autoscaling.New(sess)
- ec2 := ec2.New(sess)
+ asg := autoscaling.NewFromConfig(cfg)
+ ec2 := ec2.NewFromConfig(cfg)
ac := Clients{
ASGClient: asg,
@@ -65,13 +61,11 @@ func GetAWSClients() (*Clients, error) {
}
// ASGInstToEC2Inst converts a *autoscaling.Instance to its corresponding *ec2.Instance
-func (c *Clients) ASGInstToEC2Inst(inst *autoscaling.Instance) (*ec2.Instance, error) {
- var instIDs []*string
- instIDs = append(instIDs, inst.InstanceId)
+func (c *Clients) ASGInstToEC2Inst(ctx context.Context, inst at.Instance) (*et.Instance, error) {
input := ec2.DescribeInstancesInput{
- InstanceIds: instIDs,
+ InstanceIds: []string{*inst.InstanceId},
}
- output, err := c.EC2Client.DescribeInstances(&input)
+ output, err := c.EC2Client.DescribeInstances(ctx, &input)
if err != nil {
return nil, errors.Wrapf(err, "Error describing instance %s", *inst.InstanceId)
}
@@ -82,27 +76,27 @@ func (c *Clients) ASGInstToEC2Inst(inst *autoscaling.Instance) (*ec2.Instance, e
}
for _, ec2Inst := range res.Instances {
- return ec2Inst, nil
+ return &ec2Inst, nil
}
}
return nil, errors.Errorf("No instances found for %s", *inst.InstanceId)
}
-// ASGLTplVersionToEC2LTplVersion resolves ASG Template Versions to its actual *int64 ec2LaunchTemplate Version
-func (c Clients) ASGLTplVersionToEC2LTplVersion(asgLaunchTemplate *autoscaling.LaunchTemplateSpecification) (*string, error) {
+// ASGLTplVersionToEC2LTplVersion resolves ASG Template Versions to its actual *int32 ec2LaunchTemplate Version
+func (c Clients) ASGLTplVersionToEC2LTplVersion(ctx context.Context, asgLaunchTemplate *at.LaunchTemplateSpecification) (*string, error) {
// No launch template, nothing to do here
if asgLaunchTemplate == nil {
return nil, nil
}
input := &ec2.DescribeLaunchTemplatesInput{
- LaunchTemplateIds: []*string{
- asgLaunchTemplate.LaunchTemplateId,
+ LaunchTemplateIds: []string{
+ *asgLaunchTemplate.LaunchTemplateId,
},
}
- res, err := c.EC2Client.DescribeLaunchTemplates(input)
+ res, err := c.EC2Client.DescribeLaunchTemplates(ctx, input)
if err != nil {
return nil, errors.Wrapf(err, "Error describing LaunchTemplate %s", *asgLaunchTemplate.LaunchTemplateId)
}
diff --git a/aws/ec2.go b/aws/ec2.go
index 82f6a311..14ecd4eb 100644
--- a/aws/ec2.go
+++ b/aws/ec2.go
@@ -15,17 +15,19 @@
package aws
import (
+ "context"
"strings"
- "github.com/aws/aws-sdk-go/service/autoscaling"
- "github.com/aws/aws-sdk-go/service/ec2"
+ at "github.com/aws/aws-sdk-go-v2/service/autoscaling/types"
+ "github.com/aws/aws-sdk-go-v2/service/ec2"
+ et "github.com/aws/aws-sdk-go-v2/service/ec2/types"
"github.com/pkg/errors"
)
// GetEC2TagValue returns a pointer to the value of the tag with the given key
-func GetEC2TagValue(ec2 *ec2.Instance, key string) *string {
+func GetEC2TagValue(ec2 *et.Instance, key string) *string {
for _, tag := range ec2.Tags {
- if tag != nil {
+ if tag.Key != nil {
if strings.ToLower(*tag.Key) == strings.ToLower(key) {
return tag.Value
}
@@ -35,16 +37,15 @@ func GetEC2TagValue(ec2 *ec2.Instance, key string) *string {
}
// GetUserData returns a pointer to the value of the instance's userdata
-func (c *Clients) GetUserData(inst *autoscaling.Instance) (*string, error) {
- attr := "userData"
+func (c *Clients) GetUserData(ctx context.Context, inst *at.Instance) (*string, error) {
input := ec2.DescribeInstanceAttributeInput{
- Attribute: &attr,
+ Attribute: et.InstanceAttributeNameUserData,
InstanceId: inst.InstanceId,
}
- output, err := c.EC2Client.DescribeInstanceAttribute(&input)
+ output, err := c.EC2Client.DescribeInstanceAttribute(ctx, &input)
if err != nil {
- return nil, errors.Wrapf(err, "Error describing attribute %s for instance %s", attr, *inst.InstanceId)
+ return nil, errors.Wrapf(err, "Error describing userdata for instance %s", *inst.InstanceId)
}
return output.UserData.Value, nil
diff --git a/bouncer/asg.go b/bouncer/asg.go
index 5f4ba22a..c423c3f2 100644
--- a/bouncer/asg.go
+++ b/bouncer/asg.go
@@ -15,28 +15,24 @@
package bouncer
import (
+ "context"
"time"
- "github.com/aws/aws-sdk-go/service/autoscaling"
+ at "github.com/aws/aws-sdk-go-v2/service/autoscaling/types"
"github.com/palantir/bouncer/aws"
"github.com/pkg/errors"
)
// ASG object holds a pointer to an ASG and its Instances
type ASG struct {
- ASG *autoscaling.Group
+ ASG *at.AutoScalingGroup
Instances []*Instance
DesiredASG *DesiredASG
}
// NewASG creates a new ASG object
-func NewASG(ac *aws.Clients, desASG *DesiredASG, force bool, startTime time.Time) (*ASG, error) {
- var awsAsg *autoscaling.Group
-
- err := retry(apiRetryCount, apiRetrySleep, func() (err error) {
- awsAsg, err = ac.GetASG(&desASG.AsgName)
- return
- })
+func NewASG(ctx context.Context, ac *aws.Clients, desASG *DesiredASG, force bool, startTime time.Time) (*ASG, error) {
+ awsAsg, err := ac.GetASG(ctx, desASG.AsgName)
if err != nil {
return nil, errors.Wrap(err, "error getting AWS ASG object")
}
@@ -44,7 +40,7 @@ func NewASG(ac *aws.Clients, desASG *DesiredASG, force bool, startTime time.Time
var instances []*Instance
for _, asgInst := range awsAsg.Instances {
- inst, err := NewInstance(ac, awsAsg, asgInst, force, startTime, desASG.PreTerminateCmd)
+ inst, err := NewInstance(ctx, ac, awsAsg, asgInst, force, startTime, desASG.PreTerminateCmd)
if err != nil {
return nil, errors.Wrapf(err, "error generating bouncer.instance for %s", *asgInst.InstanceId)
}
diff --git a/bouncer/asgset.go b/bouncer/asgset.go
index 086fb4fa..643c314a 100644
--- a/bouncer/asgset.go
+++ b/bouncer/asgset.go
@@ -15,10 +15,10 @@
package bouncer
import (
- "strings"
+ "context"
"time"
- "github.com/aws/aws-sdk-go/service/autoscaling"
+ at "github.com/aws/aws-sdk-go-v2/service/autoscaling/types"
"github.com/palantir/bouncer/aws"
"github.com/pkg/errors"
log "github.com/sirupsen/logrus"
@@ -30,11 +30,11 @@ type ASGSet struct {
ASGs []*ASG
}
-func newASGSet(ac *aws.Clients, desiredASGs []*DesiredASG, force bool, startTime time.Time) (*ASGSet, error) {
+func newASGSet(ctx context.Context, ac *aws.Clients, desiredASGs []*DesiredASG, force bool, startTime time.Time) (*ASGSet, error) {
var asgs []*ASG
for _, desASG := range desiredASGs {
- asg, err := NewASG(ac, desASG, force, startTime)
+ asg, err := NewASG(ctx, ac, desASG, force, startTime)
if err != nil {
return nil, errors.Wrapf(err, "Error getting information for ASG %s", desASG.AsgName)
}
@@ -54,7 +54,9 @@ func (a *ASGSet) GetImmutableInstances() []*Instance {
var instances []*Instance
for _, asg := range a.ASGs {
for _, inst := range asg.Instances {
- if *inst.ASGInstance.LifecycleState == autoscaling.LifecycleStateTerminating || *inst.ASGInstance.LifecycleState == autoscaling.LifecycleStatePending || *inst.ASGInstance.LifecycleState == autoscaling.LifecycleStateTerminatingProceed {
+ if inst.ASGInstance.LifecycleState == at.LifecycleStateTerminating ||
+ inst.ASGInstance.LifecycleState == at.LifecycleStatePending ||
+ inst.ASGInstance.LifecycleState == at.LifecycleStateTerminatingProceed {
instances = append(instances, inst)
}
}
@@ -82,7 +84,9 @@ func (a *ASGSet) GetTerminatingInstances() []*Instance {
var terminatingInstances []*Instance
for _, asg := range a.ASGs {
for _, inst := range asg.Instances {
- if strings.HasPrefix(*inst.ASGInstance.LifecycleState, "Terminating") {
+ if inst.ASGInstance.LifecycleState == at.LifecycleStateTerminating ||
+ inst.ASGInstance.LifecycleState == at.LifecycleStateTerminatingProceed ||
+ inst.ASGInstance.LifecycleState == at.LifecycleStateTerminatingWait {
terminatingInstances = append(terminatingInstances, inst)
}
}
@@ -136,7 +140,7 @@ func (a *ASGSet) GetBestOldInstance() *Instance {
func (a *ASGSet) GetActualBadCounts() []*ASG {
var badCountASGs []*ASG
for _, asg := range a.ASGs {
- if *asg.ASG.DesiredCapacity != int64(len(asg.Instances)) {
+ if *asg.ASG.DesiredCapacity != int32(len(asg.Instances)) {
badCountASGs = append(badCountASGs, asg)
}
}
@@ -195,7 +199,7 @@ func (a *ASGSet) IsTerminating() bool {
log.WithFields(log.Fields{
"ASG": *inst.AutoscalingGroup.AutoScalingGroupName,
"InstanceID": *inst.ASGInstance.InstanceId,
- "State": *inst.ASGInstance.LifecycleState,
+ "State": inst.ASGInstance.LifecycleState,
}).Info("Waiting for instance to die")
isTerminating = true
}
@@ -229,7 +233,7 @@ func (a *ASGSet) IsImmutableAutoscalingEvent() bool {
log.WithFields(log.Fields{
"ASG": *inst.AutoscalingGroup.AutoScalingGroupName,
"InstanceID": *inst.ASGInstance.InstanceId,
- "State": *inst.ASGInstance.LifecycleState,
+ "State": inst.ASGInstance.LifecycleState,
}).Info("Instance is in transient state")
isEvent = true
}
@@ -243,11 +247,11 @@ func (a *ASGSet) IsNewUnhealthy() bool {
newUnhealthy := a.GetUnhealthyNewInstances()
for _, inst := range newUnhealthy {
- state := *inst.ASGInstance.LifecycleState
+ state := inst.ASGInstance.LifecycleState
var msg string
switch state {
- case autoscaling.LifecycleStateTerminating, autoscaling.LifecycleStateTerminatingProceed, autoscaling.LifecycleStateTerminatingWait:
+ case at.LifecycleStateTerminating, at.LifecycleStateTerminatingProceed, at.LifecycleStateTerminatingWait:
msg = "Waiting for unhealthy new instance to get out of the way"
default:
msg = "Waiting for new instance to become healthy"
diff --git a/bouncer/command.go b/bouncer/command.go
index f4f0fab5..1a6befc9 100644
--- a/bouncer/command.go
+++ b/bouncer/command.go
@@ -16,10 +16,10 @@ package bouncer
import (
"bufio"
+ "context"
"io"
"os/exec"
"strings"
- "time"
"github.com/pkg/errors"
log "github.com/sirupsen/logrus"
@@ -75,11 +75,10 @@ func getCmd(command string, args []string) (*exec.Cmd, error) {
return cmd, nil
}
-func (r *BaseRunner) executeExternalCommand(fullCommand string) error {
- tmout := r.opts.ItemTimeout
+func (r *BaseRunner) executeExternalCommand(ctx context.Context, fullCommand string) error {
+ tmout := r.Opts.ItemTimeout
command, args := splitCommandString(fullCommand)
log.Infof("Executing pre-terminate command '%s' with args '%s'", command, args)
- r.resetTimeout()
r.noopCheck()
cmd, err := getCmd(command, args)
@@ -98,7 +97,7 @@ func (r *BaseRunner) executeExternalCommand(fullCommand string) error {
}()
select {
- case <-time.After(tmout):
+ case <-ctx.Done():
err = cmd.Process.Kill()
if err != nil {
return errors.Wrapf(err, "error killing process after timeout of %s", tmout)
diff --git a/bouncer/desiredasg.go b/bouncer/desiredasg.go
index 7ee582a8..543b58e7 100644
--- a/bouncer/desiredasg.go
+++ b/bouncer/desiredasg.go
@@ -25,24 +25,24 @@ import (
// the desired capacity, may not _actually_ be.
type DesiredASG struct {
AsgName string
- DesiredCapacity int64
+ DesiredCapacity int32
// PreTerminateCmd is the external process that needs to be run before terminating an instance in this ASG
PreTerminateCmd *string
}
// extractDesiredASG takes in a separator-separated string of asgname and desired capacity, and returns a DesiredASG pointer
-func extractDesiredASG(asgItem string, separator string, defaultDesired *int64, preTerminateCmd *string) (*DesiredASG, error) {
+func extractDesiredASG(asgItem string, separator string, defaultDesired *int32, preTerminateCmd *string) (*DesiredASG, error) {
asgItems := strings.Split(asgItem, separator)
- var desiredCapacity int64
- var err error
+ var desiredCapacity int32
if len(asgItems) > 2 || (defaultDesired == nil && len(asgItems) == 1) {
return nil, errors.Errorf("Error parsing '%s'. Must be in format '%s%s%s'", asgItem, "ASG-NAME", separator, "1")
} else if len(asgItems) == 2 {
- desiredCapacity, err = strconv.ParseInt(asgItems[1], 10, 64)
+ dcraw, err := strconv.ParseInt(asgItems[1], 10, 32)
if err != nil {
- return nil, errors.Errorf("Error parsing '%s' from ASG Item '%s' as int64", asgItems[1], asgItem)
+ return nil, errors.Errorf("Error parsing '%s' from ASG Item '%s' as int32", asgItems[1], asgItem)
}
+ desiredCapacity = int32(dcraw)
} else {
desiredCapacity = *defaultDesired
}
diff --git a/bouncer/instance.go b/bouncer/instance.go
index d00af76c..2b1e7bad 100644
--- a/bouncer/instance.go
+++ b/bouncer/instance.go
@@ -15,10 +15,11 @@
package bouncer
import (
+ "context"
"time"
- "github.com/aws/aws-sdk-go/service/autoscaling"
- "github.com/aws/aws-sdk-go/service/ec2"
+ at "github.com/aws/aws-sdk-go-v2/service/autoscaling/types"
+ et "github.com/aws/aws-sdk-go-v2/service/ec2/types"
"github.com/palantir/bouncer/aws"
"github.com/pkg/errors"
log "github.com/sirupsen/logrus"
@@ -26,49 +27,41 @@ import (
// Instance tracks the AWS representations of an EC2 instance as well as the metadata we care about it
type Instance struct {
- EC2Instance *ec2.Instance
- ASGInstance *autoscaling.Instance
- AutoscalingGroup *autoscaling.Group
+ EC2Instance *et.Instance
+ ASGInstance *at.Instance
+ AutoscalingGroup *at.AutoScalingGroup
IsOld bool
IsHealthy bool
PreTerminateCmd *string
}
// NewInstance returns a new bouncer.Instance object
-func NewInstance(ac *aws.Clients, asg *autoscaling.Group, asgInst *autoscaling.Instance, force bool, startTime time.Time, preTerminateCmd *string) (*Instance, error) {
- var ec2Inst *ec2.Instance
- err := retry(apiRetryCount, apiRetrySleep, func() (err error) {
- ec2Inst, err = ac.ASGInstToEC2Inst(asgInst)
- return
- })
+func NewInstance(ctx context.Context, ac *aws.Clients, asg *at.AutoScalingGroup, asgInst at.Instance, force bool, startTime time.Time, preTerminateCmd *string) (*Instance, error) {
+ ec2Inst, err := ac.ASGInstToEC2Inst(ctx, asgInst)
if err != nil {
return nil, errors.Wrapf(err, "error converting ASG Inst to EC2 inst for %s", *asgInst.InstanceId)
}
lts := ac.GetLaunchTemplateSpec(asg)
- var ec2LTplVersion *string
- err = retry(apiRetryCount, apiRetrySleep, func() (err error) {
- ec2LTplVersion, err = ac.ASGLTplVersionToEC2LTplVersion(lts)
- return
- })
+ ec2LTplVersion, err := ac.ASGLTplVersionToEC2LTplVersion(ctx, lts)
if err != nil {
return nil, errors.Wrapf(err, "error resolving LaunchTemplate %s Version to actual version number", *lts.LaunchTemplateId)
}
inst := Instance{
EC2Instance: ec2Inst,
- ASGInstance: asgInst,
+ ASGInstance: &asgInst,
AutoscalingGroup: asg,
- IsOld: isInstanceOld(asgInst, ec2Inst, asg.LaunchConfigurationName, lts, ec2LTplVersion, force, startTime),
- IsHealthy: isInstanceHealthy(asgInst, ec2Inst),
+ IsOld: isInstanceOld(&asgInst, ec2Inst, asg.LaunchConfigurationName, lts, ec2LTplVersion, force, startTime),
+ IsHealthy: isInstanceHealthy(&asgInst, ec2Inst),
PreTerminateCmd: preTerminateCmd,
}
return &inst, nil
}
-func isInstanceOld(asgInst *autoscaling.Instance, ec2Inst *ec2.Instance, asgLCName *string, asgLT *autoscaling.LaunchTemplateSpecification, asgLTVer *string, force bool, startTime time.Time) bool {
+func isInstanceOld(asgInst *at.Instance, ec2Inst *et.Instance, asgLCName *string, asgLT *at.LaunchTemplateSpecification, asgLTVer *string, force bool, startTime time.Time) bool {
if asgLCName != nil {
// This machine is using LaunchConfigs
@@ -138,17 +131,33 @@ func isInstanceOld(asgInst *autoscaling.Instance, ec2Inst *ec2.Instance, asgLCNa
}
}
+ log.WithFields(log.Fields{
+ "InstanceID": *asgInst.InstanceId,
+ }).Debug("Instance marked as new")
+
return false
}
-func isInstanceHealthy(asgInst *autoscaling.Instance, ec2Inst *ec2.Instance) bool {
- if *ec2Inst.State.Name != "running" {
+func isInstanceHealthy(asgInst *at.Instance, ec2Inst *et.Instance) bool {
+ if ec2Inst.State.Name != et.InstanceStateNameRunning {
+ log.WithFields(log.Fields{
+ "InstanceID": *asgInst.InstanceId,
+ "Instance State": ec2Inst.State.Name,
+ }).Debug("Instance marked as unhealthy because of ec2 instance state")
return false
}
- if *asgInst.LifecycleState != "InService" {
+ if asgInst.LifecycleState != at.LifecycleStateInService {
+ log.WithFields(log.Fields{
+ "InstanceID": *asgInst.InstanceId,
+ "Lifecycle State": asgInst.LifecycleState,
+ }).Debug("Instance marked as unhealthy because of ASG lifecycle state")
return false
}
+ log.WithFields(log.Fields{
+ "InstanceID": *asgInst.InstanceId,
+ }).Debug("Instance marked as healthy")
+
return true
}
diff --git a/bouncer/instance_test.go b/bouncer/instance_test.go
index 82b63e88..f6b51f5f 100644
--- a/bouncer/instance_test.go
+++ b/bouncer/instance_test.go
@@ -18,9 +18,9 @@ import (
"testing"
"time"
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/service/autoscaling"
- "github.com/aws/aws-sdk-go/service/ec2"
+ "github.com/aws/aws-sdk-go-v2/aws"
+ at "github.com/aws/aws-sdk-go-v2/service/autoscaling/types"
+ et "github.com/aws/aws-sdk-go-v2/service/ec2/types"
"github.com/stretchr/testify/assert"
)
@@ -29,21 +29,21 @@ func TestIsOldLogic(t *testing.T) {
startTime := time.Now()
var isOld bool
var zeroTime time.Time
- var asgInst autoscaling.Instance
+ var asgInst at.Instance
- ec2Inst := &ec2.Instance{
+ ec2Inst := &et.Instance{
LaunchTime: &zeroTime,
}
iid := "i-123456789abcdefgh"
- lts := &autoscaling.LaunchTemplateSpecification{
+ lts := &at.LaunchTemplateSpecification{
LaunchTemplateId: aws.String("lt-123456789abcdefgh"),
LaunchTemplateName: aws.String("test-launch-template"),
Version: aws.String("1"),
}
// LT instance
- asgInst = autoscaling.Instance{
+ asgInst = at.Instance{
LaunchConfigurationName: nil,
InstanceId: &iid,
LaunchTemplate: lts,
@@ -66,7 +66,7 @@ func TestIsOldLogic(t *testing.T) {
assert.True(t, isOld)
// LC Instance
- asgInst = autoscaling.Instance{
+ asgInst = at.Instance{
LaunchConfigurationName: aws.String("hi-there-1"),
InstanceId: &iid,
LaunchTemplate: nil,
diff --git a/bouncer/runner.go b/bouncer/runner.go
index 3fddc9f9..580123fd 100644
--- a/bouncer/runner.go
+++ b/bouncer/runner.go
@@ -15,12 +15,12 @@
package bouncer
import (
- "fmt"
+ "context"
"os"
"strings"
"time"
- "github.com/aws/aws-sdk-go/service/autoscaling"
+ at "github.com/aws/aws-sdk-go-v2/service/autoscaling/types"
"github.com/palantir/bouncer/aws"
"github.com/pkg/errors"
log "github.com/sirupsen/logrus"
@@ -32,7 +32,7 @@ type RunnerOpts struct {
Force bool
AsgString string
CommandString string
- DefaultCapacity *int64
+ DefaultCapacity *int32
TerminateHook string
PendingHook string
ItemTimeout time.Duration
@@ -40,45 +40,22 @@ type RunnerOpts struct {
// BaseRunner is the base struct for any runner
type BaseRunner struct {
- opts *RunnerOpts
+ Opts *RunnerOpts
startTime time.Time
awsClients *aws.Clients
asgs []*DesiredASG
- // curTimerStart is mutable - it's tracking the most recent API call that we need to time
- curTimerStart time.Time
}
const (
waitBetweenChecks = 15 * time.Second
- // Sleep time and number of times to retry non-destructive AWS API calls
- apiRetryCount = 10
- apiRetrySleep = 10 * time.Second
asgSeparator = ","
desiredCapSeparator = ":"
)
-func retry(attempts int, sleep time.Duration, callback func() error) (err error) {
- for i := 0; ; i++ {
- err = callback()
- if err == nil {
- return
- }
-
- if i >= (attempts - 1) {
- break
- }
-
- time.Sleep(sleep)
-
- log.Warn(errors.Wrap(err, "found error, retrying"))
- }
- return errors.Wrapf(err, "error persists after %v tries", attempts)
-}
-
// NewBaseRunner instantiates a BaseRunner
-func NewBaseRunner(opts *RunnerOpts) (*BaseRunner, error) {
- awsClients, err := aws.GetAWSClients()
+func NewBaseRunner(ctx context.Context, opts *RunnerOpts) (*BaseRunner, error) {
+ awsClients, err := aws.GetAWSClients(ctx)
if err != nil {
return nil, errors.Wrap(err, "Error getting AWS Creds")
}
@@ -89,11 +66,10 @@ func NewBaseRunner(opts *RunnerOpts) (*BaseRunner, error) {
}
r := BaseRunner{
- opts: opts,
- startTime: time.Now(),
- awsClients: awsClients,
- asgs: asgs,
- curTimerStart: time.Now(),
+ Opts: opts,
+ startTime: time.Now(),
+ awsClients: awsClients,
+ asgs: asgs,
}
return &r, nil
@@ -132,72 +108,73 @@ func getASGList(opts *RunnerOpts) ([]*DesiredASG, error) {
}
func (r *BaseRunner) noopCheck() {
- if r.opts.Noop {
+ if r.Opts.Noop {
log.Warn("NOOP only - not actually performing previous action, and exiting script with success")
os.Exit(0)
}
}
-func (r *BaseRunner) abandonLifecycle(inst *Instance, hook *string) error {
+func (r *BaseRunner) abandonLifecycle(ctx context.Context, inst *Instance, hook *string) error {
log.WithFields(log.Fields{
"InstanceID": *inst.ASGInstance.InstanceId,
"Hook": *hook,
- "LifecycleState": *inst.ASGInstance.LifecycleState,
+ "LifecycleState": inst.ASGInstance.LifecycleState,
}).Warn("Issuing ABANDON to hook instead of terminating")
result := "ABANDON"
- r.resetTimeout()
r.noopCheck()
- err := r.awsClients.CompleteLifecycleAction(inst.AutoscalingGroup.AutoScalingGroupName, inst.ASGInstance.InstanceId, hook, &result)
+ err := r.awsClients.CompleteLifecycleAction(ctx, inst.AutoscalingGroup.AutoScalingGroupName, inst.ASGInstance.InstanceId, hook, &result)
return errors.Wrap(err, "error completing lifecycle action")
}
// KillInstance calls TerminateInstanceInAutoscalingGroup, or, if the instance is stuck
// in a lifecycle hook, issues an ABANDON to it, killing it more forcefully
-func (r *BaseRunner) KillInstance(inst *Instance, decrement *bool) error {
+func (r *BaseRunner) KillInstance(ctx context.Context, inst *Instance, decrement *bool) error {
log.WithFields(log.Fields{
"ASG": *inst.AutoscalingGroup.AutoScalingGroupName,
"InstanceID": *inst.ASGInstance.InstanceId,
}).Info("Picked instance to die next")
var hook string
- if *inst.ASGInstance.LifecycleState == autoscaling.LifecycleStatePendingWait {
- hook = r.opts.PendingHook
+ if inst.ASGInstance.LifecycleState == at.LifecycleStatePendingWait {
+ hook = r.Opts.PendingHook
}
- if *inst.ASGInstance.LifecycleState == autoscaling.LifecycleStateTerminatingWait {
- hook = r.opts.TerminateHook
+ if inst.ASGInstance.LifecycleState == at.LifecycleStateTerminatingWait {
+ hook = r.Opts.TerminateHook
}
if hook != "" {
- err := r.abandonLifecycle(inst, &hook)
+ err := r.abandonLifecycle(ctx, inst, &hook)
return errors.Wrapf(err, "error abandoning hook %s", hook)
}
if inst.PreTerminateCmd != nil {
- err := r.executeExternalCommand(*inst.PreTerminateCmd)
+ err := r.executeExternalCommand(ctx, *inst.PreTerminateCmd)
if err != nil {
return errors.Wrap(err, "error executing pre-terminate command")
}
}
- err := r.terminateInstanceInASG(inst, decrement)
+ err := r.terminateInstanceInASG(ctx, inst, decrement)
return errors.Wrap(err, "error terminating instance")
}
-func (r *BaseRunner) terminateInstanceInASG(inst *Instance, decrement *bool) error {
+func (r *BaseRunner) terminateInstanceInASG(ctx context.Context, inst *Instance, decrement *bool) error {
log.WithFields(log.Fields{
"ASG": *inst.AutoscalingGroup.AutoScalingGroupName,
"InstanceID": *inst.ASGInstance.InstanceId,
}).Info("Terminating instance")
- r.resetTimeout()
r.noopCheck()
- return r.awsClients.TerminateInstanceInASG(inst.ASGInstance.InstanceId, decrement)
+
+ err := r.awsClients.TerminateInstanceInASG(ctx, inst.ASGInstance.InstanceId, decrement)
+
+ return err
}
// SetDesiredCapacity Updates desired capacity of ASG
// This function should only be used to increase desired cap, not decrease, since AWS
// will _always_ remove instances based on AZ before any other criteria
// http://docs.aws.amazon.com/autoscaling/latest/userguide/as-instance-termination.html
-func (r *BaseRunner) SetDesiredCapacity(asg *ASG, desiredCapacity *int64) error {
+func (r *BaseRunner) SetDesiredCapacity(ctx context.Context, asg *ASG, desiredCapacity *int32) error {
log.WithFields(log.Fields{
"ASG": *asg.ASG.AutoScalingGroupName,
@@ -206,51 +183,39 @@ func (r *BaseRunner) SetDesiredCapacity(asg *ASG, desiredCapacity *int64) error
}).Info("Changing desired capacity")
r.noopCheck()
- r.resetTimeout()
- err := r.awsClients.SetDesiredCapacity(asg.ASG, desiredCapacity)
- return errors.Wrap(err, "error setting desired capacity of ASG")
-}
-
-// TimedOut returns whether we've hit our runner's timeout or not
-// This is based on curTimerStart, so call SetcurTimerStart whenever a new call is made
-// that should be timed
-func (r *BaseRunner) TimedOut() bool {
- curTime := time.Now()
-
- timeout := r.curTimerStart.Add(r.opts.ItemTimeout)
-
- log.WithFields(log.Fields{
- "Current Time": getHumanShortTime(curTime),
- "Timeout Time": getHumanShortTime(timeout),
- }).Debug("Checking if we're at timeout")
+ err := r.awsClients.SetDesiredCapacity(ctx, asg.ASG, desiredCapacity)
- return curTime.After(timeout)
+ return errors.Wrapf(err, "error setting desired capacity of ASG")
}
-func getHumanShortTime(t time.Time) string {
- zonename, _ := t.In(time.Local).Zone()
- human := fmt.Sprintf("%02v:%02v:%02v %s", t.Hour(), t.Minute(), t.Second(), zonename)
- return human
+// NewContext generates a context with the ItemTimeout from the parent context given
+func (r *BaseRunner) NewContext(ctx context.Context) (context.Context, context.CancelFunc) {
+ return context.WithTimeout(ctx, r.Opts.ItemTimeout)
}
-// resetTimeout sets curTimerStart to the current time, so call this
-// after making a new AWS API call that should restart the timer with respect to the timeout
-func (r *BaseRunner) resetTimeout() {
- now := time.Now()
- log.WithFields(log.Fields{
- "Last timer reset": getHumanShortTime(r.curTimerStart),
- "Time elapsed since last reset": now.Sub(r.curTimerStart),
- }).Debug("Resetting timer")
- r.curTimerStart = now
+// ResetAndSleep resets our context timer (because we just performed a mutation action), and then sleeps
+func (r *BaseRunner) ResetAndSleep(ctx context.Context) (context.Context, context.CancelFunc) {
+ log.Debugf("Resetting timer")
+
+ ctx, cancel := r.NewContext(ctx)
+ r.Sleep(ctx)
+
+ return ctx, cancel
}
// Sleep makes us sleep for the constant time - call this when waiting for an AWS change
-func (r *BaseRunner) Sleep() {
+func (r *BaseRunner) Sleep(ctx context.Context) {
log.Debugf("Sleeping for %v", waitBetweenChecks)
- time.Sleep(waitBetweenChecks)
+
+ select {
+ case <-time.After(waitBetweenChecks):
+ return
+ case <-ctx.Done():
+ log.Fatal("timeout exceeded, something is probably wrong with the rollout")
+ }
}
// NewASGSet returns an ASGSet pointer
-func (r *BaseRunner) NewASGSet() (*ASGSet, error) {
- return newASGSet(r.awsClients, r.asgs, r.opts.Force, r.startTime)
+func (r *BaseRunner) NewASGSet(ctx context.Context) (*ASGSet, error) {
+ return newASGSet(ctx, r.awsClients, r.asgs, r.Opts.Force, r.startTime)
}
diff --git a/canary/runner.go b/canary/runner.go
index 98551d64..143bb73c 100644
--- a/canary/runner.go
+++ b/canary/runner.go
@@ -15,7 +15,7 @@
package canary
import (
- "os"
+ "context"
"github.com/palantir/bouncer/bouncer"
"github.com/pkg/errors"
@@ -29,8 +29,8 @@ type Runner struct {
}
// NewRunner instantiates a new canary runner
-func NewRunner(opts *bouncer.RunnerOpts) (*Runner, error) {
- br, err := bouncer.NewBaseRunner(opts)
+func NewRunner(ctx context.Context, opts *bouncer.RunnerOpts) (*Runner, error) {
+ br, err := bouncer.NewBaseRunner(ctx, opts)
if err != nil {
return nil, errors.Wrap(err, "error getting base runner")
}
@@ -41,18 +41,18 @@ func NewRunner(opts *bouncer.RunnerOpts) (*Runner, error) {
return &r, nil
}
-// MustValidatePrereqs checks that the batch runner is safe to proceed
-func (r *Runner) MustValidatePrereqs() {
- asgSet, err := r.NewASGSet()
+// ValidatePrereqs checks that the batch runner is safe to proceed
+func (r *Runner) ValidatePrereqs(ctx context.Context) error {
+ asgSet, err := r.NewASGSet(ctx)
if err != nil {
- log.Fatal(errors.Wrap(err, "error building actualASG"))
+ return errors.Wrap(err, "error building actualASG")
}
if len(asgSet.ASGs) > 1 {
log.WithFields(log.Fields{
"count given": len(asgSet.ASGs),
}).Error("Canary mode supports only 1 ASG at a time")
- os.Exit(1)
+ return errors.New("error validating ASG input")
}
for _, actualAsg := range asgSet.ASGs {
@@ -62,7 +62,7 @@ func (r *Runner) MustValidatePrereqs() {
"desired_capacity given": actualAsg.DesiredASG.DesiredCapacity,
"desired_capacity actual": *actualAsg.ASG.DesiredCapacity,
}).Error("Desired capacity given must be equal to starting desired_capacity of ASG")
- os.Exit(1)
+ return errors.New("error validating ASG state")
}
if actualAsg.DesiredASG.DesiredCapacity < *actualAsg.ASG.MinSize {
@@ -72,7 +72,7 @@ func (r *Runner) MustValidatePrereqs() {
"max_size": *actualAsg.ASG.MaxSize,
"desired_capacity": actualAsg.DesiredASG.DesiredCapacity,
}).Error("Desired capacity given must be greater than or equal to min ASG size")
- os.Exit(1)
+ return errors.New("error validating ASG state")
}
if (actualAsg.DesiredASG.DesiredCapacity * 2) > *actualAsg.ASG.MaxSize {
@@ -82,30 +82,31 @@ func (r *Runner) MustValidatePrereqs() {
"max_size": *actualAsg.ASG.MaxSize,
"desired_capacity": actualAsg.DesiredASG.DesiredCapacity,
}).Error("Desired capacity given must be less than or equal to 2x max_size")
- os.Exit(1)
+ return errors.New("error validating ASG state")
}
}
+
+ return nil
}
// Run has the meat of the batch job
-func (r *Runner) Run() error {
- var newDesiredCapacity int64
+func (r *Runner) Run(ctx context.Context) error {
+ var newDesiredCapacity int32
- for {
- if r.TimedOut() {
- return errors.Errorf("timeout exceeded, something is probably wrong with rollout")
- }
+ ctx, cancel := r.NewContext(ctx)
+ defer cancel()
+ for {
// Rebuild the state of the world every iteration of the loop because instance and ASG statuses are changing
- log.Debug("Beginning new serial run check")
- asgSet, err := r.NewASGSet()
+ log.Debug("Beginning new canary run check")
+ asgSet, err := r.NewASGSet(ctx)
if err != nil {
return errors.Wrap(err, "error building ASGSet")
}
// See if we're still waiting on a change we made previously to finish or settle
if asgSet.IsTransient() {
- r.Sleep()
+ r.Sleep(ctx)
continue
}
@@ -113,8 +114,8 @@ func (r *Runner) Run() error {
asg := asgSet.ASGs[0]
curDesiredCapacity := asg.ASG.DesiredCapacity
finDesiredCapacity := &asg.DesiredASG.DesiredCapacity
- newCount := int64(len(asgSet.GetNewInstances()))
- oldCount := int64(len(asgSet.GetOldInstances()))
+ newCount := int32(len(asgSet.GetNewInstances()))
+ oldCount := int32(len(asgSet.GetOldInstances()))
if newCount == *finDesiredCapacity {
if *curDesiredCapacity == *finDesiredCapacity {
@@ -126,7 +127,7 @@ func (r *Runner) Run() error {
// Only wait for terminating instances to finish terminating once all
// terminate commands have been issued
if asgSet.IsTerminating() {
- r.Sleep()
+ r.Sleep(ctx)
continue
} else {
log.WithFields(log.Fields{
@@ -155,12 +156,13 @@ func (r *Runner) Run() error {
// Let's issue all their terminates right here
decrement := true
for _, oldInst := range asgSet.GetOldInstances() {
- err := r.KillInstance(oldInst, &decrement)
+ err := r.KillInstance(ctx, oldInst, &decrement)
if err != nil {
return errors.Wrap(err, "error killing instance")
}
}
- r.Sleep()
+ ctx, cancel = r.ResetAndSleep(ctx)
+ defer cancel()
continue
}
@@ -169,7 +171,7 @@ func (r *Runner) Run() error {
// The IsCountMismatch check is here and not where IsNewUnhealthy is, because we don't want it
// to fire when bad nodes are in the process of terminating, since we issue terminates to them one at a time
if asgSet.IsTerminating() || asgSet.IsCountMismatch() {
- r.Sleep()
+ r.Sleep(ctx)
continue
}
@@ -195,12 +197,14 @@ func (r *Runner) Run() error {
newDesiredCapacity = *curDesiredCapacity + (*finDesiredCapacity - newCount)
}
- err = r.SetDesiredCapacity(asg, &newDesiredCapacity)
+ err = r.SetDesiredCapacity(ctx, asg, &newDesiredCapacity)
if err != nil {
return errors.Wrap(err, "error setting desired capacity")
}
- r.Sleep()
+ ctx, cancel = r.ResetAndSleep(ctx)
+ defer cancel()
+
continue
}
}
diff --git a/cmd/canary.go b/cmd/canary.go
index 55a16a92..7e48293e 100644
--- a/cmd/canary.go
+++ b/cmd/canary.go
@@ -15,6 +15,8 @@
package cmd
import (
+ "context"
+
"github.com/palantir/bouncer/bouncer"
"github.com/palantir/bouncer/canary"
"github.com/pkg/errors"
@@ -63,14 +65,21 @@ var canaryCmd = &cobra.Command{
ItemTimeout: timeout,
}
- r, err := canary.NewRunner(&opts)
+ ctx, cancel := context.WithCancel(context.Background())
+ defer cancel()
+ log.RegisterExitHandler(cancel)
+
+ r, err := canary.NewRunner(ctx, &opts)
if err != nil {
log.Fatal(errors.Wrap(err, "error initializing runner"))
}
- r.MustValidatePrereqs()
+ err = r.ValidatePrereqs(ctx)
+ if err != nil {
+ log.Fatal(err)
+ }
- err = r.Run()
+ err = r.Run(ctx)
if err != nil {
log.Fatal(errors.Wrap(err, "error in run"))
}
diff --git a/cmd/full.go b/cmd/full.go
index 96a1c310..6c52cec6 100644
--- a/cmd/full.go
+++ b/cmd/full.go
@@ -15,6 +15,8 @@
package cmd
import (
+ "context"
+
"github.com/palantir/bouncer/bouncer"
"github.com/palantir/bouncer/full"
"github.com/pkg/errors"
@@ -52,8 +54,7 @@ var fullCmd = &cobra.Command{
log.Info("Beginning bouncer full run")
- var defCap int64
- defCap = 1
+ var defCap int32 = 1
opts := bouncer.RunnerOpts{
Noop: noop,
Force: force,
@@ -65,14 +66,21 @@ var fullCmd = &cobra.Command{
ItemTimeout: timeout,
}
- r, err := full.NewRunner(&opts)
+ ctx, cancel := context.WithCancel(context.Background())
+ defer cancel()
+ log.RegisterExitHandler(cancel)
+
+ r, err := full.NewRunner(ctx, &opts)
if err != nil {
log.Fatal(errors.Wrap(err, "error initializing runner"))
}
- r.MustValidatePrereqs()
+ err = r.ValidatePrereqs(ctx)
+ if err != nil {
+ log.Fatal(err)
+ }
- err = r.Run()
+ err = r.Run(ctx)
if err != nil {
log.Fatal(errors.Wrap(err, "error in run"))
}
diff --git a/cmd/rolling.go b/cmd/rolling.go
index c48a309e..4844d0b3 100644
--- a/cmd/rolling.go
+++ b/cmd/rolling.go
@@ -15,6 +15,8 @@
package cmd
import (
+ "context"
+
"github.com/palantir/bouncer/bouncer"
"github.com/palantir/bouncer/rolling"
"github.com/pkg/errors"
@@ -52,8 +54,7 @@ var rollingCmd = &cobra.Command{
log.Info("Beginning bouncer rolling run")
- var defCap int64
- defCap = 1
+ var defCap int32 = 1
opts := bouncer.RunnerOpts{
Noop: noop,
Force: force,
@@ -65,14 +66,21 @@ var rollingCmd = &cobra.Command{
ItemTimeout: timeout,
}
- r, err := rolling.NewRunner(&opts)
+ ctx, cancel := context.WithCancel(context.Background())
+ defer cancel()
+ log.RegisterExitHandler(cancel)
+
+ r, err := rolling.NewRunner(ctx, &opts)
if err != nil {
log.Fatal(errors.Wrap(err, "error initializing runner"))
}
- r.MustValidatePrereqs()
+ err = r.ValidatePrereqs(ctx)
+ if err != nil {
+ log.Fatal(err)
+ }
- err = r.Run()
+ err = r.Run(ctx)
if err != nil {
log.Fatal(errors.Wrap(err, "error in run"))
}
diff --git a/cmd/serial.go b/cmd/serial.go
index f897e21b..d3028dee 100644
--- a/cmd/serial.go
+++ b/cmd/serial.go
@@ -15,6 +15,8 @@
package cmd
import (
+ "context"
+
"github.com/palantir/bouncer/bouncer"
"github.com/palantir/bouncer/serial"
"github.com/pkg/errors"
@@ -52,8 +54,7 @@ var serialCmd = &cobra.Command{
log.Info("Beginning bouncer serial run")
- var defCap int64
- defCap = 1
+ var defCap int32 = 1
opts := bouncer.RunnerOpts{
Noop: noop,
Force: force,
@@ -65,14 +66,21 @@ var serialCmd = &cobra.Command{
ItemTimeout: timeout,
}
- r, err := serial.NewRunner(&opts)
+ ctx, cancel := context.WithCancel(context.Background())
+ defer cancel()
+ log.RegisterExitHandler(cancel)
+
+ r, err := serial.NewRunner(ctx, &opts)
if err != nil {
log.Fatal(errors.Wrap(err, "error initializing runner"))
}
- r.MustValidatePrereqs()
+ err = r.ValidatePrereqs(ctx)
+ if err != nil {
+ log.Fatal(err)
+ }
- err = r.Run()
+ err = r.Run(ctx)
if err != nil {
log.Fatal(errors.Wrap(err, "error in run"))
}
diff --git a/cmd/slow-canary.go b/cmd/slow-canary.go
index 1e8c3fd1..adca4320 100644
--- a/cmd/slow-canary.go
+++ b/cmd/slow-canary.go
@@ -15,6 +15,8 @@
package cmd
import (
+ "context"
+
"github.com/palantir/bouncer/bouncer"
"github.com/palantir/bouncer/slowcanary"
"github.com/pkg/errors"
@@ -63,14 +65,21 @@ var slowCanaryCmd = &cobra.Command{
ItemTimeout: timeout,
}
- r, err := slowcanary.NewRunner(&opts)
+ ctx, cancel := context.WithCancel(context.Background())
+ defer cancel()
+ log.RegisterExitHandler(cancel)
+
+ r, err := slowcanary.NewRunner(ctx, &opts)
if err != nil {
log.Fatal(errors.Wrap(err, "error initializing runner"))
}
- r.MustValidatePrereqs()
+ err = r.ValidatePrereqs(ctx)
+ if err != nil {
+ log.Fatal(err)
+ }
- err = r.Run()
+ err = r.Run(ctx)
if err != nil {
log.Fatal(errors.Wrap(err, "error in run"))
}
diff --git a/full/runner.go b/full/runner.go
index bfdb3fea..1d4f9fa9 100644
--- a/full/runner.go
+++ b/full/runner.go
@@ -15,7 +15,7 @@
package full
import (
- "os"
+ "context"
"github.com/palantir/bouncer/bouncer"
"github.com/pkg/errors"
@@ -29,8 +29,8 @@ type Runner struct {
}
// NewRunner instantiates a new full runner
-func NewRunner(opts *bouncer.RunnerOpts) (*Runner, error) {
- br, err := bouncer.NewBaseRunner(opts)
+func NewRunner(ctx context.Context, opts *bouncer.RunnerOpts) (*Runner, error) {
+ br, err := bouncer.NewBaseRunner(ctx, opts)
if err != nil {
return nil, errors.Wrap(err, "error getting base runner")
}
@@ -41,11 +41,11 @@ func NewRunner(opts *bouncer.RunnerOpts) (*Runner, error) {
return &r, nil
}
-// MustValidatePrereqs checks that the batch runner is safe to proceed
-func (r *Runner) MustValidatePrereqs() {
- asgSet, err := r.NewASGSet()
+// ValidatePrereqs checks that the batch runner is safe to proceed
+func (r *Runner) ValidatePrereqs(ctx context.Context) error {
+ asgSet, err := r.NewASGSet(ctx)
if err != nil {
- log.Fatal(errors.Wrap(err, "error building ASGSet"))
+ return errors.Wrap(err, "error building ASGSet")
}
divergedASGs := asgSet.GetDivergedASGs()
@@ -57,7 +57,7 @@ func (r *Runner) MustValidatePrereqs() {
"desired_capacity given": badASG.DesiredASG.DesiredCapacity,
}).Error("ASG desired capacity doesn't match expected starting value")
}
- os.Exit(1)
+ return errors.New("error validating initial ASG state")
}
for _, asg := range asgSet.ASGs {
@@ -65,7 +65,7 @@ func (r *Runner) MustValidatePrereqs() {
log.WithFields(log.Fields{
"ASG": *asg.ASG.AutoScalingGroupName,
}).Warn("ASG desired capacity is 0 - nothing to do here")
- os.Exit(0)
+ return errors.New("error validating initial ASG state")
}
if *asg.ASG.MinSize != 0 {
@@ -73,9 +73,11 @@ func (r *Runner) MustValidatePrereqs() {
"ASG": *asg.ASG.AutoScalingGroupName,
"min_size": *asg.ASG.MinSize,
}).Error("ASG min size must equal 0")
- os.Exit(1)
+ return errors.New("error validating initial ASG state")
}
}
+
+ return nil
}
func reverseASGSetOrder(asg []*bouncer.ASG) []*bouncer.ASG {
@@ -98,25 +100,24 @@ func asgSetWrapper(asg *bouncer.ASG) *bouncer.ASGSet {
}
// Run has the meat of the batch job
-func (r *Runner) Run() error {
- var newDesiredCapacity int64
+func (r *Runner) Run(ctx context.Context) error {
+ var newDesiredCapacity int32
+
+ ctx, cancel := r.NewContext(ctx)
+ defer cancel()
start:
for {
- if r.TimedOut() {
- return errors.Errorf("timeout exceeded, something is probably wrong with rollout")
- }
-
// Rebuild the state of the world every iteration of the loop because instance and ASG statuses are changing
log.Debug("Beginning new full run check")
- asgSet, err := r.NewASGSet()
+ asgSet, err := r.NewASGSet(ctx)
if err != nil {
return errors.Wrap(err, "error building ASGSet")
}
// See if we're still waiting on a change we made previously to finish or settle
if asgSet.IsTransient() {
- r.Sleep()
+ r.Sleep(ctx)
continue
}
@@ -126,11 +127,14 @@ start:
if set.IsOldInstance() {
decrement := true
- err := r.KillInstance(set.GetBestOldInstance(), &decrement)
+ err := r.KillInstance(ctx, set.GetBestOldInstance(), &decrement)
if err != nil {
return errors.Wrap(err, "failed to kill instance")
}
- r.Sleep()
+
+ ctx, cancel = r.ResetAndSleep(ctx)
+ defer cancel()
+
continue start
}
}
@@ -141,11 +145,14 @@ start:
if *asg.ASG.DesiredCapacity < asg.DesiredASG.DesiredCapacity {
newDesiredCapacity = *asg.ASG.DesiredCapacity + 1
- err = r.SetDesiredCapacity(asg, &newDesiredCapacity)
+ err = r.SetDesiredCapacity(ctx, asg, &newDesiredCapacity)
if err != nil {
return errors.Wrap(err, "error setting desired capacity")
}
- r.Sleep()
+
+ ctx, cancel = r.ResetAndSleep(ctx)
+ defer cancel()
+
continue start
}
}
diff --git a/full/runner_test.go b/full/runner_test.go
index 16cc5531..3a625727 100644
--- a/full/runner_test.go
+++ b/full/runner_test.go
@@ -18,7 +18,7 @@ import (
"fmt"
"testing"
- "github.com/aws/aws-sdk-go/service/autoscaling"
+ at "github.com/aws/aws-sdk-go-v2/service/autoscaling/types"
"github.com/palantir/bouncer/bouncer"
"github.com/stretchr/testify/assert"
)
@@ -29,7 +29,7 @@ func asgSliceTestConstructor(len int) []*bouncer.ASG {
for i := 0; i < len; i++ {
name := fmt.Sprintf("asg-%v", i)
asgs = append(asgs, &bouncer.ASG{
- ASG: &autoscaling.Group{
+ ASG: &at.AutoScalingGroup{
AutoScalingGroupName: &name,
},
})
diff --git a/go.mod b/go.mod
index 22381bad..8c021235 100644
--- a/go.mod
+++ b/go.mod
@@ -3,7 +3,10 @@ module github.com/palantir/bouncer
go 1.16
require (
- github.com/aws/aws-sdk-go v1.40.53
+ github.com/aws/aws-sdk-go-v2 v1.9.1
+ github.com/aws/aws-sdk-go-v2/config v1.8.2
+ github.com/aws/aws-sdk-go-v2/service/autoscaling v1.12.1
+ github.com/aws/aws-sdk-go-v2/service/ec2 v1.18.0
github.com/go-playground/universal-translator v0.18.0 // indirect
github.com/leodido/go-urn v1.2.1 // indirect
github.com/pkg/errors v0.9.1
diff --git a/go.sum b/go.sum
index 1c72578e..5c53749a 100644
--- a/go.sum
+++ b/go.sum
@@ -51,8 +51,28 @@ github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hC
github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY=
github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=
github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=
-github.com/aws/aws-sdk-go v1.40.53 h1:wi4UAslOQ1HfF2NjnIwI6st8n7sQg7shUUNLkaCgIpc=
-github.com/aws/aws-sdk-go v1.40.53/go.mod h1:585smgzpB/KqRA+K3y/NL/oYRqQvpNJYvLm+LY1U59Q=
+github.com/aws/aws-sdk-go-v2 v1.9.1 h1:ZbovGV/qo40nrOJ4q8G33AGICzaPI45FHQWJ9650pF4=
+github.com/aws/aws-sdk-go-v2 v1.9.1/go.mod h1:cK/D0BBs0b/oWPIcX/Z/obahJK1TT7IPVjy53i/mX/4=
+github.com/aws/aws-sdk-go-v2/config v1.8.2 h1:Dqy4ySXFmulRmZhfynm/5CD4Y6aXiTVhDtXLIuUe/r0=
+github.com/aws/aws-sdk-go-v2/config v1.8.2/go.mod h1:r0bkX9NyuCuf28qVcsEMtpAQibT7gA1Q0gzkjvgJdLU=
+github.com/aws/aws-sdk-go-v2/credentials v1.4.2 h1:8kVE4Og6wlhVrMGiORQ3p9gRj2exjzhFRB+QzWBUa5Q=
+github.com/aws/aws-sdk-go-v2/credentials v1.4.2/go.mod h1:9Sp6u121/f0NnvHyhG7dgoYeUTEFC2vsvJqJ6wXpkaI=
+github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.5.1 h1:Nm+BxqBtT0r+AnD6byGMCGT4Km0QwHBy8mAYptNPXY4=
+github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.5.1/go.mod h1:W1ldHfsgeGlKpJ4xZMKZUI6Wmp6EAstU7PxnhbXWWrI=
+github.com/aws/aws-sdk-go-v2/internal/ini v1.2.3 h1:NnXJXUz7oihrSlPKEM0yZ19b+7GQ47MX/LluLlEyE/Y=
+github.com/aws/aws-sdk-go-v2/internal/ini v1.2.3/go.mod h1:EES9ToeC3h063zCFDdqWGnARExNdULPaBvARm1FLwxA=
+github.com/aws/aws-sdk-go-v2/service/autoscaling v1.12.1 h1:Teuw3X3UppglTn8we8zzv7xMGDA+VnfzX118NbMZ0N8=
+github.com/aws/aws-sdk-go-v2/service/autoscaling v1.12.1/go.mod h1:thQWh7EBKSb+FIGx0NkYJWMkSk0NF6jcD/LD8BTlFwM=
+github.com/aws/aws-sdk-go-v2/service/ec2 v1.18.0 h1:5wWtSfYRWgkpKKMW4yJ5llzI9s24Fls7Pv7uw2BiYbk=
+github.com/aws/aws-sdk-go-v2/service/ec2 v1.18.0/go.mod h1:d8R2f1hFcknkA3MW4SeExwEua2KpR+dhSrwWlnlwe5Q=
+github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.3.1 h1:APEjhKZLFlNVLATnA/TJyA+w1r/xd5r5ACWBDZ9aIvc=
+github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.3.1/go.mod h1:Ve+eJOx9UWaT/lMVebnFhDhO49fSLVedHoA82+Rqme0=
+github.com/aws/aws-sdk-go-v2/service/sso v1.4.1 h1:RfgQyv3bFT2Js6XokcrNtTjQ6wAVBRpoCgTFsypihHA=
+github.com/aws/aws-sdk-go-v2/service/sso v1.4.1/go.mod h1:ycPdbJZlM0BLhuBnd80WX9PucWPG88qps/2jl9HugXs=
+github.com/aws/aws-sdk-go-v2/service/sts v1.7.1 h1:7ce9ugapSgBapwLhg7AJTqKW5U92VRX3vX65k2tsB+g=
+github.com/aws/aws-sdk-go-v2/service/sts v1.7.1/go.mod h1:r1i8QwKPzwByXqZb3POQfBs7jozrdnHz8PVbsvyx73w=
+github.com/aws/smithy-go v1.8.0 h1:AEwwwXQZtUwP5Mz506FeXXrKBe0jA8gVM+1gEcSRooc=
+github.com/aws/smithy-go v1.8.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E=
github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=
github.com/bketelsen/crypt v0.0.4/go.mod h1:aI6NrJ0pMGgvZKL1iVgXLnfIFJtfV+bKCoqOes/6LfM=
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
@@ -138,6 +158,7 @@ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ=
github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
@@ -395,7 +416,6 @@ golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v
golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc=
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
-golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
@@ -552,6 +572,7 @@ golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE=
google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M=
diff --git a/rolling/runner.go b/rolling/runner.go
index aca368cf..5af4831c 100644
--- a/rolling/runner.go
+++ b/rolling/runner.go
@@ -15,7 +15,7 @@
package rolling
import (
- "os"
+ "context"
"github.com/palantir/bouncer/bouncer"
"github.com/pkg/errors"
@@ -28,8 +28,8 @@ type Runner struct {
}
// NewRunner instantiates a new rolling runner
-func NewRunner(opts *bouncer.RunnerOpts) (*Runner, error) {
- br, err := bouncer.NewBaseRunner(opts)
+func NewRunner(ctx context.Context, opts *bouncer.RunnerOpts) (*Runner, error) {
+ br, err := bouncer.NewBaseRunner(ctx, opts)
if err != nil {
return nil, errors.Wrap(err, "error getting base runner")
}
@@ -40,18 +40,18 @@ func NewRunner(opts *bouncer.RunnerOpts) (*Runner, error) {
return &r, nil
}
-func (r *Runner) killBestOldInstance(asgSet *bouncer.ASGSet) error {
+func (r *Runner) killBestOldInstance(ctx context.Context, asgSet *bouncer.ASGSet) error {
bestOld := asgSet.GetBestOldInstance()
decrement := false
- err := r.KillInstance(bestOld, &decrement)
+ err := r.KillInstance(ctx, bestOld, &decrement)
return errors.Wrap(err, "error killing instance")
}
-// MustValidatePrereqs checks that the batch runner is safe to proceed
-func (r *Runner) MustValidatePrereqs() {
- asgSet, err := r.NewASGSet()
+// ValidatePrereqs checks that the batch runner is safe to proceed
+func (r *Runner) ValidatePrereqs(ctx context.Context) error {
+ asgSet, err := r.NewASGSet(ctx)
if err != nil {
- log.Fatal(errors.Wrap(err, "error building ASGSet"))
+ return errors.Wrap(err, "error building ASGSet")
}
divergedASGs := asgSet.GetDivergedASGs()
@@ -63,7 +63,7 @@ func (r *Runner) MustValidatePrereqs() {
"desired_capacity given": badASG.DesiredASG.DesiredCapacity,
}).Error("ASG desired capacity doesn't match expected starting value")
}
- os.Exit(1)
+ return errors.New("error validating initial ASG state")
}
for _, asg := range asgSet.ASGs {
@@ -71,39 +71,42 @@ func (r *Runner) MustValidatePrereqs() {
log.WithFields(log.Fields{
"ASG": *asg.ASG.AutoScalingGroupName,
}).Warn("ASG desired capacity is 0 - nothing to do here")
- os.Exit(0)
+ return errors.New("error validating initial ASG state")
}
}
+
+ return nil
}
// Run has the meat of the batch job
-func (r *Runner) Run() error {
- for {
- if r.TimedOut() {
- return errors.Errorf("timeout exceeded, something is probably wrong with rollout")
- }
+func (r *Runner) Run(ctx context.Context) error {
+ ctx, cancel := r.NewContext(ctx)
+ defer cancel()
+ for {
// Rebuild the state of the world every iteration of the loop because instance and ASG statuses are changing
log.Debug("Beginning new rolling run check")
- asgSet, err := r.NewASGSet()
+ asgSet, err := r.NewASGSet(ctx)
if err != nil {
return errors.Wrap(err, "error building ASGSet")
}
// See if we're still waiting on a change we made previously to finish or settle
if asgSet.IsTransient() {
- r.Sleep()
+ r.Sleep(ctx)
continue
}
// If there are any old instances which are now ready to be terminated, let's do it
if asgSet.IsOldInstance() {
- err = r.killBestOldInstance(asgSet)
+ err = r.killBestOldInstance(ctx, asgSet)
if err != nil {
return errors.Wrap(err, "error finding or killing best old instance")
}
- r.Sleep()
+ ctx, cancel = r.ResetAndSleep(ctx)
+ defer cancel()
+
continue
}
diff --git a/serial/runner.go b/serial/runner.go
index 6e4d64a2..bf1fd308 100644
--- a/serial/runner.go
+++ b/serial/runner.go
@@ -15,7 +15,7 @@
package serial
import (
- "os"
+ "context"
"github.com/palantir/bouncer/bouncer"
"github.com/pkg/errors"
@@ -28,8 +28,8 @@ type Runner struct {
}
// NewRunner instantiates a new serial runner
-func NewRunner(opts *bouncer.RunnerOpts) (*Runner, error) {
- br, err := bouncer.NewBaseRunner(opts)
+func NewRunner(ctx context.Context, opts *bouncer.RunnerOpts) (*Runner, error) {
+ br, err := bouncer.NewBaseRunner(ctx, opts)
if err != nil {
return nil, errors.Wrap(err, "error getting base runner")
}
@@ -40,18 +40,18 @@ func NewRunner(opts *bouncer.RunnerOpts) (*Runner, error) {
return &r, nil
}
-func (r *Runner) killBestOldInstance(asgSet *bouncer.ASGSet) error {
+func (r *Runner) killBestOldInstance(ctx context.Context, asgSet *bouncer.ASGSet) error {
bestOld := asgSet.GetBestOldInstance()
decrement := true
- err := r.KillInstance(bestOld, &decrement)
+ err := r.KillInstance(ctx, bestOld, &decrement)
return errors.Wrap(err, "error killing instance")
}
-// MustValidatePrereqs checks that the batch runner is safe to proceed
-func (r *Runner) MustValidatePrereqs() {
- asgSet, err := r.NewASGSet()
+// ValidatePrereqs checks that the batch runner is safe to proceed
+func (r *Runner) ValidatePrereqs(ctx context.Context) error {
+ asgSet, err := r.NewASGSet(ctx)
if err != nil {
- log.Fatal(errors.Wrap(err, "error building ASGSet"))
+ return errors.Wrap(err, "error building ASGSet")
}
divergedASGs := asgSet.GetDivergedASGs()
@@ -63,7 +63,7 @@ func (r *Runner) MustValidatePrereqs() {
"desired_capacity given": badASG.DesiredASG.DesiredCapacity,
}).Error("ASG desired capacity doesn't match expected starting value")
}
- os.Exit(1)
+ return errors.New("error validating initial ASG state")
}
for _, asg := range asgSet.ASGs {
@@ -71,7 +71,7 @@ func (r *Runner) MustValidatePrereqs() {
log.WithFields(log.Fields{
"ASG": *asg.ASG.AutoScalingGroupName,
}).Warn("ASG desired capacity is 0 - nothing to do here")
- os.Exit(0)
+ return errors.New("error validating initial ASG state")
}
if *asg.ASG.DesiredCapacity == *asg.ASG.MinSize {
@@ -80,53 +80,58 @@ func (r *Runner) MustValidatePrereqs() {
"desired_capacity": *asg.ASG.DesiredCapacity,
"min_size": *asg.ASG.MinSize,
}).Error("ASG desired capacity must be at least 1 higher than the min size, but they're equal")
- os.Exit(1)
+ return errors.New("error validating initial ASG state")
}
}
+
+ return nil
}
// Run has the meat of the batch job
-func (r *Runner) Run() error {
- for {
- if r.TimedOut() {
- return errors.Errorf("timeout exceeded, something is probably wrong with rollout")
- }
+func (r *Runner) Run(ctx context.Context) error {
+ ctx, cancel := r.NewContext(ctx)
+ defer cancel()
+ for {
// Rebuild the state of the world every iteration of the loop because instance and ASG statuses are changing
log.Debug("Beginning new serial run check")
- asgSet, err := r.NewASGSet()
+ asgSet, err := r.NewASGSet(ctx)
if err != nil {
return errors.Wrap(err, "error building ASGSet")
}
// See if we're still waiting on a change we made previously to finish or settle
if asgSet.IsTransient() {
- r.Sleep()
+ r.Sleep(ctx)
continue
}
// See if anyone's desired capacity needs to be reset, and fix it if so (then sleep so it propagates)
divergedASGs := asgSet.GetDivergedASGs()
for _, asg := range divergedASGs {
- err := r.SetDesiredCapacity(asg, &asg.DesiredASG.DesiredCapacity)
+ err := r.SetDesiredCapacity(ctx, asg, &asg.DesiredASG.DesiredCapacity)
if err != nil {
return errors.Wrap(err, "error setting desired capacity of ASG")
}
}
if len(divergedASGs) != 0 {
- r.Sleep()
+ ctx, cancel = r.ResetAndSleep(ctx)
+ defer cancel()
+
continue
}
// If there are any old instances which are now ready to be terminated, let's do it
if asgSet.IsOldInstance() {
- err = r.killBestOldInstance(asgSet)
+ err = r.killBestOldInstance(ctx, asgSet)
if err != nil {
return errors.Wrap(err, "error finding or killing best old instance")
}
- r.Sleep()
+ ctx, cancel = r.ResetAndSleep(ctx)
+ defer cancel()
+
continue
}
diff --git a/slowcanary/runner.go b/slowcanary/runner.go
index 8a536393..4eee2562 100644
--- a/slowcanary/runner.go
+++ b/slowcanary/runner.go
@@ -15,7 +15,7 @@
package slowcanary
import (
- "os"
+ "context"
"github.com/palantir/bouncer/bouncer"
"github.com/pkg/errors"
@@ -29,8 +29,8 @@ type Runner struct {
}
// NewRunner instantiates a new slow-canary runner
-func NewRunner(opts *bouncer.RunnerOpts) (*Runner, error) {
- br, err := bouncer.NewBaseRunner(opts)
+func NewRunner(ctx context.Context, opts *bouncer.RunnerOpts) (*Runner, error) {
+ br, err := bouncer.NewBaseRunner(ctx, opts)
if err != nil {
return nil, errors.Wrap(err, "error getting base runner")
}
@@ -41,18 +41,18 @@ func NewRunner(opts *bouncer.RunnerOpts) (*Runner, error) {
return &r, nil
}
-// MustValidatePrereqs checks that the batch runner is safe to proceed
-func (r *Runner) MustValidatePrereqs() {
- asgSet, err := r.NewASGSet()
+// ValidatePrereqs checks that the batch runner is safe to proceed
+func (r *Runner) ValidatePrereqs(ctx context.Context) error {
+ asgSet, err := r.NewASGSet(ctx)
if err != nil {
- log.Fatal(errors.Wrap(err, "error building actualASG"))
+ return errors.Wrap(err, "error building actualASG")
}
if len(asgSet.ASGs) > 1 {
log.WithFields(log.Fields{
"count given": len(asgSet.ASGs),
}).Error("Slow-canary mode supports only 1 ASG at a time")
- os.Exit(1)
+ return errors.New("error validating initial ASG state")
}
for _, actualAsg := range asgSet.ASGs {
@@ -62,7 +62,7 @@ func (r *Runner) MustValidatePrereqs() {
"desired_capacity given": actualAsg.DesiredASG.DesiredCapacity,
"desired_capacity actual": *actualAsg.ASG.DesiredCapacity,
}).Error("Desired capacity given must be equal to starting desired_capacity of ASG")
- os.Exit(1)
+ return errors.New("error validating initial ASG state")
}
if actualAsg.DesiredASG.DesiredCapacity < *actualAsg.ASG.MinSize {
@@ -72,7 +72,7 @@ func (r *Runner) MustValidatePrereqs() {
"max_size": *actualAsg.ASG.MaxSize,
"desired_capacity": actualAsg.DesiredASG.DesiredCapacity,
}).Error("Desired capacity given must be greater than or equal to min ASG size")
- os.Exit(1)
+ return errors.New("error validating initial ASG state")
}
if (actualAsg.DesiredASG.DesiredCapacity + 1) > *actualAsg.ASG.MaxSize {
@@ -82,29 +82,30 @@ func (r *Runner) MustValidatePrereqs() {
"max_size": *actualAsg.ASG.MaxSize,
"desired_capacity": actualAsg.DesiredASG.DesiredCapacity,
}).Error("Max capacity set on ASG must be at least 1 + desired")
- os.Exit(1)
+ return errors.New("error validating initial ASG state")
}
}
+
+ return nil
}
// Run has the meat of the batch job
-func (r *Runner) Run() error {
- var newDesiredCapacity int64
+func (r *Runner) Run(ctx context.Context) error {
+ var newDesiredCapacity int32
- for {
- if r.TimedOut() {
- return errors.Errorf("timeout exceeded, something is probably wrong with rollout")
- }
+ ctx, cancel := r.NewContext(ctx)
+ defer cancel()
+ for {
// Rebuild the state of the world every iteration of the loop because instance and ASG statuses are changing
log.Debug("Beginning new slow-canary run check")
- asgSet, err := r.NewASGSet()
+ asgSet, err := r.NewASGSet(ctx)
if err != nil {
return errors.Wrap(err, "error building ASGSet")
}
if asgSet.IsTransient() {
- r.Sleep()
+ r.Sleep(ctx)
continue
}
@@ -112,8 +113,8 @@ func (r *Runner) Run() error {
asg := asgSet.ASGs[0]
curDesiredCapacity := asg.ASG.DesiredCapacity
finDesiredCapacity := &asg.DesiredASG.DesiredCapacity
- newCount := int64(len(asgSet.GetNewInstances()))
- oldCount := int64(len(asgSet.GetOldInstances()))
+ newCount := int32(len(asgSet.GetNewInstances()))
+ oldCount := int32(len(asgSet.GetOldInstances()))
if *curDesiredCapacity == *finDesiredCapacity {
if oldCount == 0 {
@@ -126,12 +127,14 @@ func (r *Runner) Run() error {
}).Info("Adding slow-canary node")
newDesiredCapacity = *curDesiredCapacity + 1
- err = r.SetDesiredCapacity(asg, &newDesiredCapacity)
+ err = r.SetDesiredCapacity(ctx, asg, &newDesiredCapacity)
if err != nil {
return errors.Wrap(err, "error setting desired capacity")
}
- r.Sleep()
+ ctx, cancel = r.ResetAndSleep(ctx)
+ defer cancel()
+
continue
} else if *curDesiredCapacity == *finDesiredCapacity+1 {
if oldCount == 0 {
@@ -152,11 +155,13 @@ func (r *Runner) Run() error {
}).Info("Killing the last old node, so not letting AWS replace it")
decrement := true
oldInstances := asgSet.GetOldInstances()
- err := r.KillInstance(oldInstances[0], &decrement)
+ err := r.KillInstance(ctx, oldInstances[0], &decrement)
if err != nil {
return errors.Wrap(err, "error killing instance")
}
- r.Sleep()
+
+ ctx, cancel = r.ResetAndSleep(ctx)
+ defer cancel()
continue
}
@@ -167,11 +172,13 @@ func (r *Runner) Run() error {
}).Info("Killing an old node, and letting AWS replace it")
decrement := false
oldInstances := asgSet.GetOldInstances()
- err := r.KillInstance(oldInstances[0], &decrement)
+ err := r.KillInstance(ctx, oldInstances[0], &decrement)
if err != nil {
return errors.Wrap(err, "error killing instance")
}
- r.Sleep()
+
+ ctx, cancel = r.ResetAndSleep(ctx)
+ defer cancel()
continue
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/.gitignore b/vendor/github.com/aws/aws-sdk-go-v2/.gitignore
new file mode 100644
index 00000000..18719daa
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/.gitignore
@@ -0,0 +1,11 @@
+dist
+/doc
+/doc-staging
+.yardoc
+Gemfile.lock
+/internal/awstesting/integration/smoke/**/importmarker__.go
+/internal/awstesting/integration/smoke/_test/
+/vendor
+/private/model/cli/gen-api/gen-api
+.gradle/
+build/
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/.golangci.toml b/vendor/github.com/aws/aws-sdk-go-v2/.golangci.toml
new file mode 100644
index 00000000..75e33885
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/.golangci.toml
@@ -0,0 +1,27 @@
+[run]
+concurrency = 4
+timeout = "1m"
+issues-exit-code = 0
+modules-download-mode = "readonly"
+allow-parallel-runners = true
+skip-dirs = ["internal/repotools"]
+skip-dirs-use-default = true
+
+[output]
+format = "github-actions"
+
+[linters-settings.cyclop]
+skip-tests = false
+
+[linters-settings.errcheck]
+check-blank = true
+
+[linters]
+disable-all = true
+enable = ["errcheck"]
+fast = false
+
+[issues]
+exclude-use-default = false
+
+# Refer config definitions at https://golangci-lint.run/usage/configuration/#config-file
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/.travis.yml b/vendor/github.com/aws/aws-sdk-go-v2/.travis.yml
new file mode 100644
index 00000000..4b498a7a
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/.travis.yml
@@ -0,0 +1,31 @@
+language: go
+sudo: true
+dist: bionic
+
+branches:
+ only:
+ - main
+
+os:
+ - linux
+ - osx
+ # Travis doesn't work with windows and Go tip
+ #- windows
+
+go:
+ - tip
+
+matrix:
+ allow_failures:
+ - go: tip
+
+before_install:
+ - if [ "$TRAVIS_OS_NAME" = "windows" ]; then choco install make; fi
+ - (cd /tmp/; go get golang.org/x/lint/golint)
+
+env:
+ - EACHMODULE_CONCURRENCY=4
+
+script:
+ - make ci-test-no-generate;
+
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/CHANGELOG.md
new file mode 100644
index 00000000..7b7e5a5e
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/CHANGELOG.md
@@ -0,0 +1,1937 @@
+# Release (2021-09-17)
+
+## General Highlights
+* **Dependency Update**: Updated to the latest SDK module versions
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/chime`: [v1.10.0](service/chime/CHANGELOG.md#v1100-2021-09-17)
+ * **Feature**: Updated API client and endpoints to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/cloudformation`: [v1.10.1](service/cloudformation/CHANGELOG.md#v1101-2021-09-17)
+ * **Documentation**: Updated API client documentation.
+* `github.com/aws/aws-sdk-go-v2/service/comprehend`: [v1.7.0](service/comprehend/CHANGELOG.md#v170-2021-09-17)
+ * **Feature**: Updated API client and endpoints to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.17.0](service/ec2/CHANGELOG.md#v1170-2021-09-17)
+ * **Feature**: Updated API client and endpoints to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/ecr`: [v1.6.0](service/ecr/CHANGELOG.md#v160-2021-09-17)
+ * **Feature**: Updated API client and endpoints to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/iot`: [v1.12.0](service/iot/CHANGELOG.md#v1120-2021-09-17)
+ * **Feature**: Updated API client and endpoints to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/kafkaconnect`: [v1.0.0](service/kafkaconnect/CHANGELOG.md#v100-2021-09-17)
+ * **Release**: New AWS service client module
+* `github.com/aws/aws-sdk-go-v2/service/lexmodelsv2`: [v1.7.0](service/lexmodelsv2/CHANGELOG.md#v170-2021-09-17)
+ * **Feature**: Updated API client and endpoints to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/lexruntimev2`: [v1.4.0](service/lexruntimev2/CHANGELOG.md#v140-2021-09-17)
+ * **Feature**: Updated API client and endpoints to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/macie2`: [v1.10.0](service/macie2/CHANGELOG.md#v1100-2021-09-17)
+ * **Feature**: Updated API client and endpoints to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/mediapackagevod`: [v1.8.0](service/mediapackagevod/CHANGELOG.md#v180-2021-09-17)
+ * **Feature**: Updated API client and endpoints to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/networkfirewall`: [v1.6.0](service/networkfirewall/CHANGELOG.md#v160-2021-09-17)
+ * **Feature**: Updated API client and endpoints to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/pinpoint`: [v1.7.0](service/pinpoint/CHANGELOG.md#v170-2021-09-17)
+ * **Feature**: Updated API client and endpoints to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/quicksight`: [v1.11.0](service/quicksight/CHANGELOG.md#v1110-2021-09-17)
+ * **Feature**: Updated API client and endpoints to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/rds`: [v1.9.0](service/rds/CHANGELOG.md#v190-2021-09-17)
+ * **Feature**: Updated API client and endpoints to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/robomaker`: [v1.9.0](service/robomaker/CHANGELOG.md#v190-2021-09-17)
+ * **Feature**: Updated API client and endpoints to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/s3`: [v1.16.0](service/s3/CHANGELOG.md#v1160-2021-09-17)
+ * **Feature**: Updated API client and endpoints to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/sagemaker`: [v1.15.0](service/sagemaker/CHANGELOG.md#v1150-2021-09-17)
+ * **Feature**: Updated API client and endpoints to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/ssooidc`: [v1.5.0](service/ssooidc/CHANGELOG.md#v150-2021-09-17)
+ * **Feature**: Updated API client and endpoints to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/transcribe`: [v1.8.0](service/transcribe/CHANGELOG.md#v180-2021-09-17)
+ * **Feature**: Updated API client and endpoints to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/wafv2`: [v1.9.0](service/wafv2/CHANGELOG.md#v190-2021-09-17)
+ * **Feature**: Updated API client and endpoints to latest revision.
+
+# Release (2021-09-10)
+
+## General Highlights
+* **Dependency Update**: Updated to the latest SDK module versions
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/credentials`: [v1.4.1](credentials/CHANGELOG.md#v141-2021-09-10)
+ * **Documentation**: Fixes the AssumeRoleProvider's documentation for using custom TokenProviders.
+* `github.com/aws/aws-sdk-go-v2/service/amp`: [v1.5.0](service/amp/CHANGELOG.md#v150-2021-09-10)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/braket`: [v1.7.0](service/braket/CHANGELOG.md#v170-2021-09-10)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/chimesdkidentity`: [v1.2.0](service/chimesdkidentity/CHANGELOG.md#v120-2021-09-10)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/chimesdkmessaging`: [v1.2.0](service/chimesdkmessaging/CHANGELOG.md#v120-2021-09-10)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/codegurureviewer`: [v1.7.0](service/codegurureviewer/CHANGELOG.md#v170-2021-09-10)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/eks`: [v1.10.0](service/eks/CHANGELOG.md#v1100-2021-09-10)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/elasticache`: [v1.11.0](service/elasticache/CHANGELOG.md#v1110-2021-09-10)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/emr`: [v1.9.0](service/emr/CHANGELOG.md#v190-2021-09-10)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/forecast`: [v1.10.0](service/forecast/CHANGELOG.md#v1100-2021-09-10)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/frauddetector`: [v1.9.0](service/frauddetector/CHANGELOG.md#v190-2021-09-10)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/kafka`: [v1.7.0](service/kafka/CHANGELOG.md#v170-2021-09-10)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/lookoutequipment`: [v1.4.0](service/lookoutequipment/CHANGELOG.md#v140-2021-09-10)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/mediapackage`: [v1.8.0](service/mediapackage/CHANGELOG.md#v180-2021-09-10)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/opensearch`: [v1.0.0](service/opensearch/CHANGELOG.md#v100-2021-09-10)
+ * **Release**: New AWS service client module
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/outposts`: [v1.8.0](service/outposts/CHANGELOG.md#v180-2021-09-10)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/ram`: [v1.7.0](service/ram/CHANGELOG.md#v170-2021-09-10)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/sagemaker`: [v1.14.0](service/sagemaker/CHANGELOG.md#v1140-2021-09-10)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/servicediscovery`: [v1.9.0](service/servicediscovery/CHANGELOG.md#v190-2021-09-10)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/ssmcontacts`: [v1.5.0](service/ssmcontacts/CHANGELOG.md#v150-2021-09-10)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/xray`: [v1.6.0](service/xray/CHANGELOG.md#v160-2021-09-10)
+ * **Feature**: API client updated
+
+# Release (2021-09-02)
+
+## General Highlights
+* **Dependency Update**: Updated to the latest SDK module versions
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/config`: [v1.8.0](config/CHANGELOG.md#v180-2021-09-02)
+ * **Feature**: Add support for S3 Multi-Region Access Point ARNs.
+* `github.com/aws/aws-sdk-go-v2/service/accessanalyzer`: [v1.7.0](service/accessanalyzer/CHANGELOG.md#v170-2021-09-02)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/acmpca`: [v1.8.0](service/acmpca/CHANGELOG.md#v180-2021-09-02)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/cloud9`: [v1.8.0](service/cloud9/CHANGELOG.md#v180-2021-09-02)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/cloudformation`: [v1.10.0](service/cloudformation/CHANGELOG.md#v1100-2021-09-02)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/cloudtrail`: [v1.6.0](service/cloudtrail/CHANGELOG.md#v160-2021-09-02)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/codebuild`: [v1.10.0](service/codebuild/CHANGELOG.md#v1100-2021-09-02)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/computeoptimizer`: [v1.9.0](service/computeoptimizer/CHANGELOG.md#v190-2021-09-02)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/configservice`: [v1.9.0](service/configservice/CHANGELOG.md#v190-2021-09-02)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/ebs`: [v1.7.0](service/ebs/CHANGELOG.md#v170-2021-09-02)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.16.0](service/ec2/CHANGELOG.md#v1160-2021-09-02)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/efs`: [v1.7.0](service/efs/CHANGELOG.md#v170-2021-09-02)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/emr`: [v1.8.0](service/emr/CHANGELOG.md#v180-2021-09-02)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/firehose`: [v1.6.0](service/firehose/CHANGELOG.md#v160-2021-09-02)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/frauddetector`: [v1.8.0](service/frauddetector/CHANGELOG.md#v180-2021-09-02)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/fsx`: [v1.9.0](service/fsx/CHANGELOG.md#v190-2021-09-02)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/internal/s3shared`: [v1.7.0](service/internal/s3shared/CHANGELOG.md#v170-2021-09-02)
+ * **Feature**: Add support for S3 Multi-Region Access Point ARNs.
+* `github.com/aws/aws-sdk-go-v2/service/iot`: [v1.11.0](service/iot/CHANGELOG.md#v1110-2021-09-02)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/iotjobsdataplane`: [v1.5.0](service/iotjobsdataplane/CHANGELOG.md#v150-2021-09-02)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/ivs`: [v1.7.0](service/ivs/CHANGELOG.md#v170-2021-09-02)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/kms`: [v1.6.0](service/kms/CHANGELOG.md#v160-2021-09-02)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/lexmodelbuildingservice`: [v1.9.0](service/lexmodelbuildingservice/CHANGELOG.md#v190-2021-09-02)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/mediatailor`: [v1.7.0](service/mediatailor/CHANGELOG.md#v170-2021-09-02)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/memorydb`: [v1.2.0](service/memorydb/CHANGELOG.md#v120-2021-09-02)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/mwaa`: [v1.5.0](service/mwaa/CHANGELOG.md#v150-2021-09-02)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/polly`: [v1.6.0](service/polly/CHANGELOG.md#v160-2021-09-02)
+ * **Feature**: API client updated
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/quicksight`: [v1.10.0](service/quicksight/CHANGELOG.md#v1100-2021-09-02)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/s3`: [v1.15.0](service/s3/CHANGELOG.md#v1150-2021-09-02)
+ * **Feature**: API client updated
+ * **Feature**: Add support for S3 Multi-Region Access Point ARNs.
+* `github.com/aws/aws-sdk-go-v2/service/s3control`: [v1.11.0](service/s3control/CHANGELOG.md#v1110-2021-09-02)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/sagemakerruntime`: [v1.7.0](service/sagemakerruntime/CHANGELOG.md#v170-2021-09-02)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/schemas`: [v1.6.0](service/schemas/CHANGELOG.md#v160-2021-09-02)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/securityhub`: [v1.10.0](service/securityhub/CHANGELOG.md#v1100-2021-09-02)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/servicecatalogappregistry`: [v1.5.0](service/servicecatalogappregistry/CHANGELOG.md#v150-2021-09-02)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/sqs`: [v1.9.0](service/sqs/CHANGELOG.md#v190-2021-09-02)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/ssmincidents`: [v1.4.0](service/ssmincidents/CHANGELOG.md#v140-2021-09-02)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/transfer`: [v1.7.0](service/transfer/CHANGELOG.md#v170-2021-09-02)
+ * **Feature**: API client updated
+
+# Release (2021-08-27)
+
+## General Highlights
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/credentials`: [v1.4.0](credentials/CHANGELOG.md#v140-2021-08-27)
+ * **Feature**: Adds support for Tags and TransitiveTagKeys to stscreds.AssumeRoleProvider. Closes https://github.com/aws/aws-sdk-go-v2/issues/723
+* `github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue`: [v1.2.0](feature/dynamodb/attributevalue/CHANGELOG.md#v120-2021-08-27)
+ * **Bug Fix**: Fix unmarshaler's decoding of AttributeValueMemberN into a type that is a string alias.
+* `github.com/aws/aws-sdk-go-v2/service/acmpca`: [v1.7.0](service/acmpca/CHANGELOG.md#v170-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/amplify`: [v1.5.0](service/amplify/CHANGELOG.md#v150-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/amplifybackend`: [v1.4.0](service/amplifybackend/CHANGELOG.md#v140-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/apigateway`: [v1.7.0](service/apigateway/CHANGELOG.md#v170-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/apigatewaymanagementapi`: [v1.4.0](service/apigatewaymanagementapi/CHANGELOG.md#v140-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/appflow`: [v1.7.0](service/appflow/CHANGELOG.md#v170-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/applicationinsights`: [v1.4.0](service/applicationinsights/CHANGELOG.md#v140-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/apprunner`: [v1.2.0](service/apprunner/CHANGELOG.md#v120-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/appstream`: [v1.6.0](service/appstream/CHANGELOG.md#v160-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/appsync`: [v1.6.0](service/appsync/CHANGELOG.md#v160-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/athena`: [v1.6.0](service/athena/CHANGELOG.md#v160-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/auditmanager`: [v1.8.0](service/auditmanager/CHANGELOG.md#v180-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/autoscalingplans`: [v1.5.0](service/autoscalingplans/CHANGELOG.md#v150-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/backup`: [v1.5.0](service/backup/CHANGELOG.md#v150-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/batch`: [v1.7.0](service/batch/CHANGELOG.md#v170-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/braket`: [v1.6.0](service/braket/CHANGELOG.md#v160-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/chimesdkidentity`: [v1.1.0](service/chimesdkidentity/CHANGELOG.md#v110-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/chimesdkmessaging`: [v1.1.0](service/chimesdkmessaging/CHANGELOG.md#v110-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/cloudtrail`: [v1.5.0](service/cloudtrail/CHANGELOG.md#v150-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/cloudwatchevents`: [v1.6.0](service/cloudwatchevents/CHANGELOG.md#v160-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/codeartifact`: [v1.5.0](service/codeartifact/CHANGELOG.md#v150-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/codebuild`: [v1.9.0](service/codebuild/CHANGELOG.md#v190-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/codecommit`: [v1.4.0](service/codecommit/CHANGELOG.md#v140-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/codeguruprofiler`: [v1.5.0](service/codeguruprofiler/CHANGELOG.md#v150-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/codestarnotifications`: [v1.4.0](service/codestarnotifications/CHANGELOG.md#v140-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/cognitoidentity`: [v1.5.0](service/cognitoidentity/CHANGELOG.md#v150-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider`: [v1.6.0](service/cognitoidentityprovider/CHANGELOG.md#v160-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/comprehend`: [v1.6.0](service/comprehend/CHANGELOG.md#v160-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/computeoptimizer`: [v1.8.0](service/computeoptimizer/CHANGELOG.md#v180-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/connectcontactlens`: [v1.5.0](service/connectcontactlens/CHANGELOG.md#v150-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/customerprofiles`: [v1.9.0](service/customerprofiles/CHANGELOG.md#v190-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/databasemigrationservice`: [v1.7.0](service/databasemigrationservice/CHANGELOG.md#v170-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/datasync`: [v1.6.0](service/datasync/CHANGELOG.md#v160-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/dax`: [v1.4.0](service/dax/CHANGELOG.md#v140-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/directoryservice`: [v1.5.0](service/directoryservice/CHANGELOG.md#v150-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/dlm`: [v1.5.0](service/dlm/CHANGELOG.md#v150-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/dynamodbstreams`: [v1.4.0](service/dynamodbstreams/CHANGELOG.md#v140-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.15.0](service/ec2/CHANGELOG.md#v1150-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/ecrpublic`: [v1.5.0](service/ecrpublic/CHANGELOG.md#v150-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/efs`: [v1.6.0](service/efs/CHANGELOG.md#v160-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/eks`: [v1.9.0](service/eks/CHANGELOG.md#v190-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/emrcontainers`: [v1.6.0](service/emrcontainers/CHANGELOG.md#v160-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/eventbridge`: [v1.7.0](service/eventbridge/CHANGELOG.md#v170-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/finspace`: [v1.2.0](service/finspace/CHANGELOG.md#v120-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/finspacedata`: [v1.2.0](service/finspacedata/CHANGELOG.md#v120-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/firehose`: [v1.5.0](service/firehose/CHANGELOG.md#v150-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/fms`: [v1.7.0](service/fms/CHANGELOG.md#v170-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/forecast`: [v1.9.0](service/forecast/CHANGELOG.md#v190-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/forecastquery`: [v1.4.0](service/forecastquery/CHANGELOG.md#v140-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/frauddetector`: [v1.7.0](service/frauddetector/CHANGELOG.md#v170-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/fsx`: [v1.8.0](service/fsx/CHANGELOG.md#v180-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/gamelift`: [v1.6.0](service/gamelift/CHANGELOG.md#v160-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/glue`: [v1.11.0](service/glue/CHANGELOG.md#v1110-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/groundstation`: [v1.6.0](service/groundstation/CHANGELOG.md#v160-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/guardduty`: [v1.5.0](service/guardduty/CHANGELOG.md#v150-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/health`: [v1.7.0](service/health/CHANGELOG.md#v170-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/healthlake`: [v1.6.0](service/healthlake/CHANGELOG.md#v160-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/iot`: [v1.10.0](service/iot/CHANGELOG.md#v1100-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/iot1clickdevicesservice`: [v1.4.0](service/iot1clickdevicesservice/CHANGELOG.md#v140-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/iotanalytics`: [v1.5.0](service/iotanalytics/CHANGELOG.md#v150-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/iotdataplane`: [v1.4.0](service/iotdataplane/CHANGELOG.md#v140-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/iotfleethub`: [v1.5.0](service/iotfleethub/CHANGELOG.md#v150-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/iotsitewise`: [v1.11.0](service/iotsitewise/CHANGELOG.md#v1110-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/ivs`: [v1.6.0](service/ivs/CHANGELOG.md#v160-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/lakeformation`: [v1.5.0](service/lakeformation/CHANGELOG.md#v150-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/lexmodelsv2`: [v1.6.0](service/lexmodelsv2/CHANGELOG.md#v160-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/lexruntimev2`: [v1.3.0](service/lexruntimev2/CHANGELOG.md#v130-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/licensemanager`: [v1.7.0](service/licensemanager/CHANGELOG.md#v170-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/lightsail`: [v1.10.0](service/lightsail/CHANGELOG.md#v1100-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/lookoutequipment`: [v1.3.0](service/lookoutequipment/CHANGELOG.md#v130-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/lookoutmetrics`: [v1.3.0](service/lookoutmetrics/CHANGELOG.md#v130-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/macie2`: [v1.9.0](service/macie2/CHANGELOG.md#v190-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/mediaconvert`: [v1.10.0](service/mediaconvert/CHANGELOG.md#v1100-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/mediapackage`: [v1.7.0](service/mediapackage/CHANGELOG.md#v170-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/mediapackagevod`: [v1.7.0](service/mediapackagevod/CHANGELOG.md#v170-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/mq`: [v1.5.0](service/mq/CHANGELOG.md#v150-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/networkfirewall`: [v1.5.0](service/networkfirewall/CHANGELOG.md#v150-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/outposts`: [v1.7.0](service/outposts/CHANGELOG.md#v170-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/pi`: [v1.6.0](service/pi/CHANGELOG.md#v160-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/pinpointsmsvoice`: [v1.4.0](service/pinpointsmsvoice/CHANGELOG.md#v140-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/polly`: [v1.5.0](service/polly/CHANGELOG.md#v150-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/qldb`: [v1.6.0](service/qldb/CHANGELOG.md#v160-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/qldbsession`: [v1.5.0](service/qldbsession/CHANGELOG.md#v150-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/ram`: [v1.6.0](service/ram/CHANGELOG.md#v160-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/rekognition`: [v1.8.0](service/rekognition/CHANGELOG.md#v180-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/resourcegroupstaggingapi`: [v1.5.0](service/resourcegroupstaggingapi/CHANGELOG.md#v150-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/robomaker`: [v1.8.0](service/robomaker/CHANGELOG.md#v180-2021-08-27)
+ * **Bug Fix**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/route53recoverycontrolconfig`: [v1.1.0](service/route53recoverycontrolconfig/CHANGELOG.md#v110-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/route53resolver`: [v1.7.0](service/route53resolver/CHANGELOG.md#v170-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/s3`: [v1.14.0](service/s3/CHANGELOG.md#v1140-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/s3control`: [v1.10.0](service/s3control/CHANGELOG.md#v1100-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/s3outposts`: [v1.5.0](service/s3outposts/CHANGELOG.md#v150-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/servicecatalog`: [v1.5.0](service/servicecatalog/CHANGELOG.md#v150-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/servicecatalogappregistry`: [v1.4.0](service/servicecatalogappregistry/CHANGELOG.md#v140-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/signer`: [v1.5.0](service/signer/CHANGELOG.md#v150-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/ssooidc`: [v1.4.0](service/ssooidc/CHANGELOG.md#v140-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/storagegateway`: [v1.6.0](service/storagegateway/CHANGELOG.md#v160-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/synthetics`: [v1.6.0](service/synthetics/CHANGELOG.md#v160-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/textract`: [v1.5.0](service/textract/CHANGELOG.md#v150-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/transcribe`: [v1.7.0](service/transcribe/CHANGELOG.md#v170-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/transfer`: [v1.6.0](service/transfer/CHANGELOG.md#v160-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/wafregional`: [v1.5.0](service/wafregional/CHANGELOG.md#v150-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+
+# Release (2021-08-19)
+
+## General Highlights
+* **Dependency Update**: Updated to the latest SDK module versions
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/apigateway`: [v1.6.0](service/apigateway/CHANGELOG.md#v160-2021-08-19)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/apigatewayv2`: [v1.5.0](service/apigatewayv2/CHANGELOG.md#v150-2021-08-19)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/appflow`: [v1.6.0](service/appflow/CHANGELOG.md#v160-2021-08-19)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/applicationautoscaling`: [v1.5.0](service/applicationautoscaling/CHANGELOG.md#v150-2021-08-19)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/cloud9`: [v1.6.0](service/cloud9/CHANGELOG.md#v160-2021-08-19)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/clouddirectory`: [v1.4.0](service/clouddirectory/CHANGELOG.md#v140-2021-08-19)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs`: [v1.6.0](service/cloudwatchlogs/CHANGELOG.md#v160-2021-08-19)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/codebuild`: [v1.8.0](service/codebuild/CHANGELOG.md#v180-2021-08-19)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/configservice`: [v1.7.0](service/configservice/CHANGELOG.md#v170-2021-08-19)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/costexplorer`: [v1.8.0](service/costexplorer/CHANGELOG.md#v180-2021-08-19)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/customerprofiles`: [v1.8.0](service/customerprofiles/CHANGELOG.md#v180-2021-08-19)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/databrew`: [v1.8.0](service/databrew/CHANGELOG.md#v180-2021-08-19)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/directoryservice`: [v1.4.0](service/directoryservice/CHANGELOG.md#v140-2021-08-19)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.14.0](service/ec2/CHANGELOG.md#v1140-2021-08-19)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/elasticache`: [v1.9.0](service/elasticache/CHANGELOG.md#v190-2021-08-19)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/emr`: [v1.6.0](service/emr/CHANGELOG.md#v160-2021-08-19)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/iotsitewise`: [v1.10.0](service/iotsitewise/CHANGELOG.md#v1100-2021-08-19)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/lambda`: [v1.7.0](service/lambda/CHANGELOG.md#v170-2021-08-19)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/licensemanager`: [v1.6.0](service/licensemanager/CHANGELOG.md#v160-2021-08-19)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/memorydb`: [v1.0.0](service/memorydb/CHANGELOG.md#v100-2021-08-19)
+ * **Release**: New AWS service client module
+* `github.com/aws/aws-sdk-go-v2/service/quicksight`: [v1.8.0](service/quicksight/CHANGELOG.md#v180-2021-08-19)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/route53`: [v1.10.0](service/route53/CHANGELOG.md#v1100-2021-08-19)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/route53resolver`: [v1.6.0](service/route53resolver/CHANGELOG.md#v160-2021-08-19)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/s3`: [v1.13.0](service/s3/CHANGELOG.md#v1130-2021-08-19)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/sagemaker`: [v1.12.0](service/sagemaker/CHANGELOG.md#v1120-2021-08-19)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/sagemakerruntime`: [v1.5.0](service/sagemakerruntime/CHANGELOG.md#v150-2021-08-19)
+ * **Feature**: API client updated
+
+# Release (2021-08-12)
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/feature/cloudfront/sign`: [v1.3.1](feature/cloudfront/sign/CHANGELOG.md#v131-2021-08-12)
+ * **Bug Fix**: Update to not escape HTML when encoding the policy.
+* `github.com/aws/aws-sdk-go-v2/service/athena`: [v1.5.0](service/athena/CHANGELOG.md#v150-2021-08-12)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/autoscaling`: [v1.11.0](service/autoscaling/CHANGELOG.md#v1110-2021-08-12)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/chime`: [v1.8.0](service/chime/CHANGELOG.md#v180-2021-08-12)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/chimesdkidentity`: [v1.0.0](service/chimesdkidentity/CHANGELOG.md#v100-2021-08-12)
+ * **Release**: New AWS service client module
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/chimesdkmessaging`: [v1.0.0](service/chimesdkmessaging/CHANGELOG.md#v100-2021-08-12)
+ * **Release**: New AWS service client module
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/codebuild`: [v1.7.0](service/codebuild/CHANGELOG.md#v170-2021-08-12)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/connect`: [v1.6.0](service/connect/CHANGELOG.md#v160-2021-08-12)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/ebs`: [v1.5.0](service/ebs/CHANGELOG.md#v150-2021-08-12)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/ecs`: [v1.8.0](service/ecs/CHANGELOG.md#v180-2021-08-12)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/lexmodelsv2`: [v1.5.0](service/lexmodelsv2/CHANGELOG.md#v150-2021-08-12)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/lightsail`: [v1.9.0](service/lightsail/CHANGELOG.md#v190-2021-08-12)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/nimble`: [v1.3.0](service/nimble/CHANGELOG.md#v130-2021-08-12)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/rekognition`: [v1.7.0](service/rekognition/CHANGELOG.md#v170-2021-08-12)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/route53`: [v1.9.0](service/route53/CHANGELOG.md#v190-2021-08-12)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/snowdevicemanagement`: [v1.0.0](service/snowdevicemanagement/CHANGELOG.md#v100-2021-08-12)
+ * **Release**: New AWS service client module
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/ssm`: [v1.9.0](service/ssm/CHANGELOG.md#v190-2021-08-12)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/synthetics`: [v1.5.0](service/synthetics/CHANGELOG.md#v150-2021-08-12)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/wafv2`: [v1.7.0](service/wafv2/CHANGELOG.md#v170-2021-08-12)
+ * **Feature**: API client updated
+
+# Release (2021-08-04)
+
+## General Highlights
+* **Feature**: adds error handling for defered close calls
+* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2`: v1.8.0
+ * **Bug Fix**: Corrected an issue where the retryer was not using the last attempt's ResultMetadata as the bases for the return result from the stack. ([#1345](https://github.com/aws/aws-sdk-go-v2/pull/1345))
+* `github.com/aws/aws-sdk-go-v2/feature/dynamodb/expression`: [v1.2.0](feature/dynamodb/expression/CHANGELOG.md#v120-2021-08-04)
+ * **Feature**: Add IsSet helper for ConditionBuilder and KeyConditionBuilder ([#1329](https://github.com/aws/aws-sdk-go-v2/pull/1329))
+* `github.com/aws/aws-sdk-go-v2/service/accessanalyzer`: [v1.5.2](service/accessanalyzer/CHANGELOG.md#v152-2021-08-04)
+ * **Bug Fix**: Fixed an issue that caused one or more API operations to fail when attempting to resolve the service endpoint. ([#1349](https://github.com/aws/aws-sdk-go-v2/pull/1349))
+* `github.com/aws/aws-sdk-go-v2/service/amp`: [v1.3.1](service/amp/CHANGELOG.md#v131-2021-08-04)
+ * **Bug Fix**: Fixed an issue that caused one or more API operations to fail when attempting to resolve the service endpoint. ([#1349](https://github.com/aws/aws-sdk-go-v2/pull/1349))
+* `github.com/aws/aws-sdk-go-v2/service/appintegrations`: [v1.5.0](service/appintegrations/CHANGELOG.md#v150-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/appmesh`: [v1.4.2](service/appmesh/CHANGELOG.md#v142-2021-08-04)
+ * **Bug Fix**: Fixed an issue that caused one or more API operations to fail when attempting to resolve the service endpoint. ([#1349](https://github.com/aws/aws-sdk-go-v2/pull/1349))
+* `github.com/aws/aws-sdk-go-v2/service/appsync`: [v1.5.0](service/appsync/CHANGELOG.md#v150-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/auditmanager`: [v1.7.0](service/auditmanager/CHANGELOG.md#v170-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/batch`: [v1.6.0](service/batch/CHANGELOG.md#v160-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/braket`: [v1.5.2](service/braket/CHANGELOG.md#v152-2021-08-04)
+ * **Bug Fix**: Fixed an issue that caused one or more API operations to fail when attempting to resolve the service endpoint. ([#1349](https://github.com/aws/aws-sdk-go-v2/pull/1349))
+* `github.com/aws/aws-sdk-go-v2/service/chime`: [v1.7.0](service/chime/CHANGELOG.md#v170-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/cloudformation`: [v1.8.0](service/cloudformation/CHANGELOG.md#v180-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/cloudwatch`: [v1.7.0](service/cloudwatch/CHANGELOG.md#v170-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/codebuild`: [v1.6.0](service/codebuild/CHANGELOG.md#v160-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/codeguruprofiler`: [v1.4.2](service/codeguruprofiler/CHANGELOG.md#v142-2021-08-04)
+ * **Bug Fix**: Fixed an issue that caused one or more API operations to fail when attempting to resolve the service endpoint. ([#1349](https://github.com/aws/aws-sdk-go-v2/pull/1349))
+* `github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider`: [v1.5.0](service/cognitoidentityprovider/CHANGELOG.md#v150-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/computeoptimizer`: [v1.7.0](service/computeoptimizer/CHANGELOG.md#v170-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/databrew`: [v1.7.0](service/databrew/CHANGELOG.md#v170-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/directconnect`: [v1.7.0](service/directconnect/CHANGELOG.md#v170-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.13.0](service/ec2/CHANGELOG.md#v1130-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/ecs`: [v1.7.0](service/ecs/CHANGELOG.md#v170-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2`: [v1.6.0](service/elasticloadbalancingv2/CHANGELOG.md#v160-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/emr`: [v1.5.0](service/emr/CHANGELOG.md#v150-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/emrcontainers`: [v1.5.0](service/emrcontainers/CHANGELOG.md#v150-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/eventbridge`: [v1.6.0](service/eventbridge/CHANGELOG.md#v160-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/glue`: [v1.10.0](service/glue/CHANGELOG.md#v1100-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/greengrassv2`: [v1.5.0](service/greengrassv2/CHANGELOG.md#v150-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/groundstation`: [v1.5.2](service/groundstation/CHANGELOG.md#v152-2021-08-04)
+ * **Bug Fix**: Fixed an issue that caused one or more API operations to fail when attempting to resolve the service endpoint. ([#1349](https://github.com/aws/aws-sdk-go-v2/pull/1349))
+* `github.com/aws/aws-sdk-go-v2/service/iam`: [v1.8.0](service/iam/CHANGELOG.md#v180-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/identitystore`: [v1.4.0](service/identitystore/CHANGELOG.md#v140-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/imagebuilder`: [v1.8.0](service/imagebuilder/CHANGELOG.md#v180-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/iot`: [v1.9.0](service/iot/CHANGELOG.md#v190-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/iotanalytics`: [v1.4.0](service/iotanalytics/CHANGELOG.md#v140-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/iotsitewise`: [v1.9.0](service/iotsitewise/CHANGELOG.md#v190-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/iotwireless`: [v1.8.0](service/iotwireless/CHANGELOG.md#v180-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/kendra`: [v1.10.0](service/kendra/CHANGELOG.md#v1100-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/lambda`: [v1.6.0](service/lambda/CHANGELOG.md#v160-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/lexmodelbuildingservice`: [v1.7.0](service/lexmodelbuildingservice/CHANGELOG.md#v170-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/lexmodelsv2`: [v1.4.0](service/lexmodelsv2/CHANGELOG.md#v140-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/location`: [v1.4.0](service/location/CHANGELOG.md#v140-2021-08-04)
+ * **Feature**: Updated to latest API model.
+ * **Bug Fix**: Fixed an issue that caused one or more API operations to fail when attempting to resolve the service endpoint. ([#1349](https://github.com/aws/aws-sdk-go-v2/pull/1349))
+* `github.com/aws/aws-sdk-go-v2/service/mediaconvert`: [v1.9.0](service/mediaconvert/CHANGELOG.md#v190-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/medialive`: [v1.8.0](service/medialive/CHANGELOG.md#v180-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/mgn`: [v1.3.1](service/mgn/CHANGELOG.md#v131-2021-08-04)
+ * **Bug Fix**: Fixed an issue that caused one or more API operations to fail when attempting to resolve the service endpoint. ([#1349](https://github.com/aws/aws-sdk-go-v2/pull/1349))
+* `github.com/aws/aws-sdk-go-v2/service/personalize`: [v1.7.0](service/personalize/CHANGELOG.md#v170-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/proton`: [v1.2.0](service/proton/CHANGELOG.md#v120-2021-08-04)
+ * **Feature**: Updated to latest API model.
+ * **Bug Fix**: Fixed an issue that caused one or more API operations to fail when attempting to resolve the service endpoint. ([#1349](https://github.com/aws/aws-sdk-go-v2/pull/1349))
+* `github.com/aws/aws-sdk-go-v2/service/qldb`: [v1.5.0](service/qldb/CHANGELOG.md#v150-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/quicksight`: [v1.7.0](service/quicksight/CHANGELOG.md#v170-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/rds`: [v1.7.0](service/rds/CHANGELOG.md#v170-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/redshift`: [v1.10.0](service/redshift/CHANGELOG.md#v1100-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/redshiftdata`: [v1.5.0](service/redshiftdata/CHANGELOG.md#v150-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/robomaker`: [v1.7.0](service/robomaker/CHANGELOG.md#v170-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/route53`: [v1.8.0](service/route53/CHANGELOG.md#v180-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/route53recoverycluster`: [v1.0.0](service/route53recoverycluster/CHANGELOG.md#v100-2021-08-04)
+ * **Release**: New AWS service client module
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/route53recoverycontrolconfig`: [v1.0.0](service/route53recoverycontrolconfig/CHANGELOG.md#v100-2021-08-04)
+ * **Release**: New AWS service client module
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/route53recoveryreadiness`: [v1.0.0](service/route53recoveryreadiness/CHANGELOG.md#v100-2021-08-04)
+ * **Release**: New AWS service client module
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/s3`: [v1.12.0](service/s3/CHANGELOG.md#v1120-2021-08-04)
+ * **Feature**: Add `HeadObject` presign support. ([#1346](https://github.com/aws/aws-sdk-go-v2/pull/1346))
+* `github.com/aws/aws-sdk-go-v2/service/s3control`: [v1.9.0](service/s3control/CHANGELOG.md#v190-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/s3outposts`: [v1.4.0](service/s3outposts/CHANGELOG.md#v140-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/sagemaker`: [v1.11.0](service/sagemaker/CHANGELOG.md#v1110-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/secretsmanager`: [v1.5.0](service/secretsmanager/CHANGELOG.md#v150-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/securityhub`: [v1.8.0](service/securityhub/CHANGELOG.md#v180-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/shield`: [v1.6.0](service/shield/CHANGELOG.md#v160-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/ssmcontacts`: [v1.3.0](service/ssmcontacts/CHANGELOG.md#v130-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/ssmincidents`: [v1.2.0](service/ssmincidents/CHANGELOG.md#v120-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/ssoadmin`: [v1.5.0](service/ssoadmin/CHANGELOG.md#v150-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/synthetics`: [v1.4.0](service/synthetics/CHANGELOG.md#v140-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/textract`: [v1.4.0](service/textract/CHANGELOG.md#v140-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/transcribe`: [v1.6.0](service/transcribe/CHANGELOG.md#v160-2021-08-04)
+ * **Feature**: Updated to latest API model.
+
+# Release (2021-07-15)
+
+## General Highlights
+* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/config`: [v1.5.0](config/CHANGELOG.md#v150-2021-07-15)
+ * **Feature**: Support has been added for EC2 IPv6-enabled Instance Metadata Service Endpoints.
+* `github.com/aws/aws-sdk-go-v2/feature/ec2/imds`: [v1.3.0](feature/ec2/imds/CHANGELOG.md#v130-2021-07-15)
+ * **Feature**: Support has been added for EC2 IPv6-enabled Instance Metadata Service Endpoints.
+* `github.com/aws/aws-sdk-go-v2/service/acm`: [v1.5.0](service/acm/CHANGELOG.md#v150-2021-07-15)
+ * **Feature**: Updated service model to latest version.
+* `github.com/aws/aws-sdk-go-v2/service/amp`: [v1.3.0](service/amp/CHANGELOG.md#v130-2021-07-15)
+ * **Feature**: Updated service model to latest version.
+* `github.com/aws/aws-sdk-go-v2/service/amplify`: [v1.4.0](service/amplify/CHANGELOG.md#v140-2021-07-15)
+ * **Feature**: Updated service model to latest version.
+* `github.com/aws/aws-sdk-go-v2/service/amplifybackend`: [v1.3.0](service/amplifybackend/CHANGELOG.md#v130-2021-07-15)
+ * **Feature**: Updated service model to latest version.
+* `github.com/aws/aws-sdk-go-v2/service/autoscaling`: [v1.10.0](service/autoscaling/CHANGELOG.md#v1100-2021-07-15)
+ * **Feature**: The ErrorCode method on generated service error types has been corrected to match the API model.
+* `github.com/aws/aws-sdk-go-v2/service/chime`: [v1.6.0](service/chime/CHANGELOG.md#v160-2021-07-15)
+ * **Feature**: Updated service model to latest version.
+* `github.com/aws/aws-sdk-go-v2/service/cloudformation`: [v1.7.0](service/cloudformation/CHANGELOG.md#v170-2021-07-15)
+ * **Feature**: The ErrorCode method on generated service error types has been corrected to match the API model.
+* `github.com/aws/aws-sdk-go-v2/service/cloudfront`: [v1.7.0](service/cloudfront/CHANGELOG.md#v170-2021-07-15)
+ * **Feature**: Updated service model to latest version.
+* `github.com/aws/aws-sdk-go-v2/service/cloudsearch`: [v1.5.0](service/cloudsearch/CHANGELOG.md#v150-2021-07-15)
+ * **Feature**: The ErrorCode method on generated service error types has been corrected to match the API model.
+* `github.com/aws/aws-sdk-go-v2/service/cloudwatch`: [v1.6.0](service/cloudwatch/CHANGELOG.md#v160-2021-07-15)
+ * **Feature**: The ErrorCode method on generated service error types has been corrected to match the API model.
+* `github.com/aws/aws-sdk-go-v2/service/databasemigrationservice`: [v1.6.0](service/databasemigrationservice/CHANGELOG.md#v160-2021-07-15)
+ * **Feature**: Updated service model to latest version.
+* `github.com/aws/aws-sdk-go-v2/service/devopsguru`: [v1.6.0](service/devopsguru/CHANGELOG.md#v160-2021-07-15)
+ * **Feature**: Updated service model to latest version.
+* `github.com/aws/aws-sdk-go-v2/service/directconnect`: [v1.6.0](service/directconnect/CHANGELOG.md#v160-2021-07-15)
+ * **Feature**: Updated service model to latest version.
+* `github.com/aws/aws-sdk-go-v2/service/docdb`: [v1.8.0](service/docdb/CHANGELOG.md#v180-2021-07-15)
+ * **Feature**: The ErrorCode method on generated service error types has been corrected to match the API model.
+* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.12.0](service/ec2/CHANGELOG.md#v1120-2021-07-15)
+ * **Feature**: Updated service model to latest version.
+* `github.com/aws/aws-sdk-go-v2/service/eks`: [v1.8.0](service/eks/CHANGELOG.md#v180-2021-07-15)
+ * **Feature**: Updated service model to latest version.
+* `github.com/aws/aws-sdk-go-v2/service/elasticache`: [v1.8.0](service/elasticache/CHANGELOG.md#v180-2021-07-15)
+ * **Feature**: The ErrorCode method on generated service error types has been corrected to match the API model.
+* `github.com/aws/aws-sdk-go-v2/service/elasticbeanstalk`: [v1.5.0](service/elasticbeanstalk/CHANGELOG.md#v150-2021-07-15)
+ * **Feature**: The ErrorCode method on generated service error types has been corrected to match the API model.
+* `github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing`: [v1.5.0](service/elasticloadbalancing/CHANGELOG.md#v150-2021-07-15)
+ * **Feature**: The ErrorCode method on generated service error types has been corrected to match the API model.
+ * **Documentation**: Updated service model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2`: [v1.5.0](service/elasticloadbalancingv2/CHANGELOG.md#v150-2021-07-15)
+ * **Feature**: The ErrorCode method on generated service error types has been corrected to match the API model.
+ * **Documentation**: Updated service model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/fms`: [v1.6.0](service/fms/CHANGELOG.md#v160-2021-07-15)
+ * **Feature**: Updated service model to latest version.
+* `github.com/aws/aws-sdk-go-v2/service/frauddetector`: [v1.6.0](service/frauddetector/CHANGELOG.md#v160-2021-07-15)
+ * **Feature**: Updated service model to latest version.
+* `github.com/aws/aws-sdk-go-v2/service/glue`: [v1.9.0](service/glue/CHANGELOG.md#v190-2021-07-15)
+ * **Feature**: Updated service model to latest version.
+* `github.com/aws/aws-sdk-go-v2/service/health`: [v1.6.0](service/health/CHANGELOG.md#v160-2021-07-15)
+ * **Feature**: Updated service model to latest version.
+* `github.com/aws/aws-sdk-go-v2/service/healthlake`: [v1.5.0](service/healthlake/CHANGELOG.md#v150-2021-07-15)
+ * **Feature**: Updated service model to latest version.
+* `github.com/aws/aws-sdk-go-v2/service/iam`: [v1.7.0](service/iam/CHANGELOG.md#v170-2021-07-15)
+ * **Feature**: The ErrorCode method on generated service error types has been corrected to match the API model.
+ * **Documentation**: Updated service model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/imagebuilder`: [v1.7.0](service/imagebuilder/CHANGELOG.md#v170-2021-07-15)
+ * **Feature**: Updated service model to latest version.
+* `github.com/aws/aws-sdk-go-v2/service/iot`: [v1.8.0](service/iot/CHANGELOG.md#v180-2021-07-15)
+ * **Feature**: Updated service model to latest version.
+* `github.com/aws/aws-sdk-go-v2/service/iotsitewise`: [v1.8.0](service/iotsitewise/CHANGELOG.md#v180-2021-07-15)
+ * **Feature**: Updated service model to latest version.
+* `github.com/aws/aws-sdk-go-v2/service/kendra`: [v1.9.0](service/kendra/CHANGELOG.md#v190-2021-07-15)
+ * **Feature**: Updated service model to latest version.
+* `github.com/aws/aws-sdk-go-v2/service/lambda`: [v1.5.0](service/lambda/CHANGELOG.md#v150-2021-07-15)
+ * **Feature**: Updated service model to latest version.
+* `github.com/aws/aws-sdk-go-v2/service/lexmodelbuildingservice`: [v1.6.0](service/lexmodelbuildingservice/CHANGELOG.md#v160-2021-07-15)
+ * **Feature**: Updated service model to latest version.
+* `github.com/aws/aws-sdk-go-v2/service/lightsail`: [v1.8.0](service/lightsail/CHANGELOG.md#v180-2021-07-15)
+ * **Feature**: Updated service model to latest version.
+* `github.com/aws/aws-sdk-go-v2/service/macie`: [v1.5.1](service/macie/CHANGELOG.md#v151-2021-07-15)
+ * **Documentation**: Updated service model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/macie2`: [v1.8.1](service/macie2/CHANGELOG.md#v181-2021-07-15)
+ * **Documentation**: Updated service model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/mediaconvert`: [v1.8.0](service/mediaconvert/CHANGELOG.md#v180-2021-07-15)
+ * **Feature**: Updated service model to latest version.
+* `github.com/aws/aws-sdk-go-v2/service/mediatailor`: [v1.5.0](service/mediatailor/CHANGELOG.md#v150-2021-07-15)
+ * **Feature**: Updated service model to latest version.
+* `github.com/aws/aws-sdk-go-v2/service/mgn`: [v1.3.0](service/mgn/CHANGELOG.md#v130-2021-07-15)
+ * **Feature**: Updated service model to latest version.
+* `github.com/aws/aws-sdk-go-v2/service/mq`: [v1.4.0](service/mq/CHANGELOG.md#v140-2021-07-15)
+ * **Feature**: Updated service model to latest version.
+* `github.com/aws/aws-sdk-go-v2/service/neptune`: [v1.7.0](service/neptune/CHANGELOG.md#v170-2021-07-15)
+ * **Feature**: The ErrorCode method on generated service error types has been corrected to match the API model.
+* `github.com/aws/aws-sdk-go-v2/service/outposts`: [v1.6.0](service/outposts/CHANGELOG.md#v160-2021-07-15)
+ * **Feature**: Updated service model to latest version.
+* `github.com/aws/aws-sdk-go-v2/service/pricing`: [v1.5.1](service/pricing/CHANGELOG.md#v151-2021-07-15)
+ * **Documentation**: Updated service model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/rds`: [v1.6.0](service/rds/CHANGELOG.md#v160-2021-07-15)
+ * **Feature**: The ErrorCode method on generated service error types has been corrected to match the API model.
+* `github.com/aws/aws-sdk-go-v2/service/redshift`: [v1.9.0](service/redshift/CHANGELOG.md#v190-2021-07-15)
+ * **Feature**: The ErrorCode method on generated service error types has been corrected to match the API model.
+ * **Feature**: Updated service model to latest version.
+* `github.com/aws/aws-sdk-go-v2/service/sagemaker`: [v1.10.0](service/sagemaker/CHANGELOG.md#v1100-2021-07-15)
+ * **Feature**: Updated service model to latest version.
+* `github.com/aws/aws-sdk-go-v2/service/ses`: [v1.5.0](service/ses/CHANGELOG.md#v150-2021-07-15)
+ * **Feature**: The ErrorCode method on generated service error types has been corrected to match the API model.
+* `github.com/aws/aws-sdk-go-v2/service/sns`: [v1.7.0](service/sns/CHANGELOG.md#v170-2021-07-15)
+ * **Feature**: The ErrorCode method on generated service error types has been corrected to match the API model.
+ * **Documentation**: Updated service model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/sqs`: [v1.7.0](service/sqs/CHANGELOG.md#v170-2021-07-15)
+ * **Feature**: The ErrorCode method on generated service error types has been corrected to match the API model.
+* `github.com/aws/aws-sdk-go-v2/service/ssm`: [v1.8.0](service/ssm/CHANGELOG.md#v180-2021-07-15)
+ * **Feature**: Updated service model to latest version.
+ * **Documentation**: Updated service model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/storagegateway`: [v1.5.0](service/storagegateway/CHANGELOG.md#v150-2021-07-15)
+ * **Feature**: Updated service model to latest version.
+* `github.com/aws/aws-sdk-go-v2/service/sts`: [v1.6.0](service/sts/CHANGELOG.md#v160-2021-07-15)
+ * **Feature**: The ErrorCode method on generated service error types has been corrected to match the API model.
+ * **Documentation**: Updated service model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/wellarchitected`: [v1.5.0](service/wellarchitected/CHANGELOG.md#v150-2021-07-15)
+ * **Feature**: Updated service model to latest version.
+
+# Release (2021-07-01)
+
+## General Highlights
+* **Dependency Update**: Updated to the latest SDK module versions
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/internal/ini`: [v1.1.0](internal/ini/CHANGELOG.md#v110-2021-07-01)
+ * **Feature**: Support for `:`, `=`, `[`, `]` being present in expression values.
+* `github.com/aws/aws-sdk-go-v2/service/autoscaling`: [v1.9.0](service/autoscaling/CHANGELOG.md#v190-2021-07-01)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/databrew`: [v1.6.0](service/databrew/CHANGELOG.md#v160-2021-07-01)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.11.0](service/ec2/CHANGELOG.md#v1110-2021-07-01)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/glue`: [v1.8.0](service/glue/CHANGELOG.md#v180-2021-07-01)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/kendra`: [v1.8.0](service/kendra/CHANGELOG.md#v180-2021-07-01)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/mediaconvert`: [v1.7.0](service/mediaconvert/CHANGELOG.md#v170-2021-07-01)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/mediapackagevod`: [v1.6.0](service/mediapackagevod/CHANGELOG.md#v160-2021-07-01)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/redshift`: [v1.8.0](service/redshift/CHANGELOG.md#v180-2021-07-01)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/sagemaker`: [v1.9.0](service/sagemaker/CHANGELOG.md#v190-2021-07-01)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/servicediscovery`: [v1.7.0](service/servicediscovery/CHANGELOG.md#v170-2021-07-01)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/sqs`: [v1.6.0](service/sqs/CHANGELOG.md#v160-2021-07-01)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/ssmcontacts`: [v1.2.0](service/ssmcontacts/CHANGELOG.md#v120-2021-07-01)
+ * **Feature**: API client updated
+
+# Release (2021-06-25)
+
+## General Highlights
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2`: v1.7.0
+ * **Feature**: Adds configuration values for enabling endpoint discovery.
+ * **Bug Fix**: Keep Object-Lock headers a header when presigning Sigv4 signing requests
+* `github.com/aws/aws-sdk-go-v2/config`: [v1.4.0](config/CHANGELOG.md#v140-2021-06-25)
+ * **Feature**: Adds configuration setting for enabling endpoint discovery.
+* `github.com/aws/aws-sdk-go-v2/credentials`: [v1.3.0](credentials/CHANGELOG.md#v130-2021-06-25)
+ * **Bug Fix**: Fixed example usages of aws.CredentialsCache ([#1275](https://github.com/aws/aws-sdk-go-v2/pull/1275))
+* `github.com/aws/aws-sdk-go-v2/feature/cloudfront/sign`: [v1.2.0](feature/cloudfront/sign/CHANGELOG.md#v120-2021-06-25)
+ * **Feature**: Add UnmarshalJSON for AWSEpochTime to correctly unmarshal AWSEpochTime, ([#1298](https://github.com/aws/aws-sdk-go-v2/pull/1298))
+* `github.com/aws/aws-sdk-go-v2/internal/configsources`: [v1.0.0](internal/configsources/CHANGELOG.md#v100-2021-06-25)
+ * **Release**: Release new modules
+* `github.com/aws/aws-sdk-go-v2/service/amp`: [v1.2.0](service/amp/CHANGELOG.md#v120-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/amplify`: [v1.3.0](service/amplify/CHANGELOG.md#v130-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/amplifybackend`: [v1.2.0](service/amplifybackend/CHANGELOG.md#v120-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/appflow`: [v1.5.0](service/appflow/CHANGELOG.md#v150-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/appmesh`: [v1.4.0](service/appmesh/CHANGELOG.md#v140-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/chime`: [v1.5.0](service/chime/CHANGELOG.md#v150-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/cloud9`: [v1.5.0](service/cloud9/CHANGELOG.md#v150-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/cloudformation`: [v1.6.0](service/cloudformation/CHANGELOG.md#v160-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/cloudfront`: [v1.6.0](service/cloudfront/CHANGELOG.md#v160-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/cloudsearch`: [v1.4.0](service/cloudsearch/CHANGELOG.md#v140-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/cloudwatch`: [v1.5.0](service/cloudwatch/CHANGELOG.md#v150-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/cloudwatchevents`: [v1.5.0](service/cloudwatchevents/CHANGELOG.md#v150-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/codebuild`: [v1.5.0](service/codebuild/CHANGELOG.md#v150-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/codegurureviewer`: [v1.5.0](service/codegurureviewer/CHANGELOG.md#v150-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/cognitoidentity`: [v1.4.0](service/cognitoidentity/CHANGELOG.md#v140-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider`: [v1.4.0](service/cognitoidentityprovider/CHANGELOG.md#v140-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/connect`: [v1.5.0](service/connect/CHANGELOG.md#v150-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/dax`: [v1.3.0](service/dax/CHANGELOG.md#v130-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/docdb`: [v1.7.0](service/docdb/CHANGELOG.md#v170-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/dynamodb`: [v1.4.0](service/dynamodb/CHANGELOG.md#v140-2021-06-25)
+ * **Feature**: Adds support for endpoint discovery.
+* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.10.0](service/ec2/CHANGELOG.md#v1100-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/elasticache`: [v1.7.0](service/elasticache/CHANGELOG.md#v170-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/elasticbeanstalk`: [v1.4.0](service/elasticbeanstalk/CHANGELOG.md#v140-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing`: [v1.4.0](service/elasticloadbalancing/CHANGELOG.md#v140-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2`: [v1.4.0](service/elasticloadbalancingv2/CHANGELOG.md#v140-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/eventbridge`: [v1.5.0](service/eventbridge/CHANGELOG.md#v150-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/greengrass`: [v1.5.0](service/greengrass/CHANGELOG.md#v150-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/greengrassv2`: [v1.4.0](service/greengrassv2/CHANGELOG.md#v140-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/iam`: [v1.6.0](service/iam/CHANGELOG.md#v160-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery`: [v1.0.0](service/internal/endpoint-discovery/CHANGELOG.md#v100-2021-06-25)
+ * **Release**: Release new modules
+ * **Feature**: Module supporting endpoint-discovery across all service clients.
+* `github.com/aws/aws-sdk-go-v2/service/iot`: [v1.7.0](service/iot/CHANGELOG.md#v170-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/iotanalytics`: [v1.3.0](service/iotanalytics/CHANGELOG.md#v130-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/kendra`: [v1.7.0](service/kendra/CHANGELOG.md#v170-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/kms`: [v1.4.0](service/kms/CHANGELOG.md#v140-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/lexmodelsv2`: [v1.3.0](service/lexmodelsv2/CHANGELOG.md#v130-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/lexruntimev2`: [v1.2.0](service/lexruntimev2/CHANGELOG.md#v120-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/licensemanager`: [v1.5.0](service/licensemanager/CHANGELOG.md#v150-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/lookoutmetrics`: [v1.2.0](service/lookoutmetrics/CHANGELOG.md#v120-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/managedblockchain`: [v1.4.0](service/managedblockchain/CHANGELOG.md#v140-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/mediaconnect`: [v1.6.0](service/mediaconnect/CHANGELOG.md#v160-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/medialive`: [v1.7.0](service/medialive/CHANGELOG.md#v170-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/mediatailor`: [v1.4.0](service/mediatailor/CHANGELOG.md#v140-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/neptune`: [v1.6.0](service/neptune/CHANGELOG.md#v160-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/proton`: [v1.1.0](service/proton/CHANGELOG.md#v110-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/quicksight`: [v1.6.0](service/quicksight/CHANGELOG.md#v160-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/ram`: [v1.5.0](service/ram/CHANGELOG.md#v150-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/rds`: [v1.5.0](service/rds/CHANGELOG.md#v150-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/redshift`: [v1.7.0](service/redshift/CHANGELOG.md#v170-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/redshiftdata`: [v1.4.0](service/redshiftdata/CHANGELOG.md#v140-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/route53`: [v1.7.0](service/route53/CHANGELOG.md#v170-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/sagemaker`: [v1.8.0](service/sagemaker/CHANGELOG.md#v180-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/sagemakerfeaturestoreruntime`: [v1.4.0](service/sagemakerfeaturestoreruntime/CHANGELOG.md#v140-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/securityhub`: [v1.7.0](service/securityhub/CHANGELOG.md#v170-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/ses`: [v1.4.0](service/ses/CHANGELOG.md#v140-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/snowball`: [v1.5.0](service/snowball/CHANGELOG.md#v150-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/sns`: [v1.6.0](service/sns/CHANGELOG.md#v160-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/sqs`: [v1.5.0](service/sqs/CHANGELOG.md#v150-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/sts`: [v1.5.0](service/sts/CHANGELOG.md#v150-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/timestreamquery`: [v1.3.0](service/timestreamquery/CHANGELOG.md#v130-2021-06-25)
+ * **Feature**: Adds support for endpoint discovery.
+* `github.com/aws/aws-sdk-go-v2/service/timestreamwrite`: [v1.3.0](service/timestreamwrite/CHANGELOG.md#v130-2021-06-25)
+ * **Feature**: Adds support for endpoint discovery.
+* `github.com/aws/aws-sdk-go-v2/service/transfer`: [v1.5.0](service/transfer/CHANGELOG.md#v150-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/waf`: [v1.3.0](service/waf/CHANGELOG.md#v130-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/wafv2`: [v1.6.0](service/wafv2/CHANGELOG.md#v160-2021-06-25)
+ * **Feature**: API client updated
+
+# Release (2021-06-11)
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/autoscaling`: [v1.7.0](service/autoscaling/CHANGELOG.md#v170-2021-06-11)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/cloudtrail`: [v1.3.2](service/cloudtrail/CHANGELOG.md#v132-2021-06-11)
+ * **Documentation**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider`: [v1.3.3](service/cognitoidentityprovider/CHANGELOG.md#v133-2021-06-11)
+ * **Documentation**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/eks`: [v1.6.0](service/eks/CHANGELOG.md#v160-2021-06-11)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/fsx`: [v1.6.0](service/fsx/CHANGELOG.md#v160-2021-06-11)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/glue`: [v1.6.0](service/glue/CHANGELOG.md#v160-2021-06-11)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/kendra`: [v1.6.0](service/kendra/CHANGELOG.md#v160-2021-06-11)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/macie2`: [v1.7.0](service/macie2/CHANGELOG.md#v170-2021-06-11)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/medialive`: [v1.6.0](service/medialive/CHANGELOG.md#v160-2021-06-11)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/pi`: [v1.4.0](service/pi/CHANGELOG.md#v140-2021-06-11)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/proton`: [v1.0.0](service/proton/CHANGELOG.md#v100-2021-06-11)
+ * **Release**: New AWS service client module
+* `github.com/aws/aws-sdk-go-v2/service/qldb`: [v1.3.1](service/qldb/CHANGELOG.md#v131-2021-06-11)
+ * **Documentation**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/rds`: [v1.4.2](service/rds/CHANGELOG.md#v142-2021-06-11)
+ * **Documentation**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/sagemaker`: [v1.7.0](service/sagemaker/CHANGELOG.md#v170-2021-06-11)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/transfer`: [v1.4.1](service/transfer/CHANGELOG.md#v141-2021-06-11)
+ * **Documentation**: Updated to latest API model.
+
+# Release (2021-06-04)
+
+## General Highlights
+* **Dependency Update**: Updated to the latest SDK module versions
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/acmpca`: [v1.5.0](service/acmpca/CHANGELOG.md#v150-2021-06-04)
+ * **Feature**: Updated service client to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/autoscaling`: [v1.6.0](service/autoscaling/CHANGELOG.md#v160-2021-06-04)
+ * **Feature**: Updated service client to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/braket`: [v1.4.0](service/braket/CHANGELOG.md#v140-2021-06-04)
+ * **Feature**: Updated service client to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/cloudfront`: [v1.5.2](service/cloudfront/CHANGELOG.md#v152-2021-06-04)
+ * **Documentation**: Updated service client to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/datasync`: [v1.4.0](service/datasync/CHANGELOG.md#v140-2021-06-04)
+ * **Feature**: Updated service client to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/devicefarm`: [v1.3.0](service/devicefarm/CHANGELOG.md#v130-2021-06-04)
+ * **Feature**: Updated service client to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/docdb`: [v1.6.0](service/docdb/CHANGELOG.md#v160-2021-06-04)
+ * **Feature**: Updated service client to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.9.0](service/ec2/CHANGELOG.md#v190-2021-06-04)
+ * **Feature**: Updated service client to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/ecs`: [v1.5.0](service/ecs/CHANGELOG.md#v150-2021-06-04)
+ * **Feature**: Updated service client to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/forecast`: [v1.7.0](service/forecast/CHANGELOG.md#v170-2021-06-04)
+ * **Feature**: Updated service client to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/fsx`: [v1.5.0](service/fsx/CHANGELOG.md#v150-2021-06-04)
+ * **Feature**: Updated service client to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/iam`: [v1.5.1](service/iam/CHANGELOG.md#v151-2021-06-04)
+ * **Documentation**: Updated service client to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/internal/s3shared`: [v1.4.0](service/internal/s3shared/CHANGELOG.md#v140-2021-06-04)
+ * **Feature**: The handling of AccessPoint and Outpost ARNs have been updated.
+* `github.com/aws/aws-sdk-go-v2/service/iotevents`: [v1.4.0](service/iotevents/CHANGELOG.md#v140-2021-06-04)
+ * **Feature**: Updated service client to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/ioteventsdata`: [v1.3.0](service/ioteventsdata/CHANGELOG.md#v130-2021-06-04)
+ * **Feature**: Updated service client to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/iotsitewise`: [v1.6.0](service/iotsitewise/CHANGELOG.md#v160-2021-06-04)
+ * **Feature**: Updated service client to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/iotwireless`: [v1.6.0](service/iotwireless/CHANGELOG.md#v160-2021-06-04)
+ * **Feature**: Updated service client to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/kendra`: [v1.5.0](service/kendra/CHANGELOG.md#v150-2021-06-04)
+ * **Feature**: Updated service client to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/lightsail`: [v1.6.1](service/lightsail/CHANGELOG.md#v161-2021-06-04)
+ * **Documentation**: Updated service client to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/location`: [v1.2.0](service/location/CHANGELOG.md#v120-2021-06-04)
+ * **Feature**: Updated service client to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/mwaa`: [v1.2.0](service/mwaa/CHANGELOG.md#v120-2021-06-04)
+ * **Feature**: Updated service client to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/outposts`: [v1.4.0](service/outposts/CHANGELOG.md#v140-2021-06-04)
+ * **Feature**: Updated service client to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/polly`: [v1.3.0](service/polly/CHANGELOG.md#v130-2021-06-04)
+ * **Feature**: Updated service client to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/qldb`: [v1.3.0](service/qldb/CHANGELOG.md#v130-2021-06-04)
+ * **Feature**: Updated service client to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/resourcegroups`: [v1.3.2](service/resourcegroups/CHANGELOG.md#v132-2021-06-04)
+ * **Documentation**: Updated service client to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/route53`: [v1.6.2](service/route53/CHANGELOG.md#v162-2021-06-04)
+ * **Documentation**: Updated service client to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/route53resolver`: [v1.4.2](service/route53resolver/CHANGELOG.md#v142-2021-06-04)
+ * **Documentation**: Updated service client to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/s3`: [v1.10.0](service/s3/CHANGELOG.md#v1100-2021-06-04)
+ * **Feature**: The handling of AccessPoint and Outpost ARNs have been updated.
+ * **Feature**: Updated service client to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/s3control`: [v1.7.0](service/s3control/CHANGELOG.md#v170-2021-06-04)
+ * **Feature**: The handling of AccessPoint and Outpost ARNs have been updated.
+ * **Feature**: Updated service client to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/servicediscovery`: [v1.5.0](service/servicediscovery/CHANGELOG.md#v150-2021-06-04)
+ * **Feature**: Updated service client to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/sns`: [v1.5.0](service/sns/CHANGELOG.md#v150-2021-06-04)
+ * **Feature**: Updated service client to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/sqs`: [v1.4.2](service/sqs/CHANGELOG.md#v142-2021-06-04)
+ * **Documentation**: Updated service client to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/ssm`: [v1.6.2](service/ssm/CHANGELOG.md#v162-2021-06-04)
+ * **Documentation**: Updated service client to latest API model.
+
+# Release (2021-05-25)
+
+## General Highlights
+* **Dependency Update**: Updated to the latest SDK module versions
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs`: [v1.4.0](service/cloudwatchlogs/CHANGELOG.md#v140-2021-05-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/commander`: [v1.1.0](service/commander/CHANGELOG.md#v110-2021-05-25)
+ * **Feature**: Deprecated module. The API client was incorrectly named. Use AWS Systems Manager Incident Manager (ssmincidents) instead.
+* `github.com/aws/aws-sdk-go-v2/service/computeoptimizer`: [v1.5.0](service/computeoptimizer/CHANGELOG.md#v150-2021-05-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/costexplorer`: [v1.6.0](service/costexplorer/CHANGELOG.md#v160-2021-05-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.8.0](service/ec2/CHANGELOG.md#v180-2021-05-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/efs`: [v1.4.0](service/efs/CHANGELOG.md#v140-2021-05-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/forecast`: [v1.6.0](service/forecast/CHANGELOG.md#v160-2021-05-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/iot`: [v1.6.0](service/iot/CHANGELOG.md#v160-2021-05-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/opsworkscm`: [v1.4.0](service/opsworkscm/CHANGELOG.md#v140-2021-05-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/quicksight`: [v1.5.0](service/quicksight/CHANGELOG.md#v150-2021-05-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/s3`: [v1.9.0](service/s3/CHANGELOG.md#v190-2021-05-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/ssmincidents`: [v1.0.0](service/ssmincidents/CHANGELOG.md#v100-2021-05-25)
+ * **Release**: New AWS service client module
+* `github.com/aws/aws-sdk-go-v2/service/transfer`: [v1.4.0](service/transfer/CHANGELOG.md#v140-2021-05-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/workspaces`: [v1.4.0](service/workspaces/CHANGELOG.md#v140-2021-05-25)
+ * **Feature**: API client updated
+
+# Release (2021-05-20)
+
+## General Highlights
+* **Dependency Update**: Updated to the latest SDK module versions
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2`: v1.6.0
+ * **Feature**: `internal/ini`: This package has been migrated to a separate module at `github.com/aws/aws-sdk-go-v2/internal/ini`.
+* `github.com/aws/aws-sdk-go-v2/config`: [v1.3.0](config/CHANGELOG.md#v130-2021-05-20)
+ * **Feature**: SSO credentials can now be defined alongside other credential providers within the same configuration profile.
+ * **Bug Fix**: Profile names were incorrectly normalized to lower-case, which could result in unexpected profile configurations.
+* `github.com/aws/aws-sdk-go-v2/internal/ini`: [v1.0.0](internal/ini/CHANGELOG.md#v100-2021-05-20)
+ * **Release**: The `github.com/aws/aws-sdk-go-v2/internal/ini` package is now a Go Module.
+* `github.com/aws/aws-sdk-go-v2/service/applicationcostprofiler`: [v1.0.0](service/applicationcostprofiler/CHANGELOG.md#v100-2021-05-20)
+ * **Release**: New AWS service client module
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/apprunner`: [v1.0.0](service/apprunner/CHANGELOG.md#v100-2021-05-20)
+ * **Release**: New AWS service client module
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/autoscaling`: [v1.5.0](service/autoscaling/CHANGELOG.md#v150-2021-05-20)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/computeoptimizer`: [v1.4.0](service/computeoptimizer/CHANGELOG.md#v140-2021-05-20)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/detective`: [v1.6.0](service/detective/CHANGELOG.md#v160-2021-05-20)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/eks`: [v1.5.0](service/eks/CHANGELOG.md#v150-2021-05-20)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/elasticache`: [v1.6.0](service/elasticache/CHANGELOG.md#v160-2021-05-20)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/elasticsearchservice`: [v1.4.0](service/elasticsearchservice/CHANGELOG.md#v140-2021-05-20)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/iam`: [v1.5.0](service/iam/CHANGELOG.md#v150-2021-05-20)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/imagebuilder`: [v1.5.0](service/imagebuilder/CHANGELOG.md#v150-2021-05-20)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/iot`: [v1.5.0](service/iot/CHANGELOG.md#v150-2021-05-20)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/iotdeviceadvisor`: [v1.4.0](service/iotdeviceadvisor/CHANGELOG.md#v140-2021-05-20)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/iotsitewise`: [v1.5.0](service/iotsitewise/CHANGELOG.md#v150-2021-05-20)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/kinesis`: [v1.4.0](service/kinesis/CHANGELOG.md#v140-2021-05-20)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/kinesisanalytics`: [v1.3.0](service/kinesisanalytics/CHANGELOG.md#v130-2021-05-20)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/kinesisanalyticsv2`: [v1.4.0](service/kinesisanalyticsv2/CHANGELOG.md#v140-2021-05-20)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/lexmodelsv2`: [v1.2.0](service/lexmodelsv2/CHANGELOG.md#v120-2021-05-20)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/licensemanager`: [v1.4.0](service/licensemanager/CHANGELOG.md#v140-2021-05-20)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/lightsail`: [v1.6.0](service/lightsail/CHANGELOG.md#v160-2021-05-20)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/macie`: [v1.4.0](service/macie/CHANGELOG.md#v140-2021-05-20)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/macie2`: [v1.6.0](service/macie2/CHANGELOG.md#v160-2021-05-20)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/mediaconnect`: [v1.5.0](service/mediaconnect/CHANGELOG.md#v150-2021-05-20)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/neptune`: [v1.5.0](service/neptune/CHANGELOG.md#v150-2021-05-20)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/personalize`: [v1.5.0](service/personalize/CHANGELOG.md#v150-2021-05-20)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/quicksight`: [v1.4.0](service/quicksight/CHANGELOG.md#v140-2021-05-20)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/rekognition`: [v1.5.0](service/rekognition/CHANGELOG.md#v150-2021-05-20)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/s3`: [v1.8.0](service/s3/CHANGELOG.md#v180-2021-05-20)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/sagemaker`: [v1.6.0](service/sagemaker/CHANGELOG.md#v160-2021-05-20)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/sagemakera2iruntime`: [v1.3.0](service/sagemakera2iruntime/CHANGELOG.md#v130-2021-05-20)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/securityhub`: [v1.6.0](service/securityhub/CHANGELOG.md#v160-2021-05-20)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/support`: [v1.3.0](service/support/CHANGELOG.md#v130-2021-05-20)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/transcribe`: [v1.4.0](service/transcribe/CHANGELOG.md#v140-2021-05-20)
+ * **Feature**: API client updated
+
+# Release (2021-05-14)
+
+## General Highlights
+* **Feature**: Constant has been added to modules to enable runtime version inspection for reporting.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2`: v1.5.0
+ * **Feature**: `AddSDKAgentKey` and `AddSDKAgentKeyValue` in `aws/middleware` package have been updated to direct metadata to `User-Agent` HTTP header.
+* `github.com/aws/aws-sdk-go-v2/service/codeartifact`: [v1.3.0](service/codeartifact/CHANGELOG.md#v130-2021-05-14)
+ * **Feature**: Updated to latest service API model.
+* `github.com/aws/aws-sdk-go-v2/service/commander`: [v1.0.0](service/commander/CHANGELOG.md#v100-2021-05-14)
+ * **Release**: New AWS service client module
+ * **Feature**: Updated to latest service API model.
+* `github.com/aws/aws-sdk-go-v2/service/configservice`: [v1.5.0](service/configservice/CHANGELOG.md#v150-2021-05-14)
+ * **Feature**: Updated to latest service API model.
+* `github.com/aws/aws-sdk-go-v2/service/connect`: [v1.4.0](service/connect/CHANGELOG.md#v140-2021-05-14)
+ * **Feature**: Updated to latest service API model.
+* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.7.0](service/ec2/CHANGELOG.md#v170-2021-05-14)
+ * **Feature**: Updated to latest service API model.
+* `github.com/aws/aws-sdk-go-v2/service/ecs`: [v1.4.0](service/ecs/CHANGELOG.md#v140-2021-05-14)
+ * **Feature**: Updated to latest service API model.
+* `github.com/aws/aws-sdk-go-v2/service/eks`: [v1.4.0](service/eks/CHANGELOG.md#v140-2021-05-14)
+ * **Feature**: Updated to latest service API model.
+* `github.com/aws/aws-sdk-go-v2/service/finspace`: [v1.0.0](service/finspace/CHANGELOG.md#v100-2021-05-14)
+ * **Release**: New AWS service client module
+ * **Feature**: Updated to latest service API model.
+* `github.com/aws/aws-sdk-go-v2/service/finspacedata`: [v1.0.0](service/finspacedata/CHANGELOG.md#v100-2021-05-14)
+ * **Release**: New AWS service client module
+ * **Feature**: Updated to latest service API model.
+* `github.com/aws/aws-sdk-go-v2/service/iot`: [v1.4.0](service/iot/CHANGELOG.md#v140-2021-05-14)
+ * **Feature**: Updated to latest service API model.
+* `github.com/aws/aws-sdk-go-v2/service/iotwireless`: [v1.5.0](service/iotwireless/CHANGELOG.md#v150-2021-05-14)
+ * **Feature**: Updated to latest service API model.
+* `github.com/aws/aws-sdk-go-v2/service/kinesis`: [v1.3.0](service/kinesis/CHANGELOG.md#v130-2021-05-14)
+ * **Feature**: Updated to latest service API model.
+* `github.com/aws/aws-sdk-go-v2/service/kinesisanalytics`: [v1.2.0](service/kinesisanalytics/CHANGELOG.md#v120-2021-05-14)
+ * **Feature**: Updated to latest service API model.
+* `github.com/aws/aws-sdk-go-v2/service/kinesisanalyticsv2`: [v1.3.0](service/kinesisanalyticsv2/CHANGELOG.md#v130-2021-05-14)
+ * **Feature**: Updated to latest service API model.
+* `github.com/aws/aws-sdk-go-v2/service/lakeformation`: [v1.3.0](service/lakeformation/CHANGELOG.md#v130-2021-05-14)
+ * **Feature**: Updated to latest service API model.
+* `github.com/aws/aws-sdk-go-v2/service/lookoutmetrics`: [v1.1.0](service/lookoutmetrics/CHANGELOG.md#v110-2021-05-14)
+ * **Feature**: Updated to latest service API model.
+* `github.com/aws/aws-sdk-go-v2/service/mediaconvert`: [v1.5.0](service/mediaconvert/CHANGELOG.md#v150-2021-05-14)
+ * **Feature**: Updated to latest service API model.
+* `github.com/aws/aws-sdk-go-v2/service/route53`: [v1.6.0](service/route53/CHANGELOG.md#v160-2021-05-14)
+ * **Feature**: Updated to latest service API model.
+* `github.com/aws/aws-sdk-go-v2/service/s3`: [v1.7.0](service/s3/CHANGELOG.md#v170-2021-05-14)
+ * **Feature**: Updated to latest service API model.
+* `github.com/aws/aws-sdk-go-v2/service/s3control`: [v1.6.0](service/s3control/CHANGELOG.md#v160-2021-05-14)
+ * **Feature**: Updated to latest service API model.
+* `github.com/aws/aws-sdk-go-v2/service/ssm`: [v1.6.0](service/ssm/CHANGELOG.md#v160-2021-05-14)
+ * **Feature**: Updated to latest service API model.
+* `github.com/aws/aws-sdk-go-v2/service/ssmcontacts`: [v1.0.0](service/ssmcontacts/CHANGELOG.md#v100-2021-05-14)
+ * **Release**: New AWS service client module
+ * **Feature**: Updated to latest service API model.
+
+# Release 2021-05-06
+
+## Breaking change
+* `service/ec2` - v1.6.0
+ * This release contains a breaking change to the Amazon EC2 API client. API number(int/int64/etc) and boolean members were changed from value, to pointer type. Your applications using the EC2 API client will fail to compile after upgrading for all members that were updated. To migrate to this module you'll need to update your application to use pointers for all number and boolean members in the API client module. The SDK provides helper utilities to convert between value and pointer types. For example the [aws.Bool](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/aws#Bool) function to get the address from a bool literal. Similar utilities are available for all other primitive types in the [aws](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/aws) package.
+
+## Service Client Highlights
+* `service/acmpca` - v1.3.0
+ * Feature: API client updated
+* `service/apigateway` - v1.3.0
+ * Feature: API client updated
+* `service/auditmanager` - v1.4.0
+ * Feature: API client updated
+* `service/chime` - v1.3.0
+ * Feature: API client updated
+* `service/cloudformation` - v1.4.0
+ * Feature: API client updated
+* `service/cloudfront` - v1.4.0
+ * Feature: API client updated
+* `service/codegurureviewer` - v1.3.0
+ * Feature: API client updated
+* `service/connect` - v1.3.0
+ * Feature: API client updated
+* `service/customerprofiles` - v1.5.0
+ * Feature: API client updated
+* `service/devopsguru` - v1.3.0
+ * Feature: API client updated
+* `service/docdb` - v1.4.0
+ * Feature: API client updated
+* `service/ec2` - v1.6.0
+ * Bug Fix: Fix incorrectly modeled Amazon EC2 number and boolean members in structures. The Amazon EC2 API client has been updated with a breaking change to fix all structure number and boolean members to be pointer types instead of value types. Fixes [#1107](https://github.com/aws/aws-sdk-go-v2/issues/1107), [#1178](https://github.com/aws/aws-sdk-go-v2/issues/1178), and [#1190](https://github.com/aws/aws-sdk-go-v2/issues/1190). This breaking change is made within the major version of the client' module, because the client operations failed and were unusable with value type number and boolean members with the EC2 API.
+ * Feature: API client updated
+* `service/ecs` - v1.3.0
+ * Feature: API client updated
+* `service/eks` - v1.3.0
+ * Feature: API client updated
+* `service/forecast` - v1.4.0
+ * Feature: API client updated
+* `service/glue` - v1.4.0
+ * Feature: API client updated
+* `service/health` - v1.3.0
+ * Feature: API client updated
+* `service/iotsitewise` - v1.3.0
+ * Feature: API client updated
+* `service/iotwireless` - v1.4.0
+ * Feature: API client updated
+* `service/kafka` - v1.3.0
+ * Feature: API client updated
+* `service/kinesisanalyticsv2` - v1.2.0
+ * Feature: API client updated
+* `service/macie2` - v1.4.0
+ * Feature: API client updated
+* `service/marketplacecatalog` - v1.2.0
+ * Feature: API client updated
+* `service/mediaconvert` - v1.4.0
+ * Feature: API client updated
+* `service/mediapackage` - v1.4.0
+ * Feature: API client updated
+* `service/mediapackagevod` - v1.3.0
+ * Feature: API client updated
+* `service/mturk` - v1.2.0
+ * Feature: API client updated
+* `service/nimble` - v1.0.0
+ * Feature: API client updated
+* `service/organizations` - v1.3.0
+ * Feature: API client updated
+* `service/personalize` - v1.3.0
+ * Feature: API client updated
+* `service/robomaker` - v1.4.0
+ * Feature: API client updated
+* `service/route53` - v1.5.0
+ * Feature: API client updated
+* `service/s3` - v1.6.0
+ * Bug Fix: Fix PutObject and UploadPart unseekable stream documentation link to point to the correct location.
+ * Feature: API client updated
+* `service/sagemaker` - v1.4.0
+ * Feature: API client updated
+* `service/securityhub` - v1.4.0
+ * Feature: API client updated
+* `service/servicediscovery` - v1.3.0
+ * Feature: API client updated
+* `service/snowball` - v1.3.0
+ * Feature: API client updated
+* `service/sns` - v1.3.0
+ * Feature: API client updated
+* `service/ssm` - v1.5.0
+ * Feature: API client updated
+## Core SDK Highlights
+* Dependency Update: Update smithy-go dependency to v1.4.0
+* Dependency Update: Updated SDK dependencies to their latest versions.
+* `aws` - v1.4.0
+ * Feature: Add support for FIPS global partition endpoints ([#1242](https://github.com/aws/aws-sdk-go-v2/pull/1242))
+
+# Release 2021-04-23
+## Service Client Highlights
+* `service/cloudformation` - v1.3.2
+ * Documentation: Service Documentation Updates
+* `service/cognitoidentityprovider` - v1.2.3
+ * Documentation: Service Documentation Updates
+* `service/costexplorer` - v1.4.0
+ * Feature: Service API Updates
+* `service/databasemigrationservice` - v1.3.0
+ * Feature: Service API Updates
+* `service/detective` - v1.4.0
+ * Feature: Service API Updates
+* `service/elasticache` - v1.4.0
+ * Feature: Service API Updates
+* `service/forecast` - v1.3.0
+ * Feature: Service API Updates
+* `service/groundstation` - v1.3.0
+ * Feature: Service API Updates
+* `service/kendra` - v1.3.0
+ * Feature: Service API Updates
+* `service/redshift` - v1.5.0
+ * Feature: Service API Updates
+* `service/savingsplans` - v1.2.0
+ * Feature: Service API Updates
+* `service/securityhub` - v1.3.0
+ * Feature: Service API Updates
+## Core SDK Highlights
+* Dependency Update: Updated SDK dependencies to their latest versions.
+* `feature/rds/auth` - v1.0.0
+ * Feature: Add Support for Amazon RDS IAM Authentication
+
+# Release 2021-04-14
+## Service Client Highlights
+* `service/codebuild` - v1.3.0
+ * Feature: API client updated
+* `service/codestarconnections` - v1.2.0
+ * Feature: API client updated
+* `service/comprehendmedical` - v1.2.0
+ * Feature: API client updated
+* `service/configservice` - v1.4.0
+ * Feature: API client updated
+* `service/ec2` - v1.5.0
+ * Feature: API client updated
+* `service/fsx` - v1.3.0
+ * Feature: API client updated
+* `service/lightsail` - v1.4.0
+ * Feature: API client updated
+* `service/mediaconnect` - v1.3.0
+ * Feature: API client updated
+* `service/rds` - v1.3.0
+ * Feature: API client updated
+* `service/redshift` - v1.4.0
+ * Feature: API client updated
+* `service/shield` - v1.3.0
+ * Feature: API client updated
+* `service/sts` - v1.3.0
+ * Feature: API client updated
+## Core SDK Highlights
+* Dependency Update: Updated SDK dependencies to their latest versions.
+
+# Release 2021-04-08
+## Service Client Highlights
+* Feature: API model sync
+* `service/lookoutequipment` - v1.0.0
+ * v1 Release: new service client
+* `service/mgn` - v1.0.0
+ * v1 Release: new service client
+## Core SDK Highlights
+* Dependency Update: smithy-go version bump
+* Dependency Update: Updated SDK dependencies to their latest versions.
+
+# Release 2021-04-01
+## Service Client Highlights
+* Bug Fix: Fix URL Path and RawQuery of resolved endpoint being ignored by the API client's request serialization.
+ * Fixes [issue#1191](https://github.com/aws/aws-sdk-go-v2/issues/1191)
+* Refactored internal endpoints model for accessors
+* Feature: updated to latest models
+* New services
+ * `service/location` - v1.0.0
+ * `service/lookoutmetrics` - v1.0.0
+## Core SDK Highlights
+* Dependency Update: update smithy-go module
+* Dependency Update: Updated SDK dependencies to their latest versions.
+
+# Release 2021-03-18
+## Service Client Highlights
+* Bug Fix: Updated presign URLs to no longer include the X-Amz-User-Agent header
+* Feature: Update API model
+* Add New supported API
+* `service/internal/s3shared` - v1.2.0
+ * Feature: Support for S3 Object Lambda
+* `service/s3` - v1.3.0
+ * Bug Fix: Adds documentation to the PutObject and UploadPart operations Body member how to upload unseekable objects to an Amazon S3 Bucket.
+ * Feature: S3 Object Lambda is a new S3 feature that enables users to apply their own custom code to process the output of a standard S3 GET request by automatically invoking a Lambda function with a GET request
+* `service/s3control` - v1.3.0
+ * Feature: S3 Object Lambda is a new S3 feature that enables users to apply their own custom code to process the output of a standard S3 GET request by automatically invoking a Lambda function with a GET request
+## Core SDK Highlights
+* Dependency Update: Updated SDK dependencies to their latest versions.
+* `aws` - v1.3.0
+ * Feature: Add helper to V4 signer package to swap compute payload hash middleware with unsigned payload middleware
+* `feature/s3/manager` - v1.1.0
+ * Bug Fix: Add support for Amazon S3 Object Lambda feature.
+ * Feature: Updates for S3 Object Lambda feature
+
+# Release 2021-03-12
+## Service Client Highlights
+* Bug Fix: Fixed a bug that could union shape types to be deserialized incorrectly
+* Bug Fix: Fixed a bug where unboxed shapes that were marked as required were not serialized and sent over the wire, causing an API error from the service.
+* Bug Fix: Fixed a bug with generated API Paginators' handling of nil input parameters causing a panic.
+* Dependency Update: update smithy-go dependency
+* `service/detective` - v1.1.2
+ * Bug Fix: Fix deserialization of API response timestamp member.
+* `service/docdb` - v1.2.0
+ * Feature: Client now support presigned URL generation for CopyDBClusterSnapshot and CreateDBCluster operations by specifying the target SourceRegion
+* `service/neptune` - v1.2.0
+ * Feature: Client now support presigned URL generation for CopyDBClusterSnapshot and CreateDBCluster operations by specifying the target SourceRegion
+* `service/s3` - v1.2.1
+ * Bug Fix: Fixed an issue where ListObjectsV2 and ListParts paginators could loop infinitely
+ * Bug Fix: Fixed key encoding when addressing S3 Access Points
+## Core SDK Highlights
+* Dependency Update: Updated SDK dependencies to their latest versions.
+* `config` - v1.1.2
+ * Bug Fix: Fixed a panic when using WithEC2IMDSRegion without a specified IMDS client
+
+# Release 2021-02-09
+## Service Client Highlights
+* `service/s3` - v1.2.0
+ * Feature: adds support for s3 vpc endpoint interface [#1113](https://github.com/aws/aws-sdk-go-v2/pull/1113)
+* `service/s3control` - v1.2.0
+ * Feature: adds support for s3 vpc endpoint interface [#1113](https://github.com/aws/aws-sdk-go-v2/pull/1113)
+## Core SDK Highlights
+* Dependency Update: Updated SDK dependencies to their latest versions.
+* `aws` - v1.2.0
+ * Feature: support to add endpoint source on context. Adds getter/setter for the endpoint source [#1113](https://github.com/aws/aws-sdk-go-v2/pull/1113)
+* `config` - v1.1.1
+ * Bug Fix: Only Validate SSO profile configuration when attempting to use SSO credentials [#1103](https://github.com/aws/aws-sdk-go-v2/pull/1103)
+ * Bug Fix: Environment credentials were not taking precedence over AWS_PROFILE [#1103](https://github.com/aws/aws-sdk-go-v2/pull/1103)
+
+# Release 2021-01-29
+## Service Client Highlights
+* Bug Fix: A serialization bug has been fixed that caused some service operations with empty inputs to not be serialized correctly ([#1071](https://github.com/aws/aws-sdk-go-v2/pull/1071))
+* Bug Fix: Fixes a bug that could cause a waiter to fail when comparing types ([#1083](https://github.com/aws/aws-sdk-go-v2/pull/1083))
+## Core SDK Highlights
+* Feature: EndpointResolverFromURL helpers have been added for constructing a service EndpointResolver type ([#1066](https://github.com/aws/aws-sdk-go-v2/pull/1066))
+* Dependency Update: Updated SDK dependencies to their latest versions.
+* `aws` - v1.1.0
+ * Feature: Add support for specifying the EndpointSource on aws.Endpoint types ([#1070](https://github.com/aws/aws-sdk-go-v2/pull/1070/))
+* `config` - v1.1.0
+ * Feature: Add Support for AWS Single Sign-On (SSO) credential provider ([#1072](https://github.com/aws/aws-sdk-go-v2/pull/1072))
+* `credentials` - v1.1.0
+ * Feature: Add AWS Single Sign-On (SSO) credential provider ([#1072](https://github.com/aws/aws-sdk-go-v2/pull/1072))
+
+# Release 2021-01-19
+
+We are excited to announce the [General Availability](https://aws.amazon.com/blogs/developer/aws-sdk-for-go-version-2-general-availability/)
+(GA) release of the [AWS SDK for Go version 2 (v2)](https://github.com/aws/aws-sdk-go-v2).
+This release follows the [Release candidate](https://aws.amazon.com/blogs/developer/aws-sdk-for-go-version-2-v2-release-candidate)
+of the AWS SDK for Go v2. Version 2 incorporates customer feedback from version 1 and takes advantage of modern Go language features.
+
+## Breaking Changes
+* `aws`: Updated Config.Retryer member to be a func that returns aws.Retryer ([#1033](https://github.com/aws/aws-sdk-go-v2/pull/1033))
+ * Updates the SDK's references to Config.Retryer to be a function that returns aws.Retryer value. This ensures that custom retry options specified in the `aws.Config` are scoped to individual client instances.
+ * All API clients created with the config will call the `Config.Retryer` function to get an aws.Retryer.
+ * Removes duplicate `Retryer` interface from `retry` package. Single definition is `aws.Retryer` now.
+* `aws/middleware`: Updates `AddAttemptClockSkewMiddleware` to use appropriate `AddRecordResponseTiming` naming ([#1031](https://github.com/aws/aws-sdk-go-v2/pull/1031))
+ * Removes `ResponseMetadata` struct type, and adds its members to middleware metadata directly, to improve discoverability.
+* `config`: Updated the `WithRetryer` helper to take a function that returns an aws.Retryer ([#1033](https://github.com/aws/aws-sdk-go-v2/pull/1033))
+ * All API clients created with the config will call the `Config.Retryer` function to get an aws.Retryer.
+* `API Clients`: Fix SDK's API client enum constant name generation to have expected casing ([#1020](https://github.com/aws/aws-sdk-go-v2/pull/1020))
+ * This updates of the generated enum const value names in API client's `types` package to have the expected casing. Prior to this, enum names were being generated with lowercase names instead of camel case.
+* `API Clients`: Updates SDK's API client request middleware stack values to be scoped to individual operation call ([#1019](https://github.com/aws/aws-sdk-go-v2/pull/1019))
+ * The API client request middleware stack values were mistakenly allowed to escape to nested API operation calls. This broke the SDK's presigners.
+ * Stack values that should not escape are not scoped to the individual operation call.
+* `Multiple API Clients`: Unexported the API client's `WithEndpointResolver` this type wasn't intended to be exported ([#1051](https://github.com/aws/aws-sdk-go-v2/pull/1051))
+ * Using the `aws.Config.EndpointResolver` member for setting custom endpoint resolver instead.
+
+## New Features
+* `service/sts`: Add support for presigning GetCallerIdentity operation ([#1030](https://github.com/aws/aws-sdk-go-v2/pull/1030))
+ * Adds a PresignClient to the `sts` API client module. Use PresignGetCallerIdentity to obtain presigned URLs for the create presigned URLs for the GetCallerIdentity operation.
+ * Fixes [#1021](https://github.com/aws/aws-sdk-go-v2/issues/1021)
+* `aws/retry`: Add package documentation for retry package ([#1033](https://github.com/aws/aws-sdk-go-v2/pull/1033))
+ * Adds documentation for the retry package
+
+## Bug Fixes
+* `Multiple API Clients`: Fix SDK's generated serde for unmodeled operation input/output ([#1050](https://github.com/aws/aws-sdk-go-v2/pull/1050))
+ * Fixes [#1047](https://github.com/aws/aws-sdk-go-v2/issues/1047) by fixing the how the SDKs generated serialization and deserialization of API operations that did not have modeled input or output types. This caused the SDK to incorrectly attempt to deserialize response documents that were either empty, or contained unexpected data.
+* `service/s3`: Fix Tagging parameter not serialized correctly for presigned PutObject requests ([#1017](https://github.com/aws/aws-sdk-go-v2/pull/1017))
+ * Fixes the Tagging parameter incorrectly being serialized to the URL's query string instead of being signed as a HTTP request header.
+ * When using PresignPutObject make sure to add all signed headers returned by the method to your down stream's HTTP client's request. These headers must be included in the request, or the request will fail with signature errors.
+ * Fixes [#1016](https://github.com/aws/aws-sdk-go-v2/issues/1016)
+* `service/s3`: Fix Unmarshaling `GetObjectAcl` operation's Grantee type response ([#1034](https://github.com/aws/aws-sdk-go-v2/pull/1034))
+ * Updates the SDK's codegen for correctly deserializing XML attributes in tags with XML namespaces.
+ * Fixes [#1013](https://github.com/aws/aws-sdk-go-v2/issues/1013)
+* `service/s3`: Fix Unmarshaling `GetBucketLocation` operation's response ([#1027](https://github.com/aws/aws-sdk-go-v2/pull/1027))
+ * Fixes [#908](https://github.com/aws/aws-sdk-go-v2/issues/908)
+
+## Migrating from v2 preview SDK's v0.31.0 to v1.0.0
+
+### aws.Config Retryer member
+
+If your application sets the `Config.Retryer` member the application will need
+to be updated to set a function that returns an `aws.Retryer`. In addition, if
+your application used the `config.WithRetryer` helper a function that returns
+an `aws.Retryer` needs to be used.
+
+If your application used the `retry.Retryer` type, update to using the
+`aws.Retryer` type instead.
+
+### API Client enum value names
+
+If your application used the enum values in the API Client's `types` package between v0.31.0 and the latest version of the client module you may need to update the naming of the enum value. The enum value name casing were updated to camel case instead lowercased.
+
+# Release 2020-12-23
+
+We’re happy to announce the Release Candidate (RC) of the AWS SDK for Go v2.
+This RC follows the developer preview release of the AWS SDK for Go v2. The SDK
+has undergone a major rewrite from the v1 code base to incorporate your
+feedback and to take advantage of modern Go language features.
+
+## Documentation
+* Developer Guide: https://aws.github.io/aws-sdk-go-v2/docs/
+* API Reference docs: https://pkg.go.dev/github.com/aws/aws-sdk-go-v2
+* Migration Guide: https://aws.github.io/aws-sdk-go-v2/docs/migrating/
+
+## Breaking Changes
+* Dependency `github.com/awslabs/smithy-go` has been relocated to `github.com/aws/smithy-go`
+ * The `smithy-go` repository was moved from the `awslabs` GitHub organization to `aws`.
+ * `xml`, `httpbinding`, and `json` package relocated under `encoding` package.
+* The module `ec2imds` moved to `feature/ec2/imds` path ([#984](https://github.com/aws/aws-sdk-go-v2/pull/984))
+ * Moves the `ec2imds` feature module to be in common location as other SDK features.
+* `aws/signer/v4`: Refactor AWS Sigv4 Signer and options types to allow function options ([#955](https://github.com/aws/aws-sdk-go-v2/pull/955))
+ * Fixes [#917](https://github.com/aws/aws-sdk-go-v2/issues/917), [#960](https://github.com/aws/aws-sdk-go-v2/issues/960), [#958](https://github.com/aws/aws-sdk-go-v2/issues/958)
+* `aws`: CredentialCache type updated to require constructor function ([#946](https://github.com/aws/aws-sdk-go-v2/pull/946))
+ * Fixes [#940](https://github.com/aws/aws-sdk-go-v2/issues/940)
+* `credentials`: ExpiryWindow and Jitter moved from credential provider to `CredentialCache` ([#946](https://github.com/aws/aws-sdk-go-v2/pull/946))
+ * Moves ExpiryWindow and Jitter options to common option of the `CredentialCache` instead of duplicated across providers.
+ * Fixes [#940](https://github.com/aws/aws-sdk-go-v2/issues/940)
+* `config`: Ensure shared credentials file has precedence over shared config file ([#990](https://github.com/aws/aws-sdk-go-v2/pull/990))
+ * The shared config file was incorrectly overriding the shared credentials file when merging values.
+* `config`: Add `context.Context` to `LoadDefaultConfig` ([#951](https://github.com/aws/aws-sdk-go-v2/pull/951))
+ * Updates `config#LoadDefaultConfig` function to take `context.Context` as well as functional options for the `config#LoadOptions` type.
+ * Fixes [#926](https://github.com/aws/aws-sdk-go-v2/issues/926), [#819](https://github.com/aws/aws-sdk-go-v2/issues/819)
+* `aws`: Rename `NoOpRetryer` to `NopRetryer` to have consistent naming with rest of SDK ([#987](https://github.com/aws/aws-sdk-go-v2/pull/987))
+ * Fixes [#878](https://github.com/aws/aws-sdk-go-v2/issues/878)
+* `service/s3control`: Change `S3InitiateRestoreObjectOperation.ExpirationInDays` from value to pointer type ([#988](https://github.com/aws/aws-sdk-go-v2/pull/988))
+* `aws`: `ReaderSeekerCloser` and `WriteAtBuffer` have been relocated to `feature/s3/manager`.
+
+## New Features
+* *Waiters*: Add Waiter utilities for API clients ([aws/smithy-go#237](https://github.com/aws/smithy-go/pull/237))
+ * Your application can now use Waiter utilities to wait for AWS resources.
+* `feature/dynamodb/attributevalue`: Add Amazon DynamoDB Attribute value marshaler utility ([#948](https://github.com/aws/aws-sdk-go-v2/pull/948))
+ * Adds a utility for marshaling Go types too and from Amazon DynamoDB AttributeValues.
+ * Also includes utility for converting from Amazon DynamoDB Streams AttributeValues to Amazon DynamoDB AttributeValues.
+* `feature/dynamodbstreams/attributevalue`: Add Amazon DynamoDB Streams Attribute value marshaler utility ([#948](https://github.com/aws/aws-sdk-go-v2/pull/948))
+ * Adds a utility for marshaling Go types too and from Amazon DynamoDB Streams AttributeValues.
+ * Also includes utility for converting from Amazon DynamoDB AttributeValues to Amazon DynamoDB Streams AttributeValues.
+* `feature/dynamodb/expression`: Add Amazon DynamoDB expression utility ([#981](https://github.com/aws/aws-sdk-go-v2/pull/981))
+ * Adds the expression utility to the SDK for easily building Amazon DynamoDB operation expressions in code.
+
+## Bug Fixes
+* `service/s3`: Fix Presigner to configure client correctly for Amazon S3 ([#969](https://github.com/aws/aws-sdk-go-v2/pull/969))
+* service/s3: Fix deserialization of CompleteMultipartUpload ([#965](https://github.com/aws/aws-sdk-go-v2/pull/965)
+ * Fixes [#927](https://github.com/aws/aws-sdk-go-v2/issues/927)
+* `codegen`: Fix API client union serialization ([#979](https://github.com/aws/aws-sdk-go-v2/pull/979))
+ * Fixes [#978](https://github.com/aws/aws-sdk-go-v2/issues/978)
+
+## Service Client Highlights
+* API Clients have been bumped to version `v0.31.0`
+* Regenerate API Clients from updated API models adding waiter utilities, and union parameters.
+* `codegen`:
+ * Add documentation to union API parameters describing valid member types, and usage example ([aws/smithy-go#239](https://github.com/aws/smithy-go/pull/239))
+ * Normalize Metadata header map keys to be lower case ([aws/smithy-go#241](https://github.com/aws/smithy-go/pull/241)), ([#982](https://github.com/aws/aws-sdk-go-v2/pull/982))
+ * Fixes [#376](https://github.com/aws/aws-sdk-go-v2/issues/376) Amazon S3 Metadata parameters keys are always returned as lower case.
+ * Fix API client deserialization of XML based responses ([aws/smithy-go#245](https://github.com/aws/smithy-go/pull/245)), ([#992](https://github.com/aws/aws-sdk-go-v2/pull/992))
+ * Fixes [#910](https://github.com/aws/aws-sdk-go-v2/issues/910)
+* `service/s3`, `service/s3control`:
+ * Add support for reading `s3_use_arn_region` from shared config file ([#991](https://github.com/aws/aws-sdk-go-v2/pull/991))
+ * Add Utility for getting RequestID and HostID of response ([#983](https://github.com/aws/aws-sdk-go-v2/pull/983))
+
+
+## Other changes
+* Updates branch `HEAD` points from `master` to `main`.
+ * This should not impact your application, but if you have pull requests or forks of the SDK you may need to update the upstream branch your fork is based off of.
+
+## Migrating from v2 preview SDK's v0.30.0 to v0.31.0 release candidate
+
+### smithy-go module relocation
+
+If your application uses `smithy-go` utilities for request pipeline your application will need to be updated to refer to the new import path of `github.com/aws/smithy-go`. If you application did *not* use `smithy-go` utilities directly, your application will update automatically.
+
+### EC2 IMDS module relocation
+
+If your application used the `ec2imds` module, it has been relocated to `feature/ec2/imds`. Your application will need to update to the new import path, `github.com/aws/aws-sdk-go-v2/feature/ec2/imds`.
+
+### CredentialsCache Constructor and ExpiryWindow Options
+
+The `aws#CredentialsCache` type was updated, and a new constructor function, `NewCredentialsCache` was added. This function needs to be used to initialize the `CredentialCache`. The constructor also has function options to specify additional configuration, e.g. ExpiryWindow and Jitter.
+
+If your application was specifying the `ExpiryWindow` with the `credentials/stscreds#AssumeRoleOptions`, `credentials/stscreds#WebIdentityRoleOptions`, `credentials/processcreds#Options`, or `credentials/ec2rolecrds#Options` types the `ExpiryWindow` option will need to specified on the `CredentialsCache` constructor instead.
+
+### AWS Sigv4 Signer Refactor
+
+The `aws/signer/v4` package's `Signer.SignHTTP` and `Signer.PresignHTTP` methods were updated to take functional options. If your application provided a custom implementation for API client's `HTTPSignerV4` or `HTTPPresignerV4` interfaces, that implementation will need to be updated for the new function signature.
+
+### Configuration Loading
+
+The `config#LoadDefaultConfig` function has been updated to require a `context.Context` as the first parameter, with additional optional function options as variadic additional arguments. Your application will need to update its usage of `LoadDefaultConfig` to pass in `context.Context` as the first parameter. If your application used the `With...` helpers those should continue to work without issue.
+
+The v2 SDK corrects its behavior to be inline with the AWS CLI and other AWS SDKs. Refer to https://docs.aws.amazon.com/credref/latest/refdocs/overview.html for more information how to use the shared config and credentials files.
+
+
+# Release 2020-11-30
+
+## Breaking Change
+* `codegen`: Add support for slice and maps generated with value members instead of pointer ([#887](https://github.com/aws/aws-sdk-go-v2/pull/887))
+ * This update allow the SDK's code generation to be aware of API shapes and members that are not nullable, and can be rendered as value types by the code generation instead of pointer types.
+ * Several API client parameter types will change from pointer members to value members for slice, map, number and bool member types.
+ * See Migration notes for migrating to v0.30.0 with this change.
+* `aws/transport/http`: Move aws.BuildableHTTPClient to HTTP transport package ([#898](https://github.com/aws/aws-sdk-go-v2/pull/898))
+ * Moves the `BuildableHTTPClient` from the SDK's `aws` package to the `aws/transport/http` package as `BuildableClient` to with other HTTP specific utilities.
+* `feature/cloudfront/sign`: Add CloudFront sign feature as module ([#884](https://github.com/aws/aws-sdk-go-v2/pull/884))
+ * Moves `service/cloudfront/sign` package out of the `cloudfront` module, and into its own module as `github.com/aws/aws-sdk-go-v2/feature/cloudfront/sign`.
+
+## New Features
+* `config`: Add a WithRetryer provider helper to the config loader ([#897](https://github.com/aws/aws-sdk-go-v2/pull/897))
+ * Adds a `WithRetryer` configuration provider to the config loader as a convenience helper to set the `Retryer` on the `aws.Config` when its being loaded.
+* `config`: Default to TLS 1.2 for HTTPS requests ([#892](https://github.com/aws/aws-sdk-go-v2/pull/892))
+ * Updates the SDK's default HTTP client to use TLS 1.2 as the minimum TLS version for all HTTPS requests by default.
+
+## Bug Fixes
+* `config`: Fix AWS_CA_BUNDLE usage while loading default config ([#912](https://github.com/aws/aws-sdk-go-v2/pull/))
+ * Fixes the `LoadDefaultConfig`'s configuration provider order to correctly load a custom HTTP client prior to configuring the client for `AWS_CA_BUNDLE` environment variable.
+* `service/s3`: Fix signature mismatch error for s3 ([#913](https://github.com/aws/aws-sdk-go-v2/pull/913))
+ * Fixes ([#883](https://github.com/aws/aws-sdk-go-v2/issues/883))
+* `service/s3control`:
+ * Fix HostPrefix addition behavior for s3control ([#882](https://github.com/aws/aws-sdk-go-v2/pull/882))
+ * Fixes ([#863](https://github.com/aws/aws-sdk-go-v2/issues/863))
+ * Fix s3control error deserializer ([#875](https://github.com/aws/aws-sdk-go-v2/pull/875))
+ * Fixes ([#864](https://github.com/aws/aws-sdk-go-v2/issues/864))
+
+## Service Client Highlights
+* Pagination support has been added to supported APIs. See [Using Operation Paginators](https://aws.github.io/aws-sdk-go-v2/docs/making-requests/#using-operation-paginators) in the Developer Guide. ([#885](https://github.com/aws/aws-sdk-go-v2/pull/885))
+* Logging support has been added to service clients. See [Logging](https://aws.github.io/aws-sdk-go-v2/docs/configuring-sdk/logging/) in the Developer Guide. ([#872](https://github.com/aws/aws-sdk-go-v2/pull/872))
+* `service`: Add support for pre-signed URL clients for S3, RDS, EC2 service ([#888](https://github.com/aws/aws-sdk-go-v2/pull/888))
+ * `service/s3`: operations `PutObject` and `GetObject` are now supported with s3 pre-signed url client.
+ * `service/ec2`: operation `CopySnapshot` is now supported with ec2 pre-signed url client.
+ * `service/rds`: operations `CopyDBSnapshot`, `CreateDBInstanceReadReplica`, `CopyDBClusterSnapshot`, `CreateDBCluster` are now supported with rds pre-signed url client.
+* `service/s3`: Add support for S3 access point and S3 on outposts access point ARNs ([#870](https://github.com/aws/aws-sdk-go-v2/pull/870))
+* `service/s3control`: Adds support for S3 on outposts access point and S3 on outposts bucket ARNs ([#870](https://github.com/aws/aws-sdk-go-v2/pull/870))
+
+## Migrating from v2 preview SDK's v0.29.0 to v0.30.0
+
+### aws.BuildableHTTPClient move
+The `aws`'s `BuildableHTTPClient` HTTP client implementation was moved to `aws/transport/http` as `BuildableClient`. If your application used the `aws.BuildableHTTPClient` type, update it to use the `BuildableClient` in the `aws/transport/http` package.
+
+### Slice and Map API member types
+This release includes several code generation updates for API client's slice map members. Using API modeling metadata the Slice and map members are now generated as value types instead of pointer types. For your application this means that for these types, the SDK no longer will have pointer member types, and have value member types.
+
+To migrate to this change you'll need to remove the pointer handling for slice and map members, and instead use value type handling of the member values.
+
+### Boolean and Number API member types
+Similar to the slice and map API member types being generated as value, the SDK's code generation now has metadata where the SDK can generate boolean and number members as value type instead of pointer types.
+
+To migrate to this change you'll need to remove the pointer handling for numbers and boolean member types, and instead use value handling.
+
+# Release 2020-10-30
+
+## New Features
+* Adds HostnameImmutable flag on aws.Endpoint to direct SDK if the associated endpoint is modifiable.([#848](https://github.com/aws/aws-sdk-go-v2/pull/848))
+
+## Bug Fixes
+* Fix SDK handling of xml based services - xml namespaces ([#858](https://github.com/aws/aws-sdk-go-v2/pull/858))
+ * Fixes ([#850](https://github.com/aws/aws-sdk-go-v2/issues/850))
+
+## Service Client Highlights
+* API Clients have been bumped to version `v0.29.0`
+ * Regenerate API Clients from update API models.
+* Improve client doc generation.
+
+## Core SDK Highlights
+* Dependency Update: Updated SDK dependencies to their latest versions.
+
+## Migrating from v2 preview SDK's v0.28.0 to v0.29.0
+* API Clients ResolverOptions type renamed to EndpointResolverOptions
+
+# Release 2020-10-26
+
+## New Features
+* `service/s3`: Add support for Accelerate, and Dualstack ([#836](https://github.com/aws/aws-sdk-go-v2/pull/836))
+* `service/s3control`: Add support for Dualstack ([#836](https://github.com/aws/aws-sdk-go-v2/pull/836))
+
+## Service Client Highlights
+* API Clients have been bumped to version `v0.28.0`
+ * Regenerate API Clients from update API models.
+* `service/s3`: Add support for Accelerate, and Dualstack ([#836](https://github.com/aws/aws-sdk-go-v2/pull/836))
+* `service/s3control`: Add support for Dualstack ([#836](https://github.com/aws/aws-sdk-go-v2/pull/836))
+* `service/route53`: Fix sanitizeURL customization to handle leading slash(`/`) [#846](https://github.com/aws/aws-sdk-go-v2/pull/846)
+ * Fixes [#843](https://github.com/aws/aws-sdk-go-v2/issues/843)
+* `service/route53`: Fix codegen to correctly look for operations that need sanitize url ([#851](https://github.com/aws/aws-sdk-go-v2/pull/851))
+
+## Core SDK Highlights
+* `aws/protocol/restjson`: Fix unexpected JSON error response deserialization ([#837](https://github.com/aws/aws-sdk-go-v2/pull/837))
+ * Fixes [#832](https://github.com/aws/aws-sdk-go-v2/issues/832)
+* `example/service/s3/listobjects`: Add example for Amazon S3 ListObjectsV2 ([#838](https://github.com/aws/aws-sdk-go-v2/pull/838))
+
+# Release 2020-10-16
+
+## New Features
+* `feature/s3/manager`:
+ * Initial `v0.1.0` release
+ * Add the Amazon S3 Upload and Download transfer manager ([#802](https://github.com/aws/aws-sdk-go-v2/pull/802))
+
+## Service Client Highlights
+* Clients have been bumped to version `v0.27.0`
+* `service/machinelearning`: Add customization for setting client endpoint with PredictEndpoint value if set ([#782](https://github.com/aws/aws-sdk-go-v2/pull/782))
+* `service/s3`: Fix empty response body deserialization in case of error response ([#801](https://github.com/aws/aws-sdk-go-v2/pull/801))
+ * Fixes xml deserialization util to correctly handle empty response body in case of an error response.
+* `service/s3`: Add customization to auto fill Content-Md5 request header for Amazon S3 operations ([#812](https://github.com/aws/aws-sdk-go-v2/pull/812))
+* `service/s3`: Add fallback to using HTTP status code for error code ([#818](https://github.com/aws/aws-sdk-go-v2/pull/818))
+ * Adds falling back to using the HTTP status code to create a API Error code when not error code is received from the service, such as HeadObject.
+* `service/route53`: Add support for deserialzing `InvalidChangeBatch` API error ([#792](https://github.com/aws/aws-sdk-go-v2/pull/792))
+* `codegen`: Remove API client `Options` getter methods ([#788](https://github.com/aws/aws-sdk-go-v2/pull/788))
+* `codegen`: Regenerate API Client modeled endpoints ([#791](https://github.com/aws/aws-sdk-go-v2/pull/791))
+* `codegen`: Sort API Client struct member paramaters by required and alphabetical ([#787](https://github.com/aws/aws-sdk-go-v2/pull/787))
+* `codegen`: Add package docs to API client modules ([#821](https://github.com/aws/aws-sdk-go-v2/pull/821))
+* `codegen`: Rename `smithy-go`'s `smithy.OperationError` to `smithy.OperationInvokeError`.
+
+## Core SDK Highlights
+* `config`:
+ * Bumped to `v0.2.0`
+ * Refactor Config Module, Add Config Package Documentation and Examples, Improve Overall SDK Readme ([#822](https://github.com/aws/aws-sdk-go-v2/pull/822))
+* `credentials`:
+ * Bumped to `v0.1.2`
+ * Strip Monotonic Clock Readings when Comparing Credential Expiry Time ([#789](https://github.com/aws/aws-sdk-go-v2/pull/789))
+* `ec2imds`:
+ * Bumped to `v0.1.2`
+ * Fix refreshing API token if expired ([#789](https://github.com/aws/aws-sdk-go-v2/pull/789))
+
+## Migrating from v0.26.0 to v0.27.0
+
+#### Configuration
+
+The `config` module's exported types were trimmed down to add clarity and reduce confusion. Additional changes to the `config` module' helpers.
+
+* Refactored `WithCredentialsProvider`, `WithHTTPClient`, and `WithEndpointResolver` to functions instead of structs.
+* Removed `MFATokenFuncProvider`, use `AssumeRoleCredentialOptionsProvider` for setting options for `stscreds.AssumeRoleOptions`.
+* Renamed `WithWebIdentityCredentialProviderOptions` to `WithWebIdentityRoleCredentialOptions`
+* Renamed `AssumeRoleCredentialProviderOptions` to `AssumeRoleCredentialOptionsProvider`
+* Renamed `EndpointResolverFuncProvider` to `EndpointResolverProvider`
+
+#### API Client
+* API Client `Options` type getter methods have been removed. Use the struct members instead.
+* The error returned by API Client operations was renamed from `smithy.OperationError` to `smithy.OperationInvokeError`.
+
+# Release 2020-09-30
+
+## Service Client Highlights
+* Service clients have been bumped to `v0.26.0` simplify the documentation experience when using [pkg.go.dev](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2).
+* `service/s3`: Disable automatic decompression of getting Amazon S3 objects with the `Content-Encoding: gzip` metadata header. ([#748](https://github.com/aws/aws-sdk-go-v2/pull/748))
+ * This changes the SDK's default behavior with regard to making S3 API calls. The client will no longer automatically set the `Accept-Encoding` HTTP request header, nor will it automatically decompress the gzipped response when the `Content-Encoding: gzip` response header was received.
+ * If you'd like the client to sent the `Accept-Encoding: gzip` request header, you can add this header to the API operation method call with the [SetHeaderValue](https://pkg.go.dev/github.com/awslabs/smithy-go/transport/http#SetHeaderValue). middleware helper.
+* `service/cloudfront/sign`: Fix cloudfront example usage of SignWithPolicy ([#673](https://github.com/aws/aws-sdk-go-v2/pull/673))
+ * Fixes [#671](https://github.com/aws/aws-sdk-go-v2/issues/671) documentation typo by correcting the usage of `SignWithPolicy`.
+
+## Core SDK Highlights
+* SDK core module released at `v0.26.0`
+* `config` module released at `v0.1.1`
+* `credentials` module released at `v0.1.1`
+* `ec2imds` module released at `v0.1.1`
+
+
+# Release 2020-09-28
+## Announcements
+We’re happy to share the updated clients for the v0.25.0 preview version of the AWS SDK for Go V2.
+
+The updated clients leverage new developments and advancements within AWS and the Go software ecosystem at large since
+our original preview announcement. Using the new clients will be a bit different than before. The key differences are:
+simplified API operation invocation, performance improvements, support for error wrapping, and a new middleware architecture.
+So below we have a guided walkthrough to help try it out and share your feedback in order to better influence the features
+you’d like to see in the GA version.
+
+See [Announcement Blog Post](https://aws.amazon.com/blogs/developer/client-updates-in-the-preview-version-of-the-aws-sdk-for-go-v2/) for more details.
+
+## Service Client Highlights
+* Initial service clients released at version `v0.1.0`
+## Core SDK Highlights
+* SDK core module released at `v0.25.0`
+* `config` module released at `v0.1.0`
+* `credentials` module released at `v0.1.0`
+* `ec2imds` module released at `v0.1.0`
+
+## Migrating from v2 preview SDK's v0.24.0 to v0.25.0
+
+#### Design changes
+
+The v2 preview SDK `v0.25.0` release represents a significant stepping stone bringing the v2 SDK closer to its target design and usability. This release includes significant breaking changes to the v2 preview SDK. The updates in the `v0.25.0` release focus on refactoring and modularization of the SDK’s API clients to use the new [client design](https://github.com/aws/aws-sdk-go-v2/issues/438), updated request pipeline (aka [middleware](https://pkg.go.dev/github.com/awslabs/smithy-go/middleware)), refactored [credential providers](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/credentials), and [configuration loading](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/config) packages.
+
+We've also bumped the minimum supported Go version with this release. Starting with v0.25.0 the SDK requires a minimum version of Go `v1.15`.
+
+As a part of the refactoring done to v2 preview SDK some components have not been included in this update. The following is a non exhaustive list of features that are not available.
+
+* API Paginators - [#439](https://github.com/aws/aws-sdk-go-v2/issues/439)
+* API Waiters - [#442](https://github.com/aws/aws-sdk-go-v2/issues/442)
+* Presign URL - [#794](https://github.com/aws/aws-sdk-go-v2/issues/794)
+* Amazon S3 Upload and Download manager - [#802](https://github.com/aws/aws-sdk-go-v2/pull/802)
+* Amazon DynamoDB's AttributeValue marshaler, and Expression package - [#790](https://github.com/aws/aws-sdk-go-v2/issues/790)
+* Debug Logging - [#594](https://github.com/aws/aws-sdk-go-v2/issues/594)
+
+We expect additional breaking changes to the v2 preview SDK in the coming releases. We expect these changes to focus on organizational, naming, and hardening the SDK's design for future feature capabilities after it is released for general availability.
+
+
+#### Relocated Packages
+
+In this release packages within the SDK were relocated, and in some cases those packages were converted to Go modules. The following is a list of packages have were relocated.
+
+* `github.com/aws/aws-sdk-go-v2/aws/external` => `github.com/aws/aws-sdk-go-v2/config` module
+* `github.com/aws/aws-sdk-go-v2/aws/ec2metadata` => `github.com/aws/aws-sdk-go-v2/ec2imds` module
+
+The `github.com/aws/aws-sdk-go-v2/credentials` module contains refactored credentials providers.
+
+* `github.com/aws/aws-sdk-go-v2/ec2rolecreds` => `github.com/aws/aws-sdk-go-v2/credentials/ec2rolecreds`
+* `github.com/aws/aws-sdk-go-v2/endpointcreds` => `github.com/aws/aws-sdk-go-v2/credentials/endpointcreds`
+* `github.com/aws/aws-sdk-go-v2/processcreds` => `github.com/aws/aws-sdk-go-v2/credentials/processcreds`
+* `github.com/aws/aws-sdk-go-v2/stscreds` => `github.com/aws/aws-sdk-go-v2/credentials/stscreds`
+
+
+#### Modularization
+
+New modules were added to the v2 preview SDK to allow the components to be versioned independently from each other. This allows your application to depend on specific versions of an API client module, and take discrete updates from the SDK core and other API client modules as desired.
+
+* [github.com/aws/aws-sdk-go-v2/config](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/config)
+* [github.com/aws/aws-sdk-go-v2/credentials](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/credentials)
+* Module for each API client, e.g. [github.com/aws/aws-sdk-go-v2/service/s3](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/s3)
+
+
+#### API Clients
+
+The following is a list of the major changes to the API client modules
+
+* Removed paginators: we plan to add these back once they are implemented to integrate with the SDK's new API client design.
+* Removed waiters: we need to further investigate how the V2 SDK should expose waiters, and how their behavior should be modeled.
+* API Clients are now Go modules. When migrating to the v2 preview SDK `v0.25.0`, you'll need to add the API client's module to your application's go.mod file.
+* API parameter nested types have been moved to a `types` package within the API client's module, e.g. `github.com/aws/aws-sdk-go-v2/service/s3/types` These types were moved to improve documentation and discovery of the API client, operation, and input/output types. For example Amazon S3's ListObject's operation [ListObjectOutput.Contents](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/s3/#ListObjectsOutput) input parameter is a slice of [types.Object](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/s3/types#Object).
+* The client operation method has been renamed, removing the `Request` suffix. The method now invokes the operation instead of constructing a request, which needed to be invoked separately. The operation methods were also expanded to include functional options for providing operation specific configuration, such as modifying the request pipeline.
+
+```go
+result, err := client.Scan(context.TODO(), &dynamodb.ScanInput{
+ TableName: aws.String("exampleTable"),
+}, func(o *Options) {
+ // Limit operation calls to only 1 attempt.
+ o.Retryer = retry.AddWithMaxAttempts(o.Retryer, 1)
+})
+```
+
+
+#### Configuration
+
+In addition to the `github.com/aws/aws-sdk-go-v2/aws/external` package being made a module at `github.com/aws/aws-sdk-go-v2/config`, the `LoadDefaultAWSConfig` function was renamed to `LoadDefaultConfig`.
+
+The `github.com/aws/aws-sdk-go-v2/aws/defaults` package has been removed. Its components have been migrated to the `github.com/aws/aws-sdk-go-v2/aws` package, and `github.com/aws/aws-sdk-go-v2/config` module.
+
+
+#### Error Handling
+
+The `github.com/aws/aws-sdk-go-v2/aws/awserr` package was removed as a part of the SDK error handling refactor. The SDK now uses typed errors built around [Go v1.13](https://golang.org/doc/go1.13#error_wrapping)'s [errors.As](https://pkg.go.dev/errors#As) and [errors.Unwrap](https://pkg.go.dev/errors#Unwrap) features. All SDK error types that wrap other errors implement the `Unwrap` method. Generic v2 preview SDK errors created with `fmt.Errorf` use `%w` to wrap the underlying error.
+
+The SDK API clients now include generated public error types for errors modeled for an API. The SDK will automatically deserialize the error response from the API into the appropriate error type. Your application should use `errors.As` to check if the returned error matches one it is interested in. Your application can also use the generic interface [smithy.APIError](https://pkg.go.dev/github.com/awslabs/smithy-go/#APIError) to test if the API client's operation method returned an API error, but not check against a specific error.
+
+API client errors returned to the caller will use error wrapping to layer the error values. This allows underlying error types to be specific to their use case, and the SDK's more generic error types to wrap the underlying error.
+
+For example, if an [Amazon DynamoDB](https://aws.amazon.com/dynamodb/) [Scan](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/dynamodb#Scan) operation call cannot find the `TableName` requested, the error returned will contain [dynamodb.ResourceNotFoundException](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/dynamodb/types#ResourceNotFoundException). The SDK will return this error value wrapped in a couple layers, with each layer adding additional contextual information such as [ResponseError](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/aws/transport/http#ResponseError) for AWS HTTP response error metadata , and [smithy.OperationError](https://pkg.go.dev/github.com/awslabs/smithy-go/#OperationError) for API operation call metadata.
+
+```go
+result, err := client.Scan(context.TODO(), params)
+if err != nil {
+ // To get a specific API error
+ var notFoundErr *types.ResourceNotFoundException
+ if errors.As(err, ¬FoundErr) {
+ log.Printf("scan failed because the table was not found, %v",
+ notFoundErr.ErrorMessage())
+ }
+
+ // To get any API error
+ var apiErr smithy.APIError
+ if errors.As(err, &apiErr) {
+ log.Printf("scan failed because of an API error, Code: %v, Message: %v",
+ apiErr.ErrorCode(), apiErr.ErrorMessage())
+ }
+
+ // To get the AWS response metadata, such as RequestID
+ var respErr *awshttp.ResponseError // Using import alias "awshttp" for package github.com/aws/aws-sdk-go-v2/aws/transport/http
+ if errors.As(err, &respErr) {
+ log.Printf("scan failed with HTTP status code %v, Request ID %v and error %v",
+ respErr.HTTPStatusCode(), respErr.ServiceRequestID(), respErr)
+ }
+
+ return err
+}
+```
+
+Logging an error value will include information from each wrapped error. For example, the following is a mock error logged for a Scan operation call that failed because the table was not found.
+
+> 2020/10/15 16:03:37 operation error DynamoDB: Scan, https response error StatusCode: 400, RequestID: ABCREQUESTID123, ResourceNotFoundException: Requested resource not found
+
+
+#### Endpoints
+
+The `github.com/aws/aws-sdk-go-v2/aws/endpoints` has been removed from the SDK, along with all exported endpoint definitions and iteration behavior. Each generated API client now includes its own endpoint definition internally to the module.
+
+API clients can optionally be configured with a generic [aws.EndpointResolver](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/aws#EndpointResolver) via the [aws.Config.EndpointResolver](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/aws#Config.EndpointResolver). If the API client is not configured with a custom endpoint resolver it will defer to the endpoint resolver the client module was generated with.
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/CODE_OF_CONDUCT.md b/vendor/github.com/aws/aws-sdk-go-v2/CODE_OF_CONDUCT.md
new file mode 100644
index 00000000..3b644668
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/CODE_OF_CONDUCT.md
@@ -0,0 +1,4 @@
+## Code of Conduct
+This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct).
+For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact
+opensource-codeofconduct@amazon.com with any additional questions or comments.
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/CONTRIBUTING.md b/vendor/github.com/aws/aws-sdk-go-v2/CONTRIBUTING.md
new file mode 100644
index 00000000..c2fc3b8f
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/CONTRIBUTING.md
@@ -0,0 +1,178 @@
+# Contributing to the AWS SDK for Go
+
+Thank you for your interest in contributing to the AWS SDK for Go!
+We work hard to provide a high-quality and useful SDK, and we greatly value
+feedback and contributions from our community. Whether it's a bug report,
+new feature, correction, or additional documentation, we welcome your issues
+and pull requests. Please read through this document before submitting any
+[issues] or [pull requests][pr] to ensure we have all the necessary information to
+effectively respond to your bug report or contribution.
+
+Jump To:
+
+* [Bug Reports](#bug-reports)
+* [Feature Requests](#feature-requests)
+* [Code Contributions](#code-contributions)
+
+
+## How to contribute
+
+*Before you send us a pull request, please be sure that:*
+
+1. You're working from the latest source on the master branch.
+2. You check existing open, and recently closed, pull requests to be sure
+ that someone else hasn't already addressed the problem.
+3. You create an issue before working on a contribution that will take a
+ significant amount of your time.
+
+*Creating a Pull Request*
+
+1. Fork the repository.
+2. In your fork, make your change in a branch that's based on this repo's master branch.
+3. Commit the change to your fork, using a clear and descriptive commit message.
+4. Create a pull request, answering any questions in the pull request form.
+
+For contributions that will take a significant amount of time, open a new
+issue to pitch your idea before you get started. Explain the problem and
+describe the content you want to see added to the documentation. Let us know
+if you'll write it yourself or if you'd like us to help. We'll discuss your
+proposal with you and let you know whether we're likely to accept it.
+
+## Bug Reports
+
+You can file bug reports against the SDK on the [GitHub issues][issues] page.
+
+If you are filing a report for a bug or regression in the SDK, it's extremely
+helpful to provide as much information as possible when opening the original
+issue. This helps us reproduce and investigate the possible bug without having
+to wait for this extra information to be provided. Please read the following
+guidelines prior to filing a bug report.
+
+1. Search through existing [issues][] to ensure that your specific issue has
+ not yet been reported. If it is a common issue, it is likely there is
+ already a bug report for your problem.
+
+2. Ensure that you have tested the latest version of the SDK. Although you
+ may have an issue against an older version of the SDK, we cannot provide
+ bug fixes for old versions. It's also possible that the bug may have been
+ fixed in the latest release.
+
+3. Provide as much information about your environment, SDK version, and
+ relevant dependencies as possible. For example, let us know what version
+ of Go you are using, which and version of the operating system, and the
+ the environment your code is running in. e.g Container.
+
+4. Provide a minimal test case that reproduces your issue or any error
+ information you related to your problem. We can provide feedback much
+ more quickly if we know what operations you are calling in the SDK. If
+ you cannot provide a full test case, provide as much code as you can
+ to help us diagnose the problem. Any relevant information should be provided
+ as well, like whether this is a persistent issue, or if it only occurs
+ some of the time.
+
+## Feature Requests
+
+Open an [issue][issues] with the following:
+
+* A short, descriptive title. Ideally, other community members should be able
+ to get a good idea of the feature just from reading the title.
+* A detailed description of the the proposed feature.
+ * Why it should be added to the SDK.
+ * If possible, example code to illustrate how it should work.
+* Use Markdown to make the request easier to read;
+* If you intend to implement this feature, indicate that you'd like to the issue to be assigned to you.
+
+## Code Contributions
+
+We are always happy to receive code and documentation contributions to the SDK.
+Please be aware of the following notes prior to opening a pull request:
+
+1. The SDK is released under the [Apache license][license]. Any code you submit
+ will be released under that license. For substantial contributions, we may
+ ask you to sign a [Contributor License Agreement (CLA)][cla].
+
+2. If you would like to implement support for a significant feature that is not
+ yet available in the SDK, please talk to us beforehand to avoid any
+ duplication of effort.
+
+3. Wherever possible, pull requests should contain tests as appropriate.
+ Bugfixes should contain tests that exercise the corrected behavior (i.e., the
+ test should fail without the bugfix and pass with it), and new features
+ should be accompanied by tests exercising the feature.
+
+4. Pull requests that contain failing tests will not be merged until the test
+ failures are addressed. Pull requests that cause a significant drop in the
+ SDK's test coverage percentage are unlikely to be merged until tests have
+ been added.
+
+5. The JSON files under the SDK's `models` folder are sourced from outside the SDK.
+ Such as `models/apis/ec2/2016-11-15/api.json`. We will not accept pull requests
+ directly on these models. If you discover an issue with the models please
+ create a [GitHub issue][issues] describing the issue.
+
+### Testing
+
+To run the tests locally, running the `make unit` command will `go get` the
+SDK's testing dependencies, and run vet, link and unit tests for the SDK.
+
+```
+make unit
+```
+
+Standard go testing functionality is supported as well. To test SDK code that
+is tagged with `codegen` you'll need to set the build tag in the go test
+command. The `make unit` command will do this automatically.
+
+```
+go test -tags codegen ./private/...
+```
+
+See the `Makefile` for additional testing tags that can be used in testing.
+
+To test on multiple platform the SDK includes several DockerFiles under the
+`awstesting/sandbox` folder, and associated make recipes to to execute
+unit testing within environments configured for specific Go versions.
+
+```
+make sandbox-test-go18
+```
+
+To run all sandbox environments use the following make recipe
+
+```
+# Optionally update the Go tip that will be used during the batch testing
+make update-aws-golang-tip
+
+# Run all SDK tests for supported Go versions in sandboxes
+make sandbox-test
+```
+
+In addition the sandbox environment include make recipes for interactive modes
+so you can run command within the Docker container and context of the SDK.
+
+```
+make sandbox-go18
+```
+
+### Changelog Documents
+
+You can see all release changes in the `CHANGELOG.md` file at the root of the
+repository. The release notes added to this file will contain service client
+updates, and major SDK changes. When submitting a pull request please include an entry in `CHANGELOG_PENDING.md` under the appropriate changelog type so your changelog entry is included on the following release.
+
+#### Changelog Types
+
+* `SDK Features` - For major additive features, internal changes that have
+outward impact, or updates to the SDK foundations. This will result in a minor
+version change.
+* `SDK Enhancements` - For minor additive features or incremental sized changes.
+This will result in a patch version change.
+* `SDK Bugs` - For minor changes that resolve an issue. This will result in a
+patch version change.
+
+[issues]: https://github.com/aws/aws-sdk-go/issues
+[pr]: https://github.com/aws/aws-sdk-go/pulls
+[license]: http://aws.amazon.com/apache2.0/
+[cla]: http://en.wikipedia.org/wiki/Contributor_License_Agreement
+[releasenotes]: https://github.com/aws/aws-sdk-go/releases
+
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/DESIGN.md b/vendor/github.com/aws/aws-sdk-go-v2/DESIGN.md
new file mode 100644
index 00000000..8490c7d6
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/DESIGN.md
@@ -0,0 +1,15 @@
+Open Discussions
+---
+The following issues are currently open for community feedback.
+All discourse must adhere to the [Code of Conduct] policy.
+
+* [Refactoring API Client Paginators](https://github.com/aws/aws-sdk-go-v2/issues/439)
+* [Refactoring API Client Waiters](https://github.com/aws/aws-sdk-go-v2/issues/442)
+* [Refactoring API Client Enums and Types to Discrete Packages](https://github.com/aws/aws-sdk-go-v2/issues/445)
+* [SDK Modularization](https://github.com/aws/aws-sdk-go-v2/issues/444)
+
+Past Discussions
+---
+The issues listed here are for documentation purposes, and is used to capture issues and their associated discussions.
+
+[Code of Conduct]: https://github.com/aws/aws-sdk-go-v2/blob/master/CODE_OF_CONDUCT.md
diff --git a/vendor/github.com/aws/aws-sdk-go/LICENSE.txt b/vendor/github.com/aws/aws-sdk-go-v2/LICENSE.txt
similarity index 100%
rename from vendor/github.com/aws/aws-sdk-go/LICENSE.txt
rename to vendor/github.com/aws/aws-sdk-go-v2/LICENSE.txt
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/Makefile b/vendor/github.com/aws/aws-sdk-go-v2/Makefile
new file mode 100644
index 00000000..c7d29055
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/Makefile
@@ -0,0 +1,465 @@
+# Lint rules to ignore
+LINTIGNORESINGLEFIGHT='internal/sync/singleflight/singleflight.go:.+error should be the last type'
+
+UNIT_TEST_TAGS=
+BUILD_TAGS=-tags "example,codegen,integration,ec2env,perftest"
+
+SMITHY_GO_SRC ?= $(shell pwd)/../smithy-go
+
+SDK_MIN_GO_VERSION ?= 1.15
+
+EACHMODULE_FAILFAST ?= true
+EACHMODULE_FAILFAST_FLAG=-fail-fast=${EACHMODULE_FAILFAST}
+
+EACHMODULE_CONCURRENCY ?= 1
+EACHMODULE_CONCURRENCY_FLAG=-c ${EACHMODULE_CONCURRENCY}
+
+EACHMODULE_SKIP ?=
+EACHMODULE_SKIP_FLAG=-skip="${EACHMODULE_SKIP}"
+
+EACHMODULE_FLAGS=${EACHMODULE_CONCURRENCY_FLAG} ${EACHMODULE_FAILFAST_FLAG} ${EACHMODULE_SKIP_FLAG}
+
+# SDK's Core and client packages that are compatable with Go 1.9+.
+SDK_CORE_PKGS=./aws/... ./internal/...
+SDK_CLIENT_PKGS=./service/...
+SDK_COMPA_PKGS=${SDK_CORE_PKGS} ${SDK_CLIENT_PKGS}
+
+# SDK additional packages that are used for development of the SDK.
+SDK_EXAMPLES_PKGS=
+SDK_ALL_PKGS=${SDK_COMPA_PKGS} ${SDK_EXAMPLES_PKGS}
+
+RUN_NONE=-run NONE
+RUN_INTEG=-run '^TestInteg_'
+
+CODEGEN_RESOURCES_PATH=$(shell pwd)/codegen/smithy-aws-go-codegen/src/main/resources/software/amazon/smithy/aws/go/codegen
+CODEGEN_API_MODELS_PATH=$(shell pwd)/codegen/sdk-codegen/aws-models
+ENDPOINTS_JSON=${CODEGEN_RESOURCES_PATH}/endpoints.json
+ENDPOINT_PREFIX_JSON=${CODEGEN_RESOURCES_PATH}/endpoint-prefix.json
+
+LICENSE_FILE=$(shell pwd)/LICENSE.txt
+
+RELEASE_MANIFEST_FILE ?=
+RELEASE_CHGLOG_DESC_FILE ?=
+
+.PHONY: all
+all: generate unit
+
+###################
+# Code Generation #
+###################
+.PHONY: generate smithy-generate smithy-build smithy-build-% smithy-clean smithy-go-publish-local format \
+gen-config-asserts gen-repo-mod-replace gen-mod-replace-smithy gen-mod-dropreplace-smithy gen-aws-ptrs tidy-modules-% \
+add-module-license-files sync-models sync-endpoints-model sync-endpoints.json clone-v1-models gen-endpoint-prefix.json \
+sync-api-models copy-attributevalue-feature min-go-version-% update-requires smithy-annotate-stable \
+update-module-metadata download-modules-%
+
+generate: smithy-generate update-requires gen-repo-mod-replace update-module-metadata smithy-annotate-stable \
+gen-config-asserts copy-attributevalue-feature gen-mod-dropreplace-smithy min-go-version-. tidy-modules-. \
+add-module-license-files gen-aws-ptrs format
+
+smithy-generate:
+ cd codegen && ./gradlew clean build -Plog-tests && ./gradlew clean
+
+smithy-build: gen-repo-mod-replace
+ cd codegen && ./gradlew clean build -Plog-tests
+
+smithy-build-%: gen-repo-mod-replace
+ @# smithy-build- command that uses the pattern to define build filter that
+ @# the smithy API model service id starts with. Strips off the
+ @# "smithy-build-".
+ @#
+ @# e.g. smithy-build-com.amazonaws.rds
+ @# e.g. smithy-build-com.amazonaws.rds#AmazonRDSv19
+ cd codegen && \
+ SMITHY_GO_BUILD_API="$(subst smithy-build-,,$@)" ./gradlew clean build -Plog-tests
+
+smithy-annotate-stable:
+ cd ./internal/repotools && \
+ go run ./cmd/annotatestablegen
+
+smithy-clean:
+ cd codegen && ./gradlew clean
+
+smithy-go-publish-local:
+ rm -rf /tmp/smithy-go-local
+ git clone https://github.com/aws/smithy-go /tmp/smithy-go-local
+ make -C /tmp/smithy-go-local smithy-clean smithy-publish-local
+
+format:
+ gofmt -w -s .
+
+gen-config-asserts:
+ @echo "Generating SDK config package implementor assertions"
+ cd config \
+ && go mod tidy \
+ && go generate
+
+gen-repo-mod-replace:
+ @echo "Generating go.mod replace for repo modules"
+ cd internal/repotools/cmd/makerelative && go run ./
+
+gen-mod-replace-smithy:
+ cd ./internal/repotools/cmd/eachmodule \
+ && go run . "go mod edit -replace github.com/aws/smithy-go=${SMITHY_GO_SRC}"
+
+gen-mod-dropreplace-smithy:
+ cd ./internal/repotools/cmd/eachmodule \
+ && go run . "go mod edit -dropreplace github.com/aws/smithy-go"
+
+gen-aws-ptrs:
+ cd aws && go generate
+
+tidy-modules-%:
+ @# tidy command that uses the pattern to define the root path that the
+ @# module testing will start from. Strips off the "tidy-modules-" and
+ @# replaces all "_" with "/".
+ @#
+ @# e.g. tidy-modules-internal_protocoltest
+ cd ./internal/repotools/cmd/eachmodule \
+ && go run . -p $(subst _,/,$(subst tidy-modules-,,$@)) ${EACHMODULE_FLAGS} \
+ "go mod tidy"
+
+download-modules-%:
+ @# download command that uses the pattern to define the root path that the
+ @# module testing will start from. Strips off the "download-modules-" and
+ @# replaces all "_" with "/".
+ @#
+ @# e.g. download-modules-internal_protocoltest
+ cd ./internal/repotools/cmd/eachmodule \
+ && go run . -p $(subst _,/,$(subst download-modules-,,$@)) ${EACHMODULE_FLAGS} \
+ "go mod download all"
+
+add-module-license-files:
+ cd internal/repotools/cmd/eachmodule && \
+ go run . -skip-root \
+ "cp $(LICENSE_FILE) ."
+
+sync-models: sync-endpoints-model sync-api-models
+
+sync-endpoints-model: sync-endpoints.json gen-endpoint-prefix.json
+
+sync-endpoints.json:
+ [[ ! -z "${ENDPOINTS_MODEL}" ]] && cp ${ENDPOINTS_MODEL} ${ENDPOINTS_JSON} || echo "ENDPOINTS_MODEL not set, must not be empty"
+
+clone-v1-models:
+ rm -rf /tmp/aws-sdk-go-model-sync
+ git clone https://github.com/aws/aws-sdk-go.git --depth 1 /tmp/aws-sdk-go-model-sync
+
+gen-endpoint-prefix.json: clone-v1-models
+ cd internal/repotools/cmd/endpointPrefix && \
+ go run . \
+ -m '/tmp/aws-sdk-go-model-sync/models/apis/*/*/api-2.json' \
+ -o ${ENDPOINT_PREFIX_JSON}
+
+sync-api-models:
+ cd internal/repotools/cmd/syncAPIModels && \
+ go run . \
+ -m ${API_MODELS} \
+ -o ${CODEGEN_API_MODELS_PATH}
+
+copy-attributevalue-feature:
+ cd ./feature/dynamodbstreams/attributevalue && \
+ find . -name "*.go" | grep -v "doc.go" | xargs -I % rm % && \
+ find ../../dynamodb/attributevalue -name "*.go" | grep -v "doc.go" | xargs -I % cp % . && \
+ ls *.go | grep -v "convert.go" | grep -v "doc.go" | \
+ xargs -I % sed -i.bk -E 's:github.com/aws/aws-sdk-go-v2/(service|feature)/dynamodb:github.com/aws/aws-sdk-go-v2/\1/dynamodbstreams:g' % && \
+ ls *.go | grep -v "convert.go" | grep -v "doc.go" | \
+ xargs -I % sed -i.bk 's:DynamoDB:DynamoDBStreams:g' % && \
+ ls *.go | grep -v "doc.go" | \
+ xargs -I % sed -i.bk 's:dynamodb\.:dynamodbstreams.:g' % && \
+ sed -i.bk 's:streams\.:ddbtypes.:g' "convert.go" && \
+ sed -i.bk 's:ddb\.:streams.:g' "convert.go" && \
+ sed -i.bk 's:ddbtypes\.:ddb.:g' "convert.go" &&\
+ sed -i.bk 's:Streams::g' "convert.go" && \
+ rm -rf ./*.bk && \
+ go mod tidy && \
+ gofmt -w -s . && \
+ go test .
+
+min-go-version-%:
+ cd ./internal/repotools/cmd/eachmodule \
+ && go run . -p $(subst _,/,$(subst min-go-version-,,$@)) ${EACHMODULE_FLAGS} \
+ "go mod edit -go=${SDK_MIN_GO_VERSION}"
+
+update-requires:
+ cd ./internal/repotools && \
+ go run ./cmd/updaterequires
+
+update-module-metadata:
+ cd ./internal/repotools && \
+ go run ./cmd/updatemodulemeta
+
+################
+# Unit Testing #
+################
+.PHONY: unit unit-race unit-test unit-race-test unit-race-modules-% unit-modules-% build build-modules-% \
+go-build-modules-% test test-race-modules-% test-modules-% cachedep cachedep-modules-% api-diff-modules-%
+
+unit: lint unit-modules-.
+unit-race: lint unit-race-modules-.
+
+unit-test: test-modules-.
+unit-race-test: test-race-modules-.
+
+unit-race-modules-%:
+ @# unit command that uses the pattern to define the root path that the
+ @# module testing will start from. Strips off the "unit-race-modules-" and
+ @# replaces all "_" with "/".
+ @#
+ @# e.g. unit-race-modules-internal_protocoltest
+ cd ./internal/repotools/cmd/eachmodule \
+ && go run . -p $(subst _,/,$(subst unit-race-modules-,,$@)) ${EACHMODULE_FLAGS} \
+ "go vet ${BUILD_TAGS} --all ./..." \
+ "go test ${BUILD_TAGS} ${RUN_NONE} ./..." \
+ "go test -timeout=1m ${UNIT_TEST_TAGS} -race -cpu=4 ./..."
+
+
+unit-modules-%:
+ @# unit command that uses the pattern to define the root path that the
+ @# module testing will start from. Strips off the "unit-modules-" and
+ @# replaces all "_" with "/".
+ @#
+ @# e.g. unit-modules-internal_protocoltest
+ cd ./internal/repotools/cmd/eachmodule \
+ && go run . -p $(subst _,/,$(subst unit-modules-,,$@)) ${EACHMODULE_FLAGS} \
+ "go vet ${BUILD_TAGS} --all ./..." \
+ "go test ${BUILD_TAGS} ${RUN_NONE} ./..." \
+ "go test -timeout=1m ${UNIT_TEST_TAGS} ./..."
+
+build: build-modules-.
+
+build-modules-%:
+ @# build command that uses the pattern to define the root path that the
+ @# module testing will start from. Strips off the "build-modules-" and
+ @# replaces all "_" with "/".
+ @#
+ @# e.g. build-modules-internal_protocoltest
+ cd ./internal/repotools/cmd/eachmodule \
+ && go run . -p $(subst _,/,$(subst build-modules-,,$@)) ${EACHMODULE_FLAGS} \
+ "go test ${BUILD_TAGS} ${RUN_NONE} ./..."
+
+go-build-modules-%:
+ @# build command that uses the pattern to define the root path that the
+ @# module testing will start from. Strips off the "build-modules-" and
+ @# replaces all "_" with "/".
+ @#
+ @# Validates that all modules in the repo have buildable Go files.
+ @#
+ @# e.g. go-build-modules-internal_protocoltest
+ cd ./internal/repotools/cmd/eachmodule \
+ && go run . -p $(subst _,/,$(subst go-build-modules-,,$@)) ${EACHMODULE_FLAGS} \
+ "go build ${BUILD_TAGS} ./..."
+
+test: test-modules-.
+
+test-race-modules-%:
+ @# Test command that uses the pattern to define the root path that the
+ @# module testing will start from. Strips off the "test-race-modules-" and
+ @# replaces all "_" with "/".
+ @#
+ @# e.g. test-race-modules-internal_protocoltest
+ cd ./internal/repotools/cmd/eachmodule \
+ && go run . -p $(subst _,/,$(subst test-race-modules-,,$@)) ${EACHMODULE_FLAGS} \
+ "go test -timeout=1m ${UNIT_TEST_TAGS} -race -cpu=4 ./..."
+
+test-modules-%:
+ @# Test command that uses the pattern to define the root path that the
+ @# module testing will start from. Strips off the "test-modules-" and
+ @# replaces all "_" with "/".
+ @#
+ @# e.g. test-modules-internal_protocoltest
+ cd ./internal/repotools/cmd/eachmodule \
+ && go run . -p $(subst _,/,$(subst test-modules-,,$@)) ${EACHMODULE_FLAGS} \
+ "go test -timeout=1m ${UNIT_TEST_TAGS} ./..."
+
+cachedep: cachedep-modules-.
+
+cachedep-modules-%:
+ @# build command that uses the pattern to define the root path that the
+ @# module caching will start from. Strips off the "cachedep-modules-" and
+ @# replaces all "_" with "/".
+ @#
+ @# e.g. cachedep-modules-internal_protocoltest
+ cd ./internal/repotools/cmd/eachmodule \
+ && go run . -p $(subst _,/,$(subst cachedep-modules-,,$@)) ${EACHMODULE_FLAGS} \
+ "go mod download"
+
+api-diff-modules-%:
+ @# Command that uses the pattern to define the root path that the
+ @# module testing will start from. Strips off the "api-diff-modules-" and
+ @# replaces all "_" with "/".
+ @#
+ @# Requires golang.org/x/exp/cmd/gorelease to be available in the GOPATH.
+ @#
+ @# e.g. api-diff-modules-internal_protocoltest
+ cd ./internal/repotools/cmd/eachmodule \
+ && go run . -p $(subst _,/,$(subst api-diff-modules-,,$@)) \
+ -fail-fast=true \
+ -c 1 \
+ -skip="internal/repotools" \
+ "$$(go env GOPATH)/bin/gorelease"
+
+##############
+# CI Testing #
+##############
+.PHONY: ci-test ci-test-no-generate ci-test-generate-validate
+
+ci-test: generate unit-race ci-test-generate-validate
+ci-test-no-generate: unit-race
+
+ci-test-generate-validate:
+ @echo "CI test validate no generated code changes"
+ git update-index --assume-unchanged go.mod go.sum
+ git add . -A
+ gitstatus=`git diff --cached --ignore-space-change`; \
+ echo "$$gitstatus"; \
+ if [ "$$gitstatus" != "" ] && [ "$$gitstatus" != "skipping validation" ]; then echo "$$gitstatus"; exit 1; fi
+ git update-index --no-assume-unchanged go.mod go.sum
+
+ci-lint: ci-lint-.
+
+ci-lint-%:
+ @# Run golangci-lint command that uses the pattern to define the root path that the
+ @# module check will start from. Strips off the "ci-lint-" and
+ @# replaces all "_" with "/".
+ @#
+ @# e.g. ci-lint-internal_protocoltest
+ cd ./internal/repotools/cmd/eachmodule \
+ && go run . -p $(subst _,/,$(subst ci-lint-,,$@)) \
+ -fail-fast=false \
+ -c 1 \
+ -skip="internal/repotools" \
+ "golangci-lint run"
+
+ci-lint-install:
+ @# Installs golangci-lint at GoPATH.
+ @# This should be used to run golangci-lint locally.
+ @#
+ go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
+
+#######################
+# Integration Testing #
+#######################
+.PHONY: integration integ-modules-% cleanup-integ-buckets
+
+integration: integ-modules-service
+
+integ-modules-%:
+ @# integration command that uses the pattern to define the root path that
+ @# the module testing will start from. Strips off the "integ-modules-" and
+ @# replaces all "_" with "/".
+ @#
+ @# e.g. test-modules-service_dynamodb
+ cd ./internal/repotools/cmd/eachmodule \
+ && go run . -p $(subst _,/,$(subst integ-modules-,,$@)) ${EACHMODULE_FLAGS} \
+ "go test -timeout=10m -tags "integration" -v ${RUN_INTEG} -count 1 ./..."
+
+cleanup-integ-buckets:
+ @echo "Cleaning up SDK integration resources"
+ go run -tags "integration" ./internal/awstesting/cmd/bucket_cleanup/main.go "aws-sdk-go-integration"
+
+##############
+# Benchmarks #
+##############
+.PHONY: bench bench-modules-%
+
+bench: bench-modules-.
+
+bench-modules-%:
+ @# benchmark command that uses the pattern to define the root path that
+ @# the module testing will start from. Strips off the "bench-modules-" and
+ @# replaces all "_" with "/".
+ @#
+ @# e.g. bench-modules-service_dynamodb
+ cd ./internal/repotools/cmd/eachmodule \
+ && go run . -p $(subst _,/,$(subst bench-modules-,,$@)) ${EACHMODULE_FLAGS} \
+ "go test -timeout=10m -bench . --benchmem ${BUILD_TAGS} ${RUN_NONE} ./..."
+
+
+#####################
+# Release Process #
+#####################
+.PHONY: preview-release pre-release-validation release
+
+preview-release:
+ @cd ./internal/repotools && \
+ go run ./cmd/calculaterelease
+
+pre-release-validation:
+ @if [[ -z "${RELEASE_MANIFEST_FILE}" ]]; then \
+ echo "RELEASE_MANIFEST_FILE is required to specify the file to write the release manifest" && false; \
+ fi
+ @if [[ -z "${RELEASE_CHGLOG_DESC_FILE}" ]]; then \
+ echo "RELEASE_CHGLOG_DESC_FILE is required to specify the file to write the release notes" && false; \
+ fi
+
+release: pre-release-validation
+ cd ./internal/repotools && \
+ go run ./cmd/calculaterelease -o ${RELEASE_MANIFEST_FILE} && \
+ go run ./cmd/updaterequires -release ${RELEASE_MANIFEST_FILE} && \
+ go run ./cmd/updatemodulemeta -release ${RELEASE_MANIFEST_FILE} && \
+ go run ./cmd/generatechangelog -release ${RELEASE_MANIFEST_FILE} -o ${RELEASE_CHGLOG_DESC_FILE} && \
+ go run ./cmd/changelog rm -all && \
+ go run ./cmd/tagrelease -release ${RELEASE_MANIFEST_FILE}
+
+##############
+# Repo Tools #
+##############
+.PHONY: install-repotools
+
+install-repotools:
+ cd ./internal/repotools && \
+ go install ./cmd/changelog
+
+##################
+# Linting/Verify #
+##################
+.PHONY: verify lint vet vet-modules-% sdkv1check
+
+verify: lint vet sdkv1check
+
+lint:
+ @echo "go lint SDK and vendor packages"
+ @lint=`golint ./...`; \
+ dolint=`echo "$$lint" | grep -E -v \
+ -e ${LINTIGNORESINGLEFIGHT}`; \
+ echo "$$dolint"; \
+ if [ "$$dolint" != "" ]; then exit 1; fi
+
+vet: vet-modules-.
+
+vet-modules-%:
+ cd ./internal/repotools/cmd/eachmodule \
+ && go run . -p $(subst _,/,$(subst vet-modules-,,$@)) ${EACHMODULE_FLAGS} \
+ "go vet ${BUILD_TAGS} --all ./..."
+
+sdkv1check:
+ @echo "Checking for usage of AWS SDK for Go v1"
+ @sdkv1usage=`go list -test -f '''{{ if not .Standard }}{{ range $$_, $$name := .Imports }} * {{ $$.ImportPath }} -> {{ $$name }}{{ print "\n" }}{{ end }}{{ range $$_, $$name := .TestImports }} *: {{ $$.ImportPath }} -> {{ $$name }}{{ print "\n" }}{{ end }}{{ end}}''' ./... | sort -u | grep '''/aws-sdk-go/'''`; \
+ echo "$$sdkv1usage"; \
+ if [ "$$sdkv1usage" != "" ]; then exit 1; fi
+
+###################
+# Sandbox Testing #
+###################
+.PHONY: sandbox-tests sandbox-build-% sandbox-run-% sandbox-test-% update-aws-golang-tip
+
+sandbox-tests: sandbox-test-go1.15 sandbox-test-go1.16 sandbox-test-go1.17 sandbox-test-gotip
+
+sandbox-build-%:
+ @# sandbox-build-go1.17
+ @# sandbox-build-gotip
+ docker build \
+ -f ./internal/awstesting/sandbox/Dockerfile.test.$(subst sandbox-build-,,$@) \
+ -t "aws-sdk-go-$(subst sandbox-build-,,$@)" .
+sandbox-run-%: sandbox-build-%
+ @# sandbox-run-go1.17
+ @# sandbox-run-gotip
+ docker run -i -t "aws-sdk-go-$(subst sandbox-run-,,$@)" bash
+sandbox-test-%: sandbox-build-%
+ @# sandbox-test-go1.17
+ @# sandbox-test-gotip
+ docker run -t "aws-sdk-go-$(subst sandbox-test-,,$@)"
+
+update-aws-golang-tip:
+ docker build --no-cache=true -f ./internal/awstesting/sandbox/Dockerfile.golang-tip -t "aws-golang:tip" .
diff --git a/vendor/github.com/aws/aws-sdk-go/NOTICE.txt b/vendor/github.com/aws/aws-sdk-go-v2/NOTICE.txt
similarity index 92%
rename from vendor/github.com/aws/aws-sdk-go/NOTICE.txt
rename to vendor/github.com/aws/aws-sdk-go-v2/NOTICE.txt
index 899129ec..5f14d116 100644
--- a/vendor/github.com/aws/aws-sdk-go/NOTICE.txt
+++ b/vendor/github.com/aws/aws-sdk-go-v2/NOTICE.txt
@@ -1,3 +1,3 @@
AWS SDK for Go
-Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
+Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Copyright 2014-2015 Stripe, Inc.
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/README.md b/vendor/github.com/aws/aws-sdk-go-v2/README.md
new file mode 100644
index 00000000..bb4349fe
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/README.md
@@ -0,0 +1,155 @@
+# AWS SDK for Go v2
+
+[![Go Build status](https://github.com/aws/aws-sdk-go-v2/actions/workflows/go.yml/badge.svg?branch=main)](https://github.com/aws/aws-sdk-go-v2/actions/workflows/go.yml)[![Codegen Build status](https://github.com/aws/aws-sdk-go-v2/actions/workflows/codegen.yml/badge.svg?branch=main)](https://github.com/aws/aws-sdk-go-v2/actions/workflows/codegen.yml) [![SDK Documentation](https://img.shields.io/badge/SDK-Documentation-blue)](https://aws.github.io/aws-sdk-go-v2/docs/) [![Migration Guide](https://img.shields.io/badge/Migration-Guide-blue)](https://aws.github.io/aws-sdk-go-v2/docs/migrating/) [![API Reference](https://img.shields.io/badge/api-reference-blue.svg)](https://pkg.go.dev/mod/github.com/aws/aws-sdk-go-v2) [![Apache V2 License](https://img.shields.io/badge/license-Apache%20V2-blue.svg)](https://github.com/aws/aws-sdk-go/blob/master/LICENSE.txt)
+
+
+`aws-sdk-go-v2` is the v2 AWS SDK for the Go programming language.
+
+The v2 SDK requires a minimum version of `Go 1.15`.
+
+Checkout out the [release notes](https://github.com/aws/aws-sdk-go-v2/blob/main/CHANGELOG.md) for information about the latest bug
+fixes, updates, and features added to the SDK.
+
+Jump To:
+* [Getting Started](#getting-started)
+* [Getting Help](#getting-help)
+* [Contributing](#feedback-and-contributing)
+* [More Resources](#resources)
+
+## Maintenance and support for SDK major versions
+
+For information about maintenance and support for SDK major versions and their underlying dependencies, see the
+following in the AWS SDKs and Tools Shared Configuration and Credentials Reference Guide:
+
+* [AWS SDKs and Tools Maintenance Policy](https://docs.aws.amazon.com/credref/latest/refdocs/maint-policy.html)
+* [AWS SDKs and Tools Version Support Matrix](https://docs.aws.amazon.com/credref/latest/refdocs/version-support-matrix.html)
+
+## Getting started
+To get started working with the SDK setup your project for Go modules, and retrieve the SDK dependencies with `go get`.
+This example shows how you can use the v2 SDK to make an API request using the SDK's [Amazon DynamoDB] client.
+
+###### Initialize Project
+```sh
+$ mkdir ~/helloaws
+$ cd ~/helloaws
+$ go mod init helloaws
+```
+###### Add SDK Dependencies
+```sh
+$ go get github.com/aws/aws-sdk-go-v2/aws
+$ go get github.com/aws/aws-sdk-go-v2/config
+$ go get github.com/aws/aws-sdk-go-v2/service/dynamodb
+```
+
+###### Write Code
+In your preferred editor add the following content to `main.go`
+
+```go
+package main
+
+import (
+ "context"
+ "fmt"
+ "log"
+
+ "github.com/aws/aws-sdk-go-v2/aws"
+ "github.com/aws/aws-sdk-go-v2/config"
+ "github.com/aws/aws-sdk-go-v2/service/dynamodb"
+)
+
+func main() {
+ // Using the SDK's default configuration, loading additional config
+ // and credentials values from the environment variables, shared
+ // credentials, and shared configuration files
+ cfg, err := config.LoadDefaultConfig(context.TODO(), config.WithRegion("us-west-2"))
+ if err != nil {
+ log.Fatalf("unable to load SDK config, %v", err)
+ }
+
+ // Using the Config value, create the DynamoDB client
+ svc := dynamodb.NewFromConfig(cfg)
+
+ // Build the request with its input parameters
+ resp, err := svc.ListTables(context.TODO(), &dynamodb.ListTablesInput{
+ Limit: aws.Int32(5),
+ })
+ if err != nil {
+ log.Fatalf("failed to list tables, %v", err)
+ }
+
+ fmt.Println("Tables:")
+ for _, tableName := range resp.TableNames {
+ fmt.Println(tableName)
+ }
+}
+```
+
+###### Compile and Execute
+```sh
+$ go run .
+Table:
+tableOne
+tableTwo
+```
+
+## Getting Help
+
+Please use these community resources for getting help. We use the GitHub issues
+for tracking bugs and feature requests.
+
+* Ask a question on [StackOverflow](http://stackoverflow.com/) and tag it with the [`aws-sdk-go`](http://stackoverflow.com/questions/tagged/aws-sdk-go) tag.
+* Open a support ticket with [AWS Support](http://docs.aws.amazon.com/awssupport/latest/user/getting-started.html).
+* If you think you may have found a bug, please open an [issue](https://github.com/aws/aws-sdk-go-v2/issues/new/choose).
+
+This SDK implements AWS service APIs. For general issues regarding the AWS services and their limitations, you may also take a look at the [Amazon Web Services Discussion Forums](https://forums.aws.amazon.com/).
+
+### Opening Issues
+
+If you encounter a bug with the AWS SDK for Go we would like to hear about it.
+Search the [existing issues][Issues] and see
+if others are also experiencing the issue before opening a new issue. Please
+include the version of AWS SDK for Go, Go language, and OS you’re using. Please
+also include reproduction case when appropriate.
+
+The GitHub issues are intended for bug reports and feature requests. For help
+and questions with using AWS SDK for Go please make use of the resources listed
+in the [Getting Help](#getting-help) section.
+Keeping the list of open issues lean will help us respond in a timely manner.
+
+## Feedback and contributing
+
+The v2 SDK will use GitHub [Issues] to track feature requests and issues with the SDK. In addition, we'll use GitHub [Projects] to track large tasks spanning multiple pull requests, such as refactoring the SDK's internal request lifecycle. You can provide feedback to us in several ways.
+
+**GitHub issues**. To provide feedback or report bugs, file GitHub [Issues] on the SDK. This is the preferred mechanism to give feedback so that other users can engage in the conversation, +1 issues, etc. Issues you open will be evaluated, and included in our roadmap for the GA launch.
+
+**Contributing**. You can open pull requests for fixes or additions to the AWS SDK for Go 2.0. All pull requests must be submitted under the Apache 2.0 license and will be reviewed by an SDK team member before being merged in. Accompanying unit tests, where possible, are appreciated.
+
+## Resources
+
+[SDK Developer Guide](https://aws.github.io/aws-sdk-go-v2/docs/) - Use this document to learn how to get started and
+use the AWS SDK for Go V2.
+
+[SDK API Reference Documentation](https://pkg.go.dev/mod/github.com/aws/aws-sdk-go-v2) - Use this
+document to look up all API operation input and output parameters for AWS
+services supported by the SDK. The API reference also includes documentation of
+the SDK, and examples how to using the SDK, service client API operations, and
+API operation require parameters.
+
+[Service Documentation](https://aws.amazon.com/documentation/) - Use this
+documentation to learn how to interface with AWS services. These guides are
+great for getting started with a service, or when looking for more
+information about a service. While this document is not required for coding,
+services may supply helpful samples to look out for.
+
+[Forum](https://forums.aws.amazon.com/forum.jspa?forumID=293) - Ask questions, get help, and give feedback
+
+[Issues] - Report issues, submit pull requests, and get involved
+ (see [Apache 2.0 License][license])
+
+[Dep]: https://github.com/golang/dep
+[Issues]: https://github.com/aws/aws-sdk-go-v2/issues
+[Projects]: https://github.com/aws/aws-sdk-go-v2/projects
+[CHANGELOG]: https://github.com/aws/aws-sdk-go-v2/blob/master/CHANGELOG.md
+[Amazon DynamoDB]: https://aws.amazon.com/dynamodb/
+[design]: https://github.com/aws/aws-sdk-go-v2/blob/master/DESIGN.md
+[license]: http://aws.amazon.com/apache2.0/
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/config.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/config.go
new file mode 100644
index 00000000..8b3a8512
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/config.go
@@ -0,0 +1,119 @@
+package aws
+
+import (
+ "net/http"
+
+ "github.com/aws/smithy-go/logging"
+ "github.com/aws/smithy-go/middleware"
+)
+
+// HTTPClient provides the interface to provide custom HTTPClients. Generally
+// *http.Client is sufficient for most use cases. The HTTPClient should not
+// follow redirects.
+type HTTPClient interface {
+ Do(*http.Request) (*http.Response, error)
+}
+
+// A Config provides service configuration for service clients.
+type Config struct {
+ // The region to send requests to. This parameter is required and must
+ // be configured globally or on a per-client basis unless otherwise
+ // noted. A full list of regions is found in the "Regions and Endpoints"
+ // document.
+ //
+ // See http://docs.aws.amazon.com/general/latest/gr/rande.html for
+ // information on AWS regions.
+ Region string
+
+ // The credentials object to use when signing requests. Defaults to a
+ // chain of credential providers to search for credentials in environment
+ // variables, shared credential file, and EC2 Instance Roles.
+ Credentials CredentialsProvider
+
+ // The HTTP Client the SDK's API clients will use to invoke HTTP requests.
+ // The SDK defaults to a BuildableClient allowing API clients to create
+ // copies of the HTTP Client for service specific customizations.
+ //
+ // Use a (*http.Client) for custom behavior. Using a custom http.Client
+ // will prevent the SDK from modifying the HTTP client.
+ HTTPClient HTTPClient
+
+ // An endpoint resolver that can be used to provide or override an endpoint for the given
+ // service and region Please see the `aws.EndpointResolver` documentation on usage.
+ EndpointResolver EndpointResolver
+
+ // Retryer is a function that provides a Retryer implementation. A Retryer guides how HTTP requests should be
+ // retried in case of recoverable failures. When nil the API client will use a default
+ // retryer.
+ //
+ // In general, the provider function should return a new instance of a Retyer if you are attempting
+ // to provide a consistent Retryer configuration across all clients. This will ensure that each client will be
+ // provided a new instance of the Retryer implementation, and will avoid issues such as sharing the same retry token
+ // bucket across services.
+ Retryer func() Retryer
+
+ // ConfigSources are the sources that were used to construct the Config.
+ // Allows for additional configuration to be loaded by clients.
+ ConfigSources []interface{}
+
+ // APIOptions provides the set of middleware mutations modify how the API
+ // client requests will be handled. This is useful for adding additional
+ // tracing data to a request, or changing behavior of the SDK's client.
+ APIOptions []func(*middleware.Stack) error
+
+ // The logger writer interface to write logging messages to. Defaults to
+ // standard error.
+ Logger logging.Logger
+
+ // Configures the events that will be sent to the configured logger.
+ // This can be used to configure the logging of signing, retries, request, and responses
+ // of the SDK clients.
+ //
+ // See the ClientLogMode type documentation for the complete set of logging modes and available
+ // configuration.
+ ClientLogMode ClientLogMode
+}
+
+// NewConfig returns a new Config pointer that can be chained with builder
+// methods to set multiple configuration values inline without using pointers.
+func NewConfig() *Config {
+ return &Config{}
+}
+
+// Copy will return a shallow copy of the Config object. If any additional
+// configurations are provided they will be merged into the new config returned.
+func (c Config) Copy() Config {
+ cp := c
+ return cp
+}
+
+// EndpointDiscoveryEnableState indicates if endpoint discovery is
+// enabled, disabled, auto or unset state.
+//
+// Default behavior (Auto or Unset) indicates operations that require endpoint
+// discovery will use Endpoint Discovery by default. Operations that
+// optionally use Endpoint Discovery will not use Endpoint Discovery
+// unless EndpointDiscovery is explicitly enabled.
+type EndpointDiscoveryEnableState uint
+
+// Enumeration values for EndpointDiscoveryEnableState
+const (
+ // EndpointDiscoveryUnset represents EndpointDiscoveryEnableState is unset.
+ // Users do not need to use this value explicitly. The behavior for unset
+ // is the same as for EndpointDiscoveryAuto.
+ EndpointDiscoveryUnset EndpointDiscoveryEnableState = iota
+
+ // EndpointDiscoveryAuto represents an AUTO state that allows endpoint
+ // discovery only when required by the api. This is the default
+ // configuration resolved by the client if endpoint discovery is neither
+ // enabled or disabled.
+ EndpointDiscoveryAuto // default state
+
+ // EndpointDiscoveryDisabled indicates client MUST not perform endpoint
+ // discovery even when required.
+ EndpointDiscoveryDisabled
+
+ // EndpointDiscoveryEnabled indicates client MUST always perform endpoint
+ // discovery if supported for the operation.
+ EndpointDiscoveryEnabled
+)
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/context.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/context.go
new file mode 100644
index 00000000..4d8e26ef
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/context.go
@@ -0,0 +1,22 @@
+package aws
+
+import (
+ "context"
+ "time"
+)
+
+type suppressedContext struct {
+ context.Context
+}
+
+func (s *suppressedContext) Deadline() (deadline time.Time, ok bool) {
+ return time.Time{}, false
+}
+
+func (s *suppressedContext) Done() <-chan struct{} {
+ return nil
+}
+
+func (s *suppressedContext) Err() error {
+ return nil
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/credential_cache.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/credential_cache.go
new file mode 100644
index 00000000..1411a5c3
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/credential_cache.go
@@ -0,0 +1,139 @@
+package aws
+
+import (
+ "context"
+ "sync/atomic"
+ "time"
+
+ sdkrand "github.com/aws/aws-sdk-go-v2/internal/rand"
+ "github.com/aws/aws-sdk-go-v2/internal/sync/singleflight"
+)
+
+// CredentialsCacheOptions are the options
+type CredentialsCacheOptions struct {
+
+ // ExpiryWindow will allow the credentials to trigger refreshing prior to
+ // the credentials actually expiring. This is beneficial so race conditions
+ // with expiring credentials do not cause request to fail unexpectedly
+ // due to ExpiredTokenException exceptions.
+ //
+ // An ExpiryWindow of 10s would cause calls to IsExpired() to return true
+ // 10 seconds before the credentials are actually expired. This can cause an
+ // increased number of requests to refresh the credentials to occur.
+ //
+ // If ExpiryWindow is 0 or less it will be ignored.
+ ExpiryWindow time.Duration
+
+ // ExpiryWindowJitterFrac provides a mechanism for randomizing the expiration of credentials
+ // within the configured ExpiryWindow by a random percentage. Valid values are between 0.0 and 1.0.
+ //
+ // As an example if ExpiryWindow is 60 seconds and ExpiryWindowJitterFrac is 0.5 then credentials will be set to
+ // expire between 30 to 60 seconds prior to their actual expiration time.
+ //
+ // If ExpiryWindow is 0 or less then ExpiryWindowJitterFrac is ignored.
+ // If ExpiryWindowJitterFrac is 0 then no randomization will be applied to the window.
+ // If ExpiryWindowJitterFrac < 0 the value will be treated as 0.
+ // If ExpiryWindowJitterFrac > 1 the value will be treated as 1.
+ ExpiryWindowJitterFrac float64
+}
+
+// CredentialsCache provides caching and concurrency safe credentials retrieval
+// via the provider's retrieve method.
+type CredentialsCache struct {
+ // provider is the CredentialProvider implementation to be wrapped by the CredentialCache.
+ provider CredentialsProvider
+
+ options CredentialsCacheOptions
+ creds atomic.Value
+ sf singleflight.Group
+}
+
+// NewCredentialsCache returns a CredentialsCache that wraps provider. Provider is expected to not be nil. A variadic
+// list of one or more functions can be provided to modify the CredentialsCache configuration. This allows for
+// configuration of credential expiry window and jitter.
+func NewCredentialsCache(provider CredentialsProvider, optFns ...func(options *CredentialsCacheOptions)) *CredentialsCache {
+ options := CredentialsCacheOptions{}
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ if options.ExpiryWindow < 0 {
+ options.ExpiryWindow = 0
+ }
+
+ if options.ExpiryWindowJitterFrac < 0 {
+ options.ExpiryWindowJitterFrac = 0
+ } else if options.ExpiryWindowJitterFrac > 1 {
+ options.ExpiryWindowJitterFrac = 1
+ }
+
+ return &CredentialsCache{
+ provider: provider,
+ options: options,
+ }
+}
+
+// Retrieve returns the credentials. If the credentials have already been
+// retrieved, and not expired the cached credentials will be returned. If the
+// credentials have not been retrieved yet, or expired the provider's Retrieve
+// method will be called.
+//
+// Returns and error if the provider's retrieve method returns an error.
+func (p *CredentialsCache) Retrieve(ctx context.Context) (Credentials, error) {
+ if creds := p.getCreds(); creds != nil {
+ return *creds, nil
+ }
+
+ resCh := p.sf.DoChan("", func() (interface{}, error) {
+ return p.singleRetrieve(&suppressedContext{ctx})
+ })
+ select {
+ case res := <-resCh:
+ return res.Val.(Credentials), res.Err
+ case <-ctx.Done():
+ return Credentials{}, &RequestCanceledError{Err: ctx.Err()}
+ }
+}
+
+func (p *CredentialsCache) singleRetrieve(ctx context.Context) (interface{}, error) {
+ if creds := p.getCreds(); creds != nil {
+ return *creds, nil
+ }
+
+ creds, err := p.provider.Retrieve(ctx)
+ if err == nil {
+ if creds.CanExpire {
+ randFloat64, err := sdkrand.CryptoRandFloat64()
+ if err != nil {
+ return Credentials{}, err
+ }
+ jitter := time.Duration(randFloat64 * p.options.ExpiryWindowJitterFrac * float64(p.options.ExpiryWindow))
+ creds.Expires = creds.Expires.Add(-(p.options.ExpiryWindow - jitter))
+ }
+
+ p.creds.Store(&creds)
+ }
+
+ return creds, err
+}
+
+func (p *CredentialsCache) getCreds() *Credentials {
+ v := p.creds.Load()
+ if v == nil {
+ return nil
+ }
+
+ c := v.(*Credentials)
+ if c != nil && c.HasKeys() && !c.Expired() {
+ return c
+ }
+
+ return nil
+}
+
+// Invalidate will invalidate the cached credentials. The next call to Retrieve
+// will cause the provider's Retrieve method to be called.
+func (p *CredentialsCache) Invalidate() {
+ p.creds.Store((*Credentials)(nil))
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/credentials.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/credentials.go
new file mode 100644
index 00000000..ce3868a9
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/credentials.go
@@ -0,0 +1,127 @@
+package aws
+
+import (
+ "context"
+ "fmt"
+ "time"
+
+ "github.com/aws/aws-sdk-go-v2/internal/sdk"
+)
+
+// AnonymousCredentials provides a sentinel CredentialsProvider that should be
+// used to instruct the SDK's signing middleware to not sign the request.
+//
+// Using `nil` credentials when configuring an API client will achieve the same
+// result. The AnonymousCredentials type allows you to configure the SDK's
+// external config loading to not attempt to source credentials from the shared
+// config or environment.
+//
+// For example you can use this CredentialsProvider with an API client's
+// Options to instruct the client not to sign a request for accessing public
+// S3 bucket objects.
+//
+// The following example demonstrates using the AnonymousCredentials to prevent
+// SDK's external config loading attempt to resolve credentials.
+//
+// cfg, err := config.LoadDefaultConfig(context.TODO(),
+// config.WithCredentialsProvider(aws.AnonymousCredentials{}),
+// )
+// if err != nil {
+// log.Fatalf("failed to load config, %v", err)
+// }
+//
+// client := s3.NewFromConfig(cfg)
+//
+// Alternatively you can leave the API client Option's `Credential` member to
+// nil. If using the `NewFromConfig` constructor you'll need to explicitly set
+// the `Credentials` member to nil, if the external config resolved a
+// credential provider.
+//
+// client := s3.New(s3.Options{
+// // Credentials defaults to a nil value.
+// })
+//
+// This can also be configured for specific operations calls too.
+//
+// cfg, err := config.LoadDefaultConfig(context.TODO())
+// if err != nil {
+// log.Fatalf("failed to load config, %v", err)
+// }
+//
+// client := s3.NewFromConfig(config)
+//
+// result, err := client.GetObject(context.TODO(), s3.GetObject{
+// Bucket: aws.String("example-bucket"),
+// Key: aws.String("example-key"),
+// }, func(o *s3.Options) {
+// o.Credentials = nil
+// // Or
+// o.Credentials = aws.AnonymousCredentials{}
+// })
+type AnonymousCredentials struct{}
+
+// Retrieve implements the CredentialsProvider interface, but will always
+// return error, and cannot be used to sign a request. The AnonymousCredentials
+// type is used as a sentinel type instructing the AWS request signing
+// middleware to not sign a request.
+func (AnonymousCredentials) Retrieve(context.Context) (Credentials, error) {
+ return Credentials{Source: "AnonymousCredentials"},
+ fmt.Errorf("the AnonymousCredentials is not a valid credential provider, and cannot be used to sign AWS requests with")
+}
+
+// A Credentials is the AWS credentials value for individual credential fields.
+type Credentials struct {
+ // AWS Access key ID
+ AccessKeyID string
+
+ // AWS Secret Access Key
+ SecretAccessKey string
+
+ // AWS Session Token
+ SessionToken string
+
+ // Source of the credentials
+ Source string
+
+ // Time the credentials will expire.
+ CanExpire bool
+ Expires time.Time
+}
+
+// Expired returns if the credentials have expired.
+func (v Credentials) Expired() bool {
+ if v.CanExpire {
+ // Calling Round(0) on the current time will truncate the monotonic reading only. Ensures credential expiry
+ // time is always based on reported wall-clock time.
+ return !v.Expires.After(sdk.NowTime().Round(0))
+ }
+
+ return false
+}
+
+// HasKeys returns if the credentials keys are set.
+func (v Credentials) HasKeys() bool {
+ return len(v.AccessKeyID) > 0 && len(v.SecretAccessKey) > 0
+}
+
+// A CredentialsProvider is the interface for any component which will provide
+// credentials Credentials. A CredentialsProvider is required to manage its own
+// Expired state, and what to be expired means.
+//
+// A credentials provider implementation can be wrapped with a CredentialCache
+// to cache the credential value retrieved. Without the cache the SDK will
+// attempt to retrieve the credentials for every request.
+type CredentialsProvider interface {
+ // Retrieve returns nil if it successfully retrieved the value.
+ // Error is returned if the value were not obtainable, or empty.
+ Retrieve(ctx context.Context) (Credentials, error)
+}
+
+// CredentialsProviderFunc provides a helper wrapping a function value to
+// satisfy the CredentialsProvider interface.
+type CredentialsProviderFunc func(context.Context) (Credentials, error)
+
+// Retrieve delegates to the function value the CredentialsProviderFunc wraps.
+func (fn CredentialsProviderFunc) Retrieve(ctx context.Context) (Credentials, error) {
+ return fn(ctx)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/doc.go
similarity index 86%
rename from vendor/github.com/aws/aws-sdk-go/aws/doc.go
rename to vendor/github.com/aws/aws-sdk-go-v2/aws/doc.go
index 4fcb6161..befc3bee 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/doc.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/doc.go
@@ -26,7 +26,7 @@
// strPtr = aws.String("my string")
//
// // Convert *string to string value
-// str = aws.StringValue(strPtr)
+// str = aws.ToString(strPtr)
//
// In addition to scalars the aws package also includes conversion utilities for
// map and slice for commonly types used in API parameters. The map and slice
@@ -40,7 +40,7 @@
// strPtrs = aws.StringSlice(strs)
//
// // Convert []*string to []string
-// strs = aws.StringValueSlice(strPtrs)
+// strs = aws.ToStringSlice(strPtrs)
//
// SDK Default HTTP Client
//
@@ -54,3 +54,9 @@
// configure the SDK to use the custom HTTP Client by setting the HTTPClient
// value of the SDK's Config type when creating a Session or service client.
package aws
+
+// generate.go uses a build tag of "ignore", go run doesn't need to specify
+// this because go run ignores all build flags when running a go file directly.
+//go:generate go run -tags codegen generate.go
+//go:generate go run -tags codegen logging_generate.go
+//go:generate gofmt -w -s .
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/endpoints.go
new file mode 100644
index 00000000..dadb2b40
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/endpoints.go
@@ -0,0 +1,113 @@
+package aws
+
+import (
+ "fmt"
+)
+
+// Endpoint represents the endpoint a service client should make API operation
+// calls to.
+//
+// The SDK will automatically resolve these endpoints per API client using an
+// internal endpoint resolvers. If you'd like to provide custom endpoint
+// resolving behavior you can implement the EndpointResolver interface.
+type Endpoint struct {
+ // The base URL endpoint the SDK API clients will use to make API calls to.
+ // The SDK will suffix URI path and query elements to this endpoint.
+ URL string
+
+ // Specifies if the endpoint's hostname can be modified by the SDK's API
+ // client.
+ //
+ // If the hostname is mutable the SDK API clients may modify any part of
+ // the hostname based on the requirements of the API, (e.g. adding, or
+ // removing content in the hostname). Such as, Amazon S3 API client
+ // prefixing "bucketname" to the hostname, or changing the
+ // hostname service name component from "s3." to "s3-accesspoint.dualstack."
+ // for the dualstack endpoint of an S3 Accesspoint resource.
+ //
+ // Care should be taken when providing a custom endpoint for an API. If the
+ // endpoint hostname is mutable, and the client cannot modify the endpoint
+ // correctly, the operation call will most likely fail, or have undefined
+ // behavior.
+ //
+ // If hostname is immutable, the SDK API clients will not modify the
+ // hostname of the URL. This may cause the API client not to function
+ // correctly if the API requires the operation specific hostname values
+ // to be used by the client.
+ //
+ // This flag does not modify the API client's behavior if this endpoint
+ // will be used instead of Endpoint Discovery, or if the endpoint will be
+ // used to perform Endpoint Discovery. That behavior is configured via the
+ // API Client's Options.
+ HostnameImmutable bool
+
+ // The AWS partition the endpoint belongs to.
+ PartitionID string
+
+ // The service name that should be used for signing the requests to the
+ // endpoint.
+ SigningName string
+
+ // The region that should be used for signing the request to the endpoint.
+ SigningRegion string
+
+ // The signing method that should be used for signing the requests to the
+ // endpoint.
+ SigningMethod string
+
+ // The source of the Endpoint. By default, this will be EndpointSourceServiceMetadata.
+ // When providing a custom endpoint, you should set the source as EndpointSourceCustom.
+ // If source is not provided when providing a custom endpoint, the SDK may not
+ // perform required host mutations correctly. Source should be used along with
+ // HostnameImmutable property as per the usage requirement.
+ Source EndpointSource
+}
+
+// EndpointSource is the endpoint source type.
+type EndpointSource int
+
+const (
+ // EndpointSourceServiceMetadata denotes service modeled endpoint metadata is used as Endpoint Source.
+ EndpointSourceServiceMetadata EndpointSource = iota
+
+ // EndpointSourceCustom denotes endpoint is a custom endpoint. This source should be used when
+ // user provides a custom endpoint to be used by the SDK.
+ EndpointSourceCustom
+)
+
+// EndpointNotFoundError is a sentinel error to indicate that the
+// EndpointResolver implementation was unable to resolve an endpoint for the
+// given service and region. Resolvers should use this to indicate that an API
+// client should fallback and attempt to use it's internal default resolver to
+// resolve the endpoint.
+type EndpointNotFoundError struct {
+ Err error
+}
+
+// Error is the error message.
+func (e *EndpointNotFoundError) Error() string {
+ return fmt.Sprintf("endpoint not found, %v", e.Err)
+}
+
+// Unwrap returns the underlying error.
+func (e *EndpointNotFoundError) Unwrap() error {
+ return e.Err
+}
+
+// EndpointResolver is an endpoint resolver that can be used to provide or
+// override an endpoint for the given service and region. API clients will
+// attempt to use the EndpointResolver first to resolve an endpoint if
+// available. If the EndpointResolver returns an EndpointNotFoundError error,
+// API clients will fallback to attempting to resolve the endpoint using its
+// internal default endpoint resolver.
+type EndpointResolver interface {
+ ResolveEndpoint(service, region string) (Endpoint, error)
+}
+
+// EndpointResolverFunc wraps a function to satisfy the EndpointResolver interface.
+type EndpointResolverFunc func(service, region string) (Endpoint, error)
+
+// ResolveEndpoint calls the wrapped function and returns the results.
+func (e EndpointResolverFunc) ResolveEndpoint(service, region string) (Endpoint, error) {
+ return e(service, region)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/errors.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/errors.go
new file mode 100644
index 00000000..f390a08f
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/errors.go
@@ -0,0 +1,9 @@
+package aws
+
+// MissingRegionError is an error that is returned if region configuration
+// value was not found.
+type MissingRegionError struct{}
+
+func (*MissingRegionError) Error() string {
+ return "an AWS region is required, but was not found"
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/from_ptr.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/from_ptr.go
new file mode 100644
index 00000000..72e29c35
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/from_ptr.go
@@ -0,0 +1,344 @@
+// Code generated by aws/generate.go DO NOT EDIT.
+
+package aws
+
+import (
+ "github.com/aws/smithy-go/ptr"
+ "time"
+)
+
+// ToBool returns bool value dereferenced if the passed
+// in pointer was not nil. Returns a bool zero value if the
+// pointer was nil.
+func ToBool(p *bool) (v bool) {
+ return ptr.ToBool(p)
+}
+
+// ToBoolSlice returns a slice of bool values, that are
+// dereferenced if the passed in pointer was not nil. Returns a bool
+// zero value if the pointer was nil.
+func ToBoolSlice(vs []*bool) []bool {
+ return ptr.ToBoolSlice(vs)
+}
+
+// ToBoolMap returns a map of bool values, that are
+// dereferenced if the passed in pointer was not nil. The bool
+// zero value is used if the pointer was nil.
+func ToBoolMap(vs map[string]*bool) map[string]bool {
+ return ptr.ToBoolMap(vs)
+}
+
+// ToByte returns byte value dereferenced if the passed
+// in pointer was not nil. Returns a byte zero value if the
+// pointer was nil.
+func ToByte(p *byte) (v byte) {
+ return ptr.ToByte(p)
+}
+
+// ToByteSlice returns a slice of byte values, that are
+// dereferenced if the passed in pointer was not nil. Returns a byte
+// zero value if the pointer was nil.
+func ToByteSlice(vs []*byte) []byte {
+ return ptr.ToByteSlice(vs)
+}
+
+// ToByteMap returns a map of byte values, that are
+// dereferenced if the passed in pointer was not nil. The byte
+// zero value is used if the pointer was nil.
+func ToByteMap(vs map[string]*byte) map[string]byte {
+ return ptr.ToByteMap(vs)
+}
+
+// ToString returns string value dereferenced if the passed
+// in pointer was not nil. Returns a string zero value if the
+// pointer was nil.
+func ToString(p *string) (v string) {
+ return ptr.ToString(p)
+}
+
+// ToStringSlice returns a slice of string values, that are
+// dereferenced if the passed in pointer was not nil. Returns a string
+// zero value if the pointer was nil.
+func ToStringSlice(vs []*string) []string {
+ return ptr.ToStringSlice(vs)
+}
+
+// ToStringMap returns a map of string values, that are
+// dereferenced if the passed in pointer was not nil. The string
+// zero value is used if the pointer was nil.
+func ToStringMap(vs map[string]*string) map[string]string {
+ return ptr.ToStringMap(vs)
+}
+
+// ToInt returns int value dereferenced if the passed
+// in pointer was not nil. Returns a int zero value if the
+// pointer was nil.
+func ToInt(p *int) (v int) {
+ return ptr.ToInt(p)
+}
+
+// ToIntSlice returns a slice of int values, that are
+// dereferenced if the passed in pointer was not nil. Returns a int
+// zero value if the pointer was nil.
+func ToIntSlice(vs []*int) []int {
+ return ptr.ToIntSlice(vs)
+}
+
+// ToIntMap returns a map of int values, that are
+// dereferenced if the passed in pointer was not nil. The int
+// zero value is used if the pointer was nil.
+func ToIntMap(vs map[string]*int) map[string]int {
+ return ptr.ToIntMap(vs)
+}
+
+// ToInt8 returns int8 value dereferenced if the passed
+// in pointer was not nil. Returns a int8 zero value if the
+// pointer was nil.
+func ToInt8(p *int8) (v int8) {
+ return ptr.ToInt8(p)
+}
+
+// ToInt8Slice returns a slice of int8 values, that are
+// dereferenced if the passed in pointer was not nil. Returns a int8
+// zero value if the pointer was nil.
+func ToInt8Slice(vs []*int8) []int8 {
+ return ptr.ToInt8Slice(vs)
+}
+
+// ToInt8Map returns a map of int8 values, that are
+// dereferenced if the passed in pointer was not nil. The int8
+// zero value is used if the pointer was nil.
+func ToInt8Map(vs map[string]*int8) map[string]int8 {
+ return ptr.ToInt8Map(vs)
+}
+
+// ToInt16 returns int16 value dereferenced if the passed
+// in pointer was not nil. Returns a int16 zero value if the
+// pointer was nil.
+func ToInt16(p *int16) (v int16) {
+ return ptr.ToInt16(p)
+}
+
+// ToInt16Slice returns a slice of int16 values, that are
+// dereferenced if the passed in pointer was not nil. Returns a int16
+// zero value if the pointer was nil.
+func ToInt16Slice(vs []*int16) []int16 {
+ return ptr.ToInt16Slice(vs)
+}
+
+// ToInt16Map returns a map of int16 values, that are
+// dereferenced if the passed in pointer was not nil. The int16
+// zero value is used if the pointer was nil.
+func ToInt16Map(vs map[string]*int16) map[string]int16 {
+ return ptr.ToInt16Map(vs)
+}
+
+// ToInt32 returns int32 value dereferenced if the passed
+// in pointer was not nil. Returns a int32 zero value if the
+// pointer was nil.
+func ToInt32(p *int32) (v int32) {
+ return ptr.ToInt32(p)
+}
+
+// ToInt32Slice returns a slice of int32 values, that are
+// dereferenced if the passed in pointer was not nil. Returns a int32
+// zero value if the pointer was nil.
+func ToInt32Slice(vs []*int32) []int32 {
+ return ptr.ToInt32Slice(vs)
+}
+
+// ToInt32Map returns a map of int32 values, that are
+// dereferenced if the passed in pointer was not nil. The int32
+// zero value is used if the pointer was nil.
+func ToInt32Map(vs map[string]*int32) map[string]int32 {
+ return ptr.ToInt32Map(vs)
+}
+
+// ToInt64 returns int64 value dereferenced if the passed
+// in pointer was not nil. Returns a int64 zero value if the
+// pointer was nil.
+func ToInt64(p *int64) (v int64) {
+ return ptr.ToInt64(p)
+}
+
+// ToInt64Slice returns a slice of int64 values, that are
+// dereferenced if the passed in pointer was not nil. Returns a int64
+// zero value if the pointer was nil.
+func ToInt64Slice(vs []*int64) []int64 {
+ return ptr.ToInt64Slice(vs)
+}
+
+// ToInt64Map returns a map of int64 values, that are
+// dereferenced if the passed in pointer was not nil. The int64
+// zero value is used if the pointer was nil.
+func ToInt64Map(vs map[string]*int64) map[string]int64 {
+ return ptr.ToInt64Map(vs)
+}
+
+// ToUint returns uint value dereferenced if the passed
+// in pointer was not nil. Returns a uint zero value if the
+// pointer was nil.
+func ToUint(p *uint) (v uint) {
+ return ptr.ToUint(p)
+}
+
+// ToUintSlice returns a slice of uint values, that are
+// dereferenced if the passed in pointer was not nil. Returns a uint
+// zero value if the pointer was nil.
+func ToUintSlice(vs []*uint) []uint {
+ return ptr.ToUintSlice(vs)
+}
+
+// ToUintMap returns a map of uint values, that are
+// dereferenced if the passed in pointer was not nil. The uint
+// zero value is used if the pointer was nil.
+func ToUintMap(vs map[string]*uint) map[string]uint {
+ return ptr.ToUintMap(vs)
+}
+
+// ToUint8 returns uint8 value dereferenced if the passed
+// in pointer was not nil. Returns a uint8 zero value if the
+// pointer was nil.
+func ToUint8(p *uint8) (v uint8) {
+ return ptr.ToUint8(p)
+}
+
+// ToUint8Slice returns a slice of uint8 values, that are
+// dereferenced if the passed in pointer was not nil. Returns a uint8
+// zero value if the pointer was nil.
+func ToUint8Slice(vs []*uint8) []uint8 {
+ return ptr.ToUint8Slice(vs)
+}
+
+// ToUint8Map returns a map of uint8 values, that are
+// dereferenced if the passed in pointer was not nil. The uint8
+// zero value is used if the pointer was nil.
+func ToUint8Map(vs map[string]*uint8) map[string]uint8 {
+ return ptr.ToUint8Map(vs)
+}
+
+// ToUint16 returns uint16 value dereferenced if the passed
+// in pointer was not nil. Returns a uint16 zero value if the
+// pointer was nil.
+func ToUint16(p *uint16) (v uint16) {
+ return ptr.ToUint16(p)
+}
+
+// ToUint16Slice returns a slice of uint16 values, that are
+// dereferenced if the passed in pointer was not nil. Returns a uint16
+// zero value if the pointer was nil.
+func ToUint16Slice(vs []*uint16) []uint16 {
+ return ptr.ToUint16Slice(vs)
+}
+
+// ToUint16Map returns a map of uint16 values, that are
+// dereferenced if the passed in pointer was not nil. The uint16
+// zero value is used if the pointer was nil.
+func ToUint16Map(vs map[string]*uint16) map[string]uint16 {
+ return ptr.ToUint16Map(vs)
+}
+
+// ToUint32 returns uint32 value dereferenced if the passed
+// in pointer was not nil. Returns a uint32 zero value if the
+// pointer was nil.
+func ToUint32(p *uint32) (v uint32) {
+ return ptr.ToUint32(p)
+}
+
+// ToUint32Slice returns a slice of uint32 values, that are
+// dereferenced if the passed in pointer was not nil. Returns a uint32
+// zero value if the pointer was nil.
+func ToUint32Slice(vs []*uint32) []uint32 {
+ return ptr.ToUint32Slice(vs)
+}
+
+// ToUint32Map returns a map of uint32 values, that are
+// dereferenced if the passed in pointer was not nil. The uint32
+// zero value is used if the pointer was nil.
+func ToUint32Map(vs map[string]*uint32) map[string]uint32 {
+ return ptr.ToUint32Map(vs)
+}
+
+// ToUint64 returns uint64 value dereferenced if the passed
+// in pointer was not nil. Returns a uint64 zero value if the
+// pointer was nil.
+func ToUint64(p *uint64) (v uint64) {
+ return ptr.ToUint64(p)
+}
+
+// ToUint64Slice returns a slice of uint64 values, that are
+// dereferenced if the passed in pointer was not nil. Returns a uint64
+// zero value if the pointer was nil.
+func ToUint64Slice(vs []*uint64) []uint64 {
+ return ptr.ToUint64Slice(vs)
+}
+
+// ToUint64Map returns a map of uint64 values, that are
+// dereferenced if the passed in pointer was not nil. The uint64
+// zero value is used if the pointer was nil.
+func ToUint64Map(vs map[string]*uint64) map[string]uint64 {
+ return ptr.ToUint64Map(vs)
+}
+
+// ToFloat32 returns float32 value dereferenced if the passed
+// in pointer was not nil. Returns a float32 zero value if the
+// pointer was nil.
+func ToFloat32(p *float32) (v float32) {
+ return ptr.ToFloat32(p)
+}
+
+// ToFloat32Slice returns a slice of float32 values, that are
+// dereferenced if the passed in pointer was not nil. Returns a float32
+// zero value if the pointer was nil.
+func ToFloat32Slice(vs []*float32) []float32 {
+ return ptr.ToFloat32Slice(vs)
+}
+
+// ToFloat32Map returns a map of float32 values, that are
+// dereferenced if the passed in pointer was not nil. The float32
+// zero value is used if the pointer was nil.
+func ToFloat32Map(vs map[string]*float32) map[string]float32 {
+ return ptr.ToFloat32Map(vs)
+}
+
+// ToFloat64 returns float64 value dereferenced if the passed
+// in pointer was not nil. Returns a float64 zero value if the
+// pointer was nil.
+func ToFloat64(p *float64) (v float64) {
+ return ptr.ToFloat64(p)
+}
+
+// ToFloat64Slice returns a slice of float64 values, that are
+// dereferenced if the passed in pointer was not nil. Returns a float64
+// zero value if the pointer was nil.
+func ToFloat64Slice(vs []*float64) []float64 {
+ return ptr.ToFloat64Slice(vs)
+}
+
+// ToFloat64Map returns a map of float64 values, that are
+// dereferenced if the passed in pointer was not nil. The float64
+// zero value is used if the pointer was nil.
+func ToFloat64Map(vs map[string]*float64) map[string]float64 {
+ return ptr.ToFloat64Map(vs)
+}
+
+// ToTime returns time.Time value dereferenced if the passed
+// in pointer was not nil. Returns a time.Time zero value if the
+// pointer was nil.
+func ToTime(p *time.Time) (v time.Time) {
+ return ptr.ToTime(p)
+}
+
+// ToTimeSlice returns a slice of time.Time values, that are
+// dereferenced if the passed in pointer was not nil. Returns a time.Time
+// zero value if the pointer was nil.
+func ToTimeSlice(vs []*time.Time) []time.Time {
+ return ptr.ToTimeSlice(vs)
+}
+
+// ToTimeMap returns a map of time.Time values, that are
+// dereferenced if the passed in pointer was not nil. The time.Time
+// zero value is used if the pointer was nil.
+func ToTimeMap(vs map[string]*time.Time) map[string]time.Time {
+ return ptr.ToTimeMap(vs)
+}
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
new file mode 100644
index 00000000..a2269cd6
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/go_module_metadata.go
@@ -0,0 +1,6 @@
+// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT.
+
+package aws
+
+// goModuleVersion is the tagged release for this module
+const goModuleVersion = "1.9.1"
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/logging.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/logging.go
new file mode 100644
index 00000000..f6abb0a6
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/logging.go
@@ -0,0 +1,84 @@
+// Code generated by aws/logging_generate.go DO NOT EDIT.
+
+package aws
+
+// ClientLogMode represents the logging mode of SDK clients. The client logging mode is a bit-field where
+// each bit is a flag that describes the logging behavior for one or more client components.
+// The entire 64-bit group is reserved for later expansion by the SDK.
+//
+// Example: Setting ClientLogMode to enable logging of retries and requests
+// clientLogMode := aws.LogRetries | aws.LogRequest
+//
+// Example: Adding an additional log mode to an existing ClientLogMode value
+// clientLogMode |= aws.LogResponse
+type ClientLogMode uint64
+
+// Supported ClientLogMode bits that can be configured to toggle logging of specific SDK events.
+const (
+ LogSigning ClientLogMode = 1 << (64 - 1 - iota)
+ LogRetries
+ LogRequest
+ LogRequestWithBody
+ LogResponse
+ LogResponseWithBody
+)
+
+// IsSigning returns whether the Signing logging mode bit is set
+func (m ClientLogMode) IsSigning() bool {
+ return m&LogSigning != 0
+}
+
+// IsRetries returns whether the Retries logging mode bit is set
+func (m ClientLogMode) IsRetries() bool {
+ return m&LogRetries != 0
+}
+
+// IsRequest returns whether the Request logging mode bit is set
+func (m ClientLogMode) IsRequest() bool {
+ return m&LogRequest != 0
+}
+
+// IsRequestWithBody returns whether the RequestWithBody logging mode bit is set
+func (m ClientLogMode) IsRequestWithBody() bool {
+ return m&LogRequestWithBody != 0
+}
+
+// IsResponse returns whether the Response logging mode bit is set
+func (m ClientLogMode) IsResponse() bool {
+ return m&LogResponse != 0
+}
+
+// IsResponseWithBody returns whether the ResponseWithBody logging mode bit is set
+func (m ClientLogMode) IsResponseWithBody() bool {
+ return m&LogResponseWithBody != 0
+}
+
+// ClearSigning clears the Signing logging mode bit
+func (m *ClientLogMode) ClearSigning() {
+ *m &^= LogSigning
+}
+
+// ClearRetries clears the Retries logging mode bit
+func (m *ClientLogMode) ClearRetries() {
+ *m &^= LogRetries
+}
+
+// ClearRequest clears the Request logging mode bit
+func (m *ClientLogMode) ClearRequest() {
+ *m &^= LogRequest
+}
+
+// ClearRequestWithBody clears the RequestWithBody logging mode bit
+func (m *ClientLogMode) ClearRequestWithBody() {
+ *m &^= LogRequestWithBody
+}
+
+// ClearResponse clears the Response logging mode bit
+func (m *ClientLogMode) ClearResponse() {
+ *m &^= LogResponse
+}
+
+// ClearResponseWithBody clears the ResponseWithBody logging mode bit
+func (m *ClientLogMode) ClearResponseWithBody() {
+ *m &^= LogResponseWithBody
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/logging_generate.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/logging_generate.go
new file mode 100644
index 00000000..8ac6c74b
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/logging_generate.go
@@ -0,0 +1,78 @@
+//go:build clientlogmode
+// +build clientlogmode
+
+package main
+
+import (
+ "log"
+ "os"
+ "text/template"
+)
+
+var config = struct {
+ ModeBits []string
+}{
+ // Items should be appended only to keep bit-flag positions stable
+ ModeBits: []string{
+ "Signing",
+ "Retries",
+ "Request",
+ "RequestWithBody",
+ "Response",
+ "ResponseWithBody",
+ },
+}
+
+var tmpl = template.Must(template.New("ClientLogMode").Funcs(map[string]interface{}{
+ "symbolName": func(name string) string {
+ return "Log" + name
+ },
+}).Parse(`// Code generated by aws/logging_generate.go DO NOT EDIT.
+
+package aws
+
+// ClientLogMode represents the logging mode of SDK clients. The client logging mode is a bit-field where
+// each bit is a flag that describes the logging behavior for one or more client components.
+// The entire 64-bit group is reserved for later expansion by the SDK.
+//
+// Example: Setting ClientLogMode to enable logging of retries and requests
+// clientLogMode := aws.LogRetries | aws.LogRequest
+//
+// Example: Adding an additional log mode to an existing ClientLogMode value
+// clientLogMode |= aws.LogResponse
+type ClientLogMode uint64
+
+// Supported ClientLogMode bits that can be configured to toggle logging of specific SDK events.
+const (
+{{- range $index, $field := .ModeBits }}
+ {{ (symbolName $field) }}{{- if (eq 0 $index) }} ClientLogMode = 1 << (64 - 1 - iota){{- end }}
+{{- end }}
+)
+
+{{ range $_, $field := .ModeBits }}
+// Is{{- $field }} returns whether the {{ $field }} logging mode bit is set
+func (m ClientLogMode) Is{{- $field }}() bool {
+ return m&{{- (symbolName $field) }} != 0
+}
+{{ end }}
+
+{{ range $_, $field := .ModeBits }}
+// Clear{{- $field }} clears the {{ $field }} logging mode bit
+func (m *ClientLogMode) Clear{{- $field }}() {
+ *m &^= {{- (symbolName $field) }}
+}
+{{ end }}
+`))
+
+func main() {
+ file, err := os.Create("logging.go")
+ if err != nil {
+ log.Fatal(err)
+ }
+ defer file.Close()
+
+ err = tmpl.Execute(file, config)
+ if err != nil {
+ log.Fatal(err)
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/metadata.go
new file mode 100644
index 00000000..28201217
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/metadata.go
@@ -0,0 +1,167 @@
+package middleware
+
+import (
+ "context"
+ "github.com/aws/aws-sdk-go-v2/aws"
+
+ "github.com/aws/smithy-go/middleware"
+)
+
+// RegisterServiceMetadata registers metadata about the service and operation into the middleware context
+// so that it is available at runtime for other middleware to introspect.
+type RegisterServiceMetadata struct {
+ ServiceID string
+ SigningName string
+ Region string
+ OperationName string
+}
+
+// ID returns the middleware identifier.
+func (s *RegisterServiceMetadata) ID() string {
+ return "RegisterServiceMetadata"
+}
+
+// HandleInitialize registers service metadata information into the middleware context, allowing for introspection.
+func (s RegisterServiceMetadata) HandleInitialize(
+ ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler,
+) (out middleware.InitializeOutput, metadata middleware.Metadata, err error) {
+ if len(s.ServiceID) > 0 {
+ ctx = SetServiceID(ctx, s.ServiceID)
+ }
+ if len(s.SigningName) > 0 {
+ ctx = SetSigningName(ctx, s.SigningName)
+ }
+ if len(s.Region) > 0 {
+ ctx = setRegion(ctx, s.Region)
+ }
+ if len(s.OperationName) > 0 {
+ ctx = setOperationName(ctx, s.OperationName)
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+// service metadata keys for storing and lookup of runtime stack information.
+type (
+ serviceIDKey struct{}
+ signingNameKey struct{}
+ signingRegionKey struct{}
+ regionKey struct{}
+ operationNameKey struct{}
+ partitionIDKey struct{}
+)
+
+// GetServiceID retrieves the service id from the context.
+//
+// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues
+// to clear all stack values.
+func GetServiceID(ctx context.Context) (v string) {
+ v, _ = middleware.GetStackValue(ctx, serviceIDKey{}).(string)
+ return v
+}
+
+// GetSigningName retrieves the service signing name from the context.
+//
+// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues
+// to clear all stack values.
+func GetSigningName(ctx context.Context) (v string) {
+ v, _ = middleware.GetStackValue(ctx, signingNameKey{}).(string)
+ return v
+}
+
+// GetSigningRegion retrieves the region from the context.
+//
+// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues
+// to clear all stack values.
+func GetSigningRegion(ctx context.Context) (v string) {
+ v, _ = middleware.GetStackValue(ctx, signingRegionKey{}).(string)
+ return v
+}
+
+// GetRegion retrieves the endpoint region from the context.
+//
+// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues
+// to clear all stack values.
+func GetRegion(ctx context.Context) (v string) {
+ v, _ = middleware.GetStackValue(ctx, regionKey{}).(string)
+ return v
+}
+
+// GetOperationName retrieves the service operation metadata from the context.
+//
+// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues
+// to clear all stack values.
+func GetOperationName(ctx context.Context) (v string) {
+ v, _ = middleware.GetStackValue(ctx, operationNameKey{}).(string)
+ return v
+}
+
+// GetPartitionID retrieves the endpoint partition id from the context.
+//
+// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues
+// to clear all stack values.
+func GetPartitionID(ctx context.Context) string {
+ v, _ := middleware.GetStackValue(ctx, partitionIDKey{}).(string)
+ return v
+}
+
+// SetSigningName set or modifies the signing name on the context.
+//
+// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues
+// to clear all stack values.
+func SetSigningName(ctx context.Context, value string) context.Context {
+ return middleware.WithStackValue(ctx, signingNameKey{}, value)
+}
+
+// SetSigningRegion sets or modifies the region on the context.
+//
+// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues
+// to clear all stack values.
+func SetSigningRegion(ctx context.Context, value string) context.Context {
+ return middleware.WithStackValue(ctx, signingRegionKey{}, value)
+}
+
+// SetServiceID sets the service id on the context.
+//
+// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues
+// to clear all stack values.
+func SetServiceID(ctx context.Context, value string) context.Context {
+ return middleware.WithStackValue(ctx, serviceIDKey{}, value)
+}
+
+// setRegion sets the endpoint region on the context.
+//
+// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues
+// to clear all stack values.
+func setRegion(ctx context.Context, value string) context.Context {
+ return middleware.WithStackValue(ctx, regionKey{}, value)
+}
+
+// setOperationName sets the service operation on the context.
+//
+// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues
+// to clear all stack values.
+func setOperationName(ctx context.Context, value string) context.Context {
+ return middleware.WithStackValue(ctx, operationNameKey{}, value)
+}
+
+// SetPartitionID sets the partition id of a resolved region on the context
+//
+// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues
+// to clear all stack values.
+func SetPartitionID(ctx context.Context, value string) context.Context {
+ return middleware.WithStackValue(ctx, partitionIDKey{}, value)
+}
+
+// EndpointSource key
+type endpointSourceKey struct{}
+
+// GetEndpointSource returns an endpoint source if set on context
+func GetEndpointSource(ctx context.Context) (v aws.EndpointSource) {
+ v, _ = middleware.GetStackValue(ctx, endpointSourceKey{}).(aws.EndpointSource)
+ return v
+}
+
+// SetEndpointSource sets endpoint source on context
+func SetEndpointSource(ctx context.Context, value aws.EndpointSource) context.Context {
+ return middleware.WithStackValue(ctx, endpointSourceKey{}, value)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/middleware.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/middleware.go
new file mode 100644
index 00000000..9bd0dfb1
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/middleware.go
@@ -0,0 +1,168 @@
+package middleware
+
+import (
+ "context"
+ "fmt"
+ "time"
+
+ "github.com/aws/aws-sdk-go-v2/internal/rand"
+ "github.com/aws/aws-sdk-go-v2/internal/sdk"
+ "github.com/aws/smithy-go/logging"
+ "github.com/aws/smithy-go/middleware"
+ smithyrand "github.com/aws/smithy-go/rand"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// ClientRequestID is a Smithy BuildMiddleware that will generate a unique ID for logical API operation
+// invocation.
+type ClientRequestID struct{}
+
+// ID the identifier for the ClientRequestID
+func (r *ClientRequestID) ID() string {
+ return "ClientRequestID"
+}
+
+// HandleBuild attaches a unique operation invocation id for the operation to the request
+func (r ClientRequestID) HandleBuild(ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler) (
+ out middleware.BuildOutput, metadata middleware.Metadata, err error,
+) {
+ req, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown transport type %T", req)
+ }
+
+ invocationID, err := smithyrand.NewUUID(rand.Reader).GetUUID()
+ if err != nil {
+ return out, metadata, err
+ }
+
+ const invocationIDHeader = "Amz-Sdk-Invocation-Id"
+ req.Header[invocationIDHeader] = append(req.Header[invocationIDHeader][:0], invocationID)
+
+ return next.HandleBuild(ctx, in)
+}
+
+// RecordResponseTiming records the response timing for the SDK client requests.
+type RecordResponseTiming struct{}
+
+// ID is the middleware identifier
+func (a *RecordResponseTiming) ID() string {
+ return "RecordResponseTiming"
+}
+
+// HandleDeserialize calculates response metadata and clock skew
+func (a RecordResponseTiming) 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)
+ responseAt := sdk.NowTime()
+ setResponseAt(&metadata, responseAt)
+
+ var serverTime time.Time
+
+ switch resp := out.RawResponse.(type) {
+ case *smithyhttp.Response:
+ respDateHeader := resp.Header.Get("Date")
+ if len(respDateHeader) == 0 {
+ break
+ }
+ var parseErr error
+ serverTime, parseErr = smithyhttp.ParseTime(respDateHeader)
+ if parseErr != nil {
+ logger := middleware.GetLogger(ctx)
+ logger.Logf(logging.Warn, "failed to parse response Date header value, got %v",
+ parseErr.Error())
+ break
+ }
+ setServerTime(&metadata, serverTime)
+ }
+
+ if !serverTime.IsZero() {
+ attemptSkew := serverTime.Sub(responseAt)
+ setAttemptSkew(&metadata, attemptSkew)
+ }
+
+ return out, metadata, err
+}
+
+type responseAtKey struct{}
+
+// GetResponseAt returns the time response was received at.
+func GetResponseAt(metadata middleware.Metadata) (v time.Time, ok bool) {
+ v, ok = metadata.Get(responseAtKey{}).(time.Time)
+ return v, ok
+}
+
+// setResponseAt sets the response time on the metadata.
+func setResponseAt(metadata *middleware.Metadata, v time.Time) {
+ metadata.Set(responseAtKey{}, v)
+}
+
+type serverTimeKey struct{}
+
+// GetServerTime returns the server time for response.
+func GetServerTime(metadata middleware.Metadata) (v time.Time, ok bool) {
+ v, ok = metadata.Get(serverTimeKey{}).(time.Time)
+ return v, ok
+}
+
+// setServerTime sets the server time on the metadata.
+func setServerTime(metadata *middleware.Metadata, v time.Time) {
+ metadata.Set(serverTimeKey{}, v)
+}
+
+type attemptSkewKey struct{}
+
+// GetAttemptSkew returns Attempt clock skew for response from metadata.
+func GetAttemptSkew(metadata middleware.Metadata) (v time.Duration, ok bool) {
+ v, ok = metadata.Get(attemptSkewKey{}).(time.Duration)
+ return v, ok
+}
+
+// setAttemptSkew sets the attempt clock skew on the metadata.
+func setAttemptSkew(metadata *middleware.Metadata, v time.Duration) {
+ metadata.Set(attemptSkewKey{}, v)
+}
+
+// AddClientRequestIDMiddleware adds ClientRequestID to the middleware stack
+func AddClientRequestIDMiddleware(stack *middleware.Stack) error {
+ return stack.Build.Add(&ClientRequestID{}, middleware.After)
+}
+
+// AddRecordResponseTiming adds RecordResponseTiming middleware to the
+// middleware stack.
+func AddRecordResponseTiming(stack *middleware.Stack) error {
+ return stack.Deserialize.Add(&RecordResponseTiming{}, middleware.After)
+}
+
+// rawResponseKey is the accessor key used to store and access the
+// raw response within the response metadata.
+type rawResponseKey struct{}
+
+// addRawResponse middleware adds raw response on to the metadata
+type addRawResponse struct{}
+
+// ID the identifier for the ClientRequestID
+func (m *addRawResponse) ID() string {
+ return "AddRawResponseToMetadata"
+}
+
+// HandleDeserialize adds raw response on the middleware metadata
+func (m addRawResponse) 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)
+ metadata.Set(rawResponseKey{}, out.RawResponse)
+ return out, metadata, err
+}
+
+// AddRawResponseToMetadata adds middleware to the middleware stack that
+// store raw response on to the metadata.
+func AddRawResponseToMetadata(stack *middleware.Stack) error {
+ return stack.Deserialize.Add(&addRawResponse{}, middleware.Before)
+}
+
+// GetRawResponse returns raw response set on metadata
+func GetRawResponse(metadata middleware.Metadata) interface{} {
+ return metadata.Get(rawResponseKey{})
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/osname.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/osname.go
new file mode 100644
index 00000000..ba262dad
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/osname.go
@@ -0,0 +1,24 @@
+//go:build go1.16
+// +build go1.16
+
+package middleware
+
+import "runtime"
+
+func getNormalizedOSName() (os string) {
+ switch runtime.GOOS {
+ case "android":
+ os = "android"
+ case "linux":
+ os = "linux"
+ case "windows":
+ os = "windows"
+ case "darwin":
+ os = "macos"
+ case "ios":
+ os = "ios"
+ default:
+ os = "other"
+ }
+ return os
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/osname_go115.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/osname_go115.go
new file mode 100644
index 00000000..e14a1e4e
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/osname_go115.go
@@ -0,0 +1,24 @@
+//go:build !go1.16
+// +build !go1.16
+
+package middleware
+
+import "runtime"
+
+func getNormalizedOSName() (os string) {
+ switch runtime.GOOS {
+ case "android":
+ os = "android"
+ case "linux":
+ os = "linux"
+ case "windows":
+ os = "windows"
+ case "darwin":
+ // Due to Apple M1 we can't distinguish between macOS and iOS when GOOS/GOARCH is darwin/amd64
+ // For now declare this as "other" until we have a better detection mechanism.
+ fallthrough
+ default:
+ os = "other"
+ }
+ return os
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/request_id.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/request_id.go
new file mode 100644
index 00000000..dd3391fe
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/request_id.go
@@ -0,0 +1,27 @@
+package middleware
+
+import (
+ "github.com/aws/smithy-go/middleware"
+)
+
+// requestIDKey is used to retrieve request id from response metadata
+type requestIDKey struct{}
+
+// SetRequestIDMetadata sets the provided request id over middleware metadata
+func SetRequestIDMetadata(metadata *middleware.Metadata, id string) {
+ metadata.Set(requestIDKey{}, id)
+}
+
+// GetRequestIDMetadata retrieves the request id from middleware metadata
+// returns string and bool indicating value of request id, whether request id was set.
+func GetRequestIDMetadata(metadata middleware.Metadata) (string, bool) {
+ if !metadata.Has(requestIDKey{}) {
+ return "", false
+ }
+
+ v, ok := metadata.Get(requestIDKey{}).(string)
+ if !ok {
+ return "", true
+ }
+ return v, true
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/request_id_retriever.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/request_id_retriever.go
new file mode 100644
index 00000000..7ce48c61
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/request_id_retriever.go
@@ -0,0 +1,49 @@
+package middleware
+
+import (
+ "context"
+
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// AddRequestIDRetrieverMiddleware adds request id retriever middleware
+func AddRequestIDRetrieverMiddleware(stack *middleware.Stack) error {
+ // add error wrapper middleware before operation deserializers so that it can wrap the error response
+ // returned by operation deserializers
+ return stack.Deserialize.Insert(&requestIDRetriever{}, "OperationDeserializer", middleware.Before)
+}
+
+type requestIDRetriever struct {
+}
+
+// ID returns the middleware identifier
+func (m *requestIDRetriever) ID() string {
+ return "RequestIDRetriever"
+}
+
+func (m *requestIDRetriever) 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)
+
+ resp, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ // No raw response to wrap with.
+ return out, metadata, err
+ }
+
+ // Different header which can map to request id
+ requestIDHeaderList := []string{"X-Amzn-Requestid", "X-Amz-RequestId"}
+
+ for _, h := range requestIDHeaderList {
+ // check for headers known to contain Request id
+ if v := resp.Header.Get(h); len(v) != 0 {
+ // set reqID on metadata for successful responses.
+ SetRequestIDMetadata(&metadata, v)
+ break
+ }
+ }
+
+ return out, metadata, err
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/user_agent.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/user_agent.go
new file mode 100644
index 00000000..d5adfec9
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/user_agent.go
@@ -0,0 +1,241 @@
+package middleware
+
+import (
+ "context"
+ "fmt"
+ "os"
+ "runtime"
+ "strings"
+
+ "github.com/aws/aws-sdk-go-v2/aws"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+var languageVersion = strings.TrimPrefix(runtime.Version(), "go")
+
+// SDKAgentKeyType is the metadata type to add to the SDK agent string
+type SDKAgentKeyType int
+
+// The set of valid SDKAgentKeyType constants. If an unknown value is assigned for SDKAgentKeyType it will
+// be mapped to AdditionalMetadata.
+const (
+ _ SDKAgentKeyType = iota
+ APIMetadata
+ OperatingSystemMetadata
+ LanguageMetadata
+ EnvironmentMetadata
+ FeatureMetadata
+ ConfigMetadata
+ FrameworkMetadata
+ AdditionalMetadata
+ ApplicationIdentifier
+)
+
+func (k SDKAgentKeyType) string() string {
+ switch k {
+ case APIMetadata:
+ return "api"
+ case OperatingSystemMetadata:
+ return "os"
+ case LanguageMetadata:
+ return "lang"
+ case EnvironmentMetadata:
+ return "exec-env"
+ case FeatureMetadata:
+ return "ft"
+ case ConfigMetadata:
+ return "cfg"
+ case FrameworkMetadata:
+ return "lib"
+ case ApplicationIdentifier:
+ return "app"
+ case AdditionalMetadata:
+ fallthrough
+ default:
+ return "md"
+ }
+}
+
+const execEnvVar = `AWS_EXECUTION_ENV`
+
+// requestUserAgent is a build middleware that set the User-Agent for the request.
+type requestUserAgent struct {
+ sdkAgent, userAgent *smithyhttp.UserAgentBuilder
+}
+
+// newRequestUserAgent returns a new requestUserAgent which will set the User-Agent and X-Amz-User-Agent for the
+// request.
+//
+// User-Agent example:
+// aws-sdk-go-v2/1.2.3
+//
+// X-Amz-User-Agent example:
+// aws-sdk-go-v2/1.2.3 md/GOOS/linux md/GOARCH/amd64 lang/go/1.15
+func newRequestUserAgent() *requestUserAgent {
+ userAgent, sdkAgent := smithyhttp.NewUserAgentBuilder(), smithyhttp.NewUserAgentBuilder()
+ addProductName(userAgent)
+ addProductName(sdkAgent)
+
+ r := &requestUserAgent{
+ sdkAgent: sdkAgent,
+ userAgent: userAgent,
+ }
+
+ addSDKMetadata(r)
+
+ return r
+}
+
+func addSDKMetadata(r *requestUserAgent) {
+ r.AddSDKAgentKey(OperatingSystemMetadata, getNormalizedOSName())
+ r.AddSDKAgentKeyValue(LanguageMetadata, "go", languageVersion)
+ r.AddSDKAgentKeyValue(AdditionalMetadata, "GOOS", runtime.GOOS)
+ r.AddSDKAgentKeyValue(AdditionalMetadata, "GOARCH", runtime.GOARCH)
+ if ev := os.Getenv(execEnvVar); len(ev) > 0 {
+ r.AddSDKAgentKey(EnvironmentMetadata, ev)
+ }
+}
+
+func addProductName(builder *smithyhttp.UserAgentBuilder) {
+ builder.AddKeyValue(aws.SDKName, aws.SDKVersion)
+}
+
+// AddUserAgentKey retrieves a requestUserAgent from the provided stack, or initializes one.
+func AddUserAgentKey(key string) func(*middleware.Stack) error {
+ return func(stack *middleware.Stack) error {
+ requestUserAgent, err := getOrAddRequestUserAgent(stack)
+ if err != nil {
+ return err
+ }
+ requestUserAgent.AddUserAgentKey(key)
+ return nil
+ }
+}
+
+// AddUserAgentKeyValue retrieves a requestUserAgent from the provided stack, or initializes one.
+func AddUserAgentKeyValue(key, value string) func(*middleware.Stack) error {
+ return func(stack *middleware.Stack) error {
+ requestUserAgent, err := getOrAddRequestUserAgent(stack)
+ if err != nil {
+ return err
+ }
+ requestUserAgent.AddUserAgentKeyValue(key, value)
+ return nil
+ }
+}
+
+// AddSDKAgentKey retrieves a requestUserAgent from the provided stack, or initializes one.
+func AddSDKAgentKey(keyType SDKAgentKeyType, key string) func(*middleware.Stack) error {
+ return func(stack *middleware.Stack) error {
+ requestUserAgent, err := getOrAddRequestUserAgent(stack)
+ if err != nil {
+ return err
+ }
+ requestUserAgent.AddSDKAgentKey(keyType, key)
+ return nil
+ }
+}
+
+// AddSDKAgentKeyValue retrieves a requestUserAgent from the provided stack, or initializes one.
+func AddSDKAgentKeyValue(keyType SDKAgentKeyType, key, value string) func(*middleware.Stack) error {
+ return func(stack *middleware.Stack) error {
+ requestUserAgent, err := getOrAddRequestUserAgent(stack)
+ if err != nil {
+ return err
+ }
+ requestUserAgent.AddSDKAgentKeyValue(keyType, key, value)
+ return nil
+ }
+}
+
+// AddRequestUserAgentMiddleware registers a requestUserAgent middleware on the stack if not present.
+func AddRequestUserAgentMiddleware(stack *middleware.Stack) error {
+ _, err := getOrAddRequestUserAgent(stack)
+ return err
+}
+
+func getOrAddRequestUserAgent(stack *middleware.Stack) (*requestUserAgent, error) {
+ id := (*requestUserAgent)(nil).ID()
+ bm, ok := stack.Build.Get(id)
+ if !ok {
+ bm = newRequestUserAgent()
+ err := stack.Build.Add(bm, middleware.After)
+ if err != nil {
+ return nil, err
+ }
+ }
+
+ requestUserAgent, ok := bm.(*requestUserAgent)
+ if !ok {
+ return nil, fmt.Errorf("%T for %s middleware did not match expected type", bm, id)
+ }
+
+ return requestUserAgent, nil
+}
+
+// AddUserAgentKey adds the component identified by name to the User-Agent string.
+func (u *requestUserAgent) AddUserAgentKey(key string) {
+ u.userAgent.AddKey(key)
+}
+
+// AddUserAgentKeyValue adds the key identified by the given name and value to the User-Agent string.
+func (u *requestUserAgent) AddUserAgentKeyValue(key, value string) {
+ u.userAgent.AddKeyValue(key, value)
+}
+
+// AddUserAgentKey adds the component identified by name to the User-Agent string.
+func (u *requestUserAgent) AddSDKAgentKey(keyType SDKAgentKeyType, key string) {
+ // TODO: should target sdkAgent
+ u.userAgent.AddKey(keyType.string() + "/" + key)
+}
+
+// AddUserAgentKeyValue adds the key identified by the given name and value to the User-Agent string.
+func (u *requestUserAgent) AddSDKAgentKeyValue(keyType SDKAgentKeyType, key, value string) {
+ // TODO: should target sdkAgent
+ u.userAgent.AddKeyValue(keyType.string()+"/"+key, value)
+}
+
+// ID the name of the middleware.
+func (u *requestUserAgent) ID() string {
+ return "UserAgent"
+}
+
+// HandleBuild adds or appends the constructed user agent to the request.
+func (u *requestUserAgent) HandleBuild(ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler) (
+ out middleware.BuildOutput, metadata middleware.Metadata, err error,
+) {
+ switch req := in.Request.(type) {
+ case *smithyhttp.Request:
+ u.addHTTPUserAgent(req)
+ // TODO: To be re-enabled
+ // u.addHTTPSDKAgent(req)
+ default:
+ return out, metadata, fmt.Errorf("unknown transport type %T", in)
+ }
+
+ return next.HandleBuild(ctx, in)
+}
+
+func (u *requestUserAgent) addHTTPUserAgent(request *smithyhttp.Request) {
+ const userAgent = "User-Agent"
+ updateHTTPHeader(request, userAgent, u.userAgent.Build())
+}
+
+func (u *requestUserAgent) addHTTPSDKAgent(request *smithyhttp.Request) {
+ const sdkAgent = "X-Amz-User-Agent"
+ updateHTTPHeader(request, sdkAgent, u.sdkAgent.Build())
+}
+
+func updateHTTPHeader(request *smithyhttp.Request, header string, value string) {
+ var current string
+ if v := request.Header[header]; len(v) > 0 {
+ current = v[0]
+ }
+ if len(current) > 0 {
+ current = value + " " + current
+ } else {
+ current = value
+ }
+ request.Header[header] = append(request.Header[header][:0], current)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/ec2query/error_utils.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/ec2query/error_utils.go
new file mode 100644
index 00000000..12a2c77a
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/ec2query/error_utils.go
@@ -0,0 +1,24 @@
+package ec2query
+
+import (
+ "encoding/xml"
+ "fmt"
+ "io"
+)
+
+// ErrorComponents represents the error response fields
+// that will be deserialized from a ec2query error response body
+type ErrorComponents struct {
+ Code string `xml:"Errors>Error>Code"`
+ Message string `xml:"Errors>Error>Message"`
+ RequestID string `xml:"RequestID"`
+}
+
+// GetErrorResponseComponents returns the error components from a ec2query error response body
+func GetErrorResponseComponents(r io.Reader) (ErrorComponents, error) {
+ var er ErrorComponents
+ if err := xml.NewDecoder(r).Decode(&er); err != nil && err != io.EOF {
+ return ErrorComponents{}, fmt.Errorf("error while fetching xml error response code: %w", err)
+ }
+ return er, nil
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/array.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/array.go
new file mode 100644
index 00000000..77dd4d8d
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/array.go
@@ -0,0 +1,61 @@
+package query
+
+import (
+ "fmt"
+ "net/url"
+)
+
+// Array represents the encoding of Query lists and sets. A Query array is a
+// representation of a list of values of a fixed type. A serialized array might
+// look like the following:
+//
+// ListName.member.1=foo
+// &ListName.member.2=bar
+// &Listname.member.3=baz
+type Array struct {
+ // The query values to add the array to.
+ values url.Values
+ // The array's prefix, which includes the names of all parent structures
+ // and ends with the name of the list. For example, the prefix might be
+ // "ParentStructure.ListName". This prefix will be used to form the full
+ // keys for each element in the list. For example, an entry might have the
+ // key "ParentStructure.ListName.member.MemberName.1".
+ //
+ // While this is currently represented as a string that gets added to, it
+ // could also be represented as a stack that only gets condensed into a
+ // string when a finalized key is created. This could potentially reduce
+ // allocations.
+ prefix string
+ // Whether the list is flat or not. A list that is not flat will produce the
+ // following entry to the url.Values for a given entry:
+ // ListName.MemberName.1=value
+ // A list that is flat will produce the following:
+ // ListName.1=value
+ flat bool
+ // The location name of the member. In most cases this should be "member".
+ memberName string
+ // Elements are stored in values, so we keep track of the list size here.
+ size int32
+}
+
+func newArray(values url.Values, prefix string, flat bool, memberName string) *Array {
+ return &Array{
+ values: values,
+ prefix: prefix,
+ flat: flat,
+ memberName: memberName,
+ }
+}
+
+// Value adds a new element to the Query Array. Returns a Value type used to
+// encode the array element.
+func (a *Array) Value() Value {
+ // Query lists start a 1, so adjust the size first
+ a.size++
+ prefix := a.prefix
+ if !a.flat {
+ prefix = fmt.Sprintf("%s.%s", prefix, a.memberName)
+ }
+ // Lists can't have flat members
+ return newValue(a.values, fmt.Sprintf("%s.%d", prefix, a.size), false)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/encoder.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/encoder.go
new file mode 100644
index 00000000..2ecf9241
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/encoder.go
@@ -0,0 +1,80 @@
+package query
+
+import (
+ "io"
+ "net/url"
+ "sort"
+)
+
+// Encoder is a Query encoder that supports construction of Query body
+// values using methods.
+type Encoder struct {
+ // The query values that will be built up to manage encoding.
+ values url.Values
+ // The writer that the encoded body will be written to.
+ writer io.Writer
+ Value
+}
+
+// NewEncoder returns a new Query body encoder
+func NewEncoder(writer io.Writer) *Encoder {
+ values := url.Values{}
+ return &Encoder{
+ values: values,
+ writer: writer,
+ Value: newBaseValue(values),
+ }
+}
+
+// Encode returns the []byte slice representing the current
+// state of the Query encoder.
+func (e Encoder) Encode() error {
+ ws, ok := e.writer.(interface{ WriteString(string) (int, error) })
+ if !ok {
+ // Fall back to less optimal byte slice casting if WriteString isn't available.
+ ws = &wrapWriteString{writer: e.writer}
+ }
+
+ // Get the keys and sort them to have a stable output
+ keys := make([]string, 0, len(e.values))
+ for k := range e.values {
+ keys = append(keys, k)
+ }
+ sort.Strings(keys)
+ isFirstEntry := true
+ for _, key := range keys {
+ queryValues := e.values[key]
+ escapedKey := url.QueryEscape(key)
+ for _, value := range queryValues {
+ if !isFirstEntry {
+ if _, err := ws.WriteString(`&`); err != nil {
+ return err
+ }
+ } else {
+ isFirstEntry = false
+ }
+ if _, err := ws.WriteString(escapedKey); err != nil {
+ return err
+ }
+ if _, err := ws.WriteString(`=`); err != nil {
+ return err
+ }
+ if _, err := ws.WriteString(url.QueryEscape(value)); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+}
+
+// wrapWriteString wraps an io.Writer to provide a WriteString method
+// where one is not available.
+type wrapWriteString struct {
+ writer io.Writer
+}
+
+// WriteString writes a string to the wrapped writer by casting it to
+// a byte array first.
+func (w wrapWriteString) WriteString(v string) (int, error) {
+ return w.writer.Write([]byte(v))
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/map.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/map.go
new file mode 100644
index 00000000..ab91e357
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/map.go
@@ -0,0 +1,78 @@
+package query
+
+import (
+ "fmt"
+ "net/url"
+)
+
+// Map represents the encoding of Query maps. A Query map is a representation
+// of a mapping of arbitrary string keys to arbitrary values of a fixed type.
+// A Map differs from an Object in that the set of keys is not fixed, in that
+// the values must all be of the same type, and that map entries are ordered.
+// A serialized map might look like the following:
+//
+// MapName.entry.1.key=Foo
+// &MapName.entry.1.value=spam
+// &MapName.entry.2.key=Bar
+// &MapName.entry.2.value=eggs
+type Map struct {
+ // The query values to add the map to.
+ values url.Values
+ // The map's prefix, which includes the names of all parent structures
+ // and ends with the name of the object. For example, the prefix might be
+ // "ParentStructure.MapName". This prefix will be used to form the full
+ // keys for each key-value pair of the map. For example, a value might have
+ // the key "ParentStructure.MapName.1.value".
+ //
+ // While this is currently represented as a string that gets added to, it
+ // could also be represented as a stack that only gets condensed into a
+ // string when a finalized key is created. This could potentially reduce
+ // allocations.
+ prefix string
+ // Whether the map is flat or not. A map that is not flat will produce the
+ // following entries to the url.Values for a given key-value pair:
+ // MapName.entry.1.KeyLocationName=mykey
+ // MapName.entry.1.ValueLocationName=myvalue
+ // A map that is flat will produce the following:
+ // MapName.1.KeyLocationName=mykey
+ // MapName.1.ValueLocationName=myvalue
+ flat bool
+ // The location name of the key. In most cases this should be "key".
+ keyLocationName string
+ // The location name of the value. In most cases this should be "value".
+ valueLocationName string
+ // Elements are stored in values, so we keep track of the list size here.
+ size int32
+}
+
+func newMap(values url.Values, prefix string, flat bool, keyLocationName string, valueLocationName string) *Map {
+ return &Map{
+ values: values,
+ prefix: prefix,
+ flat: flat,
+ keyLocationName: keyLocationName,
+ valueLocationName: valueLocationName,
+ }
+}
+
+// Key adds the given named key to the Query map.
+// Returns a Value encoder that should be used to encode a Query value type.
+func (m *Map) Key(name string) Value {
+ // Query lists start a 1, so adjust the size first
+ m.size++
+ var key string
+ var value string
+ if m.flat {
+ key = fmt.Sprintf("%s.%d.%s", m.prefix, m.size, m.keyLocationName)
+ value = fmt.Sprintf("%s.%d.%s", m.prefix, m.size, m.valueLocationName)
+ } else {
+ key = fmt.Sprintf("%s.entry.%d.%s", m.prefix, m.size, m.keyLocationName)
+ value = fmt.Sprintf("%s.entry.%d.%s", m.prefix, m.size, m.valueLocationName)
+ }
+
+ // The key can only be a string, so we just go ahead and set it here
+ newValue(m.values, key, false).String(name)
+
+ // Maps can't have flat members
+ return newValue(m.values, value, false)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/middleware.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/middleware.go
new file mode 100644
index 00000000..36034479
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/middleware.go
@@ -0,0 +1,62 @@
+package query
+
+import (
+ "context"
+ "fmt"
+ "io/ioutil"
+
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// AddAsGetRequestMiddleware adds a middleware to the Serialize stack after the
+// operation serializer that will convert the query request body to a GET
+// operation with the query message in the HTTP request querystring.
+func AddAsGetRequestMiddleware(stack *middleware.Stack) error {
+ return stack.Serialize.Insert(&asGetRequest{}, "OperationSerializer", middleware.After)
+}
+
+type asGetRequest struct{}
+
+func (*asGetRequest) ID() string { return "Query:AsGetRequest" }
+
+func (m *asGetRequest) HandleSerialize(
+ ctx context.Context, input middleware.SerializeInput, next middleware.SerializeHandler,
+) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ req, ok := input.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, fmt.Errorf("expect smithy HTTP Request, got %T", input.Request)
+ }
+
+ req.Method = "GET"
+
+ // If the stream is not set, nothing else to do.
+ stream := req.GetStream()
+ if stream == nil {
+ return next.HandleSerialize(ctx, input)
+ }
+
+ // Clear the stream since there will not be any body.
+ req.Header.Del("Content-Type")
+ req, err = req.SetStream(nil)
+ if err != nil {
+ return out, metadata, fmt.Errorf("unable update request body %w", err)
+ }
+ input.Request = req
+
+ // Update request query with the body's query string value.
+ delim := ""
+ if len(req.URL.RawQuery) != 0 {
+ delim = "&"
+ }
+
+ b, err := ioutil.ReadAll(stream)
+ if err != nil {
+ return out, metadata, fmt.Errorf("unable to get request body %w", err)
+ }
+ req.URL.RawQuery += delim + string(b)
+
+ return next.HandleSerialize(ctx, input)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/object.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/object.go
new file mode 100644
index 00000000..debb413d
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/object.go
@@ -0,0 +1,56 @@
+package query
+
+import (
+ "fmt"
+ "net/url"
+)
+
+// Object represents the encoding of Query structures and unions. A Query
+// object is a representation of a mapping of string keys to arbitrary
+// values where there is a fixed set of keys whose values each have their
+// own known type. A serialized object might look like the following:
+//
+// ObjectName.Foo=value
+// &ObjectName.Bar=5
+type Object struct {
+ // The query values to add the object to.
+ values url.Values
+ // The object's prefix, which includes the names of all parent structures
+ // and ends with the name of the object. For example, the prefix might be
+ // "ParentStructure.ObjectName". This prefix will be used to form the full
+ // keys for each member of the object. For example, a member might have the
+ // key "ParentStructure.ObjectName.MemberName".
+ //
+ // While this is currently represented as a string that gets added to, it
+ // could also be represented as a stack that only gets condensed into a
+ // string when a finalized key is created. This could potentially reduce
+ // allocations.
+ prefix string
+}
+
+func newObject(values url.Values, prefix string) *Object {
+ return &Object{
+ values: values,
+ prefix: prefix,
+ }
+}
+
+// Key adds the given named key to the Query object.
+// Returns a Value encoder that should be used to encode a Query value type.
+func (o *Object) Key(name string) Value {
+ return o.key(name, false)
+}
+
+// FlatKey adds the given named key to the Query object.
+// Returns a Value encoder that should be used to encode a Query value type. The
+// value will be flattened if it is a map or array.
+func (o *Object) FlatKey(name string) Value {
+ return o.key(name, true)
+}
+
+func (o *Object) key(name string, flatValue bool) Value {
+ if o.prefix != "" {
+ return newValue(o.values, fmt.Sprintf("%s.%s", o.prefix, name), flatValue)
+ }
+ return newValue(o.values, name, flatValue)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/value.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/value.go
new file mode 100644
index 00000000..302525ab
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/value.go
@@ -0,0 +1,106 @@
+package query
+
+import (
+ "math/big"
+ "net/url"
+
+ "github.com/aws/smithy-go/encoding/httpbinding"
+)
+
+// Value represents a Query Value type.
+type Value struct {
+ // The query values to add the value to.
+ values url.Values
+ // The value's key, which will form the prefix for complex types.
+ key string
+ // Whether the value should be flattened or not if it's a flattenable type.
+ flat bool
+ queryValue httpbinding.QueryValue
+}
+
+func newValue(values url.Values, key string, flat bool) Value {
+ return Value{
+ values: values,
+ key: key,
+ flat: flat,
+ queryValue: httpbinding.NewQueryValue(values, key, false),
+ }
+}
+
+func newBaseValue(values url.Values) Value {
+ return Value{
+ values: values,
+ queryValue: httpbinding.NewQueryValue(nil, "", false),
+ }
+}
+
+// Array returns a new Array encoder.
+func (qv Value) Array(locationName string) *Array {
+ return newArray(qv.values, qv.key, qv.flat, locationName)
+}
+
+// Object returns a new Object encoder.
+func (qv Value) Object() *Object {
+ return newObject(qv.values, qv.key)
+}
+
+// Map returns a new Map encoder.
+func (qv Value) Map(keyLocationName string, valueLocationName string) *Map {
+ return newMap(qv.values, qv.key, qv.flat, keyLocationName, valueLocationName)
+}
+
+// Base64EncodeBytes encodes v as a base64 query string value.
+// This is intended to enable compatibility with the JSON encoder.
+func (qv Value) Base64EncodeBytes(v []byte) {
+ qv.queryValue.Blob(v)
+}
+
+// Boolean encodes v as a query string value
+func (qv Value) Boolean(v bool) {
+ qv.queryValue.Boolean(v)
+}
+
+// String encodes v as a query string value
+func (qv Value) String(v string) {
+ qv.queryValue.String(v)
+}
+
+// Byte encodes v as a query string value
+func (qv Value) Byte(v int8) {
+ qv.queryValue.Byte(v)
+}
+
+// Short encodes v as a query string value
+func (qv Value) Short(v int16) {
+ qv.queryValue.Short(v)
+}
+
+// Integer encodes v as a query string value
+func (qv Value) Integer(v int32) {
+ qv.queryValue.Integer(v)
+}
+
+// Long encodes v as a query string value
+func (qv Value) Long(v int64) {
+ qv.queryValue.Long(v)
+}
+
+// Float encodes v as a query string value
+func (qv Value) Float(v float32) {
+ qv.queryValue.Float(v)
+}
+
+// Double encodes v as a query string value
+func (qv Value) Double(v float64) {
+ qv.queryValue.Double(v)
+}
+
+// BigInteger encodes v as a query string value
+func (qv Value) BigInteger(v *big.Int) {
+ qv.queryValue.BigInteger(v)
+}
+
+// BigDecimal encodes v as a query string value
+func (qv Value) BigDecimal(v *big.Float) {
+ qv.queryValue.BigDecimal(v)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/restjson/decoder_util.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/restjson/decoder_util.go
new file mode 100644
index 00000000..1bce78a4
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/restjson/decoder_util.go
@@ -0,0 +1,85 @@
+package restjson
+
+import (
+ "encoding/json"
+ "io"
+ "strings"
+
+ "github.com/aws/smithy-go"
+)
+
+// GetErrorInfo util looks for code, __type, and message members in the
+// json body. These members are optionally available, and the function
+// returns the value of member if it is available. This function is useful to
+// identify the error code, msg in a REST JSON error response.
+func GetErrorInfo(decoder *json.Decoder) (errorType string, message string, err error) {
+ var errInfo struct {
+ Code string
+ Type string `json:"__type"`
+ Message string
+ }
+
+ err = decoder.Decode(&errInfo)
+ if err != nil {
+ if err == io.EOF {
+ return errorType, message, nil
+ }
+ return errorType, message, err
+ }
+
+ // assign error type
+ if len(errInfo.Code) != 0 {
+ errorType = errInfo.Code
+ } else if len(errInfo.Type) != 0 {
+ errorType = errInfo.Type
+ }
+
+ // assign error message
+ if len(errInfo.Message) != 0 {
+ message = errInfo.Message
+ }
+
+ // sanitize error
+ if len(errorType) != 0 {
+ errorType = SanitizeErrorCode(errorType)
+ }
+
+ return errorType, message, nil
+}
+
+// SanitizeErrorCode sanitizes the errorCode string .
+// The rule for sanitizing is if a `:` character is present, then take only the
+// contents before the first : character in the value.
+// If a # character is present, then take only the contents after the
+// first # character in the value.
+func SanitizeErrorCode(errorCode string) string {
+ if strings.ContainsAny(errorCode, ":") {
+ errorCode = strings.SplitN(errorCode, ":", 2)[0]
+ }
+
+ if strings.ContainsAny(errorCode, "#") {
+ errorCode = strings.SplitN(errorCode, "#", 2)[1]
+ }
+
+ return errorCode
+}
+
+// GetSmithyGenericAPIError returns smithy generic api error and an error interface.
+// Takes in json decoder, and error Code string as args. The function retrieves error message
+// and error code from the decoder body. If errorCode of length greater than 0 is passed in as
+// an argument, it is used instead.
+func GetSmithyGenericAPIError(decoder *json.Decoder, errorCode string) (*smithy.GenericAPIError, error) {
+ errorType, message, err := GetErrorInfo(decoder)
+ if err != nil {
+ return nil, err
+ }
+
+ if len(errorCode) == 0 {
+ errorCode = errorType
+ }
+
+ return &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: message,
+ }, nil
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/xml/error_utils.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/xml/error_utils.go
new file mode 100644
index 00000000..c228f7d8
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/xml/error_utils.go
@@ -0,0 +1,56 @@
+package xml
+
+import (
+ "encoding/xml"
+ "fmt"
+ "io"
+)
+
+// ErrorComponents represents the error response fields
+// that will be deserialized from an xml error response body
+type ErrorComponents struct {
+ Code string
+ Message string
+ RequestID string
+}
+
+// GetErrorResponseComponents returns the error fields from an xml error response body
+func GetErrorResponseComponents(r io.Reader, noErrorWrapping bool) (ErrorComponents, error) {
+ if noErrorWrapping {
+ var errResponse noWrappedErrorResponse
+ if err := xml.NewDecoder(r).Decode(&errResponse); err != nil && err != io.EOF {
+ return ErrorComponents{}, fmt.Errorf("error while deserializing xml error response: %w", err)
+ }
+ return ErrorComponents{
+ Code: errResponse.Code,
+ Message: errResponse.Message,
+ RequestID: errResponse.RequestID,
+ }, nil
+ }
+
+ var errResponse wrappedErrorResponse
+ if err := xml.NewDecoder(r).Decode(&errResponse); err != nil && err != io.EOF {
+ return ErrorComponents{}, fmt.Errorf("error while deserializing xml error response: %w", err)
+ }
+ return ErrorComponents{
+ Code: errResponse.Code,
+ Message: errResponse.Message,
+ RequestID: errResponse.RequestID,
+ }, nil
+}
+
+// noWrappedErrorResponse represents the error response body with
+// no internal ...
+type wrappedErrorResponse struct {
+ Code string `xml:"Error>Code"`
+ Message string `xml:"Error>Message"`
+ RequestID string `xml:"RequestId"`
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/ratelimit/token_bucket.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/ratelimit/token_bucket.go
new file mode 100644
index 00000000..f337803f
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/ratelimit/token_bucket.go
@@ -0,0 +1,51 @@
+package ratelimit
+
+import (
+ "sync"
+)
+
+// TokenBucket provides a concurrency safe utility for adding and removing
+// tokens from the available token bucket.
+type TokenBucket struct {
+ capacity uint
+ maxCapacity uint
+ mu sync.Mutex
+}
+
+// NewTokenBucket returns an initialized TokenBucket with the capacity
+// specified.
+func NewTokenBucket(i uint) *TokenBucket {
+ return &TokenBucket{
+ capacity: i,
+ maxCapacity: i,
+ }
+}
+
+// Retrieve attempts to reduce the available tokens by the amount requested. If
+// there are tokens available true will be returned along with the number of
+// available tokens remaining. If amount requested is larger than the available
+// capacity, false will be returned along with the available capacity. If the
+// amount is less than the available capacity
+func (t *TokenBucket) Retrieve(amount uint) (available uint, retrieved bool) {
+ t.mu.Lock()
+ defer t.mu.Unlock()
+
+ if amount > t.capacity {
+ return t.capacity, false
+ }
+
+ t.capacity -= amount
+ return t.capacity, true
+}
+
+// Refund returns the amount of tokens back to the available token bucket, up
+// to the initial capacity.
+func (t *TokenBucket) Refund(amount uint) {
+ t.mu.Lock()
+ defer t.mu.Unlock()
+
+ t.capacity += amount
+ if t.capacity > t.maxCapacity {
+ t.capacity = t.maxCapacity
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/ratelimit/token_rate_limit.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/ratelimit/token_rate_limit.go
new file mode 100644
index 00000000..d7997f42
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/ratelimit/token_rate_limit.go
@@ -0,0 +1,82 @@
+package ratelimit
+
+import (
+ "context"
+ "fmt"
+)
+
+type rateToken struct {
+ tokenCost uint
+ bucket *TokenBucket
+}
+
+func (t rateToken) release() error {
+ t.bucket.Refund(t.tokenCost)
+ return nil
+}
+
+// TokenRateLimit provides a Token Bucket RateLimiter implementation
+// that limits the overall number of retry attempts that can be made across
+// operation invocations.
+type TokenRateLimit struct {
+ bucket *TokenBucket
+}
+
+// NewTokenRateLimit returns an TokenRateLimit with default values.
+// Functional options can configure the retry rate limiter.
+func NewTokenRateLimit(tokens uint) *TokenRateLimit {
+ return &TokenRateLimit{
+ bucket: NewTokenBucket(tokens),
+ }
+}
+
+func isTimeoutError(error) bool {
+ return false
+}
+
+type canceledError struct {
+ Err error
+}
+
+func (c canceledError) CanceledError() bool { return true }
+func (c canceledError) Unwrap() error { return c.Err }
+func (c canceledError) Error() string {
+ return fmt.Sprintf("canceled, %v", c.Err)
+}
+
+// GetToken may cause a available pool of retry quota to be
+// decremented. Will return an error if the decremented value can not be
+// reduced from the retry quota.
+func (l *TokenRateLimit) GetToken(ctx context.Context, cost uint) (func() error, error) {
+ select {
+ case <-ctx.Done():
+ return nil, canceledError{Err: ctx.Err()}
+ default:
+ }
+ if avail, ok := l.bucket.Retrieve(cost); !ok {
+ return nil, QuotaExceededError{Available: avail, Requested: cost}
+ }
+
+ return rateToken{
+ tokenCost: cost,
+ bucket: l.bucket,
+ }.release, nil
+}
+
+// AddTokens increments the token bucket by a fixed amount.
+func (l *TokenRateLimit) AddTokens(v uint) error {
+ l.bucket.Refund(v)
+ return nil
+}
+
+// QuotaExceededError provides the SDK error when the retries for a given
+// token bucket have been exhausted.
+type QuotaExceededError struct {
+ Available uint
+ Requested uint
+}
+
+func (e QuotaExceededError) Error() string {
+ return fmt.Sprintf("retry quota exceeded, %d available, %d requested",
+ e.Available, e.Requested)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/request.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/request.go
new file mode 100644
index 00000000..d8d00e61
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/request.go
@@ -0,0 +1,25 @@
+package aws
+
+import (
+ "fmt"
+)
+
+// TODO remove replace with smithy.CanceledError
+
+// RequestCanceledError is the error that will be returned by an API request
+// that was canceled. Requests given a Context may return this error when
+// canceled.
+type RequestCanceledError struct {
+ Err error
+}
+
+// CanceledError returns true to satisfy interfaces checking for canceled errors.
+func (*RequestCanceledError) CanceledError() bool { return true }
+
+// Unwrap returns the underlying error, if there was one.
+func (e *RequestCanceledError) Unwrap() error {
+ return e.Err
+}
+func (e *RequestCanceledError) Error() string {
+ return fmt.Sprintf("request canceled, %v", e.Err)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/doc.go
new file mode 100644
index 00000000..42ced06e
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/doc.go
@@ -0,0 +1,80 @@
+// Package retry provides interfaces and implementations for SDK request retry behavior.
+//
+// Retryer Interface and Implementations
+//
+// This packages defines Retryer interface that is used to either implement custom retry behavior
+// or to extend the existing retry implementations provided by the SDK. This packages provides a single
+// retry implementations: Standard.
+//
+// Standard
+//
+// Standard is the default retryer implementation used by service clients. The standard retryer is a rate limited
+// retryer that has a configurable max attempts to limit the number of retry attempts when a retryable error occurs.
+// In addition, the retryer uses a configurable token bucket to rate limit the retry attempts across the client,
+// and uses an additional delay policy to limit the time between a requests subsequent attempts.
+//
+// By default the standard retryer uses the DefaultRetryables slice of IsErrorRetryable types to determine whether
+// a given error is retryable. By default this list of retryables includes the following:
+// - Retrying errors that implement the RetryableError method, and return true.
+// - Connection Errors
+// - Errors that implement a ConnectionError, Temporary, or Timeout method that return true.
+// - Connection Reset Errors.
+// - net.OpErr types that are dialing errors or are temporary.
+// - HTTP Status Codes: 500, 502, 503, and 504.
+// - API Error Codes
+// - RequestTimeout, RequestTimeoutException
+// - Throttling, ThrottlingException, ThrottledException, RequestThrottledException, TooManyRequestsException,
+// RequestThrottled, SlowDown, EC2ThrottledException
+// - ProvisionedThroughputExceededException, RequestLimitExceeded, BandwidthLimitExceeded, LimitExceededException
+// - TransactionInProgressException, PriorRequestNotComplete
+//
+// The standard retryer will not retry a request in the event if the context associated with the request
+// has been cancelled. Applications must handle this case explicitly if they wish to retry with a different context
+// value.
+//
+// You can configure the standard retryer implementation to fit your applications by constructing a standard retryer
+// using the NewStandard function, and providing one more functional arguments that mutate the StandardOptions
+// structure. StandardOptions provides the ability to modify the token bucket rate limiter, retryable error conditions,
+// and the retry delay policy.
+//
+// For example to modify the default retry attempts for the standard retryer:
+//
+// // configure the custom retryer
+// customRetry := retry.NewStandard(func(o *retry.StandardOptions) {
+// o.MaxAttempts = 5
+// })
+//
+// // create a service client with the retryer
+// s3.NewFromConfig(cfg, func(o *s3.Options) {
+// o.Retryer = customRetry
+// })
+//
+// Utilities
+//
+// A number of package functions have been provided to easily wrap retryer implementations in an implementation agnostic
+// way. These are:
+//
+// AddWithErrorCodes - Provides the ability to add additional API error codes that should be considered retryable
+// in addition to those considered retryable by the provided retryer.
+//
+// AddWithMaxAttempts - Provides the ability to set the max number of attempts for retrying a request by wrapping
+// a retryer implementation.
+//
+// AddWithMaxBackoffDelay - Provides the ability to set the max back off delay that can occur before retrying a
+// request by wrapping a retryer implementation.
+//
+// The following package functions have been provided to easily satisfy different retry interfaces to further customize
+// a given retryer's behavior:
+//
+// BackoffDelayerFunc - Can be used to wrap a function to satisfy the BackoffDelayer interface. For example,
+// you can use this method to easily create custom back off policies to be used with the
+// standard retryer.
+//
+// IsErrorRetryableFunc - Can be used to wrap a function to satisfy the IsErrorRetryable interface. For example,
+// this can be used to extend the standard retryer to add additional logic ot determine if a
+// error should be retried.
+//
+// IsErrorTimeoutFunc - Can be used to wrap a function to satisfy IsErrorTimeout interface. For example,
+// this can be used to extend the standard retryer to add additional logic to determine if an
+// error should be considered a timeout.
+package retry
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/errors.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/errors.go
new file mode 100644
index 00000000..3e432eef
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/errors.go
@@ -0,0 +1,20 @@
+package retry
+
+import "fmt"
+
+// MaxAttemptsError provides the error when the maximum number of attempts have
+// been exceeded.
+type MaxAttemptsError struct {
+ Attempt int
+ Err error
+}
+
+func (e *MaxAttemptsError) Error() string {
+ return fmt.Sprintf("exceeded maximum number of attempts, %d, %v", e.Attempt, e.Err)
+}
+
+// Unwrap returns the nested error causing the max attempts error. Provides the
+// implementation for errors.Is and errors.As to unwrap nested errors.
+func (e *MaxAttemptsError) Unwrap() error {
+ return e.Err
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/jitter_backoff.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/jitter_backoff.go
new file mode 100644
index 00000000..c266996d
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/jitter_backoff.go
@@ -0,0 +1,49 @@
+package retry
+
+import (
+ "math"
+ "time"
+
+ "github.com/aws/aws-sdk-go-v2/internal/rand"
+ "github.com/aws/aws-sdk-go-v2/internal/timeconv"
+)
+
+// ExponentialJitterBackoff provides backoff delays with jitter based on the
+// number of attempts.
+type ExponentialJitterBackoff struct {
+ maxBackoff time.Duration
+ // precomputed number of attempts needed to reach max backoff.
+ maxBackoffAttempts float64
+
+ randFloat64 func() (float64, error)
+}
+
+// NewExponentialJitterBackoff returns an ExponentialJitterBackoff configured
+// for the max backoff.
+func NewExponentialJitterBackoff(maxBackoff time.Duration) *ExponentialJitterBackoff {
+ return &ExponentialJitterBackoff{
+ maxBackoff: maxBackoff,
+ maxBackoffAttempts: math.Log2(
+ float64(maxBackoff) / float64(time.Second)),
+ randFloat64: rand.CryptoRandFloat64,
+ }
+}
+
+// BackoffDelay returns the duration to wait before the next attempt should be
+// made. Returns an error if unable get a duration.
+func (j *ExponentialJitterBackoff) BackoffDelay(attempt int, err error) (time.Duration, error) {
+ if attempt > int(j.maxBackoffAttempts) {
+ return j.maxBackoff, nil
+ }
+
+ b, err := j.randFloat64()
+ if err != nil {
+ return 0, err
+ }
+
+ // [0.0, 1.0) * 2 ^ attempts
+ ri := int64(1 << uint64(attempt))
+ delaySeconds := b * float64(ri)
+
+ return timeconv.FloatSecondsDur(delaySeconds), nil
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/metadata.go
new file mode 100644
index 00000000..7a3f1830
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/metadata.go
@@ -0,0 +1,52 @@
+package retry
+
+import (
+ awsmiddle "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/smithy-go/middleware"
+)
+
+// attemptResultsKey is a metadata accessor key to retrieve metadata
+// for all request attempts.
+type attemptResultsKey struct {
+}
+
+// GetAttemptResults retrieves attempts results from middleware metadata.
+func GetAttemptResults(metadata middleware.Metadata) (AttemptResults, bool) {
+ m, ok := metadata.Get(attemptResultsKey{}).(AttemptResults)
+ return m, ok
+}
+
+// AttemptResults represents struct containing metadata returned by all request attempts.
+type AttemptResults struct {
+
+ // Results is a slice consisting attempt result from all request attempts.
+ // Results are stored in order request attempt is made.
+ Results []AttemptResult
+}
+
+// AttemptResult represents attempt result returned by a single request attempt.
+type AttemptResult struct {
+
+ // Err is the error if received for the request attempt.
+ Err error
+
+ // Retryable denotes if request may be retried. This states if an
+ // error is considered retryable.
+ Retryable bool
+
+ // Retried indicates if this request was retried.
+ Retried bool
+
+ // ResponseMetadata is any existing metadata passed via the response middlewares.
+ ResponseMetadata middleware.Metadata
+}
+
+// addAttemptResults adds attempt results to middleware metadata
+func addAttemptResults(metadata *middleware.Metadata, v AttemptResults) {
+ metadata.Set(attemptResultsKey{}, v)
+}
+
+// GetRawResponse returns raw response recorded for the attempt result
+func (a AttemptResult) GetRawResponse() interface{} {
+ return awsmiddle.GetRawResponse(a.ResponseMetadata)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/middleware.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/middleware.go
new file mode 100644
index 00000000..cd7ef0ba
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/middleware.go
@@ -0,0 +1,277 @@
+package retry
+
+import (
+ "context"
+ "fmt"
+ "strconv"
+ "strings"
+ "time"
+
+ "github.com/aws/aws-sdk-go-v2/aws"
+ awsmiddle "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/internal/sdk"
+ "github.com/aws/smithy-go/logging"
+ "github.com/aws/smithy-go/middleware"
+ smithymiddle "github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/transport/http"
+)
+
+// RequestCloner is a function that can take an input request type and clone the request
+// for use in a subsequent retry attempt
+type RequestCloner func(interface{}) interface{}
+
+type retryMetadata struct {
+ AttemptNum int
+ AttemptTime time.Time
+ MaxAttempts int
+ AttemptClockSkew time.Duration
+}
+
+// Attempt is a Smithy FinalizeMiddleware that handles retry attempts using the provided
+// Retryer implementation
+type Attempt struct {
+ // Enable the logging of retry attempts performed by the SDK.
+ // This will include logging retry attempts, unretryable errors, and when max attempts are reached.
+ LogAttempts bool
+
+ retryer aws.Retryer
+ requestCloner RequestCloner
+}
+
+// NewAttemptMiddleware returns a new Attempt retry middleware.
+func NewAttemptMiddleware(retryer aws.Retryer, requestCloner RequestCloner, optFns ...func(*Attempt)) *Attempt {
+ m := &Attempt{retryer: retryer, requestCloner: requestCloner}
+ for _, fn := range optFns {
+ fn(m)
+ }
+ return m
+}
+
+// ID returns the middleware identifier
+func (r *Attempt) ID() string {
+ return "Retry"
+}
+
+func (r Attempt) logf(logger logging.Logger, classification logging.Classification, format string, v ...interface{}) {
+ if !r.LogAttempts {
+ return
+ }
+ logger.Logf(classification, format, v...)
+}
+
+// HandleFinalize utilizes the provider Retryer implementation to attempt retries over the next handler
+func (r Attempt) HandleFinalize(ctx context.Context, in smithymiddle.FinalizeInput, next smithymiddle.FinalizeHandler) (
+ out smithymiddle.FinalizeOutput, metadata smithymiddle.Metadata, err error,
+) {
+ var attemptNum int
+ var attemptClockSkew time.Duration
+ var attemptResults AttemptResults
+
+ maxAttempts := r.retryer.MaxAttempts()
+
+ for {
+ attemptNum++
+ attemptInput := in
+ attemptInput.Request = r.requestCloner(attemptInput.Request)
+
+ attemptCtx := setRetryMetadata(ctx, retryMetadata{
+ AttemptNum: attemptNum,
+ AttemptTime: sdk.NowTime().UTC(),
+ MaxAttempts: maxAttempts,
+ AttemptClockSkew: attemptClockSkew,
+ })
+
+ var attemptResult AttemptResult
+
+ out, attemptResult, err = r.handleAttempt(attemptCtx, attemptInput, next)
+
+ var ok bool
+ attemptClockSkew, ok = awsmiddle.GetAttemptSkew(attemptResult.ResponseMetadata)
+ if !ok {
+ attemptClockSkew = 0
+ }
+
+ shouldRetry := attemptResult.Retried
+
+ // add attempt metadata to list of all attempt metadata
+ attemptResults.Results = append(attemptResults.Results, attemptResult)
+
+ if !shouldRetry {
+ // Ensure the last response's metadata is used as the bases for result
+ // metadata returned by the stack.
+ metadata = attemptResult.ResponseMetadata.Clone()
+
+ break
+ }
+ }
+
+ addAttemptResults(&metadata, attemptResults)
+ return out, metadata, err
+}
+
+// handleAttempt handles an individual request attempt.
+func (r Attempt) handleAttempt(ctx context.Context, in smithymiddle.FinalizeInput, next smithymiddle.FinalizeHandler) (
+ out smithymiddle.FinalizeOutput, attemptResult AttemptResult, err error,
+) {
+ defer func() {
+ attemptResult.Err = err
+ }()
+
+ relRetryToken := r.retryer.GetInitialToken()
+ logger := smithymiddle.GetLogger(ctx)
+ service, operation := awsmiddle.GetServiceID(ctx), awsmiddle.GetOperationName(ctx)
+
+ retryMetadata, _ := getRetryMetadata(ctx)
+ attemptNum := retryMetadata.AttemptNum
+ maxAttempts := retryMetadata.MaxAttempts
+
+ if attemptNum > 1 {
+ if rewindable, ok := in.Request.(interface{ RewindStream() error }); ok {
+ if rewindErr := rewindable.RewindStream(); rewindErr != nil {
+ err = fmt.Errorf("failed to rewind transport stream for retry, %w", rewindErr)
+ return out, attemptResult, err
+ }
+ }
+
+ r.logf(logger, logging.Debug, "retrying request %s/%s, attempt %d", service, operation, attemptNum)
+ }
+
+ var metadata smithymiddle.Metadata
+ out, metadata, err = next.HandleFinalize(ctx, in)
+ attemptResult.ResponseMetadata = metadata
+
+ if releaseError := relRetryToken(err); releaseError != nil && err != nil {
+ err = fmt.Errorf("failed to release token after request error, %w", err)
+ return out, attemptResult, err
+ }
+
+ if err == nil {
+ return out, attemptResult, err
+ }
+
+ retryable := r.retryer.IsErrorRetryable(err)
+ if !retryable {
+ r.logf(logger, logging.Debug, "request failed with unretryable error %v", err)
+ return out, attemptResult, err
+ }
+
+ // set retryable to true
+ attemptResult.Retryable = true
+
+ if maxAttempts > 0 && attemptNum >= maxAttempts {
+ r.logf(logger, logging.Debug, "max retry attempts exhausted, max %d", maxAttempts)
+ err = &MaxAttemptsError{
+ Attempt: attemptNum,
+ Err: err,
+ }
+ return out, attemptResult, err
+ }
+
+ relRetryToken, reqErr := r.retryer.GetRetryToken(ctx, err)
+ if reqErr != nil {
+ return out, attemptResult, reqErr
+ }
+
+ retryDelay, reqErr := r.retryer.RetryDelay(attemptNum, err)
+ if reqErr != nil {
+ return out, attemptResult, reqErr
+ }
+
+ if reqErr = sdk.SleepWithContext(ctx, retryDelay); reqErr != nil {
+ err = &aws.RequestCanceledError{Err: reqErr}
+ return out, attemptResult, err
+ }
+
+ attemptResult.Retried = true
+
+ return out, attemptResult, err
+}
+
+// MetricsHeader attaches SDK request metric header for retries to the transport
+type MetricsHeader struct{}
+
+// ID returns the middleware identifier
+func (r *MetricsHeader) ID() string {
+ return "RetryMetricsHeader"
+}
+
+// HandleFinalize attaches the sdk request metric header to the transport layer
+func (r MetricsHeader) HandleFinalize(ctx context.Context, in smithymiddle.FinalizeInput, next smithymiddle.FinalizeHandler) (
+ out smithymiddle.FinalizeOutput, metadata smithymiddle.Metadata, err error,
+) {
+ retryMetadata, _ := getRetryMetadata(ctx)
+
+ const retryMetricHeader = "Amz-Sdk-Request"
+ var parts []string
+
+ parts = append(parts, "attempt="+strconv.Itoa(retryMetadata.AttemptNum))
+ if retryMetadata.MaxAttempts != 0 {
+ parts = append(parts, "max="+strconv.Itoa(retryMetadata.MaxAttempts))
+ }
+
+ var ttl time.Time
+ if deadline, ok := ctx.Deadline(); ok {
+ ttl = deadline
+ }
+
+ // Only append the TTL if it can be determined.
+ if !ttl.IsZero() && retryMetadata.AttemptClockSkew > 0 {
+ const unixTimeFormat = "20060102T150405Z"
+ ttl = ttl.Add(retryMetadata.AttemptClockSkew)
+ parts = append(parts, "ttl="+ttl.Format(unixTimeFormat))
+ }
+
+ switch req := in.Request.(type) {
+ case *http.Request:
+ req.Header[retryMetricHeader] = append(req.Header[retryMetricHeader][:0], strings.Join(parts, "; "))
+ default:
+ return out, metadata, fmt.Errorf("unknown transport type %T", req)
+ }
+
+ return next.HandleFinalize(ctx, in)
+}
+
+type retryMetadataKey struct{}
+
+// getRetryMetadata retrieves retryMetadata from the context and a bool
+// indicating if it was set.
+//
+// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues
+// to clear all stack values.
+func getRetryMetadata(ctx context.Context) (metadata retryMetadata, ok bool) {
+ metadata, ok = middleware.GetStackValue(ctx, retryMetadataKey{}).(retryMetadata)
+ return metadata, ok
+}
+
+// setRetryMetadata sets the retryMetadata on the context.
+//
+// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues
+// to clear all stack values.
+func setRetryMetadata(ctx context.Context, metadata retryMetadata) context.Context {
+ return middleware.WithStackValue(ctx, retryMetadataKey{}, metadata)
+}
+
+// AddRetryMiddlewaresOptions is the set of options that can be passed to AddRetryMiddlewares for configuring retry
+// associated middleware.
+type AddRetryMiddlewaresOptions struct {
+ Retryer aws.Retryer
+
+ // Enable the logging of retry attempts performed by the SDK.
+ // This will include logging retry attempts, unretryable errors, and when max attempts are reached.
+ LogRetryAttempts bool
+}
+
+// AddRetryMiddlewares adds retry middleware to operation middleware stack
+func AddRetryMiddlewares(stack *smithymiddle.Stack, options AddRetryMiddlewaresOptions) error {
+ attempt := NewAttemptMiddleware(options.Retryer, http.RequestCloner, func(middleware *Attempt) {
+ middleware.LogAttempts = options.LogRetryAttempts
+ })
+
+ if err := stack.Finalize.Add(attempt, smithymiddle.After); err != nil {
+ return err
+ }
+ if err := stack.Finalize.Add(&MetricsHeader{}, smithymiddle.After); err != nil {
+ return err
+ }
+ return nil
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/retry.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/retry.go
new file mode 100644
index 00000000..ad81b8c9
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/retry.go
@@ -0,0 +1,72 @@
+package retry
+
+import (
+ "time"
+
+ "github.com/aws/aws-sdk-go-v2/aws"
+)
+
+// AddWithErrorCodes returns a Retryer with additional error codes considered
+// for determining if the error should be retried.
+func AddWithErrorCodes(r aws.Retryer, codes ...string) aws.Retryer {
+ retryable := &RetryableErrorCode{
+ Codes: map[string]struct{}{},
+ }
+ for _, c := range codes {
+ retryable.Codes[c] = struct{}{}
+ }
+
+ return &withIsErrorRetryable{
+ Retryer: r,
+ Retryable: retryable,
+ }
+}
+
+type withIsErrorRetryable struct {
+ aws.Retryer
+ Retryable IsErrorRetryable
+}
+
+func (r *withIsErrorRetryable) IsErrorRetryable(err error) bool {
+ if v := r.Retryable.IsErrorRetryable(err); v != aws.UnknownTernary {
+ return v.Bool()
+ }
+ return r.Retryer.IsErrorRetryable(err)
+}
+
+// AddWithMaxAttempts returns a Retryer with MaxAttempts set to the value
+// specified.
+func AddWithMaxAttempts(r aws.Retryer, max int) aws.Retryer {
+ return &withMaxAttempts{
+ Retryer: r,
+ Max: max,
+ }
+}
+
+type withMaxAttempts struct {
+ aws.Retryer
+ Max int
+}
+
+func (w *withMaxAttempts) MaxAttempts() int {
+ return w.Max
+}
+
+// AddWithMaxBackoffDelay returns a retryer wrapping the passed in retryer
+// overriding the RetryDelay behavior for a alternate minimum initial backoff
+// delay.
+func AddWithMaxBackoffDelay(r aws.Retryer, delay time.Duration) aws.Retryer {
+ return &withMaxBackoffDelay{
+ Retryer: r,
+ backoff: NewExponentialJitterBackoff(delay),
+ }
+}
+
+type withMaxBackoffDelay struct {
+ aws.Retryer
+ backoff *ExponentialJitterBackoff
+}
+
+func (r *withMaxBackoffDelay) RetryDelay(attempt int, err error) (time.Duration, error) {
+ return r.backoff.BackoffDelay(attempt, err)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/retryable_error.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/retryable_error.go
new file mode 100644
index 00000000..c695e6fe
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/retryable_error.go
@@ -0,0 +1,186 @@
+package retry
+
+import (
+ "errors"
+ "net"
+ "net/url"
+ "strings"
+
+ "github.com/aws/aws-sdk-go-v2/aws"
+)
+
+// IsErrorRetryable provides the interface of an implementation to determine if
+// a error as the result of an operation is retryable.
+type IsErrorRetryable interface {
+ IsErrorRetryable(error) aws.Ternary
+}
+
+// IsErrorRetryables is a collection of checks to determine of the error is
+// retryable. Iterates through the checks and returns the state of retryable
+// if any check returns something other than unknown.
+type IsErrorRetryables []IsErrorRetryable
+
+// IsErrorRetryable returns if the error is retryable if any of the checks in
+// the list return a value other than unknown.
+func (r IsErrorRetryables) IsErrorRetryable(err error) aws.Ternary {
+ for _, re := range r {
+ if v := re.IsErrorRetryable(err); v != aws.UnknownTernary {
+ return v
+ }
+ }
+ return aws.UnknownTernary
+}
+
+// IsErrorRetryableFunc wraps a function with the IsErrorRetryable interface.
+type IsErrorRetryableFunc func(error) aws.Ternary
+
+// IsErrorRetryable returns if the error is retryable.
+func (fn IsErrorRetryableFunc) IsErrorRetryable(err error) aws.Ternary {
+ return fn(err)
+}
+
+// RetryableError is an IsErrorRetryable implementation which uses the
+// optional interface Retryable on the error value to determine if the error is
+// retryable.
+type RetryableError struct{}
+
+// IsErrorRetryable returns if the error is retryable if it satisfies the
+// Retryable interface, and returns if the attempt should be retried.
+func (RetryableError) IsErrorRetryable(err error) aws.Ternary {
+ var v interface{ RetryableError() bool }
+
+ if !errors.As(err, &v) {
+ return aws.UnknownTernary
+ }
+
+ return aws.BoolTernary(v.RetryableError())
+}
+
+// NoRetryCanceledError detects if the error was an request canceled error and
+// returns if so.
+type NoRetryCanceledError struct{}
+
+// IsErrorRetryable returns the error is not retryable if the request was
+// canceled.
+func (NoRetryCanceledError) IsErrorRetryable(err error) aws.Ternary {
+ var v interface{ CanceledError() bool }
+
+ if !errors.As(err, &v) {
+ return aws.UnknownTernary
+ }
+
+ if v.CanceledError() {
+ return aws.FalseTernary
+ }
+ return aws.UnknownTernary
+}
+
+// RetryableConnectionError determines if the underlying error is an HTTP
+// connection and returns if it should be retried.
+//
+// Includes errors such as connection reset, connection refused, net dial,
+// temporary, and timeout errors.
+type RetryableConnectionError struct{}
+
+// IsErrorRetryable returns if the error is caused by and HTTP connection
+// error, and should be retried.
+func (r RetryableConnectionError) IsErrorRetryable(err error) aws.Ternary {
+ if err == nil {
+ return aws.UnknownTernary
+ }
+ var retryable bool
+
+ var conErr interface{ ConnectionError() bool }
+ var tempErr interface{ Temporary() bool }
+ var timeoutErr interface{ Timeout() bool }
+ var urlErr *url.Error
+ var netOpErr *net.OpError
+
+ switch {
+ case errors.As(err, &conErr) && conErr.ConnectionError():
+ retryable = true
+
+ case strings.Contains(err.Error(), "connection reset"):
+ retryable = true
+
+ case errors.As(err, &urlErr):
+ // Refused connections should be retried as the service may not yet be
+ // running on the port. Go TCP dial considers refused connections as
+ // not temporary.
+ if strings.Contains(urlErr.Error(), "connection refused") {
+ retryable = true
+ } else {
+ return r.IsErrorRetryable(errors.Unwrap(urlErr))
+ }
+
+ case errors.As(err, &netOpErr):
+ // Network dial, or temporary network errors are always retryable.
+ if strings.EqualFold(netOpErr.Op, "dial") || netOpErr.Temporary() {
+ retryable = true
+ } else {
+ return r.IsErrorRetryable(errors.Unwrap(netOpErr))
+ }
+
+ case errors.As(err, &tempErr) && tempErr.Temporary():
+ // Fallback to the generic temporary check, with temporary errors
+ // retryable.
+ retryable = true
+
+ case errors.As(err, &timeoutErr) && timeoutErr.Timeout():
+ // Fallback to the generic timeout check, with timeout errors
+ // retryable.
+ retryable = true
+
+ default:
+ return aws.UnknownTernary
+ }
+
+ return aws.BoolTernary(retryable)
+
+}
+
+// RetryableHTTPStatusCode provides a IsErrorRetryable based on HTTP status
+// codes.
+type RetryableHTTPStatusCode struct {
+ Codes map[int]struct{}
+}
+
+// IsErrorRetryable return if the passed in error is retryable based on the
+// HTTP status code.
+func (r RetryableHTTPStatusCode) IsErrorRetryable(err error) aws.Ternary {
+ var v interface{ HTTPStatusCode() int }
+
+ if !errors.As(err, &v) {
+ return aws.UnknownTernary
+ }
+
+ _, ok := r.Codes[v.HTTPStatusCode()]
+ if !ok {
+ return aws.UnknownTernary
+ }
+
+ return aws.TrueTernary
+}
+
+// RetryableErrorCode determines if an attempt should be retried based on the
+// API error code.
+type RetryableErrorCode struct {
+ Codes map[string]struct{}
+}
+
+// IsErrorRetryable return if the error is retryable based on the error codes.
+// Returns unknown if the error doesn't have a code or it is unknown.
+func (r RetryableErrorCode) IsErrorRetryable(err error) aws.Ternary {
+ var v interface{ ErrorCode() string }
+
+ if !errors.As(err, &v) {
+ return aws.UnknownTernary
+ }
+
+ _, ok := r.Codes[v.ErrorCode()]
+ if !ok {
+ return aws.UnknownTernary
+ }
+
+ return aws.TrueTernary
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/standard.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/standard.go
new file mode 100644
index 00000000..29afa3bd
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/standard.go
@@ -0,0 +1,208 @@
+package retry
+
+import (
+ "context"
+ "time"
+
+ "github.com/aws/aws-sdk-go-v2/aws/ratelimit"
+)
+
+// BackoffDelayer provides the interface for determining the delay to before
+// another request attempt, that previously failed.
+type BackoffDelayer interface {
+ BackoffDelay(attempt int, err error) (time.Duration, error)
+}
+
+// BackoffDelayerFunc provides a wrapper around a function to determine the
+// backoff delay of an attempt retry.
+type BackoffDelayerFunc func(int, error) (time.Duration, error)
+
+// BackoffDelay returns the delay before attempt to retry a request.
+func (fn BackoffDelayerFunc) BackoffDelay(attempt int, err error) (time.Duration, error) {
+ return fn(attempt, err)
+}
+
+const (
+ // DefaultMaxAttempts is the maximum of attempts for an API request
+ DefaultMaxAttempts int = 3
+
+ // DefaultMaxBackoff is the maximum back off delay between attempts
+ DefaultMaxBackoff time.Duration = 20 * time.Second
+)
+
+// Default retry token quota values.
+const (
+ DefaultRetryRateTokens uint = 500
+ DefaultRetryCost uint = 5
+ DefaultRetryTimeoutCost uint = 10
+ DefaultNoRetryIncrement uint = 1
+)
+
+// DefaultRetryableHTTPStatusCodes is the default set of HTTP status codes the SDK
+// should consider as retryable errors.
+var DefaultRetryableHTTPStatusCodes = map[int]struct{}{
+ 500: {},
+ 502: {},
+ 503: {},
+ 504: {},
+}
+
+// DefaultRetryableErrorCodes provides the set of API error codes that should
+// be retried.
+var DefaultRetryableErrorCodes = map[string]struct{}{
+ "RequestTimeout": {},
+ "RequestTimeoutException": {},
+
+ // Throttled status codes
+ "Throttling": {},
+ "ThrottlingException": {},
+ "ThrottledException": {},
+ "RequestThrottledException": {},
+ "TooManyRequestsException": {},
+ "ProvisionedThroughputExceededException": {},
+ "TransactionInProgressException": {},
+ "RequestLimitExceeded": {},
+ "BandwidthLimitExceeded": {},
+ "LimitExceededException": {},
+ "RequestThrottled": {},
+ "SlowDown": {},
+ "PriorRequestNotComplete": {},
+ "EC2ThrottledException": {},
+}
+
+// DefaultRetryables provides the set of retryable checks that are used by
+// default.
+var DefaultRetryables = []IsErrorRetryable{
+ NoRetryCanceledError{},
+ RetryableError{},
+ RetryableConnectionError{},
+ RetryableHTTPStatusCode{
+ Codes: DefaultRetryableHTTPStatusCodes,
+ },
+ RetryableErrorCode{
+ Codes: DefaultRetryableErrorCodes,
+ },
+}
+
+// StandardOptions provides the functional options for configuring the standard
+// retryable, and delay behavior.
+type StandardOptions struct {
+ MaxAttempts int
+ MaxBackoff time.Duration
+ Backoff BackoffDelayer
+
+ Retryables []IsErrorRetryable
+ Timeouts []IsErrorTimeout
+
+ RateLimiter RateLimiter
+ RetryCost uint
+ RetryTimeoutCost uint
+ NoRetryIncrement uint
+}
+
+// RateLimiter provides the interface for limiting the rate of request retries
+// allowed by the retrier.
+type RateLimiter interface {
+ GetToken(ctx context.Context, cost uint) (releaseToken func() error, err error)
+ AddTokens(uint) error
+}
+
+// Standard is the standard retry pattern for the SDK. It uses a set of
+// retryable checks to determine of the failed request should be retried, and
+// what retry delay should be used.
+type Standard struct {
+ options StandardOptions
+
+ timeout IsErrorTimeout
+ retryable IsErrorRetryable
+ backoff BackoffDelayer
+}
+
+// NewStandard initializes a standard retry behavior with defaults that can be
+// overridden via functional options.
+func NewStandard(fnOpts ...func(*StandardOptions)) *Standard {
+ o := StandardOptions{
+ MaxAttempts: DefaultMaxAttempts,
+ MaxBackoff: DefaultMaxBackoff,
+ Retryables: DefaultRetryables,
+
+ RateLimiter: ratelimit.NewTokenRateLimit(DefaultRetryRateTokens),
+ RetryCost: DefaultRetryCost,
+ RetryTimeoutCost: DefaultRetryTimeoutCost,
+ NoRetryIncrement: DefaultNoRetryIncrement,
+ }
+ for _, fn := range fnOpts {
+ fn(&o)
+ }
+
+ backoff := o.Backoff
+ if backoff == nil {
+ backoff = NewExponentialJitterBackoff(o.MaxBackoff)
+ }
+
+ rs := make([]IsErrorRetryable, len(o.Retryables))
+ copy(rs, o.Retryables)
+
+ ts := make([]IsErrorTimeout, len(o.Timeouts))
+ copy(ts, o.Timeouts)
+
+ return &Standard{
+ options: o,
+ backoff: backoff,
+ retryable: IsErrorRetryables(rs),
+ timeout: IsErrorTimeouts(ts),
+ }
+}
+
+// MaxAttempts returns the maximum number of attempts that can be made for a
+// request before failing.
+func (s *Standard) MaxAttempts() int {
+ return s.options.MaxAttempts
+}
+
+// IsErrorRetryable returns if the error is can be retried or not. Should not
+// consider the number of attempts made.
+func (s *Standard) IsErrorRetryable(err error) bool {
+ return s.retryable.IsErrorRetryable(err).Bool()
+}
+
+// RetryDelay returns the delay to use before another request attempt is made.
+func (s *Standard) RetryDelay(attempt int, err error) (time.Duration, error) {
+ return s.backoff.BackoffDelay(attempt, err)
+}
+
+// GetInitialToken returns the initial request token that can increment the
+// retry token pool if the request is successful.
+func (s *Standard) GetInitialToken() func(error) error {
+ return releaseToken(s.incrementTokens).release
+}
+
+func (s *Standard) incrementTokens() error {
+ return s.options.RateLimiter.AddTokens(s.options.NoRetryIncrement)
+}
+
+// GetRetryToken attempts to deduct the retry cost from the retry token pool.
+// Returning the token release function, or error.
+func (s *Standard) GetRetryToken(ctx context.Context, err error) (func(error) error, error) {
+ cost := s.options.RetryCost
+ if s.timeout.IsErrorTimeout(err).Bool() {
+ cost = s.options.RetryTimeoutCost
+ }
+
+ fn, err := s.options.RateLimiter.GetToken(ctx, cost)
+ if err != nil {
+ return nil, err
+ }
+
+ return releaseToken(fn).release, nil
+}
+
+type releaseToken func() error
+
+func (f releaseToken) release(err error) error {
+ if err != nil {
+ return nil
+ }
+
+ return f()
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/timeout_error.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/timeout_error.go
new file mode 100644
index 00000000..3d47870d
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/timeout_error.go
@@ -0,0 +1,52 @@
+package retry
+
+import (
+ "errors"
+
+ "github.com/aws/aws-sdk-go-v2/aws"
+)
+
+// IsErrorTimeout provides the interface of an implementation to determine if
+// a error matches.
+type IsErrorTimeout interface {
+ IsErrorTimeout(err error) aws.Ternary
+}
+
+// IsErrorTimeouts is a collection of checks to determine of the error is
+// retryable. Iterates through the checks and returns the state of retryable
+// if any check returns something other than unknown.
+type IsErrorTimeouts []IsErrorTimeout
+
+// IsErrorTimeout returns if the error is retryable if any of the checks in
+// the list return a value other than unknown.
+func (ts IsErrorTimeouts) IsErrorTimeout(err error) aws.Ternary {
+ for _, t := range ts {
+ if v := t.IsErrorTimeout(err); v != aws.UnknownTernary {
+ return v
+ }
+ }
+ return aws.UnknownTernary
+}
+
+// IsErrorTimeoutFunc wraps a function with the IsErrorTimeout interface.
+type IsErrorTimeoutFunc func(error) aws.Ternary
+
+// IsErrorTimeout returns if the error is retryable.
+func (fn IsErrorTimeoutFunc) IsErrorTimeout(err error) aws.Ternary {
+ return fn(err)
+}
+
+// TimeouterError provides the IsErrorTimeout implementation for determining if
+// an error is a timeout based on type with the Timeout method.
+type TimeouterError struct{}
+
+// IsErrorTimeout returns if the error is a timeout error.
+func (t TimeouterError) IsErrorTimeout(err error) aws.Ternary {
+ var v interface{ Timeout() bool }
+
+ if !errors.As(err, &v) {
+ return aws.UnknownTernary
+ }
+
+ return aws.BoolTernary(v.Timeout())
+}
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
new file mode 100644
index 00000000..0489508e
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/retryer.go
@@ -0,0 +1,62 @@
+package aws
+
+import (
+ "context"
+ "fmt"
+ "time"
+)
+
+// Retryer is an interface to determine if a given error from a
+// request should be retried, and if so what backoff delay to apply. The
+// default implementation used by most services is the retry package's Standard
+// type. Which contains basic retry logic using exponential backoff.
+type Retryer interface {
+ // IsErrorRetryable returns if the failed request is retryable. This check
+ // should determine if the error can be retried, or if the error is
+ // terminal.
+ IsErrorRetryable(error) bool
+
+ // MaxAttempts returns the maximum number of attempts that can be made for
+ // a request before failing. A value of 0 implies that the request should
+ // be retried until it succeeds if the errors are retryable.
+ MaxAttempts() int
+
+ // RetryDelay returns the delay that should be used before retrying the
+ // request. Will return error if the 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.
+ // Returning the token release function, or error.
+ GetRetryToken(ctx context.Context, opErr error) (releaseToken func(error) error, err error)
+
+ // GetInitalToken returns the initial request token that can increment the
+ // retry token pool if the request is successful.
+ GetInitialToken() (releaseToken func(error) error)
+}
+
+// NopRetryer provides a RequestRetryDecider implementation that will flag
+// all attempt errors as not retryable, with a max attempts of 1.
+type NopRetryer struct{}
+
+// IsErrorRetryable returns false for all error values.
+func (NopRetryer) IsErrorRetryable(error) bool { return false }
+
+// MaxAttempts always returns 1 for the original request attempt.
+func (NopRetryer) MaxAttempts() int { return 1 }
+
+// RetryDelay is not valid for the NopRetryer. Will always return error.
+func (NopRetryer) RetryDelay(int, error) (time.Duration, error) {
+ return 0, fmt.Errorf("not retrying any request errors")
+}
+
+// GetRetryToken returns a stub function that does nothing.
+func (NopRetryer) GetRetryToken(context.Context, error) (func(error) error, error) {
+ return nopReleaseToken, nil
+}
+
+// GetInitialToken returns a stub function that does nothing.
+func (NopRetryer) GetInitialToken() func(error) error {
+ return nopReleaseToken
+}
+
+func nopReleaseToken(error) error { return nil }
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/cache.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/cache.go
new file mode 100644
index 00000000..cbf22f1d
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/cache.go
@@ -0,0 +1,115 @@
+package v4
+
+import (
+ "strings"
+ "sync"
+ "time"
+
+ "github.com/aws/aws-sdk-go-v2/aws"
+)
+
+func lookupKey(service, region string) string {
+ var s strings.Builder
+ s.Grow(len(region) + len(service) + 3)
+ s.WriteString(region)
+ s.WriteRune('/')
+ s.WriteString(service)
+ return s.String()
+}
+
+type derivedKey struct {
+ AccessKey string
+ Date time.Time
+ Credential []byte
+}
+
+type derivedKeyCache struct {
+ values map[string]derivedKey
+ mutex sync.RWMutex
+}
+
+func newDerivedKeyCache() derivedKeyCache {
+ return derivedKeyCache{
+ values: make(map[string]derivedKey),
+ }
+}
+
+func (s *derivedKeyCache) Get(credentials aws.Credentials, service, region string, signingTime SigningTime) []byte {
+ key := lookupKey(service, region)
+ s.mutex.RLock()
+ if cred, ok := s.get(key, credentials, signingTime.Time); ok {
+ s.mutex.RUnlock()
+ return cred
+ }
+ s.mutex.RUnlock()
+
+ s.mutex.Lock()
+ if cred, ok := s.get(key, credentials, signingTime.Time); ok {
+ s.mutex.Unlock()
+ return cred
+ }
+ cred := deriveKey(credentials.SecretAccessKey, service, region, signingTime)
+ entry := derivedKey{
+ AccessKey: credentials.AccessKeyID,
+ Date: signingTime.Time,
+ Credential: cred,
+ }
+ s.values[key] = entry
+ s.mutex.Unlock()
+
+ return cred
+}
+
+func (s *derivedKeyCache) get(key string, credentials aws.Credentials, signingTime time.Time) ([]byte, bool) {
+ cacheEntry, ok := s.retrieveFromCache(key)
+ if ok && cacheEntry.AccessKey == credentials.AccessKeyID && isSameDay(signingTime, cacheEntry.Date) {
+ return cacheEntry.Credential, true
+ }
+ return nil, false
+}
+
+func (s *derivedKeyCache) retrieveFromCache(key string) (derivedKey, bool) {
+ if v, ok := s.values[key]; ok {
+ return v, true
+ }
+ return derivedKey{}, false
+}
+
+// SigningKeyDeriver derives a signing key from a set of credentials
+type SigningKeyDeriver struct {
+ cache derivedKeyCache
+}
+
+// NewSigningKeyDeriver returns a new SigningKeyDeriver
+func NewSigningKeyDeriver() *SigningKeyDeriver {
+ return &SigningKeyDeriver{
+ cache: newDerivedKeyCache(),
+ }
+}
+
+// DeriveKey returns a derived signing key from the given credentials to be used with SigV4 signing.
+func (k *SigningKeyDeriver) DeriveKey(credential aws.Credentials, service, region string, signingTime SigningTime) []byte {
+ return k.cache.Get(credential, service, region, signingTime)
+}
+
+func deriveKey(secret, service, region string, t SigningTime) []byte {
+ hmacDate := HMACSHA256([]byte("AWS4"+secret), []byte(t.ShortTimeFormat()))
+ hmacRegion := HMACSHA256(hmacDate, []byte(region))
+ hmacService := HMACSHA256(hmacRegion, []byte(service))
+ return HMACSHA256(hmacService, []byte("aws4_request"))
+}
+
+func isSameDay(x, y time.Time) bool {
+ xYear, xMonth, xDay := x.Date()
+ yYear, yMonth, yDay := y.Date()
+
+ if xYear != yYear {
+ return false
+ }
+
+ if xMonth != yMonth {
+ return false
+ }
+
+ return xDay == yDay
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/const.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/const.go
new file mode 100644
index 00000000..89a76e2e
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/const.go
@@ -0,0 +1,36 @@
+package v4
+
+const (
+ // EmptyStringSHA256 is the hex encoded sha256 value of an empty string
+ EmptyStringSHA256 = `e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855`
+
+ // UnsignedPayload indicates that the request payload body is unsigned
+ UnsignedPayload = "UNSIGNED-PAYLOAD"
+
+ // AmzAlgorithmKey indicates the signing algorithm
+ AmzAlgorithmKey = "X-Amz-Algorithm"
+
+ // AmzSecurityTokenKey indicates the security token to be used with temporary credentials
+ AmzSecurityTokenKey = "X-Amz-Security-Token"
+
+ // AmzDateKey is the UTC timestamp for the request in the format YYYYMMDD'T'HHMMSS'Z'
+ AmzDateKey = "X-Amz-Date"
+
+ // AmzCredentialKey is the access key ID and credential scope
+ AmzCredentialKey = "X-Amz-Credential"
+
+ // AmzSignedHeadersKey is the set of headers signed for the request
+ AmzSignedHeadersKey = "X-Amz-SignedHeaders"
+
+ // AmzSignatureKey is the query parameter to store the SigV4 signature
+ AmzSignatureKey = "X-Amz-Signature"
+
+ // TimeFormat is the time format to be used in the X-Amz-Date header or query parameter
+ TimeFormat = "20060102T150405Z"
+
+ // ShortTimeFormat is the shorten time format used in the credential scope
+ ShortTimeFormat = "20060102"
+
+ // ContentSHAKey is the SHA256 of request body
+ ContentSHAKey = "X-Amz-Content-Sha256"
+)
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/header_rules.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/header_rules.go
new file mode 100644
index 00000000..c61955ad
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/header_rules.go
@@ -0,0 +1,82 @@
+package v4
+
+import (
+ sdkstrings "github.com/aws/aws-sdk-go-v2/internal/strings"
+)
+
+// Rules houses a set of Rule needed for validation of a
+// string value
+type Rules []Rule
+
+// Rule interface allows for more flexible rules and just simply
+// checks whether or not a value adheres to that Rule
+type Rule interface {
+ IsValid(value string) bool
+}
+
+// IsValid will iterate through all rules and see if any rules
+// apply to the value and supports nested rules
+func (r Rules) IsValid(value string) bool {
+ for _, rule := range r {
+ if rule.IsValid(value) {
+ return true
+ }
+ }
+ return false
+}
+
+// MapRule generic Rule for maps
+type MapRule map[string]struct{}
+
+// IsValid for the map Rule satisfies whether it exists in the map
+func (m MapRule) IsValid(value string) bool {
+ _, ok := m[value]
+ return ok
+}
+
+// AllowList is a generic Rule for include listing
+type AllowList struct {
+ Rule
+}
+
+// IsValid for AllowList checks if the value is within the AllowList
+func (w AllowList) IsValid(value string) bool {
+ return w.Rule.IsValid(value)
+}
+
+// ExcludeList is a generic Rule for exclude listing
+type ExcludeList struct {
+ Rule
+}
+
+// IsValid for AllowList checks if the value is within the AllowList
+func (b ExcludeList) IsValid(value string) bool {
+ return !b.Rule.IsValid(value)
+}
+
+// Patterns is a list of strings to match against
+type Patterns []string
+
+// IsValid for Patterns checks each pattern and returns if a match has
+// been found
+func (p Patterns) IsValid(value string) bool {
+ for _, pattern := range p {
+ if sdkstrings.HasPrefixFold(value, pattern) {
+ return true
+ }
+ }
+ return false
+}
+
+// InclusiveRules rules allow for rules to depend on one another
+type InclusiveRules []Rule
+
+// IsValid will return true if all rules are true
+func (r InclusiveRules) IsValid(value string) bool {
+ for _, rule := range r {
+ if !rule.IsValid(value) {
+ return false
+ }
+ }
+ return true
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/headers.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/headers.go
new file mode 100644
index 00000000..85a1d8f0
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/headers.go
@@ -0,0 +1,68 @@
+package v4
+
+// IgnoredHeaders is a list of headers that are ignored during signing
+var IgnoredHeaders = Rules{
+ ExcludeList{
+ MapRule{
+ "Authorization": struct{}{},
+ "User-Agent": struct{}{},
+ "X-Amzn-Trace-Id": struct{}{},
+ },
+ },
+}
+
+// RequiredSignedHeaders is a allow list for Build canonical headers.
+var RequiredSignedHeaders = Rules{
+ AllowList{
+ MapRule{
+ "Cache-Control": struct{}{},
+ "Content-Disposition": struct{}{},
+ "Content-Encoding": struct{}{},
+ "Content-Language": struct{}{},
+ "Content-Md5": struct{}{},
+ "Content-Type": struct{}{},
+ "Expires": struct{}{},
+ "If-Match": struct{}{},
+ "If-Modified-Since": struct{}{},
+ "If-None-Match": struct{}{},
+ "If-Unmodified-Since": struct{}{},
+ "Range": struct{}{},
+ "X-Amz-Acl": struct{}{},
+ "X-Amz-Copy-Source": struct{}{},
+ "X-Amz-Copy-Source-If-Match": struct{}{},
+ "X-Amz-Copy-Source-If-Modified-Since": struct{}{},
+ "X-Amz-Copy-Source-If-None-Match": struct{}{},
+ "X-Amz-Copy-Source-If-Unmodified-Since": struct{}{},
+ "X-Amz-Copy-Source-Range": struct{}{},
+ "X-Amz-Copy-Source-Server-Side-Encryption-Customer-Algorithm": struct{}{},
+ "X-Amz-Copy-Source-Server-Side-Encryption-Customer-Key": struct{}{},
+ "X-Amz-Copy-Source-Server-Side-Encryption-Customer-Key-Md5": struct{}{},
+ "X-Amz-Grant-Full-control": struct{}{},
+ "X-Amz-Grant-Read": struct{}{},
+ "X-Amz-Grant-Read-Acp": struct{}{},
+ "X-Amz-Grant-Write": struct{}{},
+ "X-Amz-Grant-Write-Acp": struct{}{},
+ "X-Amz-Metadata-Directive": struct{}{},
+ "X-Amz-Mfa": struct{}{},
+ "X-Amz-Request-Payer": struct{}{},
+ "X-Amz-Server-Side-Encryption": struct{}{},
+ "X-Amz-Server-Side-Encryption-Aws-Kms-Key-Id": struct{}{},
+ "X-Amz-Server-Side-Encryption-Customer-Algorithm": struct{}{},
+ "X-Amz-Server-Side-Encryption-Customer-Key": struct{}{},
+ "X-Amz-Server-Side-Encryption-Customer-Key-Md5": struct{}{},
+ "X-Amz-Storage-Class": struct{}{},
+ "X-Amz-Website-Redirect-Location": struct{}{},
+ "X-Amz-Content-Sha256": struct{}{},
+ "X-Amz-Tagging": struct{}{},
+ },
+ },
+ Patterns{"X-Amz-Object-Lock-"},
+ Patterns{"X-Amz-Meta-"},
+}
+
+// AllowedQueryHoisting is a allowed list for Build query headers. The boolean value
+// represents whether or not it is a pattern.
+var AllowedQueryHoisting = InclusiveRules{
+ ExcludeList{RequiredSignedHeaders},
+ Patterns{"X-Amz-"},
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/hmac.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/hmac.go
new file mode 100644
index 00000000..e7fa7a1b
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/hmac.go
@@ -0,0 +1,13 @@
+package v4
+
+import (
+ "crypto/hmac"
+ "crypto/sha256"
+)
+
+// HMACSHA256 computes a HMAC-SHA256 of data given the provided key.
+func HMACSHA256(key []byte, data []byte) []byte {
+ hash := hmac.New(sha256.New, key)
+ hash.Write(data)
+ return hash.Sum(nil)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/host.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/host.go
new file mode 100644
index 00000000..bf93659a
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/host.go
@@ -0,0 +1,75 @@
+package v4
+
+import (
+ "net/http"
+ "strings"
+)
+
+// SanitizeHostForHeader removes default port from host and updates request.Host
+func SanitizeHostForHeader(r *http.Request) {
+ host := getHost(r)
+ port := portOnly(host)
+ if port != "" && isDefaultPort(r.URL.Scheme, port) {
+ r.Host = stripPort(host)
+ }
+}
+
+// Returns host from request
+func getHost(r *http.Request) string {
+ if r.Host != "" {
+ return r.Host
+ }
+
+ return r.URL.Host
+}
+
+// Hostname returns u.Host, without any port number.
+//
+// If Host is an IPv6 literal with a port number, Hostname returns the
+// IPv6 literal without the square brackets. IPv6 literals may include
+// a zone identifier.
+//
+// Copied from the Go 1.8 standard library (net/url)
+func stripPort(hostport string) string {
+ colon := strings.IndexByte(hostport, ':')
+ if colon == -1 {
+ return hostport
+ }
+ if i := strings.IndexByte(hostport, ']'); i != -1 {
+ return strings.TrimPrefix(hostport[:i], "[")
+ }
+ return hostport[:colon]
+}
+
+// Port returns the port part of u.Host, without the leading colon.
+// If u.Host doesn't contain a port, Port returns an empty string.
+//
+// Copied from the Go 1.8 standard library (net/url)
+func portOnly(hostport string) string {
+ colon := strings.IndexByte(hostport, ':')
+ if colon == -1 {
+ return ""
+ }
+ if i := strings.Index(hostport, "]:"); i != -1 {
+ return hostport[i+len("]:"):]
+ }
+ if strings.Contains(hostport, "]") {
+ return ""
+ }
+ return hostport[colon+len(":"):]
+}
+
+// Returns true if the specified URI is using the standard port
+// (i.e. port 80 for HTTP URIs or 443 for HTTPS URIs)
+func isDefaultPort(scheme, port string) bool {
+ if port == "" {
+ return true
+ }
+
+ lowerCaseScheme := strings.ToLower(scheme)
+ if (lowerCaseScheme == "http" && port == "80") || (lowerCaseScheme == "https" && port == "443") {
+ return true
+ }
+
+ return false
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/time.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/time.go
new file mode 100644
index 00000000..1de06a76
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/time.go
@@ -0,0 +1,36 @@
+package v4
+
+import "time"
+
+// SigningTime provides a wrapper around a time.Time which provides cached values for SigV4 signing.
+type SigningTime struct {
+ time.Time
+ timeFormat string
+ shortTimeFormat string
+}
+
+// NewSigningTime creates a new SigningTime given a time.Time
+func NewSigningTime(t time.Time) SigningTime {
+ return SigningTime{
+ Time: t,
+ }
+}
+
+// TimeFormat provides a time formatted in the X-Amz-Date format.
+func (m *SigningTime) TimeFormat() string {
+ return m.format(&m.timeFormat, TimeFormat)
+}
+
+// ShortTimeFormat provides a time formatted of 20060102.
+func (m *SigningTime) ShortTimeFormat() string {
+ return m.format(&m.shortTimeFormat, ShortTimeFormat)
+}
+
+func (m *SigningTime) format(target *string, format string) string {
+ if len(*target) > 0 {
+ return *target
+ }
+ v := m.Time.Format(format)
+ *target = v
+ return v
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/util.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/util.go
new file mode 100644
index 00000000..741019b5
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/util.go
@@ -0,0 +1,64 @@
+package v4
+
+import (
+ "net/url"
+ "strings"
+)
+
+const doubleSpace = " "
+
+// StripExcessSpaces will rewrite the passed in slice's string values to not
+// contain muliple side-by-side spaces.
+func StripExcessSpaces(str string) string {
+ var j, k, l, m, spaces int
+ // Trim trailing spaces
+ for j = len(str) - 1; j >= 0 && str[j] == ' '; j-- {
+ }
+
+ // Trim leading spaces
+ for k = 0; k < j && str[k] == ' '; k++ {
+ }
+ str = str[k : j+1]
+
+ // Strip multiple spaces.
+ j = strings.Index(str, doubleSpace)
+ if j < 0 {
+ return str
+ }
+
+ buf := []byte(str)
+ for k, m, l = j, j, len(buf); k < l; k++ {
+ if buf[k] == ' ' {
+ if spaces == 0 {
+ // First space.
+ buf[m] = buf[k]
+ m++
+ }
+ spaces++
+ } else {
+ // End of multiple spaces.
+ spaces = 0
+ buf[m] = buf[k]
+ m++
+ }
+ }
+
+ return string(buf[:m])
+}
+
+// GetURIPath returns the escaped URI component from the provided URL
+func GetURIPath(u *url.URL) string {
+ var uri string
+
+ if len(u.Opaque) > 0 {
+ uri = "/" + strings.Join(strings.Split(u.Opaque, "/")[3:], "/")
+ } else {
+ uri = u.EscapedPath()
+ }
+
+ if len(uri) == 0 {
+ uri = "/"
+ }
+
+ return uri
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/middleware.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/middleware.go
new file mode 100644
index 00000000..b6e28b4b
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/middleware.go
@@ -0,0 +1,302 @@
+package v4
+
+import (
+ "context"
+ "crypto/sha256"
+ "encoding/hex"
+ "fmt"
+ "io"
+
+ "github.com/aws/aws-sdk-go-v2/aws"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ v4Internal "github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4"
+ "github.com/aws/aws-sdk-go-v2/internal/sdk"
+ "github.com/aws/smithy-go/middleware"
+ smithyHTTP "github.com/aws/smithy-go/transport/http"
+)
+
+const computePayloadHashMiddlewareID = "ComputePayloadHash"
+
+// HashComputationError indicates an error occurred while computing the signing hash
+type HashComputationError struct {
+ Err error
+}
+
+// Error is the error message
+func (e *HashComputationError) Error() string {
+ return fmt.Sprintf("failed to compute payload hash: %v", e.Err)
+}
+
+// Unwrap returns the underlying error if one is set
+func (e *HashComputationError) Unwrap() error {
+ return e.Err
+}
+
+// SigningError indicates an error condition occurred while performing SigV4 signing
+type SigningError struct {
+ Err error
+}
+
+func (e *SigningError) Error() string {
+ return fmt.Sprintf("failed to sign request: %v", e.Err)
+}
+
+// Unwrap returns the underlying error cause
+func (e *SigningError) Unwrap() error {
+ return e.Err
+}
+
+// unsignedPayload sets the SigV4 request payload hash to unsigned.
+//
+// Will not set the Unsigned Payload magic SHA value, if a SHA has already been
+// stored in the context. (e.g. application pre-computed SHA256 before making
+// API call).
+//
+// This middleware does not check the X-Amz-Content-Sha256 header, if that
+// header is serialized a middleware must translate it into the context.
+type unsignedPayload struct{}
+
+// AddUnsignedPayloadMiddleware adds unsignedPayload to the operation
+// middleware stack
+func AddUnsignedPayloadMiddleware(stack *middleware.Stack) error {
+ return stack.Build.Add(&unsignedPayload{}, middleware.After)
+}
+
+// ID returns the unsignedPayload identifier
+func (m *unsignedPayload) ID() string {
+ return computePayloadHashMiddlewareID
+}
+
+// HandleBuild sets the payload hash to be an unsigned payload
+func (m *unsignedPayload) HandleBuild(
+ ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler,
+) (
+ out middleware.BuildOutput, metadata middleware.Metadata, err error,
+) {
+ // This should not compute the content SHA256 if the value is already
+ // known. (e.g. application pre-computed SHA256 before making API call).
+ // Does not have any tight coupling to the X-Amz-Content-Sha256 header, if
+ // that header is provided a middleware must translate it into the context.
+ contentSHA := GetPayloadHash(ctx)
+ if len(contentSHA) == 0 {
+ contentSHA = v4Internal.UnsignedPayload
+ }
+
+ ctx = SetPayloadHash(ctx, contentSHA)
+ return next.HandleBuild(ctx, in)
+}
+
+// computePayloadSHA256 computes SHA256 payload hash to sign.
+//
+// Will not set the Unsigned Payload magic SHA value, if a SHA has already been
+// stored in the context. (e.g. application pre-computed SHA256 before making
+// API call).
+//
+// This middleware does not check the X-Amz-Content-Sha256 header, if that
+// header is serialized a middleware must translate it into the context.
+type computePayloadSHA256 struct{}
+
+// AddComputePayloadSHA256Middleware adds computePayloadSHA256 to the
+// operation middleware stack
+func AddComputePayloadSHA256Middleware(stack *middleware.Stack) error {
+ return stack.Build.Add(&computePayloadSHA256{}, middleware.After)
+}
+
+// RemoveComputePayloadSHA256Middleware removes computePayloadSHA256 from the
+// operation middleware stack
+func RemoveComputePayloadSHA256Middleware(stack *middleware.Stack) error {
+ _, err := stack.Build.Remove(computePayloadHashMiddlewareID)
+ return err
+}
+
+// ID is the middleware name
+func (m *computePayloadSHA256) ID() string {
+ return computePayloadHashMiddlewareID
+}
+
+// HandleBuild compute the payload hash for the request payload
+func (m *computePayloadSHA256) HandleBuild(
+ ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler,
+) (
+ out middleware.BuildOutput, metadata middleware.Metadata, err error,
+) {
+ req, ok := in.Request.(*smithyHTTP.Request)
+ if !ok {
+ return out, metadata, &HashComputationError{
+ Err: fmt.Errorf("unexpected request middleware type %T", in.Request),
+ }
+ }
+
+ // This should not compute the content SHA256 if the value is already
+ // known. (e.g. application pre-computed SHA256 before making API call)
+ // Does not have any tight coupling to the X-Amz-Content-Sha256 header, if
+ // that header is provided a middleware must translate it into the context.
+ if contentSHA := GetPayloadHash(ctx); len(contentSHA) != 0 {
+ return next.HandleBuild(ctx, in)
+ }
+
+ hash := sha256.New()
+ if stream := req.GetStream(); stream != nil {
+ _, err = io.Copy(hash, stream)
+ if err != nil {
+ return out, metadata, &HashComputationError{
+ Err: fmt.Errorf("failed to compute payload hash, %w", err),
+ }
+ }
+
+ if err := req.RewindStream(); err != nil {
+ return out, metadata, &HashComputationError{
+ Err: fmt.Errorf("failed to seek body to start, %w", err),
+ }
+ }
+ }
+
+ ctx = SetPayloadHash(ctx, hex.EncodeToString(hash.Sum(nil)))
+
+ return next.HandleBuild(ctx, in)
+}
+
+// SwapComputePayloadSHA256ForUnsignedPayloadMiddleware replaces the
+// ComputePayloadSHA256 middleware with the UnsignedPayload middleware.
+//
+// Use this to disable computing the Payload SHA256 checksum and instead use
+// UNSIGNED-PAYLOAD for the SHA256 value.
+func SwapComputePayloadSHA256ForUnsignedPayloadMiddleware(stack *middleware.Stack) error {
+ _, err := stack.Build.Swap(computePayloadHashMiddlewareID, &unsignedPayload{})
+ return err
+}
+
+// contentSHA256Header sets the X-Amz-Content-Sha256 header value to
+// the Payload hash stored in the context.
+type contentSHA256Header struct{}
+
+// AddContentSHA256HeaderMiddleware adds ContentSHA256Header to the
+// operation middleware stack
+func AddContentSHA256HeaderMiddleware(stack *middleware.Stack) error {
+ return stack.Build.Insert(&contentSHA256Header{}, computePayloadHashMiddlewareID, middleware.After)
+}
+
+// RemoveContentSHA256HeaderMiddleware removes contentSHA256Header middleware
+// from the operation middleware stack
+func RemoveContentSHA256HeaderMiddleware(stack *middleware.Stack) error {
+ _, err := stack.Build.Remove((*contentSHA256Header)(nil).ID())
+ return err
+}
+
+// ID returns the ContentSHA256HeaderMiddleware identifier
+func (m *contentSHA256Header) ID() string {
+ return "SigV4ContentSHA256Header"
+}
+
+// HandleBuild sets the X-Amz-Content-Sha256 header value to the Payload hash
+// stored in the context.
+func (m *contentSHA256Header) HandleBuild(
+ ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler,
+) (
+ out middleware.BuildOutput, metadata middleware.Metadata, err error,
+) {
+ req, ok := in.Request.(*smithyHTTP.Request)
+ if !ok {
+ return out, metadata, &HashComputationError{Err: fmt.Errorf("unexpected request middleware type %T", in.Request)}
+ }
+
+ req.Header.Set(v4Internal.ContentSHAKey, GetPayloadHash(ctx))
+
+ return next.HandleBuild(ctx, in)
+}
+
+// SignHTTPRequestMiddlewareOptions is the configuration options for the SignHTTPRequestMiddleware middleware.
+type SignHTTPRequestMiddlewareOptions struct {
+ CredentialsProvider aws.CredentialsProvider
+ Signer HTTPSigner
+ LogSigning bool
+}
+
+// SignHTTPRequestMiddleware is a `FinalizeMiddleware` implementation for SigV4 HTTP Signing
+type SignHTTPRequestMiddleware struct {
+ credentialsProvider aws.CredentialsProvider
+ signer HTTPSigner
+ logSigning bool
+}
+
+// NewSignHTTPRequestMiddleware constructs a SignHTTPRequestMiddleware using the given Signer for signing requests
+func NewSignHTTPRequestMiddleware(options SignHTTPRequestMiddlewareOptions) *SignHTTPRequestMiddleware {
+ return &SignHTTPRequestMiddleware{
+ credentialsProvider: options.CredentialsProvider,
+ signer: options.Signer,
+ logSigning: options.LogSigning,
+ }
+}
+
+// ID is the SignHTTPRequestMiddleware identifier
+func (s *SignHTTPRequestMiddleware) ID() string {
+ return "Signing"
+}
+
+// HandleFinalize will take the provided input and sign the request using the SigV4 authentication scheme
+func (s *SignHTTPRequestMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) (
+ out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
+) {
+ if !haveCredentialProvider(s.credentialsProvider) {
+ return next.HandleFinalize(ctx, in)
+ }
+
+ req, ok := in.Request.(*smithyHTTP.Request)
+ if !ok {
+ return out, metadata, &SigningError{Err: fmt.Errorf("unexpected request middleware type %T", in.Request)}
+ }
+
+ signingName, signingRegion := awsmiddleware.GetSigningName(ctx), awsmiddleware.GetSigningRegion(ctx)
+ payloadHash := GetPayloadHash(ctx)
+ if len(payloadHash) == 0 {
+ return out, metadata, &SigningError{Err: fmt.Errorf("computed payload hash missing from context")}
+ }
+
+ credentials, err := s.credentialsProvider.Retrieve(ctx)
+ if err != nil {
+ return out, metadata, &SigningError{Err: fmt.Errorf("failed to retrieve credentials: %w", err)}
+ }
+
+ err = s.signer.SignHTTP(ctx, credentials, req.Request, payloadHash, signingName, signingRegion, sdk.NowTime(),
+ func(o *SignerOptions) {
+ o.Logger = middleware.GetLogger(ctx)
+ o.LogSigning = s.logSigning
+ })
+ if err != nil {
+ return out, metadata, &SigningError{Err: fmt.Errorf("failed to sign http request, %w", err)}
+ }
+
+ return next.HandleFinalize(ctx, in)
+}
+
+func haveCredentialProvider(p aws.CredentialsProvider) bool {
+ if p == nil {
+ return false
+ }
+ switch p.(type) {
+ case aws.AnonymousCredentials,
+ *aws.AnonymousCredentials:
+ return false
+ }
+
+ return true
+}
+
+type payloadHashKey struct{}
+
+// GetPayloadHash retrieves the payload hash to use for signing
+//
+// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues
+// to clear all stack values.
+func GetPayloadHash(ctx context.Context) (v string) {
+ v, _ = middleware.GetStackValue(ctx, payloadHashKey{}).(string)
+ return v
+}
+
+// SetPayloadHash sets the payload hash to be used for signing the request
+//
+// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues
+// to clear all stack values.
+func SetPayloadHash(ctx context.Context, hash string) context.Context {
+ return middleware.WithStackValue(ctx, payloadHashKey{}, hash)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/presign_middleware.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/presign_middleware.go
new file mode 100644
index 00000000..e1a06651
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/presign_middleware.go
@@ -0,0 +1,127 @@
+package v4
+
+import (
+ "context"
+ "fmt"
+ "net/http"
+ "time"
+
+ "github.com/aws/aws-sdk-go-v2/aws"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/internal/sdk"
+ "github.com/aws/smithy-go/middleware"
+ smithyHTTP "github.com/aws/smithy-go/transport/http"
+)
+
+// HTTPPresigner is an interface to a SigV4 signer that can sign create a
+// presigned URL for a HTTP requests.
+type HTTPPresigner interface {
+ PresignHTTP(
+ ctx context.Context, credentials aws.Credentials, r *http.Request,
+ payloadHash string, service string, region string, signingTime time.Time,
+ optFns ...func(*SignerOptions),
+ ) (url string, signedHeader http.Header, err error)
+}
+
+// PresignedHTTPRequest provides the URL and signed headers that are included
+// in the presigned URL.
+type PresignedHTTPRequest struct {
+ URL string
+ Method string
+ SignedHeader http.Header
+}
+
+// PresignHTTPRequestMiddlewareOptions is the options for the PresignHTTPRequestMiddleware middleware.
+type PresignHTTPRequestMiddlewareOptions struct {
+ CredentialsProvider aws.CredentialsProvider
+ Presigner HTTPPresigner
+ LogSigning bool
+}
+
+// PresignHTTPRequestMiddleware provides the Finalize middleware for creating a
+// presigned URL for an HTTP request.
+//
+// Will short circuit the middleware stack and not forward onto the next
+// Finalize handler.
+type PresignHTTPRequestMiddleware struct {
+ credentialsProvider aws.CredentialsProvider
+ presigner HTTPPresigner
+ logSigning bool
+}
+
+// NewPresignHTTPRequestMiddleware returns a new PresignHTTPRequestMiddleware
+// initialized with the presigner.
+func NewPresignHTTPRequestMiddleware(options PresignHTTPRequestMiddlewareOptions) *PresignHTTPRequestMiddleware {
+ return &PresignHTTPRequestMiddleware{
+ credentialsProvider: options.CredentialsProvider,
+ presigner: options.Presigner,
+ logSigning: options.LogSigning,
+ }
+}
+
+// ID provides the middleware ID.
+func (*PresignHTTPRequestMiddleware) ID() string { return "PresignHTTPRequest" }
+
+// HandleFinalize will take the provided input and create a presigned url for
+// the http request using the SigV4 presign authentication scheme.
+//
+// Since the signed request is not a valid HTTP request
+func (s *PresignHTTPRequestMiddleware) HandleFinalize(
+ ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler,
+) (
+ out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
+) {
+ req, ok := in.Request.(*smithyHTTP.Request)
+ if !ok {
+ return out, metadata, &SigningError{
+ Err: fmt.Errorf("unexpected request middleware type %T", in.Request),
+ }
+ }
+
+ httpReq := req.Build(ctx)
+ if !haveCredentialProvider(s.credentialsProvider) {
+ out.Result = &PresignedHTTPRequest{
+ URL: httpReq.URL.String(),
+ Method: httpReq.Method,
+ SignedHeader: http.Header{},
+ }
+
+ return out, metadata, nil
+ }
+
+ signingName := awsmiddleware.GetSigningName(ctx)
+ signingRegion := awsmiddleware.GetSigningRegion(ctx)
+ payloadHash := GetPayloadHash(ctx)
+ if len(payloadHash) == 0 {
+ return out, metadata, &SigningError{
+ Err: fmt.Errorf("computed payload hash missing from context"),
+ }
+ }
+
+ credentials, err := s.credentialsProvider.Retrieve(ctx)
+ if err != nil {
+ return out, metadata, &SigningError{
+ Err: fmt.Errorf("failed to retrieve credentials: %w", err),
+ }
+ }
+
+ u, h, err := s.presigner.PresignHTTP(ctx, credentials,
+ httpReq, payloadHash, signingName, signingRegion, sdk.NowTime(),
+ func(o *SignerOptions) {
+ o.Logger = middleware.GetLogger(ctx)
+ o.LogSigning = s.logSigning
+ })
+ if err != nil {
+ return out, metadata, &SigningError{
+ Err: fmt.Errorf("failed to sign http request, %w", err),
+ }
+ }
+
+ out.Result = &PresignedHTTPRequest{
+ URL: u,
+ Method: httpReq.Method,
+ SignedHeader: h,
+ }
+
+ return out, metadata, nil
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/v4.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/v4.go
new file mode 100644
index 00000000..61c66984
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/v4.go
@@ -0,0 +1,539 @@
+// Package v4 implements signing for AWS V4 signer
+//
+// Provides request signing for request that need to be signed with
+// AWS V4 Signatures.
+//
+// Standalone Signer
+//
+// Generally using the signer outside of the SDK should not require any additional
+// The signer does this by taking advantage of the URL.EscapedPath method. If your request URI requires
+// additional escaping you many need to use the URL.Opaque to define what the raw URI should be sent
+// to the service as.
+//
+// The signer will first check the URL.Opaque field, and use its value if set.
+// The signer does require the URL.Opaque field to be set in the form of:
+//
+// "///"
+//
+// // e.g.
+// "//example.com/some/path"
+//
+// The leading "//" and hostname are required or the URL.Opaque escaping will
+// not work correctly.
+//
+// If URL.Opaque is not set the signer will fallback to the URL.EscapedPath()
+// method and using the returned value.
+//
+// AWS v4 signature validation requires that the canonical string's URI path
+// element must be the URI escaped form of the HTTP request's path.
+// http://docs.aws.amazon.com/general/latest/gr/sigv4-create-canonical-request.html
+//
+// The Go HTTP client will perform escaping automatically on the request. Some
+// of these escaping may cause signature validation errors because the HTTP
+// request differs from the URI path or query that the signature was generated.
+// https://golang.org/pkg/net/url/#URL.EscapedPath
+//
+// Because of this, it is recommended that when using the signer outside of the
+// SDK that explicitly escaping the request prior to being signed is preferable,
+// and will help prevent signature validation errors. This can be done by setting
+// the URL.Opaque or URL.RawPath. The SDK will use URL.Opaque first and then
+// call URL.EscapedPath() if Opaque is not set.
+//
+// Test `TestStandaloneSign` provides a complete example of using the signer
+// outside of the SDK and pre-escaping the URI path.
+package v4
+
+import (
+ "context"
+ "crypto/sha256"
+ "encoding/hex"
+ "fmt"
+ "hash"
+ "net/http"
+ "net/textproto"
+ "net/url"
+ "sort"
+ "strconv"
+ "strings"
+ "time"
+
+ "github.com/aws/aws-sdk-go-v2/aws"
+ v4Internal "github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4"
+ "github.com/aws/smithy-go/encoding/httpbinding"
+ "github.com/aws/smithy-go/logging"
+)
+
+const (
+ signingAlgorithm = "AWS4-HMAC-SHA256"
+ authorizationHeader = "Authorization"
+)
+
+// HTTPSigner is an interface to a SigV4 signer that can sign HTTP requests
+type HTTPSigner interface {
+ SignHTTP(ctx context.Context, credentials aws.Credentials, r *http.Request, payloadHash string, service string, region string, signingTime time.Time, optFns ...func(*SignerOptions)) error
+}
+
+type keyDerivator interface {
+ DeriveKey(credential aws.Credentials, service, region string, signingTime v4Internal.SigningTime) []byte
+}
+
+// SignerOptions is the SigV4 Signer options.
+type SignerOptions struct {
+ // Disables the Signer's moving HTTP header key/value pairs from the HTTP
+ // request header to the request's query string. This is most commonly used
+ // with pre-signed requests preventing headers from being added to the
+ // request's query string.
+ DisableHeaderHoisting bool
+
+ // Disables the automatic escaping of the URI path of the request for the
+ // siganture's canonical string's path. For services that do not need additional
+ // escaping then use this to disable the signer escaping the path.
+ //
+ // S3 is an example of a service that does not need additional escaping.
+ //
+ // http://docs.aws.amazon.com/general/latest/gr/sigv4-create-canonical-request.html
+ DisableURIPathEscaping bool
+
+ // The logger to send log messages to.
+ Logger logging.Logger
+
+ // Enable logging of signed requests.
+ // This will enable logging of the canonical request, the string to sign, and for presigning the subsequent
+ // presigned URL.
+ LogSigning bool
+}
+
+// Signer applies AWS v4 signing to given request. Use this to sign requests
+// that need to be signed with AWS V4 Signatures.
+type Signer struct {
+ options SignerOptions
+ keyDerivator keyDerivator
+}
+
+// NewSigner returns a new SigV4 Signer
+func NewSigner(optFns ...func(signer *SignerOptions)) *Signer {
+ options := SignerOptions{}
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &Signer{options: options, keyDerivator: v4Internal.NewSigningKeyDeriver()}
+}
+
+type httpSigner struct {
+ Request *http.Request
+ ServiceName string
+ Region string
+ Time v4Internal.SigningTime
+ Credentials aws.Credentials
+ KeyDerivator keyDerivator
+ IsPreSign bool
+
+ PayloadHash string
+
+ DisableHeaderHoisting bool
+ DisableURIPathEscaping bool
+}
+
+func (s *httpSigner) Build() (signedRequest, error) {
+ req := s.Request
+
+ query := req.URL.Query()
+ headers := req.Header
+
+ s.setRequiredSigningFields(headers, query)
+
+ // Sort Each Query Key's Values
+ for key := range query {
+ sort.Strings(query[key])
+ }
+
+ v4Internal.SanitizeHostForHeader(req)
+
+ credentialScope := s.buildCredentialScope()
+ credentialStr := s.Credentials.AccessKeyID + "/" + credentialScope
+ if s.IsPreSign {
+ query.Set(v4Internal.AmzCredentialKey, credentialStr)
+ }
+
+ unsignedHeaders := headers
+ if s.IsPreSign && !s.DisableHeaderHoisting {
+ var urlValues url.Values
+ urlValues, unsignedHeaders = buildQuery(v4Internal.AllowedQueryHoisting, headers)
+ for k := range urlValues {
+ query[k] = urlValues[k]
+ }
+ }
+
+ host := req.URL.Host
+ if len(req.Host) > 0 {
+ host = req.Host
+ }
+
+ signedHeaders, signedHeadersStr, canonicalHeaderStr := s.buildCanonicalHeaders(host, v4Internal.IgnoredHeaders, unsignedHeaders, s.Request.ContentLength)
+
+ if s.IsPreSign {
+ query.Set(v4Internal.AmzSignedHeadersKey, signedHeadersStr)
+ }
+
+ var rawQuery strings.Builder
+ rawQuery.WriteString(strings.Replace(query.Encode(), "+", "%20", -1))
+
+ canonicalURI := v4Internal.GetURIPath(req.URL)
+ if !s.DisableURIPathEscaping {
+ canonicalURI = httpbinding.EscapePath(canonicalURI, false)
+ }
+
+ canonicalString := s.buildCanonicalString(
+ req.Method,
+ canonicalURI,
+ rawQuery.String(),
+ signedHeadersStr,
+ canonicalHeaderStr,
+ )
+
+ strToSign := s.buildStringToSign(credentialScope, canonicalString)
+ signingSignature, err := s.buildSignature(strToSign)
+ if err != nil {
+ return signedRequest{}, err
+ }
+
+ if s.IsPreSign {
+ rawQuery.WriteString("&X-Amz-Signature=")
+ rawQuery.WriteString(signingSignature)
+ } else {
+ headers[authorizationHeader] = append(headers[authorizationHeader][:0], buildAuthorizationHeader(credentialStr, signedHeadersStr, signingSignature))
+ }
+
+ req.URL.RawQuery = rawQuery.String()
+
+ return signedRequest{
+ Request: req,
+ SignedHeaders: signedHeaders,
+ CanonicalString: canonicalString,
+ StringToSign: strToSign,
+ PreSigned: s.IsPreSign,
+ }, nil
+}
+
+func buildAuthorizationHeader(credentialStr, signedHeadersStr, signingSignature string) string {
+ const credential = "Credential="
+ const signedHeaders = "SignedHeaders="
+ const signature = "Signature="
+ const commaSpace = ", "
+
+ var parts strings.Builder
+ parts.Grow(len(signingAlgorithm) + 1 +
+ len(credential) + len(credentialStr) + 2 +
+ len(signedHeaders) + len(signedHeadersStr) + 2 +
+ len(signature) + len(signingSignature),
+ )
+ parts.WriteString(signingAlgorithm)
+ parts.WriteRune(' ')
+ parts.WriteString(credential)
+ parts.WriteString(credentialStr)
+ parts.WriteString(commaSpace)
+ parts.WriteString(signedHeaders)
+ parts.WriteString(signedHeadersStr)
+ parts.WriteString(commaSpace)
+ parts.WriteString(signature)
+ parts.WriteString(signingSignature)
+ return parts.String()
+}
+
+// SignHTTP signs AWS v4 requests with the provided payload hash, service name, region the
+// request is made to, and time the request is signed at. The signTime allows
+// you to specify that a request is signed for the future, and cannot be
+// used until then.
+//
+// The payloadHash is the hex encoded SHA-256 hash of the request payload, and
+// must be provided. Even if the request has no payload (aka body). If the
+// request has no payload you should use the hex encoded SHA-256 of an empty
+// string as the payloadHash value.
+//
+// "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
+//
+// Some services such as Amazon S3 accept alternative values for the payload
+// hash, such as "UNSIGNED-PAYLOAD" for requests where the body will not be
+// included in the request signature.
+//
+// https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-header-based-auth.html
+//
+// Sign differs from Presign in that it will sign the request using HTTP
+// header values. This type of signing is intended for http.Request values that
+// will not be shared, or are shared in a way the header values on the request
+// will not be lost.
+//
+// The passed in request will be modified in place.
+func (s Signer) SignHTTP(ctx context.Context, credentials aws.Credentials, r *http.Request, payloadHash string, service string, region string, signingTime time.Time, optFns ...func(options *SignerOptions)) error {
+ options := s.options
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ signer := &httpSigner{
+ Request: r,
+ PayloadHash: payloadHash,
+ ServiceName: service,
+ Region: region,
+ Credentials: credentials,
+ Time: v4Internal.NewSigningTime(signingTime.UTC()),
+ DisableHeaderHoisting: options.DisableHeaderHoisting,
+ DisableURIPathEscaping: options.DisableURIPathEscaping,
+ KeyDerivator: s.keyDerivator,
+ }
+
+ signedRequest, err := signer.Build()
+ if err != nil {
+ return err
+ }
+
+ logSigningInfo(ctx, options, &signedRequest, false)
+
+ return nil
+}
+
+// PresignHTTP signs AWS v4 requests with the payload hash, service name, region
+// the request is made to, and time the request is signed at. The signTime
+// allows you to specify that a request is signed for the future, and cannot
+// be used until then.
+//
+// Returns the signed URL and the map of HTTP headers that were included in the
+// signature or an error if signing the request failed. For presigned requests
+// these headers and their values must be included on the HTTP request when it
+// is made. This is helpful to know what header values need to be shared with
+// the party the presigned request will be distributed to.
+//
+// The payloadHash is the hex encoded SHA-256 hash of the request payload, and
+// must be provided. Even if the request has no payload (aka body). If the
+// request has no payload you should use the hex encoded SHA-256 of an empty
+// string as the payloadHash value.
+//
+// "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
+//
+// Some services such as Amazon S3 accept alternative values for the payload
+// hash, such as "UNSIGNED-PAYLOAD" for requests where the body will not be
+// included in the request signature.
+//
+// https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-header-based-auth.html
+//
+// PresignHTTP differs from SignHTTP in that it will sign the request using
+// query string instead of header values. This allows you to share the
+// Presigned Request's URL with third parties, or distribute it throughout your
+// system with minimal dependencies.
+//
+// PresignHTTP will not set the expires time of the presigned request
+// automatically. To specify the expire duration for a request add the
+// "X-Amz-Expires" query parameter on the request with the value as the
+// duration in seconds the presigned URL should be considered valid for. This
+// parameter is not used by all AWS services, and is most notable used by
+// Amazon S3 APIs.
+//
+// expires := 20 * time.Minute
+// query := req.URL.Query()
+// query.Set("X-Amz-Expires", strconv.FormatInt(int64(expires/time.Second), 10)
+// req.URL.RawQuery = query.Encode()
+//
+// This method does not modify the provided request.
+func (s *Signer) PresignHTTP(
+ ctx context.Context, credentials aws.Credentials, r *http.Request,
+ payloadHash string, service string, region string, signingTime time.Time,
+ optFns ...func(*SignerOptions),
+) (signedURI string, signedHeaders http.Header, err error) {
+ options := s.options
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ signer := &httpSigner{
+ Request: r.Clone(r.Context()),
+ PayloadHash: payloadHash,
+ ServiceName: service,
+ Region: region,
+ Credentials: credentials,
+ Time: v4Internal.NewSigningTime(signingTime.UTC()),
+ IsPreSign: true,
+ DisableHeaderHoisting: options.DisableHeaderHoisting,
+ DisableURIPathEscaping: options.DisableURIPathEscaping,
+ KeyDerivator: s.keyDerivator,
+ }
+
+ signedRequest, err := signer.Build()
+ if err != nil {
+ return "", nil, err
+ }
+
+ logSigningInfo(ctx, options, &signedRequest, true)
+
+ signedHeaders = make(http.Header)
+
+ // For the signed headers we canonicalize the header keys in the returned map.
+ // This avoids situations where can standard library double headers like host header. For example the standard
+ // library will set the Host header, even if it is present in lower-case form.
+ for k, v := range signedRequest.SignedHeaders {
+ key := textproto.CanonicalMIMEHeaderKey(k)
+ signedHeaders[key] = append(signedHeaders[key], v...)
+ }
+
+ return signedRequest.Request.URL.String(), signedHeaders, nil
+}
+
+func (s *httpSigner) buildCredentialScope() string {
+ return strings.Join([]string{
+ s.Time.ShortTimeFormat(),
+ s.Region,
+ s.ServiceName,
+ "aws4_request",
+ }, "/")
+}
+
+func buildQuery(r v4Internal.Rule, header http.Header) (url.Values, http.Header) {
+ query := url.Values{}
+ unsignedHeaders := http.Header{}
+ for k, h := range header {
+ if r.IsValid(k) {
+ query[k] = h
+ } else {
+ unsignedHeaders[k] = h
+ }
+ }
+
+ return query, unsignedHeaders
+}
+
+func (s *httpSigner) buildCanonicalHeaders(host string, rule v4Internal.Rule, header http.Header, length int64) (signed http.Header, signedHeaders, canonicalHeadersStr string) {
+ signed = make(http.Header)
+
+ var headers []string
+ const hostHeader = "host"
+ headers = append(headers, hostHeader)
+ signed[hostHeader] = append(signed[hostHeader], host)
+
+ if length > 0 {
+ const contentLengthHeader = "content-length"
+ headers = append(headers, contentLengthHeader)
+ signed[contentLengthHeader] = append(signed[contentLengthHeader], strconv.FormatInt(length, 10))
+ }
+
+ for k, v := range header {
+ if !rule.IsValid(k) {
+ continue // ignored header
+ }
+
+ lowerCaseKey := strings.ToLower(k)
+ if _, ok := signed[lowerCaseKey]; ok {
+ // include additional values
+ signed[lowerCaseKey] = append(signed[lowerCaseKey], v...)
+ continue
+ }
+
+ headers = append(headers, lowerCaseKey)
+ signed[lowerCaseKey] = v
+ }
+ sort.Strings(headers)
+
+ signedHeaders = strings.Join(headers, ";")
+
+ var canonicalHeaders strings.Builder
+ n := len(headers)
+ const colon = ':'
+ for i := 0; i < n; i++ {
+ if headers[i] == hostHeader {
+ canonicalHeaders.WriteString(hostHeader)
+ canonicalHeaders.WriteRune(colon)
+ canonicalHeaders.WriteString(v4Internal.StripExcessSpaces(host))
+ } else {
+ canonicalHeaders.WriteString(headers[i])
+ canonicalHeaders.WriteRune(colon)
+ canonicalHeaders.WriteString(strings.Join(signed[headers[i]], ","))
+ }
+ canonicalHeaders.WriteRune('\n')
+ }
+ canonicalHeadersStr = canonicalHeaders.String()
+
+ return signed, signedHeaders, canonicalHeadersStr
+}
+
+func (s *httpSigner) buildCanonicalString(method, uri, query, signedHeaders, canonicalHeaders string) string {
+ return strings.Join([]string{
+ method,
+ uri,
+ query,
+ canonicalHeaders,
+ signedHeaders,
+ s.PayloadHash,
+ }, "\n")
+}
+
+func (s *httpSigner) buildStringToSign(credentialScope, canonicalRequestString string) string {
+ return strings.Join([]string{
+ signingAlgorithm,
+ s.Time.TimeFormat(),
+ credentialScope,
+ hex.EncodeToString(makeHash(sha256.New(), []byte(canonicalRequestString))),
+ }, "\n")
+}
+
+func makeHash(hash hash.Hash, b []byte) []byte {
+ hash.Reset()
+ hash.Write(b)
+ return hash.Sum(nil)
+}
+
+func (s *httpSigner) buildSignature(strToSign string) (string, error) {
+ key := s.KeyDerivator.DeriveKey(s.Credentials, s.ServiceName, s.Region, s.Time)
+ return hex.EncodeToString(v4Internal.HMACSHA256(key, []byte(strToSign))), nil
+}
+
+func (s *httpSigner) setRequiredSigningFields(headers http.Header, query url.Values) {
+ amzDate := s.Time.TimeFormat()
+
+ if s.IsPreSign {
+ query.Set(v4Internal.AmzAlgorithmKey, signingAlgorithm)
+ if sessionToken := s.Credentials.SessionToken; len(sessionToken) > 0 {
+ query.Set("X-Amz-Security-Token", sessionToken)
+ }
+
+ query.Set(v4Internal.AmzDateKey, amzDate)
+ return
+ }
+
+ headers[v4Internal.AmzDateKey] = append(headers[v4Internal.AmzDateKey][:0], amzDate)
+
+ if len(s.Credentials.SessionToken) > 0 {
+ headers[v4Internal.AmzSecurityTokenKey] = append(headers[v4Internal.AmzSecurityTokenKey][:0], s.Credentials.SessionToken)
+ }
+}
+
+func logSigningInfo(ctx context.Context, options SignerOptions, request *signedRequest, isPresign bool) {
+ if !options.LogSigning {
+ return
+ }
+ signedURLMsg := ""
+ if isPresign {
+ signedURLMsg = fmt.Sprintf(logSignedURLMsg, request.Request.URL.String())
+ }
+ logger := logging.WithContext(ctx, options.Logger)
+ logger.Logf(logging.Debug, logSignInfoMsg, request.CanonicalString, request.StringToSign, signedURLMsg)
+}
+
+type signedRequest struct {
+ Request *http.Request
+ SignedHeaders http.Header
+ CanonicalString string
+ StringToSign string
+ PreSigned bool
+}
+
+const logSignInfoMsg = `Request Signature:
+---[ CANONICAL STRING ]-----------------------------
+%s
+---[ STRING TO SIGN ]--------------------------------
+%s%s
+-----------------------------------------------------`
+const logSignedURLMsg = `
+---[ SIGNED URL ]------------------------------------
+%s`
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/to_ptr.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/to_ptr.go
new file mode 100644
index 00000000..28a193b8
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/to_ptr.go
@@ -0,0 +1,280 @@
+// Code generated by aws/generate.go DO NOT EDIT.
+
+package aws
+
+import (
+ "github.com/aws/smithy-go/ptr"
+ "time"
+)
+
+// Bool returns a pointer value for the bool value passed in.
+func Bool(v bool) *bool {
+ return ptr.Bool(v)
+}
+
+// BoolSlice returns a slice of bool pointers from the values
+// passed in.
+func BoolSlice(vs []bool) []*bool {
+ return ptr.BoolSlice(vs)
+}
+
+// BoolMap returns a map of bool pointers from the values
+// passed in.
+func BoolMap(vs map[string]bool) map[string]*bool {
+ return ptr.BoolMap(vs)
+}
+
+// Byte returns a pointer value for the byte value passed in.
+func Byte(v byte) *byte {
+ return ptr.Byte(v)
+}
+
+// ByteSlice returns a slice of byte pointers from the values
+// passed in.
+func ByteSlice(vs []byte) []*byte {
+ return ptr.ByteSlice(vs)
+}
+
+// ByteMap returns a map of byte pointers from the values
+// passed in.
+func ByteMap(vs map[string]byte) map[string]*byte {
+ return ptr.ByteMap(vs)
+}
+
+// String returns a pointer value for the string value passed in.
+func String(v string) *string {
+ return ptr.String(v)
+}
+
+// StringSlice returns a slice of string pointers from the values
+// passed in.
+func StringSlice(vs []string) []*string {
+ return ptr.StringSlice(vs)
+}
+
+// StringMap returns a map of string pointers from the values
+// passed in.
+func StringMap(vs map[string]string) map[string]*string {
+ return ptr.StringMap(vs)
+}
+
+// Int returns a pointer value for the int value passed in.
+func Int(v int) *int {
+ return ptr.Int(v)
+}
+
+// IntSlice returns a slice of int pointers from the values
+// passed in.
+func IntSlice(vs []int) []*int {
+ return ptr.IntSlice(vs)
+}
+
+// IntMap returns a map of int pointers from the values
+// passed in.
+func IntMap(vs map[string]int) map[string]*int {
+ return ptr.IntMap(vs)
+}
+
+// Int8 returns a pointer value for the int8 value passed in.
+func Int8(v int8) *int8 {
+ return ptr.Int8(v)
+}
+
+// Int8Slice returns a slice of int8 pointers from the values
+// passed in.
+func Int8Slice(vs []int8) []*int8 {
+ return ptr.Int8Slice(vs)
+}
+
+// Int8Map returns a map of int8 pointers from the values
+// passed in.
+func Int8Map(vs map[string]int8) map[string]*int8 {
+ return ptr.Int8Map(vs)
+}
+
+// Int16 returns a pointer value for the int16 value passed in.
+func Int16(v int16) *int16 {
+ return ptr.Int16(v)
+}
+
+// Int16Slice returns a slice of int16 pointers from the values
+// passed in.
+func Int16Slice(vs []int16) []*int16 {
+ return ptr.Int16Slice(vs)
+}
+
+// Int16Map returns a map of int16 pointers from the values
+// passed in.
+func Int16Map(vs map[string]int16) map[string]*int16 {
+ return ptr.Int16Map(vs)
+}
+
+// Int32 returns a pointer value for the int32 value passed in.
+func Int32(v int32) *int32 {
+ return ptr.Int32(v)
+}
+
+// Int32Slice returns a slice of int32 pointers from the values
+// passed in.
+func Int32Slice(vs []int32) []*int32 {
+ return ptr.Int32Slice(vs)
+}
+
+// Int32Map returns a map of int32 pointers from the values
+// passed in.
+func Int32Map(vs map[string]int32) map[string]*int32 {
+ return ptr.Int32Map(vs)
+}
+
+// Int64 returns a pointer value for the int64 value passed in.
+func Int64(v int64) *int64 {
+ return ptr.Int64(v)
+}
+
+// Int64Slice returns a slice of int64 pointers from the values
+// passed in.
+func Int64Slice(vs []int64) []*int64 {
+ return ptr.Int64Slice(vs)
+}
+
+// Int64Map returns a map of int64 pointers from the values
+// passed in.
+func Int64Map(vs map[string]int64) map[string]*int64 {
+ return ptr.Int64Map(vs)
+}
+
+// Uint returns a pointer value for the uint value passed in.
+func Uint(v uint) *uint {
+ return ptr.Uint(v)
+}
+
+// UintSlice returns a slice of uint pointers from the values
+// passed in.
+func UintSlice(vs []uint) []*uint {
+ return ptr.UintSlice(vs)
+}
+
+// UintMap returns a map of uint pointers from the values
+// passed in.
+func UintMap(vs map[string]uint) map[string]*uint {
+ return ptr.UintMap(vs)
+}
+
+// Uint8 returns a pointer value for the uint8 value passed in.
+func Uint8(v uint8) *uint8 {
+ return ptr.Uint8(v)
+}
+
+// Uint8Slice returns a slice of uint8 pointers from the values
+// passed in.
+func Uint8Slice(vs []uint8) []*uint8 {
+ return ptr.Uint8Slice(vs)
+}
+
+// Uint8Map returns a map of uint8 pointers from the values
+// passed in.
+func Uint8Map(vs map[string]uint8) map[string]*uint8 {
+ return ptr.Uint8Map(vs)
+}
+
+// Uint16 returns a pointer value for the uint16 value passed in.
+func Uint16(v uint16) *uint16 {
+ return ptr.Uint16(v)
+}
+
+// Uint16Slice returns a slice of uint16 pointers from the values
+// passed in.
+func Uint16Slice(vs []uint16) []*uint16 {
+ return ptr.Uint16Slice(vs)
+}
+
+// Uint16Map returns a map of uint16 pointers from the values
+// passed in.
+func Uint16Map(vs map[string]uint16) map[string]*uint16 {
+ return ptr.Uint16Map(vs)
+}
+
+// Uint32 returns a pointer value for the uint32 value passed in.
+func Uint32(v uint32) *uint32 {
+ return ptr.Uint32(v)
+}
+
+// Uint32Slice returns a slice of uint32 pointers from the values
+// passed in.
+func Uint32Slice(vs []uint32) []*uint32 {
+ return ptr.Uint32Slice(vs)
+}
+
+// Uint32Map returns a map of uint32 pointers from the values
+// passed in.
+func Uint32Map(vs map[string]uint32) map[string]*uint32 {
+ return ptr.Uint32Map(vs)
+}
+
+// Uint64 returns a pointer value for the uint64 value passed in.
+func Uint64(v uint64) *uint64 {
+ return ptr.Uint64(v)
+}
+
+// Uint64Slice returns a slice of uint64 pointers from the values
+// passed in.
+func Uint64Slice(vs []uint64) []*uint64 {
+ return ptr.Uint64Slice(vs)
+}
+
+// Uint64Map returns a map of uint64 pointers from the values
+// passed in.
+func Uint64Map(vs map[string]uint64) map[string]*uint64 {
+ return ptr.Uint64Map(vs)
+}
+
+// Float32 returns a pointer value for the float32 value passed in.
+func Float32(v float32) *float32 {
+ return ptr.Float32(v)
+}
+
+// Float32Slice returns a slice of float32 pointers from the values
+// passed in.
+func Float32Slice(vs []float32) []*float32 {
+ return ptr.Float32Slice(vs)
+}
+
+// Float32Map returns a map of float32 pointers from the values
+// passed in.
+func Float32Map(vs map[string]float32) map[string]*float32 {
+ return ptr.Float32Map(vs)
+}
+
+// Float64 returns a pointer value for the float64 value passed in.
+func Float64(v float64) *float64 {
+ return ptr.Float64(v)
+}
+
+// Float64Slice returns a slice of float64 pointers from the values
+// passed in.
+func Float64Slice(vs []float64) []*float64 {
+ return ptr.Float64Slice(vs)
+}
+
+// Float64Map returns a map of float64 pointers from the values
+// passed in.
+func Float64Map(vs map[string]float64) map[string]*float64 {
+ return ptr.Float64Map(vs)
+}
+
+// Time returns a pointer value for the time.Time value passed in.
+func Time(v time.Time) *time.Time {
+ return ptr.Time(v)
+}
+
+// TimeSlice returns a slice of time.Time pointers from the values
+// passed in.
+func TimeSlice(vs []time.Time) []*time.Time {
+ return ptr.TimeSlice(vs)
+}
+
+// TimeMap returns a map of time.Time pointers from the values
+// passed in.
+func TimeMap(vs map[string]time.Time) map[string]*time.Time {
+ return ptr.TimeMap(vs)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/transport/http/client.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/transport/http/client.go
new file mode 100644
index 00000000..b207a565
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/transport/http/client.go
@@ -0,0 +1,301 @@
+package http
+
+import (
+ "crypto/tls"
+ "net"
+ "net/http"
+ "reflect"
+ "sync"
+ "time"
+)
+
+// Defaults for the HTTPTransportBuilder.
+var (
+ // Default connection pool options
+ DefaultHTTPTransportMaxIdleConns = 100
+ DefaultHTTPTransportMaxIdleConnsPerHost = 10
+
+ // Default connection timeouts
+ DefaultHTTPTransportIdleConnTimeout = 90 * time.Second
+ DefaultHTTPTransportTLSHandleshakeTimeout = 10 * time.Second
+ DefaultHTTPTransportExpectContinueTimeout = 1 * time.Second
+
+ // Default to TLS 1.2 for all HTTPS requests.
+ DefaultHTTPTransportTLSMinVersion uint16 = tls.VersionTLS12
+)
+
+// Timeouts for net.Dialer's network connection.
+var (
+ DefaultDialConnectTimeout = 30 * time.Second
+ DefaultDialKeepAliveTimeout = 30 * time.Second
+)
+
+// BuildableClient provides a HTTPClient implementation with options to
+// create copies of the HTTPClient when additional configuration is provided.
+//
+// The client's methods will not share the http.Transport value between copies
+// of the BuildableClient. Only exported member values of the Transport and
+// optional Dialer will be copied between copies of BuildableClient.
+type BuildableClient struct {
+ transport *http.Transport
+ dialer *net.Dialer
+
+ initOnce sync.Once
+
+ clientTimeout time.Duration
+ client *http.Client
+}
+
+// NewBuildableClient returns an initialized client for invoking HTTP
+// requests.
+func NewBuildableClient() *BuildableClient {
+ return &BuildableClient{}
+}
+
+// Do implements the HTTPClient interface's Do method to invoke a HTTP request,
+// and receive the response. Uses the BuildableClient's current
+// configuration to invoke the http.Request.
+//
+// If connection pooling is enabled (aka HTTP KeepAlive) the client will only
+// share pooled connections with its own instance. Copies of the
+// BuildableClient will have their own connection pools.
+//
+// Redirect (3xx) responses will not be followed, the HTTP response received
+// will returned instead.
+func (b *BuildableClient) Do(req *http.Request) (*http.Response, error) {
+ b.initOnce.Do(b.build)
+
+ return b.client.Do(req)
+}
+
+func (b *BuildableClient) build() {
+ b.client = wrapWithLimitedRedirect(&http.Client{
+ Timeout: b.clientTimeout,
+ Transport: b.GetTransport(),
+ })
+}
+
+func (b *BuildableClient) clone() *BuildableClient {
+ cpy := NewBuildableClient()
+ cpy.transport = b.GetTransport()
+ cpy.dialer = b.GetDialer()
+ cpy.clientTimeout = b.clientTimeout
+
+ return cpy
+}
+
+// WithTransportOptions copies the BuildableClient and returns it with the
+// http.Transport options applied.
+//
+// If a non (*http.Transport) was set as the round tripper, the round tripper
+// will be replaced with a default Transport value before invoking the option
+// functions.
+func (b *BuildableClient) WithTransportOptions(opts ...func(*http.Transport)) *BuildableClient {
+ cpy := b.clone()
+
+ tr := cpy.GetTransport()
+ for _, opt := range opts {
+ opt(tr)
+ }
+ cpy.transport = tr
+
+ return cpy
+}
+
+// WithDialerOptions copies the BuildableClient and returns it with the
+// net.Dialer options applied. Will set the client's http.Transport DialContext
+// member.
+func (b *BuildableClient) WithDialerOptions(opts ...func(*net.Dialer)) *BuildableClient {
+ cpy := b.clone()
+
+ dialer := cpy.GetDialer()
+ for _, opt := range opts {
+ opt(dialer)
+ }
+ cpy.dialer = dialer
+
+ tr := cpy.GetTransport()
+ tr.DialContext = cpy.dialer.DialContext
+ cpy.transport = tr
+
+ return cpy
+}
+
+// WithTimeout Sets the timeout used by the client for all requests.
+func (b *BuildableClient) WithTimeout(timeout time.Duration) *BuildableClient {
+ cpy := b.clone()
+ cpy.clientTimeout = timeout
+ return cpy
+}
+
+// GetTransport returns a copy of the client's HTTP Transport.
+func (b *BuildableClient) GetTransport() *http.Transport {
+ var tr *http.Transport
+ if b.transport != nil {
+ tr = b.transport.Clone()
+ } else {
+ tr = defaultHTTPTransport()
+ }
+
+ return tr
+}
+
+// GetDialer returns a copy of the client's network dialer.
+func (b *BuildableClient) GetDialer() *net.Dialer {
+ var dialer *net.Dialer
+ if b.dialer != nil {
+ dialer = shallowCopyStruct(b.dialer).(*net.Dialer)
+ } else {
+ dialer = defaultDialer()
+ }
+
+ return dialer
+}
+
+// GetTimeout returns a copy of the client's timeout to cancel requests with.
+func (b *BuildableClient) GetTimeout() time.Duration {
+ return b.clientTimeout
+}
+
+func defaultDialer() *net.Dialer {
+ return &net.Dialer{
+ Timeout: DefaultDialConnectTimeout,
+ KeepAlive: DefaultDialKeepAliveTimeout,
+ DualStack: true,
+ }
+}
+
+func defaultHTTPTransport() *http.Transport {
+ dialer := defaultDialer()
+
+ tr := &http.Transport{
+ Proxy: http.ProxyFromEnvironment,
+ DialContext: dialer.DialContext,
+ TLSHandshakeTimeout: DefaultHTTPTransportTLSHandleshakeTimeout,
+ MaxIdleConns: DefaultHTTPTransportMaxIdleConns,
+ MaxIdleConnsPerHost: DefaultHTTPTransportMaxIdleConnsPerHost,
+ IdleConnTimeout: DefaultHTTPTransportIdleConnTimeout,
+ ExpectContinueTimeout: DefaultHTTPTransportExpectContinueTimeout,
+ ForceAttemptHTTP2: true,
+ TLSClientConfig: &tls.Config{
+ MinVersion: DefaultHTTPTransportTLSMinVersion,
+ },
+ }
+
+ return tr
+}
+
+// shallowCopyStruct creates a shallow copy of the passed in source struct, and
+// returns that copy of the same struct type.
+func shallowCopyStruct(src interface{}) interface{} {
+ srcVal := reflect.ValueOf(src)
+ srcValType := srcVal.Type()
+
+ var returnAsPtr bool
+ if srcValType.Kind() == reflect.Ptr {
+ srcVal = srcVal.Elem()
+ srcValType = srcValType.Elem()
+ returnAsPtr = true
+ }
+ dstVal := reflect.New(srcValType).Elem()
+
+ for i := 0; i < srcValType.NumField(); i++ {
+ ft := srcValType.Field(i)
+ if len(ft.PkgPath) != 0 {
+ // unexported fields have a PkgPath
+ continue
+ }
+
+ dstVal.Field(i).Set(srcVal.Field(i))
+ }
+
+ if returnAsPtr {
+ dstVal = dstVal.Addr()
+ }
+
+ return dstVal.Interface()
+}
+
+// wrapWithLimitedRedirect updates the Client's Transport and CheckRedirect to
+// not follow any redirect other than 307 and 308. No other redirect will be
+// followed.
+//
+// If the client does not have a Transport defined will use a new SDK default
+// http.Transport configuration.
+func wrapWithLimitedRedirect(c *http.Client) *http.Client {
+ tr := c.Transport
+ if tr == nil {
+ tr = defaultHTTPTransport()
+ }
+
+ cc := *c
+ cc.CheckRedirect = limitedRedirect
+ cc.Transport = suppressBadHTTPRedirectTransport{
+ tr: tr,
+ }
+
+ return &cc
+}
+
+// limitedRedirect is a CheckRedirect that prevents the client from following
+// any non 307/308 HTTP status code redirects.
+//
+// The 307 and 308 redirects are allowed because the client must use the
+// original HTTP method for the redirected to location. Whereas 301 and 302
+// allow the client to switch to GET for the redirect.
+//
+// Suppresses all redirect requests with a URL of badHTTPRedirectLocation.
+func limitedRedirect(r *http.Request, via []*http.Request) error {
+ // Request.Response, in CheckRedirect is the response that is triggering
+ // the redirect.
+ resp := r.Response
+ if r.URL.String() == badHTTPRedirectLocation {
+ resp.Header.Del(badHTTPRedirectLocation)
+ return http.ErrUseLastResponse
+ }
+
+ switch resp.StatusCode {
+ case 307, 308:
+ // Only allow 307 and 308 redirects as they preserve the method.
+ return nil
+ }
+
+ return http.ErrUseLastResponse
+}
+
+// suppressBadHTTPRedirectTransport provides an http.RoundTripper
+// implementation that wraps another http.RoundTripper to prevent HTTP client
+// receiving 301 and 302 HTTP responses redirects without the required location
+// header.
+//
+// Clients using this utility must have a CheckRedirect, e.g. limitedRedirect,
+// that check for responses with having a URL of baseHTTPRedirectLocation, and
+// suppress the redirect.
+type suppressBadHTTPRedirectTransport struct {
+ tr http.RoundTripper
+}
+
+const badHTTPRedirectLocation = `https://amazonaws.com/badhttpredirectlocation`
+
+// RoundTrip backfills a stub location when a 301/302 response is received
+// without a location. This stub location is used by limitedRedirect to prevent
+// the HTTP client from failing attempting to use follow a redirect without a
+// location value.
+func (t suppressBadHTTPRedirectTransport) RoundTrip(r *http.Request) (*http.Response, error) {
+ resp, err := t.tr.RoundTrip(r)
+ if err != nil {
+ return resp, err
+ }
+
+ // S3 is the only known service to return 301 without location header.
+ // The Go standard library HTTP client will return an opaque error if it
+ // tries to follow a 301/302 response missing the location header.
+ switch resp.StatusCode {
+ case 301, 302:
+ if v := resp.Header.Get("Location"); len(v) == 0 {
+ resp.Header.Set("Location", badHTTPRedirectLocation)
+ }
+ }
+
+ return resp, err
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/transport/http/content_type.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/transport/http/content_type.go
new file mode 100644
index 00000000..556f54a7
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/transport/http/content_type.go
@@ -0,0 +1,42 @@
+package http
+
+import (
+ "context"
+ "fmt"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// removeContentTypeHeader is a build middleware that removes
+// content type header if content-length header is unset or
+// is set to zero,
+type removeContentTypeHeader struct {
+}
+
+// ID the name of the middleware.
+func (m *removeContentTypeHeader) ID() string {
+ return "RemoveContentTypeHeader"
+}
+
+// HandleBuild adds or appends the constructed user agent to the request.
+func (m *removeContentTypeHeader) HandleBuild(ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler) (
+ out middleware.BuildOutput, metadata middleware.Metadata, err error,
+) {
+ req, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown transport type %T", in)
+ }
+
+ // remove contentTypeHeader when content-length is zero
+ if req.ContentLength == 0 {
+ req.Header.Del("content-type")
+ }
+
+ return next.HandleBuild(ctx, in)
+}
+
+// RemoveContentTypeHeader removes content-type header if
+// content length is unset or equal to zero.
+func RemoveContentTypeHeader(stack *middleware.Stack) error {
+ return stack.Build.Add(&removeContentTypeHeader{}, middleware.After)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/transport/http/response_error.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/transport/http/response_error.go
new file mode 100644
index 00000000..44651c99
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/transport/http/response_error.go
@@ -0,0 +1,33 @@
+package http
+
+import (
+ "errors"
+ "fmt"
+
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// ResponseError provides the HTTP centric error type wrapping the underlying error
+// with the HTTP response value and the deserialized RequestID.
+type ResponseError struct {
+ *smithyhttp.ResponseError
+
+ // RequestID associated with response error
+ RequestID string
+}
+
+// ServiceRequestID returns the request id associated with Response Error
+func (e *ResponseError) ServiceRequestID() string { return e.RequestID }
+
+// Error returns the formatted error
+func (e *ResponseError) Error() string {
+ return fmt.Sprintf(
+ "https response error StatusCode: %d, RequestID: %s, %v",
+ e.Response.StatusCode, e.RequestID, e.Err)
+}
+
+// As populates target and returns true if the type of target is a error type that
+// the ResponseError embeds, (e.g.AWS HTTP ResponseError)
+func (e *ResponseError) As(target interface{}) bool {
+ return errors.As(e.ResponseError, target)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/transport/http/response_error_middleware.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/transport/http/response_error_middleware.go
new file mode 100644
index 00000000..8fd14cec
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/transport/http/response_error_middleware.go
@@ -0,0 +1,54 @@
+package http
+
+import (
+ "context"
+
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// AddResponseErrorMiddleware adds response error wrapper middleware
+func AddResponseErrorMiddleware(stack *middleware.Stack) error {
+ // add error wrapper middleware before request id retriever middleware so that it can wrap the error response
+ // returned by operation deserializers
+ return stack.Deserialize.Insert(&responseErrorWrapper{}, "RequestIDRetriever", middleware.Before)
+}
+
+type responseErrorWrapper struct {
+}
+
+// ID returns the middleware identifier
+func (m *responseErrorWrapper) ID() string {
+ return "ResponseErrorWrapper"
+}
+
+func (m *responseErrorWrapper) 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 {
+ // Nothing to do when there is no error.
+ return out, metadata, err
+ }
+
+ resp, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ // No raw response to wrap with.
+ return out, metadata, err
+ }
+
+ // look for request id in metadata
+ reqID, _ := awsmiddleware.GetRequestIDMetadata(metadata)
+
+ // Wrap the returned smithy error with the request id retrieved from the metadata
+ err = &ResponseError{
+ ResponseError: &smithyhttp.ResponseError{
+ Response: resp,
+ Err: err,
+ },
+ RequestID: reqID,
+ }
+
+ return out, metadata, err
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/transport/http/timeout_read_closer.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/transport/http/timeout_read_closer.go
new file mode 100644
index 00000000..993929bd
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/transport/http/timeout_read_closer.go
@@ -0,0 +1,104 @@
+package http
+
+import (
+ "context"
+ "fmt"
+ "io"
+ "time"
+
+ "github.com/aws/smithy-go"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+type readResult struct {
+ n int
+ err error
+}
+
+// ResponseTimeoutError is an error when the reads from the response are
+// delayed longer than the timeout the read was configured for.
+type ResponseTimeoutError struct {
+ TimeoutDur time.Duration
+}
+
+// Timeout returns that the error is was caused by a timeout, and can be
+// retried.
+func (*ResponseTimeoutError) Timeout() bool { return true }
+
+func (e *ResponseTimeoutError) Error() string {
+ return fmt.Sprintf("read on body reach timeout limit, %v", e.TimeoutDur)
+}
+
+// timeoutReadCloser will handle body reads that take too long.
+// We will return a ErrReadTimeout error if a timeout occurs.
+type timeoutReadCloser struct {
+ reader io.ReadCloser
+ duration time.Duration
+}
+
+// Read will spin off a goroutine to call the reader's Read method. We will
+// select on the timer's channel or the read's channel. Whoever completes first
+// will be returned.
+func (r *timeoutReadCloser) Read(b []byte) (int, error) {
+ timer := time.NewTimer(r.duration)
+ c := make(chan readResult, 1)
+
+ go func() {
+ n, err := r.reader.Read(b)
+ timer.Stop()
+ c <- readResult{n: n, err: err}
+ }()
+
+ select {
+ case data := <-c:
+ return data.n, data.err
+ case <-timer.C:
+ return 0, &ResponseTimeoutError{TimeoutDur: r.duration}
+ }
+}
+
+func (r *timeoutReadCloser) Close() error {
+ return r.reader.Close()
+}
+
+// AddResponseReadTimeoutMiddleware adds a middleware to the stack that wraps the
+// response body so that a read that takes too long will return an error.
+func AddResponseReadTimeoutMiddleware(stack *middleware.Stack, duration time.Duration) error {
+ return stack.Deserialize.Add(&readTimeout{duration: duration}, middleware.After)
+}
+
+// readTimeout wraps the response body with a timeoutReadCloser
+type readTimeout struct {
+ duration time.Duration
+}
+
+// ID returns the id of the middleware
+func (*readTimeout) ID() string {
+ return "ReadResponseTimeout"
+}
+
+// HandleDeserialize implements the DeserializeMiddleware interface
+func (m *readTimeout) 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)}
+ }
+
+ response.Body = &timeoutReadCloser{
+ reader: response.Body,
+ duration: m.duration,
+ }
+ out.RawResponse = response
+
+ return out, metadata, err
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/types.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/types.go
new file mode 100644
index 00000000..cc3ae811
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/types.go
@@ -0,0 +1,42 @@
+package aws
+
+import (
+ "fmt"
+)
+
+// Ternary is an enum allowing an unknown or none state in addition to a bool's
+// true and false.
+type Ternary int
+
+func (t Ternary) String() string {
+ switch t {
+ case UnknownTernary:
+ return "unknown"
+ case FalseTernary:
+ return "false"
+ case TrueTernary:
+ return "true"
+ default:
+ return fmt.Sprintf("unknown value, %d", int(t))
+ }
+}
+
+// Bool returns true if the value is TrueTernary, false otherwise.
+func (t Ternary) Bool() bool {
+ return t == TrueTernary
+}
+
+// Enumerations for the values of the Ternary type.
+const (
+ UnknownTernary Ternary = iota
+ FalseTernary
+ TrueTernary
+)
+
+// BoolTernary returns a true or false Ternary value for the bool provided.
+func BoolTernary(v bool) Ternary {
+ if v {
+ return TrueTernary
+ }
+ return FalseTernary
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/version.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/version.go
similarity index 72%
rename from vendor/github.com/aws/aws-sdk-go/aws/version.go
rename to vendor/github.com/aws/aws-sdk-go-v2/aws/version.go
index 3ed25ff9..5f729d45 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/version.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/version.go
@@ -2,7 +2,7 @@
package aws
// SDKName is the name of this AWS SDK
-const SDKName = "aws-sdk-go"
+const SDKName = "aws-sdk-go-v2"
// SDKVersion is the version of this SDK
-const SDKVersion = "1.40.53"
+const SDKVersion = goModuleVersion
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/buildspec.yml b/vendor/github.com/aws/aws-sdk-go-v2/buildspec.yml
new file mode 100644
index 00000000..b11df508
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/buildspec.yml
@@ -0,0 +1,12 @@
+version: 0.2
+
+phases:
+ build:
+ commands:
+ - echo Build started on `date`
+ - export GOPATH=/go
+ - export SDK_CODEBUILD_ROOT=`pwd`
+ - make ci-test-no-generate
+ post_build:
+ commands:
+ - echo Build completed on `date`
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/config/CHANGELOG.md
new file mode 100644
index 00000000..0fe1ec0f
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/config/CHANGELOG.md
@@ -0,0 +1,54 @@
+# v1.8.2 (2021-09-17)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.8.1 (2021-09-10)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.8.0 (2021-09-02)
+
+* **Feature**: Add support for S3 Multi-Region Access Point ARNs.
+
+# v1.7.0 (2021-08-27)
+
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.6.1 (2021-08-19)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.6.0 (2021-08-04)
+
+* **Feature**: adds error handling for defered close calls
+* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.5.0 (2021-07-15)
+
+* **Feature**: Support has been added for EC2 IPv6-enabled Instance Metadata Service Endpoints.
+* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.4.1 (2021-07-01)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.4.0 (2021-06-25)
+
+* **Feature**: Adds configuration setting for enabling endpoint discovery.
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.0 (2021-05-20)
+
+* **Feature**: SSO credentials can now be defined alongside other credential providers within the same configuration profile.
+* **Bug Fix**: Profile names were incorrectly normalized to lower-case, which could result in unexpected profile configurations.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.2.0 (2021-05-14)
+
+* **Feature**: Constant has been added to modules to enable runtime version inspection for reporting.
+* **Dependency Update**: Updated to the latest SDK module versions
+
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/LICENSE.txt b/vendor/github.com/aws/aws-sdk-go-v2/config/LICENSE.txt
new file mode 100644
index 00000000..d6456956
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/config/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/config/config.go b/vendor/github.com/aws/aws-sdk-go-v2/config/config.go
new file mode 100644
index 00000000..fa2df2c8
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/config/config.go
@@ -0,0 +1,190 @@
+package config
+
+import (
+ "context"
+ "github.com/aws/aws-sdk-go-v2/aws"
+)
+
+// defaultLoaders are a slice of functions that will read external configuration
+// sources for configuration values. These values are read by the AWSConfigResolvers
+// using interfaces to extract specific information from the external configuration.
+var defaultLoaders = []loader{
+ loadEnvConfig,
+ loadSharedConfigIgnoreNotExist,
+}
+
+// defaultAWSConfigResolvers are a slice of functions that will resolve external
+// configuration values into AWS configuration values.
+//
+// This will setup the AWS configuration's Region,
+var defaultAWSConfigResolvers = []awsConfigResolver{
+ // Resolves the default configuration the SDK's aws.Config will be
+ // initialized with.
+ resolveDefaultAWSConfig,
+
+ // Sets the logger to be used. Could be user provided logger, and client
+ // logging mode.
+ resolveLogger,
+ resolveClientLogMode,
+
+ // Sets the HTTP client and configuration to use for making requests using
+ // the HTTP transport.
+ resolveHTTPClient,
+ resolveCustomCABundle,
+
+ // Sets the endpoint resolving behavior the API Clients will use for making
+ // requests to. Clients default to their own clients this allows overrides
+ // to be specified.
+ resolveEndpointResolver,
+
+ // Sets the retry behavior API clients will use within their retry attempt
+ // middleware. Defaults to unset, allowing API clients to define their own
+ // retry behavior.
+ resolveRetryer,
+
+ // Sets the region the API Clients should use for making requests to.
+ resolveRegion,
+ resolveEC2IMDSRegion,
+ resolveDefaultRegion,
+
+ // Sets the additional set of middleware stack mutators that will custom
+ // API client request pipeline middleware.
+ resolveAPIOptions,
+
+ // Sets the resolved credentials the API clients will use for
+ // authentication. Provides the SDK's default credential chain.
+ //
+ // Should probably be the last step in the resolve chain to ensure that all
+ // other configurations are resolved first in case downstream credentials
+ // implementations depend on or can be configured with earlier resolved
+ // configuration options.
+ resolveCredentials,
+}
+
+// A Config represents a generic configuration value or set of values. This type
+// will be used by the AWSConfigResolvers to extract
+//
+// General the Config type will use type assertion against the Provider interfaces
+// to extract specific data from the Config.
+type Config interface{}
+
+// A loader is used to load external configuration data and returns it as
+// a generic Config type.
+//
+// The loader should return an error if it fails to load the external configuration
+// or the configuration data is malformed, or required components missing.
+type loader func(context.Context, configs) (Config, error)
+
+// An awsConfigResolver will extract configuration data from the configs slice
+// using the provider interfaces to extract specific functionality. The extracted
+// configuration values will be written to the AWS Config value.
+//
+// The resolver should return an error if it it fails to extract the data, the
+// data is malformed, or incomplete.
+type awsConfigResolver func(ctx context.Context, cfg *aws.Config, configs configs) error
+
+// configs is a slice of Config values. These values will be used by the
+// AWSConfigResolvers to extract external configuration values to populate the
+// AWS Config type.
+//
+// Use AppendFromLoaders to add additional external Config values that are
+// loaded from external sources.
+//
+// Use ResolveAWSConfig after external Config values have been added or loaded
+// to extract the loaded configuration values into the AWS Config.
+type configs []Config
+
+// AppendFromLoaders iterates over the slice of loaders passed in calling each
+// loader function in order. The external config value returned by the loader
+// will be added to the returned configs slice.
+//
+// If a loader returns an error this method will stop iterating and return
+// that error.
+func (cs configs) AppendFromLoaders(ctx context.Context, loaders []loader) (configs, error) {
+ for _, fn := range loaders {
+ cfg, err := fn(ctx, cs)
+ if err != nil {
+ return nil, err
+ }
+
+ cs = append(cs, cfg)
+ }
+
+ return cs, nil
+}
+
+// ResolveAWSConfig returns a AWS configuration populated with values by calling
+// the resolvers slice passed in. Each resolver is called in order. Any resolver
+// may overwrite the AWS Configuration value of a previous resolver.
+//
+// If an resolver returns an error this method will return that error, and stop
+// iterating over the resolvers.
+func (cs configs) ResolveAWSConfig(ctx context.Context, resolvers []awsConfigResolver) (aws.Config, error) {
+ var cfg aws.Config
+
+ for _, fn := range resolvers {
+ if err := fn(ctx, &cfg, cs); err != nil {
+ // TODO provide better error?
+ return aws.Config{}, err
+ }
+ }
+
+ var sources []interface{}
+ for _, s := range cs {
+ sources = append(sources, s)
+ }
+ cfg.ConfigSources = sources
+
+ return cfg, nil
+}
+
+// ResolveConfig calls the provide function passing slice of configuration sources.
+// This implements the aws.ConfigResolver interface.
+func (cs configs) ResolveConfig(f func(configs []interface{}) error) error {
+ var cfgs []interface{}
+ for i := range cs {
+ cfgs = append(cfgs, cs[i])
+ }
+ return f(cfgs)
+}
+
+// LoadDefaultConfig reads the SDK's default external configurations, and
+// populates an AWS Config with the values from the external configurations.
+//
+// An optional variadic set of additional Config values can be provided as input
+// that will be prepended to the configs slice. Use this to add custom configuration.
+// The custom configurations must satisfy the respective providers for their data
+// or the custom data will be ignored by the resolvers and config loaders.
+//
+// cfg, err := config.LoadDefaultConfig( context.TODO(),
+// WithSharedConfigProfile("test-profile"),
+// )
+// if err != nil {
+// panic(fmt.Sprintf("failed loading config, %v", err))
+// }
+//
+//
+// The default configuration sources are:
+// * Environment Variables
+// * Shared Configuration and Shared Credentials files.
+func LoadDefaultConfig(ctx context.Context, optFns ...func(*LoadOptions) error) (cfg aws.Config, err error) {
+ var options LoadOptions
+ for _, optFn := range optFns {
+ optFn(&options)
+ }
+
+ // assign Load Options to configs
+ var cfgCpy = configs{options}
+
+ cfgCpy, err = cfgCpy.AppendFromLoaders(ctx, defaultLoaders)
+ if err != nil {
+ return aws.Config{}, err
+ }
+
+ cfg, err = cfgCpy.ResolveAWSConfig(ctx, defaultAWSConfigResolvers)
+ if err != nil {
+ return aws.Config{}, err
+ }
+
+ return cfg, nil
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/config/doc.go
new file mode 100644
index 00000000..31648ffb
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/config/doc.go
@@ -0,0 +1,20 @@
+// Package config provides utilities for loading configuration from multiple
+// sources that can be used to configure the SDK's API clients, and utilities.
+//
+// The config package will load configuration from environment variables, AWS
+// shared configuration file (~/.aws/config), and AWS shared credentials file
+// (~/.aws/credentials).
+//
+// Use the LoadDefaultConfig to load configuration from all the SDK's supported
+// sources, and resolve credentials using the SDK's default credential chain.
+//
+// LoadDefaultConfig allows for a variadic list of additional Config sources that can
+// provide one or more configuration values which can be used to programmatically control the resolution
+// of a specific value, or allow for broader range of additional configuration sources not supported by the SDK.
+// A Config source implements one or more provider interfaces defined in this package. Config sources passed in will
+// take precedence over the default environment and shared config sources used by the SDK. If one or more Config sources
+// implement the same provider interface, priority will be handled by the order in which the sources were passed in.
+//
+// A number of helpers (prefixed by ``With``) are provided in this package that implement their respective provider
+// interface. These helpers should be used for overriding configuration programmatically at runtime.
+package config
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/env_config.go b/vendor/github.com/aws/aws-sdk-go-v2/config/env_config.go
new file mode 100644
index 00000000..4871dc61
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/config/env_config.go
@@ -0,0 +1,481 @@
+package config
+
+import (
+ "bytes"
+ "context"
+ "fmt"
+ "github.com/aws/aws-sdk-go-v2/feature/ec2/imds"
+ "io"
+ "io/ioutil"
+ "os"
+ "strings"
+
+ "github.com/aws/aws-sdk-go-v2/aws"
+)
+
+// CredentialsSourceName provides a name of the provider when config is
+// loaded from environment.
+const CredentialsSourceName = "EnvConfigCredentials"
+
+// Environment variables that will be read for configuration values.
+const (
+ awsAccessKeyIDEnvVar = "AWS_ACCESS_KEY_ID"
+ awsAccessKeyEnvVar = "AWS_ACCESS_KEY"
+
+ awsSecretAccessKeyEnvVar = "AWS_SECRET_ACCESS_KEY"
+ awsSecretKeyEnvVar = "AWS_SECRET_KEY"
+
+ awsSessionTokenEnvVar = "AWS_SESSION_TOKEN"
+
+ awsContainerCredentialsEndpointEnvVar = "AWS_CONTAINER_CREDENTIALS_FULL_URI"
+ awsContainerCredentialsRelativePathEnvVar = "AWS_CONTAINER_CREDENTIALS_RELATIVE_URI"
+ awsContainerPProviderAuthorizationEnvVar = "AWS_CONTAINER_AUTHORIZATION_TOKEN"
+
+ awsRegionEnvVar = "AWS_REGION"
+ awsDefaultRegionEnvVar = "AWS_DEFAULT_REGION"
+
+ awsProfileEnvVar = "AWS_PROFILE"
+ awsDefaultProfileEnvVar = "AWS_DEFAULT_PROFILE"
+
+ awsSharedCredentialsFileEnvVar = "AWS_SHARED_CREDENTIALS_FILE"
+
+ awsConfigFileEnvVar = "AWS_CONFIG_FILE"
+
+ awsCustomCABundleEnvVar = "AWS_CA_BUNDLE"
+
+ awsWebIdentityTokenFilePathEnvVar = "AWS_WEB_IDENTITY_TOKEN_FILE"
+
+ awsRoleARNEnvVar = "AWS_ROLE_ARN"
+ awsRoleSessionNameEnvVar = "AWS_ROLE_SESSION_NAME"
+
+ awsEnableEndpointDiscoveryEnvVar = "AWS_ENABLE_ENDPOINT_DISCOVERY"
+
+ awsS3UseARNRegionEnvVar = "AWS_S3_USE_ARN_REGION"
+
+ awsEc2MetadataServiceEndpointModeEnvVar = "AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE"
+
+ awsEc2MetadataServiceEndpointEnvVar = "AWS_EC2_METADATA_SERVICE_ENDPOINT"
+
+ awsEc2MetadataDisabled = "AWS_EC2_METADATA_DISABLED"
+
+ awsS3DisableMultiRegionAccessPointEnvVar = "AWS_S3_DISABLE_MULTIREGION_ACCESS_POINTS"
+)
+
+var (
+ credAccessEnvKeys = []string{
+ awsAccessKeyIDEnvVar,
+ awsAccessKeyEnvVar,
+ }
+ credSecretEnvKeys = []string{
+ awsSecretAccessKeyEnvVar,
+ awsSecretKeyEnvVar,
+ }
+ regionEnvKeys = []string{
+ awsRegionEnvVar,
+ awsDefaultRegionEnvVar,
+ }
+ profileEnvKeys = []string{
+ awsProfileEnvVar,
+ awsDefaultProfileEnvVar,
+ }
+)
+
+// EnvConfig is a collection of environment values the SDK will read
+// setup config from. All environment values are optional. But some values
+// such as credentials require multiple values to be complete or the values
+// will be ignored.
+type EnvConfig struct {
+ // Environment configuration values. If set both Access Key ID and Secret Access
+ // Key must be provided. Session Token and optionally also be provided, but is
+ // not required.
+ //
+ // # Access Key ID
+ // AWS_ACCESS_KEY_ID=AKID
+ // AWS_ACCESS_KEY=AKID # only read if AWS_ACCESS_KEY_ID is not set.
+ //
+ // # Secret Access Key
+ // AWS_SECRET_ACCESS_KEY=SECRET
+ // AWS_SECRET_KEY=SECRET # only read if AWS_SECRET_ACCESS_KEY is not set.
+ //
+ // # Session Token
+ // AWS_SESSION_TOKEN=TOKEN
+ Credentials aws.Credentials
+
+ // ContainerCredentialsEndpoint value is the HTTP enabled endpoint to retrieve credentials
+ // using the endpointcreds.Provider
+ ContainerCredentialsEndpoint string
+
+ // ContainerCredentialsRelativePath is the relative URI path that will be used when attempting to retrieve
+ // credentials from the container endpoint.
+ ContainerCredentialsRelativePath string
+
+ // ContainerAuthorizationToken is the authorization token that will be included in the HTTP Authorization
+ // header when attempting to retrieve credentials from the container credentials endpoint.
+ ContainerAuthorizationToken string
+
+ // Region value will instruct the SDK where to make service API requests to. If is
+ // not provided in the environment the region must be provided before a service
+ // client request is made.
+ //
+ // AWS_REGION=us-west-2
+ // AWS_DEFAULT_REGION=us-west-2
+ Region string
+
+ // Profile name the SDK should load use when loading shared configuration from the
+ // shared configuration files. If not provided "default" will be used as the
+ // profile name.
+ //
+ // AWS_PROFILE=my_profile
+ // AWS_DEFAULT_PROFILE=my_profile
+ SharedConfigProfile string
+
+ // Shared credentials file path can be set to instruct the SDK to use an alternate
+ // file for the shared credentials. If not set the file will be loaded from
+ // $HOME/.aws/credentials on Linux/Unix based systems, and
+ // %USERPROFILE%\.aws\credentials on Windows.
+ //
+ // AWS_SHARED_CREDENTIALS_FILE=$HOME/my_shared_credentials
+ SharedCredentialsFile string
+
+ // Shared config file path can be set to instruct the SDK to use an alternate
+ // file for the shared config. If not set the file will be loaded from
+ // $HOME/.aws/config on Linux/Unix based systems, and
+ // %USERPROFILE%\.aws\config on Windows.
+ //
+ // AWS_CONFIG_FILE=$HOME/my_shared_config
+ SharedConfigFile string
+
+ // Sets the path to a custom Credentials Authority (CA) Bundle PEM file
+ // that the SDK will use instead of the system's root CA bundle.
+ // Only use this if you want to configure the SDK to use a custom set
+ // of CAs.
+ //
+ // Enabling this option will attempt to merge the Transport
+ // into the SDK's HTTP client. If the client's Transport is
+ // not a http.Transport an error will be returned. If the
+ // Transport's TLS config is set this option will cause the
+ // SDK to overwrite the Transport's TLS config's RootCAs value.
+ //
+ // Setting a custom HTTPClient in the aws.Config options will override this setting.
+ // To use this option and custom HTTP client, the HTTP client needs to be provided
+ // when creating the config. Not the service client.
+ //
+ // AWS_CA_BUNDLE=$HOME/my_custom_ca_bundle
+ CustomCABundle string
+
+ // Enables endpoint discovery via environment variables.
+ //
+ // AWS_ENABLE_ENDPOINT_DISCOVERY=true
+ EnableEndpointDiscovery aws.EndpointDiscoveryEnableState
+
+ // Specifies the WebIdentity token the SDK should use to assume a role
+ // with.
+ //
+ // AWS_WEB_IDENTITY_TOKEN_FILE=file_path
+ WebIdentityTokenFilePath string
+
+ // Specifies the IAM role arn to use when assuming an role.
+ //
+ // AWS_ROLE_ARN=role_arn
+ RoleARN string
+
+ // Specifies the IAM role session name to use when assuming a role.
+ //
+ // AWS_ROLE_SESSION_NAME=session_name
+ RoleSessionName string
+
+ // Specifies if the S3 service should allow ARNs to direct the region
+ // the client's requests are sent to.
+ //
+ // AWS_S3_USE_ARN_REGION=true
+ S3UseARNRegion *bool
+
+ // Specifies if the EC2 IMDS service client is enabled.
+ //
+ // AWS_EC2_METADATA_DISABLED=true
+ EC2IMDSClientEnableState imds.ClientEnableState
+
+ // Specifies the EC2 Instance Metadata Service default endpoint selection mode (IPv4 or IPv6)
+ //
+ // AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE=IPv6
+ EC2IMDSEndpointMode imds.EndpointModeState
+
+ // Specifies the EC2 Instance Metadata Service endpoint to use. If specified it overrides EC2IMDSEndpointMode.
+ //
+ // AWS_EC2_METADATA_SERVICE_ENDPOINT=http://fd00:ec2::254
+ EC2IMDSEndpoint string
+
+ // Specifies if the S3 service should disable multi-region access points
+ // support.
+ //
+ // AWS_S3_DISABLE_MULTIREGION_ACCESS_POINTS=true
+ S3DisableMultiRegionAccessPoints *bool
+}
+
+// loadEnvConfig reads configuration values from the OS's environment variables.
+// Returning the a Config typed EnvConfig to satisfy the ConfigLoader func type.
+func loadEnvConfig(ctx context.Context, cfgs configs) (Config, error) {
+ return NewEnvConfig()
+}
+
+// NewEnvConfig retrieves the SDK's environment configuration.
+// See `EnvConfig` for the values that will be retrieved.
+func NewEnvConfig() (EnvConfig, error) {
+ var cfg EnvConfig
+
+ creds := aws.Credentials{
+ Source: CredentialsSourceName,
+ }
+ setStringFromEnvVal(&creds.AccessKeyID, credAccessEnvKeys)
+ setStringFromEnvVal(&creds.SecretAccessKey, credSecretEnvKeys)
+ if creds.HasKeys() {
+ creds.SessionToken = os.Getenv(awsSessionTokenEnvVar)
+ cfg.Credentials = creds
+ }
+
+ cfg.ContainerCredentialsEndpoint = os.Getenv(awsContainerCredentialsEndpointEnvVar)
+ cfg.ContainerCredentialsRelativePath = os.Getenv(awsContainerCredentialsRelativePathEnvVar)
+ cfg.ContainerAuthorizationToken = os.Getenv(awsContainerPProviderAuthorizationEnvVar)
+
+ setStringFromEnvVal(&cfg.Region, regionEnvKeys)
+ setStringFromEnvVal(&cfg.SharedConfigProfile, profileEnvKeys)
+
+ cfg.SharedCredentialsFile = os.Getenv(awsSharedCredentialsFileEnvVar)
+ cfg.SharedConfigFile = os.Getenv(awsConfigFileEnvVar)
+
+ cfg.CustomCABundle = os.Getenv(awsCustomCABundleEnvVar)
+
+ cfg.WebIdentityTokenFilePath = os.Getenv(awsWebIdentityTokenFilePathEnvVar)
+
+ cfg.RoleARN = os.Getenv(awsRoleARNEnvVar)
+ cfg.RoleSessionName = os.Getenv(awsRoleSessionNameEnvVar)
+
+ if err := setEndpointDiscoveryTypeFromEnvVal(&cfg.EnableEndpointDiscovery, []string{awsEnableEndpointDiscoveryEnvVar}); err != nil {
+ return cfg, err
+ }
+
+ if err := setBoolPtrFromEnvVal(&cfg.S3UseARNRegion, []string{awsS3UseARNRegionEnvVar}); err != nil {
+ return cfg, err
+ }
+
+ setEC2IMDSClientEnableState(&cfg.EC2IMDSClientEnableState, []string{awsEc2MetadataDisabled})
+ if err := setEC2IMDSEndpointMode(&cfg.EC2IMDSEndpointMode, []string{awsEc2MetadataServiceEndpointModeEnvVar}); err != nil {
+ return cfg, err
+ }
+ cfg.EC2IMDSEndpoint = os.Getenv(awsEc2MetadataServiceEndpointEnvVar)
+
+ if err := setBoolPtrFromEnvVal(&cfg.S3DisableMultiRegionAccessPoints, []string{awsS3DisableMultiRegionAccessPointEnvVar}); err != nil {
+ return cfg, err
+ }
+
+ return cfg, nil
+}
+
+func setEC2IMDSClientEnableState(state *imds.ClientEnableState, keys []string) {
+ for _, k := range keys {
+ value := os.Getenv(k)
+ if len(value) == 0 {
+ continue
+ }
+ switch {
+ case strings.EqualFold(value, "true"):
+ *state = imds.ClientDisabled
+ case strings.EqualFold(value, "false"):
+ *state = imds.ClientEnabled
+ default:
+ continue
+ }
+ break
+ }
+}
+
+func setEC2IMDSEndpointMode(mode *imds.EndpointModeState, keys []string) error {
+ for _, k := range keys {
+ value := os.Getenv(k)
+ if len(value) == 0 {
+ continue
+ }
+ if err := mode.SetFromString(value); err != nil {
+ return fmt.Errorf("invalid value for environment variable, %s=%s, %v", k, value, err)
+ }
+ }
+ return nil
+}
+
+// GetRegion returns the AWS Region if set in the environment. Returns an empty
+// string if not set.
+func (c EnvConfig) getRegion(ctx context.Context) (string, bool, error) {
+ if len(c.Region) == 0 {
+ return "", false, nil
+ }
+ return c.Region, true, nil
+}
+
+// GetSharedConfigProfile returns the shared config profile if set in the
+// environment. Returns an empty string if not set.
+func (c EnvConfig) getSharedConfigProfile(ctx context.Context) (string, bool, error) {
+ if len(c.SharedConfigProfile) == 0 {
+ return "", false, nil
+ }
+
+ return c.SharedConfigProfile, true, nil
+}
+
+// getSharedConfigFiles returns a slice of filenames set in the environment.
+//
+// Will return the filenames in the order of:
+// * Shared Config
+func (c EnvConfig) getSharedConfigFiles(context.Context) ([]string, bool, error) {
+ var files []string
+ if v := c.SharedConfigFile; len(v) > 0 {
+ files = append(files, v)
+ }
+
+ if len(files) == 0 {
+ return nil, false, nil
+ }
+ return files, true, nil
+}
+
+// getSharedCredentialsFiles returns a slice of filenames set in the environment.
+//
+// Will return the filenames in the order of:
+// * Shared Credentials
+func (c EnvConfig) getSharedCredentialsFiles(context.Context) ([]string, bool, error) {
+ var files []string
+ if v := c.SharedCredentialsFile; len(v) > 0 {
+ files = append(files, v)
+ }
+ if len(files) == 0 {
+ return nil, false, nil
+ }
+ return files, true, nil
+}
+
+// GetCustomCABundle returns the custom CA bundle's PEM bytes if the file was
+func (c EnvConfig) getCustomCABundle(context.Context) (io.Reader, bool, error) {
+ if len(c.CustomCABundle) == 0 {
+ return nil, false, nil
+ }
+
+ b, err := ioutil.ReadFile(c.CustomCABundle)
+ if err != nil {
+ return nil, false, err
+ }
+ return bytes.NewReader(b), true, nil
+}
+
+// GetS3UseARNRegion returns whether to allow ARNs to direct the region
+// the S3 client's requests are sent to.
+func (c EnvConfig) GetS3UseARNRegion(ctx context.Context) (value, ok bool, err error) {
+ if c.S3UseARNRegion == nil {
+ return false, false, nil
+ }
+
+ return *c.S3UseARNRegion, true, nil
+}
+
+// GetS3DisableMultRegionAccessPoints returns whether to disable multi-region access point
+// support for the S3 client.
+func (c EnvConfig) GetS3DisableMultRegionAccessPoints(ctx context.Context) (value, ok bool, err error) {
+ if c.S3DisableMultiRegionAccessPoints == nil {
+ return false, false, nil
+ }
+
+ return *c.S3DisableMultiRegionAccessPoints, true, nil
+}
+
+func setStringFromEnvVal(dst *string, keys []string) {
+ for _, k := range keys {
+ if v := os.Getenv(k); len(v) > 0 {
+ *dst = v
+ break
+ }
+ }
+}
+
+func setBoolPtrFromEnvVal(dst **bool, keys []string) error {
+ for _, k := range keys {
+ value := os.Getenv(k)
+ if len(value) == 0 {
+ continue
+ }
+
+ if *dst == nil {
+ *dst = new(bool)
+ }
+
+ switch {
+ case strings.EqualFold(value, "false"):
+ **dst = false
+ case strings.EqualFold(value, "true"):
+ **dst = true
+ default:
+ return fmt.Errorf(
+ "invalid value for environment variable, %s=%s, need true or false",
+ k, value)
+ }
+ break
+ }
+
+ return nil
+}
+
+func setEndpointDiscoveryTypeFromEnvVal(dst *aws.EndpointDiscoveryEnableState, keys []string) error {
+ for _, k := range keys {
+ value := os.Getenv(k)
+ if len(value) == 0 {
+ continue // skip if empty
+ }
+
+ switch {
+ case strings.EqualFold(value, endpointDiscoveryDisabled):
+ *dst = aws.EndpointDiscoveryDisabled
+ case strings.EqualFold(value, endpointDiscoveryEnabled):
+ *dst = aws.EndpointDiscoveryEnabled
+ case strings.EqualFold(value, endpointDiscoveryAuto):
+ *dst = aws.EndpointDiscoveryAuto
+ default:
+ return fmt.Errorf(
+ "invalid value for environment variable, %s=%s, need true, false or auto",
+ k, value)
+ }
+ }
+ return nil
+}
+
+// GetEnableEndpointDiscovery returns resolved value for EnableEndpointDiscovery env variable setting.
+func (c EnvConfig) GetEnableEndpointDiscovery(ctx context.Context) (value aws.EndpointDiscoveryEnableState, found bool, err error) {
+ if c.EnableEndpointDiscovery == aws.EndpointDiscoveryUnset {
+ return aws.EndpointDiscoveryUnset, false, nil
+ }
+
+ return c.EnableEndpointDiscovery, true, nil
+}
+
+// GetEC2IMDSClientEnableState implements a EC2IMDSClientEnableState options resolver interface.
+func (c EnvConfig) GetEC2IMDSClientEnableState() (imds.ClientEnableState, bool, error) {
+ if c.EC2IMDSClientEnableState == imds.ClientDefaultEnableState {
+ return imds.ClientDefaultEnableState, false, nil
+ }
+
+ return c.EC2IMDSClientEnableState, true, nil
+}
+
+// GetEC2IMDSEndpointMode implements a EC2IMDSEndpointMode option resolver interface.
+func (c EnvConfig) GetEC2IMDSEndpointMode() (imds.EndpointModeState, bool, error) {
+ if c.EC2IMDSEndpointMode == imds.EndpointModeStateUnset {
+ return imds.EndpointModeStateUnset, false, nil
+ }
+
+ return c.EC2IMDSEndpointMode, true, nil
+}
+
+// GetEC2IMDSEndpoint implements a EC2IMDSEndpoint option resolver interface.
+func (c EnvConfig) GetEC2IMDSEndpoint() (string, bool, error) {
+ if len(c.EC2IMDSEndpoint) == 0 {
+ return "", false, nil
+ }
+
+ return c.EC2IMDSEndpoint, true, nil
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/generate.go b/vendor/github.com/aws/aws-sdk-go-v2/config/generate.go
new file mode 100644
index 00000000..654a7a77
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/config/generate.go
@@ -0,0 +1,4 @@
+package config
+
+//go:generate go run -tags codegen ./codegen -output=provider_assert_test.go
+//go:generate gofmt -s -w ./
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/go.mod b/vendor/github.com/aws/aws-sdk-go-v2/config/go.mod
new file mode 100644
index 00000000..d7a3e83c
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/config/go.mod
@@ -0,0 +1,28 @@
+module github.com/aws/aws-sdk-go-v2/config
+
+go 1.15
+
+require (
+ github.com/aws/aws-sdk-go-v2 v1.9.1
+ github.com/aws/aws-sdk-go-v2/credentials v1.4.2
+ github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.5.1
+ github.com/aws/aws-sdk-go-v2/internal/ini v1.2.3
+ github.com/aws/aws-sdk-go-v2/service/sso v1.4.1
+ github.com/aws/aws-sdk-go-v2/service/sts v1.7.1
+ github.com/aws/smithy-go v1.8.0
+ github.com/google/go-cmp v0.5.6
+)
+
+replace github.com/aws/aws-sdk-go-v2 => ../
+
+replace github.com/aws/aws-sdk-go-v2/credentials => ../credentials/
+
+replace github.com/aws/aws-sdk-go-v2/feature/ec2/imds => ../feature/ec2/imds/
+
+replace github.com/aws/aws-sdk-go-v2/internal/ini => ../internal/ini/
+
+replace github.com/aws/aws-sdk-go-v2/service/internal/presigned-url => ../service/internal/presigned-url/
+
+replace github.com/aws/aws-sdk-go-v2/service/sso => ../service/sso/
+
+replace github.com/aws/aws-sdk-go-v2/service/sts => ../service/sts/
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/go.sum b/vendor/github.com/aws/aws-sdk-go-v2/config/go.sum
new file mode 100644
index 00000000..779915f8
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/config/go.sum
@@ -0,0 +1,14 @@
+github.com/aws/smithy-go v1.8.0 h1:AEwwwXQZtUwP5Mz506FeXXrKBe0jA8gVM+1gEcSRooc=
+github.com/aws/smithy-go v1.8.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E=
+github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ=
+github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo=
+github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U=
+github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
+github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
+golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
+golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/config/go_module_metadata.go
new file mode 100644
index 00000000..384efd01
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/config/go_module_metadata.go
@@ -0,0 +1,6 @@
+// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT.
+
+package config
+
+// goModuleVersion is the tagged release for this module
+const goModuleVersion = "1.8.2"
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/load_options.go b/vendor/github.com/aws/aws-sdk-go-v2/config/load_options.go
new file mode 100644
index 00000000..ae8cafb9
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/config/load_options.go
@@ -0,0 +1,706 @@
+package config
+
+import (
+ "context"
+ "io"
+
+ "github.com/aws/aws-sdk-go-v2/aws"
+ "github.com/aws/aws-sdk-go-v2/credentials/ec2rolecreds"
+ "github.com/aws/aws-sdk-go-v2/credentials/endpointcreds"
+ "github.com/aws/aws-sdk-go-v2/credentials/processcreds"
+ "github.com/aws/aws-sdk-go-v2/credentials/ssocreds"
+ "github.com/aws/aws-sdk-go-v2/credentials/stscreds"
+ "github.com/aws/aws-sdk-go-v2/feature/ec2/imds"
+ "github.com/aws/smithy-go/logging"
+ "github.com/aws/smithy-go/middleware"
+)
+
+// LoadOptionsFunc is a type alias for LoadOptions functional option
+type LoadOptionsFunc func(*LoadOptions) error
+
+// LoadOptions are discrete set of options that are valid for loading the configuration
+type LoadOptions struct {
+
+ // Region is the region to send requests to.
+ Region string
+
+ // Credentials object to use when signing requests.
+ Credentials aws.CredentialsProvider
+
+ // HTTPClient the SDK's API clients will use to invoke HTTP requests.
+ HTTPClient HTTPClient
+
+ // EndpointResolver that can be used to provide or override an endpoint for the given
+ // service and region Please see the `aws.EndpointResolver` documentation on usage.
+ EndpointResolver aws.EndpointResolver
+
+ // Retryer is a function that provides a Retryer implementation. A Retryer guides how HTTP requests should be
+ // retried in case of recoverable failures.
+ Retryer func() aws.Retryer
+
+ // APIOptions provides the set of middleware mutations modify how the API
+ // client requests will be handled. This is useful for adding additional
+ // tracing data to a request, or changing behavior of the SDK's client.
+ APIOptions []func(*middleware.Stack) error
+
+ // Logger writer interface to write logging messages to.
+ Logger logging.Logger
+
+ // ClientLogMode is used to configure the events that will be sent to the configured logger.
+ // This can be used to configure the logging of signing, retries, request, and responses
+ // of the SDK clients.
+ //
+ // See the ClientLogMode type documentation for the complete set of logging modes and available
+ // configuration.
+ ClientLogMode *aws.ClientLogMode
+
+ // SharedConfigProfile is the profile to be used when loading the SharedConfig
+ SharedConfigProfile string
+
+ // SharedConfigFiles is the slice of custom shared config files to use when loading the SharedConfig.
+ // A non-default profile used within config file must have name defined with prefix 'profile '.
+ // eg [profile xyz] indicates a profile with name 'xyz'.
+ // To read more on the format of the config file, please refer the documentation at
+ // https://docs.aws.amazon.com/credref/latest/refdocs/file-format.html#file-format-config
+ //
+ // If duplicate profiles are provided within the same, or across multiple shared config files, the next parsed
+ // profile will override only the properties that conflict with the previously defined profile.
+ // Note that if duplicate profiles are provided within the SharedCredentialsFiles and SharedConfigFiles,
+ // the properties defined in shared credentials file take precedence.
+ SharedConfigFiles []string
+
+ // SharedCredentialsFile is the slice of custom shared credentials files to use when loading the SharedConfig.
+ // The profile name used within credentials file must not prefix 'profile '.
+ // eg [xyz] indicates a profile with name 'xyz'. Profile declared as [profile xyz] will be ignored.
+ // To read more on the format of the credentials file, please refer the documentation at
+ // https://docs.aws.amazon.com/credref/latest/refdocs/file-format.html#file-format-creds
+ //
+ // If duplicate profiles are provided with a same, or across multiple shared credentials files, the next parsed
+ // profile will override only properties that conflict with the previously defined profile.
+ // Note that if duplicate profiles are provided within the SharedCredentialsFiles and SharedConfigFiles,
+ // the properties defined in shared credentials file take precedence.
+ SharedCredentialsFiles []string
+
+ // CustomCABundle is CA bundle PEM bytes reader
+ CustomCABundle io.Reader
+
+ // DefaultRegion is the fall back region, used if a region was not resolved from other sources
+ DefaultRegion string
+
+ // UseEC2IMDSRegion indicates if SDK should retrieve the region
+ // from the EC2 Metadata service
+ UseEC2IMDSRegion *UseEC2IMDSRegion
+
+ // ProcessCredentialOptions is a function for setting
+ // the processcreds.Options
+ ProcessCredentialOptions func(*processcreds.Options)
+
+ // EC2RoleCredentialOptions is a function for setting
+ // the ec2rolecreds.Options
+ EC2RoleCredentialOptions func(*ec2rolecreds.Options)
+
+ // EndpointCredentialOptions is a function for setting
+ // the endpointcreds.Options
+ EndpointCredentialOptions func(*endpointcreds.Options)
+
+ // WebIdentityRoleCredentialOptions is a function for setting
+ // the stscreds.WebIdentityRoleOptions
+ WebIdentityRoleCredentialOptions func(*stscreds.WebIdentityRoleOptions)
+
+ // AssumeRoleCredentialOptions is a function for setting the
+ // stscreds.AssumeRoleOptions
+ AssumeRoleCredentialOptions func(*stscreds.AssumeRoleOptions)
+
+ // SSOProviderOptions is a function for setting
+ // the ssocreds.Options
+ SSOProviderOptions func(options *ssocreds.Options)
+
+ // LogConfigurationWarnings when set to true, enables logging
+ // configuration warnings
+ LogConfigurationWarnings *bool
+
+ // S3UseARNRegion specifies if the S3 service should allow ARNs to direct
+ // the region, the client's requests are sent to.
+ S3UseARNRegion *bool
+
+ // EnableEndpointDiscovery specifies if endpoint discovery is enable for
+ // the client.
+ EnableEndpointDiscovery aws.EndpointDiscoveryEnableState
+
+ // Specifies if the EC2 IMDS service client is enabled.
+ //
+ // AWS_EC2_METADATA_DISABLED=true
+ EC2IMDSClientEnableState imds.ClientEnableState
+
+ // Specifies the EC2 Instance Metadata Service default endpoint selection mode (IPv4 or IPv6)
+ EC2IMDSEndpointMode imds.EndpointModeState
+
+ // Specifies the EC2 Instance Metadata Service endpoint to use. If specified it overrides EC2IMDSEndpointMode.
+ EC2IMDSEndpoint string
+}
+
+// getRegion returns Region from config's LoadOptions
+func (o LoadOptions) getRegion(ctx context.Context) (string, bool, error) {
+ if len(o.Region) == 0 {
+ return "", false, nil
+ }
+
+ return o.Region, true, nil
+}
+
+// WithRegion is a helper function to construct functional options
+// that sets Region on config's LoadOptions. Setting the region to
+// an empty string, will result in the region value being ignored.
+// If multiple WithRegion calls are made, the last call overrides
+// the previous call values.
+func WithRegion(v string) LoadOptionsFunc {
+ return func(o *LoadOptions) error {
+ o.Region = v
+ return nil
+ }
+}
+
+// getDefaultRegion returns DefaultRegion from config's LoadOptions
+func (o LoadOptions) getDefaultRegion(ctx context.Context) (string, bool, error) {
+ if len(o.DefaultRegion) == 0 {
+ return "", false, nil
+ }
+
+ return o.DefaultRegion, true, nil
+}
+
+// WithDefaultRegion is a helper function to construct functional options
+// that sets a DefaultRegion on config's LoadOptions. Setting the default
+// region to an empty string, will result in the default region value
+// being ignored. If multiple WithDefaultRegion calls are made, the last
+// call overrides the previous call values. Note that both WithRegion and
+// WithEC2IMDSRegion call takes precedence over WithDefaultRegion call
+// when resolving region.
+func WithDefaultRegion(v string) LoadOptionsFunc {
+ return func(o *LoadOptions) error {
+ o.DefaultRegion = v
+ return nil
+ }
+}
+
+// getSharedConfigProfile returns SharedConfigProfile from config's LoadOptions
+func (o LoadOptions) getSharedConfigProfile(ctx context.Context) (string, bool, error) {
+ if len(o.SharedConfigProfile) == 0 {
+ return "", false, nil
+ }
+
+ return o.SharedConfigProfile, true, nil
+}
+
+// WithSharedConfigProfile is a helper function to construct functional options
+// that sets SharedConfigProfile on config's LoadOptions. Setting the shared
+// config profile to an empty string, will result in the shared config profile
+// value being ignored.
+// If multiple WithSharedConfigProfile calls are made, the last call overrides
+// the previous call values.
+func WithSharedConfigProfile(v string) LoadOptionsFunc {
+ return func(o *LoadOptions) error {
+ o.SharedConfigProfile = v
+ return nil
+ }
+}
+
+// getSharedConfigFiles returns SharedConfigFiles set on config's LoadOptions
+func (o LoadOptions) getSharedConfigFiles(ctx context.Context) ([]string, bool, error) {
+ if o.SharedConfigFiles == nil {
+ return nil, false, nil
+ }
+
+ return o.SharedConfigFiles, true, nil
+}
+
+// WithSharedConfigFiles is a helper function to construct functional options
+// that sets slice of SharedConfigFiles on config's LoadOptions.
+// Setting the shared config files to an nil string slice, will result in the
+// shared config files value being ignored.
+// If multiple WithSharedConfigFiles calls are made, the last call overrides
+// the previous call values.
+func WithSharedConfigFiles(v []string) LoadOptionsFunc {
+ return func(o *LoadOptions) error {
+ o.SharedConfigFiles = v
+ return nil
+ }
+}
+
+// getSharedCredentialsFiles returns SharedCredentialsFiles set on config's LoadOptions
+func (o LoadOptions) getSharedCredentialsFiles(ctx context.Context) ([]string, bool, error) {
+ if o.SharedCredentialsFiles == nil {
+ return nil, false, nil
+ }
+
+ return o.SharedCredentialsFiles, true, nil
+}
+
+// WithSharedCredentialsFiles is a helper function to construct functional options
+// that sets slice of SharedCredentialsFiles on config's LoadOptions.
+// Setting the shared credentials files to an nil string slice, will result in the
+// shared credentials files value being ignored.
+// If multiple WithSharedCredentialsFiles calls are made, the last call overrides
+// the previous call values.
+func WithSharedCredentialsFiles(v []string) LoadOptionsFunc {
+ return func(o *LoadOptions) error {
+ o.SharedCredentialsFiles = v
+ return nil
+ }
+}
+
+// getCustomCABundle returns CustomCABundle from LoadOptions
+func (o LoadOptions) getCustomCABundle(ctx context.Context) (io.Reader, bool, error) {
+ if o.CustomCABundle == nil {
+ return nil, false, nil
+ }
+
+ return o.CustomCABundle, true, nil
+}
+
+// WithCustomCABundle is a helper function to construct functional options
+// that sets CustomCABundle on config's LoadOptions. Setting the custom CA Bundle
+// to nil will result in custom CA Bundle value being ignored.
+// If multiple WithCustomCABundle calls are made, the last call overrides the
+// previous call values.
+func WithCustomCABundle(v io.Reader) LoadOptionsFunc {
+ return func(o *LoadOptions) error {
+ o.CustomCABundle = v
+ return nil
+ }
+}
+
+// UseEC2IMDSRegion provides a regionProvider that retrieves the region
+// from the EC2 Metadata service.
+type UseEC2IMDSRegion struct {
+ // If unset will default to generic EC2 IMDS client.
+ Client *imds.Client
+}
+
+// getRegion attempts to retrieve the region from EC2 Metadata service.
+func (p *UseEC2IMDSRegion) getRegion(ctx context.Context) (string, bool, error) {
+ if ctx == nil {
+ ctx = context.Background()
+ }
+
+ client := p.Client
+ if client == nil {
+ client = imds.New(imds.Options{})
+ }
+
+ result, err := client.GetRegion(ctx, nil)
+ if err != nil {
+ return "", false, err
+ }
+ if len(result.Region) != 0 {
+ return result.Region, true, nil
+ }
+ return "", false, nil
+}
+
+// getEC2IMDSRegion returns the value of EC2 IMDS region.
+func (o LoadOptions) getEC2IMDSRegion(ctx context.Context) (string, bool, error) {
+ if o.UseEC2IMDSRegion == nil {
+ return "", false, nil
+ }
+
+ return o.UseEC2IMDSRegion.getRegion(ctx)
+}
+
+// WithEC2IMDSRegion is a helper function to construct functional options
+// that enables resolving EC2IMDS region. The function takes
+// in a UseEC2IMDSRegion functional option, and can be used to set the
+// EC2IMDS client which will be used to resolve EC2IMDSRegion.
+// If no functional option is provided, an EC2IMDS client is built and used
+// by the resolver. If multiple WithEC2IMDSRegion calls are made, the last
+// call overrides the previous call values. Note that the WithRegion calls takes
+// precedence over WithEC2IMDSRegion when resolving region.
+func WithEC2IMDSRegion(fnOpts ...func(o *UseEC2IMDSRegion)) LoadOptionsFunc {
+ return func(o *LoadOptions) error {
+ o.UseEC2IMDSRegion = &UseEC2IMDSRegion{}
+
+ for _, fn := range fnOpts {
+ fn(o.UseEC2IMDSRegion)
+ }
+ return nil
+ }
+}
+
+// getCredentialsProvider returns the credentials value
+func (o LoadOptions) getCredentialsProvider(ctx context.Context) (aws.CredentialsProvider, bool, error) {
+ if o.Credentials == nil {
+ return nil, false, nil
+ }
+
+ return o.Credentials, true, nil
+}
+
+// WithCredentialsProvider is a helper function to construct functional options
+// that sets Credential provider value on config's LoadOptions. If credentials
+// provider is set to nil, the credentials provider value will be ignored.
+// If multiple WithCredentialsProvider calls are made, the last call overrides
+// the previous call values.
+func WithCredentialsProvider(v aws.CredentialsProvider) LoadOptionsFunc {
+ return func(o *LoadOptions) error {
+ o.Credentials = v
+ return nil
+ }
+}
+
+// getProcessCredentialOptions returns the wrapped function to set processcreds.Options
+func (o LoadOptions) getProcessCredentialOptions(ctx context.Context) (func(*processcreds.Options), bool, error) {
+ if o.ProcessCredentialOptions == nil {
+ return nil, false, nil
+ }
+
+ return o.ProcessCredentialOptions, true, nil
+}
+
+// WithProcessCredentialOptions is a helper function to construct functional options
+// that sets a function to use processcreds.Options on config's LoadOptions.
+// If process credential options is set to nil, the process credential value will
+// be ignored. If multiple WithProcessCredentialOptions calls are made, the last call
+// overrides the previous call values.
+func WithProcessCredentialOptions(v func(*processcreds.Options)) LoadOptionsFunc {
+ return func(o *LoadOptions) error {
+ o.ProcessCredentialOptions = v
+ return nil
+ }
+}
+
+// getEC2RoleCredentialOptions returns the wrapped function to set the ec2rolecreds.Options
+func (o LoadOptions) getEC2RoleCredentialOptions(ctx context.Context) (func(*ec2rolecreds.Options), bool, error) {
+ if o.EC2RoleCredentialOptions == nil {
+ return nil, false, nil
+ }
+
+ return o.EC2RoleCredentialOptions, true, nil
+}
+
+// WithEC2RoleCredentialOptions is a helper function to construct functional options
+// that sets a function to use ec2rolecreds.Options on config's LoadOptions. If
+// EC2 role credential options is set to nil, the EC2 role credential options value
+// will be ignored. If multiple WithEC2RoleCredentialOptions calls are made,
+// the last call overrides the previous call values.
+func WithEC2RoleCredentialOptions(v func(*ec2rolecreds.Options)) LoadOptionsFunc {
+ return func(o *LoadOptions) error {
+ o.EC2RoleCredentialOptions = v
+ return nil
+ }
+}
+
+// getEndpointCredentialOptions returns the wrapped function to set endpointcreds.Options
+func (o LoadOptions) getEndpointCredentialOptions(context.Context) (func(*endpointcreds.Options), bool, error) {
+ if o.EndpointCredentialOptions == nil {
+ return nil, false, nil
+ }
+
+ return o.EndpointCredentialOptions, true, nil
+}
+
+// WithEndpointCredentialOptions is a helper function to construct functional options
+// that sets a function to use endpointcreds.Options on config's LoadOptions. If
+// endpoint credential options is set to nil, the endpoint credential options
+// value will be ignored. If multiple WithEndpointCredentialOptions calls are made,
+// the last call overrides the previous call values.
+func WithEndpointCredentialOptions(v func(*endpointcreds.Options)) LoadOptionsFunc {
+ return func(o *LoadOptions) error {
+ o.EndpointCredentialOptions = v
+ return nil
+ }
+}
+
+// getWebIdentityRoleCredentialOptions returns the wrapped function
+func (o LoadOptions) getWebIdentityRoleCredentialOptions(context.Context) (func(*stscreds.WebIdentityRoleOptions), bool, error) {
+ if o.WebIdentityRoleCredentialOptions == nil {
+ return nil, false, nil
+ }
+
+ return o.WebIdentityRoleCredentialOptions, true, nil
+}
+
+// WithWebIdentityRoleCredentialOptions is a helper function to construct
+// functional options that sets a function to use stscreds.WebIdentityRoleOptions
+// on config's LoadOptions. If web identity role credentials options is set to nil,
+// the web identity role credentials value will be ignored. If multiple
+// WithWebIdentityRoleCredentialOptions calls are made, the last call
+// overrides the previous call values.
+func WithWebIdentityRoleCredentialOptions(v func(*stscreds.WebIdentityRoleOptions)) LoadOptionsFunc {
+ return func(o *LoadOptions) error {
+ o.WebIdentityRoleCredentialOptions = v
+ return nil
+ }
+}
+
+// getAssumeRoleCredentialOptions returns AssumeRoleCredentialOptions from LoadOptions
+func (o LoadOptions) getAssumeRoleCredentialOptions(context.Context) (func(options *stscreds.AssumeRoleOptions), bool, error) {
+ if o.AssumeRoleCredentialOptions == nil {
+ return nil, false, nil
+ }
+
+ return o.AssumeRoleCredentialOptions, true, nil
+}
+
+// WithAssumeRoleCredentialOptions is a helper function to construct
+// functional options that sets a function to use stscreds.AssumeRoleOptions
+// on config's LoadOptions. If assume role credentials options is set to nil,
+// the assume role credentials value will be ignored. If multiple
+// WithAssumeRoleCredentialOptions calls are made, the last call overrides
+// the previous call values.
+func WithAssumeRoleCredentialOptions(v func(*stscreds.AssumeRoleOptions)) LoadOptionsFunc {
+ return func(o *LoadOptions) error {
+ o.AssumeRoleCredentialOptions = v
+ return nil
+ }
+}
+
+func (o LoadOptions) getHTTPClient(ctx context.Context) (HTTPClient, bool, error) {
+ if o.HTTPClient == nil {
+ return nil, false, nil
+ }
+
+ return o.HTTPClient, true, nil
+}
+
+// WithHTTPClient is a helper function to construct functional options
+// that sets HTTPClient on LoadOptions. If HTTPClient is set to nil,
+// the HTTPClient value will be ignored.
+// If multiple WithHTTPClient calls are made, the last call overrides
+// the previous call values.
+func WithHTTPClient(v HTTPClient) LoadOptionsFunc {
+ return func(o *LoadOptions) error {
+ o.HTTPClient = v
+ return nil
+ }
+}
+
+func (o LoadOptions) getAPIOptions(ctx context.Context) ([]func(*middleware.Stack) error, bool, error) {
+ if o.APIOptions == nil {
+ return nil, false, nil
+ }
+
+ return o.APIOptions, true, nil
+}
+
+// WithAPIOptions is a helper function to construct functional options
+// that sets APIOptions on LoadOptions. If APIOptions is set to nil, the
+// APIOptions value is ignored. If multiple WithAPIOptions calls are
+// made, the last call overrides the previous call values.
+func WithAPIOptions(v []func(*middleware.Stack) error) LoadOptionsFunc {
+ return func(o *LoadOptions) error {
+ if v == nil {
+ return nil
+ }
+
+ o.APIOptions = append(o.APIOptions, v...)
+ return nil
+ }
+}
+
+func (o LoadOptions) getRetryer(ctx context.Context) (func() aws.Retryer, bool, error) {
+ if o.Retryer == nil {
+ return nil, false, nil
+ }
+
+ return o.Retryer, true, nil
+}
+
+// WithRetryer is a helper function to construct functional options
+// that sets Retryer on LoadOptions. If Retryer is set to nil, the
+// Retryer value is ignored. If multiple WithRetryer calls are
+// made, the last call overrides the previous call values.
+func WithRetryer(v func() aws.Retryer) LoadOptionsFunc {
+ return func(o *LoadOptions) error {
+ o.Retryer = v
+ return nil
+ }
+}
+
+func (o LoadOptions) getEndpointResolver(ctx context.Context) (aws.EndpointResolver, bool, error) {
+ if o.EndpointResolver == nil {
+ return nil, false, nil
+ }
+
+ return o.EndpointResolver, true, nil
+}
+
+// WithEndpointResolver is a helper function to construct functional options
+// that sets endpoint resolver on LoadOptions. The EndpointResolver is set to nil,
+// the EndpointResolver value is ignored. If multiple WithEndpointResolver calls
+// are made, the last call overrides the previous call values.
+func WithEndpointResolver(v aws.EndpointResolver) LoadOptionsFunc {
+ return func(o *LoadOptions) error {
+ o.EndpointResolver = v
+ return nil
+ }
+}
+
+func (o LoadOptions) getLogger(ctx context.Context) (logging.Logger, bool, error) {
+ if o.Logger == nil {
+ return nil, false, nil
+ }
+
+ return o.Logger, true, nil
+}
+
+// WithLogger is a helper function to construct functional options
+// that sets Logger on LoadOptions. If Logger is set to nil, the
+// Logger value will be ignored. If multiple WithLogger calls are made,
+// the last call overrides the previous call values.
+func WithLogger(v logging.Logger) LoadOptionsFunc {
+ return func(o *LoadOptions) error {
+ o.Logger = v
+ return nil
+ }
+}
+
+func (o LoadOptions) getClientLogMode(ctx context.Context) (aws.ClientLogMode, bool, error) {
+ if o.ClientLogMode == nil {
+ return 0, false, nil
+ }
+
+ return *o.ClientLogMode, true, nil
+}
+
+// WithClientLogMode is a helper function to construct functional options
+// that sets client log mode on LoadOptions. If client log mode is set to nil,
+// the client log mode value will be ignored. If multiple WithClientLogMode calls are made,
+// the last call overrides the previous call values.
+func WithClientLogMode(v aws.ClientLogMode) LoadOptionsFunc {
+ return func(o *LoadOptions) error {
+ o.ClientLogMode = &v
+ return nil
+ }
+}
+
+func (o LoadOptions) getLogConfigurationWarnings(ctx context.Context) (v bool, found bool, err error) {
+ if o.LogConfigurationWarnings == nil {
+ return false, false, nil
+ }
+ return *o.LogConfigurationWarnings, true, nil
+}
+
+// WithLogConfigurationWarnings is a helper function to construct
+// functional options that can be used to set LogConfigurationWarnings
+// on LoadOptions.
+//
+// If multiple WithLogConfigurationWarnings calls are made, the last call
+// overrides the previous call values.
+func WithLogConfigurationWarnings(v bool) LoadOptionsFunc {
+ return func(o *LoadOptions) error {
+ o.LogConfigurationWarnings = &v
+ return nil
+ }
+}
+
+// GetS3UseARNRegion returns whether to allow ARNs to direct the region
+// the S3 client's requests are sent to.
+func (o LoadOptions) GetS3UseARNRegion(ctx context.Context) (v bool, found bool, err error) {
+ if o.S3UseARNRegion == nil {
+ return false, false, nil
+ }
+ return *o.S3UseARNRegion, true, nil
+}
+
+// WithS3UseARNRegion is a helper function to construct functional options
+// that can be used to set S3UseARNRegion on LoadOptions.
+// If multiple WithS3UseARNRegion calls are made, the last call overrides
+// the previous call values.
+func WithS3UseARNRegion(v bool) LoadOptionsFunc {
+ return func(o *LoadOptions) error {
+ o.S3UseARNRegion = &v
+ return nil
+ }
+}
+
+// GetEnableEndpointDiscovery returns if the EnableEndpointDiscovery flag is set.
+func (o LoadOptions) GetEnableEndpointDiscovery(ctx context.Context) (value aws.EndpointDiscoveryEnableState, ok bool, err error) {
+ if o.EnableEndpointDiscovery == aws.EndpointDiscoveryUnset {
+ return aws.EndpointDiscoveryUnset, false, nil
+ }
+ return o.EnableEndpointDiscovery, true, nil
+}
+
+// WithEndpointDiscovery is a helper function to construct functional options
+// that can be used to enable endpoint discovery on LoadOptions for supported clients.
+// If multiple WithEndpointDiscovery calls are made, the last call overrides
+// the previous call values.
+func WithEndpointDiscovery(v aws.EndpointDiscoveryEnableState) LoadOptionsFunc {
+ return func(o *LoadOptions) error {
+ o.EnableEndpointDiscovery = v
+ return nil
+ }
+}
+
+// getSSOProviderOptions returns AssumeRoleCredentialOptions from LoadOptions
+func (o LoadOptions) getSSOProviderOptions(context.Context) (func(options *ssocreds.Options), bool, error) {
+ if o.SSOProviderOptions == nil {
+ return nil, false, nil
+ }
+
+ return o.SSOProviderOptions, true, nil
+}
+
+// WithSSOProviderOptions is a helper function to construct
+// functional options that sets a function to use ssocreds.Options
+// on config's LoadOptions. If the SSO credential provider options is set to nil,
+// the sso provider options value will be ignored. If multiple
+// WithSSOProviderOptions calls are made, the last call overrides
+// the previous call values.
+func WithSSOProviderOptions(v func(*ssocreds.Options)) LoadOptionsFunc {
+ return func(o *LoadOptions) error {
+ o.SSOProviderOptions = v
+ return nil
+ }
+}
+
+// GetEC2IMDSClientEnableState implements a EC2IMDSClientEnableState options resolver interface.
+func (o LoadOptions) GetEC2IMDSClientEnableState() (imds.ClientEnableState, bool, error) {
+ if o.EC2IMDSClientEnableState == imds.ClientDefaultEnableState {
+ return imds.ClientDefaultEnableState, false, nil
+ }
+
+ return o.EC2IMDSClientEnableState, true, nil
+}
+
+// GetEC2IMDSEndpointMode implements a EC2IMDSEndpointMode option resolver interface.
+func (o LoadOptions) GetEC2IMDSEndpointMode() (imds.EndpointModeState, bool, error) {
+ if o.EC2IMDSEndpointMode == imds.EndpointModeStateUnset {
+ return imds.EndpointModeStateUnset, false, nil
+ }
+
+ return o.EC2IMDSEndpointMode, true, nil
+}
+
+// GetEC2IMDSEndpoint implements a EC2IMDSEndpoint option resolver interface.
+func (o LoadOptions) GetEC2IMDSEndpoint() (string, bool, error) {
+ if len(o.EC2IMDSEndpoint) == 0 {
+ return "", false, nil
+ }
+
+ return o.EC2IMDSEndpoint, true, nil
+}
+
+// WithEC2IMDSClientEnableState is a helper function to construct functional options that sets the EC2IMDSClientEnableState.
+func WithEC2IMDSClientEnableState(v imds.ClientEnableState) LoadOptionsFunc {
+ return func(o *LoadOptions) error {
+ o.EC2IMDSClientEnableState = v
+ return nil
+ }
+}
+
+// WithEC2IMDSEndpointMode is a helper function to construct functional options that sets the EC2IMDSEndpointMode.
+func WithEC2IMDSEndpointMode(v imds.EndpointModeState) LoadOptionsFunc {
+ return func(o *LoadOptions) error {
+ o.EC2IMDSEndpointMode = v
+ return nil
+ }
+}
+
+// WithEC2IMDSEndpoint is a helper function to construct functional options that sets the EC2IMDSEndpoint.
+func WithEC2IMDSEndpoint(v string) LoadOptionsFunc {
+ return func(o *LoadOptions) error {
+ o.EC2IMDSEndpoint = v
+ return nil
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/local.go b/vendor/github.com/aws/aws-sdk-go-v2/config/local.go
new file mode 100644
index 00000000..b629137c
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/config/local.go
@@ -0,0 +1,51 @@
+package config
+
+import (
+ "fmt"
+ "net"
+ "net/url"
+)
+
+var lookupHostFn = net.LookupHost
+
+func isLoopbackHost(host string) (bool, error) {
+ ip := net.ParseIP(host)
+ if ip != nil {
+ return ip.IsLoopback(), nil
+ }
+
+ // Host is not an ip, perform lookup
+ addrs, err := lookupHostFn(host)
+ if err != nil {
+ return false, err
+ }
+ if len(addrs) == 0 {
+ return false, fmt.Errorf("no addrs found for host, %s", host)
+ }
+
+ for _, addr := range addrs {
+ if !net.ParseIP(addr).IsLoopback() {
+ return false, nil
+ }
+ }
+
+ return true, nil
+}
+
+func validateLocalURL(v string) error {
+ u, err := url.Parse(v)
+ if err != nil {
+ return err
+ }
+
+ host := u.Hostname()
+ if len(host) == 0 {
+ return fmt.Errorf("unable to parse host from local HTTP cred provider URL")
+ } else if isLoopback, err := isLoopbackHost(host); err != nil {
+ return fmt.Errorf("failed to resolve host %q, %v", host, err)
+ } else if !isLoopback {
+ return fmt.Errorf("invalid endpoint host, %q, only host resolving to loopback addresses are allowed", host)
+ }
+
+ return nil
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/provider.go b/vendor/github.com/aws/aws-sdk-go-v2/config/provider.go
new file mode 100644
index 00000000..a4308368
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/config/provider.go
@@ -0,0 +1,427 @@
+package config
+
+import (
+ "context"
+ "io"
+ "net/http"
+
+ "github.com/aws/aws-sdk-go-v2/aws"
+ "github.com/aws/aws-sdk-go-v2/credentials/ec2rolecreds"
+ "github.com/aws/aws-sdk-go-v2/credentials/endpointcreds"
+ "github.com/aws/aws-sdk-go-v2/credentials/processcreds"
+ "github.com/aws/aws-sdk-go-v2/credentials/ssocreds"
+ "github.com/aws/aws-sdk-go-v2/credentials/stscreds"
+ "github.com/aws/smithy-go/logging"
+ "github.com/aws/smithy-go/middleware"
+)
+
+// sharedConfigProfileProvider provides access to the shared config profile
+// name external configuration value.
+type sharedConfigProfileProvider interface {
+ getSharedConfigProfile(ctx context.Context) (string, bool, error)
+}
+
+// getSharedConfigProfile searches the configs for a sharedConfigProfileProvider
+// and returns the value if found. Returns an error if a provider fails before a
+// value is found.
+func getSharedConfigProfile(ctx context.Context, configs configs) (value string, found bool, err error) {
+ for _, cfg := range configs {
+ if p, ok := cfg.(sharedConfigProfileProvider); ok {
+ value, found, err = p.getSharedConfigProfile(ctx)
+ if err != nil || found {
+ break
+ }
+ }
+ }
+ return
+}
+
+// sharedConfigFilesProvider provides access to the shared config filesnames
+// external configuration value.
+type sharedConfigFilesProvider interface {
+ getSharedConfigFiles(ctx context.Context) ([]string, bool, error)
+}
+
+// getSharedConfigFiles searches the configs for a sharedConfigFilesProvider
+// and returns the value if found. Returns an error if a provider fails before a
+// value is found.
+func getSharedConfigFiles(ctx context.Context, configs configs) (value []string, found bool, err error) {
+ for _, cfg := range configs {
+ if p, ok := cfg.(sharedConfigFilesProvider); ok {
+ value, found, err = p.getSharedConfigFiles(ctx)
+ if err != nil || found {
+ break
+ }
+ }
+ }
+
+ return
+}
+
+// sharedCredentialsFilesProvider provides access to the shared credentials filesnames
+// external configuration value.
+type sharedCredentialsFilesProvider interface {
+ getSharedCredentialsFiles(ctx context.Context) ([]string, bool, error)
+}
+
+// getSharedCredentialsFiles searches the configs for a sharedCredentialsFilesProvider
+// and returns the value if found. Returns an error if a provider fails before a
+// value is found.
+func getSharedCredentialsFiles(ctx context.Context, configs configs) (value []string, found bool, err error) {
+ for _, cfg := range configs {
+ if p, ok := cfg.(sharedCredentialsFilesProvider); ok {
+ value, found, err = p.getSharedCredentialsFiles(ctx)
+ if err != nil || found {
+ break
+ }
+ }
+ }
+
+ return
+}
+
+// customCABundleProvider provides access to the custom CA bundle PEM bytes.
+type customCABundleProvider interface {
+ getCustomCABundle(ctx context.Context) (io.Reader, bool, error)
+}
+
+// getCustomCABundle searches the configs for a customCABundleProvider
+// and returns the value if found. Returns an error if a provider fails before a
+// value is found.
+func getCustomCABundle(ctx context.Context, configs configs) (value io.Reader, found bool, err error) {
+ for _, cfg := range configs {
+ if p, ok := cfg.(customCABundleProvider); ok {
+ value, found, err = p.getCustomCABundle(ctx)
+ if err != nil || found {
+ break
+ }
+ }
+ }
+
+ return
+}
+
+// regionProvider provides access to the region external configuration value.
+type regionProvider interface {
+ getRegion(ctx context.Context) (string, bool, error)
+}
+
+// getRegion searches the configs for a regionProvider and returns the value
+// if found. Returns an error if a provider fails before a value is found.
+func getRegion(ctx context.Context, configs configs) (value string, found bool, err error) {
+ for _, cfg := range configs {
+ if p, ok := cfg.(regionProvider); ok {
+ value, found, err = p.getRegion(ctx)
+ if err != nil || found {
+ break
+ }
+ }
+ }
+ return
+}
+
+// ec2IMDSRegionProvider provides access to the ec2 imds region
+// configuration value
+type ec2IMDSRegionProvider interface {
+ getEC2IMDSRegion(ctx context.Context) (string, bool, error)
+}
+
+// getEC2IMDSRegion searches the configs for a ec2IMDSRegionProvider and
+// returns the value if found. Returns an error if a provider fails before
+// a value is found.
+func getEC2IMDSRegion(ctx context.Context, configs configs) (region string, found bool, err error) {
+ for _, cfg := range configs {
+ if provider, ok := cfg.(ec2IMDSRegionProvider); ok {
+ region, found, err = provider.getEC2IMDSRegion(ctx)
+ if err != nil || found {
+ break
+ }
+ }
+ }
+ return
+}
+
+// credentialsProviderProvider provides access to the credentials external
+// configuration value.
+type credentialsProviderProvider interface {
+ getCredentialsProvider(ctx context.Context) (aws.CredentialsProvider, bool, error)
+}
+
+// getCredentialsProvider searches the configs for a credentialsProviderProvider
+// and returns the value if found. Returns an error if a provider fails before a
+// value is found.
+func getCredentialsProvider(ctx context.Context, configs configs) (p aws.CredentialsProvider, found bool, err error) {
+ for _, cfg := range configs {
+ if provider, ok := cfg.(credentialsProviderProvider); ok {
+ p, found, err = provider.getCredentialsProvider(ctx)
+ if err != nil || found {
+ break
+ }
+ }
+ }
+ return
+}
+
+// processCredentialOptions is an interface for retrieving a function for setting
+// the processcreds.Options.
+type processCredentialOptions interface {
+ getProcessCredentialOptions(ctx context.Context) (func(*processcreds.Options), bool, error)
+}
+
+// getProcessCredentialOptions searches the slice of configs and returns the first function found
+func getProcessCredentialOptions(ctx context.Context, configs configs) (f func(*processcreds.Options), found bool, err error) {
+ for _, config := range configs {
+ if p, ok := config.(processCredentialOptions); ok {
+ f, found, err = p.getProcessCredentialOptions(ctx)
+ if err != nil || found {
+ break
+ }
+ }
+ }
+ return
+}
+
+// ec2RoleCredentialOptionsProvider is an interface for retrieving a function
+// for setting the ec2rolecreds.Provider options.
+type ec2RoleCredentialOptionsProvider interface {
+ getEC2RoleCredentialOptions(ctx context.Context) (func(*ec2rolecreds.Options), bool, error)
+}
+
+// getEC2RoleCredentialProviderOptions searches the slice of configs and returns the first function found
+func getEC2RoleCredentialProviderOptions(ctx context.Context, configs configs) (f func(*ec2rolecreds.Options), found bool, err error) {
+ for _, config := range configs {
+ if p, ok := config.(ec2RoleCredentialOptionsProvider); ok {
+ f, found, err = p.getEC2RoleCredentialOptions(ctx)
+ if err != nil || found {
+ break
+ }
+ }
+ }
+ return
+}
+
+// defaultRegionProvider is an interface for retrieving a default region if a region was not resolved from other sources
+type defaultRegionProvider interface {
+ getDefaultRegion(ctx context.Context) (string, bool, error)
+}
+
+// getDefaultRegion searches the slice of configs and returns the first fallback region found
+func getDefaultRegion(ctx context.Context, configs configs) (value string, found bool, err error) {
+ for _, config := range configs {
+ if p, ok := config.(defaultRegionProvider); ok {
+ value, found, err = p.getDefaultRegion(ctx)
+ if err != nil || found {
+ break
+ }
+ }
+ }
+ return
+}
+
+// endpointCredentialOptionsProvider is an interface for retrieving a function for setting
+// the endpointcreds.ProviderOptions.
+type endpointCredentialOptionsProvider interface {
+ getEndpointCredentialOptions(ctx context.Context) (func(*endpointcreds.Options), bool, error)
+}
+
+// getEndpointCredentialProviderOptions searches the slice of configs and returns the first function found
+func getEndpointCredentialProviderOptions(ctx context.Context, configs configs) (f func(*endpointcreds.Options), found bool, err error) {
+ for _, config := range configs {
+ if p, ok := config.(endpointCredentialOptionsProvider); ok {
+ f, found, err = p.getEndpointCredentialOptions(ctx)
+ if err != nil || found {
+ break
+ }
+ }
+ }
+ return
+}
+
+// webIdentityRoleCredentialOptionsProvider is an interface for retrieving a function for setting
+// the stscreds.WebIdentityRoleProvider.
+type webIdentityRoleCredentialOptionsProvider interface {
+ getWebIdentityRoleCredentialOptions(ctx context.Context) (func(*stscreds.WebIdentityRoleOptions), bool, error)
+}
+
+// getWebIdentityCredentialProviderOptions searches the slice of configs and returns the first function found
+func getWebIdentityCredentialProviderOptions(ctx context.Context, configs configs) (f func(*stscreds.WebIdentityRoleOptions), found bool, err error) {
+ for _, config := range configs {
+ if p, ok := config.(webIdentityRoleCredentialOptionsProvider); ok {
+ f, found, err = p.getWebIdentityRoleCredentialOptions(ctx)
+ if err != nil || found {
+ break
+ }
+ }
+ }
+ return
+}
+
+// assumeRoleCredentialOptionsProvider is an interface for retrieving a function for setting
+// the stscreds.AssumeRoleOptions.
+type assumeRoleCredentialOptionsProvider interface {
+ getAssumeRoleCredentialOptions(ctx context.Context) (func(*stscreds.AssumeRoleOptions), bool, error)
+}
+
+// getAssumeRoleCredentialProviderOptions searches the slice of configs and returns the first function found
+func getAssumeRoleCredentialProviderOptions(ctx context.Context, configs configs) (f func(*stscreds.AssumeRoleOptions), found bool, err error) {
+ for _, config := range configs {
+ if p, ok := config.(assumeRoleCredentialOptionsProvider); ok {
+ f, found, err = p.getAssumeRoleCredentialOptions(ctx)
+ if err != nil || found {
+ break
+ }
+ }
+ }
+ return
+}
+
+// HTTPClient is an HTTP client implementation
+type HTTPClient interface {
+ Do(*http.Request) (*http.Response, error)
+}
+
+// httpClientProvider is an interface for retrieving HTTPClient
+type httpClientProvider interface {
+ getHTTPClient(ctx context.Context) (HTTPClient, bool, error)
+}
+
+// getHTTPClient searches the slice of configs and returns the HTTPClient set on configs
+func getHTTPClient(ctx context.Context, configs configs) (client HTTPClient, found bool, err error) {
+ for _, config := range configs {
+ if p, ok := config.(httpClientProvider); ok {
+ client, found, err = p.getHTTPClient(ctx)
+ if err != nil || found {
+ break
+ }
+ }
+ }
+ return
+}
+
+// apiOptionsProvider is an interface for retrieving APIOptions
+type apiOptionsProvider interface {
+ getAPIOptions(ctx context.Context) ([]func(*middleware.Stack) error, bool, error)
+}
+
+// getAPIOptions searches the slice of configs and returns the APIOptions set on configs
+func getAPIOptions(ctx context.Context, configs configs) (apiOptions []func(*middleware.Stack) error, found bool, err error) {
+ for _, config := range configs {
+ if p, ok := config.(apiOptionsProvider); ok {
+ // retrieve APIOptions from configs and set it on cfg
+ apiOptions, found, err = p.getAPIOptions(ctx)
+ if err != nil || found {
+ break
+ }
+ }
+ }
+ return
+}
+
+// endpointResolverProvider is an interface for retrieving an aws.EndpointResolver from a configuration source
+type endpointResolverProvider interface {
+ getEndpointResolver(ctx context.Context) (aws.EndpointResolver, bool, error)
+}
+
+// getEndpointResolver searches the provided config sources for a EndpointResolverFunc that can be used
+// to configure the aws.Config.EndpointResolver value.
+func getEndpointResolver(ctx context.Context, configs configs) (f aws.EndpointResolver, found bool, err error) {
+ for _, c := range configs {
+ if p, ok := c.(endpointResolverProvider); ok {
+ f, found, err = p.getEndpointResolver(ctx)
+ if err != nil || found {
+ break
+ }
+ }
+ }
+ return
+}
+
+// loggerProvider is an interface for retrieving a logging.Logger from a configuration source.
+type loggerProvider interface {
+ getLogger(ctx context.Context) (logging.Logger, bool, error)
+}
+
+// getLogger searches the provided config sources for a logging.Logger that can be used
+// to configure the aws.Config.Logger value.
+func getLogger(ctx context.Context, configs configs) (l logging.Logger, found bool, err error) {
+ for _, c := range configs {
+ if p, ok := c.(loggerProvider); ok {
+ l, found, err = p.getLogger(ctx)
+ if err != nil || found {
+ break
+ }
+ }
+ }
+ return
+}
+
+// clientLogModeProvider is an interface for retrieving the aws.ClientLogMode from a configuration source.
+type clientLogModeProvider interface {
+ getClientLogMode(ctx context.Context) (aws.ClientLogMode, bool, error)
+}
+
+func getClientLogMode(ctx context.Context, configs configs) (m aws.ClientLogMode, found bool, err error) {
+ for _, c := range configs {
+ if p, ok := c.(clientLogModeProvider); ok {
+ m, found, err = p.getClientLogMode(ctx)
+ if err != nil || found {
+ break
+ }
+ }
+ }
+ return
+}
+
+// retryProvider is an configuration provider for custom Retryer.
+type retryProvider interface {
+ getRetryer(ctx context.Context) (func() aws.Retryer, bool, error)
+}
+
+func getRetryer(ctx context.Context, configs configs) (v func() aws.Retryer, found bool, err error) {
+ for _, c := range configs {
+ if p, ok := c.(retryProvider); ok {
+ v, found, err = p.getRetryer(ctx)
+ if err != nil || found {
+ break
+ }
+ }
+ }
+ return
+}
+
+// logConfigurationWarningsProvider is an configuration provider for
+// retrieving a boolean indicating whether configuration issues should
+// be logged when loading from config sources
+type logConfigurationWarningsProvider interface {
+ getLogConfigurationWarnings(ctx context.Context) (bool, bool, error)
+}
+
+func getLogConfigurationWarnings(ctx context.Context, configs configs) (v bool, found bool, err error) {
+ for _, c := range configs {
+ if p, ok := c.(logConfigurationWarningsProvider); ok {
+ v, found, err = p.getLogConfigurationWarnings(ctx)
+ if err != nil || found {
+ break
+ }
+ }
+ }
+ return
+}
+
+// ssoCredentialOptionsProvider is an interface for retrieving a function for setting
+// the ssocreds.Options.
+type ssoCredentialOptionsProvider interface {
+ getSSOProviderOptions(context.Context) (func(*ssocreds.Options), bool, error)
+}
+
+func getSSOProviderOptions(ctx context.Context, configs configs) (v func(options *ssocreds.Options), found bool, err error) {
+ for _, c := range configs {
+ if p, ok := c.(ssoCredentialOptionsProvider); ok {
+ v, found, err = p.getSSOProviderOptions(ctx)
+ if err != nil || found {
+ break
+ }
+ }
+ }
+ return
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/resolve.go b/vendor/github.com/aws/aws-sdk-go-v2/config/resolve.go
new file mode 100644
index 00000000..550ca4e7
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/config/resolve.go
@@ -0,0 +1,227 @@
+package config
+
+import (
+ "context"
+ "crypto/tls"
+ "crypto/x509"
+ "fmt"
+ "io/ioutil"
+ "net/http"
+ "os"
+
+ "github.com/aws/aws-sdk-go-v2/aws"
+ awshttp "github.com/aws/aws-sdk-go-v2/aws/transport/http"
+ "github.com/aws/smithy-go/logging"
+)
+
+// resolveDefaultAWSConfig will write default configuration values into the cfg
+// value. It will write the default values, overwriting any previous value.
+//
+// This should be used as the first resolver in the slice of resolvers when
+// resolving external configuration.
+func resolveDefaultAWSConfig(ctx context.Context, cfg *aws.Config, cfgs configs) error {
+ *cfg = aws.Config{
+ Credentials: aws.AnonymousCredentials{},
+ Logger: logging.NewStandardLogger(os.Stderr),
+ }
+ return nil
+}
+
+// resolveCustomCABundle extracts the first instance of a custom CA bundle filename
+// from the external configurations. It will update the HTTP Client's builder
+// to be configured with the custom CA bundle.
+//
+// Config provider used:
+// * customCABundleProvider
+func resolveCustomCABundle(ctx context.Context, cfg *aws.Config, cfgs configs) error {
+ pemCerts, found, err := getCustomCABundle(ctx, cfgs)
+ if err != nil {
+ // TODO error handling, What is the best way to handle this?
+ // capture previous errors continue. error out if all errors
+ return err
+ }
+ if !found {
+ return nil
+ }
+
+ if cfg.HTTPClient == nil {
+ cfg.HTTPClient = awshttp.NewBuildableClient()
+ }
+
+ trOpts, ok := cfg.HTTPClient.(*awshttp.BuildableClient)
+ if !ok {
+ return fmt.Errorf("unable to add custom RootCAs HTTPClient, "+
+ "has no WithTransportOptions, %T", cfg.HTTPClient)
+ }
+
+ var appendErr error
+ client := trOpts.WithTransportOptions(func(tr *http.Transport) {
+ if tr.TLSClientConfig == nil {
+ tr.TLSClientConfig = &tls.Config{}
+ }
+ if tr.TLSClientConfig.RootCAs == nil {
+ tr.TLSClientConfig.RootCAs = x509.NewCertPool()
+ }
+
+ b, err := ioutil.ReadAll(pemCerts)
+ if err != nil {
+ appendErr = fmt.Errorf("failed to read custom CA bundle PEM file")
+ }
+
+ if !tr.TLSClientConfig.RootCAs.AppendCertsFromPEM(b) {
+ appendErr = fmt.Errorf("failed to load custom CA bundle PEM file")
+ }
+ })
+ if appendErr != nil {
+ return appendErr
+ }
+
+ cfg.HTTPClient = client
+ return err
+}
+
+// resolveRegion extracts the first instance of a Region from the configs slice.
+//
+// Config providers used:
+// * regionProvider
+func resolveRegion(ctx context.Context, cfg *aws.Config, configs configs) error {
+ v, found, err := getRegion(ctx, configs)
+ if err != nil {
+ // TODO error handling, What is the best way to handle this?
+ // capture previous errors continue. error out if all errors
+ return err
+ }
+ if !found {
+ return nil
+ }
+
+ cfg.Region = v
+ return nil
+}
+
+// resolveDefaultRegion extracts the first instance of a default region and sets `aws.Config.Region` to the default
+// region if region had not been resolved from other sources.
+func resolveDefaultRegion(ctx context.Context, cfg *aws.Config, configs configs) error {
+ if len(cfg.Region) > 0 {
+ return nil
+ }
+
+ v, found, err := getDefaultRegion(ctx, configs)
+ if err != nil {
+ return err
+ }
+ if !found {
+ return nil
+ }
+
+ cfg.Region = v
+
+ return nil
+}
+
+// resolveHTTPClient extracts the first instance of a HTTPClient and sets `aws.Config.HTTPClient` to the HTTPClient instance
+// if one has not been resolved from other sources.
+func resolveHTTPClient(ctx context.Context, cfg *aws.Config, configs configs) error {
+ c, found, err := getHTTPClient(ctx, configs)
+ if err != nil {
+ return err
+ }
+ if !found {
+ return nil
+ }
+
+ cfg.HTTPClient = c
+ return nil
+}
+
+// resolveAPIOptions extracts the first instance of APIOptions and sets `aws.Config.APIOptions` to the resolved API options
+// if one has not been resolved from other sources.
+func resolveAPIOptions(ctx context.Context, cfg *aws.Config, configs configs) error {
+ o, found, err := getAPIOptions(ctx, configs)
+ if err != nil {
+ return err
+ }
+ if !found {
+ return nil
+ }
+
+ cfg.APIOptions = o
+
+ return nil
+}
+
+// resolveEndpointResolver extracts the first instance of a EndpointResolverFunc from the config slice
+// and sets the functions result on the aws.Config.EndpointResolver
+func resolveEndpointResolver(ctx context.Context, cfg *aws.Config, configs configs) error {
+ endpointResolver, found, err := getEndpointResolver(ctx, configs)
+ if err != nil {
+ return err
+ }
+ if !found {
+ return nil
+ }
+
+ cfg.EndpointResolver = endpointResolver
+
+ return nil
+}
+
+func resolveLogger(ctx context.Context, cfg *aws.Config, configs configs) error {
+ logger, found, err := getLogger(ctx, configs)
+ if err != nil {
+ return err
+ }
+ if !found {
+ return nil
+ }
+
+ cfg.Logger = logger
+
+ return nil
+}
+
+func resolveClientLogMode(ctx context.Context, cfg *aws.Config, configs configs) error {
+ mode, found, err := getClientLogMode(ctx, configs)
+ if err != nil {
+ return err
+ }
+ if !found {
+ return nil
+ }
+
+ cfg.ClientLogMode = mode
+
+ return nil
+}
+
+func resolveRetryer(ctx context.Context, cfg *aws.Config, configs configs) error {
+ retryer, found, err := getRetryer(ctx, configs)
+ if err != nil {
+ return err
+ }
+ if !found {
+ return nil
+ }
+
+ cfg.Retryer = retryer
+
+ return nil
+}
+
+func resolveEC2IMDSRegion(ctx context.Context, cfg *aws.Config, configs configs) error {
+ if len(cfg.Region) > 0 {
+ return nil
+ }
+
+ region, found, err := getEC2IMDSRegion(ctx, configs)
+ if err != nil {
+ return err
+ }
+ if !found {
+ return nil
+ }
+
+ cfg.Region = region
+
+ return nil
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/resolve_credentials.go b/vendor/github.com/aws/aws-sdk-go-v2/config/resolve_credentials.go
new file mode 100644
index 00000000..7dfe7404
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/config/resolve_credentials.go
@@ -0,0 +1,441 @@
+package config
+
+import (
+ "context"
+ "fmt"
+ "net/url"
+ "time"
+
+ "github.com/aws/aws-sdk-go-v2/aws"
+ "github.com/aws/aws-sdk-go-v2/credentials"
+ "github.com/aws/aws-sdk-go-v2/credentials/ec2rolecreds"
+ "github.com/aws/aws-sdk-go-v2/credentials/endpointcreds"
+ "github.com/aws/aws-sdk-go-v2/credentials/processcreds"
+ "github.com/aws/aws-sdk-go-v2/credentials/ssocreds"
+ "github.com/aws/aws-sdk-go-v2/credentials/stscreds"
+ "github.com/aws/aws-sdk-go-v2/feature/ec2/imds"
+ "github.com/aws/aws-sdk-go-v2/service/sso"
+ "github.com/aws/aws-sdk-go-v2/service/sts"
+)
+
+const (
+ // valid credential source values
+ credSourceEc2Metadata = "Ec2InstanceMetadata"
+ credSourceEnvironment = "Environment"
+ credSourceECSContainer = "EcsContainer"
+)
+
+var (
+ ecsContainerEndpoint = "http://169.254.170.2" // not constant to allow for swapping during unit-testing
+)
+
+// resolveCredentials extracts a credential provider from slice of config sources.
+//
+// If an explict credential provider is not found the resolver will fallback to resolving
+// credentials by extracting a credential provider from EnvConfig and SharedConfig.
+func resolveCredentials(ctx context.Context, cfg *aws.Config, configs configs) error {
+ found, err := resolveCredentialProvider(ctx, cfg, configs)
+ if err != nil {
+ return err
+ }
+ if found {
+ return nil
+ }
+
+ err = resolveCredentialChain(ctx, cfg, configs)
+ if err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// resolveCredentialProvider extracts the first instance of Credentials from the
+// config slices.
+//
+// The resolved CredentialProvider will be wrapped in a cache to ensure the
+// credentials are only refreshed when needed. This also protects the
+// credential provider to be used concurrently.
+//
+// Config providers used:
+// * credentialsProviderProvider
+func resolveCredentialProvider(ctx context.Context, cfg *aws.Config, cfgs configs) (bool, error) {
+ credProvider, found, err := getCredentialsProvider(ctx, cfgs)
+ if err != nil {
+ return false, err
+ }
+ if !found {
+ return false, nil
+ }
+
+ cfg.Credentials = wrapWithCredentialsCache(credProvider)
+
+ return true, nil
+}
+
+// resolveCredentialChain resolves a credential provider chain using EnvConfig
+// and SharedConfig if present in the slice of provided configs.
+//
+// The resolved CredentialProvider will be wrapped in a cache to ensure the
+// credentials are only refreshed when needed. This also protects the
+// credential provider to be used concurrently.
+func resolveCredentialChain(ctx context.Context, cfg *aws.Config, configs configs) (err error) {
+ envConfig, sharedConfig, other := getAWSConfigSources(configs)
+
+ // When checking if a profile was specified programmatically we should only consider the "other"
+ // configuration sources that have been provided. This ensures we correctly honor the expected credential
+ // hierarchy.
+ _, sharedProfileSet, err := getSharedConfigProfile(ctx, other)
+ if err != nil {
+ return err
+ }
+
+ switch {
+ case sharedProfileSet:
+ err = resolveCredsFromProfile(ctx, cfg, envConfig, sharedConfig, other)
+ case envConfig.Credentials.HasKeys():
+ cfg.Credentials = credentials.StaticCredentialsProvider{Value: envConfig.Credentials}
+ case len(envConfig.WebIdentityTokenFilePath) > 0:
+ err = assumeWebIdentity(ctx, cfg, envConfig.WebIdentityTokenFilePath, envConfig.RoleARN, envConfig.RoleSessionName, configs)
+ default:
+ err = resolveCredsFromProfile(ctx, cfg, envConfig, sharedConfig, other)
+ }
+ if err != nil {
+ return err
+ }
+
+ // Wrap the resolved provider in a cache so the SDK will cache credentials.
+ cfg.Credentials = wrapWithCredentialsCache(cfg.Credentials)
+
+ return nil
+}
+
+func resolveCredsFromProfile(ctx context.Context, cfg *aws.Config, envConfig *EnvConfig, sharedConfig *SharedConfig, configs configs) (err error) {
+
+ switch {
+ case sharedConfig.Source != nil:
+ // Assume IAM role with credentials source from a different profile.
+ err = resolveCredsFromProfile(ctx, cfg, envConfig, sharedConfig.Source, configs)
+
+ case sharedConfig.Credentials.HasKeys():
+ // Static Credentials from Shared Config/Credentials file.
+ cfg.Credentials = credentials.StaticCredentialsProvider{
+ Value: sharedConfig.Credentials,
+ }
+
+ case len(sharedConfig.CredentialSource) != 0:
+ err = resolveCredsFromSource(ctx, cfg, envConfig, sharedConfig, configs)
+
+ case len(sharedConfig.WebIdentityTokenFile) != 0:
+ // Credentials from Assume Web Identity token require an IAM Role, and
+ // that roll will be assumed. May be wrapped with another assume role
+ // via SourceProfile.
+ return assumeWebIdentity(ctx, cfg, sharedConfig.WebIdentityTokenFile, sharedConfig.RoleARN, sharedConfig.RoleSessionName, configs)
+
+ case sharedConfig.hasSSOConfiguration():
+ err = resolveSSOCredentials(ctx, cfg, sharedConfig, configs)
+
+ case len(sharedConfig.CredentialProcess) != 0:
+ // Get credentials from CredentialProcess
+ err = processCredentials(ctx, cfg, sharedConfig, configs)
+
+ case len(envConfig.ContainerCredentialsEndpoint) != 0:
+ err = resolveLocalHTTPCredProvider(ctx, cfg, envConfig.ContainerCredentialsEndpoint, envConfig.ContainerAuthorizationToken, configs)
+
+ case len(envConfig.ContainerCredentialsRelativePath) != 0:
+ err = resolveHTTPCredProvider(ctx, cfg, ecsContainerURI(envConfig.ContainerCredentialsRelativePath), envConfig.ContainerAuthorizationToken, configs)
+
+ default:
+ err = resolveEC2RoleCredentials(ctx, cfg, configs)
+ }
+ if err != nil {
+ return err
+ }
+
+ if len(sharedConfig.RoleARN) > 0 {
+ return credsFromAssumeRole(ctx, cfg, sharedConfig, configs)
+ }
+
+ return nil
+}
+
+func resolveSSOCredentials(ctx context.Context, cfg *aws.Config, sharedConfig *SharedConfig, configs configs) error {
+ if err := sharedConfig.validateSSOConfiguration(); err != nil {
+ return err
+ }
+
+ var options []func(*ssocreds.Options)
+ v, found, err := getSSOProviderOptions(ctx, configs)
+ if err != nil {
+ return err
+ }
+ if found {
+ options = append(options, v)
+ }
+
+ cfgCopy := cfg.Copy()
+ cfgCopy.Region = sharedConfig.SSORegion
+
+ cfg.Credentials = ssocreds.New(sso.NewFromConfig(cfgCopy), sharedConfig.SSOAccountID, sharedConfig.SSORoleName, sharedConfig.SSOStartURL, options...)
+
+ return nil
+}
+
+func ecsContainerURI(path string) string {
+ return fmt.Sprintf("%s%s", ecsContainerEndpoint, path)
+}
+
+func processCredentials(ctx context.Context, cfg *aws.Config, sharedConfig *SharedConfig, configs configs) error {
+ var opts []func(*processcreds.Options)
+
+ options, found, err := getProcessCredentialOptions(ctx, configs)
+ if err != nil {
+ return err
+ }
+ if found {
+ opts = append(opts, options)
+ }
+
+ cfg.Credentials = processcreds.NewProvider(sharedConfig.CredentialProcess, opts...)
+
+ return nil
+}
+
+func resolveLocalHTTPCredProvider(ctx context.Context, cfg *aws.Config, endpointURL, authToken string, configs configs) error {
+ var resolveErr error
+
+ parsed, err := url.Parse(endpointURL)
+ if err != nil {
+ resolveErr = fmt.Errorf("invalid URL, %w", err)
+ } else {
+ host := parsed.Hostname()
+ if len(host) == 0 {
+ resolveErr = fmt.Errorf("unable to parse host from local HTTP cred provider URL")
+ } else if isLoopback, loopbackErr := isLoopbackHost(host); loopbackErr != nil {
+ resolveErr = fmt.Errorf("failed to resolve host %q, %v", host, loopbackErr)
+ } else if !isLoopback {
+ resolveErr = fmt.Errorf("invalid endpoint host, %q, only loopback hosts are allowed", host)
+ }
+ }
+
+ if resolveErr != nil {
+ return resolveErr
+ }
+
+ return resolveHTTPCredProvider(ctx, cfg, endpointURL, authToken, configs)
+}
+
+func resolveHTTPCredProvider(ctx context.Context, cfg *aws.Config, url, authToken string, configs configs) error {
+ optFns := []func(*endpointcreds.Options){
+ func(options *endpointcreds.Options) {
+ if len(authToken) != 0 {
+ options.AuthorizationToken = authToken
+ }
+ options.APIOptions = cfg.APIOptions
+ if cfg.Retryer != nil {
+ options.Retryer = cfg.Retryer()
+ }
+ },
+ }
+
+ optFn, found, err := getEndpointCredentialProviderOptions(ctx, configs)
+ if err != nil {
+ return err
+ }
+ if found {
+ optFns = append(optFns, optFn)
+ }
+
+ provider := endpointcreds.New(url, optFns...)
+
+ cfg.Credentials = wrapWithCredentialsCache(provider, func(options *aws.CredentialsCacheOptions) {
+ options.ExpiryWindow = 5 * time.Minute
+ })
+
+ return nil
+}
+
+func resolveCredsFromSource(ctx context.Context, cfg *aws.Config, envConfig *EnvConfig, sharedCfg *SharedConfig, configs configs) (err error) {
+ switch sharedCfg.CredentialSource {
+ case credSourceEc2Metadata:
+ return resolveEC2RoleCredentials(ctx, cfg, configs)
+
+ case credSourceEnvironment:
+ cfg.Credentials = credentials.StaticCredentialsProvider{Value: envConfig.Credentials}
+
+ case credSourceECSContainer:
+ if len(envConfig.ContainerCredentialsRelativePath) == 0 {
+ return fmt.Errorf("EcsContainer was specified as the credential_source, but 'AWS_CONTAINER_CREDENTIALS_RELATIVE_URI' was not set")
+ }
+ return resolveHTTPCredProvider(ctx, cfg, ecsContainerURI(envConfig.ContainerCredentialsRelativePath), envConfig.ContainerAuthorizationToken, configs)
+
+ default:
+ return fmt.Errorf("credential_source values must be EcsContainer, Ec2InstanceMetadata, or Environment")
+ }
+
+ return nil
+}
+
+func resolveEC2RoleCredentials(ctx context.Context, cfg *aws.Config, configs configs) error {
+ optFns := make([]func(*ec2rolecreds.Options), 0, 2)
+
+ optFn, found, err := getEC2RoleCredentialProviderOptions(ctx, configs)
+ if err != nil {
+ return err
+ }
+ if found {
+ optFns = append(optFns, optFn)
+ }
+
+ optFns = append(optFns, func(o *ec2rolecreds.Options) {
+ // Only define a client from config if not already defined.
+ if o.Client == nil {
+ o.Client = imds.NewFromConfig(*cfg)
+ }
+ })
+
+ provider := ec2rolecreds.New(optFns...)
+
+ cfg.Credentials = wrapWithCredentialsCache(provider, func(options *aws.CredentialsCacheOptions) {
+ options.ExpiryWindow = 5 * time.Minute
+ })
+
+ return nil
+}
+
+func getAWSConfigSources(cfgs configs) (*EnvConfig, *SharedConfig, configs) {
+ var (
+ envConfig *EnvConfig
+ sharedConfig *SharedConfig
+ other configs
+ )
+
+ for i := range cfgs {
+ switch c := cfgs[i].(type) {
+ case EnvConfig:
+ if envConfig == nil {
+ envConfig = &c
+ }
+ case *EnvConfig:
+ if envConfig == nil {
+ envConfig = c
+ }
+ case SharedConfig:
+ if sharedConfig == nil {
+ sharedConfig = &c
+ }
+ case *SharedConfig:
+ if envConfig == nil {
+ sharedConfig = c
+ }
+ default:
+ other = append(other, c)
+ }
+ }
+
+ if envConfig == nil {
+ envConfig = &EnvConfig{}
+ }
+
+ if sharedConfig == nil {
+ sharedConfig = &SharedConfig{}
+ }
+
+ return envConfig, sharedConfig, other
+}
+
+// AssumeRoleTokenProviderNotSetError is an error returned when creating a
+// session when the MFAToken option is not set when shared config is configured
+// load assume a role with an MFA token.
+type AssumeRoleTokenProviderNotSetError struct{}
+
+// Error is the error message
+func (e AssumeRoleTokenProviderNotSetError) Error() string {
+ return fmt.Sprintf("assume role with MFA enabled, but AssumeRoleTokenProvider session option not set.")
+}
+
+func assumeWebIdentity(ctx context.Context, cfg *aws.Config, filepath string, roleARN, sessionName string, configs configs) error {
+ if len(filepath) == 0 {
+ return fmt.Errorf("token file path is not set")
+ }
+
+ if len(roleARN) == 0 {
+ return fmt.Errorf("role ARN is not set")
+ }
+
+ optFns := []func(*stscreds.WebIdentityRoleOptions){
+ func(options *stscreds.WebIdentityRoleOptions) {
+ options.RoleSessionName = sessionName
+ },
+ }
+
+ optFn, found, err := getWebIdentityCredentialProviderOptions(ctx, configs)
+ if err != nil {
+ return err
+ }
+ if found {
+ optFns = append(optFns, optFn)
+ }
+
+ provider := stscreds.NewWebIdentityRoleProvider(sts.NewFromConfig(*cfg), roleARN, stscreds.IdentityTokenFile(filepath), optFns...)
+
+ cfg.Credentials = provider
+
+ return nil
+}
+
+func credsFromAssumeRole(ctx context.Context, cfg *aws.Config, sharedCfg *SharedConfig, configs configs) (err error) {
+ optFns := []func(*stscreds.AssumeRoleOptions){
+ func(options *stscreds.AssumeRoleOptions) {
+ options.RoleSessionName = sharedCfg.RoleSessionName
+ if sharedCfg.RoleDurationSeconds != nil {
+ if *sharedCfg.RoleDurationSeconds/time.Minute > 15 {
+ options.Duration = *sharedCfg.RoleDurationSeconds
+ }
+ }
+ // Assume role with external ID
+ if len(sharedCfg.ExternalID) > 0 {
+ options.ExternalID = aws.String(sharedCfg.ExternalID)
+ }
+
+ // Assume role with MFA
+ if len(sharedCfg.MFASerial) != 0 {
+ options.SerialNumber = aws.String(sharedCfg.MFASerial)
+ }
+ },
+ }
+
+ optFn, found, err := getAssumeRoleCredentialProviderOptions(ctx, configs)
+ if err != nil {
+ return err
+ }
+ if found {
+ optFns = append(optFns, optFn)
+ }
+
+ {
+ // Synthesize options early to validate configuration errors sooner to ensure a token provider
+ // is present if the SerialNumber was set.
+ var o stscreds.AssumeRoleOptions
+ for _, fn := range optFns {
+ fn(&o)
+ }
+ if o.TokenProvider == nil && o.SerialNumber != nil {
+ return AssumeRoleTokenProviderNotSetError{}
+ }
+ }
+
+ cfg.Credentials = stscreds.NewAssumeRoleProvider(sts.NewFromConfig(*cfg), sharedCfg.RoleARN, optFns...)
+
+ return nil
+}
+
+// wrapWithCredentialsCache will wrap provider with an aws.CredentialsCache with the provided options if the provider is not already a aws.CredentialsCache.
+func wrapWithCredentialsCache(provider aws.CredentialsProvider, optFns ...func(options *aws.CredentialsCacheOptions)) aws.CredentialsProvider {
+ _, ok := provider.(*aws.CredentialsCache)
+ if ok {
+ return provider
+ }
+
+ return aws.NewCredentialsCache(provider, optFns...)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/shared_config.go b/vendor/github.com/aws/aws-sdk-go-v2/config/shared_config.go
new file mode 100644
index 00000000..5593e887
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/config/shared_config.go
@@ -0,0 +1,1238 @@
+package config
+
+import (
+ "context"
+ "errors"
+ "fmt"
+ "github.com/aws/aws-sdk-go-v2/feature/ec2/imds"
+ "os"
+ "path/filepath"
+ "runtime"
+ "strings"
+ "time"
+
+ "github.com/aws/aws-sdk-go-v2/aws"
+ "github.com/aws/aws-sdk-go-v2/internal/ini"
+ "github.com/aws/smithy-go/logging"
+)
+
+const (
+ // Prefix to use for filtering profiles
+ profilePrefix = `profile `
+
+ // string equivalent for boolean
+ endpointDiscoveryDisabled = `false`
+ endpointDiscoveryEnabled = `true`
+ endpointDiscoveryAuto = `auto`
+
+ // Static Credentials group
+ accessKeyIDKey = `aws_access_key_id` // group required
+ secretAccessKey = `aws_secret_access_key` // group required
+ sessionTokenKey = `aws_session_token` // optional
+
+ // Assume Role Credentials group
+ roleArnKey = `role_arn` // group required
+ sourceProfileKey = `source_profile` // group required
+ credentialSourceKey = `credential_source` // group required (or source_profile)
+ externalIDKey = `external_id` // optional
+ mfaSerialKey = `mfa_serial` // optional
+ roleSessionNameKey = `role_session_name` // optional
+ roleDurationSecondsKey = "duration_seconds" // optional
+
+ // AWS Single Sign-On (AWS SSO) group
+ ssoAccountIDKey = "sso_account_id"
+ ssoRegionKey = "sso_region"
+ ssoRoleNameKey = "sso_role_name"
+ ssoStartURL = "sso_start_url"
+
+ // Additional Config fields
+ regionKey = `region`
+
+ // endpoint discovery group
+ enableEndpointDiscoveryKey = `endpoint_discovery_enabled` // optional
+
+ // External Credential process
+ credentialProcessKey = `credential_process` // optional
+
+ // Web Identity Token File
+ webIdentityTokenFileKey = `web_identity_token_file` // optional
+
+ // S3 ARN Region Usage
+ s3UseARNRegionKey = "s3_use_arn_region"
+
+ ec2MetadataServiceEndpointModeKey = "ec2_metadata_service_endpoint_mode"
+
+ ec2MetadataServiceEndpointKey = "ec2_metadata_service_endpoint"
+
+ // DefaultSharedConfigProfile is the default profile to be used when
+ // loading configuration from the config files if another profile name
+ // is not provided.
+ DefaultSharedConfigProfile = `default`
+
+ // S3 Disable Multi-Region AccessPoints
+ s3DisableMultiRegionAccessPointsKey = `s3_disable_multiregion_access_points`
+)
+
+// defaultSharedConfigProfile allows for swapping the default profile for testing
+var defaultSharedConfigProfile = DefaultSharedConfigProfile
+
+// DefaultSharedCredentialsFilename returns the SDK's default file path
+// for the shared credentials file.
+//
+// Builds the shared config file path based on the OS's platform.
+//
+// - Linux/Unix: $HOME/.aws/credentials
+// - Windows: %USERPROFILE%\.aws\credentials
+func DefaultSharedCredentialsFilename() string {
+ return filepath.Join(userHomeDir(), ".aws", "credentials")
+}
+
+// DefaultSharedConfigFilename returns the SDK's default file path for
+// the shared config file.
+//
+// Builds the shared config file path based on the OS's platform.
+//
+// - Linux/Unix: $HOME/.aws/config
+// - Windows: %USERPROFILE%\.aws\config
+func DefaultSharedConfigFilename() string {
+ return filepath.Join(userHomeDir(), ".aws", "config")
+}
+
+// DefaultSharedConfigFiles is a slice of the default shared config files that
+// the will be used in order to load the SharedConfig.
+var DefaultSharedConfigFiles = []string{
+ DefaultSharedConfigFilename(),
+}
+
+// DefaultSharedCredentialsFiles is a slice of the default shared credentials files that
+// the will be used in order to load the SharedConfig.
+var DefaultSharedCredentialsFiles = []string{
+ DefaultSharedCredentialsFilename(),
+}
+
+// SharedConfig represents the configuration fields of the SDK config files.
+type SharedConfig struct {
+ Profile string
+
+ // Credentials values from the config file. Both aws_access_key_id
+ // and aws_secret_access_key must be provided together in the same file
+ // to be considered valid. The values will be ignored if not a complete group.
+ // aws_session_token is an optional field that can be provided if both of the
+ // other two fields are also provided.
+ //
+ // aws_access_key_id
+ // aws_secret_access_key
+ // aws_session_token
+ Credentials aws.Credentials
+
+ CredentialSource string
+ CredentialProcess string
+ WebIdentityTokenFile string
+
+ SSOAccountID string
+ SSORegion string
+ SSORoleName string
+ SSOStartURL string
+
+ RoleARN string
+ ExternalID string
+ MFASerial string
+ RoleSessionName string
+ RoleDurationSeconds *time.Duration
+
+ SourceProfileName string
+ Source *SharedConfig
+
+ // Region is the region the SDK should use for looking up AWS service endpoints
+ // and signing requests.
+ //
+ // region = us-west-2
+ Region string
+
+ // EnableEndpointDiscovery can be enabled or disabled in the shared config
+ // by setting endpoint_discovery_enabled to true, or false respectively.
+ //
+ // endpoint_discovery_enabled = true
+ EnableEndpointDiscovery aws.EndpointDiscoveryEnableState
+
+ // Specifies if the S3 service should allow ARNs to direct the region
+ // the client's requests are sent to.
+ //
+ // s3_use_arn_region=true
+ S3UseARNRegion *bool
+
+ // Specifies the EC2 Instance Metadata Service default endpoint selection mode (IPv4 or IPv6)
+ //
+ // ec2_metadata_service_endpoint_mode=IPv6
+ EC2IMDSEndpointMode imds.EndpointModeState
+
+ // Specifies the EC2 Instance Metadata Service endpoint to use. If specified it overrides EC2IMDSEndpointMode.
+ //
+ // ec2_metadata_service_endpoint=http://fd00:ec2::254
+ EC2IMDSEndpoint string
+
+ // Specifies if the S3 service should disable support for Multi-Region
+ // access-points
+ //
+ // s3_disable_multiregion_access_points=true
+ S3DisableMultiRegionAccessPoints *bool
+}
+
+// GetS3UseARNRegion returns if the S3 service should allow ARNs to direct the region
+// the client's requests are sent to.
+func (c SharedConfig) GetS3UseARNRegion(ctx context.Context) (value, ok bool, err error) {
+ if c.S3UseARNRegion == nil {
+ return false, false, nil
+ }
+
+ return *c.S3UseARNRegion, true, nil
+}
+
+// GetEnableEndpointDiscovery returns if the enable_endpoint_discovery is set.
+func (c SharedConfig) GetEnableEndpointDiscovery(ctx context.Context) (value aws.EndpointDiscoveryEnableState, ok bool, err error) {
+ if c.EnableEndpointDiscovery == aws.EndpointDiscoveryUnset {
+ return aws.EndpointDiscoveryUnset, false, nil
+ }
+
+ return c.EnableEndpointDiscovery, true, nil
+}
+
+// GetS3DisableMultiRegionAccessPoints returns if the S3 service should disable support for Multi-Region
+// access-points.
+func (c SharedConfig) GetS3DisableMultiRegionAccessPoints(ctx context.Context) (value, ok bool, err error) {
+ if c.S3DisableMultiRegionAccessPoints == nil {
+ return false, false, nil
+ }
+
+ return *c.S3DisableMultiRegionAccessPoints, true, nil
+}
+
+// GetRegion returns the region for the profile if a region is set.
+func (c SharedConfig) getRegion(ctx context.Context) (string, bool, error) {
+ if len(c.Region) == 0 {
+ return "", false, nil
+ }
+ return c.Region, true, nil
+}
+
+// GetCredentialsProvider returns the credentials for a profile if they were set.
+func (c SharedConfig) getCredentialsProvider() (aws.Credentials, bool, error) {
+ return c.Credentials, true, nil
+}
+
+// GetEC2IMDSEndpointMode implements a EC2IMDSEndpointMode option resolver interface.
+func (c SharedConfig) GetEC2IMDSEndpointMode() (imds.EndpointModeState, bool, error) {
+ if c.EC2IMDSEndpointMode == imds.EndpointModeStateUnset {
+ return imds.EndpointModeStateUnset, false, nil
+ }
+
+ return c.EC2IMDSEndpointMode, true, nil
+}
+
+// GetEC2IMDSEndpoint implements a EC2IMDSEndpoint option resolver interface.
+func (c SharedConfig) GetEC2IMDSEndpoint() (string, bool, error) {
+ if len(c.EC2IMDSEndpoint) == 0 {
+ return "", false, nil
+ }
+
+ return c.EC2IMDSEndpoint, true, nil
+}
+
+// loadSharedConfigIgnoreNotExist is an alias for loadSharedConfig with the
+// addition of ignoring when none of the files exist or when the profile
+// is not found in any of the files.
+func loadSharedConfigIgnoreNotExist(ctx context.Context, configs configs) (Config, error) {
+ cfg, err := loadSharedConfig(ctx, configs)
+ if err != nil {
+ if _, ok := err.(SharedConfigProfileNotExistError); ok {
+ return SharedConfig{}, nil
+ }
+ return nil, err
+ }
+
+ return cfg, nil
+}
+
+// loadSharedConfig uses the configs passed in to load the SharedConfig from file
+// The file names and profile name are sourced from the configs.
+//
+// If profile name is not provided DefaultSharedConfigProfile (default) will
+// be used.
+//
+// If shared config filenames are not provided DefaultSharedConfigFiles will
+// be used.
+//
+// Config providers used:
+// * sharedConfigProfileProvider
+// * sharedConfigFilesProvider
+func loadSharedConfig(ctx context.Context, configs configs) (Config, error) {
+ var profile string
+ var configFiles []string
+ var credentialsFiles []string
+ var ok bool
+ var err error
+
+ profile, ok, err = getSharedConfigProfile(ctx, configs)
+ if err != nil {
+ return nil, err
+ }
+ if !ok {
+ profile = defaultSharedConfigProfile
+ }
+
+ configFiles, ok, err = getSharedConfigFiles(ctx, configs)
+ if err != nil {
+ return nil, err
+ }
+
+ credentialsFiles, ok, err = getSharedCredentialsFiles(ctx, configs)
+ if err != nil {
+ return nil, err
+ }
+
+ // setup logger if log configuration warning is seti
+ var logger logging.Logger
+ logWarnings, found, err := getLogConfigurationWarnings(ctx, configs)
+ if err != nil {
+ return SharedConfig{}, err
+ }
+ if found && logWarnings {
+ logger, found, err = getLogger(ctx, configs)
+ if err != nil {
+ return SharedConfig{}, err
+ }
+ if !found {
+ logger = logging.NewStandardLogger(os.Stderr)
+ }
+ }
+
+ return LoadSharedConfigProfile(ctx, profile,
+ func(o *LoadSharedConfigOptions) {
+ o.Logger = logger
+ o.ConfigFiles = configFiles
+ o.CredentialsFiles = credentialsFiles
+ },
+ )
+}
+
+// LoadSharedConfigOptions struct contains optional values that can be used to load the config.
+type LoadSharedConfigOptions struct {
+
+ // CredentialsFiles are the shared credentials files
+ CredentialsFiles []string
+
+ // ConfigFiles are the shared config files
+ ConfigFiles []string
+
+ // Logger is the logger used to log shared config behavior
+ Logger logging.Logger
+}
+
+// LoadSharedConfigProfile retrieves the configuration from the list of files
+// using the profile provided. The order the files are listed will determine
+// precedence. Values in subsequent files will overwrite values defined in
+// earlier files.
+//
+// For example, given two files A and B. Both define credentials. If the order
+// of the files are A then B, B's credential values will be used instead of A's.
+//
+// If config files are not set, SDK will default to using a file at location `.aws/config` if present.
+// If credentials files are not set, SDK will default to using a file at location `.aws/credentials` if present.
+// No default files are set, if files set to an empty slice.
+//
+// You can read more about shared config and credentials file location at
+// https://docs.aws.amazon.com/credref/latest/refdocs/file-location.html#file-location
+//
+func LoadSharedConfigProfile(ctx context.Context, profile string, optFns ...func(*LoadSharedConfigOptions)) (SharedConfig, error) {
+ var option LoadSharedConfigOptions
+ for _, fn := range optFns {
+ fn(&option)
+ }
+
+ if option.ConfigFiles == nil {
+ option.ConfigFiles = DefaultSharedConfigFiles
+ }
+
+ if option.CredentialsFiles == nil {
+ option.CredentialsFiles = DefaultSharedCredentialsFiles
+ }
+
+ // load shared configuration sections from shared configuration INI options
+ configSections, err := loadIniFiles(option.ConfigFiles)
+ if err != nil {
+ return SharedConfig{}, err
+ }
+
+ // check for profile prefix and drop duplicates or invalid profiles
+ err = processConfigSections(ctx, configSections, option.Logger)
+ if err != nil {
+ return SharedConfig{}, err
+ }
+
+ // load shared credentials sections from shared credentials INI options
+ credentialsSections, err := loadIniFiles(option.CredentialsFiles)
+ if err != nil {
+ return SharedConfig{}, err
+ }
+
+ // check for profile prefix and drop duplicates or invalid profiles
+ err = processCredentialsSections(ctx, credentialsSections, option.Logger)
+ if err != nil {
+ return SharedConfig{}, err
+ }
+
+ err = mergeSections(configSections, credentialsSections)
+ if err != nil {
+ return SharedConfig{}, err
+ }
+
+ cfg := SharedConfig{}
+ profiles := map[string]struct{}{}
+ if err = cfg.setFromIniSections(profiles, profile, configSections, option.Logger); err != nil {
+ return SharedConfig{}, err
+ }
+
+ return cfg, nil
+}
+
+func processConfigSections(ctx context.Context, sections ini.Sections, logger logging.Logger) error {
+ for _, section := range sections.List() {
+ // drop profiles without prefix for config files
+ if !strings.HasPrefix(section, profilePrefix) && !strings.EqualFold(section, "default") {
+ // drop this section, as invalid profile name
+ sections.DeleteSection(section)
+
+ if logger != nil {
+ logger.Logf(logging.Debug,
+ "A profile defined with name `%v` is ignored. For use within a shared configuration file, "+
+ "a non-default profile must have `profile ` prefixed to the profile name.\n",
+ section,
+ )
+ }
+ }
+ }
+
+ // rename sections to remove `profile ` prefixing to match with credentials file.
+ // if default is already present, it will be dropped.
+ for _, section := range sections.List() {
+ if strings.HasPrefix(section, profilePrefix) {
+ v, ok := sections.GetSection(section)
+ if !ok {
+ return fmt.Errorf("error processing profiles within the shared configuration files")
+ }
+
+ // delete section with profile as prefix
+ sections.DeleteSection(section)
+
+ // set the value to non-prefixed name in sections.
+ section = strings.TrimPrefix(section, profilePrefix)
+ if sections.HasSection(section) {
+ oldSection, _ := sections.GetSection(section)
+ v.Logs = append(v.Logs,
+ fmt.Sprintf("A default profile prefixed with `profile ` found in %s, "+
+ "overrided non-prefixed default profile from %s", v.SourceFile, oldSection.SourceFile))
+ }
+
+ // assign non-prefixed name to section
+ v.Name = section
+ sections.SetSection(section, v)
+ }
+ }
+ return nil
+}
+
+func processCredentialsSections(ctx context.Context, sections ini.Sections, logger logging.Logger) error {
+ for _, section := range sections.List() {
+ // drop profiles with prefix for credential files
+ if strings.HasPrefix(section, profilePrefix) {
+ // drop this section, as invalid profile name
+ sections.DeleteSection(section)
+
+ if logger != nil {
+ logger.Logf(logging.Debug,
+ "The profile defined with name `%v` is ignored. A profile with the `profile ` prefix is invalid "+
+ "for the shared credentials file.\n",
+ section,
+ )
+ }
+ }
+ }
+ return nil
+}
+
+func loadIniFiles(filenames []string) (ini.Sections, error) {
+ mergedSections := ini.NewSections()
+
+ for _, filename := range filenames {
+ sections, err := ini.OpenFile(filename)
+ var v *ini.UnableToReadFile
+ if ok := errors.As(err, &v); ok {
+ // Skip files which can't be opened and read for whatever reason.
+ // We treat such files as empty, and do not fall back to other locations.
+ continue
+ } else if err != nil {
+ return ini.Sections{}, SharedConfigLoadError{Filename: filename, Err: err}
+ }
+
+ // mergeSections into mergedSections
+ err = mergeSections(mergedSections, sections)
+ if err != nil {
+ return ini.Sections{}, SharedConfigLoadError{Filename: filename, Err: err}
+ }
+ }
+
+ return mergedSections, nil
+}
+
+// mergeSections merges source section properties into destination section properties
+func mergeSections(dst, src ini.Sections) error {
+ for _, sectionName := range src.List() {
+ srcSection, _ := src.GetSection(sectionName)
+
+ if (!srcSection.Has(accessKeyIDKey) && srcSection.Has(secretAccessKey)) ||
+ (srcSection.Has(accessKeyIDKey) && !srcSection.Has(secretAccessKey)) {
+ srcSection.Errors = append(srcSection.Errors,
+ fmt.Errorf("partial credentials found for profile %v", sectionName))
+ }
+
+ if !dst.HasSection(sectionName) {
+ dst.SetSection(sectionName, srcSection)
+ continue
+ }
+
+ // merge with destination srcSection
+ dstSection, _ := dst.GetSection(sectionName)
+
+ // errors should be overriden if any
+ dstSection.Errors = srcSection.Errors
+
+ // Access key id update
+ if srcSection.Has(accessKeyIDKey) && srcSection.Has(secretAccessKey) {
+ accessKey := srcSection.String(accessKeyIDKey)
+ secretKey := srcSection.String(secretAccessKey)
+
+ if dstSection.Has(accessKeyIDKey) {
+ dstSection.Logs = append(dstSection.Logs,
+ fmt.Sprintf("For profile: %v, overriding credentials value for aws access key id, "+
+ "and aws secret access key, defined in %v, with values found in a duplicate profile "+
+ "defined at file %v. \n",
+ sectionName, dstSection.SourceFile[accessKeyIDKey],
+ srcSection.SourceFile[accessKeyIDKey]))
+ }
+
+ // update access key
+ v, err := ini.NewStringValue(accessKey)
+ if err != nil {
+ return fmt.Errorf("error merging access key, %w", err)
+ }
+ dstSection.UpdateValue(accessKeyIDKey, v)
+
+ // update secret key
+ v, err = ini.NewStringValue(secretKey)
+ if err != nil {
+ return fmt.Errorf("error merging secret key, %w", err)
+ }
+ dstSection.UpdateValue(secretAccessKey, v)
+
+ // update session token
+ if srcSection.Has(sessionTokenKey) {
+ sessionKey := srcSection.String(sessionTokenKey)
+
+ val, e := ini.NewStringValue(sessionKey)
+ if e != nil {
+ return fmt.Errorf("error merging session key, %w", e)
+ }
+
+ if dstSection.Has(sessionTokenKey) {
+ dstSection.Logs = append(dstSection.Logs,
+ fmt.Sprintf("For profile: %v, overriding %v value, defined in %v "+
+ "with a %v value found in a duplicate profile defined at file %v. \n",
+ sectionName, sessionTokenKey, dstSection.SourceFile[sessionTokenKey],
+ sessionTokenKey, srcSection.SourceFile[sessionTokenKey]))
+ }
+
+ dstSection.UpdateValue(sessionTokenKey, val)
+ dstSection.UpdateSourceFile(sessionTokenKey, srcSection.SourceFile[sessionTokenKey])
+ }
+
+ // update source file to reflect where the static creds came from
+ dstSection.UpdateSourceFile(accessKeyIDKey, srcSection.SourceFile[accessKeyIDKey])
+ dstSection.UpdateSourceFile(secretAccessKey, srcSection.SourceFile[secretAccessKey])
+ }
+
+ if srcSection.Has(roleArnKey) {
+ key := srcSection.String(roleArnKey)
+ val, err := ini.NewStringValue(key)
+ if err != nil {
+ return fmt.Errorf("error merging roleArnKey, %w", err)
+ }
+
+ if dstSection.Has(roleArnKey) {
+ dstSection.Logs = append(dstSection.Logs,
+ fmt.Sprintf("For profile: %v, overriding %v value, defined in %v "+
+ "with a %v value found in a duplicate profile defined at file %v. \n",
+ sectionName, roleArnKey, dstSection.SourceFile[roleArnKey],
+ roleArnKey, srcSection.SourceFile[roleArnKey]))
+ }
+
+ dstSection.UpdateValue(roleArnKey, val)
+ dstSection.UpdateSourceFile(roleArnKey, srcSection.SourceFile[roleArnKey])
+ }
+
+ if srcSection.Has(sourceProfileKey) {
+ key := srcSection.String(sourceProfileKey)
+ val, err := ini.NewStringValue(key)
+ if err != nil {
+ return fmt.Errorf("error merging sourceProfileKey, %w", err)
+ }
+
+ if dstSection.Has(sourceProfileKey) {
+ dstSection.Logs = append(dstSection.Logs,
+ fmt.Sprintf("For profile: %v, overriding %v value, defined in %v "+
+ "with a %v value found in a duplicate profile defined at file %v. \n",
+ sectionName, sourceProfileKey, dstSection.SourceFile[sourceProfileKey],
+ sourceProfileKey, srcSection.SourceFile[sourceProfileKey]))
+ }
+
+ dstSection.UpdateValue(sourceProfileKey, val)
+ dstSection.UpdateSourceFile(sourceProfileKey, srcSection.SourceFile[sourceProfileKey])
+ }
+
+ if srcSection.Has(credentialSourceKey) {
+ key := srcSection.String(credentialSourceKey)
+ val, err := ini.NewStringValue(key)
+ if err != nil {
+ return fmt.Errorf("error merging credentialSourceKey, %w", err)
+ }
+
+ if dstSection.Has(credentialSourceKey) {
+ dstSection.Logs = append(dstSection.Logs,
+ fmt.Sprintf("For profile: %v, overriding %v value, defined in %v "+
+ "with a %v value found in a duplicate profile defined at file %v. \n",
+ sectionName, credentialSourceKey, dstSection.SourceFile[credentialSourceKey],
+ credentialSourceKey, srcSection.SourceFile[credentialSourceKey]))
+ }
+
+ dstSection.UpdateValue(credentialSourceKey, val)
+ dstSection.UpdateSourceFile(credentialSourceKey, srcSection.SourceFile[credentialSourceKey])
+ }
+
+ if srcSection.Has(externalIDKey) {
+ key := srcSection.String(externalIDKey)
+ val, err := ini.NewStringValue(key)
+ if err != nil {
+ return fmt.Errorf("error merging externalIDKey, %w", err)
+ }
+
+ if dstSection.Has(externalIDKey) {
+ dstSection.Logs = append(dstSection.Logs,
+ fmt.Sprintf("For profile: %v, overriding %v value, defined in %v "+
+ "with a %v value found in a duplicate profile defined at file %v. \n",
+ sectionName, externalIDKey, dstSection.SourceFile[externalIDKey],
+ externalIDKey, srcSection.SourceFile[externalIDKey]))
+ }
+
+ dstSection.UpdateValue(externalIDKey, val)
+ dstSection.UpdateSourceFile(externalIDKey, srcSection.SourceFile[externalIDKey])
+ }
+
+ if srcSection.Has(mfaSerialKey) {
+ key := srcSection.String(mfaSerialKey)
+ val, err := ini.NewStringValue(key)
+ if err != nil {
+ return fmt.Errorf("error merging mfaSerialKey, %w", err)
+ }
+
+ if dstSection.Has(mfaSerialKey) {
+ dstSection.Logs = append(dstSection.Logs,
+ fmt.Sprintf("For profile: %v, overriding %v value, defined in %v "+
+ "with a %v value found in a duplicate profile defined at file %v. \n",
+ sectionName, mfaSerialKey, dstSection.SourceFile[mfaSerialKey],
+ mfaSerialKey, srcSection.SourceFile[mfaSerialKey]))
+ }
+
+ dstSection.UpdateValue(mfaSerialKey, val)
+ dstSection.UpdateSourceFile(mfaSerialKey, srcSection.SourceFile[mfaSerialKey])
+ }
+
+ if srcSection.Has(roleSessionNameKey) {
+ key := srcSection.String(roleSessionNameKey)
+ val, err := ini.NewStringValue(key)
+ if err != nil {
+ return fmt.Errorf("error merging roleSessionNameKey, %w", err)
+ }
+
+ if dstSection.Has(roleSessionNameKey) {
+ dstSection.Logs = append(dstSection.Logs,
+ fmt.Sprintf("For profile: %v, overriding %v value, defined in %v "+
+ "with a %v value found in a duplicate profile defined at file %v. \n",
+ sectionName, roleSessionNameKey, dstSection.SourceFile[roleSessionNameKey],
+ roleSessionNameKey, srcSection.SourceFile[roleSessionNameKey]))
+ }
+
+ dstSection.UpdateValue(roleSessionNameKey, val)
+ dstSection.UpdateSourceFile(roleSessionNameKey, srcSection.SourceFile[roleSessionNameKey])
+ }
+
+ // role duration seconds key update
+ if srcSection.Has(roleDurationSecondsKey) {
+ roleDurationSeconds := srcSection.Int(roleDurationSecondsKey)
+ v, err := ini.NewIntValue(roleDurationSeconds)
+ if err != nil {
+ return fmt.Errorf("error merging role duration seconds key, %w", err)
+ }
+ dstSection.UpdateValue(roleDurationSecondsKey, v)
+
+ dstSection.UpdateSourceFile(roleDurationSecondsKey, srcSection.SourceFile[roleDurationSecondsKey])
+ }
+
+ if srcSection.Has(regionKey) {
+ key := srcSection.String(regionKey)
+ val, err := ini.NewStringValue(key)
+ if err != nil {
+ return fmt.Errorf("error merging regionKey, %w", err)
+ }
+
+ if dstSection.Has(regionKey) {
+ dstSection.Logs = append(dstSection.Logs,
+ fmt.Sprintf("For profile: %v, overriding %v value, defined in %v "+
+ "with a %v value found in a duplicate profile defined at file %v. \n",
+ sectionName, regionKey, dstSection.SourceFile[regionKey],
+ regionKey, srcSection.SourceFile[regionKey]))
+ }
+
+ dstSection.UpdateValue(regionKey, val)
+ dstSection.UpdateSourceFile(regionKey, srcSection.SourceFile[regionKey])
+ }
+
+ if srcSection.Has(enableEndpointDiscoveryKey) {
+ key := srcSection.String(enableEndpointDiscoveryKey)
+ val, err := ini.NewStringValue(key)
+ if err != nil {
+ return fmt.Errorf("error merging enableEndpointDiscoveryKey, %w", err)
+ }
+
+ if dstSection.Has(enableEndpointDiscoveryKey) {
+ dstSection.Logs = append(dstSection.Logs,
+ fmt.Sprintf("For profile: %v, overriding %v value, defined in %v "+
+ "with a %v value found in a duplicate profile defined at file %v. \n",
+ sectionName, enableEndpointDiscoveryKey, dstSection.SourceFile[enableEndpointDiscoveryKey],
+ enableEndpointDiscoveryKey, srcSection.SourceFile[enableEndpointDiscoveryKey]))
+ }
+
+ dstSection.UpdateValue(enableEndpointDiscoveryKey, val)
+ dstSection.UpdateSourceFile(enableEndpointDiscoveryKey, srcSection.SourceFile[enableEndpointDiscoveryKey])
+ }
+
+ if srcSection.Has(credentialProcessKey) {
+ key := srcSection.String(credentialProcessKey)
+ val, err := ini.NewStringValue(key)
+ if err != nil {
+ return fmt.Errorf("error merging credentialProcessKey, %w", err)
+ }
+
+ if dstSection.Has(credentialProcessKey) {
+ dstSection.Logs = append(dstSection.Logs,
+ fmt.Sprintf("For profile: %v, overriding %v value, defined in %v "+
+ "with a %v value found in a duplicate profile defined at file %v. \n",
+ sectionName, credentialProcessKey, dstSection.SourceFile[credentialProcessKey],
+ credentialProcessKey, srcSection.SourceFile[credentialProcessKey]))
+ }
+
+ dstSection.UpdateValue(credentialProcessKey, val)
+ dstSection.UpdateSourceFile(credentialProcessKey, srcSection.SourceFile[credentialProcessKey])
+ }
+
+ if srcSection.Has(webIdentityTokenFileKey) {
+ key := srcSection.String(webIdentityTokenFileKey)
+ val, err := ini.NewStringValue(key)
+ if err != nil {
+ return fmt.Errorf("error merging webIdentityTokenFileKey, %w", err)
+ }
+
+ if dstSection.Has(webIdentityTokenFileKey) {
+ dstSection.Logs = append(dstSection.Logs,
+ fmt.Sprintf("For profile: %v, overriding %v value, defined in %v "+
+ "with a %v value found in a duplicate profile defined at file %v. \n",
+ sectionName, webIdentityTokenFileKey, dstSection.SourceFile[webIdentityTokenFileKey],
+ webIdentityTokenFileKey, srcSection.SourceFile[webIdentityTokenFileKey]))
+ }
+
+ dstSection.UpdateValue(webIdentityTokenFileKey, val)
+ dstSection.UpdateSourceFile(webIdentityTokenFileKey, srcSection.SourceFile[webIdentityTokenFileKey])
+ }
+
+ if srcSection.Has(s3UseARNRegionKey) {
+ key := srcSection.String(s3UseARNRegionKey)
+ val, err := ini.NewStringValue(key)
+ if err != nil {
+ return fmt.Errorf("error merging s3UseARNRegionKey, %w", err)
+ }
+
+ if dstSection.Has(s3UseARNRegionKey) {
+ dstSection.Logs = append(dstSection.Logs,
+ fmt.Sprintf("For profile: %v, overriding %v value, defined in %v "+
+ "with a %v value found in a duplicate profile defined at file %v. \n",
+ sectionName, s3UseARNRegionKey, dstSection.SourceFile[s3UseARNRegionKey],
+ s3UseARNRegionKey, srcSection.SourceFile[s3UseARNRegionKey]))
+ }
+
+ dstSection.UpdateValue(s3UseARNRegionKey, val)
+ dstSection.UpdateSourceFile(s3UseARNRegionKey, srcSection.SourceFile[s3UseARNRegionKey])
+ }
+
+ if srcSection.Has(s3DisableMultiRegionAccessPointsKey) {
+ key := srcSection.String(s3DisableMultiRegionAccessPointsKey)
+ val, err := ini.NewStringValue(key)
+ if err != nil {
+ return fmt.Errorf("error merging s3DisableMultiRegionAccessPointsKey, %w", err)
+ }
+
+ if dstSection.Has(s3DisableMultiRegionAccessPointsKey) {
+ dstSection.Logs = append(dstSection.Logs,
+ fmt.Sprintf("For profile: %v, overriding %v value, defined in %v "+
+ "with a %v value found in a duplicate profile defined at file %v. \n",
+ sectionName, s3DisableMultiRegionAccessPointsKey, dstSection.SourceFile[s3DisableMultiRegionAccessPointsKey],
+ s3DisableMultiRegionAccessPointsKey, srcSection.SourceFile[s3DisableMultiRegionAccessPointsKey]))
+ }
+
+ dstSection.UpdateValue(s3DisableMultiRegionAccessPointsKey, val)
+ dstSection.UpdateSourceFile(s3DisableMultiRegionAccessPointsKey, srcSection.SourceFile[s3DisableMultiRegionAccessPointsKey])
+ }
+
+ // set srcSection on dst srcSection
+ dst = dst.SetSection(sectionName, dstSection)
+ }
+
+ return nil
+}
+
+// Returns an error if all of the files fail to load. If at least one file is
+// successfully loaded and contains the profile, no error will be returned.
+func (c *SharedConfig) setFromIniSections(profiles map[string]struct{}, profile string,
+ sections ini.Sections, logger logging.Logger) error {
+ c.Profile = profile
+
+ section, ok := sections.GetSection(profile)
+ if !ok {
+ return SharedConfigProfileNotExistError{
+ Profile: profile,
+ }
+ }
+
+ // if logs are appended to the section, log them
+ if section.Logs != nil && logger != nil {
+ for _, log := range section.Logs {
+ logger.Logf(logging.Debug, log)
+ }
+ }
+
+ // set config from the provided ini section
+ err := c.setFromIniSection(profile, section)
+ if err != nil {
+ return fmt.Errorf("error fetching config from profile, %v, %w", profile, err)
+ }
+
+ if _, ok := profiles[profile]; ok {
+ // if this is the second instance of the profile the Assume Role
+ // options must be cleared because they are only valid for the
+ // first reference of a profile. The self linked instance of the
+ // profile only have credential provider options.
+ c.clearAssumeRoleOptions()
+ } else {
+ // First time a profile has been seen, It must either be a assume role
+ // credentials, or SSO. Assert if the credential type requires a role ARN,
+ // the ARN is also set, or validate that the SSO configuration is complete.
+ if err := c.validateCredentialsConfig(profile); err != nil {
+ return err
+ }
+ }
+
+ // if not top level profile and has credentials, return with credentials.
+ if len(profiles) != 0 && c.Credentials.HasKeys() {
+ return nil
+ }
+
+ profiles[profile] = struct{}{}
+
+ // validate no colliding credentials type are present
+ if err := c.validateCredentialType(); err != nil {
+ return err
+ }
+
+ // Link source profiles for assume roles
+ if len(c.SourceProfileName) != 0 {
+ // Linked profile via source_profile ignore credential provider
+ // options, the source profile must provide the credentials.
+ c.clearCredentialOptions()
+
+ srcCfg := &SharedConfig{}
+ err := srcCfg.setFromIniSections(profiles, c.SourceProfileName, sections, logger)
+ if err != nil {
+ // SourceProfileName that doesn't exist is an error in configuration.
+ if _, ok := err.(SharedConfigProfileNotExistError); ok {
+ err = SharedConfigAssumeRoleError{
+ RoleARN: c.RoleARN,
+ Profile: c.SourceProfileName,
+ Err: err,
+ }
+ }
+ return err
+ }
+
+ if !srcCfg.hasCredentials() {
+ return SharedConfigAssumeRoleError{
+ RoleARN: c.RoleARN,
+ Profile: c.SourceProfileName,
+ }
+ }
+
+ c.Source = srcCfg
+ }
+
+ return nil
+}
+
+// setFromIniSection loads the configuration from the profile section defined in
+// the provided ini file. A SharedConfig pointer type value is used so that
+// multiple config file loadings can be chained.
+//
+// Only loads complete logically grouped values, and will not set fields in cfg
+// for incomplete grouped values in the config. Such as credentials. For example
+// if a config file only includes aws_access_key_id but no aws_secret_access_key
+// the aws_access_key_id will be ignored.
+func (c *SharedConfig) setFromIniSection(profile string, section ini.Section) error {
+ if len(section.Name) == 0 {
+ sources := make([]string, 0)
+ for _, v := range section.SourceFile {
+ sources = append(sources, v)
+ }
+
+ return fmt.Errorf("parsing error : could not find profile section name after processing files: %v", sources)
+ }
+
+ if len(section.Errors) != 0 {
+ var errStatement string
+ for i, e := range section.Errors {
+ errStatement = fmt.Sprintf("%d, %v\n", i+1, e.Error())
+ }
+ return fmt.Errorf("Error using profile: \n %v", errStatement)
+ }
+
+ // Assume Role
+ updateString(&c.RoleARN, section, roleArnKey)
+ updateString(&c.ExternalID, section, externalIDKey)
+ updateString(&c.MFASerial, section, mfaSerialKey)
+ updateString(&c.RoleSessionName, section, roleSessionNameKey)
+ updateString(&c.SourceProfileName, section, sourceProfileKey)
+ updateString(&c.CredentialSource, section, credentialSourceKey)
+ updateString(&c.Region, section, regionKey)
+
+ // AWS Single Sign-On (AWS SSO)
+ updateString(&c.SSOAccountID, section, ssoAccountIDKey)
+ updateString(&c.SSORegion, section, ssoRegionKey)
+ updateString(&c.SSORoleName, section, ssoRoleNameKey)
+ updateString(&c.SSOStartURL, section, ssoStartURL)
+
+ if section.Has(roleDurationSecondsKey) {
+ d := time.Duration(section.Int(roleDurationSecondsKey)) * time.Second
+ c.RoleDurationSeconds = &d
+ }
+
+ updateString(&c.CredentialProcess, section, credentialProcessKey)
+ updateString(&c.WebIdentityTokenFile, section, webIdentityTokenFileKey)
+
+ updateEndpointDiscoveryType(&c.EnableEndpointDiscovery, section, enableEndpointDiscoveryKey)
+ updateBoolPtr(&c.S3UseARNRegion, section, s3UseARNRegionKey)
+ updateBoolPtr(&c.S3DisableMultiRegionAccessPoints, section, s3DisableMultiRegionAccessPointsKey)
+
+ if err := updateEC2MetadataServiceEndpointMode(&c.EC2IMDSEndpointMode, section, ec2MetadataServiceEndpointModeKey); err != nil {
+ return fmt.Errorf("failed to load %s from shared config, %v", ec2MetadataServiceEndpointModeKey, err)
+ }
+ updateString(&c.EC2IMDSEndpoint, section, ec2MetadataServiceEndpointKey)
+
+ // Shared Credentials
+ creds := aws.Credentials{
+ AccessKeyID: section.String(accessKeyIDKey),
+ SecretAccessKey: section.String(secretAccessKey),
+ SessionToken: section.String(sessionTokenKey),
+ Source: fmt.Sprintf("SharedConfigCredentials: %s", section.SourceFile[accessKeyIDKey]),
+ }
+
+ if creds.HasKeys() {
+ c.Credentials = creds
+ }
+
+ return nil
+}
+
+func updateEC2MetadataServiceEndpointMode(endpointMode *imds.EndpointModeState, section ini.Section, key string) error {
+ if !section.Has(key) {
+ return nil
+ }
+ value := section.String(key)
+ return endpointMode.SetFromString(value)
+}
+
+func (c *SharedConfig) validateCredentialsConfig(profile string) error {
+ if err := c.validateCredentialsRequireARN(profile); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (c *SharedConfig) validateCredentialsRequireARN(profile string) error {
+ var credSource string
+
+ switch {
+ case len(c.SourceProfileName) != 0:
+ credSource = sourceProfileKey
+ case len(c.CredentialSource) != 0:
+ credSource = credentialSourceKey
+ case len(c.WebIdentityTokenFile) != 0:
+ credSource = webIdentityTokenFileKey
+ }
+
+ if len(credSource) != 0 && len(c.RoleARN) == 0 {
+ return CredentialRequiresARNError{
+ Type: credSource,
+ Profile: profile,
+ }
+ }
+
+ return nil
+}
+
+func (c *SharedConfig) validateCredentialType() error {
+ // Only one or no credential type can be defined.
+ if !oneOrNone(
+ len(c.SourceProfileName) != 0,
+ len(c.CredentialSource) != 0,
+ len(c.CredentialProcess) != 0,
+ len(c.WebIdentityTokenFile) != 0,
+ ) {
+ return fmt.Errorf("only one credential type may be specified per profile: source profile, credential source, credential process, web identity token, or sso")
+ }
+
+ return nil
+}
+
+func (c *SharedConfig) validateSSOConfiguration() error {
+ if !c.hasSSOConfiguration() {
+ return nil
+ }
+
+ var missing []string
+ if len(c.SSOAccountID) == 0 {
+ missing = append(missing, ssoAccountIDKey)
+ }
+
+ if len(c.SSORegion) == 0 {
+ missing = append(missing, ssoRegionKey)
+ }
+
+ if len(c.SSORoleName) == 0 {
+ missing = append(missing, ssoRoleNameKey)
+ }
+
+ if len(c.SSOStartURL) == 0 {
+ missing = append(missing, ssoStartURL)
+ }
+
+ if len(missing) > 0 {
+ return fmt.Errorf("profile %q is configured to use SSO but is missing required configuration: %s",
+ c.Profile, strings.Join(missing, ", "))
+ }
+
+ return nil
+}
+
+func (c *SharedConfig) hasCredentials() bool {
+ switch {
+ case len(c.SourceProfileName) != 0:
+ case len(c.CredentialSource) != 0:
+ case len(c.CredentialProcess) != 0:
+ case len(c.WebIdentityTokenFile) != 0:
+ case c.hasSSOConfiguration():
+ case c.Credentials.HasKeys():
+ default:
+ return false
+ }
+
+ return true
+}
+
+func (c *SharedConfig) hasSSOConfiguration() bool {
+ switch {
+ case len(c.SSOAccountID) != 0:
+ case len(c.SSORegion) != 0:
+ case len(c.SSORoleName) != 0:
+ case len(c.SSOStartURL) != 0:
+ default:
+ return false
+ }
+ return true
+}
+
+func (c *SharedConfig) clearAssumeRoleOptions() {
+ c.RoleARN = ""
+ c.ExternalID = ""
+ c.MFASerial = ""
+ c.RoleSessionName = ""
+ c.SourceProfileName = ""
+}
+
+func (c *SharedConfig) clearCredentialOptions() {
+ c.CredentialSource = ""
+ c.CredentialProcess = ""
+ c.WebIdentityTokenFile = ""
+ c.Credentials = aws.Credentials{}
+ c.SSOAccountID = ""
+ c.SSORegion = ""
+ c.SSORoleName = ""
+ c.SSOStartURL = ""
+}
+
+// SharedConfigLoadError is an error for the shared config file failed to load.
+type SharedConfigLoadError struct {
+ Filename string
+ Err error
+}
+
+// Unwrap returns the underlying error that caused the failure.
+func (e SharedConfigLoadError) Unwrap() error {
+ return e.Err
+}
+
+func (e SharedConfigLoadError) Error() string {
+ return fmt.Sprintf("failed to load shared config file, %s, %v", e.Filename, e.Err)
+}
+
+// SharedConfigProfileNotExistError is an error for the shared config when
+// the profile was not find in the config file.
+type SharedConfigProfileNotExistError struct {
+ Filename []string
+ Profile string
+ Err error
+}
+
+// Unwrap returns the underlying error that caused the failure.
+func (e SharedConfigProfileNotExistError) Unwrap() error {
+ return e.Err
+}
+
+func (e SharedConfigProfileNotExistError) Error() string {
+ return fmt.Sprintf("failed to get shared config profile, %s", e.Profile)
+}
+
+// SharedConfigAssumeRoleError is an error for the shared config when the
+// profile contains assume role information, but that information is invalid
+// or not complete.
+type SharedConfigAssumeRoleError struct {
+ Profile string
+ RoleARN string
+ Err error
+}
+
+// Unwrap returns the underlying error that caused the failure.
+func (e SharedConfigAssumeRoleError) Unwrap() error {
+ return e.Err
+}
+
+func (e SharedConfigAssumeRoleError) Error() string {
+ return fmt.Sprintf("failed to load assume role %s, of profile %s, %v",
+ e.RoleARN, e.Profile, e.Err)
+}
+
+// CredentialRequiresARNError provides the error for shared config credentials
+// that are incorrectly configured in the shared config or credentials file.
+type CredentialRequiresARNError struct {
+ // type of credentials that were configured.
+ Type string
+
+ // Profile name the credentials were in.
+ Profile string
+}
+
+// Error satisfies the error interface.
+func (e CredentialRequiresARNError) Error() string {
+ return fmt.Sprintf(
+ "credential type %s requires role_arn, profile %s",
+ e.Type, e.Profile,
+ )
+}
+
+func userHomeDir() string {
+ if runtime.GOOS == "windows" { // Windows
+ return os.Getenv("USERPROFILE")
+ }
+
+ // *nix
+ return os.Getenv("HOME")
+}
+
+func oneOrNone(bs ...bool) bool {
+ var count int
+
+ for _, b := range bs {
+ if b {
+ count++
+ if count > 1 {
+ return false
+ }
+ }
+ }
+
+ return true
+}
+
+// updateString will only update the dst with the value in the section key, key
+// is present in the section.
+func updateString(dst *string, section ini.Section, key string) {
+ if !section.Has(key) {
+ return
+ }
+ *dst = section.String(key)
+}
+
+// updateBool will only update the dst with the value in the section key, key
+// is present in the section.
+func updateBool(dst *bool, section ini.Section, key string) {
+ if !section.Has(key) {
+ return
+ }
+ *dst = section.Bool(key)
+}
+
+// updateBoolPtr will only update the dst with the value in the section key,
+// key is present in the section.
+func updateBoolPtr(dst **bool, section ini.Section, key string) {
+ if !section.Has(key) {
+ return
+ }
+ *dst = new(bool)
+ **dst = section.Bool(key)
+}
+
+// updateEndpointDiscoveryType will only update the dst with the value in the section, if
+// a valid key and corresponding EndpointDiscoveryType is found.
+func updateEndpointDiscoveryType(dst *aws.EndpointDiscoveryEnableState, section ini.Section, key string) {
+ if !section.Has(key) {
+ return
+ }
+
+ value := section.String(key)
+ if len(value) == 0 {
+ return
+ }
+
+ switch {
+ case strings.EqualFold(value, endpointDiscoveryDisabled):
+ *dst = aws.EndpointDiscoveryDisabled
+ case strings.EqualFold(value, endpointDiscoveryEnabled):
+ *dst = aws.EndpointDiscoveryEnabled
+ case strings.EqualFold(value, endpointDiscoveryAuto):
+ *dst = aws.EndpointDiscoveryAuto
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/credentials/CHANGELOG.md
new file mode 100644
index 00000000..63ef7983
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/CHANGELOG.md
@@ -0,0 +1,43 @@
+# v1.4.2 (2021-09-17)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.4.1 (2021-09-10)
+
+* **Documentation**: Fixes the AssumeRoleProvider's documentation for using custom TokenProviders.
+
+# v1.4.0 (2021-08-27)
+
+* **Feature**: Adds support for Tags and TransitiveTagKeys to stscreds.AssumeRoleProvider. Closes https://github.com/aws/aws-sdk-go-v2/issues/723
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.3 (2021-08-19)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.2 (2021-08-04)
+
+* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.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.3.0 (2021-06-25)
+
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Bug Fix**: Fixed example usages of aws.CredentialsCache ([#1275](https://github.com/aws/aws-sdk-go-v2/pull/1275))
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.2.1 (2021-05-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.2.0 (2021-05-14)
+
+* **Feature**: Constant has been added to modules to enable runtime version inspection for reporting.
+* **Dependency Update**: Updated to the latest SDK module versions
+
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/LICENSE.txt b/vendor/github.com/aws/aws-sdk-go-v2/credentials/LICENSE.txt
new file mode 100644
index 00000000..d6456956
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/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/credentials/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/doc.go
new file mode 100644
index 00000000..f6e2873a
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/doc.go
@@ -0,0 +1,4 @@
+/*
+Package credentials provides types for retrieving credentials from credentials sources.
+*/
+package credentials
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/ec2rolecreds/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/ec2rolecreds/doc.go
new file mode 100644
index 00000000..ae25c3a4
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/ec2rolecreds/doc.go
@@ -0,0 +1,58 @@
+// Package ec2rolecreds provides the credentials provider implementation for
+// retrieving AWS credentials from Amazon EC2 Instance Roles via Amazon EC2 IMDS.
+//
+// Concurrency and caching
+//
+// The Provider is not safe to be used concurrently, and does not provide any
+// caching of credentials retrieved. You should wrap the Provider with a
+// `aws.CredentialsCache` to provide concurrency safety, and caching of
+// credentials.
+//
+// Loading credentials with the SDK's AWS Config
+//
+// The EC2 Instance role credentials provider will automatically be the resolved
+// credential provider int he credential chain if no other credential provider is
+// resolved first.
+//
+// To explicitly instruct the SDK's credentials resolving to use the EC2 Instance
+// role for credentials, you specify a `credentials_source` property in the config
+// profile the SDK will load.
+//
+// [default]
+// credential_source = Ec2InstanceMetadata
+//
+// Loading credentials with the Provider directly
+//
+// Another way to use the EC2 Instance role credentials provider is to create it
+// directly and assign it as the credentials provider for an API client.
+//
+// The following example creates a credentials provider for a command, and wraps
+// it with the CredentialsCache before assigning the provider to the Amazon S3 API
+// client's Credentials option.
+//
+// provider := imds.New(imds.Options{})
+//
+// // Create the service client value configured for credentials.
+// svc := s3.New(s3.Options{
+// Credentials: aws.NewCredentialsCache(provider),
+// })
+//
+// If you need more control, you can set the configuration options on the
+// credentials provider using the imds.Options type to configure the EC2 IMDS
+// API Client and ExpiryWindow of the retrieved credentials.
+//
+// provider := imds.New(imds.Options{
+// // See imds.Options type's documentation for more options available.
+// Client: imds.New(Options{
+// HTTPClient: customHTTPClient,
+// }),
+//
+// // Modify how soon credentials expire prior to their original expiry time.
+// ExpiryWindow: 5 * time.Minute,
+// })
+//
+// EC2 IMDS API Client
+//
+// See the github.com/aws/aws-sdk-go-v2/feature/ec2/imds module for more details on
+// configuring the client, and options available.
+package ec2rolecreds
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/ec2rolecreds/provider.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/ec2rolecreds/provider.go
new file mode 100644
index 00000000..901132a3
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/ec2rolecreds/provider.go
@@ -0,0 +1,174 @@
+package ec2rolecreds
+
+import (
+ "bufio"
+ "context"
+ "encoding/json"
+ "fmt"
+ "path"
+ "strings"
+ "time"
+
+ "github.com/aws/aws-sdk-go-v2/aws"
+ "github.com/aws/aws-sdk-go-v2/feature/ec2/imds"
+ "github.com/aws/smithy-go"
+)
+
+// ProviderName provides a name of EC2Role provider
+const ProviderName = "EC2RoleProvider"
+
+// GetMetadataAPIClient provides the interface for an EC2 IMDS API client for the
+// GetMetadata operation.
+type GetMetadataAPIClient interface {
+ GetMetadata(context.Context, *imds.GetMetadataInput, ...func(*imds.Options)) (*imds.GetMetadataOutput, error)
+}
+
+// A Provider retrieves credentials from the EC2 service, and keeps track if
+// those credentials are expired.
+//
+// The New function must be used to create the Provider.
+//
+// p := &ec2rolecreds.New(ec2rolecreds.Options{
+// Client: imds.New(imds.Options{}),
+//
+// // Expire the credentials 10 minutes before IAM states they should.
+// // Proactively refreshing the credentials.
+// ExpiryWindow: 10 * time.Minute
+// })
+type Provider struct {
+ options Options
+}
+
+// Options is a list of user settable options for setting the behavior of the Provider.
+type Options struct {
+ // The API client that will be used by the provider to make GetMetadata API
+ // calls to EC2 IMDS.
+ //
+ // If nil, the provider will default to the EC2 IMDS client.
+ Client GetMetadataAPIClient
+}
+
+// New returns an initialized Provider value configured to retrieve
+// credentials from EC2 Instance Metadata service.
+func New(optFns ...func(*Options)) *Provider {
+ options := Options{}
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ if options.Client == nil {
+ options.Client = imds.New(imds.Options{})
+ }
+
+ return &Provider{
+ options: options,
+ }
+}
+
+// Retrieve retrieves credentials from the EC2 service.
+// Error will be returned if the request fails, or unable to extract
+// the desired credentials.
+func (p *Provider) Retrieve(ctx context.Context) (aws.Credentials, error) {
+ credsList, err := requestCredList(ctx, p.options.Client)
+ if err != nil {
+ return aws.Credentials{Source: ProviderName}, err
+ }
+
+ if len(credsList) == 0 {
+ return aws.Credentials{Source: ProviderName},
+ fmt.Errorf("unexpected empty EC2 IMDS role list")
+ }
+ credsName := credsList[0]
+
+ roleCreds, err := requestCred(ctx, p.options.Client, credsName)
+ if err != nil {
+ return aws.Credentials{Source: ProviderName}, err
+ }
+
+ creds := aws.Credentials{
+ AccessKeyID: roleCreds.AccessKeyID,
+ SecretAccessKey: roleCreds.SecretAccessKey,
+ SessionToken: roleCreds.Token,
+ Source: ProviderName,
+
+ CanExpire: true,
+ Expires: roleCreds.Expiration,
+ }
+
+ return creds, nil
+}
+
+// A ec2RoleCredRespBody provides the shape for unmarshaling credential
+// request responses.
+type ec2RoleCredRespBody struct {
+ // Success State
+ Expiration time.Time
+ AccessKeyID string
+ SecretAccessKey string
+ Token string
+
+ // Error state
+ Code string
+ Message string
+}
+
+const iamSecurityCredsPath = "/iam/security-credentials/"
+
+// requestCredList requests a list of credentials from the EC2 service. If
+// there are no credentials, or there is an error making or receiving the
+// request
+func requestCredList(ctx context.Context, client GetMetadataAPIClient) ([]string, error) {
+ resp, err := client.GetMetadata(ctx, &imds.GetMetadataInput{
+ Path: iamSecurityCredsPath,
+ })
+ if err != nil {
+ return nil, fmt.Errorf("no EC2 IMDS role found, %w", err)
+ }
+ defer resp.Content.Close()
+
+ credsList := []string{}
+ s := bufio.NewScanner(resp.Content)
+ for s.Scan() {
+ credsList = append(credsList, s.Text())
+ }
+
+ if err := s.Err(); err != nil {
+ return nil, fmt.Errorf("failed to read EC2 IMDS role, %w", err)
+ }
+
+ return credsList, nil
+}
+
+// requestCred requests the credentials for a specific credentials from the EC2 service.
+//
+// If the credentials cannot be found, or there is an error reading the response
+// and error will be returned.
+func requestCred(ctx context.Context, client GetMetadataAPIClient, credsName string) (ec2RoleCredRespBody, error) {
+ resp, err := client.GetMetadata(ctx, &imds.GetMetadataInput{
+ Path: path.Join(iamSecurityCredsPath, credsName),
+ })
+ if err != nil {
+ return ec2RoleCredRespBody{},
+ fmt.Errorf("failed to get %s EC2 IMDS role credentials, %w",
+ credsName, err)
+ }
+ defer resp.Content.Close()
+
+ var respCreds ec2RoleCredRespBody
+ if err := json.NewDecoder(resp.Content).Decode(&respCreds); err != nil {
+ return ec2RoleCredRespBody{},
+ fmt.Errorf("failed to decode %s EC2 IMDS role credentials, %w",
+ credsName, err)
+ }
+
+ if !strings.EqualFold(respCreds.Code, "Success") {
+ // If an error code was returned something failed requesting the role.
+ return ec2RoleCredRespBody{},
+ fmt.Errorf("failed to get %s EC2 IMDS role credentials, %w",
+ credsName,
+ &smithy.GenericAPIError{Code: respCreds.Code, Message: respCreds.Message})
+ }
+
+ return respCreds, nil
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/endpointcreds/internal/client/client.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/endpointcreds/internal/client/client.go
new file mode 100644
index 00000000..60b8298f
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/endpointcreds/internal/client/client.go
@@ -0,0 +1,148 @@
+package client
+
+import (
+ "context"
+ "fmt"
+ "net/http"
+ "time"
+
+ "github.com/aws/aws-sdk-go-v2/aws"
+ "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/retry"
+ awshttp "github.com/aws/aws-sdk-go-v2/aws/transport/http"
+ "github.com/aws/smithy-go"
+ smithymiddleware "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// ServiceID is the client identifer
+const ServiceID = "endpoint-credentials"
+
+// HTTPClient is a client for sending HTTP requests
+type HTTPClient interface {
+ Do(*http.Request) (*http.Response, error)
+}
+
+// Options is the endpoint client configurable options
+type Options struct {
+ // The endpoint to retrieve credentials from
+ Endpoint string
+
+ // The HTTP client to invoke API calls with. Defaults to client's default HTTP
+ // implementation if nil.
+ HTTPClient HTTPClient
+
+ // Retryer guides how HTTP requests should be retried in case of recoverable
+ // failures. When nil the API client will use a default retryer.
+ Retryer aws.Retryer
+
+ // Set of options to modify how the credentials operation is invoked.
+ APIOptions []func(*smithymiddleware.Stack) error
+}
+
+// Copy creates a copy of the API options.
+func (o Options) Copy() Options {
+ to := o
+ to.APIOptions = make([]func(*smithymiddleware.Stack) error, len(o.APIOptions))
+ copy(to.APIOptions, o.APIOptions)
+ return to
+}
+
+// Client is an client for retrieving AWS credentials from an endpoint
+type Client struct {
+ options Options
+}
+
+// New constructs a new Client from the given options
+func New(options Options, optFns ...func(*Options)) *Client {
+ options = options.Copy()
+
+ if options.HTTPClient == nil {
+ options.HTTPClient = awshttp.NewBuildableClient()
+ }
+
+ if options.Retryer == nil {
+ options.Retryer = retry.NewStandard()
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ client := &Client{
+ options: options,
+ }
+
+ return client
+}
+
+// GetCredentialsInput is the input to send with the endpoint service to receive credentials.
+type GetCredentialsInput struct {
+ AuthorizationToken string
+}
+
+// GetCredentials retrieves credentials from credential endpoint
+func (c *Client) GetCredentials(ctx context.Context, params *GetCredentialsInput, optFns ...func(*Options)) (*GetCredentialsOutput, error) {
+ stack := smithymiddleware.NewStack("GetCredentials", smithyhttp.NewStackRequest)
+ options := c.options.Copy()
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ stack.Serialize.Add(&serializeOpGetCredential{}, smithymiddleware.After)
+ stack.Build.Add(&buildEndpoint{Endpoint: options.Endpoint}, smithymiddleware.After)
+ stack.Deserialize.Add(&deserializeOpGetCredential{}, smithymiddleware.After)
+ retry.AddRetryMiddlewares(stack, retry.AddRetryMiddlewaresOptions{Retryer: options.Retryer})
+ middleware.AddSDKAgentKey(middleware.FeatureMetadata, ServiceID)
+ smithyhttp.AddErrorCloseResponseBodyMiddleware(stack)
+ smithyhttp.AddCloseResponseBodyMiddleware(stack)
+
+ for _, fn := range options.APIOptions {
+ if err := fn(stack); err != nil {
+ return nil, err
+ }
+ }
+
+ handler := smithymiddleware.DecorateHandler(smithyhttp.NewClientHandler(options.HTTPClient), stack)
+ result, _, err := handler.Handle(ctx, params)
+ if err != nil {
+ return nil, err
+ }
+
+ return result.(*GetCredentialsOutput), err
+}
+
+// GetCredentialsOutput is the response from the credential endpoint
+type GetCredentialsOutput struct {
+ Expiration *time.Time
+ AccessKeyID string
+ SecretAccessKey string
+ Token string
+}
+
+// EndpointError is an error returned from the endpoint service
+type EndpointError struct {
+ Code string `json:"code"`
+ Message string `json:"message"`
+ Fault smithy.ErrorFault `json:"-"`
+}
+
+// Error is the error mesage string
+func (e *EndpointError) Error() string {
+ return fmt.Sprintf("%s: %s", e.Code, e.Message)
+}
+
+// ErrorCode is the error code returned by the endpoint
+func (e *EndpointError) ErrorCode() string {
+ return e.Code
+}
+
+// ErrorMessage is the error message returned by the endpoint
+func (e *EndpointError) ErrorMessage() string {
+ return e.Message
+}
+
+// ErrorFault indicates error fault classification
+func (e *EndpointError) ErrorFault() smithy.ErrorFault {
+ return e.Fault
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/endpointcreds/internal/client/middleware.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/endpointcreds/internal/client/middleware.go
new file mode 100644
index 00000000..40747a53
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/endpointcreds/internal/client/middleware.go
@@ -0,0 +1,120 @@
+package client
+
+import (
+ "context"
+ "encoding/json"
+ "fmt"
+ "net/url"
+
+ "github.com/aws/smithy-go"
+ smithymiddleware "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+type buildEndpoint struct {
+ Endpoint string
+}
+
+func (b *buildEndpoint) ID() string {
+ return "BuildEndpoint"
+}
+
+func (b *buildEndpoint) HandleBuild(ctx context.Context, in smithymiddleware.BuildInput, next smithymiddleware.BuildHandler) (
+ out smithymiddleware.BuildOutput, metadata smithymiddleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown transport, %T", in.Request)
+ }
+
+ if len(b.Endpoint) == 0 {
+ return out, metadata, fmt.Errorf("endpoint not provided")
+ }
+
+ parsed, err := url.Parse(b.Endpoint)
+ if err != nil {
+ return out, metadata, fmt.Errorf("failed to parse endpoint, %w", err)
+ }
+
+ request.URL = parsed
+
+ return next.HandleBuild(ctx, in)
+}
+
+type serializeOpGetCredential struct{}
+
+func (s *serializeOpGetCredential) ID() string {
+ return "OperationSerializer"
+}
+
+func (s *serializeOpGetCredential) HandleSerialize(ctx context.Context, in smithymiddleware.SerializeInput, next smithymiddleware.SerializeHandler) (
+ out smithymiddleware.SerializeOutput, metadata smithymiddleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown transport type, %T", in.Request)
+ }
+
+ params, ok := in.Parameters.(*GetCredentialsInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters, %T", in.Parameters)
+ }
+
+ const acceptHeader = "Accept"
+ request.Header[acceptHeader] = append(request.Header[acceptHeader][:0], "application/json")
+
+ if len(params.AuthorizationToken) > 0 {
+ const authHeader = "Authorization"
+ request.Header[authHeader] = append(request.Header[authHeader][:0], params.AuthorizationToken)
+ }
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type deserializeOpGetCredential struct{}
+
+func (d *deserializeOpGetCredential) ID() string {
+ return "OperationDeserializer"
+}
+
+func (d *deserializeOpGetCredential) HandleDeserialize(ctx context.Context, in smithymiddleware.DeserializeInput, next smithymiddleware.DeserializeHandler) (
+ out smithymiddleware.DeserializeOutput, metadata smithymiddleware.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, deserializeError(response)
+ }
+
+ var shape *GetCredentialsOutput
+ if err = json.NewDecoder(response.Body).Decode(&shape); err != nil {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to deserialize json response, %w", err)}
+ }
+
+ out.Result = shape
+ return out, metadata, err
+}
+
+func deserializeError(response *smithyhttp.Response) error {
+ var errShape *EndpointError
+ err := json.NewDecoder(response.Body).Decode(&errShape)
+ if err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to decode error message, %w", err)}
+ }
+
+ if response.StatusCode >= 500 {
+ errShape.Fault = smithy.FaultServer
+ } else {
+ errShape.Fault = smithy.FaultClient
+ }
+
+ return errShape
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/endpointcreds/provider.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/endpointcreds/provider.go
new file mode 100644
index 00000000..40cd7add
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/endpointcreds/provider.go
@@ -0,0 +1,133 @@
+// Package endpointcreds provides support for retrieving credentials from an
+// arbitrary HTTP endpoint.
+//
+// The credentials endpoint Provider can receive both static and refreshable
+// credentials that will expire. Credentials are static when an "Expiration"
+// value is not provided in the endpoint's response.
+//
+// Static credentials will never expire once they have been retrieved. The format
+// of the static credentials response:
+// {
+// "AccessKeyId" : "MUA...",
+// "SecretAccessKey" : "/7PC5om....",
+// }
+//
+// Refreshable credentials will expire within the "ExpiryWindow" of the Expiration
+// value in the response. The format of the refreshable credentials response:
+// {
+// "AccessKeyId" : "MUA...",
+// "SecretAccessKey" : "/7PC5om....",
+// "Token" : "AQoDY....=",
+// "Expiration" : "2016-02-25T06:03:31Z"
+// }
+//
+// Errors should be returned in the following format and only returned with 400
+// or 500 HTTP status codes.
+// {
+// "code": "ErrorCode",
+// "message": "Helpful error message."
+// }
+package endpointcreds
+
+import (
+ "context"
+ "fmt"
+ "net/http"
+
+ "github.com/aws/aws-sdk-go-v2/aws"
+ "github.com/aws/aws-sdk-go-v2/credentials/endpointcreds/internal/client"
+ "github.com/aws/smithy-go/middleware"
+)
+
+// ProviderName is the name of the credentials provider.
+const ProviderName = `CredentialsEndpointProvider`
+
+type getCredentialsAPIClient interface {
+ GetCredentials(context.Context, *client.GetCredentialsInput, ...func(*client.Options)) (*client.GetCredentialsOutput, error)
+}
+
+// Provider satisfies the aws.CredentialsProvider interface, and is a client to
+// retrieve credentials from an arbitrary endpoint.
+type Provider struct {
+ // The AWS Client to make HTTP requests to the endpoint with. The endpoint
+ // the request will be made to is provided by the aws.Config's
+ // EndpointResolver.
+ client getCredentialsAPIClient
+
+ options Options
+}
+
+// HTTPClient is a client for sending HTTP requests
+type HTTPClient interface {
+ Do(*http.Request) (*http.Response, error)
+}
+
+// Options is structure of configurable options for Provider
+type Options struct {
+ // Endpoint to retrieve credentials from. Required
+ Endpoint string
+
+ // HTTPClient to handle sending HTTP requests to the target endpoint.
+ HTTPClient HTTPClient
+
+ // Set of options to modify how the credentials operation is invoked.
+ APIOptions []func(*middleware.Stack) error
+
+ // The Retryer to be used for determining whether a failed requested should be retried
+ Retryer aws.Retryer
+
+ // Optional authorization token value if set will be used as the value of
+ // the Authorization header of the endpoint credential request.
+ AuthorizationToken string
+}
+
+// New returns a credentials Provider for retrieving AWS credentials
+// from arbitrary endpoint.
+func New(endpoint string, optFns ...func(*Options)) *Provider {
+ o := Options{
+ Endpoint: endpoint,
+ }
+
+ for _, fn := range optFns {
+ fn(&o)
+ }
+
+ p := &Provider{
+ client: client.New(client.Options{
+ HTTPClient: o.HTTPClient,
+ Endpoint: o.Endpoint,
+ APIOptions: o.APIOptions,
+ Retryer: o.Retryer,
+ }),
+ options: o,
+ }
+
+ return p
+}
+
+// Retrieve will attempt to request the credentials from the endpoint the Provider
+// was configured for. And error will be returned if the retrieval fails.
+func (p *Provider) Retrieve(ctx context.Context) (aws.Credentials, error) {
+ resp, err := p.getCredentials(ctx)
+ if err != nil {
+ return aws.Credentials{}, fmt.Errorf("failed to load credentials, %w", err)
+ }
+
+ creds := aws.Credentials{
+ AccessKeyID: resp.AccessKeyID,
+ SecretAccessKey: resp.SecretAccessKey,
+ SessionToken: resp.Token,
+ Source: ProviderName,
+ }
+
+ if resp.Expiration != nil {
+ creds.CanExpire = true
+ creds.Expires = *resp.Expiration
+ }
+
+ return creds, nil
+}
+
+func (p *Provider) getCredentials(ctx context.Context) (*client.GetCredentialsOutput, error) {
+ return p.client.GetCredentials(ctx, &client.GetCredentialsInput{AuthorizationToken: p.options.AuthorizationToken})
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/go.mod b/vendor/github.com/aws/aws-sdk-go-v2/credentials/go.mod
new file mode 100644
index 00000000..01763db8
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/go.mod
@@ -0,0 +1,22 @@
+module github.com/aws/aws-sdk-go-v2/credentials
+
+go 1.15
+
+require (
+ github.com/aws/aws-sdk-go-v2 v1.9.1
+ github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.5.1
+ github.com/aws/aws-sdk-go-v2/service/sso v1.4.1
+ github.com/aws/aws-sdk-go-v2/service/sts v1.7.1
+ github.com/aws/smithy-go v1.8.0
+ github.com/google/go-cmp v0.5.6
+)
+
+replace github.com/aws/aws-sdk-go-v2 => ../
+
+replace github.com/aws/aws-sdk-go-v2/feature/ec2/imds => ../feature/ec2/imds/
+
+replace github.com/aws/aws-sdk-go-v2/service/internal/presigned-url => ../service/internal/presigned-url/
+
+replace github.com/aws/aws-sdk-go-v2/service/sso => ../service/sso/
+
+replace github.com/aws/aws-sdk-go-v2/service/sts => ../service/sts/
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/go.sum b/vendor/github.com/aws/aws-sdk-go-v2/credentials/go.sum
new file mode 100644
index 00000000..779915f8
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/go.sum
@@ -0,0 +1,14 @@
+github.com/aws/smithy-go v1.8.0 h1:AEwwwXQZtUwP5Mz506FeXXrKBe0jA8gVM+1gEcSRooc=
+github.com/aws/smithy-go v1.8.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E=
+github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ=
+github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo=
+github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U=
+github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
+github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
+golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
+golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/go_module_metadata.go
new file mode 100644
index 00000000..ded01631
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/go_module_metadata.go
@@ -0,0 +1,6 @@
+// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT.
+
+package credentials
+
+// goModuleVersion is the tagged release for this module
+const goModuleVersion = "1.4.2"
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/processcreds/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/processcreds/doc.go
new file mode 100644
index 00000000..d56dd826
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/processcreds/doc.go
@@ -0,0 +1,92 @@
+// Package processcreds is a credentials provider to retrieve credentials from a
+// external CLI invoked process.
+//
+// WARNING: The following describes a method of sourcing credentials from an external
+// process. This can potentially be dangerous, so proceed with caution. Other
+// credential providers should be preferred if at all possible. If using this
+// option, you should make sure that the config file is as locked down as possible
+// using security best practices for your operating system.
+//
+// Concurrency and caching
+//
+// The Provider is not safe to be used concurrently, and does not provide any
+// caching of credentials retrieved. You should wrap the Provider with a
+// `aws.CredentialsCache` to provide concurrency safety, and caching of
+// credentials.
+//
+// Loading credentials with the SDKs AWS Config
+//
+// You can use credentials from a AWS shared config `credential_process` in a
+// variety of ways.
+//
+// One way is to setup your shared config file, located in the default
+// location, with the `credential_process` key and the command you want to be
+// called. You also need to set the AWS_SDK_LOAD_CONFIG environment variable
+// (e.g., `export AWS_SDK_LOAD_CONFIG=1`) to use the shared config file.
+//
+// [default]
+// credential_process = /command/to/call
+//
+// Loading configuration using external will use the credential process to
+// retrieve credentials. NOTE: If there are credentials in the profile you are
+// using, the credential process will not be used.
+//
+// // Initialize a session to load credentials.
+// cfg, _ := config.LoadDefaultConfig(context.TODO())
+//
+// // Create S3 service client to use the credentials.
+// svc := s3.NewFromConfig(cfg)
+//
+// Loading credentials with the Provider directly
+//
+// Another way to use the credentials process provider is by using the
+// `NewProvider` constructor to create the provider and providing a it with a
+// command to be executed to retrieve credentials.
+//
+// The following example creates a credentials provider for a command, and wraps
+// it with the CredentialsCache before assigning the provider to the Amazon S3 API
+// client's Credentials option.
+//
+// // Create credentials using the Provider.
+// provider := processcreds.NewProvider("/path/to/command")
+//
+// // Create the service client value configured for credentials.
+// svc := s3.New(s3.Options{
+// Credentials: aws.NewCredentialsCache(provider),
+// })
+//
+// If you need more control, you can set any configurable options in the
+// credentials using one or more option functions.
+//
+// provider := processcreds.NewProvider("/path/to/command",
+// func(o *processcreds.Options) {
+// // Override the provider's default timeout
+// o.Timeout = 2 * time.Minute
+// })
+//
+// You can also use your own `exec.Cmd` value by satisfying a value that satisfies
+// the `NewCommandBuilder` interface and use the `NewProviderCommand` constructor.
+//
+// // Create an exec.Cmd
+// cmdBuilder := processcreds.NewCommandBuilderFunc(
+// func(ctx context.Context) (*exec.Cmd, error) {
+// cmd := exec.CommandContext(ctx,
+// "customCLICommand",
+// "-a", "argument",
+// )
+// cmd.Env = []string{
+// "ENV_VAR_FOO=value",
+// "ENV_VAR_BAR=other_value",
+// }
+//
+// return cmd, nil
+// },
+// )
+//
+// // Create credentials using your exec.Cmd and custom timeout
+// provider := processcreds.NewProviderCommand(cmdBuilder,
+// func(opt *processcreds.Provider) {
+// // optionally override the provider's default timeout
+// opt.Timeout = 1 * time.Second
+// })
+package processcreds
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/processcreds/provider.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/processcreds/provider.go
new file mode 100644
index 00000000..3921da34
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/processcreds/provider.go
@@ -0,0 +1,269 @@
+package processcreds
+
+import (
+ "bytes"
+ "context"
+ "encoding/json"
+ "fmt"
+ "io"
+ "os"
+ "os/exec"
+ "runtime"
+ "time"
+
+ "github.com/aws/aws-sdk-go-v2/aws"
+ "github.com/aws/aws-sdk-go-v2/internal/sdkio"
+)
+
+const (
+ // ProviderName is the name this credentials provider will label any
+ // returned credentials Value with.
+ ProviderName = `ProcessProvider`
+
+ // DefaultTimeout default limit on time a process can run.
+ DefaultTimeout = time.Duration(1) * time.Minute
+)
+
+// ProviderError is an error indicating failure initializing or executing the
+// process credentials provider
+type ProviderError struct {
+ Err error
+}
+
+// Error returns the error message.
+func (e *ProviderError) Error() string {
+ return fmt.Sprintf("process provider error: %v", e.Err)
+}
+
+// Unwrap returns the underlying error the provider error wraps.
+func (e *ProviderError) Unwrap() error {
+ return e.Err
+}
+
+// Provider satisfies the credentials.Provider interface, and is a
+// client to retrieve credentials from a process.
+type Provider struct {
+ // Provides a constructor for exec.Cmd that are invoked by the provider for
+ // retrieving credentials. Use this to provide custom creation of exec.Cmd
+ // with things like environment variables, or other configuration.
+ //
+ // The provider defaults to the DefaultNewCommand function.
+ commandBuilder NewCommandBuilder
+
+ options Options
+}
+
+// Options is the configuration options for configuring the Provider.
+type Options struct {
+ // Timeout limits the time a process can run.
+ Timeout time.Duration
+}
+
+// NewCommandBuilder provides the interface for specifying how command will be
+// created that the Provider will use to retrieve credentials with.
+type NewCommandBuilder interface {
+ NewCommand(context.Context) (*exec.Cmd, error)
+}
+
+// NewCommandBuilderFunc provides a wrapper type around a function pointer to
+// satisfy the NewCommandBuilder interface.
+type NewCommandBuilderFunc func(context.Context) (*exec.Cmd, error)
+
+// NewCommand calls the underlying function pointer the builder was initialized with.
+func (fn NewCommandBuilderFunc) NewCommand(ctx context.Context) (*exec.Cmd, error) {
+ return fn(ctx)
+}
+
+// DefaultNewCommandBuilder provides the default NewCommandBuilder
+// implementation used by the provider. It takes a command and arguments to
+// invoke. The command will also be initialized with the current process
+// environment variables, stderr, and stdin pipes.
+type DefaultNewCommandBuilder struct {
+ Args []string
+}
+
+// NewCommand returns an initialized exec.Cmd with the builder's initialized
+// Args. The command is also initialized current process environment variables,
+// stderr, and stdin pipes.
+func (b DefaultNewCommandBuilder) NewCommand(ctx context.Context) (*exec.Cmd, error) {
+ var cmdArgs []string
+ if runtime.GOOS == "windows" {
+ cmdArgs = []string{"cmd.exe", "/C"}
+ } else {
+ cmdArgs = []string{"sh", "-c"}
+ }
+
+ if len(b.Args) == 0 {
+ return nil, &ProviderError{
+ Err: fmt.Errorf("failed to prepare command: command must not be empty"),
+ }
+ }
+
+ cmdArgs = append(cmdArgs, b.Args...)
+ cmd := exec.CommandContext(ctx, cmdArgs[0], cmdArgs[1:]...)
+ cmd.Env = os.Environ()
+
+ cmd.Stderr = os.Stderr // display stderr on console for MFA
+ cmd.Stdin = os.Stdin // enable stdin for MFA
+
+ return cmd, nil
+}
+
+// NewProvider returns a pointer to a new Credentials object wrapping the
+// Provider.
+//
+// The provider defaults to the DefaultNewCommandBuilder for creating command
+// the Provider will use to retrieve credentials with.
+func NewProvider(command string, options ...func(*Options)) *Provider {
+ var args []string
+
+ // Ensure that the command arguments are not set if the provided command is
+ // empty. This will error out when the command is executed since no
+ // arguments are specified.
+ if len(command) > 0 {
+ args = []string{command}
+ }
+
+ commanBuilder := DefaultNewCommandBuilder{
+ Args: args,
+ }
+ return NewProviderCommand(commanBuilder, options...)
+}
+
+// NewProviderCommand returns a pointer to a new Credentials object with the
+// specified command, and default timeout duration. Use this to provide custom
+// creation of exec.Cmd for options like environment variables, or other
+// configuration.
+func NewProviderCommand(builder NewCommandBuilder, options ...func(*Options)) *Provider {
+ p := &Provider{
+ commandBuilder: builder,
+ options: Options{
+ Timeout: DefaultTimeout,
+ },
+ }
+
+ for _, option := range options {
+ option(&p.options)
+ }
+
+ return p
+}
+
+type credentialProcessResponse struct {
+ Version int
+ AccessKeyID string `json:"AccessKeyId"`
+ SecretAccessKey string
+ SessionToken string
+ Expiration *time.Time
+}
+
+// Retrieve executes the credential process command and returns the
+// credentials, or error if the command fails.
+func (p *Provider) Retrieve(ctx context.Context) (aws.Credentials, error) {
+ out, err := p.executeCredentialProcess(ctx)
+ if err != nil {
+ return aws.Credentials{Source: ProviderName}, err
+ }
+
+ // Serialize and validate response
+ resp := &credentialProcessResponse{}
+ if err = json.Unmarshal(out, resp); err != nil {
+ return aws.Credentials{Source: ProviderName}, &ProviderError{
+ Err: fmt.Errorf("parse failed of process output: %s, error: %w", out, err),
+ }
+ }
+
+ if resp.Version != 1 {
+ return aws.Credentials{Source: ProviderName}, &ProviderError{
+ Err: fmt.Errorf("wrong version in process output (not 1)"),
+ }
+ }
+
+ if len(resp.AccessKeyID) == 0 {
+ return aws.Credentials{Source: ProviderName}, &ProviderError{
+ Err: fmt.Errorf("missing AccessKeyId in process output"),
+ }
+ }
+
+ if len(resp.SecretAccessKey) == 0 {
+ return aws.Credentials{Source: ProviderName}, &ProviderError{
+ Err: fmt.Errorf("missing SecretAccessKey in process output"),
+ }
+ }
+
+ creds := aws.Credentials{
+ Source: ProviderName,
+ AccessKeyID: resp.AccessKeyID,
+ SecretAccessKey: resp.SecretAccessKey,
+ SessionToken: resp.SessionToken,
+ }
+
+ // Handle expiration
+ if resp.Expiration != nil {
+ creds.CanExpire = true
+ creds.Expires = *resp.Expiration
+ }
+
+ return creds, nil
+}
+
+// executeCredentialProcess starts the credential process on the OS and
+// returns the results or an error.
+func (p *Provider) executeCredentialProcess(ctx context.Context) ([]byte, error) {
+ if p.options.Timeout >= 0 {
+ var cancelFunc func()
+ ctx, cancelFunc = context.WithTimeout(ctx, p.options.Timeout)
+ defer cancelFunc()
+ }
+
+ cmd, err := p.commandBuilder.NewCommand(ctx)
+ if err != nil {
+ return nil, err
+ }
+
+ // get creds json on process's stdout
+ output := bytes.NewBuffer(make([]byte, 0, int(8*sdkio.KibiByte)))
+ if cmd.Stdout != nil {
+ cmd.Stdout = io.MultiWriter(cmd.Stdout, output)
+ } else {
+ cmd.Stdout = output
+ }
+
+ execCh := make(chan error, 1)
+ go executeCommand(cmd, execCh)
+
+ select {
+ case execError := <-execCh:
+ if execError == nil {
+ break
+ }
+ select {
+ case <-ctx.Done():
+ return output.Bytes(), &ProviderError{
+ Err: fmt.Errorf("credential process timed out: %w", execError),
+ }
+ default:
+ return output.Bytes(), &ProviderError{
+ Err: fmt.Errorf("error in credential_process: %w", execError),
+ }
+ }
+ }
+
+ out := output.Bytes()
+ if runtime.GOOS == "windows" {
+ // windows adds slashes to quotes
+ out = bytes.ReplaceAll(out, []byte(`\"`), []byte(`"`))
+ }
+
+ return out, nil
+}
+
+func executeCommand(cmd *exec.Cmd, exec chan error) {
+ // Start the command
+ err := cmd.Start()
+ if err == nil {
+ err = cmd.Wait()
+ }
+
+ exec <- err
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/ssocreds/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/doc.go
similarity index 72%
rename from vendor/github.com/aws/aws-sdk-go/aws/credentials/ssocreds/doc.go
rename to vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/doc.go
index 18c940ab..2f396c0a 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/credentials/ssocreds/doc.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/doc.go
@@ -28,10 +28,7 @@
// Using the config module, you can load the AWS SDK shared configuration, and specify that this profile be used to
// retrieve credentials. For example:
//
-// sess, err := session.NewSessionWithOptions(session.Options{
-// SharedConfigState: session.SharedConfigEnable,
-// Profile: "devsso",
-// })
+// config, err := config.LoadDefaultConfig(context.TODO(), config.WithSharedConfigProfile("devsso"))
// if err != nil {
// return err
// }
@@ -41,17 +38,23 @@
// You can programmatically construct the AWS SSO Provider in your application, and provide the necessary information
// to load and retrieve temporary credentials using an access token from ~/.aws/sso/cache.
//
-// svc := sso.New(sess, &aws.Config{
-// Region: aws.String("us-west-2"), // Client Region must correspond to the AWS SSO user portal region
-// })
+// client := sso.NewFromConfig(cfg)
//
-// provider := ssocreds.NewCredentialsWithClient(svc, "123456789012", "SSOReadOnlyRole", "https://my-sso-portal.awsapps.com/start")
+// var provider aws.CredentialsProvider
+// provider = ssocreds.New(client, "123456789012", "SSOReadOnlyRole", "us-east-1", "https://my-sso-portal.awsapps.com/start")
//
-// credentials, err := provider.Get()
+// // Wrap the provider with aws.CredentialsCache to cache the credentials until their expire time
+// provider = aws.NewCredentialsCache(provider)
+//
+// credentials, err := provider.Retrieve(context.TODO())
// if err != nil {
// return err
// }
//
+// It is important that you wrap the Provider with aws.CredentialsCache if you are programmatically constructing the
+// provider directly. This prevents your application from accessing the cached access token and requesting new
+// credentials each time the credentials are used.
+//
// Additional Resources
//
// Configuring the AWS CLI to use AWS Single Sign-On: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/ssocreds/os.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/os.go
similarity index 100%
rename from vendor/github.com/aws/aws-sdk-go/aws/credentials/ssocreds/os.go
rename to vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/os.go
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/ssocreds/os_windows.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/os_windows.go
similarity index 100%
rename from vendor/github.com/aws/aws-sdk-go/aws/credentials/ssocreds/os_windows.go
rename to vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/os_windows.go
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/provider.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/provider.go
new file mode 100644
index 00000000..279df7a1
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/provider.go
@@ -0,0 +1,184 @@
+package ssocreds
+
+import (
+ "context"
+ "crypto/sha1"
+ "encoding/hex"
+ "encoding/json"
+ "fmt"
+ "io/ioutil"
+ "path/filepath"
+ "strings"
+ "time"
+
+ "github.com/aws/aws-sdk-go-v2/aws"
+ "github.com/aws/aws-sdk-go-v2/internal/sdk"
+ "github.com/aws/aws-sdk-go-v2/service/sso"
+)
+
+// ProviderName is the name of the provider used to specify the source of credentials.
+const ProviderName = "SSOProvider"
+
+var defaultCacheLocation func() string
+
+func defaultCacheLocationImpl() string {
+ return filepath.Join(getHomeDirectory(), ".aws", "sso", "cache")
+}
+
+func init() {
+ defaultCacheLocation = defaultCacheLocationImpl
+}
+
+// GetRoleCredentialsAPIClient is a API client that implements the GetRoleCredentials operation.
+type GetRoleCredentialsAPIClient interface {
+ GetRoleCredentials(ctx context.Context, params *sso.GetRoleCredentialsInput, optFns ...func(*sso.Options)) (*sso.GetRoleCredentialsOutput, error)
+}
+
+// Options is the Provider options structure.
+type Options struct {
+ // The Client which is configured for the AWS Region where the AWS SSO user portal is located.
+ Client GetRoleCredentialsAPIClient
+
+ // The AWS account that is assigned to the user.
+ AccountID string
+
+ // The role name that is assigned to the user.
+ RoleName string
+
+ // The URL that points to the organization's AWS Single Sign-On (AWS SSO) user portal.
+ StartURL string
+}
+
+// Provider is an AWS credential provider that retrieves temporary AWS credentials by exchanging an SSO login token.
+type Provider struct {
+ options Options
+}
+
+// New returns a new AWS Single Sign-On (AWS SSO) credential provider. The provided client is expected to be configured
+// for the AWS Region where the AWS SSO user portal is located.
+func New(client GetRoleCredentialsAPIClient, accountID, roleName, startURL string, optFns ...func(options *Options)) *Provider {
+ options := Options{
+ Client: client,
+ AccountID: accountID,
+ RoleName: roleName,
+ StartURL: startURL,
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &Provider{
+ options: options,
+ }
+}
+
+// Retrieve retrieves temporary AWS credentials from the configured Amazon Single Sign-On (AWS SSO) user portal
+// by exchanging the accessToken present in ~/.aws/sso/cache.
+func (p *Provider) Retrieve(ctx context.Context) (aws.Credentials, error) {
+ tokenFile, err := loadTokenFile(p.options.StartURL)
+ if err != nil {
+ return aws.Credentials{}, err
+ }
+
+ output, err := p.options.Client.GetRoleCredentials(ctx, &sso.GetRoleCredentialsInput{
+ AccessToken: &tokenFile.AccessToken,
+ AccountId: &p.options.AccountID,
+ RoleName: &p.options.RoleName,
+ })
+ if err != nil {
+ return aws.Credentials{}, err
+ }
+
+ return aws.Credentials{
+ AccessKeyID: aws.ToString(output.RoleCredentials.AccessKeyId),
+ SecretAccessKey: aws.ToString(output.RoleCredentials.SecretAccessKey),
+ SessionToken: aws.ToString(output.RoleCredentials.SessionToken),
+ Expires: time.Unix(0, output.RoleCredentials.Expiration*int64(time.Millisecond)).UTC(),
+ CanExpire: true,
+ Source: ProviderName,
+ }, nil
+}
+
+func getCacheFileName(url string) (string, error) {
+ hash := sha1.New()
+ _, err := hash.Write([]byte(url))
+ if err != nil {
+ return "", err
+ }
+ return strings.ToLower(hex.EncodeToString(hash.Sum(nil))) + ".json", nil
+}
+
+type rfc3339 time.Time
+
+func (r *rfc3339) UnmarshalJSON(bytes []byte) error {
+ var value string
+
+ if err := json.Unmarshal(bytes, &value); err != nil {
+ return err
+ }
+
+ parse, err := time.Parse(time.RFC3339, value)
+ if err != nil {
+ return fmt.Errorf("expected RFC3339 timestamp: %w", err)
+ }
+
+ *r = rfc3339(parse)
+
+ return nil
+}
+
+type token struct {
+ AccessToken string `json:"accessToken"`
+ ExpiresAt rfc3339 `json:"expiresAt"`
+ Region string `json:"region,omitempty"`
+ StartURL string `json:"startUrl,omitempty"`
+}
+
+func (t token) Expired() bool {
+ return sdk.NowTime().Round(0).After(time.Time(t.ExpiresAt))
+}
+
+// InvalidTokenError is the error type that is returned if loaded token has expired or is otherwise invalid.
+// To refresh the SSO session run aws sso login with the corresponding profile.
+type InvalidTokenError struct {
+ Err error
+}
+
+func (i *InvalidTokenError) Unwrap() error {
+ return i.Err
+}
+
+func (i *InvalidTokenError) Error() string {
+ const msg = "the SSO session has expired or is invalid"
+ if i.Err == nil {
+ return msg
+ }
+ return msg + ": " + i.Err.Error()
+}
+
+func loadTokenFile(startURL string) (t token, err error) {
+ key, err := getCacheFileName(startURL)
+ if err != nil {
+ return token{}, &InvalidTokenError{Err: err}
+ }
+
+ fileBytes, err := ioutil.ReadFile(filepath.Join(defaultCacheLocation(), key))
+ if err != nil {
+ return token{}, &InvalidTokenError{Err: err}
+ }
+
+ if err := json.Unmarshal(fileBytes, &t); err != nil {
+ return token{}, &InvalidTokenError{Err: err}
+ }
+
+ if len(t.AccessToken) == 0 {
+ return token{}, &InvalidTokenError{}
+ }
+
+ if t.Expired() {
+ return token{}, &InvalidTokenError{Err: fmt.Errorf("access token is expired")}
+ }
+
+ return t, nil
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/static_provider.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/static_provider.go
new file mode 100644
index 00000000..d525cac0
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/static_provider.go
@@ -0,0 +1,53 @@
+package credentials
+
+import (
+ "context"
+
+ "github.com/aws/aws-sdk-go-v2/aws"
+)
+
+const (
+ // StaticCredentialsName provides a name of Static provider
+ StaticCredentialsName = "StaticCredentials"
+)
+
+// StaticCredentialsEmptyError is emitted when static credentials are empty.
+type StaticCredentialsEmptyError struct{}
+
+func (*StaticCredentialsEmptyError) Error() string {
+ return "static credentials are empty"
+}
+
+// A StaticCredentialsProvider is a set of credentials which are set, and will
+// never expire.
+type StaticCredentialsProvider struct {
+ Value aws.Credentials
+}
+
+// NewStaticCredentialsProvider return a StaticCredentialsProvider initialized with the AWS
+// credentials passed in.
+func NewStaticCredentialsProvider(key, secret, session string) StaticCredentialsProvider {
+ return StaticCredentialsProvider{
+ Value: aws.Credentials{
+ AccessKeyID: key,
+ SecretAccessKey: secret,
+ SessionToken: session,
+ },
+ }
+}
+
+// Retrieve returns the credentials or error if the credentials are invalid.
+func (s StaticCredentialsProvider) Retrieve(_ context.Context) (aws.Credentials, error) {
+ v := s.Value
+ if v.AccessKeyID == "" || v.SecretAccessKey == "" {
+ return aws.Credentials{
+ Source: StaticCredentialsName,
+ }, &StaticCredentialsEmptyError{}
+ }
+
+ if len(v.Source) == 0 {
+ v.Source = StaticCredentialsName
+ }
+
+ return v, nil
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/stscreds/assume_role_provider.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/stscreds/assume_role_provider.go
new file mode 100644
index 00000000..3cafa481
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/stscreds/assume_role_provider.go
@@ -0,0 +1,302 @@
+// Package stscreds are credential Providers to retrieve STS AWS credentials.
+//
+// STS provides multiple ways to retrieve credentials which can be used when making
+// future AWS service API operation calls.
+//
+// The SDK will ensure that per instance of credentials.Credentials all requests
+// to refresh the credentials will be synchronized. But, the SDK is unable to
+// ensure synchronous usage of the AssumeRoleProvider if the value is shared
+// between multiple Credentials or service clients.
+//
+// Assume Role
+//
+// To assume an IAM role using STS with the SDK you can create a new Credentials
+// with the SDKs's stscreds package.
+//
+// // Initial credentials loaded from SDK's default credential chain. Such as
+// // the environment, shared credentials (~/.aws/credentials), or EC2 Instance
+// // Role. These credentials will be used to to make the STS Assume Role API.
+// cfg, err := config.LoadDefaultConfig(context.TODO())
+// if err != nil {
+// panic(err)
+// }
+//
+// // Create the credentials from AssumeRoleProvider to assume the role
+// // referenced by the "myRoleARN" ARN.
+// stsSvc := sts.NewFromConfig(cfg)
+// creds := stscreds.NewAssumeRoleProvider(stsSvc, "myRoleArn")
+//
+// cfg.Credentials = aws.NewCredentialsCache(creds)
+//
+// // Create service client value configured for credentials
+// // from assumed role.
+// svc := s3.NewFromConfig(cfg)
+//
+// Assume Role with custom MFA Token provider
+//
+// To assume an IAM role with a MFA token you can either specify a custom MFA
+// token provider or use the SDK's built in StdinTokenProvider that will prompt
+// the user for a token code each time the credentials need to to be refreshed.
+// Specifying a custom token provider allows you to control where the token
+// code is retrieved from, and how it is refreshed.
+//
+// With a custom token provider, the provider is responsible for refreshing the
+// token code when called.
+//
+// cfg, err := config.LoadDefaultConfig(context.TODO())
+// if err != nil {
+// panic(err)
+// }
+//
+// staticTokenProvider := func() (string, error) {
+// return someTokenCode, nil
+// }
+//
+// // Create the credentials from AssumeRoleProvider to assume the role
+// // referenced by the "myRoleARN" ARN using the MFA token code provided.
+// creds := stscreds.NewAssumeRoleProvider(sts.NewFromConfig(cfg), "myRoleArn", func(o *stscreds.AssumeRoleOptions) {
+// o.SerialNumber = aws.String("myTokenSerialNumber")
+// o.TokenProvider = staticTokenProvider
+// })
+//
+// cfg.Credentials = aws.NewCredentialsCache(creds)
+//
+// // Create service client value configured for credentials
+// // from assumed role.
+// svc := s3.NewFromConfig(cfg)
+//
+// Assume Role with MFA Token Provider
+//
+// To assume an IAM role with MFA for longer running tasks where the credentials
+// may need to be refreshed setting the TokenProvider field of AssumeRoleProvider
+// will allow the credential provider to prompt for new MFA token code when the
+// role's credentials need to be refreshed.
+//
+// The StdinTokenProvider function is available to prompt on stdin to retrieve
+// the MFA token code from the user. You can also implement custom prompts by
+// satisfying the TokenProvider function signature.
+//
+// Using StdinTokenProvider with multiple AssumeRoleProviders, or Credentials will
+// have undesirable results as the StdinTokenProvider will not be synchronized. A
+// single Credentials with an AssumeRoleProvider can be shared safely.
+//
+// cfg, err := config.LoadDefaultConfig(context.TODO())
+// if err != nil {
+// panic(err)
+// }
+//
+// // Create the credentials from AssumeRoleProvider to assume the role
+// // referenced by the "myRoleARN" ARN using the MFA token code provided.
+// creds := stscreds.NewAssumeRoleProvider(sts.NewFromConfig(cfg), "myRoleArn", func(o *stscreds.AssumeRoleOptions) {
+// o.SerialNumber = aws.String("myTokenSerialNumber")
+// o.TokenProvider = stscreds.StdinTokenProvider
+// })
+//
+// cfg.Credentials = aws.NewCredentialsCache(creds)
+//
+// // Create service client value configured for credentials
+// // from assumed role.
+// svc := s3.NewFromConfig(cfg)
+package stscreds
+
+import (
+ "context"
+ "fmt"
+ "time"
+
+ "github.com/aws/aws-sdk-go-v2/aws"
+ "github.com/aws/aws-sdk-go-v2/service/sts"
+ "github.com/aws/aws-sdk-go-v2/service/sts/types"
+)
+
+// StdinTokenProvider will prompt on stdout and read from stdin for a string value.
+// An error is returned if reading from stdin fails.
+//
+// Use this function go read MFA tokens from stdin. The function makes no attempt
+// to make atomic prompts from stdin across multiple gorouties.
+//
+// Using StdinTokenProvider with multiple AssumeRoleProviders, or Credentials will
+// have undesirable results as the StdinTokenProvider will not be synchronized. A
+// single Credentials with an AssumeRoleProvider can be shared safely
+//
+// Will wait forever until something is provided on the stdin.
+func StdinTokenProvider() (string, error) {
+ var v string
+ fmt.Printf("Assume Role MFA token code: ")
+ _, err := fmt.Scanln(&v)
+
+ return v, err
+}
+
+// ProviderName provides a name of AssumeRole provider
+const ProviderName = "AssumeRoleProvider"
+
+// AssumeRoleAPIClient is a client capable of the STS AssumeRole operation.
+type AssumeRoleAPIClient interface {
+ AssumeRole(ctx context.Context, params *sts.AssumeRoleInput, optFns ...func(*sts.Options)) (*sts.AssumeRoleOutput, error)
+}
+
+// DefaultDuration is the default amount of time in minutes that the credentials
+// will be valid for.
+var DefaultDuration = time.Duration(15) * time.Minute
+
+// AssumeRoleProvider retrieves temporary credentials from the STS service, and
+// keeps track of their expiration time.
+//
+// This credential provider will be used by the SDKs default credential change
+// when shared configuration is enabled, and the shared config or shared credentials
+// file configure assume role. See Session docs for how to do this.
+//
+// AssumeRoleProvider does not provide any synchronization and it is not safe
+// to share this value across multiple Credentials, Sessions, or service clients
+// without also sharing the same Credentials instance.
+type AssumeRoleProvider struct {
+ options AssumeRoleOptions
+}
+
+// AssumeRoleOptions is the configurable options for AssumeRoleProvider
+type AssumeRoleOptions struct {
+ // Client implementation of the AssumeRole operation. Required
+ Client AssumeRoleAPIClient
+
+ // IAM Role ARN to be assumed. Required
+ RoleARN string
+
+ // Session name, if you wish to uniquely identify this session.
+ RoleSessionName string
+
+ // Expiry duration of the STS credentials. Defaults to 15 minutes if not set.
+ Duration time.Duration
+
+ // Optional ExternalID to pass along, defaults to nil if not set.
+ ExternalID *string
+
+ // The policy plain text must be 2048 bytes or shorter. However, an internal
+ // conversion compresses it into a packed binary format with a separate limit.
+ // The PackedPolicySize response element indicates by percentage how close to
+ // the upper size limit the policy is, with 100% equaling the maximum allowed
+ // size.
+ Policy *string
+
+ // The ARNs of IAM managed policies you want to use as managed session policies.
+ // The policies must exist in the same account as the role.
+ //
+ // This parameter is optional. You can provide up to 10 managed policy ARNs.
+ // However, the plain text that you use for both inline and managed session
+ // policies can't exceed 2,048 characters.
+ //
+ // An AWS conversion compresses the passed session policies and session tags
+ // into a packed binary format that has a separate limit. Your request can fail
+ // for this limit even if your plain text meets the other requirements. The
+ // PackedPolicySize response element indicates by percentage how close the policies
+ // and tags for your request are to the upper size limit.
+ //
+ // Passing policies to this operation returns new temporary credentials. The
+ // resulting session's permissions are the intersection of the role's identity-based
+ // policy and the session policies. You can use the role's temporary credentials
+ // in subsequent AWS API calls to access resources in the account that owns
+ // the role. You cannot use session policies to grant more permissions than
+ // those allowed by the identity-based policy of the role that is being assumed.
+ // For more information, see Session Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
+ // in the IAM User Guide.
+ PolicyARNs []types.PolicyDescriptorType
+
+ // The identification number of the MFA device that is associated with the user
+ // who is making the AssumeRole call. Specify this value if the trust policy
+ // of the role being assumed includes a condition that requires MFA authentication.
+ // The value is either the serial number for a hardware device (such as GAHT12345678)
+ // or an Amazon Resource Name (ARN) for a virtual device (such as arn:aws:iam::123456789012:mfa/user).
+ SerialNumber *string
+
+ // Async method of providing MFA token code for assuming an IAM role with MFA.
+ // The value returned by the function will be used as the TokenCode in the Retrieve
+ // call. See StdinTokenProvider for a provider that prompts and reads from stdin.
+ //
+ // This token provider will be called when ever the assumed role's
+ // credentials need to be refreshed when SerialNumber is set.
+ TokenProvider func() (string, error)
+
+ // A list of session tags that you want to pass. Each session tag consists of a key
+ // name and an associated value. For more information about session tags, see
+ // Tagging STS Sessions
+ // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html) in the
+ // IAM User Guide. This parameter is optional. You can pass up to 50 session tags.
+ Tags []types.Tag
+
+ // A list of keys for session tags that you want to set as transitive. If you set a
+ // tag key as transitive, the corresponding key and value passes to subsequent
+ // sessions in a role chain. For more information, see Chaining Roles with Session
+ // Tags
+ // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_role-chaining)
+ // in the IAM User Guide. This parameter is optional.
+ TransitiveTagKeys []string
+}
+
+// NewAssumeRoleProvider constructs and returns a credentials provider that
+// will retrieve credentials by assuming a IAM role using STS.
+func NewAssumeRoleProvider(client AssumeRoleAPIClient, roleARN string, optFns ...func(*AssumeRoleOptions)) *AssumeRoleProvider {
+ o := AssumeRoleOptions{
+ Client: client,
+ RoleARN: roleARN,
+ }
+
+ for _, fn := range optFns {
+ fn(&o)
+ }
+
+ return &AssumeRoleProvider{
+ options: o,
+ }
+}
+
+// Retrieve generates a new set of temporary credentials using STS.
+func (p *AssumeRoleProvider) Retrieve(ctx context.Context) (aws.Credentials, error) {
+ // Apply defaults where parameters are not set.
+ if len(p.options.RoleSessionName) == 0 {
+ // Try to work out a role name that will hopefully end up unique.
+ p.options.RoleSessionName = fmt.Sprintf("aws-go-sdk-%d", time.Now().UTC().UnixNano())
+ }
+ if p.options.Duration == 0 {
+ // Expire as often as AWS permits.
+ p.options.Duration = DefaultDuration
+ }
+ input := &sts.AssumeRoleInput{
+ DurationSeconds: aws.Int32(int32(p.options.Duration / time.Second)),
+ PolicyArns: p.options.PolicyARNs,
+ RoleArn: aws.String(p.options.RoleARN),
+ RoleSessionName: aws.String(p.options.RoleSessionName),
+ ExternalId: p.options.ExternalID,
+ Tags: p.options.Tags,
+ TransitiveTagKeys: p.options.TransitiveTagKeys,
+ }
+ if p.options.Policy != nil {
+ input.Policy = p.options.Policy
+ }
+ if p.options.SerialNumber != nil {
+ if p.options.TokenProvider != nil {
+ input.SerialNumber = p.options.SerialNumber
+ code, err := p.options.TokenProvider()
+ if err != nil {
+ return aws.Credentials{}, err
+ }
+ input.TokenCode = aws.String(code)
+ } else {
+ return aws.Credentials{}, fmt.Errorf("assume role with MFA enabled, but TokenProvider is not set")
+ }
+ }
+
+ resp, err := p.options.Client.AssumeRole(ctx, input)
+ if err != nil {
+ return aws.Credentials{Source: ProviderName}, err
+ }
+
+ return aws.Credentials{
+ AccessKeyID: *resp.Credentials.AccessKeyId,
+ SecretAccessKey: *resp.Credentials.SecretAccessKey,
+ SessionToken: *resp.Credentials.SessionToken,
+ Source: ProviderName,
+
+ CanExpire: true,
+ Expires: *resp.Credentials.Expiration,
+ }, nil
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/stscreds/web_identity_provider.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/stscreds/web_identity_provider.go
new file mode 100644
index 00000000..7854a322
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/stscreds/web_identity_provider.go
@@ -0,0 +1,127 @@
+package stscreds
+
+import (
+ "context"
+ "fmt"
+ "io/ioutil"
+ "strconv"
+
+ "github.com/aws/aws-sdk-go-v2/aws"
+ "github.com/aws/aws-sdk-go-v2/aws/retry"
+ "github.com/aws/aws-sdk-go-v2/internal/sdk"
+ "github.com/aws/aws-sdk-go-v2/service/sts"
+ "github.com/aws/aws-sdk-go-v2/service/sts/types"
+)
+
+var invalidIdentityTokenExceptionCode = (&types.InvalidIdentityTokenException{}).ErrorCode()
+
+const (
+ // WebIdentityProviderName is the web identity provider name
+ WebIdentityProviderName = "WebIdentityCredentials"
+)
+
+// AssumeRoleWithWebIdentityAPIClient is a client capable of the STS AssumeRoleWithWebIdentity operation.
+type AssumeRoleWithWebIdentityAPIClient interface {
+ AssumeRoleWithWebIdentity(ctx context.Context, params *sts.AssumeRoleWithWebIdentityInput, optFns ...func(*sts.Options)) (*sts.AssumeRoleWithWebIdentityOutput, error)
+}
+
+// WebIdentityRoleProvider is used to retrieve credentials using
+// an OIDC token.
+type WebIdentityRoleProvider struct {
+ options WebIdentityRoleOptions
+}
+
+// WebIdentityRoleOptions is a structure of configurable options for WebIdentityRoleProvider
+type WebIdentityRoleOptions struct {
+ // Client implementation of the AssumeRoleWithWebIdentity operation. Required
+ Client AssumeRoleWithWebIdentityAPIClient
+
+ // JWT Token Provider. Required
+ TokenRetriever IdentityTokenRetriever
+
+ // IAM Role ARN to assume. Required
+ RoleARN string
+
+ // Session name, if you wish to uniquely identify this session.
+ RoleSessionName string
+
+ // The Amazon Resource Names (ARNs) of the IAM managed policies that you
+ // want to use as managed session policies. The policies must exist in the
+ // same account as the role.
+ PolicyARNs []types.PolicyDescriptorType
+}
+
+// IdentityTokenRetriever is an interface for retrieving a JWT
+type IdentityTokenRetriever interface {
+ GetIdentityToken() ([]byte, error)
+}
+
+// IdentityTokenFile is for retrieving an identity token from the given file name
+type IdentityTokenFile string
+
+// GetIdentityToken retrieves the JWT token from the file and returns the contents as a []byte
+func (j IdentityTokenFile) GetIdentityToken() ([]byte, error) {
+ b, err := ioutil.ReadFile(string(j))
+ if err != nil {
+ return nil, fmt.Errorf("unable to read file at %s: %v", string(j), err)
+ }
+
+ return b, nil
+}
+
+// NewWebIdentityRoleProvider will return a new WebIdentityRoleProvider with the
+// provided stsiface.ClientAPI
+func NewWebIdentityRoleProvider(client AssumeRoleWithWebIdentityAPIClient, roleARN string, tokenRetriever IdentityTokenRetriever, optFns ...func(*WebIdentityRoleOptions)) *WebIdentityRoleProvider {
+ o := WebIdentityRoleOptions{
+ Client: client,
+ RoleARN: roleARN,
+ TokenRetriever: tokenRetriever,
+ }
+
+ for _, fn := range optFns {
+ fn(&o)
+ }
+
+ return &WebIdentityRoleProvider{options: o}
+}
+
+// Retrieve will attempt to assume a role from a token which is located at
+// 'WebIdentityTokenFilePath' specified destination and if that is empty an
+// error will be returned.
+func (p *WebIdentityRoleProvider) Retrieve(ctx context.Context) (aws.Credentials, error) {
+ b, err := p.options.TokenRetriever.GetIdentityToken()
+ if err != nil {
+ return aws.Credentials{}, fmt.Errorf("failed to retrieve jwt from provide source, %w", err)
+ }
+
+ sessionName := p.options.RoleSessionName
+ if len(sessionName) == 0 {
+ // session name is used to uniquely identify a session. This simply
+ // uses unix time in nanoseconds to uniquely identify sessions.
+ sessionName = strconv.FormatInt(sdk.NowTime().UnixNano(), 10)
+ }
+ resp, err := p.options.Client.AssumeRoleWithWebIdentity(ctx, &sts.AssumeRoleWithWebIdentityInput{
+ PolicyArns: p.options.PolicyARNs,
+ RoleArn: &p.options.RoleARN,
+ RoleSessionName: &sessionName,
+ WebIdentityToken: aws.String(string(b)),
+ }, func(options *sts.Options) {
+ options.Retryer = retry.AddWithErrorCodes(options.Retryer, invalidIdentityTokenExceptionCode)
+ })
+ if err != nil {
+ return aws.Credentials{}, fmt.Errorf("failed to retrieve credentials, %w", err)
+ }
+
+ // InvalidIdentityToken error is a temporary error that can occur
+ // when assuming an Role with a JWT web identity token.
+
+ value := aws.Credentials{
+ AccessKeyID: aws.ToString(resp.Credentials.AccessKeyId),
+ SecretAccessKey: aws.ToString(resp.Credentials.SecretAccessKey),
+ SessionToken: aws.ToString(resp.Credentials.SessionToken),
+ Source: WebIdentityProviderName,
+ CanExpire: true,
+ Expires: *resp.Credentials.Expiration,
+ }
+ return value, nil
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/doc.go
new file mode 100644
index 00000000..81644bf8
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/doc.go
@@ -0,0 +1,58 @@
+// Package sdk is the official AWS SDK v2 for the Go programming language.
+//
+// aws-sdk-go-v2 is the the v2 of the AWS SDK for the Go programming language.
+//
+// Getting started
+//
+// The best way to get started working with the SDK is to use `go get` to add the
+// SDK and desired service clients to your Go dependencies explicitly.
+//
+// go get github.com/aws/aws-sdk-go-v2
+// go get github.com/aws/aws-sdk-go-v2/config
+// go get github.com/aws/aws-sdk-go-v2/service/dynamodb
+//
+// Hello AWS
+//
+// This example shows how you can use the v2 SDK to make an API request using the
+// SDK's Amazon DynamoDB client.
+//
+// package main
+//
+// import (
+// "context"
+// "fmt"
+// "log"
+//
+// "github.com/aws/aws-sdk-go-v2/aws"
+// "github.com/aws/aws-sdk-go-v2/config"
+// "github.com/aws/aws-sdk-go-v2/service/dynamodb"
+// )
+//
+// func main() {
+// // Using the SDK's default configuration, loading additional config
+// // and credentials values from the environment variables, shared
+// // credentials, and shared configuration files
+// cfg, err := config.LoadDefaultConfig(context.TODO(),
+// config.WithRegion("us-west-2"),
+// )
+// if err != nil {
+// log.Fatalf("unable to load SDK config, %v", err)
+// }
+//
+// // Using the Config value, create the DynamoDB client
+// svc := dynamodb.NewFromConfig(cfg)
+//
+// // Build the request with its input parameters
+// resp, err := svc.ListTables(context.TODO(), &dynamodb.ListTablesInput{
+// Limit: aws.Int32(5),
+// })
+// if err != nil {
+// log.Fatalf("failed to list tables, %v", err)
+// }
+//
+// fmt.Println("Tables:")
+// for _, tableName := range resp.TableNames {
+// fmt.Println(tableName)
+// }
+// }
+package sdk
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/CHANGELOG.md
new file mode 100644
index 00000000..7c73a124
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/CHANGELOG.md
@@ -0,0 +1,39 @@
+# v1.5.1 (2021-09-17)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.5.0 (2021-08-27)
+
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.4.1 (2021-08-19)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.4.0 (2021-08-04)
+
+* **Feature**: adds error handling for defered close calls
+* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.0 (2021-07-15)
+
+* **Feature**: Support has been added for EC2 IPv6-enabled Instance Metadata Service Endpoints.
+* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.2.0 (2021-06-25)
+
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.1 (2021-05-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.0 (2021-05-14)
+
+* **Feature**: Constant has been added to modules to enable runtime version inspection for reporting.
+* **Dependency Update**: Updated to the latest SDK module versions
+
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/LICENSE.txt b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/LICENSE.txt
new file mode 100644
index 00000000..d6456956
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/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/feature/ec2/imds/api_client.go b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_client.go
new file mode 100644
index 00000000..53f3d3c7
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_client.go
@@ -0,0 +1,318 @@
+package imds
+
+import (
+ "context"
+ "fmt"
+ "net"
+ "net/http"
+ "os"
+ "strings"
+ "time"
+
+ "github.com/aws/aws-sdk-go-v2/aws"
+ "github.com/aws/aws-sdk-go-v2/aws/retry"
+ awshttp "github.com/aws/aws-sdk-go-v2/aws/transport/http"
+ internalconfig "github.com/aws/aws-sdk-go-v2/feature/ec2/imds/internal/config"
+ "github.com/aws/smithy-go"
+ "github.com/aws/smithy-go/logging"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// ServiceID provides the unique name of this API client
+const ServiceID = "ec2imds"
+
+// Client provides the API client for interacting with the Amazon EC2 Instance
+// Metadata Service API.
+type Client struct {
+ options Options
+}
+
+// ClientEnableState provides an enumeration if the client is enabled,
+// disabled, or default behavior.
+type ClientEnableState = internalconfig.ClientEnableState
+
+// Enumeration values for ClientEnableState
+const (
+ ClientDefaultEnableState ClientEnableState = internalconfig.ClientDefaultEnableState // default behavior
+ ClientDisabled ClientEnableState = internalconfig.ClientDisabled // client disabled
+ ClientEnabled ClientEnableState = internalconfig.ClientEnabled // client enabled
+)
+
+// EndpointModeState is an enum configuration variable describing the client endpoint mode.
+// Not configurable directly, but used when using the NewFromConfig.
+type EndpointModeState = internalconfig.EndpointModeState
+
+// Enumeration values for EndpointModeState
+const (
+ EndpointModeStateUnset EndpointModeState = internalconfig.EndpointModeStateUnset
+ EndpointModeStateIPv4 EndpointModeState = internalconfig.EndpointModeStateIPv4
+ EndpointModeStateIPv6 EndpointModeState = internalconfig.EndpointModeStateIPv6
+)
+
+const (
+ disableClientEnvVar = "AWS_EC2_METADATA_DISABLED"
+
+ // Client endpoint options
+ endpointEnvVar = "AWS_EC2_METADATA_SERVICE_ENDPOINT"
+
+ defaultIPv4Endpoint = "http://169.254.169.254"
+ defaultIPv6Endpoint = "http://[fd00:ec2::254]"
+)
+
+// 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()
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ options.HTTPClient = resolveHTTPClient(options.HTTPClient)
+
+ if options.Retryer == nil {
+ options.Retryer = retry.NewStandard()
+ }
+ options.Retryer = retry.AddWithMaxBackoffDelay(options.Retryer, 1*time.Second)
+
+ if options.ClientEnableState == ClientDefaultEnableState {
+ if v := os.Getenv(disableClientEnvVar); strings.EqualFold(v, "true") {
+ options.ClientEnableState = ClientDisabled
+ }
+ }
+
+ if len(options.Endpoint) == 0 {
+ if v := os.Getenv(endpointEnvVar); len(v) != 0 {
+ options.Endpoint = v
+ }
+ }
+
+ client := &Client{
+ options: options,
+ }
+
+ if client.options.tokenProvider == nil && !client.options.disableAPIToken {
+ client.options.tokenProvider = newTokenProvider(client, defaultTokenTTL)
+ }
+
+ return client
+}
+
+// NewFromConfig returns an initialized Client based the AWS SDK config, and
+// 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 NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client {
+ opts := Options{
+ APIOptions: append([]func(*middleware.Stack) error{}, cfg.APIOptions...),
+ HTTPClient: cfg.HTTPClient,
+ }
+
+ if cfg.Retryer != nil {
+ opts.Retryer = cfg.Retryer()
+ }
+
+ resolveClientEnableState(cfg, &opts)
+ resolveEndpointConfig(cfg, &opts)
+ resolveEndpointModeConfig(cfg, &opts)
+
+ return New(opts, optFns...)
+}
+
+// Options provides the fields for configuring the API client's behavior.
+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
+
+ // The endpoint the client will use to retrieve EC2 instance metadata.
+ //
+ // Specifies the EC2 Instance Metadata Service endpoint to use. If specified it overrides EndpointMode.
+ //
+ // If unset, and the environment variable AWS_EC2_METADATA_SERVICE_ENDPOINT
+ // has a value the client will use the value of the environment variable as
+ // the endpoint for operation calls.
+ //
+ // AWS_EC2_METADATA_SERVICE_ENDPOINT=http://[::1]
+ Endpoint string
+
+ // The endpoint selection mode the client will use if no explicit endpoint is provided using the Endpoint field.
+ //
+ // Setting EndpointMode to EndpointModeStateIPv4 will configure the client to use the default EC2 IPv4 endpoint.
+ // Setting EndpointMode to EndpointModeStateIPv6 will configure the client to use the default EC2 IPv6 endpoint.
+ //
+ // By default if EndpointMode is not set (EndpointModeStateUnset) than the default endpoint selection mode EndpointModeStateIPv4.
+ EndpointMode EndpointModeState
+
+ // The HTTP client to invoke API calls with. Defaults to client's default
+ // HTTP implementation if nil.
+ HTTPClient HTTPClient
+
+ // Retryer guides how HTTP requests should be retried in case of recoverable
+ // failures. When nil the API client will use a default retryer.
+ Retryer aws.Retryer
+
+ // Changes if the EC2 Instance Metadata client is enabled or not. Client
+ // will default to enabled if not set to ClientDisabled. When the client is
+ // disabled it will return an error for all operation calls.
+ //
+ // If ClientEnableState value is ClientDefaultEnableState (default value),
+ // and the environment variable "AWS_EC2_METADATA_DISABLED" is set to
+ // "true", the client will be disabled.
+ //
+ // AWS_EC2_METADATA_DISABLED=true
+ ClientEnableState ClientEnableState
+
+ // Configures the events that will be sent to the configured logger.
+ ClientLogMode aws.ClientLogMode
+
+ // The logger writer interface to write logging messages to.
+ Logger logging.Logger
+
+ // provides the caching of API tokens used for operation calls. If unset,
+ // the API token will not be retrieved for the operation.
+ tokenProvider *tokenProvider
+
+ // option to disable the API token provider for testing.
+ disableAPIToken bool
+}
+
+// HTTPClient provides the interface for a client making HTTP requests with the
+// API.
+type HTTPClient interface {
+ Do(*http.Request) (*http.Response, error)
+}
+
+// Copy creates a copy of the API options.
+func (o Options) Copy() Options {
+ to := o
+ to.APIOptions = append([]func(*middleware.Stack) error{}, o.APIOptions...)
+ return to
+}
+
+// WithAPIOptions wraps the API middleware functions, as a functional option
+// for the API Client Options. Use this helper to add additional functional
+// options to the API client, or operation calls.
+func WithAPIOptions(optFns ...func(*middleware.Stack) error) func(*Options) {
+ return func(o *Options) {
+ o.APIOptions = append(o.APIOptions, optFns...)
+ }
+}
+
+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,
+) {
+ stack := middleware.NewStack(opID, smithyhttp.NewStackRequest)
+ options := c.options.Copy()
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ if options.ClientEnableState == ClientDisabled {
+ return nil, metadata, &smithy.OperationError{
+ ServiceID: ServiceID,
+ OperationName: opID,
+ Err: fmt.Errorf(
+ "access disabled to EC2 IMDS via client option, or %q environment variable",
+ disableClientEnvVar),
+ }
+ }
+
+ 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 {
+ return nil, metadata, &smithy.OperationError{
+ ServiceID: ServiceID,
+ OperationName: opID,
+ Err: err,
+ }
+ }
+
+ return result, metadata, err
+}
+
+const (
+ // HTTP client constants
+ defaultDialerTimeout = 250 * time.Millisecond
+ defaultResponseHeaderTimeout = 500 * time.Millisecond
+)
+
+func resolveHTTPClient(client HTTPClient) HTTPClient {
+ if client == nil {
+ client = awshttp.NewBuildableClient()
+ }
+
+ if c, ok := client.(*awshttp.BuildableClient); ok {
+ client = c.
+ WithDialerOptions(func(d *net.Dialer) {
+ // Use a custom Dial timeout for the EC2 Metadata service to account
+ // for the possibility the application might not be running in an
+ // environment with the service present. The client should fail fast in
+ // this case.
+ d.Timeout = defaultDialerTimeout
+ }).
+ WithTransportOptions(func(tr *http.Transport) {
+ // Use a custom Transport timeout for the EC2 Metadata service to
+ // account for the possibility that the application might be running in
+ // a container, and EC2Metadata service drops the connection after a
+ // single IP Hop. The client should fail fast in this case.
+ tr.ResponseHeaderTimeout = defaultResponseHeaderTimeout
+ })
+ }
+
+ return client
+}
+
+func resolveClientEnableState(cfg aws.Config, options *Options) error {
+ if options.ClientEnableState != ClientDefaultEnableState {
+ return nil
+ }
+ value, found, err := internalconfig.ResolveClientEnableState(cfg.ConfigSources)
+ if err != nil || !found {
+ return err
+ }
+ options.ClientEnableState = value
+ return nil
+}
+
+func resolveEndpointModeConfig(cfg aws.Config, options *Options) error {
+ if options.EndpointMode != EndpointModeStateUnset {
+ return nil
+ }
+ value, found, err := internalconfig.ResolveEndpointModeConfig(cfg.ConfigSources)
+ if err != nil || !found {
+ return err
+ }
+ options.EndpointMode = value
+ return nil
+}
+
+func resolveEndpointConfig(cfg aws.Config, options *Options) error {
+ if len(options.Endpoint) != 0 {
+ return nil
+ }
+ value, found, err := internalconfig.ResolveEndpointConfig(cfg.ConfigSources)
+ if err != nil || !found {
+ return err
+ }
+ options.Endpoint = value
+ return nil
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetDynamicData.go b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetDynamicData.go
new file mode 100644
index 00000000..9e3bdb0e
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetDynamicData.go
@@ -0,0 +1,76 @@
+package imds
+
+import (
+ "context"
+ "fmt"
+ "io"
+
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+const getDynamicDataPath = "/latest/dynamic"
+
+// GetDynamicData uses the path provided to request information from the EC2
+// instance metadata service for dynamic data. The content will be returned
+// as a string, or error if the request failed.
+func (c *Client) GetDynamicData(ctx context.Context, params *GetDynamicDataInput, optFns ...func(*Options)) (*GetDynamicDataOutput, error) {
+ if params == nil {
+ params = &GetDynamicDataInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetDynamicData", params, optFns,
+ addGetDynamicDataMiddleware,
+ )
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetDynamicDataOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+// GetDynamicDataInput provides the input parameters for the GetDynamicData
+// operation.
+type GetDynamicDataInput struct {
+ // The relative dynamic data path to retrieve. Can be empty string to
+ // retrieve a response containing a new line separated list of dynamic data
+ // resources available.
+ //
+ // Must not include the dynamic data base path.
+ //
+ // May include leading slash. If Path includes trailing slash the trailing
+ // slash will be included in the request for the resource.
+ Path string
+}
+
+// GetDynamicDataOutput provides the output parameters for the GetDynamicData
+// operation.
+type GetDynamicDataOutput struct {
+ Content io.ReadCloser
+
+ ResultMetadata middleware.Metadata
+}
+
+func addGetDynamicDataMiddleware(stack *middleware.Stack, options Options) error {
+ return addAPIRequestMiddleware(stack,
+ options,
+ buildGetDynamicDataPath,
+ buildGetDynamicDataOutput)
+}
+
+func buildGetDynamicDataPath(params interface{}) (string, error) {
+ p, ok := params.(*GetDynamicDataInput)
+ if !ok {
+ return "", fmt.Errorf("unknown parameter type %T", params)
+ }
+
+ return appendURIPath(getDynamicDataPath, p.Path), nil
+}
+
+func buildGetDynamicDataOutput(resp *smithyhttp.Response) (interface{}, error) {
+ return &GetDynamicDataOutput{
+ Content: resp.Body,
+ }, nil
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetIAMInfo.go b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetIAMInfo.go
new file mode 100644
index 00000000..24845dcc
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetIAMInfo.go
@@ -0,0 +1,102 @@
+package imds
+
+import (
+ "context"
+ "encoding/json"
+ "fmt"
+ "io"
+ "strings"
+ "time"
+
+ "github.com/aws/smithy-go"
+ smithyio "github.com/aws/smithy-go/io"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+const getIAMInfoPath = getMetadataPath + "/iam/info"
+
+// GetIAMInfo retrieves an identity document describing an
+// instance. Error is returned if the request fails or is unable to parse
+// the response.
+func (c *Client) GetIAMInfo(
+ ctx context.Context, params *GetIAMInfoInput, optFns ...func(*Options),
+) (
+ *GetIAMInfoOutput, error,
+) {
+ if params == nil {
+ params = &GetIAMInfoInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetIAMInfo", params, optFns,
+ addGetIAMInfoMiddleware,
+ )
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetIAMInfoOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+// GetIAMInfoInput provides the input parameters for GetIAMInfo operation.
+type GetIAMInfoInput struct{}
+
+// GetIAMInfoOutput provides the output parameters for GetIAMInfo operation.
+type GetIAMInfoOutput struct {
+ IAMInfo
+
+ ResultMetadata middleware.Metadata
+}
+
+func addGetIAMInfoMiddleware(stack *middleware.Stack, options Options) error {
+ return addAPIRequestMiddleware(stack,
+ options,
+ buildGetIAMInfoPath,
+ buildGetIAMInfoOutput,
+ )
+}
+
+func buildGetIAMInfoPath(params interface{}) (string, error) {
+ return getIAMInfoPath, nil
+}
+
+func buildGetIAMInfoOutput(resp *smithyhttp.Response) (v interface{}, err error) {
+ defer func() {
+ closeErr := resp.Body.Close()
+ if err == nil {
+ err = closeErr
+ } else if closeErr != nil {
+ err = fmt.Errorf("response body close error: %v, original error: %w", closeErr, err)
+ }
+ }()
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+ body := io.TeeReader(resp.Body, ringBuffer)
+
+ imdsResult := &GetIAMInfoOutput{}
+ if err = json.NewDecoder(body).Decode(&imdsResult.IAMInfo); err != nil {
+ return nil, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode instance identity document, %w", err),
+ Snapshot: ringBuffer.Bytes(),
+ }
+ }
+ // Any code other success is an error
+ if !strings.EqualFold(imdsResult.Code, "success") {
+ return nil, fmt.Errorf("failed to get EC2 IMDS IAM info, %s",
+ imdsResult.Code)
+ }
+
+ return imdsResult, nil
+}
+
+// IAMInfo provides the shape for unmarshaling an IAM info from the metadata
+// API.
+type IAMInfo struct {
+ Code string
+ LastUpdated time.Time
+ InstanceProfileArn string
+ InstanceProfileID string
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetInstanceIdentityDocument.go b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetInstanceIdentityDocument.go
new file mode 100644
index 00000000..a87758ed
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetInstanceIdentityDocument.go
@@ -0,0 +1,109 @@
+package imds
+
+import (
+ "context"
+ "encoding/json"
+ "fmt"
+ "io"
+ "time"
+
+ "github.com/aws/smithy-go"
+ smithyio "github.com/aws/smithy-go/io"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+const getInstanceIdentityDocumentPath = getDynamicDataPath + "/instance-identity/document"
+
+// GetInstanceIdentityDocument retrieves an identity document describing an
+// instance. Error is returned if the request fails or is unable to parse
+// the response.
+func (c *Client) GetInstanceIdentityDocument(
+ ctx context.Context, params *GetInstanceIdentityDocumentInput, optFns ...func(*Options),
+) (
+ *GetInstanceIdentityDocumentOutput, error,
+) {
+ if params == nil {
+ params = &GetInstanceIdentityDocumentInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetInstanceIdentityDocument", params, optFns,
+ addGetInstanceIdentityDocumentMiddleware,
+ )
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetInstanceIdentityDocumentOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+// GetInstanceIdentityDocumentInput provides the input parameters for
+// GetInstanceIdentityDocument operation.
+type GetInstanceIdentityDocumentInput struct{}
+
+// GetInstanceIdentityDocumentOutput provides the output parameters for
+// GetInstanceIdentityDocument operation.
+type GetInstanceIdentityDocumentOutput struct {
+ InstanceIdentityDocument
+
+ ResultMetadata middleware.Metadata
+}
+
+func addGetInstanceIdentityDocumentMiddleware(stack *middleware.Stack, options Options) error {
+ return addAPIRequestMiddleware(stack,
+ options,
+ buildGetInstanceIdentityDocumentPath,
+ buildGetInstanceIdentityDocumentOutput,
+ )
+}
+
+func buildGetInstanceIdentityDocumentPath(params interface{}) (string, error) {
+ return getInstanceIdentityDocumentPath, nil
+}
+
+func buildGetInstanceIdentityDocumentOutput(resp *smithyhttp.Response) (v interface{}, err error) {
+ defer func() {
+ closeErr := resp.Body.Close()
+ if err == nil {
+ err = closeErr
+ } else if closeErr != nil {
+ err = fmt.Errorf("response body close error: %v, original error: %w", closeErr, err)
+ }
+ }()
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+ body := io.TeeReader(resp.Body, ringBuffer)
+
+ output := &GetInstanceIdentityDocumentOutput{}
+ if err = json.NewDecoder(body).Decode(&output.InstanceIdentityDocument); err != nil {
+ return nil, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode instance identity document, %w", err),
+ Snapshot: ringBuffer.Bytes(),
+ }
+ }
+
+ return output, nil
+}
+
+// InstanceIdentityDocument provides the shape for unmarshaling
+// an instance identity document
+type InstanceIdentityDocument struct {
+ DevpayProductCodes []string `json:"devpayProductCodes"`
+ MarketplaceProductCodes []string `json:"marketplaceProductCodes"`
+ AvailabilityZone string `json:"availabilityZone"`
+ PrivateIP string `json:"privateIp"`
+ Version string `json:"version"`
+ Region string `json:"region"`
+ InstanceID string `json:"instanceId"`
+ BillingProducts []string `json:"billingProducts"`
+ InstanceType string `json:"instanceType"`
+ AccountID string `json:"accountId"`
+ PendingTime time.Time `json:"pendingTime"`
+ ImageID string `json:"imageId"`
+ KernelID string `json:"kernelId"`
+ RamdiskID string `json:"ramdiskId"`
+ Architecture string `json:"architecture"`
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetMetadata.go b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetMetadata.go
new file mode 100644
index 00000000..cb0ce4c0
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetMetadata.go
@@ -0,0 +1,76 @@
+package imds
+
+import (
+ "context"
+ "fmt"
+ "io"
+
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+const getMetadataPath = "/latest/meta-data"
+
+// GetMetadata uses the path provided to request information from the Amazon
+// EC2 Instance Metadata Service. The content will be returned as a string, or
+// error if the request failed.
+func (c *Client) GetMetadata(ctx context.Context, params *GetMetadataInput, optFns ...func(*Options)) (*GetMetadataOutput, error) {
+ if params == nil {
+ params = &GetMetadataInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetMetadata", params, optFns,
+ addGetMetadataMiddleware,
+ )
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetMetadataOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+// GetMetadataInput provides the input parameters for the GetMetadata
+// operation.
+type GetMetadataInput struct {
+ // The relative metadata path to retrieve. Can be empty string to retrieve
+ // a response containing a new line separated list of metadata resources
+ // available.
+ //
+ // Must not include the metadata base path.
+ //
+ // May include leading slash. If Path includes trailing slash the trailing slash
+ // will be included in the request for the resource.
+ Path string
+}
+
+// GetMetadataOutput provides the output parameters for the GetMetadata
+// operation.
+type GetMetadataOutput struct {
+ Content io.ReadCloser
+
+ ResultMetadata middleware.Metadata
+}
+
+func addGetMetadataMiddleware(stack *middleware.Stack, options Options) error {
+ return addAPIRequestMiddleware(stack,
+ options,
+ buildGetMetadataPath,
+ buildGetMetadataOutput)
+}
+
+func buildGetMetadataPath(params interface{}) (string, error) {
+ p, ok := params.(*GetMetadataInput)
+ if !ok {
+ return "", fmt.Errorf("unknown parameter type %T", params)
+ }
+
+ return appendURIPath(getMetadataPath, p.Path), nil
+}
+
+func buildGetMetadataOutput(resp *smithyhttp.Response) (interface{}, error) {
+ return &GetMetadataOutput{
+ Content: resp.Body,
+ }, nil
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetRegion.go b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetRegion.go
new file mode 100644
index 00000000..7b9b4891
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetRegion.go
@@ -0,0 +1,72 @@
+package imds
+
+import (
+ "context"
+ "fmt"
+
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// GetRegion retrieves an identity document describing an
+// instance. Error is returned if the request fails or is unable to parse
+// the response.
+func (c *Client) GetRegion(
+ ctx context.Context, params *GetRegionInput, optFns ...func(*Options),
+) (
+ *GetRegionOutput, error,
+) {
+ if params == nil {
+ params = &GetRegionInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetRegion", params, optFns,
+ addGetRegionMiddleware,
+ )
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetRegionOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+// GetRegionInput provides the input parameters for GetRegion operation.
+type GetRegionInput struct{}
+
+// GetRegionOutput provides the output parameters for GetRegion operation.
+type GetRegionOutput struct {
+ Region string
+
+ ResultMetadata middleware.Metadata
+}
+
+func addGetRegionMiddleware(stack *middleware.Stack, options Options) error {
+ return addAPIRequestMiddleware(stack,
+ options,
+ buildGetInstanceIdentityDocumentPath,
+ buildGetRegionOutput,
+ )
+}
+
+func buildGetRegionOutput(resp *smithyhttp.Response) (interface{}, error) {
+ out, err := buildGetInstanceIdentityDocumentOutput(resp)
+ if err != nil {
+ return nil, err
+ }
+
+ result, ok := out.(*GetInstanceIdentityDocumentOutput)
+ if !ok {
+ return nil, fmt.Errorf("unexpected instance identity document type, %T", out)
+ }
+
+ region := result.Region
+ if len(region) == 0 {
+ return "", fmt.Errorf("instance metadata did not return a region value")
+ }
+
+ return &GetRegionOutput{
+ Region: region,
+ }, nil
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetToken.go b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetToken.go
new file mode 100644
index 00000000..841f802c
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetToken.go
@@ -0,0 +1,118 @@
+package imds
+
+import (
+ "context"
+ "fmt"
+ "io"
+ "strconv"
+ "strings"
+ "time"
+
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+const getTokenPath = "/latest/api/token"
+const tokenTTLHeader = "X-Aws-Ec2-Metadata-Token-Ttl-Seconds"
+
+// getToken uses the duration to return a token for EC2 IMDS, or an error if
+// the request failed.
+func (c *Client) getToken(ctx context.Context, params *getTokenInput, optFns ...func(*Options)) (*getTokenOutput, error) {
+ if params == nil {
+ params = &getTokenInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "getToken", params, optFns,
+ addGetTokenMiddleware,
+ )
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*getTokenOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type getTokenInput struct {
+ TokenTTL time.Duration
+}
+
+type getTokenOutput struct {
+ Token string
+ TokenTTL time.Duration
+
+ ResultMetadata middleware.Metadata
+}
+
+func addGetTokenMiddleware(stack *middleware.Stack, options Options) error {
+ err := addRequestMiddleware(stack,
+ options,
+ "PUT",
+ buildGetTokenPath,
+ buildGetTokenOutput)
+ if err != nil {
+ return err
+ }
+
+ err = stack.Serialize.Add(&tokenTTLRequestHeader{}, middleware.After)
+ if err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func buildGetTokenPath(interface{}) (string, error) {
+ return getTokenPath, nil
+}
+
+func buildGetTokenOutput(resp *smithyhttp.Response) (v interface{}, err error) {
+ defer func() {
+ closeErr := resp.Body.Close()
+ if err == nil {
+ err = closeErr
+ } else if closeErr != nil {
+ err = fmt.Errorf("response body close error: %v, original error: %w", closeErr, err)
+ }
+ }()
+
+ ttlHeader := resp.Header.Get(tokenTTLHeader)
+ tokenTTL, err := strconv.ParseInt(ttlHeader, 10, 64)
+ if err != nil {
+ return nil, fmt.Errorf("unable to parse API token, %w", err)
+ }
+
+ var token strings.Builder
+ if _, err = io.Copy(&token, resp.Body); err != nil {
+ return nil, fmt.Errorf("unable to read API token, %w", err)
+ }
+
+ return &getTokenOutput{
+ Token: token.String(),
+ TokenTTL: time.Duration(tokenTTL) * time.Second,
+ }, nil
+}
+
+type tokenTTLRequestHeader struct{}
+
+func (*tokenTTLRequestHeader) ID() string { return "tokenTTLRequestHeader" }
+func (*tokenTTLRequestHeader) 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("expect HTTP transport, got %T", in.Request)
+ }
+
+ input, ok := in.Parameters.(*getTokenInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("expect getTokenInput, got %T", in.Parameters)
+ }
+
+ req.Header.Set(tokenTTLHeader, strconv.Itoa(int(input.TokenTTL/time.Second)))
+
+ return next.HandleSerialize(ctx, in)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetUserData.go b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetUserData.go
new file mode 100644
index 00000000..88aa61e9
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetUserData.go
@@ -0,0 +1,60 @@
+package imds
+
+import (
+ "context"
+ "io"
+
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+const getUserDataPath = "/latest/user-data"
+
+// GetUserData uses the path provided to request information from the EC2
+// instance metadata service for dynamic data. The content will be returned
+// as a string, or error if the request failed.
+func (c *Client) GetUserData(ctx context.Context, params *GetUserDataInput, optFns ...func(*Options)) (*GetUserDataOutput, error) {
+ if params == nil {
+ params = &GetUserDataInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetUserData", params, optFns,
+ addGetUserDataMiddleware,
+ )
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetUserDataOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+// GetUserDataInput provides the input parameters for the GetUserData
+// operation.
+type GetUserDataInput struct{}
+
+// GetUserDataOutput provides the output parameters for the GetUserData
+// operation.
+type GetUserDataOutput struct {
+ Content io.ReadCloser
+
+ ResultMetadata middleware.Metadata
+}
+
+func addGetUserDataMiddleware(stack *middleware.Stack, options Options) error {
+ return addAPIRequestMiddleware(stack,
+ options,
+ buildGetUserDataPath,
+ buildGetUserDataOutput)
+}
+
+func buildGetUserDataPath(params interface{}) (string, error) {
+ return getUserDataPath, nil
+}
+
+func buildGetUserDataOutput(resp *smithyhttp.Response) (interface{}, error) {
+ return &GetUserDataOutput{
+ Content: resp.Body,
+ }, nil
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/doc.go
new file mode 100644
index 00000000..9ae60829
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/doc.go
@@ -0,0 +1,6 @@
+// Package imds provides the API client for interacting with the Amazon EC2
+// Instance Metadata Service.
+//
+// See the EC2 IMDS user guide for more information on using the API.
+// https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html
+package imds
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/go.mod b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/go.mod
new file mode 100644
index 00000000..3404dca0
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/go.mod
@@ -0,0 +1,11 @@
+module github.com/aws/aws-sdk-go-v2/feature/ec2/imds
+
+go 1.15
+
+require (
+ github.com/aws/aws-sdk-go-v2 v1.9.1
+ github.com/aws/smithy-go v1.8.0
+ github.com/google/go-cmp v0.5.6
+)
+
+replace github.com/aws/aws-sdk-go-v2 => ../../../
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/go.sum b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/go.sum
new file mode 100644
index 00000000..779915f8
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/go.sum
@@ -0,0 +1,14 @@
+github.com/aws/smithy-go v1.8.0 h1:AEwwwXQZtUwP5Mz506FeXXrKBe0jA8gVM+1gEcSRooc=
+github.com/aws/smithy-go v1.8.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E=
+github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ=
+github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo=
+github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U=
+github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
+github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
+golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
+golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/go_module_metadata.go
new file mode 100644
index 00000000..44986b42
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/go_module_metadata.go
@@ -0,0 +1,6 @@
+// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT.
+
+package imds
+
+// goModuleVersion is the tagged release for this module
+const goModuleVersion = "1.5.1"
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/internal/config/resolvers.go b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/internal/config/resolvers.go
new file mode 100644
index 00000000..d72fcb56
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/internal/config/resolvers.go
@@ -0,0 +1,98 @@
+package config
+
+import (
+ "fmt"
+ "strings"
+)
+
+// ClientEnableState provides an enumeration if the client is enabled,
+// disabled, or default behavior.
+type ClientEnableState uint
+
+// Enumeration values for ClientEnableState
+const (
+ ClientDefaultEnableState ClientEnableState = iota
+ ClientDisabled
+ ClientEnabled
+)
+
+// EndpointModeState is the EC2 IMDS Endpoint Configuration Mode
+type EndpointModeState uint
+
+// Enumeration values for ClientEnableState
+const (
+ EndpointModeStateUnset EndpointModeState = iota
+ EndpointModeStateIPv4
+ EndpointModeStateIPv6
+)
+
+// SetFromString sets the EndpointModeState based on the provided string value. Unknown values will default to EndpointModeStateUnset
+func (e *EndpointModeState) SetFromString(v string) error {
+ v = strings.TrimSpace(v)
+
+ switch {
+ case len(v) == 0:
+ *e = EndpointModeStateUnset
+ case strings.EqualFold(v, "IPv6"):
+ *e = EndpointModeStateIPv6
+ case strings.EqualFold(v, "IPv4"):
+ *e = EndpointModeStateIPv4
+ default:
+ return fmt.Errorf("unknown EC2 IMDS endpoint mode, must be either IPv6 or IPv4")
+ }
+ return nil
+}
+
+// ClientEnableStateResolver is a config resolver interface for retrieving whether the IMDS client is disabled.
+type ClientEnableStateResolver interface {
+ GetEC2IMDSClientEnableState() (ClientEnableState, bool, error)
+}
+
+// EndpointModeResolver is a config resolver interface for retrieving the EndpointModeState configuration.
+type EndpointModeResolver interface {
+ GetEC2IMDSEndpointMode() (EndpointModeState, bool, error)
+}
+
+// EndpointResolver is a config resolver interface for retrieving the endpoint.
+type EndpointResolver interface {
+ GetEC2IMDSEndpoint() (string, bool, error)
+}
+
+// ResolveClientEnableState resolves the ClientEnableState from a list of configuration sources.
+func ResolveClientEnableState(sources []interface{}) (value ClientEnableState, found bool, err error) {
+ for _, source := range sources {
+ if resolver, ok := source.(ClientEnableStateResolver); ok {
+ value, found, err = resolver.GetEC2IMDSClientEnableState()
+ if err != nil || found {
+ return value, found, err
+ }
+ }
+ }
+ return value, found, err
+}
+
+// ResolveEndpointModeConfig resolves the EndpointModeState from a list of configuration sources.
+func ResolveEndpointModeConfig(sources []interface{}) (value EndpointModeState, found bool, err error) {
+ for _, source := range sources {
+ if resolver, ok := source.(EndpointModeResolver); ok {
+ value, found, err = resolver.GetEC2IMDSEndpointMode()
+ if err != nil || found {
+ return value, found, err
+ }
+ }
+ }
+ return value, found, err
+}
+
+// ResolveEndpointConfig resolves the endpoint from a list of configuration sources.
+func ResolveEndpointConfig(sources []interface{}) (value string, found bool, err error) {
+ for _, source := range sources {
+ if resolver, ok := source.(EndpointResolver); ok {
+ value, found, err = resolver.GetEC2IMDSEndpoint()
+ if err != nil || found {
+ return value, found, err
+ }
+ }
+ }
+ return value, found, err
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/request_middleware.go b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/request_middleware.go
new file mode 100644
index 00000000..93f02405
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/request_middleware.go
@@ -0,0 +1,244 @@
+package imds
+
+import (
+ "context"
+ "fmt"
+ "net/url"
+ "path"
+ "time"
+
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/retry"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+func addAPIRequestMiddleware(stack *middleware.Stack,
+ options Options,
+ getPath func(interface{}) (string, error),
+ getOutput func(*smithyhttp.Response) (interface{}, error),
+) (err error) {
+ err = addRequestMiddleware(stack, options, "GET", getPath, getOutput)
+ if err != nil {
+ return err
+ }
+
+ // Token Serializer build and state management.
+ if !options.disableAPIToken {
+ err = stack.Finalize.Insert(options.tokenProvider, (*retry.Attempt)(nil).ID(), middleware.After)
+ if err != nil {
+ return err
+ }
+
+ err = stack.Deserialize.Insert(options.tokenProvider, "OperationDeserializer", middleware.Before)
+ if err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func addRequestMiddleware(stack *middleware.Stack,
+ options Options,
+ method string,
+ getPath func(interface{}) (string, error),
+ getOutput func(*smithyhttp.Response) (interface{}, error),
+) (err error) {
+ err = awsmiddleware.AddSDKAgentKey(awsmiddleware.FeatureMetadata, "ec2-imds")(stack)
+ if err != nil {
+ return err
+ }
+
+ // Operation timeout
+ err = stack.Initialize.Add(&operationTimeout{
+ Timeout: defaultOperationTimeout,
+ }, middleware.Before)
+ if err != nil {
+ return err
+ }
+
+ // Operation Serializer
+ err = stack.Serialize.Add(&serializeRequest{
+ GetPath: getPath,
+ Method: method,
+ }, middleware.After)
+ if err != nil {
+ return err
+ }
+
+ // Operation endpoint resolver
+ err = stack.Serialize.Insert(&resolveEndpoint{
+ Endpoint: options.Endpoint,
+ EndpointMode: options.EndpointMode,
+ }, "OperationSerializer", middleware.Before)
+ if err != nil {
+ return err
+ }
+
+ // Operation Deserializer
+ err = stack.Deserialize.Add(&deserializeResponse{
+ GetOutput: getOutput,
+ }, middleware.After)
+ if err != nil {
+ return err
+ }
+
+ // Retry support
+ return retry.AddRetryMiddlewares(stack, retry.AddRetryMiddlewaresOptions{
+ Retryer: options.Retryer,
+ LogRetryAttempts: options.ClientLogMode.IsRetries(),
+ })
+}
+
+type serializeRequest struct {
+ GetPath func(interface{}) (string, error)
+ Method string
+}
+
+func (*serializeRequest) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *serializeRequest) 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, fmt.Errorf("unknown transport type %T", in.Request)
+ }
+
+ reqPath, err := m.GetPath(in.Parameters)
+ if err != nil {
+ return out, metadata, fmt.Errorf("unable to get request URL path, %w", err)
+ }
+
+ request.Request.URL.Path = reqPath
+ request.Request.Method = m.Method
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type deserializeResponse struct {
+ GetOutput func(*smithyhttp.Response) (interface{}, error)
+}
+
+func (*deserializeResponse) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *deserializeResponse) 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
+ }
+
+ resp, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, fmt.Errorf(
+ "unexpected transport response type, %T", out.RawResponse)
+ }
+
+ // Anything thats not 200 |< 300 is error
+ if resp.StatusCode < 200 || resp.StatusCode >= 300 {
+ resp.Body.Close()
+ return out, metadata, &smithyhttp.ResponseError{
+ Response: resp,
+ Err: fmt.Errorf("request to EC2 IMDS failed"),
+ }
+ }
+
+ result, err := m.GetOutput(resp)
+ if err != nil {
+ return out, metadata, fmt.Errorf(
+ "unable to get deserialized result for response, %w", err,
+ )
+ }
+ out.Result = result
+
+ return out, metadata, err
+}
+
+type resolveEndpoint struct {
+ Endpoint string
+ EndpointMode EndpointModeState
+}
+
+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)
+ }
+
+ var endpoint string
+ if len(m.Endpoint) > 0 {
+ endpoint = m.Endpoint
+ } else {
+ switch m.EndpointMode {
+ case EndpointModeStateIPv6:
+ endpoint = defaultIPv6Endpoint
+ case EndpointModeStateIPv4:
+ fallthrough
+ case EndpointModeStateUnset:
+ endpoint = defaultIPv4Endpoint
+ default:
+ return out, metadata, fmt.Errorf("unsupported IMDS endpoint mode")
+ }
+ }
+
+ req.URL, err = url.Parse(endpoint)
+ if err != nil {
+ return out, metadata, fmt.Errorf("failed to parse endpoint URL: %w", err)
+ }
+
+ return next.HandleSerialize(ctx, in)
+}
+
+const (
+ defaultOperationTimeout = 5 * time.Second
+)
+
+type operationTimeout struct {
+ Timeout time.Duration
+}
+
+func (*operationTimeout) ID() string { return "OperationTimeout" }
+
+func (m *operationTimeout) HandleInitialize(
+ ctx context.Context, input middleware.InitializeInput, next middleware.InitializeHandler,
+) (
+ output middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ var cancelFn func()
+
+ ctx, cancelFn = context.WithTimeout(ctx, m.Timeout)
+ defer cancelFn()
+
+ return next.HandleInitialize(ctx, input)
+}
+
+// appendURIPath joins a URI path component to the existing path with `/`
+// separators between the path components. If the path being added ends with a
+// trailing `/` that slash will be maintained.
+func appendURIPath(base, add string) string {
+ reqPath := path.Join(base, add)
+ if len(add) != 0 && add[len(add)-1] == '/' {
+ reqPath += "/"
+ }
+ return reqPath
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/token_provider.go b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/token_provider.go
new file mode 100644
index 00000000..275fade4
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/token_provider.go
@@ -0,0 +1,237 @@
+package imds
+
+import (
+ "context"
+ "errors"
+ "fmt"
+ "net/http"
+ "sync"
+ "sync/atomic"
+ "time"
+
+ smithy "github.com/aws/smithy-go"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+const (
+ // Headers for Token and TTL
+ tokenHeader = "x-aws-ec2-metadata-token"
+ defaultTokenTTL = 5 * time.Minute
+)
+
+type tokenProvider struct {
+ client *Client
+ tokenTTL time.Duration
+
+ token *apiToken
+ tokenMux sync.RWMutex
+
+ disabled uint32 // Atomic updated
+}
+
+func newTokenProvider(client *Client, ttl time.Duration) *tokenProvider {
+ return &tokenProvider{
+ client: client,
+ tokenTTL: ttl,
+ }
+}
+
+// apiToken provides the API token used by all operation calls for th EC2
+// Instance metadata service.
+type apiToken struct {
+ token string
+ expires time.Time
+}
+
+var timeNow = time.Now
+
+// Expired returns if the token is expired.
+func (t *apiToken) Expired() bool {
+ // Calling Round(0) on the current time will truncate the monotonic reading only. Ensures credential expiry
+ // time is always based on reported wall-clock time.
+ return timeNow().Round(0).After(t.expires)
+}
+
+func (t *tokenProvider) ID() string { return "APITokenProvider" }
+
+// HandleFinalize is the finalize stack middleware, that if the token provider is
+// enabled, will attempt to add the cached API token to the request. If the API
+// token is not cached, it will be retrieved in a separate API call, getToken.
+//
+// For retry attempts, handler must be added after attempt retryer.
+//
+// If request for getToken fails the token provider may be disabled from future
+// requests, depending on the response status code.
+func (t *tokenProvider) HandleFinalize(
+ ctx context.Context, input middleware.FinalizeInput, next middleware.FinalizeHandler,
+) (
+ out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
+) {
+ if !t.enabled() {
+ // short-circuits to insecure data flow if token provider is disabled.
+ return next.HandleFinalize(ctx, input)
+ }
+
+ req, ok := input.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, fmt.Errorf("unexpected transport request type %T", input.Request)
+ }
+
+ tok, err := t.getToken(ctx)
+ if err != nil {
+ // If the error allows the token to downgrade to insecure flow allow that.
+ var bypassErr *bypassTokenRetrievalError
+ if errors.As(err, &bypassErr) {
+ return next.HandleFinalize(ctx, input)
+ }
+
+ return out, metadata, fmt.Errorf("failed to get API token, %w", err)
+ }
+
+ req.Header.Set(tokenHeader, tok.token)
+
+ return next.HandleFinalize(ctx, input)
+}
+
+// HandleDeserialize is the deserialize stack middleware for determining if the
+// operation the token provider is decorating failed because of a 401
+// unauthorized status code. If the operation failed for that reason the token
+// provider needs to be re-enabled so that it can start adding the API token to
+// operation calls.
+func (t *tokenProvider) HandleDeserialize(
+ ctx context.Context, input middleware.DeserializeInput, next middleware.DeserializeHandler,
+) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, input)
+ if err == nil {
+ return out, metadata, err
+ }
+
+ resp, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, fmt.Errorf("expect HTTP transport, got %T", out.RawResponse)
+ }
+
+ if resp.StatusCode == http.StatusUnauthorized { // unauthorized
+ err = &retryableError{Err: err}
+ t.enable()
+ }
+
+ return out, metadata, err
+}
+
+type retryableError struct {
+ Err error
+}
+
+func (*retryableError) RetryableError() bool { return true }
+
+func (e *retryableError) Error() string { return e.Err.Error() }
+
+func (t *tokenProvider) getToken(ctx context.Context) (tok *apiToken, err error) {
+ if !t.enabled() {
+ return nil, &bypassTokenRetrievalError{
+ Err: fmt.Errorf("cannot get API token, provider disabled"),
+ }
+ }
+
+ t.tokenMux.RLock()
+ tok = t.token
+ t.tokenMux.RUnlock()
+
+ if tok != nil && !tok.Expired() {
+ return tok, nil
+ }
+
+ tok, err = t.updateToken(ctx)
+ if err != nil {
+ return nil, fmt.Errorf("cannot get API token, %w", err)
+ }
+
+ return tok, nil
+}
+
+func (t *tokenProvider) updateToken(ctx context.Context) (*apiToken, error) {
+ t.tokenMux.Lock()
+ defer t.tokenMux.Unlock()
+
+ // Prevent multiple requests to update retrieving the token.
+ if t.token != nil && !t.token.Expired() {
+ tok := t.token
+ return tok, nil
+ }
+
+ result, err := t.client.getToken(ctx, &getTokenInput{
+ TokenTTL: t.tokenTTL,
+ })
+ if err != nil {
+ // change the disabled flag on token provider to true, when error is request timeout error.
+ var statusErr interface{ HTTPStatusCode() int }
+ if errors.As(err, &statusErr) {
+ switch statusErr.HTTPStatusCode() {
+
+ // Disable get token if failed because of 403, 404, or 405
+ case http.StatusForbidden,
+ http.StatusNotFound,
+ http.StatusMethodNotAllowed:
+
+ t.disable()
+
+ // 400 errors are terminal, and need to be upstreamed
+ case http.StatusBadRequest:
+ return nil, err
+ }
+ }
+
+ // Disable if request send failed or timed out getting response
+ var re *smithyhttp.RequestSendError
+ var ce *smithy.CanceledError
+ if errors.As(err, &re) || errors.As(err, &ce) {
+ atomic.StoreUint32(&t.disabled, 1)
+ }
+
+ // Token couldn't be retrieved, but bypass this, and allow the
+ // request to continue.
+ return nil, &bypassTokenRetrievalError{Err: err}
+ }
+
+ tok := &apiToken{
+ token: result.Token,
+ expires: timeNow().Add(result.TokenTTL),
+ }
+ t.token = tok
+
+ return tok, nil
+}
+
+type bypassTokenRetrievalError struct {
+ Err error
+}
+
+func (e *bypassTokenRetrievalError) Error() string {
+ return fmt.Sprintf("bypass token retrieval, %v", e.Err)
+}
+
+func (e *bypassTokenRetrievalError) Unwrap() error { return e.Err }
+
+// enabled returns if the token provider is current enabled or not.
+func (t *tokenProvider) enabled() bool {
+ return atomic.LoadUint32(&t.disabled) == 0
+}
+
+// disable disables the token provider and it will no longer attempt to inject
+// the token, nor request updates.
+func (t *tokenProvider) disable() {
+ atomic.StoreUint32(&t.disabled, 1)
+}
+
+// enable enables the token provide to start refreshing tokens, and adding them
+// to the pending request.
+func (t *tokenProvider) enable() {
+ t.tokenMux.Lock()
+ t.token = nil
+ t.tokenMux.Unlock()
+ atomic.StoreUint32(&t.disabled, 0)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/go.mod b/vendor/github.com/aws/aws-sdk-go-v2/go.mod
new file mode 100644
index 00000000..2e08b765
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/go.mod
@@ -0,0 +1,9 @@
+module github.com/aws/aws-sdk-go-v2
+
+require (
+ github.com/aws/smithy-go v1.8.0
+ github.com/google/go-cmp v0.5.6
+ github.com/jmespath/go-jmespath v0.4.0
+)
+
+go 1.15
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/go.sum b/vendor/github.com/aws/aws-sdk-go-v2/go.sum
new file mode 100644
index 00000000..d5bb6d9e
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/go.sum
@@ -0,0 +1,20 @@
+github.com/aws/smithy-go v1.8.0 h1:AEwwwXQZtUwP5Mz506FeXXrKBe0jA8gVM+1gEcSRooc=
+github.com/aws/smithy-go v1.8.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E=
+github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
+github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ=
+github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg=
+github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo=
+github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8=
+github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U=
+github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
+github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
+github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
+golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
+golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
+gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10=
+gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/endpoints.go
new file mode 100644
index 00000000..745d3e08
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/endpoints.go
@@ -0,0 +1,183 @@
+package endpoints
+
+import (
+ "fmt"
+ "regexp"
+ "strings"
+
+ "github.com/aws/aws-sdk-go-v2/aws"
+)
+
+const (
+ defaultProtocol = "https"
+ defaultSigner = "v4"
+)
+
+var (
+ protocolPriority = []string{"https", "http"}
+ signerPriority = []string{"v4"}
+)
+
+// Options provide configuration needed to direct how endpoints are resolved.
+type Options struct {
+ // Disable usage of HTTPS (TLS / SSL)
+ DisableHTTPS bool
+}
+
+// Partitions is a slice of partition
+type Partitions []Partition
+
+// ResolveEndpoint resolves a service endpoint for the given region and options.
+func (ps Partitions) ResolveEndpoint(region string, opts Options) (aws.Endpoint, error) {
+ if len(ps) == 0 {
+ return aws.Endpoint{}, fmt.Errorf("no partitions found")
+ }
+
+ for i := 0; i < len(ps); i++ {
+ if !ps[i].canResolveEndpoint(region) {
+ continue
+ }
+
+ return ps[i].ResolveEndpoint(region, opts)
+ }
+
+ // fallback to first partition format to use when resolving the endpoint.
+ return ps[0].ResolveEndpoint(region, opts)
+}
+
+// Partition is an AWS partition description for a service and its' region endpoints.
+type Partition struct {
+ ID string
+ RegionRegex *regexp.Regexp
+ PartitionEndpoint string
+ IsRegionalized bool
+ Defaults Endpoint
+ Endpoints Endpoints
+}
+
+func (p Partition) canResolveEndpoint(region string) bool {
+ _, ok := p.Endpoints[region]
+ return ok || p.RegionRegex.MatchString(region)
+}
+
+// ResolveEndpoint resolves and service endpoint for the given region and options.
+func (p Partition) ResolveEndpoint(region string, options Options) (resolved aws.Endpoint, err error) {
+ if len(region) == 0 && len(p.PartitionEndpoint) != 0 {
+ region = p.PartitionEndpoint
+ }
+
+ e, _ := p.endpointForRegion(region)
+
+ return e.resolve(p.ID, region, p.Defaults, options), nil
+}
+
+func (p Partition) endpointForRegion(region string) (Endpoint, bool) {
+ if e, ok := p.Endpoints[region]; ok {
+ return e, true
+ }
+
+ if !p.IsRegionalized {
+ return p.Endpoints[p.PartitionEndpoint], region == p.PartitionEndpoint
+ }
+
+ // Unable to find any matching endpoint, return
+ // blank that will be used for generic endpoint creation.
+ return Endpoint{}, false
+}
+
+// Endpoints is a map of service config regions to endpoints
+type Endpoints map[string]Endpoint
+
+// CredentialScope is the credential scope of a region and service
+type CredentialScope struct {
+ Region string
+ Service string
+}
+
+// Endpoint is a service endpoint description
+type Endpoint struct {
+ // True if the endpoint cannot be resolved for this partition/region/service
+ Unresolveable aws.Ternary
+
+ Hostname string
+ Protocols []string
+
+ CredentialScope CredentialScope
+
+ SignatureVersions []string `json:"signatureVersions"`
+}
+
+func (e Endpoint) resolve(partition, region string, def Endpoint, options Options) aws.Endpoint {
+ var merged Endpoint
+ merged.mergeIn(def)
+ merged.mergeIn(e)
+ e = merged
+
+ var u string
+ if e.Unresolveable != aws.TrueTernary {
+ // Only attempt to resolve the endpoint if it can be resolved.
+ hostname := strings.Replace(e.Hostname, "{region}", region, 1)
+
+ scheme := getEndpointScheme(e.Protocols, options.DisableHTTPS)
+ u = scheme + "://" + hostname
+ }
+
+ signingRegion := e.CredentialScope.Region
+ if len(signingRegion) == 0 {
+ signingRegion = region
+ }
+ signingName := e.CredentialScope.Service
+
+ return aws.Endpoint{
+ URL: u,
+ PartitionID: partition,
+ SigningRegion: signingRegion,
+ SigningName: signingName,
+ SigningMethod: getByPriority(e.SignatureVersions, signerPriority, defaultSigner),
+ }
+}
+
+func (e *Endpoint) mergeIn(other Endpoint) {
+ if other.Unresolveable != aws.UnknownTernary {
+ e.Unresolveable = other.Unresolveable
+ }
+ if len(other.Hostname) > 0 {
+ e.Hostname = other.Hostname
+ }
+ if len(other.Protocols) > 0 {
+ e.Protocols = other.Protocols
+ }
+ if len(other.CredentialScope.Region) > 0 {
+ e.CredentialScope.Region = other.CredentialScope.Region
+ }
+ if len(other.CredentialScope.Service) > 0 {
+ e.CredentialScope.Service = other.CredentialScope.Service
+ }
+ if len(other.SignatureVersions) > 0 {
+ e.SignatureVersions = other.SignatureVersions
+ }
+}
+
+func getEndpointScheme(protocols []string, disableHTTPS bool) string {
+ if disableHTTPS {
+ return "http"
+ }
+
+ return getByPriority(protocols, protocolPriority, defaultProtocol)
+}
+
+func getByPriority(s []string, p []string, def string) string {
+ if len(s) == 0 {
+ return def
+ }
+
+ for i := 0; i < len(p); i++ {
+ for j := 0; j < len(s); j++ {
+ if s[j] == p[i] {
+ return s[j]
+ }
+ }
+ }
+
+ return s[0]
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/CHANGELOG.md
new file mode 100644
index 00000000..517474ce
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/CHANGELOG.md
@@ -0,0 +1,34 @@
+# v1.2.3 (2021-09-17)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.2.2 (2021-08-27)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.2.1 (2021-08-19)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.2.0 (2021-08-04)
+
+* **Feature**: adds error handling for defered close calls
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.1 (2021-07-15)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.0 (2021-07-01)
+
+* **Feature**: Support for `:`, `=`, `[`, `]` being present in expression values.
+
+# v1.0.1 (2021-06-25)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.0.0 (2021-05-20)
+
+* **Release**: The `github.com/aws/aws-sdk-go-v2/internal/ini` package is now a Go Module.
+* **Dependency Update**: Updated to the latest SDK module versions
+
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/LICENSE.txt b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/LICENSE.txt
new file mode 100644
index 00000000..d6456956
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/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/internal/ini/ast.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/ast.go
similarity index 100%
rename from vendor/github.com/aws/aws-sdk-go/internal/ini/ast.go
rename to vendor/github.com/aws/aws-sdk-go-v2/internal/ini/ast.go
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/comma_token.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/comma_token.go
similarity index 100%
rename from vendor/github.com/aws/aws-sdk-go/internal/ini/comma_token.go
rename to vendor/github.com/aws/aws-sdk-go-v2/internal/ini/comma_token.go
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/comment_token.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/comment_token.go
similarity index 100%
rename from vendor/github.com/aws/aws-sdk-go/internal/ini/comment_token.go
rename to vendor/github.com/aws/aws-sdk-go-v2/internal/ini/comment_token.go
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/dependency.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/dependency.go
new file mode 100644
index 00000000..f5ebe52e
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/dependency.go
@@ -0,0 +1,6 @@
+package ini
+
+import (
+ // internal/ini module was carved out of this module
+ _ "github.com/aws/aws-sdk-go-v2"
+)
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/doc.go
similarity index 100%
rename from vendor/github.com/aws/aws-sdk-go/internal/ini/doc.go
rename to vendor/github.com/aws/aws-sdk-go-v2/internal/ini/doc.go
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/empty_token.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/empty_token.go
similarity index 100%
rename from vendor/github.com/aws/aws-sdk-go/internal/ini/empty_token.go
rename to vendor/github.com/aws/aws-sdk-go-v2/internal/ini/empty_token.go
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/errors.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/errors.go
new file mode 100644
index 00000000..0f278d55
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/errors.go
@@ -0,0 +1,22 @@
+package ini
+
+import "fmt"
+
+// UnableToReadFile is an error indicating that a ini file could not be read
+type UnableToReadFile struct {
+ Err error
+}
+
+// Error returns an error message and the underlying error message if present
+func (e *UnableToReadFile) Error() string {
+ base := "unable to read file"
+ if e.Err == nil {
+ return base
+ }
+ return fmt.Sprintf("%s: %v", base, e.Err)
+}
+
+// Unwrap returns the underlying error
+func (e *UnableToReadFile) Unwrap() error {
+ return e.Err
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/expression.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/expression.go
similarity index 100%
rename from vendor/github.com/aws/aws-sdk-go/internal/ini/expression.go
rename to vendor/github.com/aws/aws-sdk-go-v2/internal/ini/expression.go
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/fuzz.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/fuzz.go
similarity index 100%
rename from vendor/github.com/aws/aws-sdk-go/internal/ini/fuzz.go
rename to vendor/github.com/aws/aws-sdk-go-v2/internal/ini/fuzz.go
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/go.mod b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/go.mod
new file mode 100644
index 00000000..574e1c7e
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/go.mod
@@ -0,0 +1,7 @@
+module github.com/aws/aws-sdk-go-v2/internal/ini
+
+go 1.15
+
+require github.com/aws/aws-sdk-go-v2 v1.9.1
+
+replace github.com/aws/aws-sdk-go-v2 => ../../
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/go.sum b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/go.sum
new file mode 100644
index 00000000..dc659b77
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/go.sum
@@ -0,0 +1,11 @@
+github.com/aws/smithy-go v1.8.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E=
+github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo=
+github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U=
+github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
+github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
+golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/go_module_metadata.go
new file mode 100644
index 00000000..ba9e6021
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/go_module_metadata.go
@@ -0,0 +1,6 @@
+// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT.
+
+package ini
+
+// goModuleVersion is the tagged release for this module
+const goModuleVersion = "1.2.3"
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/ini.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/ini.go
similarity index 57%
rename from vendor/github.com/aws/aws-sdk-go/internal/ini/ini.go
rename to vendor/github.com/aws/aws-sdk-go-v2/internal/ini/ini.go
index 3b0ca7af..f7406231 100644
--- a/vendor/github.com/aws/aws-sdk-go/internal/ini/ini.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/ini.go
@@ -1,33 +1,40 @@
package ini
import (
+ "fmt"
"io"
"os"
-
- "github.com/aws/aws-sdk-go/aws/awserr"
)
// OpenFile takes a path to a given file, and will open and parse
// that file.
-func OpenFile(path string) (Sections, error) {
- f, err := os.Open(path)
- if err != nil {
- return Sections{}, awserr.New(ErrCodeUnableToReadFile, "unable to open file", err)
+func OpenFile(path string) (sections Sections, err error) {
+ f, oerr := os.Open(path)
+ if oerr != nil {
+ return Sections{}, &UnableToReadFile{Err: oerr}
}
- defer f.Close()
- return Parse(f)
+ defer func() {
+ closeErr := f.Close()
+ if err == nil {
+ err = closeErr
+ } else if closeErr != nil {
+ err = fmt.Errorf("close error: %v, original error: %w", closeErr, err)
+ }
+ }()
+
+ return Parse(f, path)
}
// Parse will parse the given file using the shared config
// visitor.
-func Parse(f io.Reader) (Sections, error) {
+func Parse(f io.Reader, path string) (Sections, error) {
tree, err := ParseAST(f)
if err != nil {
return Sections{}, err
}
- v := NewDefaultVisitor()
+ v := NewDefaultVisitor(path)
if err = Walk(tree, v); err != nil {
return Sections{}, err
}
@@ -42,7 +49,7 @@ func ParseBytes(b []byte) (Sections, error) {
return Sections{}, err
}
- v := NewDefaultVisitor()
+ v := NewDefaultVisitor("")
if err = Walk(tree, v); err != nil {
return Sections{}, err
}
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/ini_lexer.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/ini_lexer.go
similarity index 91%
rename from vendor/github.com/aws/aws-sdk-go/internal/ini/ini_lexer.go
rename to vendor/github.com/aws/aws-sdk-go-v2/internal/ini/ini_lexer.go
index 582c024a..abf1fb03 100644
--- a/vendor/github.com/aws/aws-sdk-go/internal/ini/ini_lexer.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/ini_lexer.go
@@ -4,14 +4,6 @@ import (
"bytes"
"io"
"io/ioutil"
-
- "github.com/aws/aws-sdk-go/aws/awserr"
-)
-
-const (
- // ErrCodeUnableToReadFile is used when a file is failed to be
- // opened or read from.
- ErrCodeUnableToReadFile = "FailedRead"
)
// TokenType represents the various different tokens types
@@ -59,7 +51,7 @@ type iniLexer struct{}
func (l *iniLexer) Tokenize(r io.Reader) ([]Token, error) {
b, err := ioutil.ReadAll(r)
if err != nil {
- return nil, awserr.New(ErrCodeUnableToReadFile, "unable to read file", err)
+ return nil, &UnableToReadFile{Err: err}
}
return l.tokenize(b)
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/ini_parser.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/ini_parser.go
similarity index 97%
rename from vendor/github.com/aws/aws-sdk-go/internal/ini/ini_parser.go
rename to vendor/github.com/aws/aws-sdk-go-v2/internal/ini/ini_parser.go
index 0ba31949..12fc7d5a 100644
--- a/vendor/github.com/aws/aws-sdk-go/internal/ini/ini_parser.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/ini_parser.go
@@ -66,12 +66,11 @@ var parseTable = map[ASTKind]map[TokenType]ParseState{
TokenNone: MarkCompleteState,
},
ASTKindEqualExpr: {
- TokenLit: ValueState,
- TokenSep: ValueState,
- TokenOp: ValueState,
- TokenWS: SkipTokenState,
- TokenNL: SkipState,
- TokenNone: SkipState,
+ TokenLit: ValueState,
+ TokenSep: ValueState,
+ TokenOp: ValueState,
+ TokenWS: SkipTokenState,
+ TokenNL: SkipState,
},
ASTKindStatement: {
TokenLit: SectionState,
@@ -307,7 +306,7 @@ loop:
default:
return nil, NewParseError(
fmt.Sprintf("invalid state with ASTKind %v and TokenType %v",
- k, tok.Type()))
+ k.Kind, tok.Type()))
}
if len(tokens) > 0 {
@@ -320,7 +319,7 @@ loop:
return nil, NewParseError(fmt.Sprintf("incomplete ini expression"))
}
- // returns a sublist which excludes the start symbol
+ // returns a sublist which exludes the start symbol
return stack.List(), nil
}
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/literal_tokens.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/literal_tokens.go
similarity index 94%
rename from vendor/github.com/aws/aws-sdk-go/internal/ini/literal_tokens.go
rename to vendor/github.com/aws/aws-sdk-go-v2/internal/ini/literal_tokens.go
index 24df543d..91b37998 100644
--- a/vendor/github.com/aws/aws-sdk-go/internal/ini/literal_tokens.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/literal_tokens.go
@@ -193,6 +193,16 @@ func newValue(t ValueType, base int, raw []rune) (Value, error) {
return v, err
}
+// NewStringValue returns a Value type generated using a string input.
+func NewStringValue(str string) (Value, error) {
+ return newValue(StringType, 10, []rune(str))
+}
+
+// NewIntValue returns a Value type generated using an int64 input.
+func NewIntValue(i int64) (Value, error) {
+ return newValue(IntegerType, 10, []rune{rune(i)})
+}
+
// Append will append values and change the type to a string
// type.
func (v *Value) Append(tok Token) {
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/newline_token.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/newline_token.go
similarity index 100%
rename from vendor/github.com/aws/aws-sdk-go/internal/ini/newline_token.go
rename to vendor/github.com/aws/aws-sdk-go-v2/internal/ini/newline_token.go
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/number_helper.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/number_helper.go
similarity index 100%
rename from vendor/github.com/aws/aws-sdk-go/internal/ini/number_helper.go
rename to vendor/github.com/aws/aws-sdk-go-v2/internal/ini/number_helper.go
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/op_tokens.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/op_tokens.go
similarity index 100%
rename from vendor/github.com/aws/aws-sdk-go/internal/ini/op_tokens.go
rename to vendor/github.com/aws/aws-sdk-go-v2/internal/ini/op_tokens.go
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/parse_error.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/parse_error.go
new file mode 100644
index 00000000..30ae0b8f
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/parse_error.go
@@ -0,0 +1,19 @@
+package ini
+
+// ParseError is an error which is returned during any part of
+// the parsing process.
+type ParseError struct {
+ msg string
+}
+
+// NewParseError will return a new ParseError where message
+// is the description of the error.
+func NewParseError(message string) *ParseError {
+ return &ParseError{
+ msg: message,
+ }
+}
+
+func (err *ParseError) Error() string {
+ return err.msg
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/parse_stack.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/parse_stack.go
similarity index 100%
rename from vendor/github.com/aws/aws-sdk-go/internal/ini/parse_stack.go
rename to vendor/github.com/aws/aws-sdk-go-v2/internal/ini/parse_stack.go
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/sep_tokens.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/sep_tokens.go
similarity index 100%
rename from vendor/github.com/aws/aws-sdk-go/internal/ini/sep_tokens.go
rename to vendor/github.com/aws/aws-sdk-go-v2/internal/ini/sep_tokens.go
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/skipper.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/skipper.go
similarity index 91%
rename from vendor/github.com/aws/aws-sdk-go/internal/ini/skipper.go
rename to vendor/github.com/aws/aws-sdk-go-v2/internal/ini/skipper.go
index da7a4049..07e90876 100644
--- a/vendor/github.com/aws/aws-sdk-go/internal/ini/skipper.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/skipper.go
@@ -30,6 +30,7 @@ func (s *skipper) ShouldSkip(tok Token) bool {
s.Continue()
return false
}
+
s.prevTok = tok
return s.shouldSkip
}
@@ -40,6 +41,5 @@ func (s *skipper) Skip() {
func (s *skipper) Continue() {
s.shouldSkip = false
- // empty token is assigned as we return to default state, when should skip is false
s.prevTok = emptyToken
}
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/statement.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/statement.go
similarity index 93%
rename from vendor/github.com/aws/aws-sdk-go/internal/ini/statement.go
rename to vendor/github.com/aws/aws-sdk-go-v2/internal/ini/statement.go
index 18f3fe89..ba0af01b 100644
--- a/vendor/github.com/aws/aws-sdk-go/internal/ini/statement.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/statement.go
@@ -15,7 +15,7 @@ func newExprStatement(ast AST) AST {
return newAST(ASTKindExprStatement, ast)
}
-// CommentStatement represents a comment in the ini definition.
+// CommentStatement represents a comment in the ini defintion.
//
// grammar:
// comment -> #comment' | ;comment'
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/value_util.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/value_util.go
similarity index 100%
rename from vendor/github.com/aws/aws-sdk-go/internal/ini/value_util.go
rename to vendor/github.com/aws/aws-sdk-go-v2/internal/ini/value_util.go
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/visitor.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/visitor.go
similarity index 56%
rename from vendor/github.com/aws/aws-sdk-go/internal/ini/visitor.go
rename to vendor/github.com/aws/aws-sdk-go-v2/internal/ini/visitor.go
index 081cf433..a07a6373 100644
--- a/vendor/github.com/aws/aws-sdk-go/internal/ini/visitor.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/visitor.go
@@ -3,6 +3,7 @@ package ini
import (
"fmt"
"sort"
+ "strings"
)
// Visitor is an interface used by walkers that will
@@ -18,16 +19,25 @@ type Visitor interface {
// the Sections field which can be used to retrieve profile
// configuration.
type DefaultVisitor struct {
- scope string
+
+ // scope is the profile which is being visited
+ scope string
+
+ // path is the file path which the visitor is visiting
+ path string
+
+ // Sections defines list of the profile section
Sections Sections
}
-// NewDefaultVisitor return a DefaultVisitor
-func NewDefaultVisitor() *DefaultVisitor {
+// NewDefaultVisitor returns a DefaultVisitor. It takes in a filepath
+// which points to the file it is visiting.
+func NewDefaultVisitor(filepath string) *DefaultVisitor {
return &DefaultVisitor{
Sections: Sections{
container: map[string]Section{},
},
+ path: filepath,
}
}
@@ -37,6 +47,9 @@ func (v *DefaultVisitor) VisitExpr(expr AST) error {
if t.values == nil {
t.values = values{}
}
+ if t.SourceFile == nil {
+ t.SourceFile = make(map[string]string, 0)
+ }
switch expr.Kind {
case ASTKindExprStatement:
@@ -58,12 +71,26 @@ func (v *DefaultVisitor) VisitExpr(expr AST) error {
}
key := EqualExprKey(opExpr)
- v, err := newValue(rhs.Root.ValueType, rhs.Root.base, rhs.Root.Raw())
+ val, err := newValue(rhs.Root.ValueType, rhs.Root.base, rhs.Root.Raw())
if err != nil {
return err
}
- t.values[key] = v
+ // lower case key to standardize
+ k := strings.ToLower(key)
+
+ // identify if the section already had this key, append log on section
+ if t.Has(k) {
+ t.Logs = append(t.Logs,
+ fmt.Sprintf("For profile: %v, overriding %v value, "+
+ "with a %v value found in a duplicate profile defined later in the same file %v. \n",
+ t.Name, k, k, v.path))
+ }
+
+ // assign the value
+ t.values[k] = val
+ // update the source file path for region
+ t.SourceFile[k] = v.path
default:
return NewParseError(fmt.Sprintf("unsupported expression %v", expr))
}
@@ -85,7 +112,21 @@ func (v *DefaultVisitor) VisitStatement(stmt AST) error {
}
name := string(child.Root.Raw())
- v.Sections.container[name] = Section{}
+
+ // trim start and end space
+ name = strings.TrimSpace(name)
+
+ // if has prefix "profile " + [ws+] + "profile-name",
+ // we standardize by removing the [ws+] between prefix and profile-name.
+ if strings.HasPrefix(name, "profile ") {
+ names := strings.SplitN(name, " ", 2)
+ name = names[0] + " " + strings.TrimLeft(names[1], " ")
+ }
+
+ // attach profile name on section
+ if !v.Sections.HasSection(name) {
+ v.Sections.container[name] = NewSection(name)
+ }
v.scope = name
default:
return NewParseError(fmt.Sprintf("unsupported statement: %s", stmt.Kind))
@@ -100,6 +141,13 @@ type Sections struct {
container map[string]Section
}
+// NewSections returns empty ini Sections
+func NewSections() Sections {
+ return Sections{
+ container: make(map[string]Section, 0),
+ }
+}
+
// GetSection will return section p. If section p does not exist,
// false will be returned in the second parameter.
func (t Sections) GetSection(p string) (Section, bool) {
@@ -107,6 +155,24 @@ func (t Sections) GetSection(p string) (Section, bool) {
return v, ok
}
+// HasSection denotes if Sections consist of a section with
+// provided name.
+func (t Sections) HasSection(p string) bool {
+ _, ok := t.container[p]
+ return ok
+}
+
+// SetSection sets a section value for provided section name.
+func (t Sections) SetSection(p string, v Section) Sections {
+ t.container[p] = v
+ return t
+}
+
+// DeleteSection deletes a section entry/value for provided section name./
+func (t Sections) DeleteSection(p string) {
+ delete(t.container, p)
+}
+
// values represents a map of union values.
type values map[string]Value
@@ -127,8 +193,42 @@ func (t Sections) List() []string {
// Section contains a name and values. This represent
// a sectioned entry in a configuration file.
type Section struct {
- Name string
+ // Name is the Section profile name
+ Name string
+
+ // values are the values within parsed profile
values values
+
+ // Errors is the list of errors
+ Errors []error
+
+ // Logs is the list of logs
+ Logs []string
+
+ // SourceFile is the INI Source file from where this section
+ // was retrieved. They key is the property, value is the
+ // source file the property was retrieved from.
+ SourceFile map[string]string
+}
+
+// NewSection returns an initialize section for the name
+func NewSection(name string) Section {
+ return Section{
+ Name: name,
+ values: values{},
+ SourceFile: map[string]string{},
+ }
+}
+
+// UpdateSourceFile updates source file for a property to provided filepath.
+func (t Section) UpdateSourceFile(property string, filepath string) {
+ t.SourceFile[property] = filepath
+}
+
+// UpdateValue updates value for a provided key with provided value
+func (t Section) UpdateValue(k string, v Value) error {
+ t.values[k] = v
+ return nil
}
// Has will return whether or not an entry exists in a given section
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/walker.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/walker.go
similarity index 100%
rename from vendor/github.com/aws/aws-sdk-go/internal/ini/walker.go
rename to vendor/github.com/aws/aws-sdk-go-v2/internal/ini/walker.go
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/ws_token.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/ws_token.go
similarity index 100%
rename from vendor/github.com/aws/aws-sdk-go/internal/ini/ws_token.go
rename to vendor/github.com/aws/aws-sdk-go-v2/internal/ini/ws_token.go
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/rand/rand.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/rand/rand.go
new file mode 100644
index 00000000..9791ea59
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/rand/rand.go
@@ -0,0 +1,33 @@
+package rand
+
+import (
+ "crypto/rand"
+ "fmt"
+ "io"
+ "math/big"
+)
+
+func init() {
+ Reader = rand.Reader
+}
+
+// Reader provides a random reader that can reset during testing.
+var Reader io.Reader
+
+var floatMaxBigInt = big.NewInt(1 << 53)
+
+// Float64 returns a float64 read from an io.Reader source. The returned float will be between [0.0, 1.0).
+func Float64(reader io.Reader) (float64, error) {
+ bi, err := rand.Int(reader, floatMaxBigInt)
+ if err != nil {
+ return 0, fmt.Errorf("failed to read random value, %v", err)
+ }
+
+ return float64(bi.Int64()) / (1 << 53), nil
+}
+
+// CryptoRandFloat64 returns a random float64 obtained from the crypto rand
+// source.
+func CryptoRandFloat64() (float64, error) {
+ return Float64(rand.Reader)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/sdk/interfaces.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/sdk/interfaces.go
new file mode 100644
index 00000000..2b42cbe6
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/sdk/interfaces.go
@@ -0,0 +1,9 @@
+package sdk
+
+// Invalidator provides access to a type's invalidate method to make it
+// invalidate it cache.
+//
+// e.g aws.SafeCredentialsProvider's Invalidate method.
+type Invalidator interface {
+ Invalidate()
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/sdk/time.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/sdk/time.go
new file mode 100644
index 00000000..8e8dabad
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/sdk/time.go
@@ -0,0 +1,74 @@
+package sdk
+
+import (
+ "context"
+ "time"
+)
+
+func init() {
+ NowTime = time.Now
+ Sleep = time.Sleep
+ SleepWithContext = sleepWithContext
+}
+
+// NowTime is a value for getting the current time. This value can be overridden
+// for testing mocking out current time.
+var NowTime func() time.Time
+
+// Sleep is a value for sleeping for a duration. This value can be overridden
+// for testing and mocking out sleep duration.
+var Sleep func(time.Duration)
+
+// SleepWithContext will wait for the timer duration to expire, or the context
+// is canceled. Which ever happens first. If the context is canceled the Context's
+// error will be returned.
+//
+// This value can be overridden for testing and mocking out sleep duration.
+var SleepWithContext func(context.Context, time.Duration) error
+
+// sleepWithContext will wait for the timer duration to expire, or the context
+// is canceled. Which ever happens first. If the context is canceled the
+// Context's error will be returned.
+func sleepWithContext(ctx context.Context, dur time.Duration) error {
+ t := time.NewTimer(dur)
+ defer t.Stop()
+
+ select {
+ case <-t.C:
+ break
+ case <-ctx.Done():
+ return ctx.Err()
+ }
+
+ return nil
+}
+
+// noOpSleepWithContext does nothing, returns immediately.
+func noOpSleepWithContext(context.Context, time.Duration) error {
+ return nil
+}
+
+func noOpSleep(time.Duration) {}
+
+// TestingUseNopSleep is a utility for disabling sleep across the SDK for
+// testing.
+func TestingUseNopSleep() func() {
+ SleepWithContext = noOpSleepWithContext
+ Sleep = noOpSleep
+
+ return func() {
+ SleepWithContext = sleepWithContext
+ Sleep = time.Sleep
+ }
+}
+
+// TestingUseReferenceTime is a utility for swapping the time function across the SDK to return a specific reference time
+// for testing purposes.
+func TestingUseReferenceTime(referenceTime time.Time) func() {
+ NowTime = func() time.Time {
+ return referenceTime
+ }
+ return func() {
+ NowTime = time.Now
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/sdkio/byte.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/sdkio/byte.go
similarity index 100%
rename from vendor/github.com/aws/aws-sdk-go/internal/sdkio/byte.go
rename to vendor/github.com/aws/aws-sdk-go-v2/internal/sdkio/byte.go
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/strings/strings.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/strings/strings.go
similarity index 100%
rename from vendor/github.com/aws/aws-sdk-go/internal/strings/strings.go
rename to vendor/github.com/aws/aws-sdk-go-v2/internal/strings/strings.go
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/sync/singleflight/LICENSE b/vendor/github.com/aws/aws-sdk-go-v2/internal/sync/singleflight/LICENSE
similarity index 100%
rename from vendor/github.com/aws/aws-sdk-go/internal/sync/singleflight/LICENSE
rename to vendor/github.com/aws/aws-sdk-go-v2/internal/sync/singleflight/LICENSE
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/sync/singleflight/singleflight.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/sync/singleflight/singleflight.go
similarity index 100%
rename from vendor/github.com/aws/aws-sdk-go/internal/sync/singleflight/singleflight.go
rename to vendor/github.com/aws/aws-sdk-go-v2/internal/sync/singleflight/singleflight.go
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/timeconv/duration.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/timeconv/duration.go
new file mode 100644
index 00000000..5d69db5f
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/timeconv/duration.go
@@ -0,0 +1,13 @@
+package timeconv
+
+import "time"
+
+// FloatSecondsDur converts a fractional seconds to duration.
+func FloatSecondsDur(v float64) time.Duration {
+ return time.Duration(v * float64(time.Second))
+}
+
+// DurSecondsFloat converts a duration into fractional seconds.
+func DurSecondsFloat(d time.Duration) float64 {
+ return float64(d) / float64(time.Second)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/local-mod-replace.sh b/vendor/github.com/aws/aws-sdk-go-v2/local-mod-replace.sh
new file mode 100644
index 00000000..8a2aea99
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/local-mod-replace.sh
@@ -0,0 +1,39 @@
+#1/usr/bin/env bash
+
+PROJECT_DIR=""
+SDK_SOURCE_DIR=$(cd `dirname $0` && pwd)
+
+usage() {
+ echo "Usage: $0 [-s SDK_SOURCE_DIR] [-d PROJECT_DIR]" 1>&2
+ exit 1
+}
+
+while getopts "hs:d:" options; do
+ case "${options}" in
+ s)
+ SDK_SOURCE_DIR=${OPTARG}
+ if [ "$SDK_SOURCE_DIR" == "" ]; then
+ echo "path to SDK source directory is required" || exit
+ usage
+ fi
+ ;;
+ d)
+ PROJECT_DIR=${OPTARG}
+ ;;
+ h)
+ usage
+ ;;
+ *)
+ usage
+ ;;
+ esac
+done
+
+if [ "$PROJECT_DIR" != "" ]; then
+ cd $PROJECT_DIR || exit
+fi
+
+go mod graph | awk '{print $1}' | cut -d '@' -f 1 | sort | uniq | grep "github.com/aws/aws-sdk-go-v2" | while read x; do
+ repPath=${x/github.com\/aws\/aws-sdk-go-v2/${SDK_SOURCE_DIR}}
+ echo -replace $x=$repPath
+done | xargs go mod edit
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/modman.toml b/vendor/github.com/aws/aws-sdk-go-v2/modman.toml
new file mode 100644
index 00000000..7b3cc2c3
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/modman.toml
@@ -0,0 +1,55 @@
+[dependencies]
+"github.com/aws/smithy-go" = "v1.8.0"
+"github.com/google/go-cmp" = "v0.5.6"
+"github.com/jmespath/go-jmespath" = "v0.4.0"
+
+[modules."."]
+metadata_package = "aws"
+
+[modules."example/service/s3/listObjects"]
+no_tag = true
+
+[modules."example/service/s3/usingPrivateLink"]
+no_tag = true
+
+[modules."feature/ec2/imds/internal/configtesting"]
+no_tag = true
+
+[modules."internal/configsources/configtesting"]
+no_tag = true
+
+[modules."internal/repotools"]
+no_tag = true
+
+[modules."internal/repotools/changes"]
+no_tag = true
+
+[modules."internal/protocoltest/awsrestjson"]
+no_tag = true
+
+[modules."internal/protocoltest/ec2query"]
+no_tag = true
+
+[modules."internal/protocoltest/jsonrpc"]
+no_tag = true
+
+[modules."internal/protocoltest/jsonrpc10"]
+no_tag = true
+
+[modules."internal/protocoltest/query"]
+no_tag = true
+
+[modules."internal/protocoltest/restxml"]
+no_tag = true
+
+[modules."internal/protocoltest/restxmlwithnamespace"]
+no_tag = true
+
+[modules."service/internal/benchmark"]
+no_tag = true
+
+[modules."service/internal/integrationtest"]
+no_tag = true
+
+[modules."service/s3/internal/configtesting"]
+no_tag = true
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/CHANGELOG.md
new file mode 100644
index 00000000..22b277c1
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/CHANGELOG.md
@@ -0,0 +1,55 @@
+# v1.12.1 (2021-09-17)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.0 (2021-08-27)
+
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.1 (2021-08-19)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.0 (2021-08-12)
+
+* **Feature**: API client updated
+
+# v1.10.1 (2021-08-04)
+
+* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.10.0 (2021-07-15)
+
+* **Feature**: The ErrorCode method on generated service error types has been corrected to match the API model.
+* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.9.0 (2021-07-01)
+
+* **Feature**: API client updated
+
+# v1.8.0 (2021-06-25)
+
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.7.0 (2021-06-11)
+
+* **Feature**: Updated to latest API model.
+
+# v1.6.0 (2021-06-04)
+
+* **Feature**: Updated service client to latest API model.
+
+# v1.5.0 (2021-05-20)
+
+* **Feature**: API client updated
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.4.0 (2021-05-14)
+
+* **Feature**: Constant has been added to modules to enable runtime version inspection for reporting.
+* **Dependency Update**: Updated to the latest SDK module versions
+
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/LICENSE.txt b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/LICENSE.txt
new file mode 100644
index 00000000..d6456956
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/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/autoscaling/api_client.go b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_client.go
new file mode 100644
index 00000000..7dbb4c9d
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_client.go
@@ -0,0 +1,261 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package autoscaling
+
+import (
+ "context"
+ "github.com/aws/aws-sdk-go-v2/aws"
+ 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"
+ 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/http"
+ "time"
+)
+
+const ServiceID = "Auto Scaling"
+const ServiceAPIVersion = "2011-01-01"
+
+// Client provides the API client to make operations call for Auto Scaling.
+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)
+
+ 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 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
+
+ // Retryer guides how HTTP requests should be retried in case of recoverable
+ // failures. When nil the API client will use a default retryer.
+ Retryer aws.Retryer
+
+ // 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)
+ }
+
+ 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)
+}
+
+// NewFromConfig returns a new client from the provided config.
+func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client {
+ opts := Options{
+ Region: cfg.Region,
+ HTTPClient: cfg.HTTPClient,
+ Credentials: cfg.Credentials,
+ APIOptions: cfg.APIOptions,
+ Logger: cfg.Logger,
+ ClientLogMode: cfg.ClientLogMode,
+ }
+ resolveAWSRetryerProvider(cfg, &opts)
+ resolveAWSEndpointResolver(cfg, &opts)
+ return New(opts, optFns...)
+}
+
+func resolveHTTPClient(o *Options) {
+ if o.HTTPClient != nil {
+ return
+ }
+ o.HTTPClient = awshttp.NewBuildableClient()
+}
+
+func resolveRetryer(o *Options) {
+ if o.Retryer != nil {
+ return
+ }
+ o.Retryer = retry.NewStandard()
+}
+
+func resolveAWSRetryerProvider(cfg aws.Config, o *Options) {
+ if cfg.Retryer == nil {
+ return
+ }
+ o.Retryer = cfg.Retryer()
+}
+
+func resolveAWSEndpointResolver(cfg aws.Config, o *Options) {
+ if cfg.EndpointResolver == nil {
+ return
+ }
+ o.EndpointResolver = withEndpointResolver(cfg.EndpointResolver, NewDefaultEndpointResolver())
+}
+
+func addClientUserAgent(stack *middleware.Stack) error {
+ return awsmiddleware.AddSDKAgentKeyValue(awsmiddleware.APIMetadata, "autoscaling", 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)
+}
+
+func addRequestIDRetrieverMiddleware(stack *middleware.Stack) error {
+ return awsmiddleware.AddRequestIDRetrieverMiddleware(stack)
+}
+
+func addResponseErrorMiddleware(stack *middleware.Stack) error {
+ return awshttp.AddResponseErrorMiddleware(stack)
+}
+
+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/autoscaling/api_op_AttachInstances.go b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_AttachInstances.go
new file mode 100644
index 00000000..779b6d34
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_AttachInstances.go
@@ -0,0 +1,129 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package autoscaling
+
+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"
+)
+
+// Attaches one or more EC2 instances to the specified Auto Scaling group. When you
+// attach instances, Amazon EC2 Auto Scaling increases the desired capacity of the
+// group by the number of instances being attached. If the number of instances
+// being attached plus the desired capacity of the group exceeds the maximum size
+// of the group, the operation fails. If there is a Classic Load Balancer attached
+// to your Auto Scaling group, the instances are also registered with the load
+// balancer. If there are target groups attached to your Auto Scaling group, the
+// instances are also registered with the target groups. For more information, see
+// Attach EC2 instances to your Auto Scaling group
+// (https://docs.aws.amazon.com/autoscaling/ec2/userguide/attach-instance-asg.html)
+// in the Amazon EC2 Auto Scaling User Guide.
+func (c *Client) AttachInstances(ctx context.Context, params *AttachInstancesInput, optFns ...func(*Options)) (*AttachInstancesOutput, error) {
+ if params == nil {
+ params = &AttachInstancesInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "AttachInstances", params, optFns, c.addOperationAttachInstancesMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*AttachInstancesOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type AttachInstancesInput struct {
+
+ // The name of the Auto Scaling group.
+ //
+ // This member is required.
+ AutoScalingGroupName *string
+
+ // The IDs of the instances. You can specify up to 20 instances.
+ InstanceIds []string
+
+ noSmithyDocumentSerde
+}
+
+type AttachInstancesOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationAttachInstancesMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsAwsquery_serializeOpAttachInstances{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsquery_deserializeOpAttachInstances{}, 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 = addOpAttachInstancesValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAttachInstances(options.Region), middleware.Before); 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_opAttachInstances(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "autoscaling",
+ OperationName: "AttachInstances",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_AttachLoadBalancerTargetGroups.go b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_AttachLoadBalancerTargetGroups.go
new file mode 100644
index 00000000..afd7fa4a
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_AttachLoadBalancerTargetGroups.go
@@ -0,0 +1,143 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package autoscaling
+
+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"
+)
+
+// Attaches one or more target groups to the specified Auto Scaling group. This
+// operation is used with the following load balancer types:
+//
+// * Application Load
+// Balancer - Operates at the application layer (layer 7) and supports HTTP and
+// HTTPS.
+//
+// * Network Load Balancer - Operates at the transport layer (layer 4) and
+// supports TCP, TLS, and UDP.
+//
+// * Gateway Load Balancer - Operates at the network
+// layer (layer 3).
+//
+// To describe the target groups for an Auto Scaling group, call
+// the DescribeLoadBalancerTargetGroups API. To detach the target group from the
+// Auto Scaling group, call the DetachLoadBalancerTargetGroups API. For more
+// information, see Elastic Load Balancing and Amazon EC2 Auto Scaling
+// (https://docs.aws.amazon.com/autoscaling/ec2/userguide/autoscaling-load-balancer.html)
+// in the Amazon EC2 Auto Scaling User Guide.
+func (c *Client) AttachLoadBalancerTargetGroups(ctx context.Context, params *AttachLoadBalancerTargetGroupsInput, optFns ...func(*Options)) (*AttachLoadBalancerTargetGroupsOutput, error) {
+ if params == nil {
+ params = &AttachLoadBalancerTargetGroupsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "AttachLoadBalancerTargetGroups", params, optFns, c.addOperationAttachLoadBalancerTargetGroupsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*AttachLoadBalancerTargetGroupsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type AttachLoadBalancerTargetGroupsInput struct {
+
+ // The name of the Auto Scaling group.
+ //
+ // This member is required.
+ AutoScalingGroupName *string
+
+ // The Amazon Resource Names (ARN) of the target groups. You can specify up to 10
+ // target groups. To get the ARN of a target group, use the Elastic Load Balancing
+ // DescribeTargetGroups
+ // (https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_DescribeTargetGroups.html)
+ // API operation.
+ //
+ // This member is required.
+ TargetGroupARNs []string
+
+ noSmithyDocumentSerde
+}
+
+type AttachLoadBalancerTargetGroupsOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationAttachLoadBalancerTargetGroupsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsAwsquery_serializeOpAttachLoadBalancerTargetGroups{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsquery_deserializeOpAttachLoadBalancerTargetGroups{}, 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 = addOpAttachLoadBalancerTargetGroupsValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAttachLoadBalancerTargetGroups(options.Region), middleware.Before); 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_opAttachLoadBalancerTargetGroups(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "autoscaling",
+ OperationName: "AttachLoadBalancerTargetGroups",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_AttachLoadBalancers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_AttachLoadBalancers.go
new file mode 100644
index 00000000..10fad052
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_AttachLoadBalancers.go
@@ -0,0 +1,130 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package autoscaling
+
+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"
+)
+
+// To attach an Application Load Balancer, Network Load Balancer, or Gateway Load
+// Balancer, use the AttachLoadBalancerTargetGroups API operation instead. Attaches
+// one or more Classic Load Balancers to the specified Auto Scaling group. Amazon
+// EC2 Auto Scaling registers the running instances with these Classic Load
+// Balancers. To describe the load balancers for an Auto Scaling group, call the
+// DescribeLoadBalancers API. To detach the load balancer from the Auto Scaling
+// group, call the DetachLoadBalancers API. For more information, see Elastic Load
+// Balancing and Amazon EC2 Auto Scaling
+// (https://docs.aws.amazon.com/autoscaling/ec2/userguide/autoscaling-load-balancer.html)
+// in the Amazon EC2 Auto Scaling User Guide.
+func (c *Client) AttachLoadBalancers(ctx context.Context, params *AttachLoadBalancersInput, optFns ...func(*Options)) (*AttachLoadBalancersOutput, error) {
+ if params == nil {
+ params = &AttachLoadBalancersInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "AttachLoadBalancers", params, optFns, c.addOperationAttachLoadBalancersMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*AttachLoadBalancersOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type AttachLoadBalancersInput struct {
+
+ // The name of the Auto Scaling group.
+ //
+ // This member is required.
+ AutoScalingGroupName *string
+
+ // The names of the load balancers. You can specify up to 10 load balancers.
+ //
+ // This member is required.
+ LoadBalancerNames []string
+
+ noSmithyDocumentSerde
+}
+
+type AttachLoadBalancersOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationAttachLoadBalancersMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsAwsquery_serializeOpAttachLoadBalancers{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsquery_deserializeOpAttachLoadBalancers{}, 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 = addOpAttachLoadBalancersValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAttachLoadBalancers(options.Region), middleware.Before); 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_opAttachLoadBalancers(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "autoscaling",
+ OperationName: "AttachLoadBalancers",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_BatchDeleteScheduledAction.go b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_BatchDeleteScheduledAction.go
new file mode 100644
index 00000000..30c06c9a
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_BatchDeleteScheduledAction.go
@@ -0,0 +1,127 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package autoscaling
+
+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/autoscaling/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Deletes one or more scheduled actions for the specified Auto Scaling group.
+func (c *Client) BatchDeleteScheduledAction(ctx context.Context, params *BatchDeleteScheduledActionInput, optFns ...func(*Options)) (*BatchDeleteScheduledActionOutput, error) {
+ if params == nil {
+ params = &BatchDeleteScheduledActionInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "BatchDeleteScheduledAction", params, optFns, c.addOperationBatchDeleteScheduledActionMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*BatchDeleteScheduledActionOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type BatchDeleteScheduledActionInput struct {
+
+ // The name of the Auto Scaling group.
+ //
+ // This member is required.
+ AutoScalingGroupName *string
+
+ // The names of the scheduled actions to delete. The maximum number allowed is 50.
+ //
+ // This member is required.
+ ScheduledActionNames []string
+
+ noSmithyDocumentSerde
+}
+
+type BatchDeleteScheduledActionOutput struct {
+
+ // The names of the scheduled actions that could not be deleted, including an error
+ // message.
+ FailedScheduledActions []types.FailedScheduledUpdateGroupActionRequest
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationBatchDeleteScheduledActionMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsAwsquery_serializeOpBatchDeleteScheduledAction{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsquery_deserializeOpBatchDeleteScheduledAction{}, 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 = addOpBatchDeleteScheduledActionValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opBatchDeleteScheduledAction(options.Region), middleware.Before); 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_opBatchDeleteScheduledAction(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "autoscaling",
+ OperationName: "BatchDeleteScheduledAction",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_BatchPutScheduledUpdateGroupAction.go b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_BatchPutScheduledUpdateGroupAction.go
new file mode 100644
index 00000000..1dc38983
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_BatchPutScheduledUpdateGroupAction.go
@@ -0,0 +1,128 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package autoscaling
+
+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/autoscaling/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Creates or updates one or more scheduled scaling actions for an Auto Scaling
+// group.
+func (c *Client) BatchPutScheduledUpdateGroupAction(ctx context.Context, params *BatchPutScheduledUpdateGroupActionInput, optFns ...func(*Options)) (*BatchPutScheduledUpdateGroupActionOutput, error) {
+ if params == nil {
+ params = &BatchPutScheduledUpdateGroupActionInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "BatchPutScheduledUpdateGroupAction", params, optFns, c.addOperationBatchPutScheduledUpdateGroupActionMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*BatchPutScheduledUpdateGroupActionOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type BatchPutScheduledUpdateGroupActionInput struct {
+
+ // The name of the Auto Scaling group.
+ //
+ // This member is required.
+ AutoScalingGroupName *string
+
+ // One or more scheduled actions. The maximum number allowed is 50.
+ //
+ // This member is required.
+ ScheduledUpdateGroupActions []types.ScheduledUpdateGroupActionRequest
+
+ noSmithyDocumentSerde
+}
+
+type BatchPutScheduledUpdateGroupActionOutput struct {
+
+ // The names of the scheduled actions that could not be created or updated,
+ // including an error message.
+ FailedScheduledUpdateGroupActions []types.FailedScheduledUpdateGroupActionRequest
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationBatchPutScheduledUpdateGroupActionMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsAwsquery_serializeOpBatchPutScheduledUpdateGroupAction{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsquery_deserializeOpBatchPutScheduledUpdateGroupAction{}, 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 = addOpBatchPutScheduledUpdateGroupActionValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opBatchPutScheduledUpdateGroupAction(options.Region), middleware.Before); 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_opBatchPutScheduledUpdateGroupAction(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "autoscaling",
+ OperationName: "BatchPutScheduledUpdateGroupAction",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_CancelInstanceRefresh.go b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_CancelInstanceRefresh.go
new file mode 100644
index 00000000..b98503e7
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_CancelInstanceRefresh.go
@@ -0,0 +1,126 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package autoscaling
+
+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"
+)
+
+// Cancels an instance refresh operation in progress. Cancellation does not roll
+// back any replacements that have already been completed, but it prevents new
+// replacements from being started. This operation is part of the instance refresh
+// feature
+// (https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-instance-refresh.html)
+// in Amazon EC2 Auto Scaling, which helps you update instances in your Auto
+// Scaling group after you make configuration changes.
+func (c *Client) CancelInstanceRefresh(ctx context.Context, params *CancelInstanceRefreshInput, optFns ...func(*Options)) (*CancelInstanceRefreshOutput, error) {
+ if params == nil {
+ params = &CancelInstanceRefreshInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CancelInstanceRefresh", params, optFns, c.addOperationCancelInstanceRefreshMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CancelInstanceRefreshOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type CancelInstanceRefreshInput struct {
+
+ // The name of the Auto Scaling group.
+ //
+ // This member is required.
+ AutoScalingGroupName *string
+
+ noSmithyDocumentSerde
+}
+
+type CancelInstanceRefreshOutput struct {
+
+ // The instance refresh ID.
+ InstanceRefreshId *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCancelInstanceRefreshMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsAwsquery_serializeOpCancelInstanceRefresh{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsquery_deserializeOpCancelInstanceRefresh{}, 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 = addOpCancelInstanceRefreshValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCancelInstanceRefresh(options.Region), middleware.Before); 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_opCancelInstanceRefresh(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "autoscaling",
+ OperationName: "CancelInstanceRefresh",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_CompleteLifecycleAction.go b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_CompleteLifecycleAction.go
new file mode 100644
index 00000000..e487eefe
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_CompleteLifecycleAction.go
@@ -0,0 +1,161 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package autoscaling
+
+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"
+)
+
+// Completes the lifecycle action for the specified token or instance with the
+// specified result. This step is a part of the procedure for adding a lifecycle
+// hook to an Auto Scaling group:
+//
+// * (Optional) Create a Lambda function and a rule
+// that allows CloudWatch Events to invoke your Lambda function when Amazon EC2
+// Auto Scaling launches or terminates instances.
+//
+// * (Optional) Create a
+// notification target and an IAM role. The target can be either an Amazon SQS
+// queue or an Amazon SNS topic. The role allows Amazon EC2 Auto Scaling to publish
+// lifecycle notifications to the target.
+//
+// * Create the lifecycle hook. Specify
+// whether the hook is used when the instances launch or terminate.
+//
+// * If you need
+// more time, record the lifecycle action heartbeat to keep the instance in a
+// pending state.
+//
+// * If you finish before the timeout period ends, complete the
+// lifecycle action.
+//
+// For more information, see Amazon EC2 Auto Scaling lifecycle
+// hooks
+// (https://docs.aws.amazon.com/autoscaling/ec2/userguide/lifecycle-hooks.html) in
+// the Amazon EC2 Auto Scaling User Guide.
+func (c *Client) CompleteLifecycleAction(ctx context.Context, params *CompleteLifecycleActionInput, optFns ...func(*Options)) (*CompleteLifecycleActionOutput, error) {
+ if params == nil {
+ params = &CompleteLifecycleActionInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CompleteLifecycleAction", params, optFns, c.addOperationCompleteLifecycleActionMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CompleteLifecycleActionOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type CompleteLifecycleActionInput struct {
+
+ // The name of the Auto Scaling group.
+ //
+ // This member is required.
+ AutoScalingGroupName *string
+
+ // The action for the group to take. This parameter can be either CONTINUE or
+ // ABANDON.
+ //
+ // This member is required.
+ LifecycleActionResult *string
+
+ // The name of the lifecycle hook.
+ //
+ // This member is required.
+ LifecycleHookName *string
+
+ // The ID of the instance.
+ InstanceId *string
+
+ // A universally unique identifier (UUID) that identifies a specific lifecycle
+ // action associated with an instance. Amazon EC2 Auto Scaling sends this token to
+ // the notification target you specified when you created the lifecycle hook.
+ LifecycleActionToken *string
+
+ noSmithyDocumentSerde
+}
+
+type CompleteLifecycleActionOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCompleteLifecycleActionMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsAwsquery_serializeOpCompleteLifecycleAction{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsquery_deserializeOpCompleteLifecycleAction{}, 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 = addOpCompleteLifecycleActionValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCompleteLifecycleAction(options.Region), middleware.Before); 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_opCompleteLifecycleAction(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "autoscaling",
+ OperationName: "CompleteLifecycleAction",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_CreateAutoScalingGroup.go b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_CreateAutoScalingGroup.go
new file mode 100644
index 00000000..fc78e1da
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_CreateAutoScalingGroup.go
@@ -0,0 +1,323 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package autoscaling
+
+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/autoscaling/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// We strongly recommend using a launch template when calling this operation to
+// ensure full functionality for Amazon EC2 Auto Scaling and Amazon EC2. Creates an
+// Auto Scaling group with the specified name and attributes. If you exceed your
+// maximum limit of Auto Scaling groups, the call fails. To query this limit, call
+// the DescribeAccountLimits API. For information about updating this limit, see
+// Amazon EC2 Auto Scaling service quotas
+// (https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-account-limits.html)
+// in the Amazon EC2 Auto Scaling User Guide. For introductory exercises for
+// creating an Auto Scaling group, see Getting started with Amazon EC2 Auto Scaling
+// (https://docs.aws.amazon.com/autoscaling/ec2/userguide/GettingStartedTutorial.html)
+// and Tutorial: Set up a scaled and load-balanced application
+// (https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-register-lbs-with-asg.html)
+// in the Amazon EC2 Auto Scaling User Guide. For more information, see Auto
+// Scaling groups
+// (https://docs.aws.amazon.com/autoscaling/ec2/userguide/AutoScalingGroup.html) in
+// the Amazon EC2 Auto Scaling User Guide. Every Auto Scaling group has three size
+// parameters (DesiredCapacity, MaxSize, and MinSize). Usually, you set these sizes
+// based on a specific number of instances. However, if you configure a mixed
+// instances policy that defines weights for the instance types, you must specify
+// these sizes with the same units that you use for weighting instances.
+func (c *Client) CreateAutoScalingGroup(ctx context.Context, params *CreateAutoScalingGroupInput, optFns ...func(*Options)) (*CreateAutoScalingGroupOutput, error) {
+ if params == nil {
+ params = &CreateAutoScalingGroupInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CreateAutoScalingGroup", params, optFns, c.addOperationCreateAutoScalingGroupMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CreateAutoScalingGroupOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type CreateAutoScalingGroupInput struct {
+
+ // The name of the Auto Scaling group. This name must be unique per Region per
+ // account.
+ //
+ // This member is required.
+ AutoScalingGroupName *string
+
+ // The maximum size of the group. With a mixed instances policy that uses instance
+ // weighting, Amazon EC2 Auto Scaling may need to go above MaxSize to meet your
+ // capacity requirements. In this event, Amazon EC2 Auto Scaling will never go
+ // above MaxSize by more than your largest instance weight (weights that define how
+ // many units each instance contributes to the desired capacity of the group).
+ //
+ // This member is required.
+ MaxSize *int32
+
+ // The minimum size of the group.
+ //
+ // This member is required.
+ MinSize *int32
+
+ // A list of Availability Zones where instances in the Auto Scaling group can be
+ // created. This parameter is optional if you specify one or more subnets for
+ // VPCZoneIdentifier. Conditional: If your account supports EC2-Classic and VPC,
+ // this parameter is required to launch instances into EC2-Classic.
+ AvailabilityZones []string
+
+ // Indicates whether Capacity Rebalancing is enabled. Otherwise, Capacity
+ // Rebalancing is disabled. When you turn on Capacity Rebalancing, Amazon EC2 Auto
+ // Scaling attempts to launch a Spot Instance whenever Amazon EC2 notifies that a
+ // Spot Instance is at an elevated risk of interruption. After launching a new
+ // instance, it then terminates an old instance. For more information, see Amazon
+ // EC2 Auto Scaling Capacity Rebalancing
+ // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/capacity-rebalance.html)
+ // in the Amazon EC2 Auto Scaling User Guide.
+ CapacityRebalance *bool
+
+ // Reserved.
+ Context *string
+
+ // The amount of time, in seconds, after a scaling activity completes before
+ // another scaling activity can start. The default value is 300. This setting
+ // applies when using simple scaling policies, but not when using other scaling
+ // policies or scheduled scaling. For more information, see Scaling cooldowns for
+ // Amazon EC2 Auto Scaling
+ // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/Cooldown.html) in the
+ // Amazon EC2 Auto Scaling User Guide.
+ DefaultCooldown *int32
+
+ // The desired capacity is the initial capacity of the Auto Scaling group at the
+ // time of its creation and the capacity it attempts to maintain. It can scale
+ // beyond this capacity if you configure auto scaling. This number must be greater
+ // than or equal to the minimum size of the group and less than or equal to the
+ // maximum size of the group. If you do not specify a desired capacity, the default
+ // is the minimum size of the group.
+ DesiredCapacity *int32
+
+ // The amount of time, in seconds, that Amazon EC2 Auto Scaling waits before
+ // checking the health status of an EC2 instance that has come into service. During
+ // this time, any health check failures for the instance are ignored. The default
+ // value is 0. For more information, see Health check grace period
+ // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/healthcheck.html#health-check-grace-period)
+ // in the Amazon EC2 Auto Scaling User Guide. Conditional: Required if you are
+ // adding an ELB health check.
+ HealthCheckGracePeriod *int32
+
+ // The service to use for the health checks. The valid values are EC2 (default) and
+ // ELB. If you configure an Auto Scaling group to use load balancer (ELB) health
+ // checks, it considers the instance unhealthy if it fails either the EC2 status
+ // checks or the load balancer health checks. For more information, see Health
+ // checks for Auto Scaling instances
+ // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/healthcheck.html) in the
+ // Amazon EC2 Auto Scaling User Guide.
+ HealthCheckType *string
+
+ // The ID of the instance used to base the launch configuration on. If specified,
+ // Amazon EC2 Auto Scaling uses the configuration values from the specified
+ // instance to create a new launch configuration. To get the instance ID, use the
+ // Amazon EC2 DescribeInstances
+ // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeInstances.html)
+ // API operation. For more information, see Creating an Auto Scaling group using an
+ // EC2 instance
+ // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/create-asg-from-instance.html)
+ // in the Amazon EC2 Auto Scaling User Guide.
+ InstanceId *string
+
+ // The name of the launch configuration to use to launch instances. Conditional:
+ // You must specify either a launch template (LaunchTemplate or
+ // MixedInstancesPolicy) or a launch configuration (LaunchConfigurationName or
+ // InstanceId).
+ LaunchConfigurationName *string
+
+ // Parameters used to specify the launch template and version to use to launch
+ // instances. Conditional: You must specify either a launch template
+ // (LaunchTemplate or MixedInstancesPolicy) or a launch configuration
+ // (LaunchConfigurationName or InstanceId). The launch template that is specified
+ // must be configured for use with an Auto Scaling group. For more information, see
+ // Creating a launch template for an Auto Scaling group
+ // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/create-launch-template.html)
+ // in the Amazon EC2 Auto Scaling User Guide.
+ LaunchTemplate *types.LaunchTemplateSpecification
+
+ // One or more lifecycle hooks for the group, which specify actions to perform when
+ // Amazon EC2 Auto Scaling launches or terminates instances.
+ LifecycleHookSpecificationList []types.LifecycleHookSpecification
+
+ // A list of Classic Load Balancers associated with this Auto Scaling group. For
+ // Application Load Balancers, Network Load Balancers, and Gateway Load Balancers,
+ // specify the TargetGroupARNs property instead.
+ LoadBalancerNames []string
+
+ // The maximum amount of time, in seconds, that an instance can be in service. The
+ // default is null. If specified, the value must be either 0 or a number equal to
+ // or greater than 86,400 seconds (1 day). For more information, see Replacing Auto
+ // Scaling instances based on maximum instance lifetime
+ // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-max-instance-lifetime.html)
+ // in the Amazon EC2 Auto Scaling User Guide.
+ MaxInstanceLifetime *int32
+
+ // An embedded object that specifies a mixed instances policy. The required
+ // properties must be specified. If optional properties are unspecified, their
+ // default values are used. The policy includes properties that not only define the
+ // distribution of On-Demand Instances and Spot Instances, the maximum price to pay
+ // for Spot Instances, and how the Auto Scaling group allocates instance types to
+ // fulfill On-Demand and Spot capacities, but also the properties that specify the
+ // instance configuration information—the launch template and instance types. The
+ // policy can also include a weight for each instance type and different launch
+ // templates for individual instance types. For more information, see Auto Scaling
+ // groups with multiple instance types and purchase options
+ // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-purchase-options.html)
+ // in the Amazon EC2 Auto Scaling User Guide.
+ MixedInstancesPolicy *types.MixedInstancesPolicy
+
+ // Indicates whether newly launched instances are protected from termination by
+ // Amazon EC2 Auto Scaling when scaling in. For more information about preventing
+ // instances from terminating on scale in, see Instance scale-in protection
+ // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-instance-termination.html#instance-protection)
+ // in the Amazon EC2 Auto Scaling User Guide.
+ NewInstancesProtectedFromScaleIn *bool
+
+ // The name of an existing placement group into which to launch your instances, if
+ // any. A placement group is a logical grouping of instances within a single
+ // Availability Zone. You cannot specify multiple Availability Zones and a
+ // placement group. For more information, see Placement Groups
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/placement-groups.html) in
+ // the Amazon EC2 User Guide for Linux Instances.
+ PlacementGroup *string
+
+ // The Amazon Resource Name (ARN) of the service-linked role that the Auto Scaling
+ // group uses to call other Amazon Web Services on your behalf. By default, Amazon
+ // EC2 Auto Scaling uses a service-linked role named AWSServiceRoleForAutoScaling,
+ // which it creates if it does not exist. For more information, see Service-linked
+ // roles
+ // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/autoscaling-service-linked-role.html)
+ // in the Amazon EC2 Auto Scaling User Guide.
+ ServiceLinkedRoleARN *string
+
+ // One or more tags. You can tag your Auto Scaling group and propagate the tags to
+ // the Amazon EC2 instances it launches. Tags are not propagated to Amazon EBS
+ // volumes. To add tags to Amazon EBS volumes, specify the tags in a launch
+ // template but use caution. If the launch template specifies an instance tag with
+ // a key that is also specified for the Auto Scaling group, Amazon EC2 Auto Scaling
+ // overrides the value of that instance tag with the value specified by the Auto
+ // Scaling group. For more information, see Tagging Auto Scaling groups and
+ // instances
+ // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/autoscaling-tagging.html)
+ // in the Amazon EC2 Auto Scaling User Guide.
+ Tags []types.Tag
+
+ // The Amazon Resource Names (ARN) of the target groups to associate with the Auto
+ // Scaling group. Instances are registered as targets in a target group, and
+ // traffic is routed to the target group. For more information, see Elastic Load
+ // Balancing and Amazon EC2 Auto Scaling
+ // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/autoscaling-load-balancer.html)
+ // in the Amazon EC2 Auto Scaling User Guide.
+ TargetGroupARNs []string
+
+ // A policy or a list of policies that are used to select the instance to
+ // terminate. These policies are executed in the order that you list them. For more
+ // information, see Controlling which Auto Scaling instances terminate during scale
+ // in
+ // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-instance-termination.html)
+ // in the Amazon EC2 Auto Scaling User Guide.
+ TerminationPolicies []string
+
+ // A comma-separated list of subnet IDs for a virtual private cloud (VPC) where
+ // instances in the Auto Scaling group can be created. If you specify
+ // VPCZoneIdentifier with AvailabilityZones, the subnets that you specify for this
+ // parameter must reside in those Availability Zones. Conditional: If your account
+ // supports EC2-Classic and VPC, this parameter is required to launch instances
+ // into a VPC.
+ VPCZoneIdentifier *string
+
+ noSmithyDocumentSerde
+}
+
+type CreateAutoScalingGroupOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCreateAutoScalingGroupMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsAwsquery_serializeOpCreateAutoScalingGroup{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsquery_deserializeOpCreateAutoScalingGroup{}, 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 = addOpCreateAutoScalingGroupValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateAutoScalingGroup(options.Region), middleware.Before); 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_opCreateAutoScalingGroup(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "autoscaling",
+ OperationName: "CreateAutoScalingGroup",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_CreateLaunchConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_CreateLaunchConfiguration.go
new file mode 100644
index 00000000..0c2d6336
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_CreateLaunchConfiguration.go
@@ -0,0 +1,280 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package autoscaling
+
+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/autoscaling/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Creates a launch configuration. If you exceed your maximum limit of launch
+// configurations, the call fails. To query this limit, call the
+// DescribeAccountLimits API. For information about updating this limit, see Amazon
+// EC2 Auto Scaling service quotas
+// (https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-account-limits.html)
+// in the Amazon EC2 Auto Scaling User Guide. For more information, see Launch
+// configurations
+// (https://docs.aws.amazon.com/autoscaling/ec2/userguide/LaunchConfiguration.html)
+// in the Amazon EC2 Auto Scaling User Guide.
+func (c *Client) CreateLaunchConfiguration(ctx context.Context, params *CreateLaunchConfigurationInput, optFns ...func(*Options)) (*CreateLaunchConfigurationOutput, error) {
+ if params == nil {
+ params = &CreateLaunchConfigurationInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CreateLaunchConfiguration", params, optFns, c.addOperationCreateLaunchConfigurationMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CreateLaunchConfigurationOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type CreateLaunchConfigurationInput struct {
+
+ // The name of the launch configuration. This name must be unique per Region per
+ // account.
+ //
+ // This member is required.
+ LaunchConfigurationName *string
+
+ // For Auto Scaling groups that are running in a virtual private cloud (VPC),
+ // specifies whether to assign a public IP address to the group's instances. If you
+ // specify true, each instance in the Auto Scaling group receives a unique public
+ // IP address. For more information, see Launching Auto Scaling instances in a VPC
+ // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-in-vpc.html) in the
+ // Amazon EC2 Auto Scaling User Guide. If you specify this parameter, you must
+ // specify at least one subnet for VPCZoneIdentifier when you create your group. If
+ // the instance is launched into a default subnet, the default is to assign a
+ // public IP address, unless you disabled the option to assign a public IP address
+ // on the subnet. If the instance is launched into a nondefault subnet, the default
+ // is not to assign a public IP address, unless you enabled the option to assign a
+ // public IP address on the subnet.
+ AssociatePublicIpAddress *bool
+
+ // A block device mapping, which specifies the block devices for the instance. You
+ // can specify virtual devices and EBS volumes. For more information, see Block
+ // Device Mapping
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html)
+ // in the Amazon EC2 User Guide for Linux Instances.
+ BlockDeviceMappings []types.BlockDeviceMapping
+
+ // The ID of a ClassicLink-enabled VPC to link your EC2-Classic instances to. For
+ // more information, see ClassicLink
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html) in
+ // the Amazon EC2 User Guide for Linux Instances and Linking EC2-Classic instances
+ // to a VPC
+ // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-in-vpc.html#as-ClassicLink)
+ // in the Amazon EC2 Auto Scaling User Guide. This parameter can only be used if
+ // you are launching EC2-Classic instances.
+ ClassicLinkVPCId *string
+
+ // The IDs of one or more security groups for the specified ClassicLink-enabled
+ // VPC. For more information, see ClassicLink
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html) in
+ // the Amazon EC2 User Guide for Linux Instances and Linking EC2-Classic instances
+ // to a VPC
+ // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-in-vpc.html#as-ClassicLink)
+ // in the Amazon EC2 Auto Scaling User Guide. If you specify the ClassicLinkVPCId
+ // parameter, you must specify this parameter.
+ ClassicLinkVPCSecurityGroups []string
+
+ // Specifies whether the launch configuration is optimized for EBS I/O (true) or
+ // not (false). The optimization provides dedicated throughput to Amazon EBS and an
+ // optimized configuration stack to provide optimal I/O performance. This
+ // optimization is not available with all instance types. Additional fees are
+ // incurred when you enable EBS optimization for an instance type that is not
+ // EBS-optimized by default. For more information, see Amazon EBS-Optimized
+ // Instances
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSOptimized.html) in the
+ // Amazon EC2 User Guide for Linux Instances. The default value is false.
+ EbsOptimized *bool
+
+ // The name or the Amazon Resource Name (ARN) of the instance profile associated
+ // with the IAM role for the instance. The instance profile contains the IAM role.
+ // For more information, see IAM role for applications that run on Amazon EC2
+ // instances
+ // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/us-iam-role.html) in the
+ // Amazon EC2 Auto Scaling User Guide.
+ IamInstanceProfile *string
+
+ // The ID of the Amazon Machine Image (AMI) that was assigned during registration.
+ // For more information, see Finding an AMI
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/finding-an-ami.html) in the
+ // Amazon EC2 User Guide for Linux Instances. If you do not specify InstanceId, you
+ // must specify ImageId.
+ ImageId *string
+
+ // The ID of the instance to use to create the launch configuration. The new launch
+ // configuration derives attributes from the instance, except for the block device
+ // mapping. To create a launch configuration with a block device mapping or
+ // override any other instance attributes, specify them as part of the same
+ // request. For more information, see Creating a launch configuration using an EC2
+ // instance
+ // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/create-lc-with-instanceID.html)
+ // in the Amazon EC2 Auto Scaling User Guide. If you do not specify InstanceId, you
+ // must specify both ImageId and InstanceType.
+ InstanceId *string
+
+ // Controls whether instances in this group are launched with detailed (true) or
+ // basic (false) monitoring. The default value is true (enabled). When detailed
+ // monitoring is enabled, Amazon CloudWatch generates metrics every minute and your
+ // account is charged a fee. When you disable detailed monitoring, CloudWatch
+ // generates metrics every 5 minutes. For more information, see Configure
+ // Monitoring for Auto Scaling Instances
+ // (https://docs.aws.amazon.com/autoscaling/latest/userguide/enable-as-instance-metrics.html)
+ // in the Amazon EC2 Auto Scaling User Guide.
+ InstanceMonitoring *types.InstanceMonitoring
+
+ // Specifies the instance type of the EC2 instance. For information about available
+ // instance types, see Available Instance Types
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#AvailableInstanceTypes)
+ // in the Amazon EC2 User Guide for Linux Instances. If you do not specify
+ // InstanceId, you must specify InstanceType.
+ InstanceType *string
+
+ // The ID of the kernel associated with the AMI.
+ KernelId *string
+
+ // The name of the key pair. For more information, see Amazon EC2 Key Pairs
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html) in the
+ // Amazon EC2 User Guide for Linux Instances.
+ KeyName *string
+
+ // The metadata options for the instances. For more information, see Configuring
+ // the Instance Metadata Options
+ // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/create-launch-config.html#launch-configurations-imds)
+ // in the Amazon EC2 Auto Scaling User Guide.
+ MetadataOptions *types.InstanceMetadataOptions
+
+ // The tenancy of the instance. An instance with dedicated tenancy runs on
+ // isolated, single-tenant hardware and can only be launched into a VPC. To launch
+ // dedicated instances into a shared tenancy VPC (a VPC with the instance placement
+ // tenancy attribute set to default), you must set the value of this parameter to
+ // dedicated. If you specify PlacementTenancy, you must specify at least one subnet
+ // for VPCZoneIdentifier when you create your group. For more information, see
+ // Configuring instance tenancy with Amazon EC2 Auto Scaling
+ // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/auto-scaling-dedicated-instances.html)
+ // in the Amazon EC2 Auto Scaling User Guide. Valid Values: default | dedicated
+ PlacementTenancy *string
+
+ // The ID of the RAM disk to select.
+ RamdiskId *string
+
+ // A list that contains the security groups to assign to the instances in the Auto
+ // Scaling group. [EC2-VPC] Specify the security group IDs. For more information,
+ // see Security Groups for Your VPC
+ // (https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_SecurityGroups.html)
+ // in the Amazon Virtual Private Cloud User Guide. [EC2-Classic] Specify either the
+ // security group names or the security group IDs. For more information, see Amazon
+ // EC2 Security Groups
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-network-security.html)
+ // in the Amazon EC2 User Guide for Linux Instances.
+ SecurityGroups []string
+
+ // The maximum hourly price to be paid for any Spot Instance launched to fulfill
+ // the request. Spot Instances are launched when the price you specify exceeds the
+ // current Spot price. For more information, see Requesting Spot Instances
+ // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-launch-spot-instances.html)
+ // in the Amazon EC2 Auto Scaling User Guide. When you change your maximum price by
+ // creating a new launch configuration, running instances will continue to run as
+ // long as the maximum price for those running instances is higher than the current
+ // Spot price.
+ SpotPrice *string
+
+ // The user data to make available to the launched EC2 instances. For more
+ // information, see Instance metadata and user data
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html)
+ // (Linux) and Instance metadata and user data
+ // (https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ec2-instance-metadata.html)
+ // (Windows). If you are using a command line tool, base64-encoding is performed
+ // for you, and you can load the text from a file. Otherwise, you must provide
+ // base64-encoded text. User data is limited to 16 KB.
+ UserData *string
+
+ noSmithyDocumentSerde
+}
+
+type CreateLaunchConfigurationOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCreateLaunchConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsAwsquery_serializeOpCreateLaunchConfiguration{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsquery_deserializeOpCreateLaunchConfiguration{}, 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 = addOpCreateLaunchConfigurationValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateLaunchConfiguration(options.Region), middleware.Before); 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_opCreateLaunchConfiguration(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "autoscaling",
+ OperationName: "CreateLaunchConfiguration",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_CreateOrUpdateTags.go b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_CreateOrUpdateTags.go
new file mode 100644
index 00000000..42182fa1
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_CreateOrUpdateTags.go
@@ -0,0 +1,122 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package autoscaling
+
+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/autoscaling/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Creates or updates tags for the specified Auto Scaling group. When you specify a
+// tag with a key that already exists, the operation overwrites the previous tag
+// definition, and you do not get an error message. For more information, see
+// Tagging Auto Scaling groups and instances
+// (https://docs.aws.amazon.com/autoscaling/ec2/userguide/autoscaling-tagging.html)
+// in the Amazon EC2 Auto Scaling User Guide.
+func (c *Client) CreateOrUpdateTags(ctx context.Context, params *CreateOrUpdateTagsInput, optFns ...func(*Options)) (*CreateOrUpdateTagsOutput, error) {
+ if params == nil {
+ params = &CreateOrUpdateTagsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CreateOrUpdateTags", params, optFns, c.addOperationCreateOrUpdateTagsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CreateOrUpdateTagsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type CreateOrUpdateTagsInput struct {
+
+ // One or more tags.
+ //
+ // This member is required.
+ Tags []types.Tag
+
+ noSmithyDocumentSerde
+}
+
+type CreateOrUpdateTagsOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCreateOrUpdateTagsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsAwsquery_serializeOpCreateOrUpdateTags{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsquery_deserializeOpCreateOrUpdateTags{}, 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 = addOpCreateOrUpdateTagsValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateOrUpdateTags(options.Region), middleware.Before); 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_opCreateOrUpdateTags(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "autoscaling",
+ OperationName: "CreateOrUpdateTags",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_DeleteAutoScalingGroup.go b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_DeleteAutoScalingGroup.go
new file mode 100644
index 00000000..65780869
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_DeleteAutoScalingGroup.go
@@ -0,0 +1,131 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package autoscaling
+
+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 the specified Auto Scaling group. If the group has instances or scaling
+// activities in progress, you must specify the option to force the deletion in
+// order for it to succeed. If the group has policies, deleting the group deletes
+// the policies, the underlying alarm actions, and any alarm that no longer has an
+// associated action. To remove instances from the Auto Scaling group before
+// deleting it, call the DetachInstances API with the list of instances and the
+// option to decrement the desired capacity. This ensures that Amazon EC2 Auto
+// Scaling does not launch replacement instances. To terminate all instances before
+// deleting the Auto Scaling group, call the UpdateAutoScalingGroup API and set the
+// minimum size and desired capacity of the Auto Scaling group to zero.
+func (c *Client) DeleteAutoScalingGroup(ctx context.Context, params *DeleteAutoScalingGroupInput, optFns ...func(*Options)) (*DeleteAutoScalingGroupOutput, error) {
+ if params == nil {
+ params = &DeleteAutoScalingGroupInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeleteAutoScalingGroup", params, optFns, c.addOperationDeleteAutoScalingGroupMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeleteAutoScalingGroupOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DeleteAutoScalingGroupInput struct {
+
+ // The name of the Auto Scaling group.
+ //
+ // This member is required.
+ AutoScalingGroupName *string
+
+ // Specifies that the group is to be deleted along with all instances associated
+ // with the group, without waiting for all instances to be terminated. This
+ // parameter also deletes any outstanding lifecycle actions associated with the
+ // group.
+ ForceDelete *bool
+
+ noSmithyDocumentSerde
+}
+
+type DeleteAutoScalingGroupOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeleteAutoScalingGroupMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsAwsquery_serializeOpDeleteAutoScalingGroup{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDeleteAutoScalingGroup{}, 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 = addOpDeleteAutoScalingGroupValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteAutoScalingGroup(options.Region), middleware.Before); 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_opDeleteAutoScalingGroup(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "autoscaling",
+ OperationName: "DeleteAutoScalingGroup",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_DeleteLaunchConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_DeleteLaunchConfiguration.go
new file mode 100644
index 00000000..9ef0b4f8
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_DeleteLaunchConfiguration.go
@@ -0,0 +1,118 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package autoscaling
+
+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 the specified launch configuration. The launch configuration must not be
+// attached to an Auto Scaling group. When this call completes, the launch
+// configuration is no longer available for use.
+func (c *Client) DeleteLaunchConfiguration(ctx context.Context, params *DeleteLaunchConfigurationInput, optFns ...func(*Options)) (*DeleteLaunchConfigurationOutput, error) {
+ if params == nil {
+ params = &DeleteLaunchConfigurationInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeleteLaunchConfiguration", params, optFns, c.addOperationDeleteLaunchConfigurationMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeleteLaunchConfigurationOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DeleteLaunchConfigurationInput struct {
+
+ // The name of the launch configuration.
+ //
+ // This member is required.
+ LaunchConfigurationName *string
+
+ noSmithyDocumentSerde
+}
+
+type DeleteLaunchConfigurationOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeleteLaunchConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsAwsquery_serializeOpDeleteLaunchConfiguration{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDeleteLaunchConfiguration{}, 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 = addOpDeleteLaunchConfigurationValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteLaunchConfiguration(options.Region), middleware.Before); 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_opDeleteLaunchConfiguration(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "autoscaling",
+ OperationName: "DeleteLaunchConfiguration",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_DeleteLifecycleHook.go b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_DeleteLifecycleHook.go
new file mode 100644
index 00000000..c0484683
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_DeleteLifecycleHook.go
@@ -0,0 +1,123 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package autoscaling
+
+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 the specified lifecycle hook. If there are any outstanding lifecycle
+// actions, they are completed first (ABANDON for launching instances, CONTINUE for
+// terminating instances).
+func (c *Client) DeleteLifecycleHook(ctx context.Context, params *DeleteLifecycleHookInput, optFns ...func(*Options)) (*DeleteLifecycleHookOutput, error) {
+ if params == nil {
+ params = &DeleteLifecycleHookInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeleteLifecycleHook", params, optFns, c.addOperationDeleteLifecycleHookMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeleteLifecycleHookOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DeleteLifecycleHookInput struct {
+
+ // The name of the Auto Scaling group.
+ //
+ // This member is required.
+ AutoScalingGroupName *string
+
+ // The name of the lifecycle hook.
+ //
+ // This member is required.
+ LifecycleHookName *string
+
+ noSmithyDocumentSerde
+}
+
+type DeleteLifecycleHookOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeleteLifecycleHookMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsAwsquery_serializeOpDeleteLifecycleHook{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDeleteLifecycleHook{}, 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 = addOpDeleteLifecycleHookValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteLifecycleHook(options.Region), middleware.Before); 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_opDeleteLifecycleHook(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "autoscaling",
+ OperationName: "DeleteLifecycleHook",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_DeleteNotificationConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_DeleteNotificationConfiguration.go
new file mode 100644
index 00000000..b4d782db
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_DeleteNotificationConfiguration.go
@@ -0,0 +1,122 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package autoscaling
+
+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 the specified notification.
+func (c *Client) DeleteNotificationConfiguration(ctx context.Context, params *DeleteNotificationConfigurationInput, optFns ...func(*Options)) (*DeleteNotificationConfigurationOutput, error) {
+ if params == nil {
+ params = &DeleteNotificationConfigurationInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeleteNotificationConfiguration", params, optFns, c.addOperationDeleteNotificationConfigurationMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeleteNotificationConfigurationOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DeleteNotificationConfigurationInput struct {
+
+ // The name of the Auto Scaling group.
+ //
+ // This member is required.
+ AutoScalingGroupName *string
+
+ // The Amazon Resource Name (ARN) of the Amazon Simple Notification Service (Amazon
+ // SNS) topic.
+ //
+ // This member is required.
+ TopicARN *string
+
+ noSmithyDocumentSerde
+}
+
+type DeleteNotificationConfigurationOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeleteNotificationConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsAwsquery_serializeOpDeleteNotificationConfiguration{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDeleteNotificationConfiguration{}, 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 = addOpDeleteNotificationConfigurationValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteNotificationConfiguration(options.Region), middleware.Before); 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_opDeleteNotificationConfiguration(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "autoscaling",
+ OperationName: "DeleteNotificationConfiguration",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_DeletePolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_DeletePolicy.go
new file mode 100644
index 00000000..f57f0146
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_DeletePolicy.go
@@ -0,0 +1,124 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package autoscaling
+
+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 the specified scaling policy. Deleting either a step scaling policy or a
+// simple scaling policy deletes the underlying alarm action, but does not delete
+// the alarm, even if it no longer has an associated action. For more information,
+// see Deleting a scaling policy
+// (https://docs.aws.amazon.com/autoscaling/ec2/userguide/deleting-scaling-policy.html)
+// in the Amazon EC2 Auto Scaling User Guide.
+func (c *Client) DeletePolicy(ctx context.Context, params *DeletePolicyInput, optFns ...func(*Options)) (*DeletePolicyOutput, error) {
+ if params == nil {
+ params = &DeletePolicyInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeletePolicy", params, optFns, c.addOperationDeletePolicyMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeletePolicyOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DeletePolicyInput struct {
+
+ // The name or Amazon Resource Name (ARN) of the policy.
+ //
+ // This member is required.
+ PolicyName *string
+
+ // The name of the Auto Scaling group.
+ AutoScalingGroupName *string
+
+ noSmithyDocumentSerde
+}
+
+type DeletePolicyOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeletePolicyMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsAwsquery_serializeOpDeletePolicy{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDeletePolicy{}, 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 = addOpDeletePolicyValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeletePolicy(options.Region), middleware.Before); 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_opDeletePolicy(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "autoscaling",
+ OperationName: "DeletePolicy",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_DeleteScheduledAction.go b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_DeleteScheduledAction.go
new file mode 100644
index 00000000..54a83888
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_DeleteScheduledAction.go
@@ -0,0 +1,121 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package autoscaling
+
+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 the specified scheduled action.
+func (c *Client) DeleteScheduledAction(ctx context.Context, params *DeleteScheduledActionInput, optFns ...func(*Options)) (*DeleteScheduledActionOutput, error) {
+ if params == nil {
+ params = &DeleteScheduledActionInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeleteScheduledAction", params, optFns, c.addOperationDeleteScheduledActionMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeleteScheduledActionOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DeleteScheduledActionInput struct {
+
+ // The name of the Auto Scaling group.
+ //
+ // This member is required.
+ AutoScalingGroupName *string
+
+ // The name of the action to delete.
+ //
+ // This member is required.
+ ScheduledActionName *string
+
+ noSmithyDocumentSerde
+}
+
+type DeleteScheduledActionOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeleteScheduledActionMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsAwsquery_serializeOpDeleteScheduledAction{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDeleteScheduledAction{}, 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 = addOpDeleteScheduledActionValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteScheduledAction(options.Region), middleware.Before); 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_opDeleteScheduledAction(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "autoscaling",
+ OperationName: "DeleteScheduledAction",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_DeleteTags.go b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_DeleteTags.go
new file mode 100644
index 00000000..465ab426
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_DeleteTags.go
@@ -0,0 +1,117 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package autoscaling
+
+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/autoscaling/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Deletes the specified tags.
+func (c *Client) DeleteTags(ctx context.Context, params *DeleteTagsInput, optFns ...func(*Options)) (*DeleteTagsOutput, error) {
+ if params == nil {
+ params = &DeleteTagsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeleteTags", params, optFns, c.addOperationDeleteTagsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeleteTagsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DeleteTagsInput struct {
+
+ // One or more tags.
+ //
+ // This member is required.
+ Tags []types.Tag
+
+ noSmithyDocumentSerde
+}
+
+type DeleteTagsOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeleteTagsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsAwsquery_serializeOpDeleteTags{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDeleteTags{}, 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 = addOpDeleteTagsValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteTags(options.Region), middleware.Before); 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_opDeleteTags(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "autoscaling",
+ OperationName: "DeleteTags",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_DeleteWarmPool.go b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_DeleteWarmPool.go
new file mode 100644
index 00000000..b169624b
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_DeleteWarmPool.go
@@ -0,0 +1,125 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package autoscaling
+
+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 the warm pool for the specified Auto Scaling group. For more
+// information, see Warm pools for Amazon EC2 Auto Scaling
+// (https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-warm-pools.html)
+// in the Amazon EC2 Auto Scaling User Guide.
+func (c *Client) DeleteWarmPool(ctx context.Context, params *DeleteWarmPoolInput, optFns ...func(*Options)) (*DeleteWarmPoolOutput, error) {
+ if params == nil {
+ params = &DeleteWarmPoolInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeleteWarmPool", params, optFns, c.addOperationDeleteWarmPoolMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeleteWarmPoolOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DeleteWarmPoolInput struct {
+
+ // The name of the Auto Scaling group.
+ //
+ // This member is required.
+ AutoScalingGroupName *string
+
+ // Specifies that the warm pool is to be deleted along with all of its associated
+ // instances, without waiting for all instances to be terminated. This parameter
+ // also deletes any outstanding lifecycle actions associated with the warm pool
+ // instances.
+ ForceDelete *bool
+
+ noSmithyDocumentSerde
+}
+
+type DeleteWarmPoolOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeleteWarmPoolMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsAwsquery_serializeOpDeleteWarmPool{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDeleteWarmPool{}, 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 = addOpDeleteWarmPoolValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteWarmPool(options.Region), middleware.Before); 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_opDeleteWarmPool(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "autoscaling",
+ OperationName: "DeleteWarmPool",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_DescribeAccountLimits.go b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_DescribeAccountLimits.go
new file mode 100644
index 00000000..d216f4a5
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_DescribeAccountLimits.go
@@ -0,0 +1,127 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package autoscaling
+
+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"
+)
+
+// Describes the current Amazon EC2 Auto Scaling resource quotas for your account.
+// When you establish an account, the account has initial quotas on the maximum
+// number of Auto Scaling groups and launch configurations that you can create in a
+// given Region. For more information, see Amazon EC2 Auto Scaling service quotas
+// (https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-account-limits.html)
+// in the Amazon EC2 Auto Scaling User Guide.
+func (c *Client) DescribeAccountLimits(ctx context.Context, params *DescribeAccountLimitsInput, optFns ...func(*Options)) (*DescribeAccountLimitsOutput, error) {
+ if params == nil {
+ params = &DescribeAccountLimitsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeAccountLimits", params, optFns, c.addOperationDescribeAccountLimitsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeAccountLimitsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeAccountLimitsInput struct {
+ noSmithyDocumentSerde
+}
+
+type DescribeAccountLimitsOutput struct {
+
+ // The maximum number of groups allowed for your account. The default is 200 groups
+ // per Region.
+ MaxNumberOfAutoScalingGroups *int32
+
+ // The maximum number of launch configurations allowed for your account. The
+ // default is 200 launch configurations per Region.
+ MaxNumberOfLaunchConfigurations *int32
+
+ // The current number of groups for your account.
+ NumberOfAutoScalingGroups *int32
+
+ // The current number of launch configurations for your account.
+ NumberOfLaunchConfigurations *int32
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeAccountLimitsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsAwsquery_serializeOpDescribeAccountLimits{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDescribeAccountLimits{}, 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_opDescribeAccountLimits(options.Region), middleware.Before); 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_opDescribeAccountLimits(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "autoscaling",
+ OperationName: "DescribeAccountLimits",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_DescribeAdjustmentTypes.go b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_DescribeAdjustmentTypes.go
new file mode 100644
index 00000000..d0cfc9ef
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_DescribeAdjustmentTypes.go
@@ -0,0 +1,120 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package autoscaling
+
+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/autoscaling/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes the available adjustment types for step scaling and simple scaling
+// policies. The following adjustment types are supported:
+//
+// * ChangeInCapacity
+//
+// *
+// ExactCapacity
+//
+// * PercentChangeInCapacity
+func (c *Client) DescribeAdjustmentTypes(ctx context.Context, params *DescribeAdjustmentTypesInput, optFns ...func(*Options)) (*DescribeAdjustmentTypesOutput, error) {
+ if params == nil {
+ params = &DescribeAdjustmentTypesInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeAdjustmentTypes", params, optFns, c.addOperationDescribeAdjustmentTypesMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeAdjustmentTypesOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeAdjustmentTypesInput struct {
+ noSmithyDocumentSerde
+}
+
+type DescribeAdjustmentTypesOutput struct {
+
+ // The policy adjustment types.
+ AdjustmentTypes []types.AdjustmentType
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeAdjustmentTypesMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsAwsquery_serializeOpDescribeAdjustmentTypes{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDescribeAdjustmentTypes{}, 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_opDescribeAdjustmentTypes(options.Region), middleware.Before); 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_opDescribeAdjustmentTypes(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "autoscaling",
+ OperationName: "DescribeAdjustmentTypes",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_DescribeAutoScalingGroups.go b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_DescribeAutoScalingGroups.go
new file mode 100644
index 00000000..e31febb6
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_DescribeAutoScalingGroups.go
@@ -0,0 +1,760 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package autoscaling
+
+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/autoscaling/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"
+ "strconv"
+ "time"
+)
+
+// Gets information about the Auto Scaling groups in the account and Region. This
+// operation returns information about instances in Auto Scaling groups. To
+// retrieve information about the instances in a warm pool, you must call the
+// DescribeWarmPool API.
+func (c *Client) DescribeAutoScalingGroups(ctx context.Context, params *DescribeAutoScalingGroupsInput, optFns ...func(*Options)) (*DescribeAutoScalingGroupsOutput, error) {
+ if params == nil {
+ params = &DescribeAutoScalingGroupsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeAutoScalingGroups", params, optFns, c.addOperationDescribeAutoScalingGroupsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeAutoScalingGroupsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeAutoScalingGroupsInput struct {
+
+ // The names of the Auto Scaling groups. By default, you can only specify up to 50
+ // names. You can optionally increase this limit using the MaxRecords parameter. If
+ // you omit this parameter, all Auto Scaling groups are described.
+ AutoScalingGroupNames []string
+
+ // The maximum number of items to return with this call. The default value is 50
+ // and the maximum value is 100.
+ MaxRecords *int32
+
+ // The token for the next set of items to return. (You received this token from a
+ // previous call.)
+ NextToken *string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeAutoScalingGroupsOutput struct {
+
+ // The groups.
+ //
+ // This member is required.
+ AutoScalingGroups []types.AutoScalingGroup
+
+ // A string that indicates that the response contains more items than can be
+ // returned in a single response. To receive additional items, specify this string
+ // for the NextToken value when requesting the next set of items. This value is
+ // null when there are no more items to return.
+ NextToken *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeAutoScalingGroupsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsAwsquery_serializeOpDescribeAutoScalingGroups{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDescribeAutoScalingGroups{}, 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_opDescribeAutoScalingGroups(options.Region), middleware.Before); 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
+}
+
+// DescribeAutoScalingGroupsAPIClient is a client that implements the
+// DescribeAutoScalingGroups operation.
+type DescribeAutoScalingGroupsAPIClient interface {
+ DescribeAutoScalingGroups(context.Context, *DescribeAutoScalingGroupsInput, ...func(*Options)) (*DescribeAutoScalingGroupsOutput, error)
+}
+
+var _ DescribeAutoScalingGroupsAPIClient = (*Client)(nil)
+
+// DescribeAutoScalingGroupsPaginatorOptions is the paginator options for
+// DescribeAutoScalingGroups
+type DescribeAutoScalingGroupsPaginatorOptions struct {
+ // The maximum number of items to return with this call. The default value is 50
+ // and the maximum value is 100.
+ 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
+}
+
+// DescribeAutoScalingGroupsPaginator is a paginator for DescribeAutoScalingGroups
+type DescribeAutoScalingGroupsPaginator struct {
+ options DescribeAutoScalingGroupsPaginatorOptions
+ client DescribeAutoScalingGroupsAPIClient
+ params *DescribeAutoScalingGroupsInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribeAutoScalingGroupsPaginator returns a new
+// DescribeAutoScalingGroupsPaginator
+func NewDescribeAutoScalingGroupsPaginator(client DescribeAutoScalingGroupsAPIClient, params *DescribeAutoScalingGroupsInput, optFns ...func(*DescribeAutoScalingGroupsPaginatorOptions)) *DescribeAutoScalingGroupsPaginator {
+ if params == nil {
+ params = &DescribeAutoScalingGroupsInput{}
+ }
+
+ options := DescribeAutoScalingGroupsPaginatorOptions{}
+ if params.MaxRecords != nil {
+ options.Limit = *params.MaxRecords
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribeAutoScalingGroupsPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribeAutoScalingGroupsPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribeAutoScalingGroups page.
+func (p *DescribeAutoScalingGroupsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeAutoScalingGroupsOutput, 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.MaxRecords = limit
+
+ result, err := p.client.DescribeAutoScalingGroups(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
+}
+
+// GroupExistsWaiterOptions are waiter options for GroupExistsWaiter
+type GroupExistsWaiterOptions 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,
+ // GroupExistsWaiter will use default minimum delay of 5 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, GroupExistsWaiter 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, *DescribeAutoScalingGroupsInput, *DescribeAutoScalingGroupsOutput, error) (bool, error)
+}
+
+// GroupExistsWaiter defines the waiters for GroupExists
+type GroupExistsWaiter struct {
+ client DescribeAutoScalingGroupsAPIClient
+
+ options GroupExistsWaiterOptions
+}
+
+// NewGroupExistsWaiter constructs a GroupExistsWaiter.
+func NewGroupExistsWaiter(client DescribeAutoScalingGroupsAPIClient, optFns ...func(*GroupExistsWaiterOptions)) *GroupExistsWaiter {
+ options := GroupExistsWaiterOptions{}
+ options.MinDelay = 5 * time.Second
+ options.MaxDelay = 120 * time.Second
+ options.Retryable = groupExistsStateRetryable
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+ return &GroupExistsWaiter{
+ client: client,
+ options: options,
+ }
+}
+
+// Wait calls the waiter function for GroupExists waiter. The maxWaitDur is the
+// maximum wait duration the waiter will wait. The maxWaitDur is required and must
+// be greater than zero.
+func (w *GroupExistsWaiter) Wait(ctx context.Context, params *DescribeAutoScalingGroupsInput, maxWaitDur time.Duration, optFns ...func(*GroupExistsWaiterOptions)) error {
+ if maxWaitDur <= 0 {
+ return 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 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.DescribeAutoScalingGroups(ctx, params, func(o *Options) {
+ o.APIOptions = append(o.APIOptions, apiOptions...)
+ })
+
+ retryable, err := options.Retryable(ctx, params, out, err)
+ if err != nil {
+ return err
+ }
+ if !retryable {
+ return 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 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 fmt.Errorf("request cancelled while waiting, %w", err)
+ }
+ }
+ return fmt.Errorf("exceeded max wait time for GroupExists waiter")
+}
+
+func groupExistsStateRetryable(ctx context.Context, input *DescribeAutoScalingGroupsInput, output *DescribeAutoScalingGroupsOutput, err error) (bool, error) {
+
+ if err == nil {
+ pathValue, err := jmespath.Search("length(AutoScalingGroups) > `0`", output)
+ if err != nil {
+ return false, fmt.Errorf("error evaluating waiter state: %w", err)
+ }
+
+ expectedValue := "true"
+ bv, err := strconv.ParseBool(expectedValue)
+ if err != nil {
+ return false, fmt.Errorf("error parsing boolean from string %w", err)
+ }
+ value, ok := pathValue.(bool)
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected bool value got %T", pathValue)
+ }
+
+ if value == bv {
+ return false, nil
+ }
+ }
+
+ if err == nil {
+ pathValue, err := jmespath.Search("length(AutoScalingGroups) > `0`", output)
+ if err != nil {
+ return false, fmt.Errorf("error evaluating waiter state: %w", err)
+ }
+
+ expectedValue := "false"
+ bv, err := strconv.ParseBool(expectedValue)
+ if err != nil {
+ return false, fmt.Errorf("error parsing boolean from string %w", err)
+ }
+ value, ok := pathValue.(bool)
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected bool value got %T", pathValue)
+ }
+
+ if value == bv {
+ return true, nil
+ }
+ }
+
+ return true, nil
+}
+
+// GroupInServiceWaiterOptions are waiter options for GroupInServiceWaiter
+type GroupInServiceWaiterOptions 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,
+ // GroupInServiceWaiter will use default minimum delay of 15 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, GroupInServiceWaiter 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, *DescribeAutoScalingGroupsInput, *DescribeAutoScalingGroupsOutput, error) (bool, error)
+}
+
+// GroupInServiceWaiter defines the waiters for GroupInService
+type GroupInServiceWaiter struct {
+ client DescribeAutoScalingGroupsAPIClient
+
+ options GroupInServiceWaiterOptions
+}
+
+// NewGroupInServiceWaiter constructs a GroupInServiceWaiter.
+func NewGroupInServiceWaiter(client DescribeAutoScalingGroupsAPIClient, optFns ...func(*GroupInServiceWaiterOptions)) *GroupInServiceWaiter {
+ options := GroupInServiceWaiterOptions{}
+ options.MinDelay = 15 * time.Second
+ options.MaxDelay = 120 * time.Second
+ options.Retryable = groupInServiceStateRetryable
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+ return &GroupInServiceWaiter{
+ client: client,
+ options: options,
+ }
+}
+
+// Wait calls the waiter function for GroupInService waiter. The maxWaitDur is the
+// maximum wait duration the waiter will wait. The maxWaitDur is required and must
+// be greater than zero.
+func (w *GroupInServiceWaiter) Wait(ctx context.Context, params *DescribeAutoScalingGroupsInput, maxWaitDur time.Duration, optFns ...func(*GroupInServiceWaiterOptions)) error {
+ if maxWaitDur <= 0 {
+ return 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 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.DescribeAutoScalingGroups(ctx, params, func(o *Options) {
+ o.APIOptions = append(o.APIOptions, apiOptions...)
+ })
+
+ retryable, err := options.Retryable(ctx, params, out, err)
+ if err != nil {
+ return err
+ }
+ if !retryable {
+ return 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 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 fmt.Errorf("request cancelled while waiting, %w", err)
+ }
+ }
+ return fmt.Errorf("exceeded max wait time for GroupInService waiter")
+}
+
+func groupInServiceStateRetryable(ctx context.Context, input *DescribeAutoScalingGroupsInput, output *DescribeAutoScalingGroupsOutput, err error) (bool, error) {
+
+ if err == nil {
+ pathValue, err := jmespath.Search("contains(AutoScalingGroups[].[length(Instances[?LifecycleState=='InService']) >= MinSize][], `false`)", output)
+ if err != nil {
+ return false, fmt.Errorf("error evaluating waiter state: %w", err)
+ }
+
+ expectedValue := "false"
+ bv, err := strconv.ParseBool(expectedValue)
+ if err != nil {
+ return false, fmt.Errorf("error parsing boolean from string %w", err)
+ }
+ value, ok := pathValue.(bool)
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected bool value got %T", pathValue)
+ }
+
+ if value == bv {
+ return false, nil
+ }
+ }
+
+ if err == nil {
+ pathValue, err := jmespath.Search("contains(AutoScalingGroups[].[length(Instances[?LifecycleState=='InService']) >= MinSize][], `false`)", output)
+ if err != nil {
+ return false, fmt.Errorf("error evaluating waiter state: %w", err)
+ }
+
+ expectedValue := "true"
+ bv, err := strconv.ParseBool(expectedValue)
+ if err != nil {
+ return false, fmt.Errorf("error parsing boolean from string %w", err)
+ }
+ value, ok := pathValue.(bool)
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected bool value got %T", pathValue)
+ }
+
+ if value == bv {
+ return true, nil
+ }
+ }
+
+ return true, nil
+}
+
+// GroupNotExistsWaiterOptions are waiter options for GroupNotExistsWaiter
+type GroupNotExistsWaiterOptions 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,
+ // GroupNotExistsWaiter will use default minimum delay of 15 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, GroupNotExistsWaiter 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, *DescribeAutoScalingGroupsInput, *DescribeAutoScalingGroupsOutput, error) (bool, error)
+}
+
+// GroupNotExistsWaiter defines the waiters for GroupNotExists
+type GroupNotExistsWaiter struct {
+ client DescribeAutoScalingGroupsAPIClient
+
+ options GroupNotExistsWaiterOptions
+}
+
+// NewGroupNotExistsWaiter constructs a GroupNotExistsWaiter.
+func NewGroupNotExistsWaiter(client DescribeAutoScalingGroupsAPIClient, optFns ...func(*GroupNotExistsWaiterOptions)) *GroupNotExistsWaiter {
+ options := GroupNotExistsWaiterOptions{}
+ options.MinDelay = 15 * time.Second
+ options.MaxDelay = 120 * time.Second
+ options.Retryable = groupNotExistsStateRetryable
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+ return &GroupNotExistsWaiter{
+ client: client,
+ options: options,
+ }
+}
+
+// Wait calls the waiter function for GroupNotExists waiter. The maxWaitDur is the
+// maximum wait duration the waiter will wait. The maxWaitDur is required and must
+// be greater than zero.
+func (w *GroupNotExistsWaiter) Wait(ctx context.Context, params *DescribeAutoScalingGroupsInput, maxWaitDur time.Duration, optFns ...func(*GroupNotExistsWaiterOptions)) error {
+ if maxWaitDur <= 0 {
+ return 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 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.DescribeAutoScalingGroups(ctx, params, func(o *Options) {
+ o.APIOptions = append(o.APIOptions, apiOptions...)
+ })
+
+ retryable, err := options.Retryable(ctx, params, out, err)
+ if err != nil {
+ return err
+ }
+ if !retryable {
+ return 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 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 fmt.Errorf("request cancelled while waiting, %w", err)
+ }
+ }
+ return fmt.Errorf("exceeded max wait time for GroupNotExists waiter")
+}
+
+func groupNotExistsStateRetryable(ctx context.Context, input *DescribeAutoScalingGroupsInput, output *DescribeAutoScalingGroupsOutput, err error) (bool, error) {
+
+ if err == nil {
+ pathValue, err := jmespath.Search("length(AutoScalingGroups) > `0`", output)
+ if err != nil {
+ return false, fmt.Errorf("error evaluating waiter state: %w", err)
+ }
+
+ expectedValue := "false"
+ bv, err := strconv.ParseBool(expectedValue)
+ if err != nil {
+ return false, fmt.Errorf("error parsing boolean from string %w", err)
+ }
+ value, ok := pathValue.(bool)
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected bool value got %T", pathValue)
+ }
+
+ if value == bv {
+ return false, nil
+ }
+ }
+
+ if err == nil {
+ pathValue, err := jmespath.Search("length(AutoScalingGroups) > `0`", output)
+ if err != nil {
+ return false, fmt.Errorf("error evaluating waiter state: %w", err)
+ }
+
+ expectedValue := "true"
+ bv, err := strconv.ParseBool(expectedValue)
+ if err != nil {
+ return false, fmt.Errorf("error parsing boolean from string %w", err)
+ }
+ value, ok := pathValue.(bool)
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected bool value got %T", pathValue)
+ }
+
+ if value == bv {
+ return true, nil
+ }
+ }
+
+ return true, nil
+}
+
+func newServiceMetadataMiddleware_opDescribeAutoScalingGroups(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "autoscaling",
+ OperationName: "DescribeAutoScalingGroups",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_DescribeAutoScalingInstances.go b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_DescribeAutoScalingInstances.go
new file mode 100644
index 00000000..d3b80a27
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_DescribeAutoScalingInstances.go
@@ -0,0 +1,223 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package autoscaling
+
+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/autoscaling/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Gets information about the Auto Scaling instances in the account and Region.
+func (c *Client) DescribeAutoScalingInstances(ctx context.Context, params *DescribeAutoScalingInstancesInput, optFns ...func(*Options)) (*DescribeAutoScalingInstancesOutput, error) {
+ if params == nil {
+ params = &DescribeAutoScalingInstancesInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeAutoScalingInstances", params, optFns, c.addOperationDescribeAutoScalingInstancesMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeAutoScalingInstancesOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeAutoScalingInstancesInput struct {
+
+ // The IDs of the instances. If you omit this parameter, all Auto Scaling instances
+ // are described. If you specify an ID that does not exist, it is ignored with no
+ // error. Array Members: Maximum number of 50 items.
+ InstanceIds []string
+
+ // The maximum number of items to return with this call. The default value is 50
+ // and the maximum value is 50.
+ MaxRecords *int32
+
+ // The token for the next set of items to return. (You received this token from a
+ // previous call.)
+ NextToken *string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeAutoScalingInstancesOutput struct {
+
+ // The instances.
+ AutoScalingInstances []types.AutoScalingInstanceDetails
+
+ // A string that indicates that the response contains more items than can be
+ // returned in a single response. To receive additional items, specify this string
+ // for the NextToken value when requesting the next set of items. This value is
+ // null when there are no more items to return.
+ NextToken *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeAutoScalingInstancesMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsAwsquery_serializeOpDescribeAutoScalingInstances{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDescribeAutoScalingInstances{}, 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_opDescribeAutoScalingInstances(options.Region), middleware.Before); 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
+}
+
+// DescribeAutoScalingInstancesAPIClient is a client that implements the
+// DescribeAutoScalingInstances operation.
+type DescribeAutoScalingInstancesAPIClient interface {
+ DescribeAutoScalingInstances(context.Context, *DescribeAutoScalingInstancesInput, ...func(*Options)) (*DescribeAutoScalingInstancesOutput, error)
+}
+
+var _ DescribeAutoScalingInstancesAPIClient = (*Client)(nil)
+
+// DescribeAutoScalingInstancesPaginatorOptions is the paginator options for
+// DescribeAutoScalingInstances
+type DescribeAutoScalingInstancesPaginatorOptions struct {
+ // The maximum number of items to return with this call. The default value is 50
+ // and the maximum value is 50.
+ 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
+}
+
+// DescribeAutoScalingInstancesPaginator is a paginator for
+// DescribeAutoScalingInstances
+type DescribeAutoScalingInstancesPaginator struct {
+ options DescribeAutoScalingInstancesPaginatorOptions
+ client DescribeAutoScalingInstancesAPIClient
+ params *DescribeAutoScalingInstancesInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribeAutoScalingInstancesPaginator returns a new
+// DescribeAutoScalingInstancesPaginator
+func NewDescribeAutoScalingInstancesPaginator(client DescribeAutoScalingInstancesAPIClient, params *DescribeAutoScalingInstancesInput, optFns ...func(*DescribeAutoScalingInstancesPaginatorOptions)) *DescribeAutoScalingInstancesPaginator {
+ if params == nil {
+ params = &DescribeAutoScalingInstancesInput{}
+ }
+
+ options := DescribeAutoScalingInstancesPaginatorOptions{}
+ if params.MaxRecords != nil {
+ options.Limit = *params.MaxRecords
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribeAutoScalingInstancesPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribeAutoScalingInstancesPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribeAutoScalingInstances page.
+func (p *DescribeAutoScalingInstancesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeAutoScalingInstancesOutput, 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.MaxRecords = limit
+
+ result, err := p.client.DescribeAutoScalingInstances(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_opDescribeAutoScalingInstances(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "autoscaling",
+ OperationName: "DescribeAutoScalingInstances",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_DescribeAutoScalingNotificationTypes.go b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_DescribeAutoScalingNotificationTypes.go
new file mode 100644
index 00000000..0fda9b4f
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_DescribeAutoScalingNotificationTypes.go
@@ -0,0 +1,111 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package autoscaling
+
+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"
+)
+
+// Describes the notification types that are supported by Amazon EC2 Auto Scaling.
+func (c *Client) DescribeAutoScalingNotificationTypes(ctx context.Context, params *DescribeAutoScalingNotificationTypesInput, optFns ...func(*Options)) (*DescribeAutoScalingNotificationTypesOutput, error) {
+ if params == nil {
+ params = &DescribeAutoScalingNotificationTypesInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeAutoScalingNotificationTypes", params, optFns, c.addOperationDescribeAutoScalingNotificationTypesMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeAutoScalingNotificationTypesOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeAutoScalingNotificationTypesInput struct {
+ noSmithyDocumentSerde
+}
+
+type DescribeAutoScalingNotificationTypesOutput struct {
+
+ // The notification types.
+ AutoScalingNotificationTypes []string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeAutoScalingNotificationTypesMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsAwsquery_serializeOpDescribeAutoScalingNotificationTypes{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDescribeAutoScalingNotificationTypes{}, 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_opDescribeAutoScalingNotificationTypes(options.Region), middleware.Before); 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_opDescribeAutoScalingNotificationTypes(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "autoscaling",
+ OperationName: "DescribeAutoScalingNotificationTypes",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_DescribeInstanceRefreshes.go b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_DescribeInstanceRefreshes.go
new file mode 100644
index 00000000..45c4ddc3
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_DescribeInstanceRefreshes.go
@@ -0,0 +1,166 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package autoscaling
+
+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/autoscaling/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Gets information about the instance refreshes for the specified Auto Scaling
+// group. This operation is part of the instance refresh feature
+// (https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-instance-refresh.html)
+// in Amazon EC2 Auto Scaling, which helps you update instances in your Auto
+// Scaling group after you make configuration changes. To help you determine the
+// status of an instance refresh, this operation returns information about the
+// instance refreshes you previously initiated, including their status, end time,
+// the percentage of the instance refresh that is complete, and the number of
+// instances remaining to update before the instance refresh is complete. The
+// following are the possible statuses:
+//
+// * Pending - The request was created, but
+// the operation has not started.
+//
+// * InProgress - The operation is in progress.
+//
+// *
+// Successful - The operation completed successfully.
+//
+// * Failed - The operation
+// failed to complete. You can troubleshoot using the status reason and the scaling
+// activities.
+//
+// * Cancelling - An ongoing operation is being cancelled.
+// Cancellation does not roll back any replacements that have already been
+// completed, but it prevents new replacements from being started.
+//
+// * Cancelled -
+// The operation is cancelled.
+func (c *Client) DescribeInstanceRefreshes(ctx context.Context, params *DescribeInstanceRefreshesInput, optFns ...func(*Options)) (*DescribeInstanceRefreshesOutput, error) {
+ if params == nil {
+ params = &DescribeInstanceRefreshesInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeInstanceRefreshes", params, optFns, c.addOperationDescribeInstanceRefreshesMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeInstanceRefreshesOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeInstanceRefreshesInput struct {
+
+ // The name of the Auto Scaling group.
+ //
+ // This member is required.
+ AutoScalingGroupName *string
+
+ // One or more instance refresh IDs.
+ InstanceRefreshIds []string
+
+ // The maximum number of items to return with this call. The default value is 50
+ // and the maximum value is 100.
+ MaxRecords *int32
+
+ // The token for the next set of items to return. (You received this token from a
+ // previous call.)
+ NextToken *string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeInstanceRefreshesOutput struct {
+
+ // The instance refreshes for the specified group.
+ InstanceRefreshes []types.InstanceRefresh
+
+ // A string that indicates that the response contains more items than can be
+ // returned in a single response. To receive additional items, specify this string
+ // for the NextToken value when requesting the next set of items. This value is
+ // null when there are no more items to return.
+ NextToken *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeInstanceRefreshesMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsAwsquery_serializeOpDescribeInstanceRefreshes{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDescribeInstanceRefreshes{}, 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 = addOpDescribeInstanceRefreshesValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeInstanceRefreshes(options.Region), middleware.Before); 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_opDescribeInstanceRefreshes(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "autoscaling",
+ OperationName: "DescribeInstanceRefreshes",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_DescribeLaunchConfigurations.go b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_DescribeLaunchConfigurations.go
new file mode 100644
index 00000000..7a050101
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_DescribeLaunchConfigurations.go
@@ -0,0 +1,224 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package autoscaling
+
+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/autoscaling/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Gets information about the launch configurations in the account and Region.
+func (c *Client) DescribeLaunchConfigurations(ctx context.Context, params *DescribeLaunchConfigurationsInput, optFns ...func(*Options)) (*DescribeLaunchConfigurationsOutput, error) {
+ if params == nil {
+ params = &DescribeLaunchConfigurationsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeLaunchConfigurations", params, optFns, c.addOperationDescribeLaunchConfigurationsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeLaunchConfigurationsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeLaunchConfigurationsInput struct {
+
+ // The launch configuration names. If you omit this parameter, all launch
+ // configurations are described. Array Members: Maximum number of 50 items.
+ LaunchConfigurationNames []string
+
+ // The maximum number of items to return with this call. The default value is 50
+ // and the maximum value is 100.
+ MaxRecords *int32
+
+ // The token for the next set of items to return. (You received this token from a
+ // previous call.)
+ NextToken *string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeLaunchConfigurationsOutput struct {
+
+ // The launch configurations.
+ //
+ // This member is required.
+ LaunchConfigurations []types.LaunchConfiguration
+
+ // A string that indicates that the response contains more items than can be
+ // returned in a single response. To receive additional items, specify this string
+ // for the NextToken value when requesting the next set of items. This value is
+ // null when there are no more items to return.
+ NextToken *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeLaunchConfigurationsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsAwsquery_serializeOpDescribeLaunchConfigurations{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDescribeLaunchConfigurations{}, 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_opDescribeLaunchConfigurations(options.Region), middleware.Before); 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
+}
+
+// DescribeLaunchConfigurationsAPIClient is a client that implements the
+// DescribeLaunchConfigurations operation.
+type DescribeLaunchConfigurationsAPIClient interface {
+ DescribeLaunchConfigurations(context.Context, *DescribeLaunchConfigurationsInput, ...func(*Options)) (*DescribeLaunchConfigurationsOutput, error)
+}
+
+var _ DescribeLaunchConfigurationsAPIClient = (*Client)(nil)
+
+// DescribeLaunchConfigurationsPaginatorOptions is the paginator options for
+// DescribeLaunchConfigurations
+type DescribeLaunchConfigurationsPaginatorOptions struct {
+ // The maximum number of items to return with this call. The default value is 50
+ // and the maximum value is 100.
+ 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
+}
+
+// DescribeLaunchConfigurationsPaginator is a paginator for
+// DescribeLaunchConfigurations
+type DescribeLaunchConfigurationsPaginator struct {
+ options DescribeLaunchConfigurationsPaginatorOptions
+ client DescribeLaunchConfigurationsAPIClient
+ params *DescribeLaunchConfigurationsInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribeLaunchConfigurationsPaginator returns a new
+// DescribeLaunchConfigurationsPaginator
+func NewDescribeLaunchConfigurationsPaginator(client DescribeLaunchConfigurationsAPIClient, params *DescribeLaunchConfigurationsInput, optFns ...func(*DescribeLaunchConfigurationsPaginatorOptions)) *DescribeLaunchConfigurationsPaginator {
+ if params == nil {
+ params = &DescribeLaunchConfigurationsInput{}
+ }
+
+ options := DescribeLaunchConfigurationsPaginatorOptions{}
+ if params.MaxRecords != nil {
+ options.Limit = *params.MaxRecords
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribeLaunchConfigurationsPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribeLaunchConfigurationsPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribeLaunchConfigurations page.
+func (p *DescribeLaunchConfigurationsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeLaunchConfigurationsOutput, 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.MaxRecords = limit
+
+ result, err := p.client.DescribeLaunchConfigurations(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_opDescribeLaunchConfigurations(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "autoscaling",
+ OperationName: "DescribeLaunchConfigurations",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_DescribeLifecycleHookTypes.go b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_DescribeLifecycleHookTypes.go
new file mode 100644
index 00000000..efa9d260
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_DescribeLifecycleHookTypes.go
@@ -0,0 +1,117 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package autoscaling
+
+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"
+)
+
+// Describes the available types of lifecycle hooks. The following hook types are
+// supported:
+//
+// * autoscaling:EC2_INSTANCE_LAUNCHING
+//
+// *
+// autoscaling:EC2_INSTANCE_TERMINATING
+func (c *Client) DescribeLifecycleHookTypes(ctx context.Context, params *DescribeLifecycleHookTypesInput, optFns ...func(*Options)) (*DescribeLifecycleHookTypesOutput, error) {
+ if params == nil {
+ params = &DescribeLifecycleHookTypesInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeLifecycleHookTypes", params, optFns, c.addOperationDescribeLifecycleHookTypesMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeLifecycleHookTypesOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeLifecycleHookTypesInput struct {
+ noSmithyDocumentSerde
+}
+
+type DescribeLifecycleHookTypesOutput struct {
+
+ // The lifecycle hook types.
+ LifecycleHookTypes []string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeLifecycleHookTypesMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsAwsquery_serializeOpDescribeLifecycleHookTypes{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDescribeLifecycleHookTypes{}, 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_opDescribeLifecycleHookTypes(options.Region), middleware.Before); 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_opDescribeLifecycleHookTypes(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "autoscaling",
+ OperationName: "DescribeLifecycleHookTypes",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_DescribeLifecycleHooks.go b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_DescribeLifecycleHooks.go
new file mode 100644
index 00000000..48984ba6
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_DescribeLifecycleHooks.go
@@ -0,0 +1,125 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package autoscaling
+
+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/autoscaling/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Gets information about the lifecycle hooks for the specified Auto Scaling group.
+func (c *Client) DescribeLifecycleHooks(ctx context.Context, params *DescribeLifecycleHooksInput, optFns ...func(*Options)) (*DescribeLifecycleHooksOutput, error) {
+ if params == nil {
+ params = &DescribeLifecycleHooksInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeLifecycleHooks", params, optFns, c.addOperationDescribeLifecycleHooksMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeLifecycleHooksOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeLifecycleHooksInput struct {
+
+ // The name of the Auto Scaling group.
+ //
+ // This member is required.
+ AutoScalingGroupName *string
+
+ // The names of one or more lifecycle hooks. If you omit this parameter, all
+ // lifecycle hooks are described.
+ LifecycleHookNames []string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeLifecycleHooksOutput struct {
+
+ // The lifecycle hooks for the specified group.
+ LifecycleHooks []types.LifecycleHook
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeLifecycleHooksMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsAwsquery_serializeOpDescribeLifecycleHooks{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDescribeLifecycleHooks{}, 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 = addOpDescribeLifecycleHooksValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeLifecycleHooks(options.Region), middleware.Before); 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_opDescribeLifecycleHooks(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "autoscaling",
+ OperationName: "DescribeLifecycleHooks",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_DescribeLoadBalancerTargetGroups.go b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_DescribeLoadBalancerTargetGroups.go
new file mode 100644
index 00000000..bc833a5d
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_DescribeLoadBalancerTargetGroups.go
@@ -0,0 +1,155 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package autoscaling
+
+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/autoscaling/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Gets information about the load balancer target groups for the specified Auto
+// Scaling group. To determine the availability of registered instances, use the
+// State element in the response. When you attach a target group to an Auto Scaling
+// group, the initial State value is Adding. The state transitions to Added after
+// all Auto Scaling instances are registered with the target group. If Elastic Load
+// Balancing health checks are enabled for the Auto Scaling group, the state
+// transitions to InService after at least one Auto Scaling instance passes the
+// health check. When the target group is in the InService state, Amazon EC2 Auto
+// Scaling can terminate and replace any instances that are reported as unhealthy.
+// If no registered instances pass the health checks, the target group doesn't
+// enter the InService state. Target groups also have an InService state if you
+// attach them in the CreateAutoScalingGroup API call. If your target group state
+// is InService, but it is not working properly, check the scaling activities by
+// calling DescribeScalingActivities and take any corrective actions necessary. For
+// help with failed health checks, see Troubleshooting Amazon EC2 Auto Scaling:
+// Health checks
+// (https://docs.aws.amazon.com/autoscaling/ec2/userguide/ts-as-healthchecks.html)
+// in the Amazon EC2 Auto Scaling User Guide. For more information, see Elastic
+// Load Balancing and Amazon EC2 Auto Scaling
+// (https://docs.aws.amazon.com/autoscaling/ec2/userguide/autoscaling-load-balancer.html)
+// in the Amazon EC2 Auto Scaling User Guide.
+func (c *Client) DescribeLoadBalancerTargetGroups(ctx context.Context, params *DescribeLoadBalancerTargetGroupsInput, optFns ...func(*Options)) (*DescribeLoadBalancerTargetGroupsOutput, error) {
+ if params == nil {
+ params = &DescribeLoadBalancerTargetGroupsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeLoadBalancerTargetGroups", params, optFns, c.addOperationDescribeLoadBalancerTargetGroupsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeLoadBalancerTargetGroupsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeLoadBalancerTargetGroupsInput struct {
+
+ // The name of the Auto Scaling group.
+ //
+ // This member is required.
+ AutoScalingGroupName *string
+
+ // The maximum number of items to return with this call. The default value is 100
+ // and the maximum value is 100.
+ MaxRecords *int32
+
+ // The token for the next set of items to return. (You received this token from a
+ // previous call.)
+ NextToken *string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeLoadBalancerTargetGroupsOutput struct {
+
+ // Information about the target groups.
+ LoadBalancerTargetGroups []types.LoadBalancerTargetGroupState
+
+ // A string that indicates that the response contains more items than can be
+ // returned in a single response. To receive additional items, specify this string
+ // for the NextToken value when requesting the next set of items. This value is
+ // null when there are no more items to return.
+ NextToken *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeLoadBalancerTargetGroupsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsAwsquery_serializeOpDescribeLoadBalancerTargetGroups{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDescribeLoadBalancerTargetGroups{}, 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 = addOpDescribeLoadBalancerTargetGroupsValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeLoadBalancerTargetGroups(options.Region), middleware.Before); 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_opDescribeLoadBalancerTargetGroups(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "autoscaling",
+ OperationName: "DescribeLoadBalancerTargetGroups",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_DescribeLoadBalancers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_DescribeLoadBalancers.go
new file mode 100644
index 00000000..44018e9d
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_DescribeLoadBalancers.go
@@ -0,0 +1,157 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package autoscaling
+
+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/autoscaling/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Gets information about the load balancers for the specified Auto Scaling group.
+// This operation describes only Classic Load Balancers. If you have Application
+// Load Balancers, Network Load Balancers, or Gateway Load Balancers, use the
+// DescribeLoadBalancerTargetGroups API instead. To determine the availability of
+// registered instances, use the State element in the response. When you attach a
+// load balancer to an Auto Scaling group, the initial State value is Adding. The
+// state transitions to Added after all Auto Scaling instances are registered with
+// the load balancer. If Elastic Load Balancing health checks are enabled for the
+// Auto Scaling group, the state transitions to InService after at least one Auto
+// Scaling instance passes the health check. When the load balancer is in the
+// InService state, Amazon EC2 Auto Scaling can terminate and replace any instances
+// that are reported as unhealthy. If no registered instances pass the health
+// checks, the load balancer doesn't enter the InService state. Load balancers also
+// have an InService state if you attach them in the CreateAutoScalingGroup API
+// call. If your load balancer state is InService, but it is not working properly,
+// check the scaling activities by calling DescribeScalingActivities and take any
+// corrective actions necessary. For help with failed health checks, see
+// Troubleshooting Amazon EC2 Auto Scaling: Health checks
+// (https://docs.aws.amazon.com/autoscaling/ec2/userguide/ts-as-healthchecks.html)
+// in the Amazon EC2 Auto Scaling User Guide. For more information, see Elastic
+// Load Balancing and Amazon EC2 Auto Scaling
+// (https://docs.aws.amazon.com/autoscaling/ec2/userguide/autoscaling-load-balancer.html)
+// in the Amazon EC2 Auto Scaling User Guide.
+func (c *Client) DescribeLoadBalancers(ctx context.Context, params *DescribeLoadBalancersInput, optFns ...func(*Options)) (*DescribeLoadBalancersOutput, error) {
+ if params == nil {
+ params = &DescribeLoadBalancersInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeLoadBalancers", params, optFns, c.addOperationDescribeLoadBalancersMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeLoadBalancersOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeLoadBalancersInput struct {
+
+ // The name of the Auto Scaling group.
+ //
+ // This member is required.
+ AutoScalingGroupName *string
+
+ // The maximum number of items to return with this call. The default value is 100
+ // and the maximum value is 100.
+ MaxRecords *int32
+
+ // The token for the next set of items to return. (You received this token from a
+ // previous call.)
+ NextToken *string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeLoadBalancersOutput struct {
+
+ // The load balancers.
+ LoadBalancers []types.LoadBalancerState
+
+ // A string that indicates that the response contains more items than can be
+ // returned in a single response. To receive additional items, specify this string
+ // for the NextToken value when requesting the next set of items. This value is
+ // null when there are no more items to return.
+ NextToken *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeLoadBalancersMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsAwsquery_serializeOpDescribeLoadBalancers{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDescribeLoadBalancers{}, 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 = addOpDescribeLoadBalancersValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeLoadBalancers(options.Region), middleware.Before); 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_opDescribeLoadBalancers(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "autoscaling",
+ OperationName: "DescribeLoadBalancers",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_DescribeMetricCollectionTypes.go b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_DescribeMetricCollectionTypes.go
new file mode 100644
index 00000000..d6323236
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_DescribeMetricCollectionTypes.go
@@ -0,0 +1,117 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package autoscaling
+
+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/autoscaling/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes the available CloudWatch metrics for Amazon EC2 Auto Scaling. The
+// GroupStandbyInstances metric is not returned by default. You must explicitly
+// request this metric when calling the EnableMetricsCollection API.
+func (c *Client) DescribeMetricCollectionTypes(ctx context.Context, params *DescribeMetricCollectionTypesInput, optFns ...func(*Options)) (*DescribeMetricCollectionTypesOutput, error) {
+ if params == nil {
+ params = &DescribeMetricCollectionTypesInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeMetricCollectionTypes", params, optFns, c.addOperationDescribeMetricCollectionTypesMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeMetricCollectionTypesOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeMetricCollectionTypesInput struct {
+ noSmithyDocumentSerde
+}
+
+type DescribeMetricCollectionTypesOutput struct {
+
+ // The granularities for the metrics.
+ Granularities []types.MetricGranularityType
+
+ // One or more metrics.
+ Metrics []types.MetricCollectionType
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeMetricCollectionTypesMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsAwsquery_serializeOpDescribeMetricCollectionTypes{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDescribeMetricCollectionTypes{}, 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_opDescribeMetricCollectionTypes(options.Region), middleware.Before); 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_opDescribeMetricCollectionTypes(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "autoscaling",
+ OperationName: "DescribeMetricCollectionTypes",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_DescribeNotificationConfigurations.go b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_DescribeNotificationConfigurations.go
new file mode 100644
index 00000000..fa91415d
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_DescribeNotificationConfigurations.go
@@ -0,0 +1,224 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package autoscaling
+
+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/autoscaling/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Gets information about the Amazon SNS notifications that are configured for one
+// or more Auto Scaling groups.
+func (c *Client) DescribeNotificationConfigurations(ctx context.Context, params *DescribeNotificationConfigurationsInput, optFns ...func(*Options)) (*DescribeNotificationConfigurationsOutput, error) {
+ if params == nil {
+ params = &DescribeNotificationConfigurationsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeNotificationConfigurations", params, optFns, c.addOperationDescribeNotificationConfigurationsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeNotificationConfigurationsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeNotificationConfigurationsInput struct {
+
+ // The name of the Auto Scaling group.
+ AutoScalingGroupNames []string
+
+ // The maximum number of items to return with this call. The default value is 50
+ // and the maximum value is 100.
+ MaxRecords *int32
+
+ // The token for the next set of items to return. (You received this token from a
+ // previous call.)
+ NextToken *string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeNotificationConfigurationsOutput struct {
+
+ // The notification configurations.
+ //
+ // This member is required.
+ NotificationConfigurations []types.NotificationConfiguration
+
+ // A string that indicates that the response contains more items than can be
+ // returned in a single response. To receive additional items, specify this string
+ // for the NextToken value when requesting the next set of items. This value is
+ // null when there are no more items to return.
+ NextToken *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeNotificationConfigurationsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsAwsquery_serializeOpDescribeNotificationConfigurations{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDescribeNotificationConfigurations{}, 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_opDescribeNotificationConfigurations(options.Region), middleware.Before); 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
+}
+
+// DescribeNotificationConfigurationsAPIClient is a client that implements the
+// DescribeNotificationConfigurations operation.
+type DescribeNotificationConfigurationsAPIClient interface {
+ DescribeNotificationConfigurations(context.Context, *DescribeNotificationConfigurationsInput, ...func(*Options)) (*DescribeNotificationConfigurationsOutput, error)
+}
+
+var _ DescribeNotificationConfigurationsAPIClient = (*Client)(nil)
+
+// DescribeNotificationConfigurationsPaginatorOptions is the paginator options for
+// DescribeNotificationConfigurations
+type DescribeNotificationConfigurationsPaginatorOptions struct {
+ // The maximum number of items to return with this call. The default value is 50
+ // and the maximum value is 100.
+ 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
+}
+
+// DescribeNotificationConfigurationsPaginator is a paginator for
+// DescribeNotificationConfigurations
+type DescribeNotificationConfigurationsPaginator struct {
+ options DescribeNotificationConfigurationsPaginatorOptions
+ client DescribeNotificationConfigurationsAPIClient
+ params *DescribeNotificationConfigurationsInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribeNotificationConfigurationsPaginator returns a new
+// DescribeNotificationConfigurationsPaginator
+func NewDescribeNotificationConfigurationsPaginator(client DescribeNotificationConfigurationsAPIClient, params *DescribeNotificationConfigurationsInput, optFns ...func(*DescribeNotificationConfigurationsPaginatorOptions)) *DescribeNotificationConfigurationsPaginator {
+ if params == nil {
+ params = &DescribeNotificationConfigurationsInput{}
+ }
+
+ options := DescribeNotificationConfigurationsPaginatorOptions{}
+ if params.MaxRecords != nil {
+ options.Limit = *params.MaxRecords
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribeNotificationConfigurationsPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribeNotificationConfigurationsPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribeNotificationConfigurations page.
+func (p *DescribeNotificationConfigurationsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeNotificationConfigurationsOutput, 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.MaxRecords = limit
+
+ result, err := p.client.DescribeNotificationConfigurations(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_opDescribeNotificationConfigurations(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "autoscaling",
+ OperationName: "DescribeNotificationConfigurations",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_DescribePolicies.go b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_DescribePolicies.go
new file mode 100644
index 00000000..da4ef56e
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_DescribePolicies.go
@@ -0,0 +1,228 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package autoscaling
+
+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/autoscaling/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Gets information about the scaling policies in the account and Region.
+func (c *Client) DescribePolicies(ctx context.Context, params *DescribePoliciesInput, optFns ...func(*Options)) (*DescribePoliciesOutput, error) {
+ if params == nil {
+ params = &DescribePoliciesInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribePolicies", params, optFns, c.addOperationDescribePoliciesMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribePoliciesOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribePoliciesInput struct {
+
+ // The name of the Auto Scaling group.
+ AutoScalingGroupName *string
+
+ // The maximum number of items to be returned with each call. The default value is
+ // 50 and the maximum value is 100.
+ MaxRecords *int32
+
+ // The token for the next set of items to return. (You received this token from a
+ // previous call.)
+ NextToken *string
+
+ // The names of one or more policies. If you omit this parameter, all policies are
+ // described. If a group name is provided, the results are limited to that group.
+ // If you specify an unknown policy name, it is ignored with no error. Array
+ // Members: Maximum number of 50 items.
+ PolicyNames []string
+
+ // One or more policy types. The valid values are SimpleScaling, StepScaling,
+ // TargetTrackingScaling, and PredictiveScaling.
+ PolicyTypes []string
+
+ noSmithyDocumentSerde
+}
+
+type DescribePoliciesOutput struct {
+
+ // A string that indicates that the response contains more items than can be
+ // returned in a single response. To receive additional items, specify this string
+ // for the NextToken value when requesting the next set of items. This value is
+ // null when there are no more items to return.
+ NextToken *string
+
+ // The scaling policies.
+ ScalingPolicies []types.ScalingPolicy
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribePoliciesMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsAwsquery_serializeOpDescribePolicies{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDescribePolicies{}, 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_opDescribePolicies(options.Region), middleware.Before); 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
+}
+
+// DescribePoliciesAPIClient is a client that implements the DescribePolicies
+// operation.
+type DescribePoliciesAPIClient interface {
+ DescribePolicies(context.Context, *DescribePoliciesInput, ...func(*Options)) (*DescribePoliciesOutput, error)
+}
+
+var _ DescribePoliciesAPIClient = (*Client)(nil)
+
+// DescribePoliciesPaginatorOptions is the paginator options for DescribePolicies
+type DescribePoliciesPaginatorOptions struct {
+ // The maximum number of items to be returned with each call. The default value is
+ // 50 and the maximum value is 100.
+ 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
+}
+
+// DescribePoliciesPaginator is a paginator for DescribePolicies
+type DescribePoliciesPaginator struct {
+ options DescribePoliciesPaginatorOptions
+ client DescribePoliciesAPIClient
+ params *DescribePoliciesInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribePoliciesPaginator returns a new DescribePoliciesPaginator
+func NewDescribePoliciesPaginator(client DescribePoliciesAPIClient, params *DescribePoliciesInput, optFns ...func(*DescribePoliciesPaginatorOptions)) *DescribePoliciesPaginator {
+ if params == nil {
+ params = &DescribePoliciesInput{}
+ }
+
+ options := DescribePoliciesPaginatorOptions{}
+ if params.MaxRecords != nil {
+ options.Limit = *params.MaxRecords
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribePoliciesPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribePoliciesPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribePolicies page.
+func (p *DescribePoliciesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribePoliciesOutput, 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.MaxRecords = limit
+
+ result, err := p.client.DescribePolicies(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_opDescribePolicies(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "autoscaling",
+ OperationName: "DescribePolicies",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_DescribeScalingActivities.go b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_DescribeScalingActivities.go
new file mode 100644
index 00000000..199a9dc1
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_DescribeScalingActivities.go
@@ -0,0 +1,243 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package autoscaling
+
+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/autoscaling/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Gets information about the scaling activities in the account and Region. When
+// scaling events occur, you see a record of the scaling activity in the scaling
+// activities. For more information, see Verifying a scaling activity for an Auto
+// Scaling group
+// (https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-verify-scaling-activity.html)
+// in the Amazon EC2 Auto Scaling User Guide. If the scaling event succeeds, the
+// value of the StatusCode element in the response is Successful. If an attempt to
+// launch instances failed, the StatusCode value is Failed or Cancelled and the
+// StatusMessage element in the response indicates the cause of the failure. For
+// help interpreting the StatusMessage, see Troubleshooting Amazon EC2 Auto Scaling
+// (https://docs.aws.amazon.com/autoscaling/ec2/userguide/CHAP_Troubleshooting.html)
+// in the Amazon EC2 Auto Scaling User Guide.
+func (c *Client) DescribeScalingActivities(ctx context.Context, params *DescribeScalingActivitiesInput, optFns ...func(*Options)) (*DescribeScalingActivitiesOutput, error) {
+ if params == nil {
+ params = &DescribeScalingActivitiesInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeScalingActivities", params, optFns, c.addOperationDescribeScalingActivitiesMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeScalingActivitiesOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeScalingActivitiesInput struct {
+
+ // The activity IDs of the desired scaling activities. If you omit this parameter,
+ // all activities for the past six weeks are described. If unknown activities are
+ // requested, they are ignored with no error. If you specify an Auto Scaling group,
+ // the results are limited to that group. Array Members: Maximum number of 50 IDs.
+ ActivityIds []string
+
+ // The name of the Auto Scaling group.
+ AutoScalingGroupName *string
+
+ // Indicates whether to include scaling activity from deleted Auto Scaling groups.
+ IncludeDeletedGroups *bool
+
+ // The maximum number of items to return with this call. The default value is 100
+ // and the maximum value is 100.
+ MaxRecords *int32
+
+ // The token for the next set of items to return. (You received this token from a
+ // previous call.)
+ NextToken *string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeScalingActivitiesOutput struct {
+
+ // The scaling activities. Activities are sorted by start time. Activities still in
+ // progress are described first.
+ //
+ // This member is required.
+ Activities []types.Activity
+
+ // A string that indicates that the response contains more items than can be
+ // returned in a single response. To receive additional items, specify this string
+ // for the NextToken value when requesting the next set of items. This value is
+ // null when there are no more items to return.
+ NextToken *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeScalingActivitiesMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsAwsquery_serializeOpDescribeScalingActivities{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDescribeScalingActivities{}, 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_opDescribeScalingActivities(options.Region), middleware.Before); 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
+}
+
+// DescribeScalingActivitiesAPIClient is a client that implements the
+// DescribeScalingActivities operation.
+type DescribeScalingActivitiesAPIClient interface {
+ DescribeScalingActivities(context.Context, *DescribeScalingActivitiesInput, ...func(*Options)) (*DescribeScalingActivitiesOutput, error)
+}
+
+var _ DescribeScalingActivitiesAPIClient = (*Client)(nil)
+
+// DescribeScalingActivitiesPaginatorOptions is the paginator options for
+// DescribeScalingActivities
+type DescribeScalingActivitiesPaginatorOptions struct {
+ // The maximum number of items to return with this call. The default value is 100
+ // and the maximum value is 100.
+ 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
+}
+
+// DescribeScalingActivitiesPaginator is a paginator for DescribeScalingActivities
+type DescribeScalingActivitiesPaginator struct {
+ options DescribeScalingActivitiesPaginatorOptions
+ client DescribeScalingActivitiesAPIClient
+ params *DescribeScalingActivitiesInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribeScalingActivitiesPaginator returns a new
+// DescribeScalingActivitiesPaginator
+func NewDescribeScalingActivitiesPaginator(client DescribeScalingActivitiesAPIClient, params *DescribeScalingActivitiesInput, optFns ...func(*DescribeScalingActivitiesPaginatorOptions)) *DescribeScalingActivitiesPaginator {
+ if params == nil {
+ params = &DescribeScalingActivitiesInput{}
+ }
+
+ options := DescribeScalingActivitiesPaginatorOptions{}
+ if params.MaxRecords != nil {
+ options.Limit = *params.MaxRecords
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribeScalingActivitiesPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribeScalingActivitiesPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribeScalingActivities page.
+func (p *DescribeScalingActivitiesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeScalingActivitiesOutput, 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.MaxRecords = limit
+
+ result, err := p.client.DescribeScalingActivities(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_opDescribeScalingActivities(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "autoscaling",
+ OperationName: "DescribeScalingActivities",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_DescribeScalingProcessTypes.go b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_DescribeScalingProcessTypes.go
new file mode 100644
index 00000000..10aa2a01
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_DescribeScalingProcessTypes.go
@@ -0,0 +1,113 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package autoscaling
+
+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/autoscaling/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes the scaling process types for use with the ResumeProcesses and
+// SuspendProcesses APIs.
+func (c *Client) DescribeScalingProcessTypes(ctx context.Context, params *DescribeScalingProcessTypesInput, optFns ...func(*Options)) (*DescribeScalingProcessTypesOutput, error) {
+ if params == nil {
+ params = &DescribeScalingProcessTypesInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeScalingProcessTypes", params, optFns, c.addOperationDescribeScalingProcessTypesMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeScalingProcessTypesOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeScalingProcessTypesInput struct {
+ noSmithyDocumentSerde
+}
+
+type DescribeScalingProcessTypesOutput struct {
+
+ // The names of the process types.
+ Processes []types.ProcessType
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeScalingProcessTypesMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsAwsquery_serializeOpDescribeScalingProcessTypes{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDescribeScalingProcessTypes{}, 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_opDescribeScalingProcessTypes(options.Region), middleware.Before); 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_opDescribeScalingProcessTypes(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "autoscaling",
+ OperationName: "DescribeScalingProcessTypes",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_DescribeScheduledActions.go b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_DescribeScheduledActions.go
new file mode 100644
index 00000000..8244cea7
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_DescribeScheduledActions.go
@@ -0,0 +1,236 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package autoscaling
+
+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/autoscaling/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "time"
+)
+
+// Gets information about the scheduled actions that haven't run or that have not
+// reached their end time. To describe the scaling activities for scheduled actions
+// that have already run, call the DescribeScalingActivities API.
+func (c *Client) DescribeScheduledActions(ctx context.Context, params *DescribeScheduledActionsInput, optFns ...func(*Options)) (*DescribeScheduledActionsOutput, error) {
+ if params == nil {
+ params = &DescribeScheduledActionsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeScheduledActions", params, optFns, c.addOperationDescribeScheduledActionsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeScheduledActionsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeScheduledActionsInput struct {
+
+ // The name of the Auto Scaling group.
+ AutoScalingGroupName *string
+
+ // The latest scheduled start time to return. If scheduled action names are
+ // provided, this parameter is ignored.
+ EndTime *time.Time
+
+ // The maximum number of items to return with this call. The default value is 50
+ // and the maximum value is 100.
+ MaxRecords *int32
+
+ // The token for the next set of items to return. (You received this token from a
+ // previous call.)
+ NextToken *string
+
+ // The names of one or more scheduled actions. If you omit this parameter, all
+ // scheduled actions are described. If you specify an unknown scheduled action, it
+ // is ignored with no error. Array Members: Maximum number of 50 actions.
+ ScheduledActionNames []string
+
+ // The earliest scheduled start time to return. If scheduled action names are
+ // provided, this parameter is ignored.
+ StartTime *time.Time
+
+ noSmithyDocumentSerde
+}
+
+type DescribeScheduledActionsOutput struct {
+
+ // A string that indicates that the response contains more items than can be
+ // returned in a single response. To receive additional items, specify this string
+ // for the NextToken value when requesting the next set of items. This value is
+ // null when there are no more items to return.
+ NextToken *string
+
+ // The scheduled actions.
+ ScheduledUpdateGroupActions []types.ScheduledUpdateGroupAction
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeScheduledActionsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsAwsquery_serializeOpDescribeScheduledActions{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDescribeScheduledActions{}, 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_opDescribeScheduledActions(options.Region), middleware.Before); 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
+}
+
+// DescribeScheduledActionsAPIClient is a client that implements the
+// DescribeScheduledActions operation.
+type DescribeScheduledActionsAPIClient interface {
+ DescribeScheduledActions(context.Context, *DescribeScheduledActionsInput, ...func(*Options)) (*DescribeScheduledActionsOutput, error)
+}
+
+var _ DescribeScheduledActionsAPIClient = (*Client)(nil)
+
+// DescribeScheduledActionsPaginatorOptions is the paginator options for
+// DescribeScheduledActions
+type DescribeScheduledActionsPaginatorOptions struct {
+ // The maximum number of items to return with this call. The default value is 50
+ // and the maximum value is 100.
+ 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
+}
+
+// DescribeScheduledActionsPaginator is a paginator for DescribeScheduledActions
+type DescribeScheduledActionsPaginator struct {
+ options DescribeScheduledActionsPaginatorOptions
+ client DescribeScheduledActionsAPIClient
+ params *DescribeScheduledActionsInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribeScheduledActionsPaginator returns a new
+// DescribeScheduledActionsPaginator
+func NewDescribeScheduledActionsPaginator(client DescribeScheduledActionsAPIClient, params *DescribeScheduledActionsInput, optFns ...func(*DescribeScheduledActionsPaginatorOptions)) *DescribeScheduledActionsPaginator {
+ if params == nil {
+ params = &DescribeScheduledActionsInput{}
+ }
+
+ options := DescribeScheduledActionsPaginatorOptions{}
+ if params.MaxRecords != nil {
+ options.Limit = *params.MaxRecords
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribeScheduledActionsPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribeScheduledActionsPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribeScheduledActions page.
+func (p *DescribeScheduledActionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeScheduledActionsOutput, 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.MaxRecords = limit
+
+ result, err := p.client.DescribeScheduledActions(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_opDescribeScheduledActions(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "autoscaling",
+ OperationName: "DescribeScheduledActions",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_DescribeTags.go b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_DescribeTags.go
new file mode 100644
index 00000000..c2d00595
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_DescribeTags.go
@@ -0,0 +1,226 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package autoscaling
+
+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/autoscaling/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes the specified tags. You can use filters to limit the results. For
+// example, you can query for the tags for a specific Auto Scaling group. You can
+// specify multiple values for a filter. A tag must match at least one of the
+// specified values for it to be included in the results. You can also specify
+// multiple filters. The result includes information for a particular tag only if
+// it matches all the filters. If there's no match, no special message is returned.
+// For more information, see Tagging Auto Scaling groups and instances
+// (https://docs.aws.amazon.com/autoscaling/ec2/userguide/autoscaling-tagging.html)
+// in the Amazon EC2 Auto Scaling User Guide.
+func (c *Client) DescribeTags(ctx context.Context, params *DescribeTagsInput, optFns ...func(*Options)) (*DescribeTagsOutput, error) {
+ if params == nil {
+ params = &DescribeTagsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeTags", params, optFns, c.addOperationDescribeTagsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeTagsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeTagsInput struct {
+
+ // One or more filters to scope the tags to return. The maximum number of filters
+ // per filter type (for example, auto-scaling-group) is 1000.
+ Filters []types.Filter
+
+ // The maximum number of items to return with this call. The default value is 50
+ // and the maximum value is 100.
+ MaxRecords *int32
+
+ // The token for the next set of items to return. (You received this token from a
+ // previous call.)
+ NextToken *string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeTagsOutput struct {
+
+ // A string that indicates that the response contains more items than can be
+ // returned in a single response. To receive additional items, specify this string
+ // for the NextToken value when requesting the next set of items. This value is
+ // null when there are no more items to return.
+ NextToken *string
+
+ // One or more tags.
+ Tags []types.TagDescription
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeTagsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsAwsquery_serializeOpDescribeTags{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDescribeTags{}, 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_opDescribeTags(options.Region), middleware.Before); 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
+}
+
+// DescribeTagsAPIClient is a client that implements the DescribeTags operation.
+type DescribeTagsAPIClient interface {
+ DescribeTags(context.Context, *DescribeTagsInput, ...func(*Options)) (*DescribeTagsOutput, error)
+}
+
+var _ DescribeTagsAPIClient = (*Client)(nil)
+
+// DescribeTagsPaginatorOptions is the paginator options for DescribeTags
+type DescribeTagsPaginatorOptions struct {
+ // The maximum number of items to return with this call. The default value is 50
+ // and the maximum value is 100.
+ 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
+}
+
+// DescribeTagsPaginator is a paginator for DescribeTags
+type DescribeTagsPaginator struct {
+ options DescribeTagsPaginatorOptions
+ client DescribeTagsAPIClient
+ params *DescribeTagsInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribeTagsPaginator returns a new DescribeTagsPaginator
+func NewDescribeTagsPaginator(client DescribeTagsAPIClient, params *DescribeTagsInput, optFns ...func(*DescribeTagsPaginatorOptions)) *DescribeTagsPaginator {
+ if params == nil {
+ params = &DescribeTagsInput{}
+ }
+
+ options := DescribeTagsPaginatorOptions{}
+ if params.MaxRecords != nil {
+ options.Limit = *params.MaxRecords
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribeTagsPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribeTagsPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribeTags page.
+func (p *DescribeTagsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeTagsOutput, 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.MaxRecords = limit
+
+ result, err := p.client.DescribeTags(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_opDescribeTags(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "autoscaling",
+ OperationName: "DescribeTags",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_DescribeTerminationPolicyTypes.go b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_DescribeTerminationPolicyTypes.go
new file mode 100644
index 00000000..538832f1
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_DescribeTerminationPolicyTypes.go
@@ -0,0 +1,117 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package autoscaling
+
+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"
+)
+
+// Describes the termination policies supported by Amazon EC2 Auto Scaling. For
+// more information, see Controlling which Auto Scaling instances terminate during
+// scale in
+// (https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-instance-termination.html)
+// in the Amazon EC2 Auto Scaling User Guide.
+func (c *Client) DescribeTerminationPolicyTypes(ctx context.Context, params *DescribeTerminationPolicyTypesInput, optFns ...func(*Options)) (*DescribeTerminationPolicyTypesOutput, error) {
+ if params == nil {
+ params = &DescribeTerminationPolicyTypesInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeTerminationPolicyTypes", params, optFns, c.addOperationDescribeTerminationPolicyTypesMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeTerminationPolicyTypesOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeTerminationPolicyTypesInput struct {
+ noSmithyDocumentSerde
+}
+
+type DescribeTerminationPolicyTypesOutput struct {
+
+ // The termination policies supported by Amazon EC2 Auto Scaling: OldestInstance,
+ // OldestLaunchConfiguration, NewestInstance, ClosestToNextInstanceHour, Default,
+ // OldestLaunchTemplate, and AllocationStrategy.
+ TerminationPolicyTypes []string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeTerminationPolicyTypesMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsAwsquery_serializeOpDescribeTerminationPolicyTypes{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDescribeTerminationPolicyTypes{}, 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_opDescribeTerminationPolicyTypes(options.Region), middleware.Before); 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_opDescribeTerminationPolicyTypes(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "autoscaling",
+ OperationName: "DescribeTerminationPolicyTypes",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_DescribeWarmPool.go b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_DescribeWarmPool.go
new file mode 100644
index 00000000..61ea2173
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_DescribeWarmPool.go
@@ -0,0 +1,139 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package autoscaling
+
+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/autoscaling/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Gets information about a warm pool and its instances. For more information, see
+// Warm pools for Amazon EC2 Auto Scaling
+// (https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-warm-pools.html)
+// in the Amazon EC2 Auto Scaling User Guide.
+func (c *Client) DescribeWarmPool(ctx context.Context, params *DescribeWarmPoolInput, optFns ...func(*Options)) (*DescribeWarmPoolOutput, error) {
+ if params == nil {
+ params = &DescribeWarmPoolInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeWarmPool", params, optFns, c.addOperationDescribeWarmPoolMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeWarmPoolOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeWarmPoolInput struct {
+
+ // The name of the Auto Scaling group.
+ //
+ // This member is required.
+ AutoScalingGroupName *string
+
+ // The maximum number of instances to return with this call. The maximum value is
+ // 50.
+ MaxRecords *int32
+
+ // The token for the next set of instances to return. (You received this token from
+ // a previous call.)
+ NextToken *string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeWarmPoolOutput struct {
+
+ // The instances that are currently in the warm pool.
+ Instances []types.Instance
+
+ // The token for the next set of items to return. (You received this token from a
+ // previous call.)
+ NextToken *string
+
+ // The warm pool configuration details.
+ WarmPoolConfiguration *types.WarmPoolConfiguration
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeWarmPoolMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsAwsquery_serializeOpDescribeWarmPool{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDescribeWarmPool{}, 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 = addOpDescribeWarmPoolValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeWarmPool(options.Region), middleware.Before); 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_opDescribeWarmPool(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "autoscaling",
+ OperationName: "DescribeWarmPool",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_DetachInstances.go b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_DetachInstances.go
new file mode 100644
index 00000000..a4959b1f
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_DetachInstances.go
@@ -0,0 +1,140 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package autoscaling
+
+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/autoscaling/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Removes one or more instances from the specified Auto Scaling group. After the
+// instances are detached, you can manage them independent of the Auto Scaling
+// group. If you do not specify the option to decrement the desired capacity,
+// Amazon EC2 Auto Scaling launches instances to replace the ones that are
+// detached. If there is a Classic Load Balancer attached to the Auto Scaling
+// group, the instances are deregistered from the load balancer. If there are
+// target groups attached to the Auto Scaling group, the instances are deregistered
+// from the target groups. For more information, see Detach EC2 instances from your
+// Auto Scaling group
+// (https://docs.aws.amazon.com/autoscaling/ec2/userguide/detach-instance-asg.html)
+// in the Amazon EC2 Auto Scaling User Guide.
+func (c *Client) DetachInstances(ctx context.Context, params *DetachInstancesInput, optFns ...func(*Options)) (*DetachInstancesOutput, error) {
+ if params == nil {
+ params = &DetachInstancesInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DetachInstances", params, optFns, c.addOperationDetachInstancesMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DetachInstancesOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DetachInstancesInput struct {
+
+ // The name of the Auto Scaling group.
+ //
+ // This member is required.
+ AutoScalingGroupName *string
+
+ // Indicates whether the Auto Scaling group decrements the desired capacity value
+ // by the number of instances detached.
+ //
+ // This member is required.
+ ShouldDecrementDesiredCapacity *bool
+
+ // The IDs of the instances. You can specify up to 20 instances.
+ InstanceIds []string
+
+ noSmithyDocumentSerde
+}
+
+type DetachInstancesOutput struct {
+
+ // The activities related to detaching the instances from the Auto Scaling group.
+ Activities []types.Activity
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDetachInstancesMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsAwsquery_serializeOpDetachInstances{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDetachInstances{}, 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 = addOpDetachInstancesValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDetachInstances(options.Region), middleware.Before); 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_opDetachInstances(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "autoscaling",
+ OperationName: "DetachInstances",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_DetachLoadBalancerTargetGroups.go b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_DetachLoadBalancerTargetGroups.go
new file mode 100644
index 00000000..4adbc23f
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_DetachLoadBalancerTargetGroups.go
@@ -0,0 +1,122 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package autoscaling
+
+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"
+)
+
+// Detaches one or more target groups from the specified Auto Scaling group.
+func (c *Client) DetachLoadBalancerTargetGroups(ctx context.Context, params *DetachLoadBalancerTargetGroupsInput, optFns ...func(*Options)) (*DetachLoadBalancerTargetGroupsOutput, error) {
+ if params == nil {
+ params = &DetachLoadBalancerTargetGroupsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DetachLoadBalancerTargetGroups", params, optFns, c.addOperationDetachLoadBalancerTargetGroupsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DetachLoadBalancerTargetGroupsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DetachLoadBalancerTargetGroupsInput struct {
+
+ // The name of the Auto Scaling group.
+ //
+ // This member is required.
+ AutoScalingGroupName *string
+
+ // The Amazon Resource Names (ARN) of the target groups. You can specify up to 10
+ // target groups.
+ //
+ // This member is required.
+ TargetGroupARNs []string
+
+ noSmithyDocumentSerde
+}
+
+type DetachLoadBalancerTargetGroupsOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDetachLoadBalancerTargetGroupsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsAwsquery_serializeOpDetachLoadBalancerTargetGroups{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDetachLoadBalancerTargetGroups{}, 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 = addOpDetachLoadBalancerTargetGroupsValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDetachLoadBalancerTargetGroups(options.Region), middleware.Before); 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_opDetachLoadBalancerTargetGroups(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "autoscaling",
+ OperationName: "DetachLoadBalancerTargetGroups",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_DetachLoadBalancers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_DetachLoadBalancers.go
new file mode 100644
index 00000000..fb1536b9
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_DetachLoadBalancers.go
@@ -0,0 +1,128 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package autoscaling
+
+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"
+)
+
+// Detaches one or more Classic Load Balancers from the specified Auto Scaling
+// group. This operation detaches only Classic Load Balancers. If you have
+// Application Load Balancers, Network Load Balancers, or Gateway Load Balancers,
+// use the DetachLoadBalancerTargetGroups API instead. When you detach a load
+// balancer, it enters the Removing state while deregistering the instances in the
+// group. When all instances are deregistered, then you can no longer describe the
+// load balancer using the DescribeLoadBalancers API call. The instances remain
+// running.
+func (c *Client) DetachLoadBalancers(ctx context.Context, params *DetachLoadBalancersInput, optFns ...func(*Options)) (*DetachLoadBalancersOutput, error) {
+ if params == nil {
+ params = &DetachLoadBalancersInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DetachLoadBalancers", params, optFns, c.addOperationDetachLoadBalancersMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DetachLoadBalancersOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DetachLoadBalancersInput struct {
+
+ // The name of the Auto Scaling group.
+ //
+ // This member is required.
+ AutoScalingGroupName *string
+
+ // The names of the load balancers. You can specify up to 10 load balancers.
+ //
+ // This member is required.
+ LoadBalancerNames []string
+
+ noSmithyDocumentSerde
+}
+
+type DetachLoadBalancersOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDetachLoadBalancersMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsAwsquery_serializeOpDetachLoadBalancers{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDetachLoadBalancers{}, 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 = addOpDetachLoadBalancersValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDetachLoadBalancers(options.Region), middleware.Before); 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_opDetachLoadBalancers(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "autoscaling",
+ OperationName: "DetachLoadBalancers",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_DisableMetricsCollection.go b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_DisableMetricsCollection.go
new file mode 100644
index 00000000..323bdd08
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_DisableMetricsCollection.go
@@ -0,0 +1,169 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package autoscaling
+
+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"
+)
+
+// Disables group metrics for the specified Auto Scaling group.
+func (c *Client) DisableMetricsCollection(ctx context.Context, params *DisableMetricsCollectionInput, optFns ...func(*Options)) (*DisableMetricsCollectionOutput, error) {
+ if params == nil {
+ params = &DisableMetricsCollectionInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DisableMetricsCollection", params, optFns, c.addOperationDisableMetricsCollectionMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DisableMetricsCollectionOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DisableMetricsCollectionInput struct {
+
+ // The name of the Auto Scaling group.
+ //
+ // This member is required.
+ AutoScalingGroupName *string
+
+ // Specifies one or more of the following metrics:
+ //
+ // * GroupMinSize
+ //
+ // *
+ // GroupMaxSize
+ //
+ // * GroupDesiredCapacity
+ //
+ // * GroupInServiceInstances
+ //
+ // *
+ // GroupPendingInstances
+ //
+ // * GroupStandbyInstances
+ //
+ // * GroupTerminatingInstances
+ //
+ // *
+ // GroupTotalInstances
+ //
+ // * GroupInServiceCapacity
+ //
+ // * GroupPendingCapacity
+ //
+ // *
+ // GroupStandbyCapacity
+ //
+ // * GroupTerminatingCapacity
+ //
+ // * GroupTotalCapacity
+ //
+ // *
+ // WarmPoolDesiredCapacity
+ //
+ // * WarmPoolWarmedCapacity
+ //
+ // * WarmPoolPendingCapacity
+ //
+ // *
+ // WarmPoolTerminatingCapacity
+ //
+ // * WarmPoolTotalCapacity
+ //
+ // *
+ // GroupAndWarmPoolDesiredCapacity
+ //
+ // * GroupAndWarmPoolTotalCapacity
+ //
+ // If you omit
+ // this parameter, all metrics are disabled.
+ Metrics []string
+
+ noSmithyDocumentSerde
+}
+
+type DisableMetricsCollectionOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDisableMetricsCollectionMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsAwsquery_serializeOpDisableMetricsCollection{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDisableMetricsCollection{}, 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 = addOpDisableMetricsCollectionValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisableMetricsCollection(options.Region), middleware.Before); 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_opDisableMetricsCollection(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "autoscaling",
+ OperationName: "DisableMetricsCollection",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_EnableMetricsCollection.go b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_EnableMetricsCollection.go
new file mode 100644
index 00000000..f2856655
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_EnableMetricsCollection.go
@@ -0,0 +1,186 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package autoscaling
+
+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"
+)
+
+// Enables group metrics for the specified Auto Scaling group. For more
+// information, see Monitoring CloudWatch metrics for your Auto Scaling groups and
+// instances
+// (https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-instance-monitoring.html)
+// in the Amazon EC2 Auto Scaling User Guide.
+func (c *Client) EnableMetricsCollection(ctx context.Context, params *EnableMetricsCollectionInput, optFns ...func(*Options)) (*EnableMetricsCollectionOutput, error) {
+ if params == nil {
+ params = &EnableMetricsCollectionInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "EnableMetricsCollection", params, optFns, c.addOperationEnableMetricsCollectionMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*EnableMetricsCollectionOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type EnableMetricsCollectionInput struct {
+
+ // The name of the Auto Scaling group.
+ //
+ // This member is required.
+ AutoScalingGroupName *string
+
+ // The granularity to associate with the metrics to collect. The only valid value
+ // is 1Minute.
+ //
+ // This member is required.
+ Granularity *string
+
+ // Specifies which group-level metrics to start collecting. You can specify one or
+ // more of the following metrics:
+ //
+ // * GroupMinSize
+ //
+ // * GroupMaxSize
+ //
+ // *
+ // GroupDesiredCapacity
+ //
+ // * GroupInServiceInstances
+ //
+ // * GroupPendingInstances
+ //
+ // *
+ // GroupStandbyInstances
+ //
+ // * GroupTerminatingInstances
+ //
+ // * GroupTotalInstances
+ //
+ // The
+ // instance weighting feature supports the following additional metrics:
+ //
+ // *
+ // GroupInServiceCapacity
+ //
+ // * GroupPendingCapacity
+ //
+ // * GroupStandbyCapacity
+ //
+ // *
+ // GroupTerminatingCapacity
+ //
+ // * GroupTotalCapacity
+ //
+ // The warm pools feature supports
+ // the following additional metrics:
+ //
+ // * WarmPoolDesiredCapacity
+ //
+ // *
+ // WarmPoolWarmedCapacity
+ //
+ // * WarmPoolPendingCapacity
+ //
+ // *
+ // WarmPoolTerminatingCapacity
+ //
+ // * WarmPoolTotalCapacity
+ //
+ // *
+ // GroupAndWarmPoolDesiredCapacity
+ //
+ // * GroupAndWarmPoolTotalCapacity
+ //
+ // If you omit
+ // this parameter, all metrics are enabled.
+ Metrics []string
+
+ noSmithyDocumentSerde
+}
+
+type EnableMetricsCollectionOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationEnableMetricsCollectionMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsAwsquery_serializeOpEnableMetricsCollection{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsquery_deserializeOpEnableMetricsCollection{}, 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 = addOpEnableMetricsCollectionValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opEnableMetricsCollection(options.Region), middleware.Before); 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_opEnableMetricsCollection(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "autoscaling",
+ OperationName: "EnableMetricsCollection",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_EnterStandby.go b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_EnterStandby.go
new file mode 100644
index 00000000..a01fabea
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_EnterStandby.go
@@ -0,0 +1,139 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package autoscaling
+
+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/autoscaling/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Moves the specified instances into the standby state. If you choose to decrement
+// the desired capacity of the Auto Scaling group, the instances can enter standby
+// as long as the desired capacity of the Auto Scaling group after the instances
+// are placed into standby is equal to or greater than the minimum capacity of the
+// group. If you choose not to decrement the desired capacity of the Auto Scaling
+// group, the Auto Scaling group launches new instances to replace the instances on
+// standby. For more information, see Temporarily removing instances from your Auto
+// Scaling group
+// (https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-enter-exit-standby.html)
+// in the Amazon EC2 Auto Scaling User Guide.
+func (c *Client) EnterStandby(ctx context.Context, params *EnterStandbyInput, optFns ...func(*Options)) (*EnterStandbyOutput, error) {
+ if params == nil {
+ params = &EnterStandbyInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "EnterStandby", params, optFns, c.addOperationEnterStandbyMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*EnterStandbyOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type EnterStandbyInput struct {
+
+ // The name of the Auto Scaling group.
+ //
+ // This member is required.
+ AutoScalingGroupName *string
+
+ // Indicates whether to decrement the desired capacity of the Auto Scaling group by
+ // the number of instances moved to Standby mode.
+ //
+ // This member is required.
+ ShouldDecrementDesiredCapacity *bool
+
+ // The IDs of the instances. You can specify up to 20 instances.
+ InstanceIds []string
+
+ noSmithyDocumentSerde
+}
+
+type EnterStandbyOutput struct {
+
+ // The activities related to moving instances into Standby mode.
+ Activities []types.Activity
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationEnterStandbyMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsAwsquery_serializeOpEnterStandby{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsquery_deserializeOpEnterStandby{}, 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 = addOpEnterStandbyValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opEnterStandby(options.Region), middleware.Before); 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_opEnterStandby(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "autoscaling",
+ OperationName: "EnterStandby",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_ExecutePolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_ExecutePolicy.go
new file mode 100644
index 00000000..ffc20a31
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_ExecutePolicy.go
@@ -0,0 +1,140 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package autoscaling
+
+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"
+)
+
+// Executes the specified policy. This can be useful for testing the design of your
+// scaling policy.
+func (c *Client) ExecutePolicy(ctx context.Context, params *ExecutePolicyInput, optFns ...func(*Options)) (*ExecutePolicyOutput, error) {
+ if params == nil {
+ params = &ExecutePolicyInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ExecutePolicy", params, optFns, c.addOperationExecutePolicyMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ExecutePolicyOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ExecutePolicyInput struct {
+
+ // The name or ARN of the policy.
+ //
+ // This member is required.
+ PolicyName *string
+
+ // The name of the Auto Scaling group.
+ AutoScalingGroupName *string
+
+ // The breach threshold for the alarm. Required if the policy type is StepScaling
+ // and not supported otherwise.
+ BreachThreshold *float64
+
+ // Indicates whether Amazon EC2 Auto Scaling waits for the cooldown period to
+ // complete before executing the policy. Valid only if the policy type is
+ // SimpleScaling. For more information, see Scaling cooldowns for Amazon EC2 Auto
+ // Scaling (https://docs.aws.amazon.com/autoscaling/ec2/userguide/Cooldown.html) in
+ // the Amazon EC2 Auto Scaling User Guide.
+ HonorCooldown *bool
+
+ // The metric value to compare to BreachThreshold. This enables you to execute a
+ // policy of type StepScaling and determine which step adjustment to use. For
+ // example, if the breach threshold is 50 and you want to use a step adjustment
+ // with a lower bound of 0 and an upper bound of 10, you can set the metric value
+ // to 59. If you specify a metric value that doesn't correspond to a step
+ // adjustment for the policy, the call returns an error. Required if the policy
+ // type is StepScaling and not supported otherwise.
+ MetricValue *float64
+
+ noSmithyDocumentSerde
+}
+
+type ExecutePolicyOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationExecutePolicyMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsAwsquery_serializeOpExecutePolicy{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsquery_deserializeOpExecutePolicy{}, 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 = addOpExecutePolicyValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opExecutePolicy(options.Region), middleware.Before); 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_opExecutePolicy(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "autoscaling",
+ OperationName: "ExecutePolicy",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_ExitStandby.go b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_ExitStandby.go
new file mode 100644
index 00000000..9c090d42
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_ExitStandby.go
@@ -0,0 +1,128 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package autoscaling
+
+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/autoscaling/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Moves the specified instances out of the standby state. After you put the
+// instances back in service, the desired capacity is incremented. For more
+// information, see Temporarily removing instances from your Auto Scaling group
+// (https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-enter-exit-standby.html)
+// in the Amazon EC2 Auto Scaling User Guide.
+func (c *Client) ExitStandby(ctx context.Context, params *ExitStandbyInput, optFns ...func(*Options)) (*ExitStandbyOutput, error) {
+ if params == nil {
+ params = &ExitStandbyInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ExitStandby", params, optFns, c.addOperationExitStandbyMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ExitStandbyOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ExitStandbyInput struct {
+
+ // The name of the Auto Scaling group.
+ //
+ // This member is required.
+ AutoScalingGroupName *string
+
+ // The IDs of the instances. You can specify up to 20 instances.
+ InstanceIds []string
+
+ noSmithyDocumentSerde
+}
+
+type ExitStandbyOutput struct {
+
+ // The activities related to moving instances out of Standby mode.
+ Activities []types.Activity
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationExitStandbyMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsAwsquery_serializeOpExitStandby{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsquery_deserializeOpExitStandby{}, 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 = addOpExitStandbyValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opExitStandby(options.Region), middleware.Before); 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_opExitStandby(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "autoscaling",
+ OperationName: "ExitStandby",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_GetPredictiveScalingForecast.go b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_GetPredictiveScalingForecast.go
new file mode 100644
index 00000000..e9d58e57
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_GetPredictiveScalingForecast.go
@@ -0,0 +1,163 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package autoscaling
+
+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/autoscaling/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "time"
+)
+
+// Retrieves the forecast data for a predictive scaling policy. Load forecasts are
+// predictions of the hourly load values using historical load data from CloudWatch
+// and an analysis of historical trends. Capacity forecasts are represented as
+// predicted values for the minimum capacity that is needed on an hourly basis,
+// based on the hourly load forecast. A minimum of 24 hours of data is required to
+// create the initial forecasts. However, having a full 14 days of historical data
+// results in more accurate forecasts. For more information, see Predictive scaling
+// for Amazon EC2 Auto Scaling
+// (https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-predictive-scaling.html)
+// in the Amazon EC2 Auto Scaling User Guide.
+func (c *Client) GetPredictiveScalingForecast(ctx context.Context, params *GetPredictiveScalingForecastInput, optFns ...func(*Options)) (*GetPredictiveScalingForecastOutput, error) {
+ if params == nil {
+ params = &GetPredictiveScalingForecastInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetPredictiveScalingForecast", params, optFns, c.addOperationGetPredictiveScalingForecastMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetPredictiveScalingForecastOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type GetPredictiveScalingForecastInput struct {
+
+ // The name of the Auto Scaling group.
+ //
+ // This member is required.
+ AutoScalingGroupName *string
+
+ // The exclusive end time of the time range for the forecast data to get. The
+ // maximum time duration between the start and end time is 30 days. Although this
+ // parameter can accept a date and time that is more than two days in the future,
+ // the availability of forecast data has limits. Amazon EC2 Auto Scaling only
+ // issues forecasts for periods of two days in advance.
+ //
+ // This member is required.
+ EndTime *time.Time
+
+ // The name of the policy.
+ //
+ // This member is required.
+ PolicyName *string
+
+ // The inclusive start time of the time range for the forecast data to get. At
+ // most, the date and time can be one year before the current date and time.
+ //
+ // This member is required.
+ StartTime *time.Time
+
+ noSmithyDocumentSerde
+}
+
+type GetPredictiveScalingForecastOutput struct {
+
+ // The capacity forecast.
+ //
+ // This member is required.
+ CapacityForecast *types.CapacityForecast
+
+ // The load forecast.
+ //
+ // This member is required.
+ LoadForecast []types.LoadForecast
+
+ // The time the forecast was made.
+ //
+ // This member is required.
+ UpdateTime *time.Time
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationGetPredictiveScalingForecastMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsAwsquery_serializeOpGetPredictiveScalingForecast{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsquery_deserializeOpGetPredictiveScalingForecast{}, 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 = addOpGetPredictiveScalingForecastValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetPredictiveScalingForecast(options.Region), middleware.Before); 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_opGetPredictiveScalingForecast(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "autoscaling",
+ OperationName: "GetPredictiveScalingForecast",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_PutLifecycleHook.go b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_PutLifecycleHook.go
new file mode 100644
index 00000000..5fc6f776
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_PutLifecycleHook.go
@@ -0,0 +1,200 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package autoscaling
+
+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"
+)
+
+// Creates or updates a lifecycle hook for the specified Auto Scaling group. A
+// lifecycle hook tells Amazon EC2 Auto Scaling to perform an action on an instance
+// when the instance launches (before it is put into service) or as the instance
+// terminates (before it is fully terminated). This step is a part of the procedure
+// for adding a lifecycle hook to an Auto Scaling group:
+//
+// * (Optional) Create a
+// Lambda function and a rule that allows CloudWatch Events to invoke your Lambda
+// function when Amazon EC2 Auto Scaling launches or terminates instances.
+//
+// *
+// (Optional) Create a notification target and an IAM role. The target can be
+// either an Amazon SQS queue or an Amazon SNS topic. The role allows Amazon EC2
+// Auto Scaling to publish lifecycle notifications to the target.
+//
+// * Create the
+// lifecycle hook. Specify whether the hook is used when the instances launch or
+// terminate.
+//
+// * If you need more time, record the lifecycle action heartbeat to
+// keep the instance in a pending state using the RecordLifecycleActionHeartbeat
+// API call.
+//
+// * If you finish before the timeout period ends, complete the
+// lifecycle action using the CompleteLifecycleAction API call.
+//
+// For more
+// information, see Amazon EC2 Auto Scaling lifecycle hooks
+// (https://docs.aws.amazon.com/autoscaling/ec2/userguide/lifecycle-hooks.html) in
+// the Amazon EC2 Auto Scaling User Guide. If you exceed your maximum limit of
+// lifecycle hooks, which by default is 50 per Auto Scaling group, the call fails.
+// You can view the lifecycle hooks for an Auto Scaling group using the
+// DescribeLifecycleHooks API call. If you are no longer using a lifecycle hook,
+// you can delete it by calling the DeleteLifecycleHook API.
+func (c *Client) PutLifecycleHook(ctx context.Context, params *PutLifecycleHookInput, optFns ...func(*Options)) (*PutLifecycleHookOutput, error) {
+ if params == nil {
+ params = &PutLifecycleHookInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "PutLifecycleHook", params, optFns, c.addOperationPutLifecycleHookMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*PutLifecycleHookOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type PutLifecycleHookInput struct {
+
+ // The name of the Auto Scaling group.
+ //
+ // This member is required.
+ AutoScalingGroupName *string
+
+ // The name of the lifecycle hook.
+ //
+ // This member is required.
+ LifecycleHookName *string
+
+ // Defines the action the Auto Scaling group should take when the lifecycle hook
+ // timeout elapses or if an unexpected failure occurs. This parameter can be either
+ // CONTINUE or ABANDON. The default value is ABANDON.
+ DefaultResult *string
+
+ // The maximum time, in seconds, that can elapse before the lifecycle hook times
+ // out. The range is from 30 to 7200 seconds. The default value is 3600 seconds (1
+ // hour). If the lifecycle hook times out, Amazon EC2 Auto Scaling performs the
+ // action that you specified in the DefaultResult parameter. You can prevent the
+ // lifecycle hook from timing out by calling the RecordLifecycleActionHeartbeat
+ // API.
+ HeartbeatTimeout *int32
+
+ // The instance state to which you want to attach the lifecycle hook. The valid
+ // values are:
+ //
+ // * autoscaling:EC2_INSTANCE_LAUNCHING
+ //
+ // *
+ // autoscaling:EC2_INSTANCE_TERMINATING
+ //
+ // Required for new lifecycle hooks, but
+ // optional when updating existing hooks.
+ LifecycleTransition *string
+
+ // Additional information that you want to include any time Amazon EC2 Auto Scaling
+ // sends a message to the notification target.
+ NotificationMetadata *string
+
+ // The ARN of the notification target that Amazon EC2 Auto Scaling uses to notify
+ // you when an instance is in the transition state for the lifecycle hook. This
+ // target can be either an SQS queue or an SNS topic. If you specify an empty
+ // string, this overrides the current ARN. This operation uses the JSON format when
+ // sending notifications to an Amazon SQS queue, and an email key-value pair format
+ // when sending notifications to an Amazon SNS topic. When you specify a
+ // notification target, Amazon EC2 Auto Scaling sends it a test message. Test
+ // messages contain the following additional key-value pair: "Event":
+ // "autoscaling:TEST_NOTIFICATION".
+ NotificationTargetARN *string
+
+ // The ARN of the IAM role that allows the Auto Scaling group to publish to the
+ // specified notification target, for example, an Amazon SNS topic or an Amazon SQS
+ // queue. Required for new lifecycle hooks, but optional when updating existing
+ // hooks.
+ RoleARN *string
+
+ noSmithyDocumentSerde
+}
+
+type PutLifecycleHookOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationPutLifecycleHookMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsAwsquery_serializeOpPutLifecycleHook{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsquery_deserializeOpPutLifecycleHook{}, 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 = addOpPutLifecycleHookValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutLifecycleHook(options.Region), middleware.Before); 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_opPutLifecycleHook(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "autoscaling",
+ OperationName: "PutLifecycleHook",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_PutNotificationConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_PutNotificationConfiguration.go
new file mode 100644
index 00000000..7b3bc032
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_PutNotificationConfiguration.go
@@ -0,0 +1,136 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package autoscaling
+
+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"
+)
+
+// Configures an Auto Scaling group to send notifications when specified events
+// take place. Subscribers to the specified topic can have messages delivered to an
+// endpoint such as a web server or an email address. This configuration overwrites
+// any existing configuration. For more information, see Getting Amazon SNS
+// notifications when your Auto Scaling group scales
+// (https://docs.aws.amazon.com/autoscaling/ec2/userguide/ASGettingNotifications.html)
+// in the Amazon EC2 Auto Scaling User Guide. If you exceed your maximum limit of
+// SNS topics, which is 10 per Auto Scaling group, the call fails.
+func (c *Client) PutNotificationConfiguration(ctx context.Context, params *PutNotificationConfigurationInput, optFns ...func(*Options)) (*PutNotificationConfigurationOutput, error) {
+ if params == nil {
+ params = &PutNotificationConfigurationInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "PutNotificationConfiguration", params, optFns, c.addOperationPutNotificationConfigurationMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*PutNotificationConfigurationOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type PutNotificationConfigurationInput struct {
+
+ // The name of the Auto Scaling group.
+ //
+ // This member is required.
+ AutoScalingGroupName *string
+
+ // The type of event that causes the notification to be sent. To query the
+ // notification types supported by Amazon EC2 Auto Scaling, call the
+ // DescribeAutoScalingNotificationTypes API.
+ //
+ // This member is required.
+ NotificationTypes []string
+
+ // The Amazon Resource Name (ARN) of the Amazon Simple Notification Service (Amazon
+ // SNS) topic.
+ //
+ // This member is required.
+ TopicARN *string
+
+ noSmithyDocumentSerde
+}
+
+type PutNotificationConfigurationOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationPutNotificationConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsAwsquery_serializeOpPutNotificationConfiguration{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsquery_deserializeOpPutNotificationConfiguration{}, 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 = addOpPutNotificationConfigurationValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutNotificationConfiguration(options.Region), middleware.Before); 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_opPutNotificationConfiguration(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "autoscaling",
+ OperationName: "PutNotificationConfiguration",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_PutScalingPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_PutScalingPolicy.go
new file mode 100644
index 00000000..e6c61e93
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_PutScalingPolicy.go
@@ -0,0 +1,251 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package autoscaling
+
+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/autoscaling/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Creates or updates a scaling policy for an Auto Scaling group. Scaling policies
+// are used to scale an Auto Scaling group based on configurable metrics. If no
+// policies are defined, the dynamic scaling and predictive scaling features are
+// not used. For more information about using dynamic scaling, see Target tracking
+// scaling policies
+// (https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-scaling-target-tracking.html)
+// and Step and simple scaling policies
+// (https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-scaling-simple-step.html)
+// in the Amazon EC2 Auto Scaling User Guide. For more information about using
+// predictive scaling, see Predictive scaling for Amazon EC2 Auto Scaling
+// (https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-predictive-scaling.html)
+// in the Amazon EC2 Auto Scaling User Guide. You can view the scaling policies for
+// an Auto Scaling group using the DescribePolicies API call. If you are no longer
+// using a scaling policy, you can delete it by calling the DeletePolicy API.
+func (c *Client) PutScalingPolicy(ctx context.Context, params *PutScalingPolicyInput, optFns ...func(*Options)) (*PutScalingPolicyOutput, error) {
+ if params == nil {
+ params = &PutScalingPolicyInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "PutScalingPolicy", params, optFns, c.addOperationPutScalingPolicyMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*PutScalingPolicyOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type PutScalingPolicyInput struct {
+
+ // The name of the Auto Scaling group.
+ //
+ // This member is required.
+ AutoScalingGroupName *string
+
+ // The name of the policy.
+ //
+ // This member is required.
+ PolicyName *string
+
+ // Specifies how the scaling adjustment is interpreted (for example, an absolute
+ // number or a percentage). The valid values are ChangeInCapacity, ExactCapacity,
+ // and PercentChangeInCapacity. Required if the policy type is StepScaling or
+ // SimpleScaling. For more information, see Scaling adjustment types
+ // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-scaling-simple-step.html#as-scaling-adjustment)
+ // in the Amazon EC2 Auto Scaling User Guide.
+ AdjustmentType *string
+
+ // The duration of the policy's cooldown period, in seconds. When a cooldown period
+ // is specified here, it overrides the default cooldown period defined for the Auto
+ // Scaling group. Valid only if the policy type is SimpleScaling. For more
+ // information, see Scaling cooldowns for Amazon EC2 Auto Scaling
+ // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/Cooldown.html) in the
+ // Amazon EC2 Auto Scaling User Guide.
+ Cooldown *int32
+
+ // Indicates whether the scaling policy is enabled or disabled. The default is
+ // enabled. For more information, see Disabling a scaling policy for an Auto
+ // Scaling group
+ // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-enable-disable-scaling-policy.html)
+ // in the Amazon EC2 Auto Scaling User Guide.
+ Enabled *bool
+
+ // The estimated time, in seconds, until a newly launched instance can contribute
+ // to the CloudWatch metrics. If not provided, the default is to use the value from
+ // the default cooldown period for the Auto Scaling group. Valid only if the policy
+ // type is TargetTrackingScaling or StepScaling.
+ EstimatedInstanceWarmup *int32
+
+ // The aggregation type for the CloudWatch metrics. The valid values are Minimum,
+ // Maximum, and Average. If the aggregation type is null, the value is treated as
+ // Average. Valid only if the policy type is StepScaling.
+ MetricAggregationType *string
+
+ // The minimum value to scale by when the adjustment type is
+ // PercentChangeInCapacity. For example, suppose that you create a step scaling
+ // policy to scale out an Auto Scaling group by 25 percent and you specify a
+ // MinAdjustmentMagnitude of 2. If the group has 4 instances and the scaling policy
+ // is performed, 25 percent of 4 is 1. However, because you specified a
+ // MinAdjustmentMagnitude of 2, Amazon EC2 Auto Scaling scales out the group by 2
+ // instances. Valid only if the policy type is StepScaling or SimpleScaling. For
+ // more information, see Scaling adjustment types
+ // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-scaling-simple-step.html#as-scaling-adjustment)
+ // in the Amazon EC2 Auto Scaling User Guide. Some Auto Scaling groups use instance
+ // weights. In this case, set the MinAdjustmentMagnitude to a value that is at
+ // least as large as your largest instance weight.
+ MinAdjustmentMagnitude *int32
+
+ // Available for backward compatibility. Use MinAdjustmentMagnitude instead.
+ //
+ // Deprecated: This member has been deprecated.
+ MinAdjustmentStep *int32
+
+ // One of the following policy types:
+ //
+ // * TargetTrackingScaling
+ //
+ // * StepScaling
+ //
+ // *
+ // SimpleScaling (default)
+ //
+ // * PredictiveScaling
+ PolicyType *string
+
+ // A predictive scaling policy. Provides support for only predefined metrics.
+ // Predictive scaling works with CPU utilization, network in/out, and the
+ // Application Load Balancer request count. For more information, see
+ // PredictiveScalingConfiguration
+ // (https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_PredictiveScalingConfiguration.html)
+ // in the Amazon EC2 Auto Scaling API Reference. Required if the policy type is
+ // PredictiveScaling.
+ PredictiveScalingConfiguration *types.PredictiveScalingConfiguration
+
+ // The amount by which to scale, based on the specified adjustment type. A positive
+ // value adds to the current capacity while a negative number removes from the
+ // current capacity. For exact capacity, you must specify a positive value.
+ // Required if the policy type is SimpleScaling. (Not used with any other policy
+ // type.)
+ ScalingAdjustment *int32
+
+ // A set of adjustments that enable you to scale based on the size of the alarm
+ // breach. Required if the policy type is StepScaling. (Not used with any other
+ // policy type.)
+ StepAdjustments []types.StepAdjustment
+
+ // A target tracking scaling policy. Provides support for predefined or customized
+ // metrics. The following predefined metrics are available:
+ //
+ // *
+ // ASGAverageCPUUtilization
+ //
+ // * ASGAverageNetworkIn
+ //
+ // * ASGAverageNetworkOut
+ //
+ // *
+ // ALBRequestCountPerTarget
+ //
+ // If you specify ALBRequestCountPerTarget for the
+ // metric, you must specify the ResourceLabel parameter with the
+ // PredefinedMetricSpecification. For more information, see
+ // TargetTrackingConfiguration
+ // (https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_TargetTrackingConfiguration.html)
+ // in the Amazon EC2 Auto Scaling API Reference. Required if the policy type is
+ // TargetTrackingScaling.
+ TargetTrackingConfiguration *types.TargetTrackingConfiguration
+
+ noSmithyDocumentSerde
+}
+
+// Contains the output of PutScalingPolicy.
+type PutScalingPolicyOutput struct {
+
+ // The CloudWatch alarms created for the target tracking scaling policy.
+ Alarms []types.Alarm
+
+ // The Amazon Resource Name (ARN) of the policy.
+ PolicyARN *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationPutScalingPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsAwsquery_serializeOpPutScalingPolicy{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsquery_deserializeOpPutScalingPolicy{}, 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 = addOpPutScalingPolicyValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutScalingPolicy(options.Region), middleware.Before); 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_opPutScalingPolicy(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "autoscaling",
+ OperationName: "PutScalingPolicy",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_PutScheduledUpdateGroupAction.go b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_PutScheduledUpdateGroupAction.go
new file mode 100644
index 00000000..9066a11b
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_PutScheduledUpdateGroupAction.go
@@ -0,0 +1,170 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package autoscaling
+
+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"
+ "time"
+)
+
+// Creates or updates a scheduled scaling action for an Auto Scaling group. For
+// more information, see Scheduled scaling
+// (https://docs.aws.amazon.com/autoscaling/ec2/userguide/schedule_time.html) in
+// the Amazon EC2 Auto Scaling User Guide. You can view the scheduled actions for
+// an Auto Scaling group using the DescribeScheduledActions API call. If you are no
+// longer using a scheduled action, you can delete it by calling the
+// DeleteScheduledAction API.
+func (c *Client) PutScheduledUpdateGroupAction(ctx context.Context, params *PutScheduledUpdateGroupActionInput, optFns ...func(*Options)) (*PutScheduledUpdateGroupActionOutput, error) {
+ if params == nil {
+ params = &PutScheduledUpdateGroupActionInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "PutScheduledUpdateGroupAction", params, optFns, c.addOperationPutScheduledUpdateGroupActionMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*PutScheduledUpdateGroupActionOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type PutScheduledUpdateGroupActionInput struct {
+
+ // The name of the Auto Scaling group.
+ //
+ // This member is required.
+ AutoScalingGroupName *string
+
+ // The name of this scaling action.
+ //
+ // This member is required.
+ ScheduledActionName *string
+
+ // The desired capacity is the initial capacity of the Auto Scaling group after the
+ // scheduled action runs and the capacity it attempts to maintain. It can scale
+ // beyond this capacity if you add more scaling conditions.
+ DesiredCapacity *int32
+
+ // The date and time for the recurring schedule to end, in UTC.
+ EndTime *time.Time
+
+ // The maximum size of the Auto Scaling group.
+ MaxSize *int32
+
+ // The minimum size of the Auto Scaling group.
+ MinSize *int32
+
+ // The recurring schedule for this action. This format consists of five fields
+ // separated by white spaces: [Minute] [Hour] [Day_of_Month] [Month_of_Year]
+ // [Day_of_Week]. The value must be in quotes (for example, "30 0 1 1,6,12 *"). For
+ // more information about this format, see Crontab (http://crontab.org). When
+ // StartTime and EndTime are specified with Recurrence, they form the boundaries of
+ // when the recurring action starts and stops. Cron expressions use Universal
+ // Coordinated Time (UTC) by default.
+ Recurrence *string
+
+ // The date and time for this action to start, in YYYY-MM-DDThh:mm:ssZ format in
+ // UTC/GMT only and in quotes (for example, "2019-06-01T00:00:00Z"). If you specify
+ // Recurrence and StartTime, Amazon EC2 Auto Scaling performs the action at this
+ // time, and then performs the action based on the specified recurrence. If you try
+ // to schedule your action in the past, Amazon EC2 Auto Scaling returns an error
+ // message.
+ StartTime *time.Time
+
+ // This parameter is no longer used.
+ Time *time.Time
+
+ // Specifies the time zone for a cron expression. If a time zone is not provided,
+ // UTC is used by default. Valid values are the canonical names of the IANA time
+ // zones, derived from the IANA Time Zone Database (such as Etc/GMT+9 or
+ // Pacific/Tahiti). For more information, see
+ // https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
+ // (https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
+ TimeZone *string
+
+ noSmithyDocumentSerde
+}
+
+type PutScheduledUpdateGroupActionOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationPutScheduledUpdateGroupActionMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsAwsquery_serializeOpPutScheduledUpdateGroupAction{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsquery_deserializeOpPutScheduledUpdateGroupAction{}, 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 = addOpPutScheduledUpdateGroupActionValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutScheduledUpdateGroupAction(options.Region), middleware.Before); 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_opPutScheduledUpdateGroupAction(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "autoscaling",
+ OperationName: "PutScheduledUpdateGroupAction",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_PutWarmPool.go b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_PutWarmPool.go
new file mode 100644
index 00000000..c62d26e6
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_PutWarmPool.go
@@ -0,0 +1,154 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package autoscaling
+
+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/autoscaling/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Creates or updates a warm pool for the specified Auto Scaling group. A warm pool
+// is a pool of pre-initialized EC2 instances that sits alongside the Auto Scaling
+// group. Whenever your application needs to scale out, the Auto Scaling group can
+// draw on the warm pool to meet its new desired capacity. For more information and
+// example configurations, see Warm pools for Amazon EC2 Auto Scaling
+// (https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-warm-pools.html)
+// in the Amazon EC2 Auto Scaling User Guide. This operation must be called from
+// the Region in which the Auto Scaling group was created. This operation cannot be
+// called on an Auto Scaling group that has a mixed instances policy or a launch
+// template or launch configuration that requests Spot Instances. You can view the
+// instances in the warm pool using the DescribeWarmPool API call. If you are no
+// longer using a warm pool, you can delete it by calling the DeleteWarmPool API.
+func (c *Client) PutWarmPool(ctx context.Context, params *PutWarmPoolInput, optFns ...func(*Options)) (*PutWarmPoolOutput, error) {
+ if params == nil {
+ params = &PutWarmPoolInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "PutWarmPool", params, optFns, c.addOperationPutWarmPoolMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*PutWarmPoolOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type PutWarmPoolInput struct {
+
+ // The name of the Auto Scaling group.
+ //
+ // This member is required.
+ AutoScalingGroupName *string
+
+ // Specifies the maximum number of instances that are allowed to be in the warm
+ // pool or in any state except Terminated for the Auto Scaling group. This is an
+ // optional property. Specify it only if you do not want the warm pool size to be
+ // determined by the difference between the group's maximum capacity and its
+ // desired capacity. If a value for MaxGroupPreparedCapacity is not specified,
+ // Amazon EC2 Auto Scaling launches and maintains the difference between the
+ // group's maximum capacity and its desired capacity. If you specify a value for
+ // MaxGroupPreparedCapacity, Amazon EC2 Auto Scaling uses the difference between
+ // the MaxGroupPreparedCapacity and the desired capacity instead. The size of the
+ // warm pool is dynamic. Only when MaxGroupPreparedCapacity and MinSize are set to
+ // the same value does the warm pool have an absolute size. If the desired capacity
+ // of the Auto Scaling group is higher than the MaxGroupPreparedCapacity, the
+ // capacity of the warm pool is 0, unless you specify a value for MinSize. To
+ // remove a value that you previously set, include the property but specify -1 for
+ // the value.
+ MaxGroupPreparedCapacity *int32
+
+ // Specifies the minimum number of instances to maintain in the warm pool. This
+ // helps you to ensure that there is always a certain number of warmed instances
+ // available to handle traffic spikes. Defaults to 0 if not specified.
+ MinSize *int32
+
+ // Sets the instance state to transition to after the lifecycle actions are
+ // complete. Default is Stopped.
+ PoolState types.WarmPoolState
+
+ noSmithyDocumentSerde
+}
+
+type PutWarmPoolOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationPutWarmPoolMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsAwsquery_serializeOpPutWarmPool{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsquery_deserializeOpPutWarmPool{}, 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 = addOpPutWarmPoolValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutWarmPool(options.Region), middleware.Before); 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_opPutWarmPool(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "autoscaling",
+ OperationName: "PutWarmPool",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_RecordLifecycleActionHeartbeat.go b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_RecordLifecycleActionHeartbeat.go
new file mode 100644
index 00000000..326d940a
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_RecordLifecycleActionHeartbeat.go
@@ -0,0 +1,156 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package autoscaling
+
+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"
+)
+
+// Records a heartbeat for the lifecycle action associated with the specified token
+// or instance. This extends the timeout by the length of time defined using the
+// PutLifecycleHook API call. This step is a part of the procedure for adding a
+// lifecycle hook to an Auto Scaling group:
+//
+// * (Optional) Create a Lambda function
+// and a rule that allows CloudWatch Events to invoke your Lambda function when
+// Amazon EC2 Auto Scaling launches or terminates instances.
+//
+// * (Optional) Create a
+// notification target and an IAM role. The target can be either an Amazon SQS
+// queue or an Amazon SNS topic. The role allows Amazon EC2 Auto Scaling to publish
+// lifecycle notifications to the target.
+//
+// * Create the lifecycle hook. Specify
+// whether the hook is used when the instances launch or terminate.
+//
+// * If you need
+// more time, record the lifecycle action heartbeat to keep the instance in a
+// pending state.
+//
+// * If you finish before the timeout period ends, complete the
+// lifecycle action.
+//
+// For more information, see Amazon EC2 Auto Scaling lifecycle
+// hooks
+// (https://docs.aws.amazon.com/autoscaling/ec2/userguide/lifecycle-hooks.html) in
+// the Amazon EC2 Auto Scaling User Guide.
+func (c *Client) RecordLifecycleActionHeartbeat(ctx context.Context, params *RecordLifecycleActionHeartbeatInput, optFns ...func(*Options)) (*RecordLifecycleActionHeartbeatOutput, error) {
+ if params == nil {
+ params = &RecordLifecycleActionHeartbeatInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "RecordLifecycleActionHeartbeat", params, optFns, c.addOperationRecordLifecycleActionHeartbeatMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*RecordLifecycleActionHeartbeatOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type RecordLifecycleActionHeartbeatInput struct {
+
+ // The name of the Auto Scaling group.
+ //
+ // This member is required.
+ AutoScalingGroupName *string
+
+ // The name of the lifecycle hook.
+ //
+ // This member is required.
+ LifecycleHookName *string
+
+ // The ID of the instance.
+ InstanceId *string
+
+ // A token that uniquely identifies a specific lifecycle action associated with an
+ // instance. Amazon EC2 Auto Scaling sends this token to the notification target
+ // that you specified when you created the lifecycle hook.
+ LifecycleActionToken *string
+
+ noSmithyDocumentSerde
+}
+
+type RecordLifecycleActionHeartbeatOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationRecordLifecycleActionHeartbeatMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsAwsquery_serializeOpRecordLifecycleActionHeartbeat{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsquery_deserializeOpRecordLifecycleActionHeartbeat{}, 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 = addOpRecordLifecycleActionHeartbeatValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRecordLifecycleActionHeartbeat(options.Region), middleware.Before); 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_opRecordLifecycleActionHeartbeat(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "autoscaling",
+ OperationName: "RecordLifecycleActionHeartbeat",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_ResumeProcesses.go b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_ResumeProcesses.go
new file mode 100644
index 00000000..13aabc39
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_ResumeProcesses.go
@@ -0,0 +1,146 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package autoscaling
+
+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"
+)
+
+// Resumes the specified suspended auto scaling processes, or all suspended
+// process, for the specified Auto Scaling group. For more information, see
+// Suspending and resuming scaling processes
+// (https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-suspend-resume-processes.html)
+// in the Amazon EC2 Auto Scaling User Guide.
+func (c *Client) ResumeProcesses(ctx context.Context, params *ResumeProcessesInput, optFns ...func(*Options)) (*ResumeProcessesOutput, error) {
+ if params == nil {
+ params = &ResumeProcessesInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ResumeProcesses", params, optFns, c.addOperationResumeProcessesMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ResumeProcessesOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ResumeProcessesInput struct {
+
+ // The name of the Auto Scaling group.
+ //
+ // This member is required.
+ AutoScalingGroupName *string
+
+ // One or more of the following processes:
+ //
+ // * Launch
+ //
+ // * Terminate
+ //
+ // *
+ // AddToLoadBalancer
+ //
+ // * AlarmNotification
+ //
+ // * AZRebalance
+ //
+ // * HealthCheck
+ //
+ // *
+ // InstanceRefresh
+ //
+ // * ReplaceUnhealthy
+ //
+ // * ScheduledActions
+ //
+ // If you omit this
+ // parameter, all processes are specified.
+ ScalingProcesses []string
+
+ noSmithyDocumentSerde
+}
+
+type ResumeProcessesOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationResumeProcessesMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsAwsquery_serializeOpResumeProcesses{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsquery_deserializeOpResumeProcesses{}, 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 = addOpResumeProcessesValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opResumeProcesses(options.Region), middleware.Before); 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_opResumeProcesses(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "autoscaling",
+ OperationName: "ResumeProcesses",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_SetDesiredCapacity.go b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_SetDesiredCapacity.go
new file mode 100644
index 00000000..f4aff6f3
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_SetDesiredCapacity.go
@@ -0,0 +1,133 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package autoscaling
+
+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"
+)
+
+// Sets the size of the specified Auto Scaling group. If a scale-in activity occurs
+// as a result of a new DesiredCapacity value that is lower than the current size
+// of the group, the Auto Scaling group uses its termination policy to determine
+// which instances to terminate. For more information, see Manual scaling
+// (https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-manual-scaling.html)
+// in the Amazon EC2 Auto Scaling User Guide.
+func (c *Client) SetDesiredCapacity(ctx context.Context, params *SetDesiredCapacityInput, optFns ...func(*Options)) (*SetDesiredCapacityOutput, error) {
+ if params == nil {
+ params = &SetDesiredCapacityInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "SetDesiredCapacity", params, optFns, c.addOperationSetDesiredCapacityMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*SetDesiredCapacityOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type SetDesiredCapacityInput struct {
+
+ // The name of the Auto Scaling group.
+ //
+ // This member is required.
+ AutoScalingGroupName *string
+
+ // The desired capacity is the initial capacity of the Auto Scaling group after
+ // this operation completes and the capacity it attempts to maintain.
+ //
+ // This member is required.
+ DesiredCapacity *int32
+
+ // Indicates whether Amazon EC2 Auto Scaling waits for the cooldown period to
+ // complete before initiating a scaling activity to set your Auto Scaling group to
+ // its new capacity. By default, Amazon EC2 Auto Scaling does not honor the
+ // cooldown period during manual scaling activities.
+ HonorCooldown *bool
+
+ noSmithyDocumentSerde
+}
+
+type SetDesiredCapacityOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationSetDesiredCapacityMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsAwsquery_serializeOpSetDesiredCapacity{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsquery_deserializeOpSetDesiredCapacity{}, 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 = addOpSetDesiredCapacityValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSetDesiredCapacity(options.Region), middleware.Before); 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_opSetDesiredCapacity(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "autoscaling",
+ OperationName: "SetDesiredCapacity",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_SetInstanceHealth.go b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_SetInstanceHealth.go
new file mode 100644
index 00000000..fb39c375
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_SetInstanceHealth.go
@@ -0,0 +1,135 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package autoscaling
+
+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"
+)
+
+// Sets the health status of the specified instance. For more information, see
+// Health checks for Auto Scaling instances
+// (https://docs.aws.amazon.com/autoscaling/ec2/userguide/healthcheck.html) in the
+// Amazon EC2 Auto Scaling User Guide.
+func (c *Client) SetInstanceHealth(ctx context.Context, params *SetInstanceHealthInput, optFns ...func(*Options)) (*SetInstanceHealthOutput, error) {
+ if params == nil {
+ params = &SetInstanceHealthInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "SetInstanceHealth", params, optFns, c.addOperationSetInstanceHealthMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*SetInstanceHealthOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type SetInstanceHealthInput struct {
+
+ // The health status of the instance. Set to Healthy to have the instance remain in
+ // service. Set to Unhealthy to have the instance be out of service. Amazon EC2
+ // Auto Scaling terminates and replaces the unhealthy instance.
+ //
+ // This member is required.
+ HealthStatus *string
+
+ // The ID of the instance.
+ //
+ // This member is required.
+ InstanceId *string
+
+ // If the Auto Scaling group of the specified instance has a HealthCheckGracePeriod
+ // specified for the group, by default, this call respects the grace period. Set
+ // this to False, to have the call not respect the grace period associated with the
+ // group. For more information about the health check grace period, see
+ // CreateAutoScalingGroup
+ // (https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_CreateAutoScalingGroup.html)
+ // in the Amazon EC2 Auto Scaling API Reference.
+ ShouldRespectGracePeriod *bool
+
+ noSmithyDocumentSerde
+}
+
+type SetInstanceHealthOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationSetInstanceHealthMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsAwsquery_serializeOpSetInstanceHealth{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsquery_deserializeOpSetInstanceHealth{}, 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 = addOpSetInstanceHealthValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSetInstanceHealth(options.Region), middleware.Before); 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_opSetInstanceHealth(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "autoscaling",
+ OperationName: "SetInstanceHealth",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_SetInstanceProtection.go b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_SetInstanceProtection.go
new file mode 100644
index 00000000..4eb2f3ba
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_SetInstanceProtection.go
@@ -0,0 +1,133 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package autoscaling
+
+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"
+)
+
+// Updates the instance protection settings of the specified instances. This
+// operation cannot be called on instances in a warm pool. For more information
+// about preventing instances that are part of an Auto Scaling group from
+// terminating on scale in, see Instance scale-in protection
+// (https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-instance-termination.html#instance-protection)
+// in the Amazon EC2 Auto Scaling User Guide. If you exceed your maximum limit of
+// instance IDs, which is 50 per Auto Scaling group, the call fails.
+func (c *Client) SetInstanceProtection(ctx context.Context, params *SetInstanceProtectionInput, optFns ...func(*Options)) (*SetInstanceProtectionOutput, error) {
+ if params == nil {
+ params = &SetInstanceProtectionInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "SetInstanceProtection", params, optFns, c.addOperationSetInstanceProtectionMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*SetInstanceProtectionOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type SetInstanceProtectionInput struct {
+
+ // The name of the Auto Scaling group.
+ //
+ // This member is required.
+ AutoScalingGroupName *string
+
+ // One or more instance IDs. You can specify up to 50 instances.
+ //
+ // This member is required.
+ InstanceIds []string
+
+ // Indicates whether the instance is protected from termination by Amazon EC2 Auto
+ // Scaling when scaling in.
+ //
+ // This member is required.
+ ProtectedFromScaleIn *bool
+
+ noSmithyDocumentSerde
+}
+
+type SetInstanceProtectionOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationSetInstanceProtectionMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsAwsquery_serializeOpSetInstanceProtection{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsquery_deserializeOpSetInstanceProtection{}, 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 = addOpSetInstanceProtectionValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSetInstanceProtection(options.Region), middleware.Before); 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_opSetInstanceProtection(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "autoscaling",
+ OperationName: "SetInstanceProtection",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_StartInstanceRefresh.go b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_StartInstanceRefresh.go
new file mode 100644
index 00000000..0fa3fb6f
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_StartInstanceRefresh.go
@@ -0,0 +1,158 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package autoscaling
+
+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/autoscaling/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Starts a new instance refresh operation. An instance refresh performs a rolling
+// replacement of all or some instances in an Auto Scaling group. Each instance is
+// terminated first and then replaced, which temporarily reduces the capacity
+// available within your Auto Scaling group. This operation is part of the instance
+// refresh feature
+// (https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-instance-refresh.html)
+// in Amazon EC2 Auto Scaling, which helps you update instances in your Auto
+// Scaling group. This feature is helpful, for example, when you have a new AMI or
+// a new user data script. You just need to create a new launch template that
+// specifies the new AMI or user data script. Then start an instance refresh to
+// immediately begin the process of updating instances in the group. If the call
+// succeeds, it creates a new instance refresh request with a unique ID that you
+// can use to track its progress. To query its status, call the
+// DescribeInstanceRefreshes API. To describe the instance refreshes that have
+// already run, call the DescribeInstanceRefreshes API. To cancel an instance
+// refresh operation in progress, use the CancelInstanceRefresh API.
+func (c *Client) StartInstanceRefresh(ctx context.Context, params *StartInstanceRefreshInput, optFns ...func(*Options)) (*StartInstanceRefreshOutput, error) {
+ if params == nil {
+ params = &StartInstanceRefreshInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "StartInstanceRefresh", params, optFns, c.addOperationStartInstanceRefreshMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*StartInstanceRefreshOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type StartInstanceRefreshInput struct {
+
+ // The name of the Auto Scaling group.
+ //
+ // This member is required.
+ AutoScalingGroupName *string
+
+ // The desired configuration. For example, the desired configuration can specify a
+ // new launch template or a new version of the current launch template. Once the
+ // instance refresh succeeds, Amazon EC2 Auto Scaling updates the settings of the
+ // Auto Scaling group to reflect the new desired configuration. When you specify a
+ // new launch template or a new version of the current launch template for your
+ // desired configuration, consider enabling the SkipMatching property in
+ // preferences. If it's enabled, Amazon EC2 Auto Scaling skips replacing instances
+ // that already use the specified launch template and version. This can help you
+ // reduce the number of replacements that are required to apply updates.
+ DesiredConfiguration *types.DesiredConfiguration
+
+ // Set of preferences associated with the instance refresh request. If not
+ // provided, the default values are used.
+ Preferences *types.RefreshPreferences
+
+ // The strategy to use for the instance refresh. The only valid value is Rolling. A
+ // rolling update helps you update your instances gradually. A rolling update can
+ // fail due to failed health checks or if instances are on standby or are protected
+ // from scale in. If the rolling update process fails, any instances that are
+ // replaced are not rolled back to their previous configuration.
+ Strategy types.RefreshStrategy
+
+ noSmithyDocumentSerde
+}
+
+type StartInstanceRefreshOutput struct {
+
+ // A unique ID for tracking the progress of the request.
+ InstanceRefreshId *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationStartInstanceRefreshMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsAwsquery_serializeOpStartInstanceRefresh{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsquery_deserializeOpStartInstanceRefresh{}, 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 = addOpStartInstanceRefreshValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStartInstanceRefresh(options.Region), middleware.Before); 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_opStartInstanceRefresh(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "autoscaling",
+ OperationName: "StartInstanceRefresh",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_SuspendProcesses.go b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_SuspendProcesses.go
new file mode 100644
index 00000000..d068d3fe
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_SuspendProcesses.go
@@ -0,0 +1,148 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package autoscaling
+
+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"
+)
+
+// Suspends the specified auto scaling processes, or all processes, for the
+// specified Auto Scaling group. If you suspend either the Launch or Terminate
+// process types, it can prevent other process types from functioning properly. For
+// more information, see Suspending and resuming scaling processes
+// (https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-suspend-resume-processes.html)
+// in the Amazon EC2 Auto Scaling User Guide. To resume processes that have been
+// suspended, call the ResumeProcesses API.
+func (c *Client) SuspendProcesses(ctx context.Context, params *SuspendProcessesInput, optFns ...func(*Options)) (*SuspendProcessesOutput, error) {
+ if params == nil {
+ params = &SuspendProcessesInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "SuspendProcesses", params, optFns, c.addOperationSuspendProcessesMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*SuspendProcessesOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type SuspendProcessesInput struct {
+
+ // The name of the Auto Scaling group.
+ //
+ // This member is required.
+ AutoScalingGroupName *string
+
+ // One or more of the following processes:
+ //
+ // * Launch
+ //
+ // * Terminate
+ //
+ // *
+ // AddToLoadBalancer
+ //
+ // * AlarmNotification
+ //
+ // * AZRebalance
+ //
+ // * HealthCheck
+ //
+ // *
+ // InstanceRefresh
+ //
+ // * ReplaceUnhealthy
+ //
+ // * ScheduledActions
+ //
+ // If you omit this
+ // parameter, all processes are specified.
+ ScalingProcesses []string
+
+ noSmithyDocumentSerde
+}
+
+type SuspendProcessesOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationSuspendProcessesMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsAwsquery_serializeOpSuspendProcesses{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsquery_deserializeOpSuspendProcesses{}, 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 = addOpSuspendProcessesValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSuspendProcesses(options.Region), middleware.Before); 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_opSuspendProcesses(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "autoscaling",
+ OperationName: "SuspendProcesses",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_TerminateInstanceInAutoScalingGroup.go b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_TerminateInstanceInAutoScalingGroup.go
new file mode 100644
index 00000000..bdfef013
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_TerminateInstanceInAutoScalingGroup.go
@@ -0,0 +1,140 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package autoscaling
+
+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/autoscaling/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Terminates the specified instance and optionally adjusts the desired group size.
+// This operation cannot be called on instances in a warm pool. This call simply
+// makes a termination request. The instance is not terminated immediately. When an
+// instance is terminated, the instance status changes to terminated. You can't
+// connect to or start an instance after you've terminated it. If you do not
+// specify the option to decrement the desired capacity, Amazon EC2 Auto Scaling
+// launches instances to replace the ones that are terminated. By default, Amazon
+// EC2 Auto Scaling balances instances across all Availability Zones. If you
+// decrement the desired capacity, your Auto Scaling group can become unbalanced
+// between Availability Zones. Amazon EC2 Auto Scaling tries to rebalance the
+// group, and rebalancing might terminate instances in other zones. For more
+// information, see Rebalancing activities
+// (https://docs.aws.amazon.com/autoscaling/ec2/userguide/auto-scaling-benefits.html#AutoScalingBehavior.InstanceUsage)
+// in the Amazon EC2 Auto Scaling User Guide.
+func (c *Client) TerminateInstanceInAutoScalingGroup(ctx context.Context, params *TerminateInstanceInAutoScalingGroupInput, optFns ...func(*Options)) (*TerminateInstanceInAutoScalingGroupOutput, error) {
+ if params == nil {
+ params = &TerminateInstanceInAutoScalingGroupInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "TerminateInstanceInAutoScalingGroup", params, optFns, c.addOperationTerminateInstanceInAutoScalingGroupMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*TerminateInstanceInAutoScalingGroupOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type TerminateInstanceInAutoScalingGroupInput struct {
+
+ // The ID of the instance.
+ //
+ // This member is required.
+ InstanceId *string
+
+ // Indicates whether terminating the instance also decrements the size of the Auto
+ // Scaling group.
+ //
+ // This member is required.
+ ShouldDecrementDesiredCapacity *bool
+
+ noSmithyDocumentSerde
+}
+
+type TerminateInstanceInAutoScalingGroupOutput struct {
+
+ // A scaling activity.
+ Activity *types.Activity
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationTerminateInstanceInAutoScalingGroupMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsAwsquery_serializeOpTerminateInstanceInAutoScalingGroup{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsquery_deserializeOpTerminateInstanceInAutoScalingGroup{}, 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 = addOpTerminateInstanceInAutoScalingGroupValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opTerminateInstanceInAutoScalingGroup(options.Region), middleware.Before); 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_opTerminateInstanceInAutoScalingGroup(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "autoscaling",
+ OperationName: "TerminateInstanceInAutoScalingGroup",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_UpdateAutoScalingGroup.go b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_UpdateAutoScalingGroup.go
new file mode 100644
index 00000000..b4ba2033
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/api_op_UpdateAutoScalingGroup.go
@@ -0,0 +1,267 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package autoscaling
+
+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/autoscaling/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// We strongly recommend that all Auto Scaling groups use launch templates to
+// ensure full functionality for Amazon EC2 Auto Scaling and Amazon EC2. Updates
+// the configuration for the specified Auto Scaling group. To update an Auto
+// Scaling group, specify the name of the group and the parameter that you want to
+// change. Any parameters that you don't specify are not changed by this update
+// request. The new settings take effect on any scaling activities after this call
+// returns. If you associate a new launch configuration or template with an Auto
+// Scaling group, all new instances will get the updated configuration. Existing
+// instances continue to run with the configuration that they were originally
+// launched with. When you update a group to specify a mixed instances policy
+// instead of a launch configuration or template, existing instances may be
+// replaced to match the new purchasing options that you specified in the policy.
+// For example, if the group currently has 100% On-Demand capacity and the policy
+// specifies 50% Spot capacity, this means that half of your instances will be
+// gradually terminated and relaunched as Spot Instances. When replacing instances,
+// Amazon EC2 Auto Scaling launches new instances before terminating the old ones,
+// so that updating your group does not compromise the performance or availability
+// of your application. Note the following about changing DesiredCapacity, MaxSize,
+// or MinSize:
+//
+// * If a scale-in activity occurs as a result of a new
+// DesiredCapacity value that is lower than the current size of the group, the Auto
+// Scaling group uses its termination policy to determine which instances to
+// terminate.
+//
+// * If you specify a new value for MinSize without specifying a value
+// for DesiredCapacity, and the new MinSize is larger than the current size of the
+// group, this sets the group's DesiredCapacity to the new MinSize value.
+//
+// * If you
+// specify a new value for MaxSize without specifying a value for DesiredCapacity,
+// and the new MaxSize is smaller than the current size of the group, this sets the
+// group's DesiredCapacity to the new MaxSize value.
+//
+// To see which parameters have
+// been set, call the DescribeAutoScalingGroups API. To view the scaling policies
+// for an Auto Scaling group, call the DescribePolicies API. If the group has
+// scaling policies, you can update them by calling the PutScalingPolicy API.
+func (c *Client) UpdateAutoScalingGroup(ctx context.Context, params *UpdateAutoScalingGroupInput, optFns ...func(*Options)) (*UpdateAutoScalingGroupOutput, error) {
+ if params == nil {
+ params = &UpdateAutoScalingGroupInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "UpdateAutoScalingGroup", params, optFns, c.addOperationUpdateAutoScalingGroupMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*UpdateAutoScalingGroupOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type UpdateAutoScalingGroupInput struct {
+
+ // The name of the Auto Scaling group.
+ //
+ // This member is required.
+ AutoScalingGroupName *string
+
+ // One or more Availability Zones for the group.
+ AvailabilityZones []string
+
+ // Enables or disables Capacity Rebalancing. For more information, see Amazon EC2
+ // Auto Scaling Capacity Rebalancing
+ // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/capacity-rebalance.html)
+ // in the Amazon EC2 Auto Scaling User Guide.
+ CapacityRebalance *bool
+
+ // Reserved.
+ Context *string
+
+ // The amount of time, in seconds, after a scaling activity completes before
+ // another scaling activity can start. The default value is 300. This setting
+ // applies when using simple scaling policies, but not when using other scaling
+ // policies or scheduled scaling. For more information, see Scaling cooldowns for
+ // Amazon EC2 Auto Scaling
+ // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/Cooldown.html) in the
+ // Amazon EC2 Auto Scaling User Guide.
+ DefaultCooldown *int32
+
+ // The desired capacity is the initial capacity of the Auto Scaling group after
+ // this operation completes and the capacity it attempts to maintain. This number
+ // must be greater than or equal to the minimum size of the group and less than or
+ // equal to the maximum size of the group.
+ DesiredCapacity *int32
+
+ // The amount of time, in seconds, that Amazon EC2 Auto Scaling waits before
+ // checking the health status of an EC2 instance that has come into service. The
+ // default value is 0. For more information, see Health check grace period
+ // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/healthcheck.html#health-check-grace-period)
+ // in the Amazon EC2 Auto Scaling User Guide. Conditional: Required if you are
+ // adding an ELB health check.
+ HealthCheckGracePeriod *int32
+
+ // The service to use for the health checks. The valid values are EC2 and ELB. If
+ // you configure an Auto Scaling group to use ELB health checks, it considers the
+ // instance unhealthy if it fails either the EC2 status checks or the load balancer
+ // health checks.
+ HealthCheckType *string
+
+ // The name of the launch configuration. If you specify LaunchConfigurationName in
+ // your update request, you can't specify LaunchTemplate or MixedInstancesPolicy.
+ LaunchConfigurationName *string
+
+ // The launch template and version to use to specify the updates. If you specify
+ // LaunchTemplate in your update request, you can't specify LaunchConfigurationName
+ // or MixedInstancesPolicy.
+ LaunchTemplate *types.LaunchTemplateSpecification
+
+ // The maximum amount of time, in seconds, that an instance can be in service. The
+ // default is null. If specified, the value must be either 0 or a number equal to
+ // or greater than 86,400 seconds (1 day). To clear a previously set value, specify
+ // a new value of 0. For more information, see Replacing Auto Scaling instances
+ // based on maximum instance lifetime
+ // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-max-instance-lifetime.html)
+ // in the Amazon EC2 Auto Scaling User Guide.
+ MaxInstanceLifetime *int32
+
+ // The maximum size of the Auto Scaling group. With a mixed instances policy that
+ // uses instance weighting, Amazon EC2 Auto Scaling may need to go above MaxSize to
+ // meet your capacity requirements. In this event, Amazon EC2 Auto Scaling will
+ // never go above MaxSize by more than your largest instance weight (weights that
+ // define how many units each instance contributes to the desired capacity of the
+ // group).
+ MaxSize *int32
+
+ // The minimum size of the Auto Scaling group.
+ MinSize *int32
+
+ // An embedded object that specifies a mixed instances policy. When you make
+ // changes to an existing policy, all optional properties are left unchanged if not
+ // specified. For more information, see Auto Scaling groups with multiple instance
+ // types and purchase options
+ // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-purchase-options.html)
+ // in the Amazon EC2 Auto Scaling User Guide.
+ MixedInstancesPolicy *types.MixedInstancesPolicy
+
+ // Indicates whether newly launched instances are protected from termination by
+ // Amazon EC2 Auto Scaling when scaling in. For more information about preventing
+ // instances from terminating on scale in, see Instance scale-in protection
+ // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-instance-termination.html#instance-protection)
+ // in the Amazon EC2 Auto Scaling User Guide.
+ NewInstancesProtectedFromScaleIn *bool
+
+ // The name of an existing placement group into which to launch your instances, if
+ // any. A placement group is a logical grouping of instances within a single
+ // Availability Zone. You cannot specify multiple Availability Zones and a
+ // placement group. For more information, see Placement Groups
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/placement-groups.html) in
+ // the Amazon EC2 User Guide for Linux Instances.
+ PlacementGroup *string
+
+ // The Amazon Resource Name (ARN) of the service-linked role that the Auto Scaling
+ // group uses to call other Amazon Web Services on your behalf. For more
+ // information, see Service-linked roles
+ // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/autoscaling-service-linked-role.html)
+ // in the Amazon EC2 Auto Scaling User Guide.
+ ServiceLinkedRoleARN *string
+
+ // A policy or a list of policies that are used to select the instances to
+ // terminate. The policies are executed in the order that you list them. For more
+ // information, see Controlling which Auto Scaling instances terminate during scale
+ // in
+ // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-instance-termination.html)
+ // in the Amazon EC2 Auto Scaling User Guide.
+ TerminationPolicies []string
+
+ // A comma-separated list of subnet IDs for a virtual private cloud (VPC). If you
+ // specify VPCZoneIdentifier with AvailabilityZones, the subnets that you specify
+ // for this parameter must reside in those Availability Zones.
+ VPCZoneIdentifier *string
+
+ noSmithyDocumentSerde
+}
+
+type UpdateAutoScalingGroupOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationUpdateAutoScalingGroupMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsAwsquery_serializeOpUpdateAutoScalingGroup{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsquery_deserializeOpUpdateAutoScalingGroup{}, 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 = addOpUpdateAutoScalingGroupValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateAutoScalingGroup(options.Region), middleware.Before); 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_opUpdateAutoScalingGroup(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "autoscaling",
+ OperationName: "UpdateAutoScalingGroup",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/deserializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/deserializers.go
new file mode 100644
index 00000000..21ca2fea
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/deserializers.go
@@ -0,0 +1,16245 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package autoscaling
+
+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/autoscaling/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"
+ "io/ioutil"
+ "strconv"
+ "strings"
+ "time"
+)
+
+type awsAwsquery_deserializeOpAttachInstances struct {
+}
+
+func (*awsAwsquery_deserializeOpAttachInstances) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsquery_deserializeOpAttachInstances) 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, awsAwsquery_deserializeOpErrorAttachInstances(response, &metadata)
+ }
+ output := &AttachInstancesOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsquery_deserializeOpErrorAttachInstances(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("ResourceContention", errorCode):
+ return awsAwsquery_deserializeErrorResourceContentionFault(response, errorBody)
+
+ case strings.EqualFold("ServiceLinkedRoleFailure", errorCode):
+ return awsAwsquery_deserializeErrorServiceLinkedRoleFailure(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsquery_deserializeOpAttachLoadBalancers struct {
+}
+
+func (*awsAwsquery_deserializeOpAttachLoadBalancers) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsquery_deserializeOpAttachLoadBalancers) 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, awsAwsquery_deserializeOpErrorAttachLoadBalancers(response, &metadata)
+ }
+ output := &AttachLoadBalancersOutput{}
+ 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)
+ t, err = decoder.GetElement("AttachLoadBalancersResult")
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ err = awsAwsquery_deserializeOpDocumentAttachLoadBalancersOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsquery_deserializeOpErrorAttachLoadBalancers(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("ResourceContention", errorCode):
+ return awsAwsquery_deserializeErrorResourceContentionFault(response, errorBody)
+
+ case strings.EqualFold("ServiceLinkedRoleFailure", errorCode):
+ return awsAwsquery_deserializeErrorServiceLinkedRoleFailure(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsquery_deserializeOpAttachLoadBalancerTargetGroups struct {
+}
+
+func (*awsAwsquery_deserializeOpAttachLoadBalancerTargetGroups) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsquery_deserializeOpAttachLoadBalancerTargetGroups) 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, awsAwsquery_deserializeOpErrorAttachLoadBalancerTargetGroups(response, &metadata)
+ }
+ output := &AttachLoadBalancerTargetGroupsOutput{}
+ 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)
+ t, err = decoder.GetElement("AttachLoadBalancerTargetGroupsResult")
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ err = awsAwsquery_deserializeOpDocumentAttachLoadBalancerTargetGroupsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsquery_deserializeOpErrorAttachLoadBalancerTargetGroups(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("ResourceContention", errorCode):
+ return awsAwsquery_deserializeErrorResourceContentionFault(response, errorBody)
+
+ case strings.EqualFold("ServiceLinkedRoleFailure", errorCode):
+ return awsAwsquery_deserializeErrorServiceLinkedRoleFailure(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsquery_deserializeOpBatchDeleteScheduledAction struct {
+}
+
+func (*awsAwsquery_deserializeOpBatchDeleteScheduledAction) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsquery_deserializeOpBatchDeleteScheduledAction) 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, awsAwsquery_deserializeOpErrorBatchDeleteScheduledAction(response, &metadata)
+ }
+ output := &BatchDeleteScheduledActionOutput{}
+ 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)
+ t, err = decoder.GetElement("BatchDeleteScheduledActionResult")
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ err = awsAwsquery_deserializeOpDocumentBatchDeleteScheduledActionOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsquery_deserializeOpErrorBatchDeleteScheduledAction(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("ResourceContention", errorCode):
+ return awsAwsquery_deserializeErrorResourceContentionFault(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsquery_deserializeOpBatchPutScheduledUpdateGroupAction struct {
+}
+
+func (*awsAwsquery_deserializeOpBatchPutScheduledUpdateGroupAction) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsquery_deserializeOpBatchPutScheduledUpdateGroupAction) 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, awsAwsquery_deserializeOpErrorBatchPutScheduledUpdateGroupAction(response, &metadata)
+ }
+ output := &BatchPutScheduledUpdateGroupActionOutput{}
+ 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)
+ t, err = decoder.GetElement("BatchPutScheduledUpdateGroupActionResult")
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ err = awsAwsquery_deserializeOpDocumentBatchPutScheduledUpdateGroupActionOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsquery_deserializeOpErrorBatchPutScheduledUpdateGroupAction(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("AlreadyExists", errorCode):
+ return awsAwsquery_deserializeErrorAlreadyExistsFault(response, errorBody)
+
+ case strings.EqualFold("LimitExceeded", errorCode):
+ return awsAwsquery_deserializeErrorLimitExceededFault(response, errorBody)
+
+ case strings.EqualFold("ResourceContention", errorCode):
+ return awsAwsquery_deserializeErrorResourceContentionFault(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsquery_deserializeOpCancelInstanceRefresh struct {
+}
+
+func (*awsAwsquery_deserializeOpCancelInstanceRefresh) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsquery_deserializeOpCancelInstanceRefresh) 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, awsAwsquery_deserializeOpErrorCancelInstanceRefresh(response, &metadata)
+ }
+ output := &CancelInstanceRefreshOutput{}
+ 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)
+ t, err = decoder.GetElement("CancelInstanceRefreshResult")
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ err = awsAwsquery_deserializeOpDocumentCancelInstanceRefreshOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsquery_deserializeOpErrorCancelInstanceRefresh(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("ActiveInstanceRefreshNotFound", errorCode):
+ return awsAwsquery_deserializeErrorActiveInstanceRefreshNotFoundFault(response, errorBody)
+
+ case strings.EqualFold("LimitExceeded", errorCode):
+ return awsAwsquery_deserializeErrorLimitExceededFault(response, errorBody)
+
+ case strings.EqualFold("ResourceContention", errorCode):
+ return awsAwsquery_deserializeErrorResourceContentionFault(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsquery_deserializeOpCompleteLifecycleAction struct {
+}
+
+func (*awsAwsquery_deserializeOpCompleteLifecycleAction) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsquery_deserializeOpCompleteLifecycleAction) 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, awsAwsquery_deserializeOpErrorCompleteLifecycleAction(response, &metadata)
+ }
+ output := &CompleteLifecycleActionOutput{}
+ 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)
+ t, err = decoder.GetElement("CompleteLifecycleActionResult")
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ err = awsAwsquery_deserializeOpDocumentCompleteLifecycleActionOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsquery_deserializeOpErrorCompleteLifecycleAction(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("ResourceContention", errorCode):
+ return awsAwsquery_deserializeErrorResourceContentionFault(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsquery_deserializeOpCreateAutoScalingGroup struct {
+}
+
+func (*awsAwsquery_deserializeOpCreateAutoScalingGroup) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsquery_deserializeOpCreateAutoScalingGroup) 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, awsAwsquery_deserializeOpErrorCreateAutoScalingGroup(response, &metadata)
+ }
+ output := &CreateAutoScalingGroupOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsquery_deserializeOpErrorCreateAutoScalingGroup(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("AlreadyExists", errorCode):
+ return awsAwsquery_deserializeErrorAlreadyExistsFault(response, errorBody)
+
+ case strings.EqualFold("LimitExceeded", errorCode):
+ return awsAwsquery_deserializeErrorLimitExceededFault(response, errorBody)
+
+ case strings.EqualFold("ResourceContention", errorCode):
+ return awsAwsquery_deserializeErrorResourceContentionFault(response, errorBody)
+
+ case strings.EqualFold("ServiceLinkedRoleFailure", errorCode):
+ return awsAwsquery_deserializeErrorServiceLinkedRoleFailure(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsquery_deserializeOpCreateLaunchConfiguration struct {
+}
+
+func (*awsAwsquery_deserializeOpCreateLaunchConfiguration) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsquery_deserializeOpCreateLaunchConfiguration) 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, awsAwsquery_deserializeOpErrorCreateLaunchConfiguration(response, &metadata)
+ }
+ output := &CreateLaunchConfigurationOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsquery_deserializeOpErrorCreateLaunchConfiguration(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("AlreadyExists", errorCode):
+ return awsAwsquery_deserializeErrorAlreadyExistsFault(response, errorBody)
+
+ case strings.EqualFold("LimitExceeded", errorCode):
+ return awsAwsquery_deserializeErrorLimitExceededFault(response, errorBody)
+
+ case strings.EqualFold("ResourceContention", errorCode):
+ return awsAwsquery_deserializeErrorResourceContentionFault(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsquery_deserializeOpCreateOrUpdateTags struct {
+}
+
+func (*awsAwsquery_deserializeOpCreateOrUpdateTags) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsquery_deserializeOpCreateOrUpdateTags) 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, awsAwsquery_deserializeOpErrorCreateOrUpdateTags(response, &metadata)
+ }
+ output := &CreateOrUpdateTagsOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsquery_deserializeOpErrorCreateOrUpdateTags(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("AlreadyExists", errorCode):
+ return awsAwsquery_deserializeErrorAlreadyExistsFault(response, errorBody)
+
+ case strings.EqualFold("LimitExceeded", errorCode):
+ return awsAwsquery_deserializeErrorLimitExceededFault(response, errorBody)
+
+ case strings.EqualFold("ResourceContention", errorCode):
+ return awsAwsquery_deserializeErrorResourceContentionFault(response, errorBody)
+
+ case strings.EqualFold("ResourceInUse", errorCode):
+ return awsAwsquery_deserializeErrorResourceInUseFault(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsquery_deserializeOpDeleteAutoScalingGroup struct {
+}
+
+func (*awsAwsquery_deserializeOpDeleteAutoScalingGroup) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsquery_deserializeOpDeleteAutoScalingGroup) 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, awsAwsquery_deserializeOpErrorDeleteAutoScalingGroup(response, &metadata)
+ }
+ output := &DeleteAutoScalingGroupOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsquery_deserializeOpErrorDeleteAutoScalingGroup(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("ResourceContention", errorCode):
+ return awsAwsquery_deserializeErrorResourceContentionFault(response, errorBody)
+
+ case strings.EqualFold("ResourceInUse", errorCode):
+ return awsAwsquery_deserializeErrorResourceInUseFault(response, errorBody)
+
+ case strings.EqualFold("ScalingActivityInProgress", errorCode):
+ return awsAwsquery_deserializeErrorScalingActivityInProgressFault(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsquery_deserializeOpDeleteLaunchConfiguration struct {
+}
+
+func (*awsAwsquery_deserializeOpDeleteLaunchConfiguration) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsquery_deserializeOpDeleteLaunchConfiguration) 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, awsAwsquery_deserializeOpErrorDeleteLaunchConfiguration(response, &metadata)
+ }
+ output := &DeleteLaunchConfigurationOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsquery_deserializeOpErrorDeleteLaunchConfiguration(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("ResourceContention", errorCode):
+ return awsAwsquery_deserializeErrorResourceContentionFault(response, errorBody)
+
+ case strings.EqualFold("ResourceInUse", errorCode):
+ return awsAwsquery_deserializeErrorResourceInUseFault(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsquery_deserializeOpDeleteLifecycleHook struct {
+}
+
+func (*awsAwsquery_deserializeOpDeleteLifecycleHook) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsquery_deserializeOpDeleteLifecycleHook) 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, awsAwsquery_deserializeOpErrorDeleteLifecycleHook(response, &metadata)
+ }
+ output := &DeleteLifecycleHookOutput{}
+ 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)
+ t, err = decoder.GetElement("DeleteLifecycleHookResult")
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ err = awsAwsquery_deserializeOpDocumentDeleteLifecycleHookOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsquery_deserializeOpErrorDeleteLifecycleHook(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("ResourceContention", errorCode):
+ return awsAwsquery_deserializeErrorResourceContentionFault(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsquery_deserializeOpDeleteNotificationConfiguration struct {
+}
+
+func (*awsAwsquery_deserializeOpDeleteNotificationConfiguration) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsquery_deserializeOpDeleteNotificationConfiguration) 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, awsAwsquery_deserializeOpErrorDeleteNotificationConfiguration(response, &metadata)
+ }
+ output := &DeleteNotificationConfigurationOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsquery_deserializeOpErrorDeleteNotificationConfiguration(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("ResourceContention", errorCode):
+ return awsAwsquery_deserializeErrorResourceContentionFault(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsquery_deserializeOpDeletePolicy struct {
+}
+
+func (*awsAwsquery_deserializeOpDeletePolicy) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsquery_deserializeOpDeletePolicy) 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, awsAwsquery_deserializeOpErrorDeletePolicy(response, &metadata)
+ }
+ output := &DeletePolicyOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsquery_deserializeOpErrorDeletePolicy(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("ResourceContention", errorCode):
+ return awsAwsquery_deserializeErrorResourceContentionFault(response, errorBody)
+
+ case strings.EqualFold("ServiceLinkedRoleFailure", errorCode):
+ return awsAwsquery_deserializeErrorServiceLinkedRoleFailure(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsquery_deserializeOpDeleteScheduledAction struct {
+}
+
+func (*awsAwsquery_deserializeOpDeleteScheduledAction) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsquery_deserializeOpDeleteScheduledAction) 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, awsAwsquery_deserializeOpErrorDeleteScheduledAction(response, &metadata)
+ }
+ output := &DeleteScheduledActionOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsquery_deserializeOpErrorDeleteScheduledAction(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("ResourceContention", errorCode):
+ return awsAwsquery_deserializeErrorResourceContentionFault(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsquery_deserializeOpDeleteTags struct {
+}
+
+func (*awsAwsquery_deserializeOpDeleteTags) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsquery_deserializeOpDeleteTags) 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, awsAwsquery_deserializeOpErrorDeleteTags(response, &metadata)
+ }
+ output := &DeleteTagsOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsquery_deserializeOpErrorDeleteTags(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("ResourceContention", errorCode):
+ return awsAwsquery_deserializeErrorResourceContentionFault(response, errorBody)
+
+ case strings.EqualFold("ResourceInUse", errorCode):
+ return awsAwsquery_deserializeErrorResourceInUseFault(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsquery_deserializeOpDeleteWarmPool struct {
+}
+
+func (*awsAwsquery_deserializeOpDeleteWarmPool) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsquery_deserializeOpDeleteWarmPool) 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, awsAwsquery_deserializeOpErrorDeleteWarmPool(response, &metadata)
+ }
+ output := &DeleteWarmPoolOutput{}
+ 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)
+ t, err = decoder.GetElement("DeleteWarmPoolResult")
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ err = awsAwsquery_deserializeOpDocumentDeleteWarmPoolOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsquery_deserializeOpErrorDeleteWarmPool(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("LimitExceeded", errorCode):
+ return awsAwsquery_deserializeErrorLimitExceededFault(response, errorBody)
+
+ case strings.EqualFold("ResourceContention", errorCode):
+ return awsAwsquery_deserializeErrorResourceContentionFault(response, errorBody)
+
+ case strings.EqualFold("ResourceInUse", errorCode):
+ return awsAwsquery_deserializeErrorResourceInUseFault(response, errorBody)
+
+ case strings.EqualFold("ScalingActivityInProgress", errorCode):
+ return awsAwsquery_deserializeErrorScalingActivityInProgressFault(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsquery_deserializeOpDescribeAccountLimits struct {
+}
+
+func (*awsAwsquery_deserializeOpDescribeAccountLimits) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsquery_deserializeOpDescribeAccountLimits) 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, awsAwsquery_deserializeOpErrorDescribeAccountLimits(response, &metadata)
+ }
+ output := &DescribeAccountLimitsOutput{}
+ 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)
+ t, err = decoder.GetElement("DescribeAccountLimitsResult")
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ err = awsAwsquery_deserializeOpDocumentDescribeAccountLimitsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsquery_deserializeOpErrorDescribeAccountLimits(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("ResourceContention", errorCode):
+ return awsAwsquery_deserializeErrorResourceContentionFault(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsquery_deserializeOpDescribeAdjustmentTypes struct {
+}
+
+func (*awsAwsquery_deserializeOpDescribeAdjustmentTypes) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsquery_deserializeOpDescribeAdjustmentTypes) 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, awsAwsquery_deserializeOpErrorDescribeAdjustmentTypes(response, &metadata)
+ }
+ output := &DescribeAdjustmentTypesOutput{}
+ 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)
+ t, err = decoder.GetElement("DescribeAdjustmentTypesResult")
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ err = awsAwsquery_deserializeOpDocumentDescribeAdjustmentTypesOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsquery_deserializeOpErrorDescribeAdjustmentTypes(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("ResourceContention", errorCode):
+ return awsAwsquery_deserializeErrorResourceContentionFault(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsquery_deserializeOpDescribeAutoScalingGroups struct {
+}
+
+func (*awsAwsquery_deserializeOpDescribeAutoScalingGroups) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsquery_deserializeOpDescribeAutoScalingGroups) 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, awsAwsquery_deserializeOpErrorDescribeAutoScalingGroups(response, &metadata)
+ }
+ output := &DescribeAutoScalingGroupsOutput{}
+ 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)
+ t, err = decoder.GetElement("DescribeAutoScalingGroupsResult")
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ err = awsAwsquery_deserializeOpDocumentDescribeAutoScalingGroupsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsquery_deserializeOpErrorDescribeAutoScalingGroups(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("InvalidNextToken", errorCode):
+ return awsAwsquery_deserializeErrorInvalidNextToken(response, errorBody)
+
+ case strings.EqualFold("ResourceContention", errorCode):
+ return awsAwsquery_deserializeErrorResourceContentionFault(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsquery_deserializeOpDescribeAutoScalingInstances struct {
+}
+
+func (*awsAwsquery_deserializeOpDescribeAutoScalingInstances) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsquery_deserializeOpDescribeAutoScalingInstances) 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, awsAwsquery_deserializeOpErrorDescribeAutoScalingInstances(response, &metadata)
+ }
+ output := &DescribeAutoScalingInstancesOutput{}
+ 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)
+ t, err = decoder.GetElement("DescribeAutoScalingInstancesResult")
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ err = awsAwsquery_deserializeOpDocumentDescribeAutoScalingInstancesOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsquery_deserializeOpErrorDescribeAutoScalingInstances(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("InvalidNextToken", errorCode):
+ return awsAwsquery_deserializeErrorInvalidNextToken(response, errorBody)
+
+ case strings.EqualFold("ResourceContention", errorCode):
+ return awsAwsquery_deserializeErrorResourceContentionFault(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsquery_deserializeOpDescribeAutoScalingNotificationTypes struct {
+}
+
+func (*awsAwsquery_deserializeOpDescribeAutoScalingNotificationTypes) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsquery_deserializeOpDescribeAutoScalingNotificationTypes) 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, awsAwsquery_deserializeOpErrorDescribeAutoScalingNotificationTypes(response, &metadata)
+ }
+ output := &DescribeAutoScalingNotificationTypesOutput{}
+ 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)
+ t, err = decoder.GetElement("DescribeAutoScalingNotificationTypesResult")
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ err = awsAwsquery_deserializeOpDocumentDescribeAutoScalingNotificationTypesOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsquery_deserializeOpErrorDescribeAutoScalingNotificationTypes(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("ResourceContention", errorCode):
+ return awsAwsquery_deserializeErrorResourceContentionFault(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsquery_deserializeOpDescribeInstanceRefreshes struct {
+}
+
+func (*awsAwsquery_deserializeOpDescribeInstanceRefreshes) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsquery_deserializeOpDescribeInstanceRefreshes) 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, awsAwsquery_deserializeOpErrorDescribeInstanceRefreshes(response, &metadata)
+ }
+ output := &DescribeInstanceRefreshesOutput{}
+ 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)
+ t, err = decoder.GetElement("DescribeInstanceRefreshesResult")
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ err = awsAwsquery_deserializeOpDocumentDescribeInstanceRefreshesOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsquery_deserializeOpErrorDescribeInstanceRefreshes(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("InvalidNextToken", errorCode):
+ return awsAwsquery_deserializeErrorInvalidNextToken(response, errorBody)
+
+ case strings.EqualFold("ResourceContention", errorCode):
+ return awsAwsquery_deserializeErrorResourceContentionFault(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsquery_deserializeOpDescribeLaunchConfigurations struct {
+}
+
+func (*awsAwsquery_deserializeOpDescribeLaunchConfigurations) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsquery_deserializeOpDescribeLaunchConfigurations) 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, awsAwsquery_deserializeOpErrorDescribeLaunchConfigurations(response, &metadata)
+ }
+ output := &DescribeLaunchConfigurationsOutput{}
+ 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)
+ t, err = decoder.GetElement("DescribeLaunchConfigurationsResult")
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ err = awsAwsquery_deserializeOpDocumentDescribeLaunchConfigurationsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsquery_deserializeOpErrorDescribeLaunchConfigurations(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("InvalidNextToken", errorCode):
+ return awsAwsquery_deserializeErrorInvalidNextToken(response, errorBody)
+
+ case strings.EqualFold("ResourceContention", errorCode):
+ return awsAwsquery_deserializeErrorResourceContentionFault(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsquery_deserializeOpDescribeLifecycleHooks struct {
+}
+
+func (*awsAwsquery_deserializeOpDescribeLifecycleHooks) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsquery_deserializeOpDescribeLifecycleHooks) 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, awsAwsquery_deserializeOpErrorDescribeLifecycleHooks(response, &metadata)
+ }
+ output := &DescribeLifecycleHooksOutput{}
+ 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)
+ t, err = decoder.GetElement("DescribeLifecycleHooksResult")
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ err = awsAwsquery_deserializeOpDocumentDescribeLifecycleHooksOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsquery_deserializeOpErrorDescribeLifecycleHooks(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("ResourceContention", errorCode):
+ return awsAwsquery_deserializeErrorResourceContentionFault(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsquery_deserializeOpDescribeLifecycleHookTypes struct {
+}
+
+func (*awsAwsquery_deserializeOpDescribeLifecycleHookTypes) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsquery_deserializeOpDescribeLifecycleHookTypes) 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, awsAwsquery_deserializeOpErrorDescribeLifecycleHookTypes(response, &metadata)
+ }
+ output := &DescribeLifecycleHookTypesOutput{}
+ 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)
+ t, err = decoder.GetElement("DescribeLifecycleHookTypesResult")
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ err = awsAwsquery_deserializeOpDocumentDescribeLifecycleHookTypesOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsquery_deserializeOpErrorDescribeLifecycleHookTypes(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("ResourceContention", errorCode):
+ return awsAwsquery_deserializeErrorResourceContentionFault(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsquery_deserializeOpDescribeLoadBalancers struct {
+}
+
+func (*awsAwsquery_deserializeOpDescribeLoadBalancers) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsquery_deserializeOpDescribeLoadBalancers) 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, awsAwsquery_deserializeOpErrorDescribeLoadBalancers(response, &metadata)
+ }
+ output := &DescribeLoadBalancersOutput{}
+ 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)
+ t, err = decoder.GetElement("DescribeLoadBalancersResult")
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ err = awsAwsquery_deserializeOpDocumentDescribeLoadBalancersOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsquery_deserializeOpErrorDescribeLoadBalancers(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("ResourceContention", errorCode):
+ return awsAwsquery_deserializeErrorResourceContentionFault(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsquery_deserializeOpDescribeLoadBalancerTargetGroups struct {
+}
+
+func (*awsAwsquery_deserializeOpDescribeLoadBalancerTargetGroups) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsquery_deserializeOpDescribeLoadBalancerTargetGroups) 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, awsAwsquery_deserializeOpErrorDescribeLoadBalancerTargetGroups(response, &metadata)
+ }
+ output := &DescribeLoadBalancerTargetGroupsOutput{}
+ 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)
+ t, err = decoder.GetElement("DescribeLoadBalancerTargetGroupsResult")
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ err = awsAwsquery_deserializeOpDocumentDescribeLoadBalancerTargetGroupsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsquery_deserializeOpErrorDescribeLoadBalancerTargetGroups(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("ResourceContention", errorCode):
+ return awsAwsquery_deserializeErrorResourceContentionFault(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsquery_deserializeOpDescribeMetricCollectionTypes struct {
+}
+
+func (*awsAwsquery_deserializeOpDescribeMetricCollectionTypes) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsquery_deserializeOpDescribeMetricCollectionTypes) 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, awsAwsquery_deserializeOpErrorDescribeMetricCollectionTypes(response, &metadata)
+ }
+ output := &DescribeMetricCollectionTypesOutput{}
+ 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)
+ t, err = decoder.GetElement("DescribeMetricCollectionTypesResult")
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ err = awsAwsquery_deserializeOpDocumentDescribeMetricCollectionTypesOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsquery_deserializeOpErrorDescribeMetricCollectionTypes(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("ResourceContention", errorCode):
+ return awsAwsquery_deserializeErrorResourceContentionFault(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsquery_deserializeOpDescribeNotificationConfigurations struct {
+}
+
+func (*awsAwsquery_deserializeOpDescribeNotificationConfigurations) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsquery_deserializeOpDescribeNotificationConfigurations) 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, awsAwsquery_deserializeOpErrorDescribeNotificationConfigurations(response, &metadata)
+ }
+ output := &DescribeNotificationConfigurationsOutput{}
+ 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)
+ t, err = decoder.GetElement("DescribeNotificationConfigurationsResult")
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ err = awsAwsquery_deserializeOpDocumentDescribeNotificationConfigurationsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsquery_deserializeOpErrorDescribeNotificationConfigurations(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("InvalidNextToken", errorCode):
+ return awsAwsquery_deserializeErrorInvalidNextToken(response, errorBody)
+
+ case strings.EqualFold("ResourceContention", errorCode):
+ return awsAwsquery_deserializeErrorResourceContentionFault(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsquery_deserializeOpDescribePolicies struct {
+}
+
+func (*awsAwsquery_deserializeOpDescribePolicies) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsquery_deserializeOpDescribePolicies) 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, awsAwsquery_deserializeOpErrorDescribePolicies(response, &metadata)
+ }
+ output := &DescribePoliciesOutput{}
+ 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)
+ t, err = decoder.GetElement("DescribePoliciesResult")
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ err = awsAwsquery_deserializeOpDocumentDescribePoliciesOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsquery_deserializeOpErrorDescribePolicies(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("InvalidNextToken", errorCode):
+ return awsAwsquery_deserializeErrorInvalidNextToken(response, errorBody)
+
+ case strings.EqualFold("ResourceContention", errorCode):
+ return awsAwsquery_deserializeErrorResourceContentionFault(response, errorBody)
+
+ case strings.EqualFold("ServiceLinkedRoleFailure", errorCode):
+ return awsAwsquery_deserializeErrorServiceLinkedRoleFailure(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsquery_deserializeOpDescribeScalingActivities struct {
+}
+
+func (*awsAwsquery_deserializeOpDescribeScalingActivities) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsquery_deserializeOpDescribeScalingActivities) 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, awsAwsquery_deserializeOpErrorDescribeScalingActivities(response, &metadata)
+ }
+ output := &DescribeScalingActivitiesOutput{}
+ 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)
+ t, err = decoder.GetElement("DescribeScalingActivitiesResult")
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ err = awsAwsquery_deserializeOpDocumentDescribeScalingActivitiesOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsquery_deserializeOpErrorDescribeScalingActivities(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("InvalidNextToken", errorCode):
+ return awsAwsquery_deserializeErrorInvalidNextToken(response, errorBody)
+
+ case strings.EqualFold("ResourceContention", errorCode):
+ return awsAwsquery_deserializeErrorResourceContentionFault(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsquery_deserializeOpDescribeScalingProcessTypes struct {
+}
+
+func (*awsAwsquery_deserializeOpDescribeScalingProcessTypes) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsquery_deserializeOpDescribeScalingProcessTypes) 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, awsAwsquery_deserializeOpErrorDescribeScalingProcessTypes(response, &metadata)
+ }
+ output := &DescribeScalingProcessTypesOutput{}
+ 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)
+ t, err = decoder.GetElement("DescribeScalingProcessTypesResult")
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ err = awsAwsquery_deserializeOpDocumentDescribeScalingProcessTypesOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsquery_deserializeOpErrorDescribeScalingProcessTypes(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("ResourceContention", errorCode):
+ return awsAwsquery_deserializeErrorResourceContentionFault(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsquery_deserializeOpDescribeScheduledActions struct {
+}
+
+func (*awsAwsquery_deserializeOpDescribeScheduledActions) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsquery_deserializeOpDescribeScheduledActions) 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, awsAwsquery_deserializeOpErrorDescribeScheduledActions(response, &metadata)
+ }
+ output := &DescribeScheduledActionsOutput{}
+ 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)
+ t, err = decoder.GetElement("DescribeScheduledActionsResult")
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ err = awsAwsquery_deserializeOpDocumentDescribeScheduledActionsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsquery_deserializeOpErrorDescribeScheduledActions(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("InvalidNextToken", errorCode):
+ return awsAwsquery_deserializeErrorInvalidNextToken(response, errorBody)
+
+ case strings.EqualFold("ResourceContention", errorCode):
+ return awsAwsquery_deserializeErrorResourceContentionFault(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsquery_deserializeOpDescribeTags struct {
+}
+
+func (*awsAwsquery_deserializeOpDescribeTags) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsquery_deserializeOpDescribeTags) 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, awsAwsquery_deserializeOpErrorDescribeTags(response, &metadata)
+ }
+ output := &DescribeTagsOutput{}
+ 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)
+ t, err = decoder.GetElement("DescribeTagsResult")
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ err = awsAwsquery_deserializeOpDocumentDescribeTagsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsquery_deserializeOpErrorDescribeTags(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("InvalidNextToken", errorCode):
+ return awsAwsquery_deserializeErrorInvalidNextToken(response, errorBody)
+
+ case strings.EqualFold("ResourceContention", errorCode):
+ return awsAwsquery_deserializeErrorResourceContentionFault(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsquery_deserializeOpDescribeTerminationPolicyTypes struct {
+}
+
+func (*awsAwsquery_deserializeOpDescribeTerminationPolicyTypes) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsquery_deserializeOpDescribeTerminationPolicyTypes) 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, awsAwsquery_deserializeOpErrorDescribeTerminationPolicyTypes(response, &metadata)
+ }
+ output := &DescribeTerminationPolicyTypesOutput{}
+ 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)
+ t, err = decoder.GetElement("DescribeTerminationPolicyTypesResult")
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ err = awsAwsquery_deserializeOpDocumentDescribeTerminationPolicyTypesOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsquery_deserializeOpErrorDescribeTerminationPolicyTypes(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("ResourceContention", errorCode):
+ return awsAwsquery_deserializeErrorResourceContentionFault(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsquery_deserializeOpDescribeWarmPool struct {
+}
+
+func (*awsAwsquery_deserializeOpDescribeWarmPool) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsquery_deserializeOpDescribeWarmPool) 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, awsAwsquery_deserializeOpErrorDescribeWarmPool(response, &metadata)
+ }
+ output := &DescribeWarmPoolOutput{}
+ 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)
+ t, err = decoder.GetElement("DescribeWarmPoolResult")
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ err = awsAwsquery_deserializeOpDocumentDescribeWarmPoolOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsquery_deserializeOpErrorDescribeWarmPool(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("InvalidNextToken", errorCode):
+ return awsAwsquery_deserializeErrorInvalidNextToken(response, errorBody)
+
+ case strings.EqualFold("LimitExceeded", errorCode):
+ return awsAwsquery_deserializeErrorLimitExceededFault(response, errorBody)
+
+ case strings.EqualFold("ResourceContention", errorCode):
+ return awsAwsquery_deserializeErrorResourceContentionFault(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsquery_deserializeOpDetachInstances struct {
+}
+
+func (*awsAwsquery_deserializeOpDetachInstances) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsquery_deserializeOpDetachInstances) 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, awsAwsquery_deserializeOpErrorDetachInstances(response, &metadata)
+ }
+ output := &DetachInstancesOutput{}
+ 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)
+ t, err = decoder.GetElement("DetachInstancesResult")
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ err = awsAwsquery_deserializeOpDocumentDetachInstancesOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsquery_deserializeOpErrorDetachInstances(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("ResourceContention", errorCode):
+ return awsAwsquery_deserializeErrorResourceContentionFault(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsquery_deserializeOpDetachLoadBalancers struct {
+}
+
+func (*awsAwsquery_deserializeOpDetachLoadBalancers) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsquery_deserializeOpDetachLoadBalancers) 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, awsAwsquery_deserializeOpErrorDetachLoadBalancers(response, &metadata)
+ }
+ output := &DetachLoadBalancersOutput{}
+ 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)
+ t, err = decoder.GetElement("DetachLoadBalancersResult")
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ err = awsAwsquery_deserializeOpDocumentDetachLoadBalancersOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsquery_deserializeOpErrorDetachLoadBalancers(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("ResourceContention", errorCode):
+ return awsAwsquery_deserializeErrorResourceContentionFault(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsquery_deserializeOpDetachLoadBalancerTargetGroups struct {
+}
+
+func (*awsAwsquery_deserializeOpDetachLoadBalancerTargetGroups) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsquery_deserializeOpDetachLoadBalancerTargetGroups) 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, awsAwsquery_deserializeOpErrorDetachLoadBalancerTargetGroups(response, &metadata)
+ }
+ output := &DetachLoadBalancerTargetGroupsOutput{}
+ 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)
+ t, err = decoder.GetElement("DetachLoadBalancerTargetGroupsResult")
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ err = awsAwsquery_deserializeOpDocumentDetachLoadBalancerTargetGroupsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsquery_deserializeOpErrorDetachLoadBalancerTargetGroups(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("ResourceContention", errorCode):
+ return awsAwsquery_deserializeErrorResourceContentionFault(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsquery_deserializeOpDisableMetricsCollection struct {
+}
+
+func (*awsAwsquery_deserializeOpDisableMetricsCollection) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsquery_deserializeOpDisableMetricsCollection) 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, awsAwsquery_deserializeOpErrorDisableMetricsCollection(response, &metadata)
+ }
+ output := &DisableMetricsCollectionOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsquery_deserializeOpErrorDisableMetricsCollection(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("ResourceContention", errorCode):
+ return awsAwsquery_deserializeErrorResourceContentionFault(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsquery_deserializeOpEnableMetricsCollection struct {
+}
+
+func (*awsAwsquery_deserializeOpEnableMetricsCollection) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsquery_deserializeOpEnableMetricsCollection) 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, awsAwsquery_deserializeOpErrorEnableMetricsCollection(response, &metadata)
+ }
+ output := &EnableMetricsCollectionOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsquery_deserializeOpErrorEnableMetricsCollection(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("ResourceContention", errorCode):
+ return awsAwsquery_deserializeErrorResourceContentionFault(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsquery_deserializeOpEnterStandby struct {
+}
+
+func (*awsAwsquery_deserializeOpEnterStandby) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsquery_deserializeOpEnterStandby) 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, awsAwsquery_deserializeOpErrorEnterStandby(response, &metadata)
+ }
+ output := &EnterStandbyOutput{}
+ 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)
+ t, err = decoder.GetElement("EnterStandbyResult")
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ err = awsAwsquery_deserializeOpDocumentEnterStandbyOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsquery_deserializeOpErrorEnterStandby(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("ResourceContention", errorCode):
+ return awsAwsquery_deserializeErrorResourceContentionFault(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsquery_deserializeOpExecutePolicy struct {
+}
+
+func (*awsAwsquery_deserializeOpExecutePolicy) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsquery_deserializeOpExecutePolicy) 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, awsAwsquery_deserializeOpErrorExecutePolicy(response, &metadata)
+ }
+ output := &ExecutePolicyOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsquery_deserializeOpErrorExecutePolicy(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("ResourceContention", errorCode):
+ return awsAwsquery_deserializeErrorResourceContentionFault(response, errorBody)
+
+ case strings.EqualFold("ScalingActivityInProgress", errorCode):
+ return awsAwsquery_deserializeErrorScalingActivityInProgressFault(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsquery_deserializeOpExitStandby struct {
+}
+
+func (*awsAwsquery_deserializeOpExitStandby) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsquery_deserializeOpExitStandby) 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, awsAwsquery_deserializeOpErrorExitStandby(response, &metadata)
+ }
+ output := &ExitStandbyOutput{}
+ 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)
+ t, err = decoder.GetElement("ExitStandbyResult")
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ err = awsAwsquery_deserializeOpDocumentExitStandbyOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsquery_deserializeOpErrorExitStandby(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("ResourceContention", errorCode):
+ return awsAwsquery_deserializeErrorResourceContentionFault(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsquery_deserializeOpGetPredictiveScalingForecast struct {
+}
+
+func (*awsAwsquery_deserializeOpGetPredictiveScalingForecast) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsquery_deserializeOpGetPredictiveScalingForecast) 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, awsAwsquery_deserializeOpErrorGetPredictiveScalingForecast(response, &metadata)
+ }
+ output := &GetPredictiveScalingForecastOutput{}
+ 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)
+ t, err = decoder.GetElement("GetPredictiveScalingForecastResult")
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ err = awsAwsquery_deserializeOpDocumentGetPredictiveScalingForecastOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsquery_deserializeOpErrorGetPredictiveScalingForecast(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("ResourceContention", errorCode):
+ return awsAwsquery_deserializeErrorResourceContentionFault(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsquery_deserializeOpPutLifecycleHook struct {
+}
+
+func (*awsAwsquery_deserializeOpPutLifecycleHook) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsquery_deserializeOpPutLifecycleHook) 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, awsAwsquery_deserializeOpErrorPutLifecycleHook(response, &metadata)
+ }
+ output := &PutLifecycleHookOutput{}
+ 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)
+ t, err = decoder.GetElement("PutLifecycleHookResult")
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ err = awsAwsquery_deserializeOpDocumentPutLifecycleHookOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsquery_deserializeOpErrorPutLifecycleHook(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("LimitExceeded", errorCode):
+ return awsAwsquery_deserializeErrorLimitExceededFault(response, errorBody)
+
+ case strings.EqualFold("ResourceContention", errorCode):
+ return awsAwsquery_deserializeErrorResourceContentionFault(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsquery_deserializeOpPutNotificationConfiguration struct {
+}
+
+func (*awsAwsquery_deserializeOpPutNotificationConfiguration) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsquery_deserializeOpPutNotificationConfiguration) 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, awsAwsquery_deserializeOpErrorPutNotificationConfiguration(response, &metadata)
+ }
+ output := &PutNotificationConfigurationOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsquery_deserializeOpErrorPutNotificationConfiguration(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("LimitExceeded", errorCode):
+ return awsAwsquery_deserializeErrorLimitExceededFault(response, errorBody)
+
+ case strings.EqualFold("ResourceContention", errorCode):
+ return awsAwsquery_deserializeErrorResourceContentionFault(response, errorBody)
+
+ case strings.EqualFold("ServiceLinkedRoleFailure", errorCode):
+ return awsAwsquery_deserializeErrorServiceLinkedRoleFailure(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsquery_deserializeOpPutScalingPolicy struct {
+}
+
+func (*awsAwsquery_deserializeOpPutScalingPolicy) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsquery_deserializeOpPutScalingPolicy) 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, awsAwsquery_deserializeOpErrorPutScalingPolicy(response, &metadata)
+ }
+ output := &PutScalingPolicyOutput{}
+ 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)
+ t, err = decoder.GetElement("PutScalingPolicyResult")
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ err = awsAwsquery_deserializeOpDocumentPutScalingPolicyOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsquery_deserializeOpErrorPutScalingPolicy(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("LimitExceeded", errorCode):
+ return awsAwsquery_deserializeErrorLimitExceededFault(response, errorBody)
+
+ case strings.EqualFold("ResourceContention", errorCode):
+ return awsAwsquery_deserializeErrorResourceContentionFault(response, errorBody)
+
+ case strings.EqualFold("ServiceLinkedRoleFailure", errorCode):
+ return awsAwsquery_deserializeErrorServiceLinkedRoleFailure(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsquery_deserializeOpPutScheduledUpdateGroupAction struct {
+}
+
+func (*awsAwsquery_deserializeOpPutScheduledUpdateGroupAction) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsquery_deserializeOpPutScheduledUpdateGroupAction) 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, awsAwsquery_deserializeOpErrorPutScheduledUpdateGroupAction(response, &metadata)
+ }
+ output := &PutScheduledUpdateGroupActionOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsquery_deserializeOpErrorPutScheduledUpdateGroupAction(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("AlreadyExists", errorCode):
+ return awsAwsquery_deserializeErrorAlreadyExistsFault(response, errorBody)
+
+ case strings.EqualFold("LimitExceeded", errorCode):
+ return awsAwsquery_deserializeErrorLimitExceededFault(response, errorBody)
+
+ case strings.EqualFold("ResourceContention", errorCode):
+ return awsAwsquery_deserializeErrorResourceContentionFault(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsquery_deserializeOpPutWarmPool struct {
+}
+
+func (*awsAwsquery_deserializeOpPutWarmPool) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsquery_deserializeOpPutWarmPool) 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, awsAwsquery_deserializeOpErrorPutWarmPool(response, &metadata)
+ }
+ output := &PutWarmPoolOutput{}
+ 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)
+ t, err = decoder.GetElement("PutWarmPoolResult")
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ err = awsAwsquery_deserializeOpDocumentPutWarmPoolOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsquery_deserializeOpErrorPutWarmPool(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("LimitExceeded", errorCode):
+ return awsAwsquery_deserializeErrorLimitExceededFault(response, errorBody)
+
+ case strings.EqualFold("ResourceContention", errorCode):
+ return awsAwsquery_deserializeErrorResourceContentionFault(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsquery_deserializeOpRecordLifecycleActionHeartbeat struct {
+}
+
+func (*awsAwsquery_deserializeOpRecordLifecycleActionHeartbeat) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsquery_deserializeOpRecordLifecycleActionHeartbeat) 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, awsAwsquery_deserializeOpErrorRecordLifecycleActionHeartbeat(response, &metadata)
+ }
+ output := &RecordLifecycleActionHeartbeatOutput{}
+ 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)
+ t, err = decoder.GetElement("RecordLifecycleActionHeartbeatResult")
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ err = awsAwsquery_deserializeOpDocumentRecordLifecycleActionHeartbeatOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsquery_deserializeOpErrorRecordLifecycleActionHeartbeat(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("ResourceContention", errorCode):
+ return awsAwsquery_deserializeErrorResourceContentionFault(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsquery_deserializeOpResumeProcesses struct {
+}
+
+func (*awsAwsquery_deserializeOpResumeProcesses) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsquery_deserializeOpResumeProcesses) 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, awsAwsquery_deserializeOpErrorResumeProcesses(response, &metadata)
+ }
+ output := &ResumeProcessesOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsquery_deserializeOpErrorResumeProcesses(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("ResourceContention", errorCode):
+ return awsAwsquery_deserializeErrorResourceContentionFault(response, errorBody)
+
+ case strings.EqualFold("ResourceInUse", errorCode):
+ return awsAwsquery_deserializeErrorResourceInUseFault(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsquery_deserializeOpSetDesiredCapacity struct {
+}
+
+func (*awsAwsquery_deserializeOpSetDesiredCapacity) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsquery_deserializeOpSetDesiredCapacity) 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, awsAwsquery_deserializeOpErrorSetDesiredCapacity(response, &metadata)
+ }
+ output := &SetDesiredCapacityOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsquery_deserializeOpErrorSetDesiredCapacity(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("ResourceContention", errorCode):
+ return awsAwsquery_deserializeErrorResourceContentionFault(response, errorBody)
+
+ case strings.EqualFold("ScalingActivityInProgress", errorCode):
+ return awsAwsquery_deserializeErrorScalingActivityInProgressFault(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsquery_deserializeOpSetInstanceHealth struct {
+}
+
+func (*awsAwsquery_deserializeOpSetInstanceHealth) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsquery_deserializeOpSetInstanceHealth) 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, awsAwsquery_deserializeOpErrorSetInstanceHealth(response, &metadata)
+ }
+ output := &SetInstanceHealthOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsquery_deserializeOpErrorSetInstanceHealth(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("ResourceContention", errorCode):
+ return awsAwsquery_deserializeErrorResourceContentionFault(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsquery_deserializeOpSetInstanceProtection struct {
+}
+
+func (*awsAwsquery_deserializeOpSetInstanceProtection) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsquery_deserializeOpSetInstanceProtection) 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, awsAwsquery_deserializeOpErrorSetInstanceProtection(response, &metadata)
+ }
+ output := &SetInstanceProtectionOutput{}
+ 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)
+ t, err = decoder.GetElement("SetInstanceProtectionResult")
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ err = awsAwsquery_deserializeOpDocumentSetInstanceProtectionOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsquery_deserializeOpErrorSetInstanceProtection(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("LimitExceeded", errorCode):
+ return awsAwsquery_deserializeErrorLimitExceededFault(response, errorBody)
+
+ case strings.EqualFold("ResourceContention", errorCode):
+ return awsAwsquery_deserializeErrorResourceContentionFault(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsquery_deserializeOpStartInstanceRefresh struct {
+}
+
+func (*awsAwsquery_deserializeOpStartInstanceRefresh) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsquery_deserializeOpStartInstanceRefresh) 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, awsAwsquery_deserializeOpErrorStartInstanceRefresh(response, &metadata)
+ }
+ output := &StartInstanceRefreshOutput{}
+ 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)
+ t, err = decoder.GetElement("StartInstanceRefreshResult")
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ err = awsAwsquery_deserializeOpDocumentStartInstanceRefreshOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsquery_deserializeOpErrorStartInstanceRefresh(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("InstanceRefreshInProgress", errorCode):
+ return awsAwsquery_deserializeErrorInstanceRefreshInProgressFault(response, errorBody)
+
+ case strings.EqualFold("LimitExceeded", errorCode):
+ return awsAwsquery_deserializeErrorLimitExceededFault(response, errorBody)
+
+ case strings.EqualFold("ResourceContention", errorCode):
+ return awsAwsquery_deserializeErrorResourceContentionFault(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsquery_deserializeOpSuspendProcesses struct {
+}
+
+func (*awsAwsquery_deserializeOpSuspendProcesses) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsquery_deserializeOpSuspendProcesses) 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, awsAwsquery_deserializeOpErrorSuspendProcesses(response, &metadata)
+ }
+ output := &SuspendProcessesOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsquery_deserializeOpErrorSuspendProcesses(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("ResourceContention", errorCode):
+ return awsAwsquery_deserializeErrorResourceContentionFault(response, errorBody)
+
+ case strings.EqualFold("ResourceInUse", errorCode):
+ return awsAwsquery_deserializeErrorResourceInUseFault(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsquery_deserializeOpTerminateInstanceInAutoScalingGroup struct {
+}
+
+func (*awsAwsquery_deserializeOpTerminateInstanceInAutoScalingGroup) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsquery_deserializeOpTerminateInstanceInAutoScalingGroup) 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, awsAwsquery_deserializeOpErrorTerminateInstanceInAutoScalingGroup(response, &metadata)
+ }
+ output := &TerminateInstanceInAutoScalingGroupOutput{}
+ 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)
+ t, err = decoder.GetElement("TerminateInstanceInAutoScalingGroupResult")
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ err = awsAwsquery_deserializeOpDocumentTerminateInstanceInAutoScalingGroupOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsquery_deserializeOpErrorTerminateInstanceInAutoScalingGroup(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("ResourceContention", errorCode):
+ return awsAwsquery_deserializeErrorResourceContentionFault(response, errorBody)
+
+ case strings.EqualFold("ScalingActivityInProgress", errorCode):
+ return awsAwsquery_deserializeErrorScalingActivityInProgressFault(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsquery_deserializeOpUpdateAutoScalingGroup struct {
+}
+
+func (*awsAwsquery_deserializeOpUpdateAutoScalingGroup) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsquery_deserializeOpUpdateAutoScalingGroup) 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, awsAwsquery_deserializeOpErrorUpdateAutoScalingGroup(response, &metadata)
+ }
+ output := &UpdateAutoScalingGroupOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsquery_deserializeOpErrorUpdateAutoScalingGroup(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("ResourceContention", errorCode):
+ return awsAwsquery_deserializeErrorResourceContentionFault(response, errorBody)
+
+ case strings.EqualFold("ScalingActivityInProgress", errorCode):
+ return awsAwsquery_deserializeErrorScalingActivityInProgressFault(response, errorBody)
+
+ case strings.EqualFold("ServiceLinkedRoleFailure", errorCode):
+ return awsAwsquery_deserializeErrorServiceLinkedRoleFailure(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsAwsquery_deserializeErrorActiveInstanceRefreshNotFoundFault(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.ActiveInstanceRefreshNotFoundFault{}
+ 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 = awsAwsquery_deserializeDocumentActiveInstanceRefreshNotFoundFault(&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 awsAwsquery_deserializeErrorAlreadyExistsFault(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.AlreadyExistsFault{}
+ 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 = awsAwsquery_deserializeDocumentAlreadyExistsFault(&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 awsAwsquery_deserializeErrorInstanceRefreshInProgressFault(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.InstanceRefreshInProgressFault{}
+ 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 = awsAwsquery_deserializeDocumentInstanceRefreshInProgressFault(&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 awsAwsquery_deserializeErrorInvalidNextToken(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.InvalidNextToken{}
+ 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 = awsAwsquery_deserializeDocumentInvalidNextToken(&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 awsAwsquery_deserializeErrorLimitExceededFault(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.LimitExceededFault{}
+ 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 = awsAwsquery_deserializeDocumentLimitExceededFault(&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 awsAwsquery_deserializeErrorResourceContentionFault(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.ResourceContentionFault{}
+ 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 = awsAwsquery_deserializeDocumentResourceContentionFault(&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 awsAwsquery_deserializeErrorResourceInUseFault(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.ResourceInUseFault{}
+ 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 = awsAwsquery_deserializeDocumentResourceInUseFault(&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 awsAwsquery_deserializeErrorScalingActivityInProgressFault(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.ScalingActivityInProgressFault{}
+ 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 = awsAwsquery_deserializeDocumentScalingActivityInProgressFault(&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 awsAwsquery_deserializeErrorServiceLinkedRoleFailure(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.ServiceLinkedRoleFailure{}
+ 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 = awsAwsquery_deserializeDocumentServiceLinkedRoleFailure(&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 awsAwsquery_deserializeDocumentActiveInstanceRefreshNotFoundFault(v **types.ActiveInstanceRefreshNotFoundFault, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.ActiveInstanceRefreshNotFoundFault
+ if *v == nil {
+ sv = &types.ActiveInstanceRefreshNotFoundFault{}
+ } 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 awsAwsquery_deserializeDocumentActivities(v *[]types.Activity, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.Activity
+ if *v == nil {
+ sv = make([]types.Activity, 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.Activity
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsAwsquery_deserializeDocumentActivity(&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 awsAwsquery_deserializeDocumentActivitiesUnwrapped(v *[]types.Activity, decoder smithyxml.NodeDecoder) error {
+ var sv []types.Activity
+ if *v == nil {
+ sv = make([]types.Activity, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.Activity
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsAwsquery_deserializeDocumentActivity(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsAwsquery_deserializeDocumentActivity(v **types.Activity, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.Activity
+ if *v == nil {
+ sv = &types.Activity{}
+ } 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("ActivityId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ActivityId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("AutoScalingGroupARN", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AutoScalingGroupARN = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("AutoScalingGroupName", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AutoScalingGroupName = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("AutoScalingGroupState", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AutoScalingGroupState = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("Cause", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Cause = ptr.String(xtv)
+ }
+
+ 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("Details", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Details = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("EndTime", 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.EndTime = ptr.Time(t)
+ }
+
+ case strings.EqualFold("Progress", 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.Progress = int32(i64)
+ }
+
+ case strings.EqualFold("StartTime", 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.StartTime = ptr.Time(t)
+ }
+
+ case strings.EqualFold("StatusCode", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.StatusCode = types.ScalingActivityStatusCode(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 awsAwsquery_deserializeDocumentAdjustmentType(v **types.AdjustmentType, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.AdjustmentType
+ if *v == nil {
+ sv = &types.AdjustmentType{}
+ } 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("AdjustmentType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AdjustmentType = 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 awsAwsquery_deserializeDocumentAdjustmentTypes(v *[]types.AdjustmentType, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.AdjustmentType
+ if *v == nil {
+ sv = make([]types.AdjustmentType, 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.AdjustmentType
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsAwsquery_deserializeDocumentAdjustmentType(&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 awsAwsquery_deserializeDocumentAdjustmentTypesUnwrapped(v *[]types.AdjustmentType, decoder smithyxml.NodeDecoder) error {
+ var sv []types.AdjustmentType
+ if *v == nil {
+ sv = make([]types.AdjustmentType, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.AdjustmentType
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsAwsquery_deserializeDocumentAdjustmentType(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsAwsquery_deserializeDocumentAlarm(v **types.Alarm, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.Alarm
+ if *v == nil {
+ sv = &types.Alarm{}
+ } 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("AlarmARN", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AlarmARN = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("AlarmName", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AlarmName = 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 awsAwsquery_deserializeDocumentAlarms(v *[]types.Alarm, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.Alarm
+ if *v == nil {
+ sv = make([]types.Alarm, 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.Alarm
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsAwsquery_deserializeDocumentAlarm(&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 awsAwsquery_deserializeDocumentAlarmsUnwrapped(v *[]types.Alarm, decoder smithyxml.NodeDecoder) error {
+ var sv []types.Alarm
+ if *v == nil {
+ sv = make([]types.Alarm, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.Alarm
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsAwsquery_deserializeDocumentAlarm(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsAwsquery_deserializeDocumentAlreadyExistsFault(v **types.AlreadyExistsFault, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.AlreadyExistsFault
+ if *v == nil {
+ sv = &types.AlreadyExistsFault{}
+ } 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 awsAwsquery_deserializeDocumentAutoScalingGroup(v **types.AutoScalingGroup, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.AutoScalingGroup
+ if *v == nil {
+ sv = &types.AutoScalingGroup{}
+ } 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("AutoScalingGroupARN", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AutoScalingGroupARN = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("AutoScalingGroupName", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AutoScalingGroupName = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("AvailabilityZones", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsAwsquery_deserializeDocumentAvailabilityZones(&sv.AvailabilityZones, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("CapacityRebalance", 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 CapacityRebalanceEnabled to be of type *bool, got %T instead", val)
+ }
+ sv.CapacityRebalance = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("Context", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Context = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("CreatedTime", 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.CreatedTime = ptr.Time(t)
+ }
+
+ case strings.EqualFold("DefaultCooldown", 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.DefaultCooldown = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("DesiredCapacity", 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.DesiredCapacity = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("EnabledMetrics", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsAwsquery_deserializeDocumentEnabledMetrics(&sv.EnabledMetrics, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("HealthCheckGracePeriod", 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.HealthCheckGracePeriod = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("HealthCheckType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.HealthCheckType = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("Instances", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsAwsquery_deserializeDocumentInstances(&sv.Instances, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("LaunchConfigurationName", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.LaunchConfigurationName = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("LaunchTemplate", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsAwsquery_deserializeDocumentLaunchTemplateSpecification(&sv.LaunchTemplate, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("LoadBalancerNames", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsAwsquery_deserializeDocumentLoadBalancerNames(&sv.LoadBalancerNames, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("MaxInstanceLifetime", 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.MaxInstanceLifetime = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("MaxSize", 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.MaxSize = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("MinSize", 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.MinSize = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("MixedInstancesPolicy", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsAwsquery_deserializeDocumentMixedInstancesPolicy(&sv.MixedInstancesPolicy, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("NewInstancesProtectedFromScaleIn", 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 InstanceProtected to be of type *bool, got %T instead", val)
+ }
+ sv.NewInstancesProtectedFromScaleIn = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("PlacementGroup", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.PlacementGroup = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("PredictedCapacity", 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.PredictedCapacity = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("ServiceLinkedRoleARN", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ServiceLinkedRoleARN = 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 = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("SuspendedProcesses", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsAwsquery_deserializeDocumentSuspendedProcesses(&sv.SuspendedProcesses, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("Tags", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsAwsquery_deserializeDocumentTagDescriptionList(&sv.Tags, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("TargetGroupARNs", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsAwsquery_deserializeDocumentTargetGroupARNs(&sv.TargetGroupARNs, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("TerminationPolicies", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsAwsquery_deserializeDocumentTerminationPolicies(&sv.TerminationPolicies, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("VPCZoneIdentifier", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.VPCZoneIdentifier = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("WarmPoolConfiguration", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsAwsquery_deserializeDocumentWarmPoolConfiguration(&sv.WarmPoolConfiguration, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("WarmPoolSize", 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.WarmPoolSize = 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 awsAwsquery_deserializeDocumentAutoScalingGroups(v *[]types.AutoScalingGroup, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.AutoScalingGroup
+ if *v == nil {
+ sv = make([]types.AutoScalingGroup, 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.AutoScalingGroup
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsAwsquery_deserializeDocumentAutoScalingGroup(&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 awsAwsquery_deserializeDocumentAutoScalingGroupsUnwrapped(v *[]types.AutoScalingGroup, decoder smithyxml.NodeDecoder) error {
+ var sv []types.AutoScalingGroup
+ if *v == nil {
+ sv = make([]types.AutoScalingGroup, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.AutoScalingGroup
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsAwsquery_deserializeDocumentAutoScalingGroup(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsAwsquery_deserializeDocumentAutoScalingInstanceDetails(v **types.AutoScalingInstanceDetails, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.AutoScalingInstanceDetails
+ if *v == nil {
+ sv = &types.AutoScalingInstanceDetails{}
+ } 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("AutoScalingGroupName", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AutoScalingGroupName = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("AvailabilityZone", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AvailabilityZone = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("HealthStatus", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.HealthStatus = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("InstanceId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.InstanceId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("InstanceType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.InstanceType = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("LaunchConfigurationName", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.LaunchConfigurationName = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("LaunchTemplate", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsAwsquery_deserializeDocumentLaunchTemplateSpecification(&sv.LaunchTemplate, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("LifecycleState", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.LifecycleState = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("ProtectedFromScaleIn", 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 InstanceProtected to be of type *bool, got %T instead", val)
+ }
+ sv.ProtectedFromScaleIn = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("WeightedCapacity", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.WeightedCapacity = 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 awsAwsquery_deserializeDocumentAutoScalingInstances(v *[]types.AutoScalingInstanceDetails, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.AutoScalingInstanceDetails
+ if *v == nil {
+ sv = make([]types.AutoScalingInstanceDetails, 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.AutoScalingInstanceDetails
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsAwsquery_deserializeDocumentAutoScalingInstanceDetails(&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 awsAwsquery_deserializeDocumentAutoScalingInstancesUnwrapped(v *[]types.AutoScalingInstanceDetails, decoder smithyxml.NodeDecoder) error {
+ var sv []types.AutoScalingInstanceDetails
+ if *v == nil {
+ sv = make([]types.AutoScalingInstanceDetails, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.AutoScalingInstanceDetails
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsAwsquery_deserializeDocumentAutoScalingInstanceDetails(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsAwsquery_deserializeDocumentAutoScalingNotificationTypes(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 awsAwsquery_deserializeDocumentAutoScalingNotificationTypesUnwrapped(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 awsAwsquery_deserializeDocumentAvailabilityZones(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 awsAwsquery_deserializeDocumentAvailabilityZonesUnwrapped(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 awsAwsquery_deserializeDocumentBlockDeviceMapping(v **types.BlockDeviceMapping, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.BlockDeviceMapping
+ if *v == nil {
+ sv = &types.BlockDeviceMapping{}
+ } 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("DeviceName", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.DeviceName = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("Ebs", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsAwsquery_deserializeDocumentEbs(&sv.Ebs, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("NoDevice", 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 NoDevice to be of type *bool, got %T instead", val)
+ }
+ sv.NoDevice = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("VirtualName", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.VirtualName = 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 awsAwsquery_deserializeDocumentBlockDeviceMappings(v *[]types.BlockDeviceMapping, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.BlockDeviceMapping
+ if *v == nil {
+ sv = make([]types.BlockDeviceMapping, 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.BlockDeviceMapping
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsAwsquery_deserializeDocumentBlockDeviceMapping(&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 awsAwsquery_deserializeDocumentBlockDeviceMappingsUnwrapped(v *[]types.BlockDeviceMapping, decoder smithyxml.NodeDecoder) error {
+ var sv []types.BlockDeviceMapping
+ if *v == nil {
+ sv = make([]types.BlockDeviceMapping, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.BlockDeviceMapping
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsAwsquery_deserializeDocumentBlockDeviceMapping(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsAwsquery_deserializeDocumentCapacityForecast(v **types.CapacityForecast, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.CapacityForecast
+ if *v == nil {
+ sv = &types.CapacityForecast{}
+ } 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("Timestamps", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsAwsquery_deserializeDocumentPredictiveScalingForecastTimestamps(&sv.Timestamps, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("Values", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsAwsquery_deserializeDocumentPredictiveScalingForecastValues(&sv.Values, 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 awsAwsquery_deserializeDocumentCheckpointPercentages(v *[]int32, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []int32
+ if *v == nil {
+ sv = make([]int32, 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 int32
+ 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
+ }
+ col = int32(i64)
+ }
+ sv = append(sv, col)
+
+ default:
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsquery_deserializeDocumentCheckpointPercentagesUnwrapped(v *[]int32, decoder smithyxml.NodeDecoder) error {
+ var sv []int32
+ if *v == nil {
+ sv = make([]int32, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv int32
+ t := decoder.StartEl
+ _ = t
+ 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
+ }
+ mv = int32(i64)
+ }
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsAwsquery_deserializeDocumentClassicLinkVPCSecurityGroups(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 awsAwsquery_deserializeDocumentClassicLinkVPCSecurityGroupsUnwrapped(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 awsAwsquery_deserializeDocumentCustomizedMetricSpecification(v **types.CustomizedMetricSpecification, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.CustomizedMetricSpecification
+ if *v == nil {
+ sv = &types.CustomizedMetricSpecification{}
+ } 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("Dimensions", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsAwsquery_deserializeDocumentMetricDimensions(&sv.Dimensions, nodeDecoder); err != nil {
+ return err
+ }
+
+ 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("Statistic", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Statistic = types.MetricStatistic(xtv)
+ }
+
+ case strings.EqualFold("Unit", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Unit = 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 awsAwsquery_deserializeDocumentDesiredConfiguration(v **types.DesiredConfiguration, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.DesiredConfiguration
+ if *v == nil {
+ sv = &types.DesiredConfiguration{}
+ } 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("LaunchTemplate", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsAwsquery_deserializeDocumentLaunchTemplateSpecification(&sv.LaunchTemplate, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("MixedInstancesPolicy", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsAwsquery_deserializeDocumentMixedInstancesPolicy(&sv.MixedInstancesPolicy, 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 awsAwsquery_deserializeDocumentEbs(v **types.Ebs, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.Ebs
+ if *v == nil {
+ sv = &types.Ebs{}
+ } 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("DeleteOnTermination", 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 BlockDeviceEbsDeleteOnTermination to be of type *bool, got %T instead", val)
+ }
+ sv.DeleteOnTermination = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("Encrypted", 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 BlockDeviceEbsEncrypted to be of type *bool, got %T instead", val)
+ }
+ sv.Encrypted = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("Iops", 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.Iops = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("SnapshotId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.SnapshotId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("Throughput", 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.Throughput = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("VolumeSize", 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.VolumeSize = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("VolumeType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.VolumeType = 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 awsAwsquery_deserializeDocumentEnabledMetric(v **types.EnabledMetric, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.EnabledMetric
+ if *v == nil {
+ sv = &types.EnabledMetric{}
+ } 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("Granularity", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Granularity = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("Metric", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Metric = 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 awsAwsquery_deserializeDocumentEnabledMetrics(v *[]types.EnabledMetric, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.EnabledMetric
+ if *v == nil {
+ sv = make([]types.EnabledMetric, 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.EnabledMetric
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsAwsquery_deserializeDocumentEnabledMetric(&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 awsAwsquery_deserializeDocumentEnabledMetricsUnwrapped(v *[]types.EnabledMetric, decoder smithyxml.NodeDecoder) error {
+ var sv []types.EnabledMetric
+ if *v == nil {
+ sv = make([]types.EnabledMetric, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.EnabledMetric
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsAwsquery_deserializeDocumentEnabledMetric(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsAwsquery_deserializeDocumentFailedScheduledUpdateGroupActionRequest(v **types.FailedScheduledUpdateGroupActionRequest, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.FailedScheduledUpdateGroupActionRequest
+ if *v == nil {
+ sv = &types.FailedScheduledUpdateGroupActionRequest{}
+ } 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("ErrorCode", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ErrorCode = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("ErrorMessage", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ErrorMessage = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("ScheduledActionName", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ScheduledActionName = 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 awsAwsquery_deserializeDocumentFailedScheduledUpdateGroupActionRequests(v *[]types.FailedScheduledUpdateGroupActionRequest, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.FailedScheduledUpdateGroupActionRequest
+ if *v == nil {
+ sv = make([]types.FailedScheduledUpdateGroupActionRequest, 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.FailedScheduledUpdateGroupActionRequest
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsAwsquery_deserializeDocumentFailedScheduledUpdateGroupActionRequest(&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 awsAwsquery_deserializeDocumentFailedScheduledUpdateGroupActionRequestsUnwrapped(v *[]types.FailedScheduledUpdateGroupActionRequest, decoder smithyxml.NodeDecoder) error {
+ var sv []types.FailedScheduledUpdateGroupActionRequest
+ if *v == nil {
+ sv = make([]types.FailedScheduledUpdateGroupActionRequest, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.FailedScheduledUpdateGroupActionRequest
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsAwsquery_deserializeDocumentFailedScheduledUpdateGroupActionRequest(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsAwsquery_deserializeDocumentInstance(v **types.Instance, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.Instance
+ if *v == nil {
+ sv = &types.Instance{}
+ } 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("AvailabilityZone", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AvailabilityZone = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("HealthStatus", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.HealthStatus = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("InstanceId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.InstanceId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("InstanceType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.InstanceType = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("LaunchConfigurationName", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.LaunchConfigurationName = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("LaunchTemplate", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsAwsquery_deserializeDocumentLaunchTemplateSpecification(&sv.LaunchTemplate, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("LifecycleState", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.LifecycleState = types.LifecycleState(xtv)
+ }
+
+ case strings.EqualFold("ProtectedFromScaleIn", 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 InstanceProtected to be of type *bool, got %T instead", val)
+ }
+ sv.ProtectedFromScaleIn = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("WeightedCapacity", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.WeightedCapacity = 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 awsAwsquery_deserializeDocumentInstanceMetadataOptions(v **types.InstanceMetadataOptions, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.InstanceMetadataOptions
+ if *v == nil {
+ sv = &types.InstanceMetadataOptions{}
+ } 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("HttpEndpoint", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.HttpEndpoint = types.InstanceMetadataEndpointState(xtv)
+ }
+
+ case strings.EqualFold("HttpPutResponseHopLimit", 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.HttpPutResponseHopLimit = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("HttpTokens", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.HttpTokens = types.InstanceMetadataHttpTokensState(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 awsAwsquery_deserializeDocumentInstanceMonitoring(v **types.InstanceMonitoring, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.InstanceMonitoring
+ if *v == nil {
+ sv = &types.InstanceMonitoring{}
+ } 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("Enabled", 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 MonitoringEnabled to be of type *bool, got %T instead", val)
+ }
+ sv.Enabled = ptr.Bool(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 awsAwsquery_deserializeDocumentInstanceRefresh(v **types.InstanceRefresh, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.InstanceRefresh
+ if *v == nil {
+ sv = &types.InstanceRefresh{}
+ } 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("AutoScalingGroupName", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AutoScalingGroupName = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("DesiredConfiguration", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsAwsquery_deserializeDocumentDesiredConfiguration(&sv.DesiredConfiguration, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("EndTime", 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.EndTime = ptr.Time(t)
+ }
+
+ case strings.EqualFold("InstanceRefreshId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.InstanceRefreshId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("InstancesToUpdate", 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.InstancesToUpdate = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("PercentageComplete", 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.PercentageComplete = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("Preferences", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsAwsquery_deserializeDocumentRefreshPreferences(&sv.Preferences, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("ProgressDetails", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsAwsquery_deserializeDocumentInstanceRefreshProgressDetails(&sv.ProgressDetails, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("StartTime", 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.StartTime = 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 = types.InstanceRefreshStatus(xtv)
+ }
+
+ case strings.EqualFold("StatusReason", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.StatusReason = 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 awsAwsquery_deserializeDocumentInstanceRefreshes(v *[]types.InstanceRefresh, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.InstanceRefresh
+ if *v == nil {
+ sv = make([]types.InstanceRefresh, 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.InstanceRefresh
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsAwsquery_deserializeDocumentInstanceRefresh(&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 awsAwsquery_deserializeDocumentInstanceRefreshesUnwrapped(v *[]types.InstanceRefresh, decoder smithyxml.NodeDecoder) error {
+ var sv []types.InstanceRefresh
+ if *v == nil {
+ sv = make([]types.InstanceRefresh, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.InstanceRefresh
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsAwsquery_deserializeDocumentInstanceRefresh(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsAwsquery_deserializeDocumentInstanceRefreshInProgressFault(v **types.InstanceRefreshInProgressFault, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.InstanceRefreshInProgressFault
+ if *v == nil {
+ sv = &types.InstanceRefreshInProgressFault{}
+ } 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 awsAwsquery_deserializeDocumentInstanceRefreshLivePoolProgress(v **types.InstanceRefreshLivePoolProgress, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.InstanceRefreshLivePoolProgress
+ if *v == nil {
+ sv = &types.InstanceRefreshLivePoolProgress{}
+ } 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("InstancesToUpdate", 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.InstancesToUpdate = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("PercentageComplete", 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.PercentageComplete = 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 awsAwsquery_deserializeDocumentInstanceRefreshProgressDetails(v **types.InstanceRefreshProgressDetails, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.InstanceRefreshProgressDetails
+ if *v == nil {
+ sv = &types.InstanceRefreshProgressDetails{}
+ } 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("LivePoolProgress", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsAwsquery_deserializeDocumentInstanceRefreshLivePoolProgress(&sv.LivePoolProgress, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("WarmPoolProgress", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsAwsquery_deserializeDocumentInstanceRefreshWarmPoolProgress(&sv.WarmPoolProgress, 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 awsAwsquery_deserializeDocumentInstanceRefreshWarmPoolProgress(v **types.InstanceRefreshWarmPoolProgress, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.InstanceRefreshWarmPoolProgress
+ if *v == nil {
+ sv = &types.InstanceRefreshWarmPoolProgress{}
+ } 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("InstancesToUpdate", 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.InstancesToUpdate = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("PercentageComplete", 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.PercentageComplete = 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 awsAwsquery_deserializeDocumentInstances(v *[]types.Instance, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.Instance
+ if *v == nil {
+ sv = make([]types.Instance, 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.Instance
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsAwsquery_deserializeDocumentInstance(&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 awsAwsquery_deserializeDocumentInstancesUnwrapped(v *[]types.Instance, decoder smithyxml.NodeDecoder) error {
+ var sv []types.Instance
+ if *v == nil {
+ sv = make([]types.Instance, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.Instance
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsAwsquery_deserializeDocumentInstance(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsAwsquery_deserializeDocumentInstancesDistribution(v **types.InstancesDistribution, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.InstancesDistribution
+ if *v == nil {
+ sv = &types.InstancesDistribution{}
+ } 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("OnDemandAllocationStrategy", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.OnDemandAllocationStrategy = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("OnDemandBaseCapacity", 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.OnDemandBaseCapacity = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("OnDemandPercentageAboveBaseCapacity", 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.OnDemandPercentageAboveBaseCapacity = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("SpotAllocationStrategy", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.SpotAllocationStrategy = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("SpotInstancePools", 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.SpotInstancePools = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("SpotMaxPrice", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.SpotMaxPrice = 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 awsAwsquery_deserializeDocumentInvalidNextToken(v **types.InvalidNextToken, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.InvalidNextToken
+ if *v == nil {
+ sv = &types.InvalidNextToken{}
+ } 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 awsAwsquery_deserializeDocumentLaunchConfiguration(v **types.LaunchConfiguration, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.LaunchConfiguration
+ if *v == nil {
+ sv = &types.LaunchConfiguration{}
+ } 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("AssociatePublicIpAddress", 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 AssociatePublicIpAddress to be of type *bool, got %T instead", val)
+ }
+ sv.AssociatePublicIpAddress = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("BlockDeviceMappings", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsAwsquery_deserializeDocumentBlockDeviceMappings(&sv.BlockDeviceMappings, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("ClassicLinkVPCId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ClassicLinkVPCId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("ClassicLinkVPCSecurityGroups", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsAwsquery_deserializeDocumentClassicLinkVPCSecurityGroups(&sv.ClassicLinkVPCSecurityGroups, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("CreatedTime", 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.CreatedTime = ptr.Time(t)
+ }
+
+ case strings.EqualFold("EbsOptimized", 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 EbsOptimized to be of type *bool, got %T instead", val)
+ }
+ sv.EbsOptimized = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("IamInstanceProfile", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.IamInstanceProfile = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("ImageId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ImageId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("InstanceMonitoring", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsAwsquery_deserializeDocumentInstanceMonitoring(&sv.InstanceMonitoring, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("InstanceType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.InstanceType = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("KernelId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.KernelId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("KeyName", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.KeyName = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("LaunchConfigurationARN", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.LaunchConfigurationARN = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("LaunchConfigurationName", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.LaunchConfigurationName = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("MetadataOptions", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsAwsquery_deserializeDocumentInstanceMetadataOptions(&sv.MetadataOptions, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("PlacementTenancy", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.PlacementTenancy = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("RamdiskId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.RamdiskId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("SecurityGroups", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsAwsquery_deserializeDocumentSecurityGroups(&sv.SecurityGroups, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("SpotPrice", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.SpotPrice = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("UserData", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.UserData = 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 awsAwsquery_deserializeDocumentLaunchConfigurations(v *[]types.LaunchConfiguration, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.LaunchConfiguration
+ if *v == nil {
+ sv = make([]types.LaunchConfiguration, 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.LaunchConfiguration
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsAwsquery_deserializeDocumentLaunchConfiguration(&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 awsAwsquery_deserializeDocumentLaunchConfigurationsUnwrapped(v *[]types.LaunchConfiguration, decoder smithyxml.NodeDecoder) error {
+ var sv []types.LaunchConfiguration
+ if *v == nil {
+ sv = make([]types.LaunchConfiguration, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.LaunchConfiguration
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsAwsquery_deserializeDocumentLaunchConfiguration(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsAwsquery_deserializeDocumentLaunchTemplate(v **types.LaunchTemplate, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.LaunchTemplate
+ if *v == nil {
+ sv = &types.LaunchTemplate{}
+ } 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("LaunchTemplateSpecification", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsAwsquery_deserializeDocumentLaunchTemplateSpecification(&sv.LaunchTemplateSpecification, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("Overrides", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsAwsquery_deserializeDocumentOverrides(&sv.Overrides, 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 awsAwsquery_deserializeDocumentLaunchTemplateOverrides(v **types.LaunchTemplateOverrides, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.LaunchTemplateOverrides
+ if *v == nil {
+ sv = &types.LaunchTemplateOverrides{}
+ } 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("InstanceType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.InstanceType = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("LaunchTemplateSpecification", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsAwsquery_deserializeDocumentLaunchTemplateSpecification(&sv.LaunchTemplateSpecification, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("WeightedCapacity", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.WeightedCapacity = 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 awsAwsquery_deserializeDocumentLaunchTemplateSpecification(v **types.LaunchTemplateSpecification, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.LaunchTemplateSpecification
+ if *v == nil {
+ sv = &types.LaunchTemplateSpecification{}
+ } 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("LaunchTemplateId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.LaunchTemplateId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("LaunchTemplateName", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.LaunchTemplateName = 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)
+ sv.Version = 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 awsAwsquery_deserializeDocumentLifecycleHook(v **types.LifecycleHook, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.LifecycleHook
+ if *v == nil {
+ sv = &types.LifecycleHook{}
+ } 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("AutoScalingGroupName", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AutoScalingGroupName = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("DefaultResult", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.DefaultResult = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("GlobalTimeout", 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.GlobalTimeout = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("HeartbeatTimeout", 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.HeartbeatTimeout = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("LifecycleHookName", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.LifecycleHookName = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("LifecycleTransition", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.LifecycleTransition = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("NotificationMetadata", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.NotificationMetadata = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("NotificationTargetARN", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.NotificationTargetARN = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("RoleARN", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.RoleARN = 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 awsAwsquery_deserializeDocumentLifecycleHooks(v *[]types.LifecycleHook, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.LifecycleHook
+ if *v == nil {
+ sv = make([]types.LifecycleHook, 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.LifecycleHook
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsAwsquery_deserializeDocumentLifecycleHook(&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 awsAwsquery_deserializeDocumentLifecycleHooksUnwrapped(v *[]types.LifecycleHook, decoder smithyxml.NodeDecoder) error {
+ var sv []types.LifecycleHook
+ if *v == nil {
+ sv = make([]types.LifecycleHook, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.LifecycleHook
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsAwsquery_deserializeDocumentLifecycleHook(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsAwsquery_deserializeDocumentLimitExceededFault(v **types.LimitExceededFault, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.LimitExceededFault
+ if *v == nil {
+ sv = &types.LimitExceededFault{}
+ } 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 awsAwsquery_deserializeDocumentLoadBalancerNames(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 awsAwsquery_deserializeDocumentLoadBalancerNamesUnwrapped(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 awsAwsquery_deserializeDocumentLoadBalancerState(v **types.LoadBalancerState, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.LoadBalancerState
+ if *v == nil {
+ sv = &types.LoadBalancerState{}
+ } 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("LoadBalancerName", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.LoadBalancerName = 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)
+ }
+
+ 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 awsAwsquery_deserializeDocumentLoadBalancerStates(v *[]types.LoadBalancerState, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.LoadBalancerState
+ if *v == nil {
+ sv = make([]types.LoadBalancerState, 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.LoadBalancerState
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsAwsquery_deserializeDocumentLoadBalancerState(&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 awsAwsquery_deserializeDocumentLoadBalancerStatesUnwrapped(v *[]types.LoadBalancerState, decoder smithyxml.NodeDecoder) error {
+ var sv []types.LoadBalancerState
+ if *v == nil {
+ sv = make([]types.LoadBalancerState, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.LoadBalancerState
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsAwsquery_deserializeDocumentLoadBalancerState(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsAwsquery_deserializeDocumentLoadBalancerTargetGroupState(v **types.LoadBalancerTargetGroupState, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.LoadBalancerTargetGroupState
+ if *v == nil {
+ sv = &types.LoadBalancerTargetGroupState{}
+ } 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("LoadBalancerTargetGroupARN", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.LoadBalancerTargetGroupARN = 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)
+ }
+
+ 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 awsAwsquery_deserializeDocumentLoadBalancerTargetGroupStates(v *[]types.LoadBalancerTargetGroupState, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.LoadBalancerTargetGroupState
+ if *v == nil {
+ sv = make([]types.LoadBalancerTargetGroupState, 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.LoadBalancerTargetGroupState
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsAwsquery_deserializeDocumentLoadBalancerTargetGroupState(&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 awsAwsquery_deserializeDocumentLoadBalancerTargetGroupStatesUnwrapped(v *[]types.LoadBalancerTargetGroupState, decoder smithyxml.NodeDecoder) error {
+ var sv []types.LoadBalancerTargetGroupState
+ if *v == nil {
+ sv = make([]types.LoadBalancerTargetGroupState, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.LoadBalancerTargetGroupState
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsAwsquery_deserializeDocumentLoadBalancerTargetGroupState(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsAwsquery_deserializeDocumentLoadForecast(v **types.LoadForecast, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.LoadForecast
+ if *v == nil {
+ sv = &types.LoadForecast{}
+ } 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("MetricSpecification", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsAwsquery_deserializeDocumentPredictiveScalingMetricSpecification(&sv.MetricSpecification, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("Timestamps", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsAwsquery_deserializeDocumentPredictiveScalingForecastTimestamps(&sv.Timestamps, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("Values", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsAwsquery_deserializeDocumentPredictiveScalingForecastValues(&sv.Values, 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 awsAwsquery_deserializeDocumentLoadForecasts(v *[]types.LoadForecast, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.LoadForecast
+ if *v == nil {
+ sv = make([]types.LoadForecast, 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.LoadForecast
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsAwsquery_deserializeDocumentLoadForecast(&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 awsAwsquery_deserializeDocumentLoadForecastsUnwrapped(v *[]types.LoadForecast, decoder smithyxml.NodeDecoder) error {
+ var sv []types.LoadForecast
+ if *v == nil {
+ sv = make([]types.LoadForecast, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.LoadForecast
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsAwsquery_deserializeDocumentLoadForecast(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsAwsquery_deserializeDocumentMetricCollectionType(v **types.MetricCollectionType, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.MetricCollectionType
+ if *v == nil {
+ sv = &types.MetricCollectionType{}
+ } 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("Metric", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Metric = 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 awsAwsquery_deserializeDocumentMetricCollectionTypes(v *[]types.MetricCollectionType, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.MetricCollectionType
+ if *v == nil {
+ sv = make([]types.MetricCollectionType, 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.MetricCollectionType
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsAwsquery_deserializeDocumentMetricCollectionType(&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 awsAwsquery_deserializeDocumentMetricCollectionTypesUnwrapped(v *[]types.MetricCollectionType, decoder smithyxml.NodeDecoder) error {
+ var sv []types.MetricCollectionType
+ if *v == nil {
+ sv = make([]types.MetricCollectionType, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.MetricCollectionType
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsAwsquery_deserializeDocumentMetricCollectionType(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsAwsquery_deserializeDocumentMetricDimension(v **types.MetricDimension, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.MetricDimension
+ if *v == nil {
+ sv = &types.MetricDimension{}
+ } 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 awsAwsquery_deserializeDocumentMetricDimensions(v *[]types.MetricDimension, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.MetricDimension
+ if *v == nil {
+ sv = make([]types.MetricDimension, 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.MetricDimension
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsAwsquery_deserializeDocumentMetricDimension(&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 awsAwsquery_deserializeDocumentMetricDimensionsUnwrapped(v *[]types.MetricDimension, decoder smithyxml.NodeDecoder) error {
+ var sv []types.MetricDimension
+ if *v == nil {
+ sv = make([]types.MetricDimension, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.MetricDimension
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsAwsquery_deserializeDocumentMetricDimension(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsAwsquery_deserializeDocumentMetricGranularityType(v **types.MetricGranularityType, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.MetricGranularityType
+ if *v == nil {
+ sv = &types.MetricGranularityType{}
+ } 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("Granularity", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Granularity = 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 awsAwsquery_deserializeDocumentMetricGranularityTypes(v *[]types.MetricGranularityType, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.MetricGranularityType
+ if *v == nil {
+ sv = make([]types.MetricGranularityType, 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.MetricGranularityType
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsAwsquery_deserializeDocumentMetricGranularityType(&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 awsAwsquery_deserializeDocumentMetricGranularityTypesUnwrapped(v *[]types.MetricGranularityType, decoder smithyxml.NodeDecoder) error {
+ var sv []types.MetricGranularityType
+ if *v == nil {
+ sv = make([]types.MetricGranularityType, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.MetricGranularityType
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsAwsquery_deserializeDocumentMetricGranularityType(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsAwsquery_deserializeDocumentMixedInstancesPolicy(v **types.MixedInstancesPolicy, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.MixedInstancesPolicy
+ if *v == nil {
+ sv = &types.MixedInstancesPolicy{}
+ } 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("InstancesDistribution", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsAwsquery_deserializeDocumentInstancesDistribution(&sv.InstancesDistribution, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("LaunchTemplate", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsAwsquery_deserializeDocumentLaunchTemplate(&sv.LaunchTemplate, 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 awsAwsquery_deserializeDocumentNotificationConfiguration(v **types.NotificationConfiguration, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.NotificationConfiguration
+ if *v == nil {
+ sv = &types.NotificationConfiguration{}
+ } 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("AutoScalingGroupName", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AutoScalingGroupName = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("NotificationType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.NotificationType = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("TopicARN", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.TopicARN = 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 awsAwsquery_deserializeDocumentNotificationConfigurations(v *[]types.NotificationConfiguration, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.NotificationConfiguration
+ if *v == nil {
+ sv = make([]types.NotificationConfiguration, 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.NotificationConfiguration
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsAwsquery_deserializeDocumentNotificationConfiguration(&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 awsAwsquery_deserializeDocumentNotificationConfigurationsUnwrapped(v *[]types.NotificationConfiguration, decoder smithyxml.NodeDecoder) error {
+ var sv []types.NotificationConfiguration
+ if *v == nil {
+ sv = make([]types.NotificationConfiguration, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.NotificationConfiguration
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsAwsquery_deserializeDocumentNotificationConfiguration(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsAwsquery_deserializeDocumentOverrides(v *[]types.LaunchTemplateOverrides, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.LaunchTemplateOverrides
+ if *v == nil {
+ sv = make([]types.LaunchTemplateOverrides, 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.LaunchTemplateOverrides
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsAwsquery_deserializeDocumentLaunchTemplateOverrides(&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 awsAwsquery_deserializeDocumentOverridesUnwrapped(v *[]types.LaunchTemplateOverrides, decoder smithyxml.NodeDecoder) error {
+ var sv []types.LaunchTemplateOverrides
+ if *v == nil {
+ sv = make([]types.LaunchTemplateOverrides, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.LaunchTemplateOverrides
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsAwsquery_deserializeDocumentLaunchTemplateOverrides(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsAwsquery_deserializeDocumentPredefinedMetricSpecification(v **types.PredefinedMetricSpecification, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.PredefinedMetricSpecification
+ if *v == nil {
+ sv = &types.PredefinedMetricSpecification{}
+ } 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("PredefinedMetricType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.PredefinedMetricType = types.MetricType(xtv)
+ }
+
+ case strings.EqualFold("ResourceLabel", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ResourceLabel = 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 awsAwsquery_deserializeDocumentPredictiveScalingConfiguration(v **types.PredictiveScalingConfiguration, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.PredictiveScalingConfiguration
+ if *v == nil {
+ sv = &types.PredictiveScalingConfiguration{}
+ } 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("MaxCapacityBreachBehavior", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.MaxCapacityBreachBehavior = types.PredictiveScalingMaxCapacityBreachBehavior(xtv)
+ }
+
+ case strings.EqualFold("MaxCapacityBuffer", 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.MaxCapacityBuffer = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("MetricSpecifications", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsAwsquery_deserializeDocumentPredictiveScalingMetricSpecifications(&sv.MetricSpecifications, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("Mode", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Mode = types.PredictiveScalingMode(xtv)
+ }
+
+ case strings.EqualFold("SchedulingBufferTime", 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.SchedulingBufferTime = 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 awsAwsquery_deserializeDocumentPredictiveScalingForecastTimestamps(v *[]time.Time, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []time.Time
+ if *v == nil {
+ sv = make([]time.Time, 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 time.Time
+ 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
+ }
+ col = t
+ }
+ sv = append(sv, col)
+
+ default:
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsquery_deserializeDocumentPredictiveScalingForecastTimestampsUnwrapped(v *[]time.Time, decoder smithyxml.NodeDecoder) error {
+ var sv []time.Time
+ if *v == nil {
+ sv = make([]time.Time, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv time.Time
+ t := decoder.StartEl
+ _ = t
+ 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
+ }
+ mv = t
+ }
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsAwsquery_deserializeDocumentPredictiveScalingForecastValues(v *[]float64, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []float64
+ if *v == nil {
+ sv = make([]float64, 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 float64
+ 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
+ }
+ col = f64
+ }
+ sv = append(sv, col)
+
+ default:
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsquery_deserializeDocumentPredictiveScalingForecastValuesUnwrapped(v *[]float64, decoder smithyxml.NodeDecoder) error {
+ var sv []float64
+ if *v == nil {
+ sv = make([]float64, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv float64
+ t := decoder.StartEl
+ _ = t
+ 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
+ }
+ mv = f64
+ }
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsAwsquery_deserializeDocumentPredictiveScalingMetricSpecification(v **types.PredictiveScalingMetricSpecification, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.PredictiveScalingMetricSpecification
+ if *v == nil {
+ sv = &types.PredictiveScalingMetricSpecification{}
+ } 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("PredefinedLoadMetricSpecification", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsAwsquery_deserializeDocumentPredictiveScalingPredefinedLoadMetric(&sv.PredefinedLoadMetricSpecification, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("PredefinedMetricPairSpecification", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsAwsquery_deserializeDocumentPredictiveScalingPredefinedMetricPair(&sv.PredefinedMetricPairSpecification, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("PredefinedScalingMetricSpecification", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsAwsquery_deserializeDocumentPredictiveScalingPredefinedScalingMetric(&sv.PredefinedScalingMetricSpecification, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("TargetValue", 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.TargetValue = 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 awsAwsquery_deserializeDocumentPredictiveScalingMetricSpecifications(v *[]types.PredictiveScalingMetricSpecification, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.PredictiveScalingMetricSpecification
+ if *v == nil {
+ sv = make([]types.PredictiveScalingMetricSpecification, 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.PredictiveScalingMetricSpecification
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsAwsquery_deserializeDocumentPredictiveScalingMetricSpecification(&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 awsAwsquery_deserializeDocumentPredictiveScalingMetricSpecificationsUnwrapped(v *[]types.PredictiveScalingMetricSpecification, decoder smithyxml.NodeDecoder) error {
+ var sv []types.PredictiveScalingMetricSpecification
+ if *v == nil {
+ sv = make([]types.PredictiveScalingMetricSpecification, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.PredictiveScalingMetricSpecification
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsAwsquery_deserializeDocumentPredictiveScalingMetricSpecification(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsAwsquery_deserializeDocumentPredictiveScalingPredefinedLoadMetric(v **types.PredictiveScalingPredefinedLoadMetric, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.PredictiveScalingPredefinedLoadMetric
+ if *v == nil {
+ sv = &types.PredictiveScalingPredefinedLoadMetric{}
+ } 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("PredefinedMetricType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.PredefinedMetricType = types.PredefinedLoadMetricType(xtv)
+ }
+
+ case strings.EqualFold("ResourceLabel", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ResourceLabel = 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 awsAwsquery_deserializeDocumentPredictiveScalingPredefinedMetricPair(v **types.PredictiveScalingPredefinedMetricPair, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.PredictiveScalingPredefinedMetricPair
+ if *v == nil {
+ sv = &types.PredictiveScalingPredefinedMetricPair{}
+ } 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("PredefinedMetricType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.PredefinedMetricType = types.PredefinedMetricPairType(xtv)
+ }
+
+ case strings.EqualFold("ResourceLabel", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ResourceLabel = 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 awsAwsquery_deserializeDocumentPredictiveScalingPredefinedScalingMetric(v **types.PredictiveScalingPredefinedScalingMetric, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.PredictiveScalingPredefinedScalingMetric
+ if *v == nil {
+ sv = &types.PredictiveScalingPredefinedScalingMetric{}
+ } 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("PredefinedMetricType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.PredefinedMetricType = types.PredefinedScalingMetricType(xtv)
+ }
+
+ case strings.EqualFold("ResourceLabel", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ResourceLabel = 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 awsAwsquery_deserializeDocumentProcesses(v *[]types.ProcessType, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.ProcessType
+ if *v == nil {
+ sv = make([]types.ProcessType, 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.ProcessType
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsAwsquery_deserializeDocumentProcessType(&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 awsAwsquery_deserializeDocumentProcessesUnwrapped(v *[]types.ProcessType, decoder smithyxml.NodeDecoder) error {
+ var sv []types.ProcessType
+ if *v == nil {
+ sv = make([]types.ProcessType, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.ProcessType
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsAwsquery_deserializeDocumentProcessType(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsAwsquery_deserializeDocumentProcessType(v **types.ProcessType, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.ProcessType
+ if *v == nil {
+ sv = &types.ProcessType{}
+ } 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("ProcessName", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ProcessName = 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 awsAwsquery_deserializeDocumentRefreshPreferences(v **types.RefreshPreferences, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.RefreshPreferences
+ if *v == nil {
+ sv = &types.RefreshPreferences{}
+ } 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("CheckpointDelay", 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.CheckpointDelay = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("CheckpointPercentages", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsAwsquery_deserializeDocumentCheckpointPercentages(&sv.CheckpointPercentages, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("InstanceWarmup", 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.InstanceWarmup = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("MinHealthyPercentage", 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.MinHealthyPercentage = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("SkipMatching", 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 SkipMatching to be of type *bool, got %T instead", val)
+ }
+ sv.SkipMatching = ptr.Bool(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 awsAwsquery_deserializeDocumentResourceContentionFault(v **types.ResourceContentionFault, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.ResourceContentionFault
+ if *v == nil {
+ sv = &types.ResourceContentionFault{}
+ } 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 awsAwsquery_deserializeDocumentResourceInUseFault(v **types.ResourceInUseFault, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.ResourceInUseFault
+ if *v == nil {
+ sv = &types.ResourceInUseFault{}
+ } 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 awsAwsquery_deserializeDocumentScalingActivityInProgressFault(v **types.ScalingActivityInProgressFault, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.ScalingActivityInProgressFault
+ if *v == nil {
+ sv = &types.ScalingActivityInProgressFault{}
+ } 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 awsAwsquery_deserializeDocumentScalingPolicies(v *[]types.ScalingPolicy, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.ScalingPolicy
+ if *v == nil {
+ sv = make([]types.ScalingPolicy, 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.ScalingPolicy
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsAwsquery_deserializeDocumentScalingPolicy(&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 awsAwsquery_deserializeDocumentScalingPoliciesUnwrapped(v *[]types.ScalingPolicy, decoder smithyxml.NodeDecoder) error {
+ var sv []types.ScalingPolicy
+ if *v == nil {
+ sv = make([]types.ScalingPolicy, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.ScalingPolicy
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsAwsquery_deserializeDocumentScalingPolicy(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsAwsquery_deserializeDocumentScalingPolicy(v **types.ScalingPolicy, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.ScalingPolicy
+ if *v == nil {
+ sv = &types.ScalingPolicy{}
+ } 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("AdjustmentType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AdjustmentType = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("Alarms", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsAwsquery_deserializeDocumentAlarms(&sv.Alarms, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("AutoScalingGroupName", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AutoScalingGroupName = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("Cooldown", 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.Cooldown = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("Enabled", 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 ScalingPolicyEnabled to be of type *bool, got %T instead", val)
+ }
+ sv.Enabled = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("EstimatedInstanceWarmup", 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.EstimatedInstanceWarmup = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("MetricAggregationType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.MetricAggregationType = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("MinAdjustmentMagnitude", 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.MinAdjustmentMagnitude = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("MinAdjustmentStep", 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.MinAdjustmentStep = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("PolicyARN", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.PolicyARN = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("PolicyName", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.PolicyName = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("PolicyType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.PolicyType = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("PredictiveScalingConfiguration", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsAwsquery_deserializeDocumentPredictiveScalingConfiguration(&sv.PredictiveScalingConfiguration, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("ScalingAdjustment", 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.ScalingAdjustment = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("StepAdjustments", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsAwsquery_deserializeDocumentStepAdjustments(&sv.StepAdjustments, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("TargetTrackingConfiguration", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsAwsquery_deserializeDocumentTargetTrackingConfiguration(&sv.TargetTrackingConfiguration, 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 awsAwsquery_deserializeDocumentScheduledUpdateGroupAction(v **types.ScheduledUpdateGroupAction, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.ScheduledUpdateGroupAction
+ if *v == nil {
+ sv = &types.ScheduledUpdateGroupAction{}
+ } 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("AutoScalingGroupName", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AutoScalingGroupName = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("DesiredCapacity", 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.DesiredCapacity = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("EndTime", 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.EndTime = ptr.Time(t)
+ }
+
+ case strings.EqualFold("MaxSize", 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.MaxSize = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("MinSize", 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.MinSize = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("Recurrence", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Recurrence = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("ScheduledActionARN", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ScheduledActionARN = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("ScheduledActionName", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ScheduledActionName = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("StartTime", 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.StartTime = ptr.Time(t)
+ }
+
+ case strings.EqualFold("Time", 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.Time = ptr.Time(t)
+ }
+
+ case strings.EqualFold("TimeZone", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.TimeZone = 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 awsAwsquery_deserializeDocumentScheduledUpdateGroupActions(v *[]types.ScheduledUpdateGroupAction, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.ScheduledUpdateGroupAction
+ if *v == nil {
+ sv = make([]types.ScheduledUpdateGroupAction, 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.ScheduledUpdateGroupAction
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsAwsquery_deserializeDocumentScheduledUpdateGroupAction(&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 awsAwsquery_deserializeDocumentScheduledUpdateGroupActionsUnwrapped(v *[]types.ScheduledUpdateGroupAction, decoder smithyxml.NodeDecoder) error {
+ var sv []types.ScheduledUpdateGroupAction
+ if *v == nil {
+ sv = make([]types.ScheduledUpdateGroupAction, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.ScheduledUpdateGroupAction
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsAwsquery_deserializeDocumentScheduledUpdateGroupAction(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsAwsquery_deserializeDocumentSecurityGroups(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 awsAwsquery_deserializeDocumentSecurityGroupsUnwrapped(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 awsAwsquery_deserializeDocumentServiceLinkedRoleFailure(v **types.ServiceLinkedRoleFailure, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.ServiceLinkedRoleFailure
+ if *v == nil {
+ sv = &types.ServiceLinkedRoleFailure{}
+ } 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 awsAwsquery_deserializeDocumentStepAdjustment(v **types.StepAdjustment, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.StepAdjustment
+ if *v == nil {
+ sv = &types.StepAdjustment{}
+ } 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("MetricIntervalLowerBound", 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.MetricIntervalLowerBound = ptr.Float64(f64)
+ }
+
+ case strings.EqualFold("MetricIntervalUpperBound", 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.MetricIntervalUpperBound = ptr.Float64(f64)
+ }
+
+ case strings.EqualFold("ScalingAdjustment", 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.ScalingAdjustment = 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 awsAwsquery_deserializeDocumentStepAdjustments(v *[]types.StepAdjustment, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.StepAdjustment
+ if *v == nil {
+ sv = make([]types.StepAdjustment, 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.StepAdjustment
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsAwsquery_deserializeDocumentStepAdjustment(&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 awsAwsquery_deserializeDocumentStepAdjustmentsUnwrapped(v *[]types.StepAdjustment, decoder smithyxml.NodeDecoder) error {
+ var sv []types.StepAdjustment
+ if *v == nil {
+ sv = make([]types.StepAdjustment, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.StepAdjustment
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsAwsquery_deserializeDocumentStepAdjustment(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsAwsquery_deserializeDocumentSuspendedProcess(v **types.SuspendedProcess, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.SuspendedProcess
+ if *v == nil {
+ sv = &types.SuspendedProcess{}
+ } 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("ProcessName", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ProcessName = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("SuspensionReason", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.SuspensionReason = 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 awsAwsquery_deserializeDocumentSuspendedProcesses(v *[]types.SuspendedProcess, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.SuspendedProcess
+ if *v == nil {
+ sv = make([]types.SuspendedProcess, 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.SuspendedProcess
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsAwsquery_deserializeDocumentSuspendedProcess(&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 awsAwsquery_deserializeDocumentSuspendedProcessesUnwrapped(v *[]types.SuspendedProcess, decoder smithyxml.NodeDecoder) error {
+ var sv []types.SuspendedProcess
+ if *v == nil {
+ sv = make([]types.SuspendedProcess, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.SuspendedProcess
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsAwsquery_deserializeDocumentSuspendedProcess(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsAwsquery_deserializeDocumentTagDescription(v **types.TagDescription, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.TagDescription
+ if *v == nil {
+ sv = &types.TagDescription{}
+ } 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("PropagateAtLaunch", 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 PropagateAtLaunch to be of type *bool, got %T instead", val)
+ }
+ sv.PropagateAtLaunch = ptr.Bool(xtv)
+ }
+
+ 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 = 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 awsAwsquery_deserializeDocumentTagDescriptionList(v *[]types.TagDescription, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.TagDescription
+ if *v == nil {
+ sv = make([]types.TagDescription, 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.TagDescription
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsAwsquery_deserializeDocumentTagDescription(&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 awsAwsquery_deserializeDocumentTagDescriptionListUnwrapped(v *[]types.TagDescription, decoder smithyxml.NodeDecoder) error {
+ var sv []types.TagDescription
+ if *v == nil {
+ sv = make([]types.TagDescription, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.TagDescription
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsAwsquery_deserializeDocumentTagDescription(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsAwsquery_deserializeDocumentTargetGroupARNs(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 awsAwsquery_deserializeDocumentTargetGroupARNsUnwrapped(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 awsAwsquery_deserializeDocumentTargetTrackingConfiguration(v **types.TargetTrackingConfiguration, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.TargetTrackingConfiguration
+ if *v == nil {
+ sv = &types.TargetTrackingConfiguration{}
+ } 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("CustomizedMetricSpecification", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsAwsquery_deserializeDocumentCustomizedMetricSpecification(&sv.CustomizedMetricSpecification, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("DisableScaleIn", 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 DisableScaleIn to be of type *bool, got %T instead", val)
+ }
+ sv.DisableScaleIn = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("PredefinedMetricSpecification", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsAwsquery_deserializeDocumentPredefinedMetricSpecification(&sv.PredefinedMetricSpecification, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("TargetValue", 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.TargetValue = 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 awsAwsquery_deserializeDocumentTerminationPolicies(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 awsAwsquery_deserializeDocumentTerminationPoliciesUnwrapped(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 awsAwsquery_deserializeDocumentWarmPoolConfiguration(v **types.WarmPoolConfiguration, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.WarmPoolConfiguration
+ if *v == nil {
+ sv = &types.WarmPoolConfiguration{}
+ } 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("MaxGroupPreparedCapacity", 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.MaxGroupPreparedCapacity = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("MinSize", 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.MinSize = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("PoolState", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.PoolState = types.WarmPoolState(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.WarmPoolStatus(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 awsAwsquery_deserializeOpDocumentAttachLoadBalancersOutput(v **AttachLoadBalancersOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *AttachLoadBalancersOutput
+ if *v == nil {
+ sv = &AttachLoadBalancersOutput{}
+ } 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 {
+ 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 awsAwsquery_deserializeOpDocumentAttachLoadBalancerTargetGroupsOutput(v **AttachLoadBalancerTargetGroupsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *AttachLoadBalancerTargetGroupsOutput
+ if *v == nil {
+ sv = &AttachLoadBalancerTargetGroupsOutput{}
+ } 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 {
+ 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 awsAwsquery_deserializeOpDocumentBatchDeleteScheduledActionOutput(v **BatchDeleteScheduledActionOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *BatchDeleteScheduledActionOutput
+ if *v == nil {
+ sv = &BatchDeleteScheduledActionOutput{}
+ } 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("FailedScheduledActions", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsAwsquery_deserializeDocumentFailedScheduledUpdateGroupActionRequests(&sv.FailedScheduledActions, 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 awsAwsquery_deserializeOpDocumentBatchPutScheduledUpdateGroupActionOutput(v **BatchPutScheduledUpdateGroupActionOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *BatchPutScheduledUpdateGroupActionOutput
+ if *v == nil {
+ sv = &BatchPutScheduledUpdateGroupActionOutput{}
+ } 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("FailedScheduledUpdateGroupActions", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsAwsquery_deserializeDocumentFailedScheduledUpdateGroupActionRequests(&sv.FailedScheduledUpdateGroupActions, 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 awsAwsquery_deserializeOpDocumentCancelInstanceRefreshOutput(v **CancelInstanceRefreshOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *CancelInstanceRefreshOutput
+ if *v == nil {
+ sv = &CancelInstanceRefreshOutput{}
+ } 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("InstanceRefreshId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.InstanceRefreshId = 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 awsAwsquery_deserializeOpDocumentCompleteLifecycleActionOutput(v **CompleteLifecycleActionOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *CompleteLifecycleActionOutput
+ if *v == nil {
+ sv = &CompleteLifecycleActionOutput{}
+ } 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 {
+ 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 awsAwsquery_deserializeOpDocumentDeleteLifecycleHookOutput(v **DeleteLifecycleHookOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DeleteLifecycleHookOutput
+ if *v == nil {
+ sv = &DeleteLifecycleHookOutput{}
+ } 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 {
+ 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 awsAwsquery_deserializeOpDocumentDeleteWarmPoolOutput(v **DeleteWarmPoolOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DeleteWarmPoolOutput
+ if *v == nil {
+ sv = &DeleteWarmPoolOutput{}
+ } 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 {
+ 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 awsAwsquery_deserializeOpDocumentDescribeAccountLimitsOutput(v **DescribeAccountLimitsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeAccountLimitsOutput
+ if *v == nil {
+ sv = &DescribeAccountLimitsOutput{}
+ } 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("MaxNumberOfAutoScalingGroups", 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.MaxNumberOfAutoScalingGroups = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("MaxNumberOfLaunchConfigurations", 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.MaxNumberOfLaunchConfigurations = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("NumberOfAutoScalingGroups", 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.NumberOfAutoScalingGroups = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("NumberOfLaunchConfigurations", 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.NumberOfLaunchConfigurations = 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 awsAwsquery_deserializeOpDocumentDescribeAdjustmentTypesOutput(v **DescribeAdjustmentTypesOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeAdjustmentTypesOutput
+ if *v == nil {
+ sv = &DescribeAdjustmentTypesOutput{}
+ } 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("AdjustmentTypes", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsAwsquery_deserializeDocumentAdjustmentTypes(&sv.AdjustmentTypes, 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 awsAwsquery_deserializeOpDocumentDescribeAutoScalingGroupsOutput(v **DescribeAutoScalingGroupsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeAutoScalingGroupsOutput
+ if *v == nil {
+ sv = &DescribeAutoScalingGroupsOutput{}
+ } 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("AutoScalingGroups", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsAwsquery_deserializeDocumentAutoScalingGroups(&sv.AutoScalingGroups, 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
+}
+
+func awsAwsquery_deserializeOpDocumentDescribeAutoScalingInstancesOutput(v **DescribeAutoScalingInstancesOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeAutoScalingInstancesOutput
+ if *v == nil {
+ sv = &DescribeAutoScalingInstancesOutput{}
+ } 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("AutoScalingInstances", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsAwsquery_deserializeDocumentAutoScalingInstances(&sv.AutoScalingInstances, 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
+}
+
+func awsAwsquery_deserializeOpDocumentDescribeAutoScalingNotificationTypesOutput(v **DescribeAutoScalingNotificationTypesOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeAutoScalingNotificationTypesOutput
+ if *v == nil {
+ sv = &DescribeAutoScalingNotificationTypesOutput{}
+ } 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("AutoScalingNotificationTypes", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsAwsquery_deserializeDocumentAutoScalingNotificationTypes(&sv.AutoScalingNotificationTypes, 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 awsAwsquery_deserializeOpDocumentDescribeInstanceRefreshesOutput(v **DescribeInstanceRefreshesOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeInstanceRefreshesOutput
+ if *v == nil {
+ sv = &DescribeInstanceRefreshesOutput{}
+ } 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("InstanceRefreshes", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsAwsquery_deserializeDocumentInstanceRefreshes(&sv.InstanceRefreshes, 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
+}
+
+func awsAwsquery_deserializeOpDocumentDescribeLaunchConfigurationsOutput(v **DescribeLaunchConfigurationsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeLaunchConfigurationsOutput
+ if *v == nil {
+ sv = &DescribeLaunchConfigurationsOutput{}
+ } 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("LaunchConfigurations", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsAwsquery_deserializeDocumentLaunchConfigurations(&sv.LaunchConfigurations, 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
+}
+
+func awsAwsquery_deserializeOpDocumentDescribeLifecycleHooksOutput(v **DescribeLifecycleHooksOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeLifecycleHooksOutput
+ if *v == nil {
+ sv = &DescribeLifecycleHooksOutput{}
+ } 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("LifecycleHooks", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsAwsquery_deserializeDocumentLifecycleHooks(&sv.LifecycleHooks, 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 awsAwsquery_deserializeOpDocumentDescribeLifecycleHookTypesOutput(v **DescribeLifecycleHookTypesOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeLifecycleHookTypesOutput
+ if *v == nil {
+ sv = &DescribeLifecycleHookTypesOutput{}
+ } 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("LifecycleHookTypes", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsAwsquery_deserializeDocumentAutoScalingNotificationTypes(&sv.LifecycleHookTypes, 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 awsAwsquery_deserializeOpDocumentDescribeLoadBalancersOutput(v **DescribeLoadBalancersOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeLoadBalancersOutput
+ if *v == nil {
+ sv = &DescribeLoadBalancersOutput{}
+ } 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("LoadBalancers", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsAwsquery_deserializeDocumentLoadBalancerStates(&sv.LoadBalancers, 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
+}
+
+func awsAwsquery_deserializeOpDocumentDescribeLoadBalancerTargetGroupsOutput(v **DescribeLoadBalancerTargetGroupsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeLoadBalancerTargetGroupsOutput
+ if *v == nil {
+ sv = &DescribeLoadBalancerTargetGroupsOutput{}
+ } 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("LoadBalancerTargetGroups", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsAwsquery_deserializeDocumentLoadBalancerTargetGroupStates(&sv.LoadBalancerTargetGroups, 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
+}
+
+func awsAwsquery_deserializeOpDocumentDescribeMetricCollectionTypesOutput(v **DescribeMetricCollectionTypesOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeMetricCollectionTypesOutput
+ if *v == nil {
+ sv = &DescribeMetricCollectionTypesOutput{}
+ } 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("Granularities", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsAwsquery_deserializeDocumentMetricGranularityTypes(&sv.Granularities, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("Metrics", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsAwsquery_deserializeDocumentMetricCollectionTypes(&sv.Metrics, 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 awsAwsquery_deserializeOpDocumentDescribeNotificationConfigurationsOutput(v **DescribeNotificationConfigurationsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeNotificationConfigurationsOutput
+ if *v == nil {
+ sv = &DescribeNotificationConfigurationsOutput{}
+ } 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("NotificationConfigurations", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsAwsquery_deserializeDocumentNotificationConfigurations(&sv.NotificationConfigurations, 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 awsAwsquery_deserializeOpDocumentDescribePoliciesOutput(v **DescribePoliciesOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribePoliciesOutput
+ if *v == nil {
+ sv = &DescribePoliciesOutput{}
+ } 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("ScalingPolicies", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsAwsquery_deserializeDocumentScalingPolicies(&sv.ScalingPolicies, 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 awsAwsquery_deserializeOpDocumentDescribeScalingActivitiesOutput(v **DescribeScalingActivitiesOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeScalingActivitiesOutput
+ if *v == nil {
+ sv = &DescribeScalingActivitiesOutput{}
+ } 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("Activities", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsAwsquery_deserializeDocumentActivities(&sv.Activities, 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
+}
+
+func awsAwsquery_deserializeOpDocumentDescribeScalingProcessTypesOutput(v **DescribeScalingProcessTypesOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeScalingProcessTypesOutput
+ if *v == nil {
+ sv = &DescribeScalingProcessTypesOutput{}
+ } 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("Processes", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsAwsquery_deserializeDocumentProcesses(&sv.Processes, 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 awsAwsquery_deserializeOpDocumentDescribeScheduledActionsOutput(v **DescribeScheduledActionsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeScheduledActionsOutput
+ if *v == nil {
+ sv = &DescribeScheduledActionsOutput{}
+ } 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("ScheduledUpdateGroupActions", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsAwsquery_deserializeDocumentScheduledUpdateGroupActions(&sv.ScheduledUpdateGroupActions, 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 awsAwsquery_deserializeOpDocumentDescribeTagsOutput(v **DescribeTagsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeTagsOutput
+ if *v == nil {
+ sv = &DescribeTagsOutput{}
+ } 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("Tags", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsAwsquery_deserializeDocumentTagDescriptionList(&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 awsAwsquery_deserializeOpDocumentDescribeTerminationPolicyTypesOutput(v **DescribeTerminationPolicyTypesOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeTerminationPolicyTypesOutput
+ if *v == nil {
+ sv = &DescribeTerminationPolicyTypesOutput{}
+ } 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("TerminationPolicyTypes", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsAwsquery_deserializeDocumentTerminationPolicies(&sv.TerminationPolicyTypes, 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 awsAwsquery_deserializeOpDocumentDescribeWarmPoolOutput(v **DescribeWarmPoolOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeWarmPoolOutput
+ if *v == nil {
+ sv = &DescribeWarmPoolOutput{}
+ } 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("Instances", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsAwsquery_deserializeDocumentInstances(&sv.Instances, 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)
+ }
+
+ case strings.EqualFold("WarmPoolConfiguration", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsAwsquery_deserializeDocumentWarmPoolConfiguration(&sv.WarmPoolConfiguration, 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 awsAwsquery_deserializeOpDocumentDetachInstancesOutput(v **DetachInstancesOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DetachInstancesOutput
+ if *v == nil {
+ sv = &DetachInstancesOutput{}
+ } 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("Activities", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsAwsquery_deserializeDocumentActivities(&sv.Activities, 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 awsAwsquery_deserializeOpDocumentDetachLoadBalancersOutput(v **DetachLoadBalancersOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DetachLoadBalancersOutput
+ if *v == nil {
+ sv = &DetachLoadBalancersOutput{}
+ } 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 {
+ 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 awsAwsquery_deserializeOpDocumentDetachLoadBalancerTargetGroupsOutput(v **DetachLoadBalancerTargetGroupsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DetachLoadBalancerTargetGroupsOutput
+ if *v == nil {
+ sv = &DetachLoadBalancerTargetGroupsOutput{}
+ } 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 {
+ 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 awsAwsquery_deserializeOpDocumentEnterStandbyOutput(v **EnterStandbyOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *EnterStandbyOutput
+ if *v == nil {
+ sv = &EnterStandbyOutput{}
+ } 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("Activities", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsAwsquery_deserializeDocumentActivities(&sv.Activities, 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 awsAwsquery_deserializeOpDocumentExitStandbyOutput(v **ExitStandbyOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *ExitStandbyOutput
+ if *v == nil {
+ sv = &ExitStandbyOutput{}
+ } 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("Activities", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsAwsquery_deserializeDocumentActivities(&sv.Activities, 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 awsAwsquery_deserializeOpDocumentGetPredictiveScalingForecastOutput(v **GetPredictiveScalingForecastOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *GetPredictiveScalingForecastOutput
+ if *v == nil {
+ sv = &GetPredictiveScalingForecastOutput{}
+ } 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("CapacityForecast", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsAwsquery_deserializeDocumentCapacityForecast(&sv.CapacityForecast, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("LoadForecast", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsAwsquery_deserializeDocumentLoadForecasts(&sv.LoadForecast, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("UpdateTime", 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.UpdateTime = 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 awsAwsquery_deserializeOpDocumentPutLifecycleHookOutput(v **PutLifecycleHookOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *PutLifecycleHookOutput
+ if *v == nil {
+ sv = &PutLifecycleHookOutput{}
+ } 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 {
+ 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 awsAwsquery_deserializeOpDocumentPutScalingPolicyOutput(v **PutScalingPolicyOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *PutScalingPolicyOutput
+ if *v == nil {
+ sv = &PutScalingPolicyOutput{}
+ } 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("Alarms", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsAwsquery_deserializeDocumentAlarms(&sv.Alarms, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("PolicyARN", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.PolicyARN = 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 awsAwsquery_deserializeOpDocumentPutWarmPoolOutput(v **PutWarmPoolOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *PutWarmPoolOutput
+ if *v == nil {
+ sv = &PutWarmPoolOutput{}
+ } 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 {
+ 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 awsAwsquery_deserializeOpDocumentRecordLifecycleActionHeartbeatOutput(v **RecordLifecycleActionHeartbeatOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *RecordLifecycleActionHeartbeatOutput
+ if *v == nil {
+ sv = &RecordLifecycleActionHeartbeatOutput{}
+ } 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 {
+ 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 awsAwsquery_deserializeOpDocumentSetInstanceProtectionOutput(v **SetInstanceProtectionOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *SetInstanceProtectionOutput
+ if *v == nil {
+ sv = &SetInstanceProtectionOutput{}
+ } 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 {
+ 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 awsAwsquery_deserializeOpDocumentStartInstanceRefreshOutput(v **StartInstanceRefreshOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *StartInstanceRefreshOutput
+ if *v == nil {
+ sv = &StartInstanceRefreshOutput{}
+ } 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("InstanceRefreshId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.InstanceRefreshId = 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 awsAwsquery_deserializeOpDocumentTerminateInstanceInAutoScalingGroupOutput(v **TerminateInstanceInAutoScalingGroupOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *TerminateInstanceInAutoScalingGroupOutput
+ if *v == nil {
+ sv = &TerminateInstanceInAutoScalingGroupOutput{}
+ } 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("Activity", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsAwsquery_deserializeDocumentActivity(&sv.Activity, 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
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/doc.go
new file mode 100644
index 00000000..dad63e0b
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/doc.go
@@ -0,0 +1,16 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+// Package autoscaling provides the API client, operations, and parameter types for
+// Auto Scaling.
+//
+// Amazon EC2 Auto Scaling Amazon EC2 Auto Scaling is designed to automatically
+// launch or terminate EC2 instances based on user-defined scaling policies,
+// scheduled actions, and health checks. For more information about Amazon EC2 Auto
+// Scaling, see the Amazon EC2 Auto Scaling User Guide
+// (https://docs.aws.amazon.com/autoscaling/ec2/userguide/what-is-amazon-ec2-auto-scaling.html).
+// For information about granting IAM users required permissions for calls to
+// Amazon EC2 Auto Scaling, see Granting IAM users required permissions for Amazon
+// EC2 Auto Scaling resources
+// (https://docs.aws.amazon.com/autoscaling/ec2/APIReference/ec2-auto-scaling-api-permissions.html)
+// in the Amazon EC2 Auto Scaling API Reference.
+package autoscaling
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/endpoints.go
new file mode 100644
index 00000000..ac12f425
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/endpoints.go
@@ -0,0 +1,160 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package autoscaling
+
+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/autoscaling/internal/endpoints"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "net/url"
+)
+
+// 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")
+ }
+
+ var endpoint aws.Endpoint
+ endpoint, err = m.Resolver.ResolveEndpoint(awsmiddleware.GetRegion(ctx), m.Options)
+ 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 = "autoscaling"
+ }
+ 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.EndpointResolver
+ 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)
+ 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)
+}
+
+// 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.
+// awsResolver and fallbackResolver must not be nil
+func withEndpointResolver(awsResolver aws.EndpointResolver, fallbackResolver EndpointResolver) EndpointResolver {
+ return &wrappedEndpointResolver{
+ awsResolver: awsResolver,
+ resolver: fallbackResolver,
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/generated.json b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/generated.json
new file mode 100644
index 00000000..99e692d4
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/generated.json
@@ -0,0 +1,86 @@
+{
+ "dependencies": {
+ "github.com/aws/aws-sdk-go-v2": "v1.4.0",
+ "github.com/aws/smithy-go": "v1.4.0",
+ "github.com/jmespath/go-jmespath": "v0.4.0"
+ },
+ "files": [
+ "api_client.go",
+ "api_op_AttachInstances.go",
+ "api_op_AttachLoadBalancerTargetGroups.go",
+ "api_op_AttachLoadBalancers.go",
+ "api_op_BatchDeleteScheduledAction.go",
+ "api_op_BatchPutScheduledUpdateGroupAction.go",
+ "api_op_CancelInstanceRefresh.go",
+ "api_op_CompleteLifecycleAction.go",
+ "api_op_CreateAutoScalingGroup.go",
+ "api_op_CreateLaunchConfiguration.go",
+ "api_op_CreateOrUpdateTags.go",
+ "api_op_DeleteAutoScalingGroup.go",
+ "api_op_DeleteLaunchConfiguration.go",
+ "api_op_DeleteLifecycleHook.go",
+ "api_op_DeleteNotificationConfiguration.go",
+ "api_op_DeletePolicy.go",
+ "api_op_DeleteScheduledAction.go",
+ "api_op_DeleteTags.go",
+ "api_op_DeleteWarmPool.go",
+ "api_op_DescribeAccountLimits.go",
+ "api_op_DescribeAdjustmentTypes.go",
+ "api_op_DescribeAutoScalingGroups.go",
+ "api_op_DescribeAutoScalingInstances.go",
+ "api_op_DescribeAutoScalingNotificationTypes.go",
+ "api_op_DescribeInstanceRefreshes.go",
+ "api_op_DescribeLaunchConfigurations.go",
+ "api_op_DescribeLifecycleHookTypes.go",
+ "api_op_DescribeLifecycleHooks.go",
+ "api_op_DescribeLoadBalancerTargetGroups.go",
+ "api_op_DescribeLoadBalancers.go",
+ "api_op_DescribeMetricCollectionTypes.go",
+ "api_op_DescribeNotificationConfigurations.go",
+ "api_op_DescribePolicies.go",
+ "api_op_DescribeScalingActivities.go",
+ "api_op_DescribeScalingProcessTypes.go",
+ "api_op_DescribeScheduledActions.go",
+ "api_op_DescribeTags.go",
+ "api_op_DescribeTerminationPolicyTypes.go",
+ "api_op_DescribeWarmPool.go",
+ "api_op_DetachInstances.go",
+ "api_op_DetachLoadBalancerTargetGroups.go",
+ "api_op_DetachLoadBalancers.go",
+ "api_op_DisableMetricsCollection.go",
+ "api_op_EnableMetricsCollection.go",
+ "api_op_EnterStandby.go",
+ "api_op_ExecutePolicy.go",
+ "api_op_ExitStandby.go",
+ "api_op_GetPredictiveScalingForecast.go",
+ "api_op_PutLifecycleHook.go",
+ "api_op_PutNotificationConfiguration.go",
+ "api_op_PutScalingPolicy.go",
+ "api_op_PutScheduledUpdateGroupAction.go",
+ "api_op_PutWarmPool.go",
+ "api_op_RecordLifecycleActionHeartbeat.go",
+ "api_op_ResumeProcesses.go",
+ "api_op_SetDesiredCapacity.go",
+ "api_op_SetInstanceHealth.go",
+ "api_op_SetInstanceProtection.go",
+ "api_op_StartInstanceRefresh.go",
+ "api_op_SuspendProcesses.go",
+ "api_op_TerminateInstanceInAutoScalingGroup.go",
+ "api_op_UpdateAutoScalingGroup.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/autoscaling",
+ "unstable": false
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/go.mod b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/go.mod
new file mode 100644
index 00000000..15c55360
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/go.mod
@@ -0,0 +1,11 @@
+module github.com/aws/aws-sdk-go-v2/service/autoscaling
+
+go 1.15
+
+require (
+ github.com/aws/aws-sdk-go-v2 v1.9.1
+ github.com/aws/smithy-go v1.8.0
+ github.com/jmespath/go-jmespath v0.4.0
+)
+
+replace github.com/aws/aws-sdk-go-v2 => ../../
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/go.sum b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/go.sum
new file mode 100644
index 00000000..d5bb6d9e
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/go.sum
@@ -0,0 +1,20 @@
+github.com/aws/smithy-go v1.8.0 h1:AEwwwXQZtUwP5Mz506FeXXrKBe0jA8gVM+1gEcSRooc=
+github.com/aws/smithy-go v1.8.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E=
+github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
+github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ=
+github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg=
+github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo=
+github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8=
+github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U=
+github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
+github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
+github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
+golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
+golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
+gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10=
+gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/go_module_metadata.go
new file mode 100644
index 00000000..3c61e2b1
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/go_module_metadata.go
@@ -0,0 +1,6 @@
+// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT.
+
+package autoscaling
+
+// goModuleVersion is the tagged release for this module
+const goModuleVersion = "1.12.1"
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/internal/endpoints/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/internal/endpoints/endpoints.go
new file mode 100644
index 00000000..f76d1bb2
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/internal/endpoints/endpoints.go
@@ -0,0 +1,149 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package endpoints
+
+import (
+ "github.com/aws/aws-sdk-go-v2/aws"
+ "github.com/aws/aws-sdk-go-v2/internal/endpoints"
+ "regexp"
+)
+
+// Options is the endpoint resolver configuration options
+type Options struct {
+ DisableHTTPS bool
+}
+
+// Resolver Auto Scaling 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 := endpoints.Options{
+ DisableHTTPS: options.DisableHTTPS,
+ }
+ 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
+ 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+$"),
+ AwsUsGov: regexp.MustCompile("^us\\-gov\\-\\w+\\-\\d+$"),
+}
+
+var defaultPartitions = endpoints.Partitions{
+ {
+ ID: "aws",
+ Defaults: endpoints.Endpoint{
+ Hostname: "autoscaling.{region}.amazonaws.com",
+ Protocols: []string{"http", "https"},
+ SignatureVersions: []string{"v4"},
+ },
+ RegionRegex: partitionRegexp.Aws,
+ IsRegionalized: true,
+ Endpoints: endpoints.Endpoints{
+ "af-south-1": endpoints.Endpoint{},
+ "ap-east-1": endpoints.Endpoint{},
+ "ap-northeast-1": endpoints.Endpoint{},
+ "ap-northeast-2": endpoints.Endpoint{},
+ "ap-northeast-3": endpoints.Endpoint{},
+ "ap-south-1": endpoints.Endpoint{},
+ "ap-southeast-1": endpoints.Endpoint{},
+ "ap-southeast-2": endpoints.Endpoint{},
+ "ca-central-1": endpoints.Endpoint{},
+ "eu-central-1": endpoints.Endpoint{},
+ "eu-north-1": endpoints.Endpoint{},
+ "eu-south-1": endpoints.Endpoint{},
+ "eu-west-1": endpoints.Endpoint{},
+ "eu-west-2": endpoints.Endpoint{},
+ "eu-west-3": endpoints.Endpoint{},
+ "me-south-1": endpoints.Endpoint{},
+ "sa-east-1": endpoints.Endpoint{},
+ "us-east-1": endpoints.Endpoint{},
+ "us-east-2": endpoints.Endpoint{},
+ "us-west-1": endpoints.Endpoint{},
+ "us-west-2": endpoints.Endpoint{},
+ },
+ },
+ {
+ ID: "aws-cn",
+ Defaults: endpoints.Endpoint{
+ Hostname: "autoscaling.{region}.amazonaws.com.cn",
+ Protocols: []string{"http", "https"},
+ SignatureVersions: []string{"v4"},
+ },
+ RegionRegex: partitionRegexp.AwsCn,
+ IsRegionalized: true,
+ Endpoints: endpoints.Endpoints{
+ "cn-north-1": endpoints.Endpoint{},
+ "cn-northwest-1": endpoints.Endpoint{},
+ },
+ },
+ {
+ ID: "aws-iso",
+ Defaults: endpoints.Endpoint{
+ Hostname: "autoscaling.{region}.c2s.ic.gov",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ RegionRegex: partitionRegexp.AwsIso,
+ IsRegionalized: true,
+ Endpoints: endpoints.Endpoints{
+ "us-iso-east-1": endpoints.Endpoint{
+ Protocols: []string{"http", "https"},
+ },
+ },
+ },
+ {
+ ID: "aws-iso-b",
+ Defaults: endpoints.Endpoint{
+ Hostname: "autoscaling.{region}.sc2s.sgov.gov",
+ Protocols: []string{"http", "https"},
+ SignatureVersions: []string{"v4"},
+ },
+ RegionRegex: partitionRegexp.AwsIsoB,
+ IsRegionalized: true,
+ Endpoints: endpoints.Endpoints{
+ "us-isob-east-1": endpoints.Endpoint{},
+ },
+ },
+ {
+ ID: "aws-us-gov",
+ Defaults: endpoints.Endpoint{
+ Hostname: "autoscaling.{region}.amazonaws.com",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ RegionRegex: partitionRegexp.AwsUsGov,
+ IsRegionalized: true,
+ Endpoints: endpoints.Endpoints{
+ "us-gov-east-1": endpoints.Endpoint{
+ Protocols: []string{"http", "https"},
+ },
+ "us-gov-west-1": endpoints.Endpoint{
+ Protocols: []string{"http", "https"},
+ },
+ },
+ },
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/serializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/serializers.go
new file mode 100644
index 00000000..780f5af9
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/serializers.go
@@ -0,0 +1,6156 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package autoscaling
+
+import (
+ "bytes"
+ "context"
+ "fmt"
+ "github.com/aws/aws-sdk-go-v2/aws/protocol/query"
+ "github.com/aws/aws-sdk-go-v2/service/autoscaling/types"
+ smithy "github.com/aws/smithy-go"
+ "github.com/aws/smithy-go/encoding/httpbinding"
+ "github.com/aws/smithy-go/middleware"
+ smithytime "github.com/aws/smithy-go/time"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "math"
+)
+
+type awsAwsquery_serializeOpAttachInstances struct {
+}
+
+func (*awsAwsquery_serializeOpAttachInstances) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsquery_serializeOpAttachInstances) 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.(*AttachInstancesInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("AttachInstances")
+ body.Key("Version").String("2011-01-01")
+
+ if err := awsAwsquery_serializeOpDocumentAttachInstancesInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsquery_serializeOpAttachLoadBalancers struct {
+}
+
+func (*awsAwsquery_serializeOpAttachLoadBalancers) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsquery_serializeOpAttachLoadBalancers) 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.(*AttachLoadBalancersInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("AttachLoadBalancers")
+ body.Key("Version").String("2011-01-01")
+
+ if err := awsAwsquery_serializeOpDocumentAttachLoadBalancersInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsquery_serializeOpAttachLoadBalancerTargetGroups struct {
+}
+
+func (*awsAwsquery_serializeOpAttachLoadBalancerTargetGroups) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsquery_serializeOpAttachLoadBalancerTargetGroups) 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.(*AttachLoadBalancerTargetGroupsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("AttachLoadBalancerTargetGroups")
+ body.Key("Version").String("2011-01-01")
+
+ if err := awsAwsquery_serializeOpDocumentAttachLoadBalancerTargetGroupsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsquery_serializeOpBatchDeleteScheduledAction struct {
+}
+
+func (*awsAwsquery_serializeOpBatchDeleteScheduledAction) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsquery_serializeOpBatchDeleteScheduledAction) 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.(*BatchDeleteScheduledActionInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("BatchDeleteScheduledAction")
+ body.Key("Version").String("2011-01-01")
+
+ if err := awsAwsquery_serializeOpDocumentBatchDeleteScheduledActionInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsquery_serializeOpBatchPutScheduledUpdateGroupAction struct {
+}
+
+func (*awsAwsquery_serializeOpBatchPutScheduledUpdateGroupAction) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsquery_serializeOpBatchPutScheduledUpdateGroupAction) 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.(*BatchPutScheduledUpdateGroupActionInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("BatchPutScheduledUpdateGroupAction")
+ body.Key("Version").String("2011-01-01")
+
+ if err := awsAwsquery_serializeOpDocumentBatchPutScheduledUpdateGroupActionInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsquery_serializeOpCancelInstanceRefresh struct {
+}
+
+func (*awsAwsquery_serializeOpCancelInstanceRefresh) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsquery_serializeOpCancelInstanceRefresh) 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.(*CancelInstanceRefreshInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("CancelInstanceRefresh")
+ body.Key("Version").String("2011-01-01")
+
+ if err := awsAwsquery_serializeOpDocumentCancelInstanceRefreshInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsquery_serializeOpCompleteLifecycleAction struct {
+}
+
+func (*awsAwsquery_serializeOpCompleteLifecycleAction) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsquery_serializeOpCompleteLifecycleAction) 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.(*CompleteLifecycleActionInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("CompleteLifecycleAction")
+ body.Key("Version").String("2011-01-01")
+
+ if err := awsAwsquery_serializeOpDocumentCompleteLifecycleActionInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsquery_serializeOpCreateAutoScalingGroup struct {
+}
+
+func (*awsAwsquery_serializeOpCreateAutoScalingGroup) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsquery_serializeOpCreateAutoScalingGroup) 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.(*CreateAutoScalingGroupInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("CreateAutoScalingGroup")
+ body.Key("Version").String("2011-01-01")
+
+ if err := awsAwsquery_serializeOpDocumentCreateAutoScalingGroupInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsquery_serializeOpCreateLaunchConfiguration struct {
+}
+
+func (*awsAwsquery_serializeOpCreateLaunchConfiguration) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsquery_serializeOpCreateLaunchConfiguration) 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.(*CreateLaunchConfigurationInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("CreateLaunchConfiguration")
+ body.Key("Version").String("2011-01-01")
+
+ if err := awsAwsquery_serializeOpDocumentCreateLaunchConfigurationInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsquery_serializeOpCreateOrUpdateTags struct {
+}
+
+func (*awsAwsquery_serializeOpCreateOrUpdateTags) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsquery_serializeOpCreateOrUpdateTags) 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.(*CreateOrUpdateTagsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("CreateOrUpdateTags")
+ body.Key("Version").String("2011-01-01")
+
+ if err := awsAwsquery_serializeOpDocumentCreateOrUpdateTagsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsquery_serializeOpDeleteAutoScalingGroup struct {
+}
+
+func (*awsAwsquery_serializeOpDeleteAutoScalingGroup) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsquery_serializeOpDeleteAutoScalingGroup) 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.(*DeleteAutoScalingGroupInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DeleteAutoScalingGroup")
+ body.Key("Version").String("2011-01-01")
+
+ if err := awsAwsquery_serializeOpDocumentDeleteAutoScalingGroupInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsquery_serializeOpDeleteLaunchConfiguration struct {
+}
+
+func (*awsAwsquery_serializeOpDeleteLaunchConfiguration) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsquery_serializeOpDeleteLaunchConfiguration) 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.(*DeleteLaunchConfigurationInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DeleteLaunchConfiguration")
+ body.Key("Version").String("2011-01-01")
+
+ if err := awsAwsquery_serializeOpDocumentDeleteLaunchConfigurationInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsquery_serializeOpDeleteLifecycleHook struct {
+}
+
+func (*awsAwsquery_serializeOpDeleteLifecycleHook) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsquery_serializeOpDeleteLifecycleHook) 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.(*DeleteLifecycleHookInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DeleteLifecycleHook")
+ body.Key("Version").String("2011-01-01")
+
+ if err := awsAwsquery_serializeOpDocumentDeleteLifecycleHookInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsquery_serializeOpDeleteNotificationConfiguration struct {
+}
+
+func (*awsAwsquery_serializeOpDeleteNotificationConfiguration) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsquery_serializeOpDeleteNotificationConfiguration) 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.(*DeleteNotificationConfigurationInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DeleteNotificationConfiguration")
+ body.Key("Version").String("2011-01-01")
+
+ if err := awsAwsquery_serializeOpDocumentDeleteNotificationConfigurationInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsquery_serializeOpDeletePolicy struct {
+}
+
+func (*awsAwsquery_serializeOpDeletePolicy) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsquery_serializeOpDeletePolicy) 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.(*DeletePolicyInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DeletePolicy")
+ body.Key("Version").String("2011-01-01")
+
+ if err := awsAwsquery_serializeOpDocumentDeletePolicyInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsquery_serializeOpDeleteScheduledAction struct {
+}
+
+func (*awsAwsquery_serializeOpDeleteScheduledAction) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsquery_serializeOpDeleteScheduledAction) 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.(*DeleteScheduledActionInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DeleteScheduledAction")
+ body.Key("Version").String("2011-01-01")
+
+ if err := awsAwsquery_serializeOpDocumentDeleteScheduledActionInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsquery_serializeOpDeleteTags struct {
+}
+
+func (*awsAwsquery_serializeOpDeleteTags) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsquery_serializeOpDeleteTags) 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.(*DeleteTagsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DeleteTags")
+ body.Key("Version").String("2011-01-01")
+
+ if err := awsAwsquery_serializeOpDocumentDeleteTagsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsquery_serializeOpDeleteWarmPool struct {
+}
+
+func (*awsAwsquery_serializeOpDeleteWarmPool) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsquery_serializeOpDeleteWarmPool) 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.(*DeleteWarmPoolInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DeleteWarmPool")
+ body.Key("Version").String("2011-01-01")
+
+ if err := awsAwsquery_serializeOpDocumentDeleteWarmPoolInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsquery_serializeOpDescribeAccountLimits struct {
+}
+
+func (*awsAwsquery_serializeOpDescribeAccountLimits) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsquery_serializeOpDescribeAccountLimits) 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.(*DescribeAccountLimitsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeAccountLimits")
+ body.Key("Version").String("2011-01-01")
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsquery_serializeOpDescribeAdjustmentTypes struct {
+}
+
+func (*awsAwsquery_serializeOpDescribeAdjustmentTypes) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsquery_serializeOpDescribeAdjustmentTypes) 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.(*DescribeAdjustmentTypesInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeAdjustmentTypes")
+ body.Key("Version").String("2011-01-01")
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsquery_serializeOpDescribeAutoScalingGroups struct {
+}
+
+func (*awsAwsquery_serializeOpDescribeAutoScalingGroups) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsquery_serializeOpDescribeAutoScalingGroups) 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.(*DescribeAutoScalingGroupsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeAutoScalingGroups")
+ body.Key("Version").String("2011-01-01")
+
+ if err := awsAwsquery_serializeOpDocumentDescribeAutoScalingGroupsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsquery_serializeOpDescribeAutoScalingInstances struct {
+}
+
+func (*awsAwsquery_serializeOpDescribeAutoScalingInstances) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsquery_serializeOpDescribeAutoScalingInstances) 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.(*DescribeAutoScalingInstancesInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeAutoScalingInstances")
+ body.Key("Version").String("2011-01-01")
+
+ if err := awsAwsquery_serializeOpDocumentDescribeAutoScalingInstancesInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsquery_serializeOpDescribeAutoScalingNotificationTypes struct {
+}
+
+func (*awsAwsquery_serializeOpDescribeAutoScalingNotificationTypes) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsquery_serializeOpDescribeAutoScalingNotificationTypes) 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.(*DescribeAutoScalingNotificationTypesInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeAutoScalingNotificationTypes")
+ body.Key("Version").String("2011-01-01")
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsquery_serializeOpDescribeInstanceRefreshes struct {
+}
+
+func (*awsAwsquery_serializeOpDescribeInstanceRefreshes) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsquery_serializeOpDescribeInstanceRefreshes) 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.(*DescribeInstanceRefreshesInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeInstanceRefreshes")
+ body.Key("Version").String("2011-01-01")
+
+ if err := awsAwsquery_serializeOpDocumentDescribeInstanceRefreshesInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsquery_serializeOpDescribeLaunchConfigurations struct {
+}
+
+func (*awsAwsquery_serializeOpDescribeLaunchConfigurations) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsquery_serializeOpDescribeLaunchConfigurations) 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.(*DescribeLaunchConfigurationsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeLaunchConfigurations")
+ body.Key("Version").String("2011-01-01")
+
+ if err := awsAwsquery_serializeOpDocumentDescribeLaunchConfigurationsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsquery_serializeOpDescribeLifecycleHooks struct {
+}
+
+func (*awsAwsquery_serializeOpDescribeLifecycleHooks) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsquery_serializeOpDescribeLifecycleHooks) 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.(*DescribeLifecycleHooksInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeLifecycleHooks")
+ body.Key("Version").String("2011-01-01")
+
+ if err := awsAwsquery_serializeOpDocumentDescribeLifecycleHooksInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsquery_serializeOpDescribeLifecycleHookTypes struct {
+}
+
+func (*awsAwsquery_serializeOpDescribeLifecycleHookTypes) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsquery_serializeOpDescribeLifecycleHookTypes) 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.(*DescribeLifecycleHookTypesInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeLifecycleHookTypes")
+ body.Key("Version").String("2011-01-01")
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsquery_serializeOpDescribeLoadBalancers struct {
+}
+
+func (*awsAwsquery_serializeOpDescribeLoadBalancers) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsquery_serializeOpDescribeLoadBalancers) 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.(*DescribeLoadBalancersInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeLoadBalancers")
+ body.Key("Version").String("2011-01-01")
+
+ if err := awsAwsquery_serializeOpDocumentDescribeLoadBalancersInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsquery_serializeOpDescribeLoadBalancerTargetGroups struct {
+}
+
+func (*awsAwsquery_serializeOpDescribeLoadBalancerTargetGroups) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsquery_serializeOpDescribeLoadBalancerTargetGroups) 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.(*DescribeLoadBalancerTargetGroupsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeLoadBalancerTargetGroups")
+ body.Key("Version").String("2011-01-01")
+
+ if err := awsAwsquery_serializeOpDocumentDescribeLoadBalancerTargetGroupsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsquery_serializeOpDescribeMetricCollectionTypes struct {
+}
+
+func (*awsAwsquery_serializeOpDescribeMetricCollectionTypes) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsquery_serializeOpDescribeMetricCollectionTypes) 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.(*DescribeMetricCollectionTypesInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeMetricCollectionTypes")
+ body.Key("Version").String("2011-01-01")
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsquery_serializeOpDescribeNotificationConfigurations struct {
+}
+
+func (*awsAwsquery_serializeOpDescribeNotificationConfigurations) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsquery_serializeOpDescribeNotificationConfigurations) 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.(*DescribeNotificationConfigurationsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeNotificationConfigurations")
+ body.Key("Version").String("2011-01-01")
+
+ if err := awsAwsquery_serializeOpDocumentDescribeNotificationConfigurationsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsquery_serializeOpDescribePolicies struct {
+}
+
+func (*awsAwsquery_serializeOpDescribePolicies) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsquery_serializeOpDescribePolicies) 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.(*DescribePoliciesInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribePolicies")
+ body.Key("Version").String("2011-01-01")
+
+ if err := awsAwsquery_serializeOpDocumentDescribePoliciesInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsquery_serializeOpDescribeScalingActivities struct {
+}
+
+func (*awsAwsquery_serializeOpDescribeScalingActivities) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsquery_serializeOpDescribeScalingActivities) 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.(*DescribeScalingActivitiesInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeScalingActivities")
+ body.Key("Version").String("2011-01-01")
+
+ if err := awsAwsquery_serializeOpDocumentDescribeScalingActivitiesInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsquery_serializeOpDescribeScalingProcessTypes struct {
+}
+
+func (*awsAwsquery_serializeOpDescribeScalingProcessTypes) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsquery_serializeOpDescribeScalingProcessTypes) 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.(*DescribeScalingProcessTypesInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeScalingProcessTypes")
+ body.Key("Version").String("2011-01-01")
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsquery_serializeOpDescribeScheduledActions struct {
+}
+
+func (*awsAwsquery_serializeOpDescribeScheduledActions) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsquery_serializeOpDescribeScheduledActions) 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.(*DescribeScheduledActionsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeScheduledActions")
+ body.Key("Version").String("2011-01-01")
+
+ if err := awsAwsquery_serializeOpDocumentDescribeScheduledActionsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsquery_serializeOpDescribeTags struct {
+}
+
+func (*awsAwsquery_serializeOpDescribeTags) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsquery_serializeOpDescribeTags) 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.(*DescribeTagsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeTags")
+ body.Key("Version").String("2011-01-01")
+
+ if err := awsAwsquery_serializeOpDocumentDescribeTagsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsquery_serializeOpDescribeTerminationPolicyTypes struct {
+}
+
+func (*awsAwsquery_serializeOpDescribeTerminationPolicyTypes) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsquery_serializeOpDescribeTerminationPolicyTypes) 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.(*DescribeTerminationPolicyTypesInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeTerminationPolicyTypes")
+ body.Key("Version").String("2011-01-01")
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsquery_serializeOpDescribeWarmPool struct {
+}
+
+func (*awsAwsquery_serializeOpDescribeWarmPool) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsquery_serializeOpDescribeWarmPool) 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.(*DescribeWarmPoolInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeWarmPool")
+ body.Key("Version").String("2011-01-01")
+
+ if err := awsAwsquery_serializeOpDocumentDescribeWarmPoolInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsquery_serializeOpDetachInstances struct {
+}
+
+func (*awsAwsquery_serializeOpDetachInstances) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsquery_serializeOpDetachInstances) 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.(*DetachInstancesInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DetachInstances")
+ body.Key("Version").String("2011-01-01")
+
+ if err := awsAwsquery_serializeOpDocumentDetachInstancesInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsquery_serializeOpDetachLoadBalancers struct {
+}
+
+func (*awsAwsquery_serializeOpDetachLoadBalancers) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsquery_serializeOpDetachLoadBalancers) 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.(*DetachLoadBalancersInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DetachLoadBalancers")
+ body.Key("Version").String("2011-01-01")
+
+ if err := awsAwsquery_serializeOpDocumentDetachLoadBalancersInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsquery_serializeOpDetachLoadBalancerTargetGroups struct {
+}
+
+func (*awsAwsquery_serializeOpDetachLoadBalancerTargetGroups) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsquery_serializeOpDetachLoadBalancerTargetGroups) 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.(*DetachLoadBalancerTargetGroupsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DetachLoadBalancerTargetGroups")
+ body.Key("Version").String("2011-01-01")
+
+ if err := awsAwsquery_serializeOpDocumentDetachLoadBalancerTargetGroupsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsquery_serializeOpDisableMetricsCollection struct {
+}
+
+func (*awsAwsquery_serializeOpDisableMetricsCollection) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsquery_serializeOpDisableMetricsCollection) 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.(*DisableMetricsCollectionInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DisableMetricsCollection")
+ body.Key("Version").String("2011-01-01")
+
+ if err := awsAwsquery_serializeOpDocumentDisableMetricsCollectionInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsquery_serializeOpEnableMetricsCollection struct {
+}
+
+func (*awsAwsquery_serializeOpEnableMetricsCollection) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsquery_serializeOpEnableMetricsCollection) 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.(*EnableMetricsCollectionInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("EnableMetricsCollection")
+ body.Key("Version").String("2011-01-01")
+
+ if err := awsAwsquery_serializeOpDocumentEnableMetricsCollectionInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsquery_serializeOpEnterStandby struct {
+}
+
+func (*awsAwsquery_serializeOpEnterStandby) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsquery_serializeOpEnterStandby) 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.(*EnterStandbyInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("EnterStandby")
+ body.Key("Version").String("2011-01-01")
+
+ if err := awsAwsquery_serializeOpDocumentEnterStandbyInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsquery_serializeOpExecutePolicy struct {
+}
+
+func (*awsAwsquery_serializeOpExecutePolicy) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsquery_serializeOpExecutePolicy) 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.(*ExecutePolicyInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("ExecutePolicy")
+ body.Key("Version").String("2011-01-01")
+
+ if err := awsAwsquery_serializeOpDocumentExecutePolicyInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsquery_serializeOpExitStandby struct {
+}
+
+func (*awsAwsquery_serializeOpExitStandby) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsquery_serializeOpExitStandby) 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.(*ExitStandbyInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("ExitStandby")
+ body.Key("Version").String("2011-01-01")
+
+ if err := awsAwsquery_serializeOpDocumentExitStandbyInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsquery_serializeOpGetPredictiveScalingForecast struct {
+}
+
+func (*awsAwsquery_serializeOpGetPredictiveScalingForecast) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsquery_serializeOpGetPredictiveScalingForecast) 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.(*GetPredictiveScalingForecastInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("GetPredictiveScalingForecast")
+ body.Key("Version").String("2011-01-01")
+
+ if err := awsAwsquery_serializeOpDocumentGetPredictiveScalingForecastInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsquery_serializeOpPutLifecycleHook struct {
+}
+
+func (*awsAwsquery_serializeOpPutLifecycleHook) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsquery_serializeOpPutLifecycleHook) 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.(*PutLifecycleHookInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("PutLifecycleHook")
+ body.Key("Version").String("2011-01-01")
+
+ if err := awsAwsquery_serializeOpDocumentPutLifecycleHookInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsquery_serializeOpPutNotificationConfiguration struct {
+}
+
+func (*awsAwsquery_serializeOpPutNotificationConfiguration) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsquery_serializeOpPutNotificationConfiguration) 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.(*PutNotificationConfigurationInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("PutNotificationConfiguration")
+ body.Key("Version").String("2011-01-01")
+
+ if err := awsAwsquery_serializeOpDocumentPutNotificationConfigurationInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsquery_serializeOpPutScalingPolicy struct {
+}
+
+func (*awsAwsquery_serializeOpPutScalingPolicy) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsquery_serializeOpPutScalingPolicy) 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.(*PutScalingPolicyInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("PutScalingPolicy")
+ body.Key("Version").String("2011-01-01")
+
+ if err := awsAwsquery_serializeOpDocumentPutScalingPolicyInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsquery_serializeOpPutScheduledUpdateGroupAction struct {
+}
+
+func (*awsAwsquery_serializeOpPutScheduledUpdateGroupAction) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsquery_serializeOpPutScheduledUpdateGroupAction) 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.(*PutScheduledUpdateGroupActionInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("PutScheduledUpdateGroupAction")
+ body.Key("Version").String("2011-01-01")
+
+ if err := awsAwsquery_serializeOpDocumentPutScheduledUpdateGroupActionInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsquery_serializeOpPutWarmPool struct {
+}
+
+func (*awsAwsquery_serializeOpPutWarmPool) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsquery_serializeOpPutWarmPool) 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.(*PutWarmPoolInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("PutWarmPool")
+ body.Key("Version").String("2011-01-01")
+
+ if err := awsAwsquery_serializeOpDocumentPutWarmPoolInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsquery_serializeOpRecordLifecycleActionHeartbeat struct {
+}
+
+func (*awsAwsquery_serializeOpRecordLifecycleActionHeartbeat) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsquery_serializeOpRecordLifecycleActionHeartbeat) 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.(*RecordLifecycleActionHeartbeatInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("RecordLifecycleActionHeartbeat")
+ body.Key("Version").String("2011-01-01")
+
+ if err := awsAwsquery_serializeOpDocumentRecordLifecycleActionHeartbeatInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsquery_serializeOpResumeProcesses struct {
+}
+
+func (*awsAwsquery_serializeOpResumeProcesses) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsquery_serializeOpResumeProcesses) 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.(*ResumeProcessesInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("ResumeProcesses")
+ body.Key("Version").String("2011-01-01")
+
+ if err := awsAwsquery_serializeOpDocumentResumeProcessesInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsquery_serializeOpSetDesiredCapacity struct {
+}
+
+func (*awsAwsquery_serializeOpSetDesiredCapacity) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsquery_serializeOpSetDesiredCapacity) 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.(*SetDesiredCapacityInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("SetDesiredCapacity")
+ body.Key("Version").String("2011-01-01")
+
+ if err := awsAwsquery_serializeOpDocumentSetDesiredCapacityInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsquery_serializeOpSetInstanceHealth struct {
+}
+
+func (*awsAwsquery_serializeOpSetInstanceHealth) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsquery_serializeOpSetInstanceHealth) 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.(*SetInstanceHealthInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("SetInstanceHealth")
+ body.Key("Version").String("2011-01-01")
+
+ if err := awsAwsquery_serializeOpDocumentSetInstanceHealthInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsquery_serializeOpSetInstanceProtection struct {
+}
+
+func (*awsAwsquery_serializeOpSetInstanceProtection) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsquery_serializeOpSetInstanceProtection) 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.(*SetInstanceProtectionInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("SetInstanceProtection")
+ body.Key("Version").String("2011-01-01")
+
+ if err := awsAwsquery_serializeOpDocumentSetInstanceProtectionInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsquery_serializeOpStartInstanceRefresh struct {
+}
+
+func (*awsAwsquery_serializeOpStartInstanceRefresh) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsquery_serializeOpStartInstanceRefresh) 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.(*StartInstanceRefreshInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("StartInstanceRefresh")
+ body.Key("Version").String("2011-01-01")
+
+ if err := awsAwsquery_serializeOpDocumentStartInstanceRefreshInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsquery_serializeOpSuspendProcesses struct {
+}
+
+func (*awsAwsquery_serializeOpSuspendProcesses) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsquery_serializeOpSuspendProcesses) 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.(*SuspendProcessesInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("SuspendProcesses")
+ body.Key("Version").String("2011-01-01")
+
+ if err := awsAwsquery_serializeOpDocumentSuspendProcessesInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsquery_serializeOpTerminateInstanceInAutoScalingGroup struct {
+}
+
+func (*awsAwsquery_serializeOpTerminateInstanceInAutoScalingGroup) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsquery_serializeOpTerminateInstanceInAutoScalingGroup) 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.(*TerminateInstanceInAutoScalingGroupInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("TerminateInstanceInAutoScalingGroup")
+ body.Key("Version").String("2011-01-01")
+
+ if err := awsAwsquery_serializeOpDocumentTerminateInstanceInAutoScalingGroupInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsquery_serializeOpUpdateAutoScalingGroup struct {
+}
+
+func (*awsAwsquery_serializeOpUpdateAutoScalingGroup) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsquery_serializeOpUpdateAutoScalingGroup) 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.(*UpdateAutoScalingGroupInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("UpdateAutoScalingGroup")
+ body.Key("Version").String("2011-01-01")
+
+ if err := awsAwsquery_serializeOpDocumentUpdateAutoScalingGroupInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsAwsquery_serializeDocumentActivityIds(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("member")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsAwsquery_serializeDocumentAutoScalingGroupNames(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("member")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsAwsquery_serializeDocumentAutoScalingNotificationTypes(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("member")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsAwsquery_serializeDocumentAvailabilityZones(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("member")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsAwsquery_serializeDocumentBlockDeviceMapping(v *types.BlockDeviceMapping, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DeviceName != nil {
+ objectKey := object.Key("DeviceName")
+ objectKey.String(*v.DeviceName)
+ }
+
+ if v.Ebs != nil {
+ objectKey := object.Key("Ebs")
+ if err := awsAwsquery_serializeDocumentEbs(v.Ebs, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.NoDevice != nil {
+ objectKey := object.Key("NoDevice")
+ objectKey.Boolean(*v.NoDevice)
+ }
+
+ if v.VirtualName != nil {
+ objectKey := object.Key("VirtualName")
+ objectKey.String(*v.VirtualName)
+ }
+
+ return nil
+}
+
+func awsAwsquery_serializeDocumentBlockDeviceMappings(v []types.BlockDeviceMapping, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("member")
+
+ for i := range v {
+ av := array.Value()
+ if err := awsAwsquery_serializeDocumentBlockDeviceMapping(&v[i], av); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsAwsquery_serializeDocumentCheckpointPercentages(v []int32, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("member")
+
+ for i := range v {
+ av := array.Value()
+ av.Integer(v[i])
+ }
+ return nil
+}
+
+func awsAwsquery_serializeDocumentClassicLinkVPCSecurityGroups(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("member")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsAwsquery_serializeDocumentCustomizedMetricSpecification(v *types.CustomizedMetricSpecification, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Dimensions != nil {
+ objectKey := object.Key("Dimensions")
+ if err := awsAwsquery_serializeDocumentMetricDimensions(v.Dimensions, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MetricName != nil {
+ objectKey := object.Key("MetricName")
+ objectKey.String(*v.MetricName)
+ }
+
+ if v.Namespace != nil {
+ objectKey := object.Key("Namespace")
+ objectKey.String(*v.Namespace)
+ }
+
+ if len(v.Statistic) > 0 {
+ objectKey := object.Key("Statistic")
+ objectKey.String(string(v.Statistic))
+ }
+
+ if v.Unit != nil {
+ objectKey := object.Key("Unit")
+ objectKey.String(*v.Unit)
+ }
+
+ return nil
+}
+
+func awsAwsquery_serializeDocumentDesiredConfiguration(v *types.DesiredConfiguration, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.LaunchTemplate != nil {
+ objectKey := object.Key("LaunchTemplate")
+ if err := awsAwsquery_serializeDocumentLaunchTemplateSpecification(v.LaunchTemplate, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MixedInstancesPolicy != nil {
+ objectKey := object.Key("MixedInstancesPolicy")
+ if err := awsAwsquery_serializeDocumentMixedInstancesPolicy(v.MixedInstancesPolicy, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsAwsquery_serializeDocumentEbs(v *types.Ebs, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DeleteOnTermination != nil {
+ objectKey := object.Key("DeleteOnTermination")
+ objectKey.Boolean(*v.DeleteOnTermination)
+ }
+
+ if v.Encrypted != nil {
+ objectKey := object.Key("Encrypted")
+ objectKey.Boolean(*v.Encrypted)
+ }
+
+ if v.Iops != nil {
+ objectKey := object.Key("Iops")
+ objectKey.Integer(*v.Iops)
+ }
+
+ if v.SnapshotId != nil {
+ objectKey := object.Key("SnapshotId")
+ objectKey.String(*v.SnapshotId)
+ }
+
+ if v.Throughput != nil {
+ objectKey := object.Key("Throughput")
+ objectKey.Integer(*v.Throughput)
+ }
+
+ if v.VolumeSize != nil {
+ objectKey := object.Key("VolumeSize")
+ objectKey.Integer(*v.VolumeSize)
+ }
+
+ if v.VolumeType != nil {
+ objectKey := object.Key("VolumeType")
+ objectKey.String(*v.VolumeType)
+ }
+
+ return nil
+}
+
+func awsAwsquery_serializeDocumentFilter(v *types.Filter, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Name != nil {
+ objectKey := object.Key("Name")
+ objectKey.String(*v.Name)
+ }
+
+ if v.Values != nil {
+ objectKey := object.Key("Values")
+ if err := awsAwsquery_serializeDocumentValues(v.Values, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsAwsquery_serializeDocumentFilters(v []types.Filter, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("member")
+
+ for i := range v {
+ av := array.Value()
+ if err := awsAwsquery_serializeDocumentFilter(&v[i], av); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsAwsquery_serializeDocumentInstanceIds(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("member")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsAwsquery_serializeDocumentInstanceMetadataOptions(v *types.InstanceMetadataOptions, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if len(v.HttpEndpoint) > 0 {
+ objectKey := object.Key("HttpEndpoint")
+ objectKey.String(string(v.HttpEndpoint))
+ }
+
+ if v.HttpPutResponseHopLimit != nil {
+ objectKey := object.Key("HttpPutResponseHopLimit")
+ objectKey.Integer(*v.HttpPutResponseHopLimit)
+ }
+
+ if len(v.HttpTokens) > 0 {
+ objectKey := object.Key("HttpTokens")
+ objectKey.String(string(v.HttpTokens))
+ }
+
+ return nil
+}
+
+func awsAwsquery_serializeDocumentInstanceMonitoring(v *types.InstanceMonitoring, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Enabled != nil {
+ objectKey := object.Key("Enabled")
+ objectKey.Boolean(*v.Enabled)
+ }
+
+ return nil
+}
+
+func awsAwsquery_serializeDocumentInstanceRefreshIds(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("member")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsAwsquery_serializeDocumentInstancesDistribution(v *types.InstancesDistribution, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.OnDemandAllocationStrategy != nil {
+ objectKey := object.Key("OnDemandAllocationStrategy")
+ objectKey.String(*v.OnDemandAllocationStrategy)
+ }
+
+ if v.OnDemandBaseCapacity != nil {
+ objectKey := object.Key("OnDemandBaseCapacity")
+ objectKey.Integer(*v.OnDemandBaseCapacity)
+ }
+
+ if v.OnDemandPercentageAboveBaseCapacity != nil {
+ objectKey := object.Key("OnDemandPercentageAboveBaseCapacity")
+ objectKey.Integer(*v.OnDemandPercentageAboveBaseCapacity)
+ }
+
+ if v.SpotAllocationStrategy != nil {
+ objectKey := object.Key("SpotAllocationStrategy")
+ objectKey.String(*v.SpotAllocationStrategy)
+ }
+
+ if v.SpotInstancePools != nil {
+ objectKey := object.Key("SpotInstancePools")
+ objectKey.Integer(*v.SpotInstancePools)
+ }
+
+ if v.SpotMaxPrice != nil {
+ objectKey := object.Key("SpotMaxPrice")
+ objectKey.String(*v.SpotMaxPrice)
+ }
+
+ return nil
+}
+
+func awsAwsquery_serializeDocumentLaunchConfigurationNames(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("member")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsAwsquery_serializeDocumentLaunchTemplate(v *types.LaunchTemplate, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.LaunchTemplateSpecification != nil {
+ objectKey := object.Key("LaunchTemplateSpecification")
+ if err := awsAwsquery_serializeDocumentLaunchTemplateSpecification(v.LaunchTemplateSpecification, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.Overrides != nil {
+ objectKey := object.Key("Overrides")
+ if err := awsAwsquery_serializeDocumentOverrides(v.Overrides, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsAwsquery_serializeDocumentLaunchTemplateOverrides(v *types.LaunchTemplateOverrides, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.InstanceType != nil {
+ objectKey := object.Key("InstanceType")
+ objectKey.String(*v.InstanceType)
+ }
+
+ if v.LaunchTemplateSpecification != nil {
+ objectKey := object.Key("LaunchTemplateSpecification")
+ if err := awsAwsquery_serializeDocumentLaunchTemplateSpecification(v.LaunchTemplateSpecification, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.WeightedCapacity != nil {
+ objectKey := object.Key("WeightedCapacity")
+ objectKey.String(*v.WeightedCapacity)
+ }
+
+ return nil
+}
+
+func awsAwsquery_serializeDocumentLaunchTemplateSpecification(v *types.LaunchTemplateSpecification, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.LaunchTemplateId != nil {
+ objectKey := object.Key("LaunchTemplateId")
+ objectKey.String(*v.LaunchTemplateId)
+ }
+
+ if v.LaunchTemplateName != nil {
+ objectKey := object.Key("LaunchTemplateName")
+ objectKey.String(*v.LaunchTemplateName)
+ }
+
+ if v.Version != nil {
+ objectKey := object.Key("Version")
+ objectKey.String(*v.Version)
+ }
+
+ return nil
+}
+
+func awsAwsquery_serializeDocumentLifecycleHookNames(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("member")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsAwsquery_serializeDocumentLifecycleHookSpecification(v *types.LifecycleHookSpecification, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DefaultResult != nil {
+ objectKey := object.Key("DefaultResult")
+ objectKey.String(*v.DefaultResult)
+ }
+
+ if v.HeartbeatTimeout != nil {
+ objectKey := object.Key("HeartbeatTimeout")
+ objectKey.Integer(*v.HeartbeatTimeout)
+ }
+
+ if v.LifecycleHookName != nil {
+ objectKey := object.Key("LifecycleHookName")
+ objectKey.String(*v.LifecycleHookName)
+ }
+
+ if v.LifecycleTransition != nil {
+ objectKey := object.Key("LifecycleTransition")
+ objectKey.String(*v.LifecycleTransition)
+ }
+
+ if v.NotificationMetadata != nil {
+ objectKey := object.Key("NotificationMetadata")
+ objectKey.String(*v.NotificationMetadata)
+ }
+
+ if v.NotificationTargetARN != nil {
+ objectKey := object.Key("NotificationTargetARN")
+ objectKey.String(*v.NotificationTargetARN)
+ }
+
+ if v.RoleARN != nil {
+ objectKey := object.Key("RoleARN")
+ objectKey.String(*v.RoleARN)
+ }
+
+ return nil
+}
+
+func awsAwsquery_serializeDocumentLifecycleHookSpecifications(v []types.LifecycleHookSpecification, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("member")
+
+ for i := range v {
+ av := array.Value()
+ if err := awsAwsquery_serializeDocumentLifecycleHookSpecification(&v[i], av); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsAwsquery_serializeDocumentLoadBalancerNames(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("member")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsAwsquery_serializeDocumentMetricDimension(v *types.MetricDimension, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Name != nil {
+ objectKey := object.Key("Name")
+ objectKey.String(*v.Name)
+ }
+
+ if v.Value != nil {
+ objectKey := object.Key("Value")
+ objectKey.String(*v.Value)
+ }
+
+ return nil
+}
+
+func awsAwsquery_serializeDocumentMetricDimensions(v []types.MetricDimension, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("member")
+
+ for i := range v {
+ av := array.Value()
+ if err := awsAwsquery_serializeDocumentMetricDimension(&v[i], av); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsAwsquery_serializeDocumentMetrics(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("member")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsAwsquery_serializeDocumentMixedInstancesPolicy(v *types.MixedInstancesPolicy, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.InstancesDistribution != nil {
+ objectKey := object.Key("InstancesDistribution")
+ if err := awsAwsquery_serializeDocumentInstancesDistribution(v.InstancesDistribution, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.LaunchTemplate != nil {
+ objectKey := object.Key("LaunchTemplate")
+ if err := awsAwsquery_serializeDocumentLaunchTemplate(v.LaunchTemplate, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsAwsquery_serializeDocumentOverrides(v []types.LaunchTemplateOverrides, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("member")
+
+ for i := range v {
+ av := array.Value()
+ if err := awsAwsquery_serializeDocumentLaunchTemplateOverrides(&v[i], av); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsAwsquery_serializeDocumentPolicyNames(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("member")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsAwsquery_serializeDocumentPolicyTypes(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("member")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsAwsquery_serializeDocumentPredefinedMetricSpecification(v *types.PredefinedMetricSpecification, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if len(v.PredefinedMetricType) > 0 {
+ objectKey := object.Key("PredefinedMetricType")
+ objectKey.String(string(v.PredefinedMetricType))
+ }
+
+ if v.ResourceLabel != nil {
+ objectKey := object.Key("ResourceLabel")
+ objectKey.String(*v.ResourceLabel)
+ }
+
+ return nil
+}
+
+func awsAwsquery_serializeDocumentPredictiveScalingConfiguration(v *types.PredictiveScalingConfiguration, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if len(v.MaxCapacityBreachBehavior) > 0 {
+ objectKey := object.Key("MaxCapacityBreachBehavior")
+ objectKey.String(string(v.MaxCapacityBreachBehavior))
+ }
+
+ if v.MaxCapacityBuffer != nil {
+ objectKey := object.Key("MaxCapacityBuffer")
+ objectKey.Integer(*v.MaxCapacityBuffer)
+ }
+
+ if v.MetricSpecifications != nil {
+ objectKey := object.Key("MetricSpecifications")
+ if err := awsAwsquery_serializeDocumentPredictiveScalingMetricSpecifications(v.MetricSpecifications, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if len(v.Mode) > 0 {
+ objectKey := object.Key("Mode")
+ objectKey.String(string(v.Mode))
+ }
+
+ if v.SchedulingBufferTime != nil {
+ objectKey := object.Key("SchedulingBufferTime")
+ objectKey.Integer(*v.SchedulingBufferTime)
+ }
+
+ return nil
+}
+
+func awsAwsquery_serializeDocumentPredictiveScalingMetricSpecification(v *types.PredictiveScalingMetricSpecification, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.PredefinedLoadMetricSpecification != nil {
+ objectKey := object.Key("PredefinedLoadMetricSpecification")
+ if err := awsAwsquery_serializeDocumentPredictiveScalingPredefinedLoadMetric(v.PredefinedLoadMetricSpecification, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.PredefinedMetricPairSpecification != nil {
+ objectKey := object.Key("PredefinedMetricPairSpecification")
+ if err := awsAwsquery_serializeDocumentPredictiveScalingPredefinedMetricPair(v.PredefinedMetricPairSpecification, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.PredefinedScalingMetricSpecification != nil {
+ objectKey := object.Key("PredefinedScalingMetricSpecification")
+ if err := awsAwsquery_serializeDocumentPredictiveScalingPredefinedScalingMetric(v.PredefinedScalingMetricSpecification, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.TargetValue != nil {
+ objectKey := object.Key("TargetValue")
+ switch {
+ case math.IsNaN(*v.TargetValue):
+ objectKey.String("NaN")
+
+ case math.IsInf(*v.TargetValue, 1):
+ objectKey.String("Infinity")
+
+ case math.IsInf(*v.TargetValue, -1):
+ objectKey.String("-Infinity")
+
+ default:
+ objectKey.Double(*v.TargetValue)
+
+ }
+ }
+
+ return nil
+}
+
+func awsAwsquery_serializeDocumentPredictiveScalingMetricSpecifications(v []types.PredictiveScalingMetricSpecification, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("member")
+
+ for i := range v {
+ av := array.Value()
+ if err := awsAwsquery_serializeDocumentPredictiveScalingMetricSpecification(&v[i], av); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsAwsquery_serializeDocumentPredictiveScalingPredefinedLoadMetric(v *types.PredictiveScalingPredefinedLoadMetric, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if len(v.PredefinedMetricType) > 0 {
+ objectKey := object.Key("PredefinedMetricType")
+ objectKey.String(string(v.PredefinedMetricType))
+ }
+
+ if v.ResourceLabel != nil {
+ objectKey := object.Key("ResourceLabel")
+ objectKey.String(*v.ResourceLabel)
+ }
+
+ return nil
+}
+
+func awsAwsquery_serializeDocumentPredictiveScalingPredefinedMetricPair(v *types.PredictiveScalingPredefinedMetricPair, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if len(v.PredefinedMetricType) > 0 {
+ objectKey := object.Key("PredefinedMetricType")
+ objectKey.String(string(v.PredefinedMetricType))
+ }
+
+ if v.ResourceLabel != nil {
+ objectKey := object.Key("ResourceLabel")
+ objectKey.String(*v.ResourceLabel)
+ }
+
+ return nil
+}
+
+func awsAwsquery_serializeDocumentPredictiveScalingPredefinedScalingMetric(v *types.PredictiveScalingPredefinedScalingMetric, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if len(v.PredefinedMetricType) > 0 {
+ objectKey := object.Key("PredefinedMetricType")
+ objectKey.String(string(v.PredefinedMetricType))
+ }
+
+ if v.ResourceLabel != nil {
+ objectKey := object.Key("ResourceLabel")
+ objectKey.String(*v.ResourceLabel)
+ }
+
+ return nil
+}
+
+func awsAwsquery_serializeDocumentProcessNames(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("member")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsAwsquery_serializeDocumentRefreshPreferences(v *types.RefreshPreferences, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.CheckpointDelay != nil {
+ objectKey := object.Key("CheckpointDelay")
+ objectKey.Integer(*v.CheckpointDelay)
+ }
+
+ if v.CheckpointPercentages != nil {
+ objectKey := object.Key("CheckpointPercentages")
+ if err := awsAwsquery_serializeDocumentCheckpointPercentages(v.CheckpointPercentages, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.InstanceWarmup != nil {
+ objectKey := object.Key("InstanceWarmup")
+ objectKey.Integer(*v.InstanceWarmup)
+ }
+
+ if v.MinHealthyPercentage != nil {
+ objectKey := object.Key("MinHealthyPercentage")
+ objectKey.Integer(*v.MinHealthyPercentage)
+ }
+
+ if v.SkipMatching != nil {
+ objectKey := object.Key("SkipMatching")
+ objectKey.Boolean(*v.SkipMatching)
+ }
+
+ return nil
+}
+
+func awsAwsquery_serializeDocumentScheduledActionNames(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("member")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsAwsquery_serializeDocumentScheduledUpdateGroupActionRequest(v *types.ScheduledUpdateGroupActionRequest, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DesiredCapacity != nil {
+ objectKey := object.Key("DesiredCapacity")
+ objectKey.Integer(*v.DesiredCapacity)
+ }
+
+ if v.EndTime != nil {
+ objectKey := object.Key("EndTime")
+ objectKey.String(smithytime.FormatDateTime(*v.EndTime))
+ }
+
+ if v.MaxSize != nil {
+ objectKey := object.Key("MaxSize")
+ objectKey.Integer(*v.MaxSize)
+ }
+
+ if v.MinSize != nil {
+ objectKey := object.Key("MinSize")
+ objectKey.Integer(*v.MinSize)
+ }
+
+ if v.Recurrence != nil {
+ objectKey := object.Key("Recurrence")
+ objectKey.String(*v.Recurrence)
+ }
+
+ if v.ScheduledActionName != nil {
+ objectKey := object.Key("ScheduledActionName")
+ objectKey.String(*v.ScheduledActionName)
+ }
+
+ if v.StartTime != nil {
+ objectKey := object.Key("StartTime")
+ objectKey.String(smithytime.FormatDateTime(*v.StartTime))
+ }
+
+ if v.TimeZone != nil {
+ objectKey := object.Key("TimeZone")
+ objectKey.String(*v.TimeZone)
+ }
+
+ return nil
+}
+
+func awsAwsquery_serializeDocumentScheduledUpdateGroupActionRequests(v []types.ScheduledUpdateGroupActionRequest, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("member")
+
+ for i := range v {
+ av := array.Value()
+ if err := awsAwsquery_serializeDocumentScheduledUpdateGroupActionRequest(&v[i], av); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsAwsquery_serializeDocumentSecurityGroups(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("member")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsAwsquery_serializeDocumentStepAdjustment(v *types.StepAdjustment, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.MetricIntervalLowerBound != nil {
+ objectKey := object.Key("MetricIntervalLowerBound")
+ switch {
+ case math.IsNaN(*v.MetricIntervalLowerBound):
+ objectKey.String("NaN")
+
+ case math.IsInf(*v.MetricIntervalLowerBound, 1):
+ objectKey.String("Infinity")
+
+ case math.IsInf(*v.MetricIntervalLowerBound, -1):
+ objectKey.String("-Infinity")
+
+ default:
+ objectKey.Double(*v.MetricIntervalLowerBound)
+
+ }
+ }
+
+ if v.MetricIntervalUpperBound != nil {
+ objectKey := object.Key("MetricIntervalUpperBound")
+ switch {
+ case math.IsNaN(*v.MetricIntervalUpperBound):
+ objectKey.String("NaN")
+
+ case math.IsInf(*v.MetricIntervalUpperBound, 1):
+ objectKey.String("Infinity")
+
+ case math.IsInf(*v.MetricIntervalUpperBound, -1):
+ objectKey.String("-Infinity")
+
+ default:
+ objectKey.Double(*v.MetricIntervalUpperBound)
+
+ }
+ }
+
+ if v.ScalingAdjustment != nil {
+ objectKey := object.Key("ScalingAdjustment")
+ objectKey.Integer(*v.ScalingAdjustment)
+ }
+
+ return nil
+}
+
+func awsAwsquery_serializeDocumentStepAdjustments(v []types.StepAdjustment, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("member")
+
+ for i := range v {
+ av := array.Value()
+ if err := awsAwsquery_serializeDocumentStepAdjustment(&v[i], av); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsAwsquery_serializeDocumentTag(v *types.Tag, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Key != nil {
+ objectKey := object.Key("Key")
+ objectKey.String(*v.Key)
+ }
+
+ if v.PropagateAtLaunch != nil {
+ objectKey := object.Key("PropagateAtLaunch")
+ objectKey.Boolean(*v.PropagateAtLaunch)
+ }
+
+ if v.ResourceId != nil {
+ objectKey := object.Key("ResourceId")
+ objectKey.String(*v.ResourceId)
+ }
+
+ if v.ResourceType != nil {
+ objectKey := object.Key("ResourceType")
+ objectKey.String(*v.ResourceType)
+ }
+
+ if v.Value != nil {
+ objectKey := object.Key("Value")
+ objectKey.String(*v.Value)
+ }
+
+ return nil
+}
+
+func awsAwsquery_serializeDocumentTags(v []types.Tag, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("member")
+
+ for i := range v {
+ av := array.Value()
+ if err := awsAwsquery_serializeDocumentTag(&v[i], av); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsAwsquery_serializeDocumentTargetGroupARNs(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("member")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsAwsquery_serializeDocumentTargetTrackingConfiguration(v *types.TargetTrackingConfiguration, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.CustomizedMetricSpecification != nil {
+ objectKey := object.Key("CustomizedMetricSpecification")
+ if err := awsAwsquery_serializeDocumentCustomizedMetricSpecification(v.CustomizedMetricSpecification, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.DisableScaleIn != nil {
+ objectKey := object.Key("DisableScaleIn")
+ objectKey.Boolean(*v.DisableScaleIn)
+ }
+
+ if v.PredefinedMetricSpecification != nil {
+ objectKey := object.Key("PredefinedMetricSpecification")
+ if err := awsAwsquery_serializeDocumentPredefinedMetricSpecification(v.PredefinedMetricSpecification, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.TargetValue != nil {
+ objectKey := object.Key("TargetValue")
+ switch {
+ case math.IsNaN(*v.TargetValue):
+ objectKey.String("NaN")
+
+ case math.IsInf(*v.TargetValue, 1):
+ objectKey.String("Infinity")
+
+ case math.IsInf(*v.TargetValue, -1):
+ objectKey.String("-Infinity")
+
+ default:
+ objectKey.Double(*v.TargetValue)
+
+ }
+ }
+
+ return nil
+}
+
+func awsAwsquery_serializeDocumentTerminationPolicies(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("member")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsAwsquery_serializeDocumentValues(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("member")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsAwsquery_serializeOpDocumentAttachInstancesInput(v *AttachInstancesInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AutoScalingGroupName != nil {
+ objectKey := object.Key("AutoScalingGroupName")
+ objectKey.String(*v.AutoScalingGroupName)
+ }
+
+ if v.InstanceIds != nil {
+ objectKey := object.Key("InstanceIds")
+ if err := awsAwsquery_serializeDocumentInstanceIds(v.InstanceIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsAwsquery_serializeOpDocumentAttachLoadBalancersInput(v *AttachLoadBalancersInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AutoScalingGroupName != nil {
+ objectKey := object.Key("AutoScalingGroupName")
+ objectKey.String(*v.AutoScalingGroupName)
+ }
+
+ if v.LoadBalancerNames != nil {
+ objectKey := object.Key("LoadBalancerNames")
+ if err := awsAwsquery_serializeDocumentLoadBalancerNames(v.LoadBalancerNames, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsAwsquery_serializeOpDocumentAttachLoadBalancerTargetGroupsInput(v *AttachLoadBalancerTargetGroupsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AutoScalingGroupName != nil {
+ objectKey := object.Key("AutoScalingGroupName")
+ objectKey.String(*v.AutoScalingGroupName)
+ }
+
+ if v.TargetGroupARNs != nil {
+ objectKey := object.Key("TargetGroupARNs")
+ if err := awsAwsquery_serializeDocumentTargetGroupARNs(v.TargetGroupARNs, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsAwsquery_serializeOpDocumentBatchDeleteScheduledActionInput(v *BatchDeleteScheduledActionInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AutoScalingGroupName != nil {
+ objectKey := object.Key("AutoScalingGroupName")
+ objectKey.String(*v.AutoScalingGroupName)
+ }
+
+ if v.ScheduledActionNames != nil {
+ objectKey := object.Key("ScheduledActionNames")
+ if err := awsAwsquery_serializeDocumentScheduledActionNames(v.ScheduledActionNames, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsAwsquery_serializeOpDocumentBatchPutScheduledUpdateGroupActionInput(v *BatchPutScheduledUpdateGroupActionInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AutoScalingGroupName != nil {
+ objectKey := object.Key("AutoScalingGroupName")
+ objectKey.String(*v.AutoScalingGroupName)
+ }
+
+ if v.ScheduledUpdateGroupActions != nil {
+ objectKey := object.Key("ScheduledUpdateGroupActions")
+ if err := awsAwsquery_serializeDocumentScheduledUpdateGroupActionRequests(v.ScheduledUpdateGroupActions, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsAwsquery_serializeOpDocumentCancelInstanceRefreshInput(v *CancelInstanceRefreshInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AutoScalingGroupName != nil {
+ objectKey := object.Key("AutoScalingGroupName")
+ objectKey.String(*v.AutoScalingGroupName)
+ }
+
+ return nil
+}
+
+func awsAwsquery_serializeOpDocumentCompleteLifecycleActionInput(v *CompleteLifecycleActionInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AutoScalingGroupName != nil {
+ objectKey := object.Key("AutoScalingGroupName")
+ objectKey.String(*v.AutoScalingGroupName)
+ }
+
+ if v.InstanceId != nil {
+ objectKey := object.Key("InstanceId")
+ objectKey.String(*v.InstanceId)
+ }
+
+ if v.LifecycleActionResult != nil {
+ objectKey := object.Key("LifecycleActionResult")
+ objectKey.String(*v.LifecycleActionResult)
+ }
+
+ if v.LifecycleActionToken != nil {
+ objectKey := object.Key("LifecycleActionToken")
+ objectKey.String(*v.LifecycleActionToken)
+ }
+
+ if v.LifecycleHookName != nil {
+ objectKey := object.Key("LifecycleHookName")
+ objectKey.String(*v.LifecycleHookName)
+ }
+
+ return nil
+}
+
+func awsAwsquery_serializeOpDocumentCreateAutoScalingGroupInput(v *CreateAutoScalingGroupInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AutoScalingGroupName != nil {
+ objectKey := object.Key("AutoScalingGroupName")
+ objectKey.String(*v.AutoScalingGroupName)
+ }
+
+ if v.AvailabilityZones != nil {
+ objectKey := object.Key("AvailabilityZones")
+ if err := awsAwsquery_serializeDocumentAvailabilityZones(v.AvailabilityZones, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.CapacityRebalance != nil {
+ objectKey := object.Key("CapacityRebalance")
+ objectKey.Boolean(*v.CapacityRebalance)
+ }
+
+ if v.Context != nil {
+ objectKey := object.Key("Context")
+ objectKey.String(*v.Context)
+ }
+
+ if v.DefaultCooldown != nil {
+ objectKey := object.Key("DefaultCooldown")
+ objectKey.Integer(*v.DefaultCooldown)
+ }
+
+ if v.DesiredCapacity != nil {
+ objectKey := object.Key("DesiredCapacity")
+ objectKey.Integer(*v.DesiredCapacity)
+ }
+
+ if v.HealthCheckGracePeriod != nil {
+ objectKey := object.Key("HealthCheckGracePeriod")
+ objectKey.Integer(*v.HealthCheckGracePeriod)
+ }
+
+ if v.HealthCheckType != nil {
+ objectKey := object.Key("HealthCheckType")
+ objectKey.String(*v.HealthCheckType)
+ }
+
+ if v.InstanceId != nil {
+ objectKey := object.Key("InstanceId")
+ objectKey.String(*v.InstanceId)
+ }
+
+ if v.LaunchConfigurationName != nil {
+ objectKey := object.Key("LaunchConfigurationName")
+ objectKey.String(*v.LaunchConfigurationName)
+ }
+
+ if v.LaunchTemplate != nil {
+ objectKey := object.Key("LaunchTemplate")
+ if err := awsAwsquery_serializeDocumentLaunchTemplateSpecification(v.LaunchTemplate, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.LifecycleHookSpecificationList != nil {
+ objectKey := object.Key("LifecycleHookSpecificationList")
+ if err := awsAwsquery_serializeDocumentLifecycleHookSpecifications(v.LifecycleHookSpecificationList, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.LoadBalancerNames != nil {
+ objectKey := object.Key("LoadBalancerNames")
+ if err := awsAwsquery_serializeDocumentLoadBalancerNames(v.LoadBalancerNames, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxInstanceLifetime != nil {
+ objectKey := object.Key("MaxInstanceLifetime")
+ objectKey.Integer(*v.MaxInstanceLifetime)
+ }
+
+ if v.MaxSize != nil {
+ objectKey := object.Key("MaxSize")
+ objectKey.Integer(*v.MaxSize)
+ }
+
+ if v.MinSize != nil {
+ objectKey := object.Key("MinSize")
+ objectKey.Integer(*v.MinSize)
+ }
+
+ if v.MixedInstancesPolicy != nil {
+ objectKey := object.Key("MixedInstancesPolicy")
+ if err := awsAwsquery_serializeDocumentMixedInstancesPolicy(v.MixedInstancesPolicy, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.NewInstancesProtectedFromScaleIn != nil {
+ objectKey := object.Key("NewInstancesProtectedFromScaleIn")
+ objectKey.Boolean(*v.NewInstancesProtectedFromScaleIn)
+ }
+
+ if v.PlacementGroup != nil {
+ objectKey := object.Key("PlacementGroup")
+ objectKey.String(*v.PlacementGroup)
+ }
+
+ if v.ServiceLinkedRoleARN != nil {
+ objectKey := object.Key("ServiceLinkedRoleARN")
+ objectKey.String(*v.ServiceLinkedRoleARN)
+ }
+
+ if v.Tags != nil {
+ objectKey := object.Key("Tags")
+ if err := awsAwsquery_serializeDocumentTags(v.Tags, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.TargetGroupARNs != nil {
+ objectKey := object.Key("TargetGroupARNs")
+ if err := awsAwsquery_serializeDocumentTargetGroupARNs(v.TargetGroupARNs, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.TerminationPolicies != nil {
+ objectKey := object.Key("TerminationPolicies")
+ if err := awsAwsquery_serializeDocumentTerminationPolicies(v.TerminationPolicies, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.VPCZoneIdentifier != nil {
+ objectKey := object.Key("VPCZoneIdentifier")
+ objectKey.String(*v.VPCZoneIdentifier)
+ }
+
+ return nil
+}
+
+func awsAwsquery_serializeOpDocumentCreateLaunchConfigurationInput(v *CreateLaunchConfigurationInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AssociatePublicIpAddress != nil {
+ objectKey := object.Key("AssociatePublicIpAddress")
+ objectKey.Boolean(*v.AssociatePublicIpAddress)
+ }
+
+ if v.BlockDeviceMappings != nil {
+ objectKey := object.Key("BlockDeviceMappings")
+ if err := awsAwsquery_serializeDocumentBlockDeviceMappings(v.BlockDeviceMappings, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.ClassicLinkVPCId != nil {
+ objectKey := object.Key("ClassicLinkVPCId")
+ objectKey.String(*v.ClassicLinkVPCId)
+ }
+
+ if v.ClassicLinkVPCSecurityGroups != nil {
+ objectKey := object.Key("ClassicLinkVPCSecurityGroups")
+ if err := awsAwsquery_serializeDocumentClassicLinkVPCSecurityGroups(v.ClassicLinkVPCSecurityGroups, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.EbsOptimized != nil {
+ objectKey := object.Key("EbsOptimized")
+ objectKey.Boolean(*v.EbsOptimized)
+ }
+
+ if v.IamInstanceProfile != nil {
+ objectKey := object.Key("IamInstanceProfile")
+ objectKey.String(*v.IamInstanceProfile)
+ }
+
+ if v.ImageId != nil {
+ objectKey := object.Key("ImageId")
+ objectKey.String(*v.ImageId)
+ }
+
+ if v.InstanceId != nil {
+ objectKey := object.Key("InstanceId")
+ objectKey.String(*v.InstanceId)
+ }
+
+ if v.InstanceMonitoring != nil {
+ objectKey := object.Key("InstanceMonitoring")
+ if err := awsAwsquery_serializeDocumentInstanceMonitoring(v.InstanceMonitoring, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.InstanceType != nil {
+ objectKey := object.Key("InstanceType")
+ objectKey.String(*v.InstanceType)
+ }
+
+ if v.KernelId != nil {
+ objectKey := object.Key("KernelId")
+ objectKey.String(*v.KernelId)
+ }
+
+ if v.KeyName != nil {
+ objectKey := object.Key("KeyName")
+ objectKey.String(*v.KeyName)
+ }
+
+ if v.LaunchConfigurationName != nil {
+ objectKey := object.Key("LaunchConfigurationName")
+ objectKey.String(*v.LaunchConfigurationName)
+ }
+
+ if v.MetadataOptions != nil {
+ objectKey := object.Key("MetadataOptions")
+ if err := awsAwsquery_serializeDocumentInstanceMetadataOptions(v.MetadataOptions, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.PlacementTenancy != nil {
+ objectKey := object.Key("PlacementTenancy")
+ objectKey.String(*v.PlacementTenancy)
+ }
+
+ if v.RamdiskId != nil {
+ objectKey := object.Key("RamdiskId")
+ objectKey.String(*v.RamdiskId)
+ }
+
+ if v.SecurityGroups != nil {
+ objectKey := object.Key("SecurityGroups")
+ if err := awsAwsquery_serializeDocumentSecurityGroups(v.SecurityGroups, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.SpotPrice != nil {
+ objectKey := object.Key("SpotPrice")
+ objectKey.String(*v.SpotPrice)
+ }
+
+ if v.UserData != nil {
+ objectKey := object.Key("UserData")
+ objectKey.String(*v.UserData)
+ }
+
+ return nil
+}
+
+func awsAwsquery_serializeOpDocumentCreateOrUpdateTagsInput(v *CreateOrUpdateTagsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Tags != nil {
+ objectKey := object.Key("Tags")
+ if err := awsAwsquery_serializeDocumentTags(v.Tags, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsAwsquery_serializeOpDocumentDeleteAutoScalingGroupInput(v *DeleteAutoScalingGroupInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AutoScalingGroupName != nil {
+ objectKey := object.Key("AutoScalingGroupName")
+ objectKey.String(*v.AutoScalingGroupName)
+ }
+
+ if v.ForceDelete != nil {
+ objectKey := object.Key("ForceDelete")
+ objectKey.Boolean(*v.ForceDelete)
+ }
+
+ return nil
+}
+
+func awsAwsquery_serializeOpDocumentDeleteLaunchConfigurationInput(v *DeleteLaunchConfigurationInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.LaunchConfigurationName != nil {
+ objectKey := object.Key("LaunchConfigurationName")
+ objectKey.String(*v.LaunchConfigurationName)
+ }
+
+ return nil
+}
+
+func awsAwsquery_serializeOpDocumentDeleteLifecycleHookInput(v *DeleteLifecycleHookInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AutoScalingGroupName != nil {
+ objectKey := object.Key("AutoScalingGroupName")
+ objectKey.String(*v.AutoScalingGroupName)
+ }
+
+ if v.LifecycleHookName != nil {
+ objectKey := object.Key("LifecycleHookName")
+ objectKey.String(*v.LifecycleHookName)
+ }
+
+ return nil
+}
+
+func awsAwsquery_serializeOpDocumentDeleteNotificationConfigurationInput(v *DeleteNotificationConfigurationInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AutoScalingGroupName != nil {
+ objectKey := object.Key("AutoScalingGroupName")
+ objectKey.String(*v.AutoScalingGroupName)
+ }
+
+ if v.TopicARN != nil {
+ objectKey := object.Key("TopicARN")
+ objectKey.String(*v.TopicARN)
+ }
+
+ return nil
+}
+
+func awsAwsquery_serializeOpDocumentDeletePolicyInput(v *DeletePolicyInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AutoScalingGroupName != nil {
+ objectKey := object.Key("AutoScalingGroupName")
+ objectKey.String(*v.AutoScalingGroupName)
+ }
+
+ if v.PolicyName != nil {
+ objectKey := object.Key("PolicyName")
+ objectKey.String(*v.PolicyName)
+ }
+
+ return nil
+}
+
+func awsAwsquery_serializeOpDocumentDeleteScheduledActionInput(v *DeleteScheduledActionInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AutoScalingGroupName != nil {
+ objectKey := object.Key("AutoScalingGroupName")
+ objectKey.String(*v.AutoScalingGroupName)
+ }
+
+ if v.ScheduledActionName != nil {
+ objectKey := object.Key("ScheduledActionName")
+ objectKey.String(*v.ScheduledActionName)
+ }
+
+ return nil
+}
+
+func awsAwsquery_serializeOpDocumentDeleteTagsInput(v *DeleteTagsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Tags != nil {
+ objectKey := object.Key("Tags")
+ if err := awsAwsquery_serializeDocumentTags(v.Tags, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsAwsquery_serializeOpDocumentDeleteWarmPoolInput(v *DeleteWarmPoolInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AutoScalingGroupName != nil {
+ objectKey := object.Key("AutoScalingGroupName")
+ objectKey.String(*v.AutoScalingGroupName)
+ }
+
+ if v.ForceDelete != nil {
+ objectKey := object.Key("ForceDelete")
+ objectKey.Boolean(*v.ForceDelete)
+ }
+
+ return nil
+}
+
+func awsAwsquery_serializeOpDocumentDescribeAutoScalingGroupsInput(v *DescribeAutoScalingGroupsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AutoScalingGroupNames != nil {
+ objectKey := object.Key("AutoScalingGroupNames")
+ if err := awsAwsquery_serializeDocumentAutoScalingGroupNames(v.AutoScalingGroupNames, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxRecords != nil {
+ objectKey := object.Key("MaxRecords")
+ objectKey.Integer(*v.MaxRecords)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ return nil
+}
+
+func awsAwsquery_serializeOpDocumentDescribeAutoScalingInstancesInput(v *DescribeAutoScalingInstancesInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.InstanceIds != nil {
+ objectKey := object.Key("InstanceIds")
+ if err := awsAwsquery_serializeDocumentInstanceIds(v.InstanceIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxRecords != nil {
+ objectKey := object.Key("MaxRecords")
+ objectKey.Integer(*v.MaxRecords)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ return nil
+}
+
+func awsAwsquery_serializeOpDocumentDescribeInstanceRefreshesInput(v *DescribeInstanceRefreshesInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AutoScalingGroupName != nil {
+ objectKey := object.Key("AutoScalingGroupName")
+ objectKey.String(*v.AutoScalingGroupName)
+ }
+
+ if v.InstanceRefreshIds != nil {
+ objectKey := object.Key("InstanceRefreshIds")
+ if err := awsAwsquery_serializeDocumentInstanceRefreshIds(v.InstanceRefreshIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxRecords != nil {
+ objectKey := object.Key("MaxRecords")
+ objectKey.Integer(*v.MaxRecords)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ return nil
+}
+
+func awsAwsquery_serializeOpDocumentDescribeLaunchConfigurationsInput(v *DescribeLaunchConfigurationsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.LaunchConfigurationNames != nil {
+ objectKey := object.Key("LaunchConfigurationNames")
+ if err := awsAwsquery_serializeDocumentLaunchConfigurationNames(v.LaunchConfigurationNames, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxRecords != nil {
+ objectKey := object.Key("MaxRecords")
+ objectKey.Integer(*v.MaxRecords)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ return nil
+}
+
+func awsAwsquery_serializeOpDocumentDescribeLifecycleHooksInput(v *DescribeLifecycleHooksInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AutoScalingGroupName != nil {
+ objectKey := object.Key("AutoScalingGroupName")
+ objectKey.String(*v.AutoScalingGroupName)
+ }
+
+ if v.LifecycleHookNames != nil {
+ objectKey := object.Key("LifecycleHookNames")
+ if err := awsAwsquery_serializeDocumentLifecycleHookNames(v.LifecycleHookNames, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsAwsquery_serializeOpDocumentDescribeLoadBalancersInput(v *DescribeLoadBalancersInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AutoScalingGroupName != nil {
+ objectKey := object.Key("AutoScalingGroupName")
+ objectKey.String(*v.AutoScalingGroupName)
+ }
+
+ if v.MaxRecords != nil {
+ objectKey := object.Key("MaxRecords")
+ objectKey.Integer(*v.MaxRecords)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ return nil
+}
+
+func awsAwsquery_serializeOpDocumentDescribeLoadBalancerTargetGroupsInput(v *DescribeLoadBalancerTargetGroupsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AutoScalingGroupName != nil {
+ objectKey := object.Key("AutoScalingGroupName")
+ objectKey.String(*v.AutoScalingGroupName)
+ }
+
+ if v.MaxRecords != nil {
+ objectKey := object.Key("MaxRecords")
+ objectKey.Integer(*v.MaxRecords)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ return nil
+}
+
+func awsAwsquery_serializeOpDocumentDescribeNotificationConfigurationsInput(v *DescribeNotificationConfigurationsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AutoScalingGroupNames != nil {
+ objectKey := object.Key("AutoScalingGroupNames")
+ if err := awsAwsquery_serializeDocumentAutoScalingGroupNames(v.AutoScalingGroupNames, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxRecords != nil {
+ objectKey := object.Key("MaxRecords")
+ objectKey.Integer(*v.MaxRecords)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ return nil
+}
+
+func awsAwsquery_serializeOpDocumentDescribePoliciesInput(v *DescribePoliciesInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AutoScalingGroupName != nil {
+ objectKey := object.Key("AutoScalingGroupName")
+ objectKey.String(*v.AutoScalingGroupName)
+ }
+
+ if v.MaxRecords != nil {
+ objectKey := object.Key("MaxRecords")
+ objectKey.Integer(*v.MaxRecords)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ if v.PolicyNames != nil {
+ objectKey := object.Key("PolicyNames")
+ if err := awsAwsquery_serializeDocumentPolicyNames(v.PolicyNames, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.PolicyTypes != nil {
+ objectKey := object.Key("PolicyTypes")
+ if err := awsAwsquery_serializeDocumentPolicyTypes(v.PolicyTypes, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsAwsquery_serializeOpDocumentDescribeScalingActivitiesInput(v *DescribeScalingActivitiesInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.ActivityIds != nil {
+ objectKey := object.Key("ActivityIds")
+ if err := awsAwsquery_serializeDocumentActivityIds(v.ActivityIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.AutoScalingGroupName != nil {
+ objectKey := object.Key("AutoScalingGroupName")
+ objectKey.String(*v.AutoScalingGroupName)
+ }
+
+ if v.IncludeDeletedGroups != nil {
+ objectKey := object.Key("IncludeDeletedGroups")
+ objectKey.Boolean(*v.IncludeDeletedGroups)
+ }
+
+ if v.MaxRecords != nil {
+ objectKey := object.Key("MaxRecords")
+ objectKey.Integer(*v.MaxRecords)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ return nil
+}
+
+func awsAwsquery_serializeOpDocumentDescribeScheduledActionsInput(v *DescribeScheduledActionsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AutoScalingGroupName != nil {
+ objectKey := object.Key("AutoScalingGroupName")
+ objectKey.String(*v.AutoScalingGroupName)
+ }
+
+ if v.EndTime != nil {
+ objectKey := object.Key("EndTime")
+ objectKey.String(smithytime.FormatDateTime(*v.EndTime))
+ }
+
+ if v.MaxRecords != nil {
+ objectKey := object.Key("MaxRecords")
+ objectKey.Integer(*v.MaxRecords)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ if v.ScheduledActionNames != nil {
+ objectKey := object.Key("ScheduledActionNames")
+ if err := awsAwsquery_serializeDocumentScheduledActionNames(v.ScheduledActionNames, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.StartTime != nil {
+ objectKey := object.Key("StartTime")
+ objectKey.String(smithytime.FormatDateTime(*v.StartTime))
+ }
+
+ return nil
+}
+
+func awsAwsquery_serializeOpDocumentDescribeTagsInput(v *DescribeTagsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Filters != nil {
+ objectKey := object.Key("Filters")
+ if err := awsAwsquery_serializeDocumentFilters(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxRecords != nil {
+ objectKey := object.Key("MaxRecords")
+ objectKey.Integer(*v.MaxRecords)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ return nil
+}
+
+func awsAwsquery_serializeOpDocumentDescribeWarmPoolInput(v *DescribeWarmPoolInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AutoScalingGroupName != nil {
+ objectKey := object.Key("AutoScalingGroupName")
+ objectKey.String(*v.AutoScalingGroupName)
+ }
+
+ if v.MaxRecords != nil {
+ objectKey := object.Key("MaxRecords")
+ objectKey.Integer(*v.MaxRecords)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ return nil
+}
+
+func awsAwsquery_serializeOpDocumentDetachInstancesInput(v *DetachInstancesInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AutoScalingGroupName != nil {
+ objectKey := object.Key("AutoScalingGroupName")
+ objectKey.String(*v.AutoScalingGroupName)
+ }
+
+ if v.InstanceIds != nil {
+ objectKey := object.Key("InstanceIds")
+ if err := awsAwsquery_serializeDocumentInstanceIds(v.InstanceIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.ShouldDecrementDesiredCapacity != nil {
+ objectKey := object.Key("ShouldDecrementDesiredCapacity")
+ objectKey.Boolean(*v.ShouldDecrementDesiredCapacity)
+ }
+
+ return nil
+}
+
+func awsAwsquery_serializeOpDocumentDetachLoadBalancersInput(v *DetachLoadBalancersInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AutoScalingGroupName != nil {
+ objectKey := object.Key("AutoScalingGroupName")
+ objectKey.String(*v.AutoScalingGroupName)
+ }
+
+ if v.LoadBalancerNames != nil {
+ objectKey := object.Key("LoadBalancerNames")
+ if err := awsAwsquery_serializeDocumentLoadBalancerNames(v.LoadBalancerNames, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsAwsquery_serializeOpDocumentDetachLoadBalancerTargetGroupsInput(v *DetachLoadBalancerTargetGroupsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AutoScalingGroupName != nil {
+ objectKey := object.Key("AutoScalingGroupName")
+ objectKey.String(*v.AutoScalingGroupName)
+ }
+
+ if v.TargetGroupARNs != nil {
+ objectKey := object.Key("TargetGroupARNs")
+ if err := awsAwsquery_serializeDocumentTargetGroupARNs(v.TargetGroupARNs, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsAwsquery_serializeOpDocumentDisableMetricsCollectionInput(v *DisableMetricsCollectionInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AutoScalingGroupName != nil {
+ objectKey := object.Key("AutoScalingGroupName")
+ objectKey.String(*v.AutoScalingGroupName)
+ }
+
+ if v.Metrics != nil {
+ objectKey := object.Key("Metrics")
+ if err := awsAwsquery_serializeDocumentMetrics(v.Metrics, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsAwsquery_serializeOpDocumentEnableMetricsCollectionInput(v *EnableMetricsCollectionInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AutoScalingGroupName != nil {
+ objectKey := object.Key("AutoScalingGroupName")
+ objectKey.String(*v.AutoScalingGroupName)
+ }
+
+ if v.Granularity != nil {
+ objectKey := object.Key("Granularity")
+ objectKey.String(*v.Granularity)
+ }
+
+ if v.Metrics != nil {
+ objectKey := object.Key("Metrics")
+ if err := awsAwsquery_serializeDocumentMetrics(v.Metrics, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsAwsquery_serializeOpDocumentEnterStandbyInput(v *EnterStandbyInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AutoScalingGroupName != nil {
+ objectKey := object.Key("AutoScalingGroupName")
+ objectKey.String(*v.AutoScalingGroupName)
+ }
+
+ if v.InstanceIds != nil {
+ objectKey := object.Key("InstanceIds")
+ if err := awsAwsquery_serializeDocumentInstanceIds(v.InstanceIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.ShouldDecrementDesiredCapacity != nil {
+ objectKey := object.Key("ShouldDecrementDesiredCapacity")
+ objectKey.Boolean(*v.ShouldDecrementDesiredCapacity)
+ }
+
+ return nil
+}
+
+func awsAwsquery_serializeOpDocumentExecutePolicyInput(v *ExecutePolicyInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AutoScalingGroupName != nil {
+ objectKey := object.Key("AutoScalingGroupName")
+ objectKey.String(*v.AutoScalingGroupName)
+ }
+
+ if v.BreachThreshold != nil {
+ objectKey := object.Key("BreachThreshold")
+ switch {
+ case math.IsNaN(*v.BreachThreshold):
+ objectKey.String("NaN")
+
+ case math.IsInf(*v.BreachThreshold, 1):
+ objectKey.String("Infinity")
+
+ case math.IsInf(*v.BreachThreshold, -1):
+ objectKey.String("-Infinity")
+
+ default:
+ objectKey.Double(*v.BreachThreshold)
+
+ }
+ }
+
+ if v.HonorCooldown != nil {
+ objectKey := object.Key("HonorCooldown")
+ objectKey.Boolean(*v.HonorCooldown)
+ }
+
+ if v.MetricValue != nil {
+ objectKey := object.Key("MetricValue")
+ switch {
+ case math.IsNaN(*v.MetricValue):
+ objectKey.String("NaN")
+
+ case math.IsInf(*v.MetricValue, 1):
+ objectKey.String("Infinity")
+
+ case math.IsInf(*v.MetricValue, -1):
+ objectKey.String("-Infinity")
+
+ default:
+ objectKey.Double(*v.MetricValue)
+
+ }
+ }
+
+ if v.PolicyName != nil {
+ objectKey := object.Key("PolicyName")
+ objectKey.String(*v.PolicyName)
+ }
+
+ return nil
+}
+
+func awsAwsquery_serializeOpDocumentExitStandbyInput(v *ExitStandbyInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AutoScalingGroupName != nil {
+ objectKey := object.Key("AutoScalingGroupName")
+ objectKey.String(*v.AutoScalingGroupName)
+ }
+
+ if v.InstanceIds != nil {
+ objectKey := object.Key("InstanceIds")
+ if err := awsAwsquery_serializeDocumentInstanceIds(v.InstanceIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsAwsquery_serializeOpDocumentGetPredictiveScalingForecastInput(v *GetPredictiveScalingForecastInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AutoScalingGroupName != nil {
+ objectKey := object.Key("AutoScalingGroupName")
+ objectKey.String(*v.AutoScalingGroupName)
+ }
+
+ if v.EndTime != nil {
+ objectKey := object.Key("EndTime")
+ objectKey.String(smithytime.FormatDateTime(*v.EndTime))
+ }
+
+ if v.PolicyName != nil {
+ objectKey := object.Key("PolicyName")
+ objectKey.String(*v.PolicyName)
+ }
+
+ if v.StartTime != nil {
+ objectKey := object.Key("StartTime")
+ objectKey.String(smithytime.FormatDateTime(*v.StartTime))
+ }
+
+ return nil
+}
+
+func awsAwsquery_serializeOpDocumentPutLifecycleHookInput(v *PutLifecycleHookInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AutoScalingGroupName != nil {
+ objectKey := object.Key("AutoScalingGroupName")
+ objectKey.String(*v.AutoScalingGroupName)
+ }
+
+ if v.DefaultResult != nil {
+ objectKey := object.Key("DefaultResult")
+ objectKey.String(*v.DefaultResult)
+ }
+
+ if v.HeartbeatTimeout != nil {
+ objectKey := object.Key("HeartbeatTimeout")
+ objectKey.Integer(*v.HeartbeatTimeout)
+ }
+
+ if v.LifecycleHookName != nil {
+ objectKey := object.Key("LifecycleHookName")
+ objectKey.String(*v.LifecycleHookName)
+ }
+
+ if v.LifecycleTransition != nil {
+ objectKey := object.Key("LifecycleTransition")
+ objectKey.String(*v.LifecycleTransition)
+ }
+
+ if v.NotificationMetadata != nil {
+ objectKey := object.Key("NotificationMetadata")
+ objectKey.String(*v.NotificationMetadata)
+ }
+
+ if v.NotificationTargetARN != nil {
+ objectKey := object.Key("NotificationTargetARN")
+ objectKey.String(*v.NotificationTargetARN)
+ }
+
+ if v.RoleARN != nil {
+ objectKey := object.Key("RoleARN")
+ objectKey.String(*v.RoleARN)
+ }
+
+ return nil
+}
+
+func awsAwsquery_serializeOpDocumentPutNotificationConfigurationInput(v *PutNotificationConfigurationInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AutoScalingGroupName != nil {
+ objectKey := object.Key("AutoScalingGroupName")
+ objectKey.String(*v.AutoScalingGroupName)
+ }
+
+ if v.NotificationTypes != nil {
+ objectKey := object.Key("NotificationTypes")
+ if err := awsAwsquery_serializeDocumentAutoScalingNotificationTypes(v.NotificationTypes, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.TopicARN != nil {
+ objectKey := object.Key("TopicARN")
+ objectKey.String(*v.TopicARN)
+ }
+
+ return nil
+}
+
+func awsAwsquery_serializeOpDocumentPutScalingPolicyInput(v *PutScalingPolicyInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AdjustmentType != nil {
+ objectKey := object.Key("AdjustmentType")
+ objectKey.String(*v.AdjustmentType)
+ }
+
+ if v.AutoScalingGroupName != nil {
+ objectKey := object.Key("AutoScalingGroupName")
+ objectKey.String(*v.AutoScalingGroupName)
+ }
+
+ if v.Cooldown != nil {
+ objectKey := object.Key("Cooldown")
+ objectKey.Integer(*v.Cooldown)
+ }
+
+ if v.Enabled != nil {
+ objectKey := object.Key("Enabled")
+ objectKey.Boolean(*v.Enabled)
+ }
+
+ if v.EstimatedInstanceWarmup != nil {
+ objectKey := object.Key("EstimatedInstanceWarmup")
+ objectKey.Integer(*v.EstimatedInstanceWarmup)
+ }
+
+ if v.MetricAggregationType != nil {
+ objectKey := object.Key("MetricAggregationType")
+ objectKey.String(*v.MetricAggregationType)
+ }
+
+ if v.MinAdjustmentMagnitude != nil {
+ objectKey := object.Key("MinAdjustmentMagnitude")
+ objectKey.Integer(*v.MinAdjustmentMagnitude)
+ }
+
+ if v.MinAdjustmentStep != nil {
+ objectKey := object.Key("MinAdjustmentStep")
+ objectKey.Integer(*v.MinAdjustmentStep)
+ }
+
+ if v.PolicyName != nil {
+ objectKey := object.Key("PolicyName")
+ objectKey.String(*v.PolicyName)
+ }
+
+ if v.PolicyType != nil {
+ objectKey := object.Key("PolicyType")
+ objectKey.String(*v.PolicyType)
+ }
+
+ if v.PredictiveScalingConfiguration != nil {
+ objectKey := object.Key("PredictiveScalingConfiguration")
+ if err := awsAwsquery_serializeDocumentPredictiveScalingConfiguration(v.PredictiveScalingConfiguration, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.ScalingAdjustment != nil {
+ objectKey := object.Key("ScalingAdjustment")
+ objectKey.Integer(*v.ScalingAdjustment)
+ }
+
+ if v.StepAdjustments != nil {
+ objectKey := object.Key("StepAdjustments")
+ if err := awsAwsquery_serializeDocumentStepAdjustments(v.StepAdjustments, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.TargetTrackingConfiguration != nil {
+ objectKey := object.Key("TargetTrackingConfiguration")
+ if err := awsAwsquery_serializeDocumentTargetTrackingConfiguration(v.TargetTrackingConfiguration, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsAwsquery_serializeOpDocumentPutScheduledUpdateGroupActionInput(v *PutScheduledUpdateGroupActionInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AutoScalingGroupName != nil {
+ objectKey := object.Key("AutoScalingGroupName")
+ objectKey.String(*v.AutoScalingGroupName)
+ }
+
+ if v.DesiredCapacity != nil {
+ objectKey := object.Key("DesiredCapacity")
+ objectKey.Integer(*v.DesiredCapacity)
+ }
+
+ if v.EndTime != nil {
+ objectKey := object.Key("EndTime")
+ objectKey.String(smithytime.FormatDateTime(*v.EndTime))
+ }
+
+ if v.MaxSize != nil {
+ objectKey := object.Key("MaxSize")
+ objectKey.Integer(*v.MaxSize)
+ }
+
+ if v.MinSize != nil {
+ objectKey := object.Key("MinSize")
+ objectKey.Integer(*v.MinSize)
+ }
+
+ if v.Recurrence != nil {
+ objectKey := object.Key("Recurrence")
+ objectKey.String(*v.Recurrence)
+ }
+
+ if v.ScheduledActionName != nil {
+ objectKey := object.Key("ScheduledActionName")
+ objectKey.String(*v.ScheduledActionName)
+ }
+
+ if v.StartTime != nil {
+ objectKey := object.Key("StartTime")
+ objectKey.String(smithytime.FormatDateTime(*v.StartTime))
+ }
+
+ if v.Time != nil {
+ objectKey := object.Key("Time")
+ objectKey.String(smithytime.FormatDateTime(*v.Time))
+ }
+
+ if v.TimeZone != nil {
+ objectKey := object.Key("TimeZone")
+ objectKey.String(*v.TimeZone)
+ }
+
+ return nil
+}
+
+func awsAwsquery_serializeOpDocumentPutWarmPoolInput(v *PutWarmPoolInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AutoScalingGroupName != nil {
+ objectKey := object.Key("AutoScalingGroupName")
+ objectKey.String(*v.AutoScalingGroupName)
+ }
+
+ if v.MaxGroupPreparedCapacity != nil {
+ objectKey := object.Key("MaxGroupPreparedCapacity")
+ objectKey.Integer(*v.MaxGroupPreparedCapacity)
+ }
+
+ if v.MinSize != nil {
+ objectKey := object.Key("MinSize")
+ objectKey.Integer(*v.MinSize)
+ }
+
+ if len(v.PoolState) > 0 {
+ objectKey := object.Key("PoolState")
+ objectKey.String(string(v.PoolState))
+ }
+
+ return nil
+}
+
+func awsAwsquery_serializeOpDocumentRecordLifecycleActionHeartbeatInput(v *RecordLifecycleActionHeartbeatInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AutoScalingGroupName != nil {
+ objectKey := object.Key("AutoScalingGroupName")
+ objectKey.String(*v.AutoScalingGroupName)
+ }
+
+ if v.InstanceId != nil {
+ objectKey := object.Key("InstanceId")
+ objectKey.String(*v.InstanceId)
+ }
+
+ if v.LifecycleActionToken != nil {
+ objectKey := object.Key("LifecycleActionToken")
+ objectKey.String(*v.LifecycleActionToken)
+ }
+
+ if v.LifecycleHookName != nil {
+ objectKey := object.Key("LifecycleHookName")
+ objectKey.String(*v.LifecycleHookName)
+ }
+
+ return nil
+}
+
+func awsAwsquery_serializeOpDocumentResumeProcessesInput(v *ResumeProcessesInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AutoScalingGroupName != nil {
+ objectKey := object.Key("AutoScalingGroupName")
+ objectKey.String(*v.AutoScalingGroupName)
+ }
+
+ if v.ScalingProcesses != nil {
+ objectKey := object.Key("ScalingProcesses")
+ if err := awsAwsquery_serializeDocumentProcessNames(v.ScalingProcesses, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsAwsquery_serializeOpDocumentSetDesiredCapacityInput(v *SetDesiredCapacityInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AutoScalingGroupName != nil {
+ objectKey := object.Key("AutoScalingGroupName")
+ objectKey.String(*v.AutoScalingGroupName)
+ }
+
+ if v.DesiredCapacity != nil {
+ objectKey := object.Key("DesiredCapacity")
+ objectKey.Integer(*v.DesiredCapacity)
+ }
+
+ if v.HonorCooldown != nil {
+ objectKey := object.Key("HonorCooldown")
+ objectKey.Boolean(*v.HonorCooldown)
+ }
+
+ return nil
+}
+
+func awsAwsquery_serializeOpDocumentSetInstanceHealthInput(v *SetInstanceHealthInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.HealthStatus != nil {
+ objectKey := object.Key("HealthStatus")
+ objectKey.String(*v.HealthStatus)
+ }
+
+ if v.InstanceId != nil {
+ objectKey := object.Key("InstanceId")
+ objectKey.String(*v.InstanceId)
+ }
+
+ if v.ShouldRespectGracePeriod != nil {
+ objectKey := object.Key("ShouldRespectGracePeriod")
+ objectKey.Boolean(*v.ShouldRespectGracePeriod)
+ }
+
+ return nil
+}
+
+func awsAwsquery_serializeOpDocumentSetInstanceProtectionInput(v *SetInstanceProtectionInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AutoScalingGroupName != nil {
+ objectKey := object.Key("AutoScalingGroupName")
+ objectKey.String(*v.AutoScalingGroupName)
+ }
+
+ if v.InstanceIds != nil {
+ objectKey := object.Key("InstanceIds")
+ if err := awsAwsquery_serializeDocumentInstanceIds(v.InstanceIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.ProtectedFromScaleIn != nil {
+ objectKey := object.Key("ProtectedFromScaleIn")
+ objectKey.Boolean(*v.ProtectedFromScaleIn)
+ }
+
+ return nil
+}
+
+func awsAwsquery_serializeOpDocumentStartInstanceRefreshInput(v *StartInstanceRefreshInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AutoScalingGroupName != nil {
+ objectKey := object.Key("AutoScalingGroupName")
+ objectKey.String(*v.AutoScalingGroupName)
+ }
+
+ if v.DesiredConfiguration != nil {
+ objectKey := object.Key("DesiredConfiguration")
+ if err := awsAwsquery_serializeDocumentDesiredConfiguration(v.DesiredConfiguration, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.Preferences != nil {
+ objectKey := object.Key("Preferences")
+ if err := awsAwsquery_serializeDocumentRefreshPreferences(v.Preferences, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if len(v.Strategy) > 0 {
+ objectKey := object.Key("Strategy")
+ objectKey.String(string(v.Strategy))
+ }
+
+ return nil
+}
+
+func awsAwsquery_serializeOpDocumentSuspendProcessesInput(v *SuspendProcessesInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AutoScalingGroupName != nil {
+ objectKey := object.Key("AutoScalingGroupName")
+ objectKey.String(*v.AutoScalingGroupName)
+ }
+
+ if v.ScalingProcesses != nil {
+ objectKey := object.Key("ScalingProcesses")
+ if err := awsAwsquery_serializeDocumentProcessNames(v.ScalingProcesses, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsAwsquery_serializeOpDocumentTerminateInstanceInAutoScalingGroupInput(v *TerminateInstanceInAutoScalingGroupInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.InstanceId != nil {
+ objectKey := object.Key("InstanceId")
+ objectKey.String(*v.InstanceId)
+ }
+
+ if v.ShouldDecrementDesiredCapacity != nil {
+ objectKey := object.Key("ShouldDecrementDesiredCapacity")
+ objectKey.Boolean(*v.ShouldDecrementDesiredCapacity)
+ }
+
+ return nil
+}
+
+func awsAwsquery_serializeOpDocumentUpdateAutoScalingGroupInput(v *UpdateAutoScalingGroupInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AutoScalingGroupName != nil {
+ objectKey := object.Key("AutoScalingGroupName")
+ objectKey.String(*v.AutoScalingGroupName)
+ }
+
+ if v.AvailabilityZones != nil {
+ objectKey := object.Key("AvailabilityZones")
+ if err := awsAwsquery_serializeDocumentAvailabilityZones(v.AvailabilityZones, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.CapacityRebalance != nil {
+ objectKey := object.Key("CapacityRebalance")
+ objectKey.Boolean(*v.CapacityRebalance)
+ }
+
+ if v.Context != nil {
+ objectKey := object.Key("Context")
+ objectKey.String(*v.Context)
+ }
+
+ if v.DefaultCooldown != nil {
+ objectKey := object.Key("DefaultCooldown")
+ objectKey.Integer(*v.DefaultCooldown)
+ }
+
+ if v.DesiredCapacity != nil {
+ objectKey := object.Key("DesiredCapacity")
+ objectKey.Integer(*v.DesiredCapacity)
+ }
+
+ if v.HealthCheckGracePeriod != nil {
+ objectKey := object.Key("HealthCheckGracePeriod")
+ objectKey.Integer(*v.HealthCheckGracePeriod)
+ }
+
+ if v.HealthCheckType != nil {
+ objectKey := object.Key("HealthCheckType")
+ objectKey.String(*v.HealthCheckType)
+ }
+
+ if v.LaunchConfigurationName != nil {
+ objectKey := object.Key("LaunchConfigurationName")
+ objectKey.String(*v.LaunchConfigurationName)
+ }
+
+ if v.LaunchTemplate != nil {
+ objectKey := object.Key("LaunchTemplate")
+ if err := awsAwsquery_serializeDocumentLaunchTemplateSpecification(v.LaunchTemplate, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxInstanceLifetime != nil {
+ objectKey := object.Key("MaxInstanceLifetime")
+ objectKey.Integer(*v.MaxInstanceLifetime)
+ }
+
+ if v.MaxSize != nil {
+ objectKey := object.Key("MaxSize")
+ objectKey.Integer(*v.MaxSize)
+ }
+
+ if v.MinSize != nil {
+ objectKey := object.Key("MinSize")
+ objectKey.Integer(*v.MinSize)
+ }
+
+ if v.MixedInstancesPolicy != nil {
+ objectKey := object.Key("MixedInstancesPolicy")
+ if err := awsAwsquery_serializeDocumentMixedInstancesPolicy(v.MixedInstancesPolicy, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.NewInstancesProtectedFromScaleIn != nil {
+ objectKey := object.Key("NewInstancesProtectedFromScaleIn")
+ objectKey.Boolean(*v.NewInstancesProtectedFromScaleIn)
+ }
+
+ if v.PlacementGroup != nil {
+ objectKey := object.Key("PlacementGroup")
+ objectKey.String(*v.PlacementGroup)
+ }
+
+ if v.ServiceLinkedRoleARN != nil {
+ objectKey := object.Key("ServiceLinkedRoleARN")
+ objectKey.String(*v.ServiceLinkedRoleARN)
+ }
+
+ if v.TerminationPolicies != nil {
+ objectKey := object.Key("TerminationPolicies")
+ if err := awsAwsquery_serializeDocumentTerminationPolicies(v.TerminationPolicies, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.VPCZoneIdentifier != nil {
+ objectKey := object.Key("VPCZoneIdentifier")
+ objectKey.String(*v.VPCZoneIdentifier)
+ }
+
+ return nil
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/types/enums.go b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/types/enums.go
new file mode 100644
index 00000000..bd9984ac
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/types/enums.go
@@ -0,0 +1,362 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package types
+
+type InstanceMetadataEndpointState string
+
+// Enum values for InstanceMetadataEndpointState
+const (
+ InstanceMetadataEndpointStateDisabled InstanceMetadataEndpointState = "disabled"
+ InstanceMetadataEndpointStateEnabled InstanceMetadataEndpointState = "enabled"
+)
+
+// Values returns all known values for InstanceMetadataEndpointState. 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 (InstanceMetadataEndpointState) Values() []InstanceMetadataEndpointState {
+ return []InstanceMetadataEndpointState{
+ "disabled",
+ "enabled",
+ }
+}
+
+type InstanceMetadataHttpTokensState string
+
+// Enum values for InstanceMetadataHttpTokensState
+const (
+ InstanceMetadataHttpTokensStateOptional InstanceMetadataHttpTokensState = "optional"
+ InstanceMetadataHttpTokensStateRequired InstanceMetadataHttpTokensState = "required"
+)
+
+// Values returns all known values for InstanceMetadataHttpTokensState. 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 (InstanceMetadataHttpTokensState) Values() []InstanceMetadataHttpTokensState {
+ return []InstanceMetadataHttpTokensState{
+ "optional",
+ "required",
+ }
+}
+
+type InstanceRefreshStatus string
+
+// Enum values for InstanceRefreshStatus
+const (
+ InstanceRefreshStatusPending InstanceRefreshStatus = "Pending"
+ InstanceRefreshStatusInProgress InstanceRefreshStatus = "InProgress"
+ InstanceRefreshStatusSuccessful InstanceRefreshStatus = "Successful"
+ InstanceRefreshStatusFailed InstanceRefreshStatus = "Failed"
+ InstanceRefreshStatusCancelling InstanceRefreshStatus = "Cancelling"
+ InstanceRefreshStatusCancelled InstanceRefreshStatus = "Cancelled"
+)
+
+// Values returns all known values for InstanceRefreshStatus. 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 (InstanceRefreshStatus) Values() []InstanceRefreshStatus {
+ return []InstanceRefreshStatus{
+ "Pending",
+ "InProgress",
+ "Successful",
+ "Failed",
+ "Cancelling",
+ "Cancelled",
+ }
+}
+
+type LifecycleState string
+
+// Enum values for LifecycleState
+const (
+ LifecycleStatePending LifecycleState = "Pending"
+ LifecycleStatePendingWait LifecycleState = "Pending:Wait"
+ LifecycleStatePendingProceed LifecycleState = "Pending:Proceed"
+ LifecycleStateQuarantined LifecycleState = "Quarantined"
+ LifecycleStateInService LifecycleState = "InService"
+ LifecycleStateTerminating LifecycleState = "Terminating"
+ LifecycleStateTerminatingWait LifecycleState = "Terminating:Wait"
+ LifecycleStateTerminatingProceed LifecycleState = "Terminating:Proceed"
+ LifecycleStateTerminated LifecycleState = "Terminated"
+ LifecycleStateDetaching LifecycleState = "Detaching"
+ LifecycleStateDetached LifecycleState = "Detached"
+ LifecycleStateEnteringStandby LifecycleState = "EnteringStandby"
+ LifecycleStateStandby LifecycleState = "Standby"
+ LifecycleStateWarmedPending LifecycleState = "Warmed:Pending"
+ LifecycleStateWarmedPendingWait LifecycleState = "Warmed:Pending:Wait"
+ LifecycleStateWarmedPendingProceed LifecycleState = "Warmed:Pending:Proceed"
+ LifecycleStateWarmedTerminating LifecycleState = "Warmed:Terminating"
+ LifecycleStateWarmedTerminatingWait LifecycleState = "Warmed:Terminating:Wait"
+ LifecycleStateWarmedTerminatingProceed LifecycleState = "Warmed:Terminating:Proceed"
+ LifecycleStateWarmedTerminated LifecycleState = "Warmed:Terminated"
+ LifecycleStateWarmedStopped LifecycleState = "Warmed:Stopped"
+ LifecycleStateWarmedRunning LifecycleState = "Warmed:Running"
+)
+
+// Values returns all known values for LifecycleState. 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 (LifecycleState) Values() []LifecycleState {
+ return []LifecycleState{
+ "Pending",
+ "Pending:Wait",
+ "Pending:Proceed",
+ "Quarantined",
+ "InService",
+ "Terminating",
+ "Terminating:Wait",
+ "Terminating:Proceed",
+ "Terminated",
+ "Detaching",
+ "Detached",
+ "EnteringStandby",
+ "Standby",
+ "Warmed:Pending",
+ "Warmed:Pending:Wait",
+ "Warmed:Pending:Proceed",
+ "Warmed:Terminating",
+ "Warmed:Terminating:Wait",
+ "Warmed:Terminating:Proceed",
+ "Warmed:Terminated",
+ "Warmed:Stopped",
+ "Warmed:Running",
+ }
+}
+
+type MetricStatistic string
+
+// Enum values for MetricStatistic
+const (
+ MetricStatisticAverage MetricStatistic = "Average"
+ MetricStatisticMinimum MetricStatistic = "Minimum"
+ MetricStatisticMaximum MetricStatistic = "Maximum"
+ MetricStatisticSampleCount MetricStatistic = "SampleCount"
+ MetricStatisticSum MetricStatistic = "Sum"
+)
+
+// Values returns all known values for MetricStatistic. 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 (MetricStatistic) Values() []MetricStatistic {
+ return []MetricStatistic{
+ "Average",
+ "Minimum",
+ "Maximum",
+ "SampleCount",
+ "Sum",
+ }
+}
+
+type MetricType string
+
+// Enum values for MetricType
+const (
+ MetricTypeASGAverageCPUUtilization MetricType = "ASGAverageCPUUtilization"
+ MetricTypeASGAverageNetworkIn MetricType = "ASGAverageNetworkIn"
+ MetricTypeASGAverageNetworkOut MetricType = "ASGAverageNetworkOut"
+ MetricTypeALBRequestCountPerTarget MetricType = "ALBRequestCountPerTarget"
+)
+
+// Values returns all known values for MetricType. 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 (MetricType) Values() []MetricType {
+ return []MetricType{
+ "ASGAverageCPUUtilization",
+ "ASGAverageNetworkIn",
+ "ASGAverageNetworkOut",
+ "ALBRequestCountPerTarget",
+ }
+}
+
+type PredefinedLoadMetricType string
+
+// Enum values for PredefinedLoadMetricType
+const (
+ PredefinedLoadMetricTypeASGTotalCPUUtilization PredefinedLoadMetricType = "ASGTotalCPUUtilization"
+ PredefinedLoadMetricTypeASGTotalNetworkIn PredefinedLoadMetricType = "ASGTotalNetworkIn"
+ PredefinedLoadMetricTypeASGTotalNetworkOut PredefinedLoadMetricType = "ASGTotalNetworkOut"
+ PredefinedLoadMetricTypeALBTargetGroupRequestCount PredefinedLoadMetricType = "ALBTargetGroupRequestCount"
+)
+
+// Values returns all known values for PredefinedLoadMetricType. 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 (PredefinedLoadMetricType) Values() []PredefinedLoadMetricType {
+ return []PredefinedLoadMetricType{
+ "ASGTotalCPUUtilization",
+ "ASGTotalNetworkIn",
+ "ASGTotalNetworkOut",
+ "ALBTargetGroupRequestCount",
+ }
+}
+
+type PredefinedMetricPairType string
+
+// Enum values for PredefinedMetricPairType
+const (
+ PredefinedMetricPairTypeASGCPUUtilization PredefinedMetricPairType = "ASGCPUUtilization"
+ PredefinedMetricPairTypeASGNetworkIn PredefinedMetricPairType = "ASGNetworkIn"
+ PredefinedMetricPairTypeASGNetworkOut PredefinedMetricPairType = "ASGNetworkOut"
+ PredefinedMetricPairTypeALBRequestCount PredefinedMetricPairType = "ALBRequestCount"
+)
+
+// Values returns all known values for PredefinedMetricPairType. 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 (PredefinedMetricPairType) Values() []PredefinedMetricPairType {
+ return []PredefinedMetricPairType{
+ "ASGCPUUtilization",
+ "ASGNetworkIn",
+ "ASGNetworkOut",
+ "ALBRequestCount",
+ }
+}
+
+type PredefinedScalingMetricType string
+
+// Enum values for PredefinedScalingMetricType
+const (
+ PredefinedScalingMetricTypeASGAverageCPUUtilization PredefinedScalingMetricType = "ASGAverageCPUUtilization"
+ PredefinedScalingMetricTypeASGAverageNetworkIn PredefinedScalingMetricType = "ASGAverageNetworkIn"
+ PredefinedScalingMetricTypeASGAverageNetworkOut PredefinedScalingMetricType = "ASGAverageNetworkOut"
+ PredefinedScalingMetricTypeALBRequestCountPerTarget PredefinedScalingMetricType = "ALBRequestCountPerTarget"
+)
+
+// Values returns all known values for PredefinedScalingMetricType. 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 (PredefinedScalingMetricType) Values() []PredefinedScalingMetricType {
+ return []PredefinedScalingMetricType{
+ "ASGAverageCPUUtilization",
+ "ASGAverageNetworkIn",
+ "ASGAverageNetworkOut",
+ "ALBRequestCountPerTarget",
+ }
+}
+
+type PredictiveScalingMaxCapacityBreachBehavior string
+
+// Enum values for PredictiveScalingMaxCapacityBreachBehavior
+const (
+ PredictiveScalingMaxCapacityBreachBehaviorHonorMaxCapacity PredictiveScalingMaxCapacityBreachBehavior = "HonorMaxCapacity"
+ PredictiveScalingMaxCapacityBreachBehaviorIncreaseMaxCapacity PredictiveScalingMaxCapacityBreachBehavior = "IncreaseMaxCapacity"
+)
+
+// Values returns all known values for PredictiveScalingMaxCapacityBreachBehavior.
+// 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 (PredictiveScalingMaxCapacityBreachBehavior) Values() []PredictiveScalingMaxCapacityBreachBehavior {
+ return []PredictiveScalingMaxCapacityBreachBehavior{
+ "HonorMaxCapacity",
+ "IncreaseMaxCapacity",
+ }
+}
+
+type PredictiveScalingMode string
+
+// Enum values for PredictiveScalingMode
+const (
+ PredictiveScalingModeForecastAndScale PredictiveScalingMode = "ForecastAndScale"
+ PredictiveScalingModeForecastOnly PredictiveScalingMode = "ForecastOnly"
+)
+
+// Values returns all known values for PredictiveScalingMode. 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 (PredictiveScalingMode) Values() []PredictiveScalingMode {
+ return []PredictiveScalingMode{
+ "ForecastAndScale",
+ "ForecastOnly",
+ }
+}
+
+type RefreshStrategy string
+
+// Enum values for RefreshStrategy
+const (
+ RefreshStrategyRolling RefreshStrategy = "Rolling"
+)
+
+// Values returns all known values for RefreshStrategy. 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 (RefreshStrategy) Values() []RefreshStrategy {
+ return []RefreshStrategy{
+ "Rolling",
+ }
+}
+
+type ScalingActivityStatusCode string
+
+// Enum values for ScalingActivityStatusCode
+const (
+ ScalingActivityStatusCodePendingSpotBidPlacement ScalingActivityStatusCode = "PendingSpotBidPlacement"
+ ScalingActivityStatusCodeWaitingForSpotInstanceRequestId ScalingActivityStatusCode = "WaitingForSpotInstanceRequestId"
+ ScalingActivityStatusCodeWaitingForSpotInstanceId ScalingActivityStatusCode = "WaitingForSpotInstanceId"
+ ScalingActivityStatusCodeWaitingForInstanceId ScalingActivityStatusCode = "WaitingForInstanceId"
+ ScalingActivityStatusCodePreInService ScalingActivityStatusCode = "PreInService"
+ ScalingActivityStatusCodeInProgress ScalingActivityStatusCode = "InProgress"
+ ScalingActivityStatusCodeWaitingForELBConnectionDraining ScalingActivityStatusCode = "WaitingForELBConnectionDraining"
+ ScalingActivityStatusCodeMidLifecycleAction ScalingActivityStatusCode = "MidLifecycleAction"
+ ScalingActivityStatusCodeWaitingForInstanceWarmup ScalingActivityStatusCode = "WaitingForInstanceWarmup"
+ ScalingActivityStatusCodeSuccessful ScalingActivityStatusCode = "Successful"
+ ScalingActivityStatusCodeFailed ScalingActivityStatusCode = "Failed"
+ ScalingActivityStatusCodeCancelled ScalingActivityStatusCode = "Cancelled"
+)
+
+// Values returns all known values for ScalingActivityStatusCode. 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 (ScalingActivityStatusCode) Values() []ScalingActivityStatusCode {
+ return []ScalingActivityStatusCode{
+ "PendingSpotBidPlacement",
+ "WaitingForSpotInstanceRequestId",
+ "WaitingForSpotInstanceId",
+ "WaitingForInstanceId",
+ "PreInService",
+ "InProgress",
+ "WaitingForELBConnectionDraining",
+ "MidLifecycleAction",
+ "WaitingForInstanceWarmup",
+ "Successful",
+ "Failed",
+ "Cancelled",
+ }
+}
+
+type WarmPoolState string
+
+// Enum values for WarmPoolState
+const (
+ WarmPoolStateStopped WarmPoolState = "Stopped"
+ WarmPoolStateRunning WarmPoolState = "Running"
+)
+
+// Values returns all known values for WarmPoolState. 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 (WarmPoolState) Values() []WarmPoolState {
+ return []WarmPoolState{
+ "Stopped",
+ "Running",
+ }
+}
+
+type WarmPoolStatus string
+
+// Enum values for WarmPoolStatus
+const (
+ WarmPoolStatusPendingDelete WarmPoolStatus = "PendingDelete"
+)
+
+// Values returns all known values for WarmPoolStatus. 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 (WarmPoolStatus) Values() []WarmPoolStatus {
+ return []WarmPoolStatus{
+ "PendingDelete",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/types/errors.go b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/types/errors.go
new file mode 100644
index 00000000..1a68972d
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/types/errors.go
@@ -0,0 +1,191 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package types
+
+import (
+ "fmt"
+ smithy "github.com/aws/smithy-go"
+)
+
+// The request failed because an active instance refresh for the specified Auto
+// Scaling group was not found.
+type ActiveInstanceRefreshNotFoundFault struct {
+ Message *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *ActiveInstanceRefreshNotFoundFault) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *ActiveInstanceRefreshNotFoundFault) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *ActiveInstanceRefreshNotFoundFault) ErrorCode() string {
+ return "ActiveInstanceRefreshNotFound"
+}
+func (e *ActiveInstanceRefreshNotFoundFault) ErrorFault() smithy.ErrorFault {
+ return smithy.FaultClient
+}
+
+// You already have an Auto Scaling group or launch configuration with this name.
+type AlreadyExistsFault struct {
+ Message *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *AlreadyExistsFault) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *AlreadyExistsFault) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *AlreadyExistsFault) ErrorCode() string { return "AlreadyExists" }
+func (e *AlreadyExistsFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// The request failed because an active instance refresh operation already exists
+// for the specified Auto Scaling group.
+type InstanceRefreshInProgressFault struct {
+ Message *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *InstanceRefreshInProgressFault) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *InstanceRefreshInProgressFault) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *InstanceRefreshInProgressFault) ErrorCode() string { return "InstanceRefreshInProgress" }
+func (e *InstanceRefreshInProgressFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// The NextToken value is not valid.
+type InvalidNextToken struct {
+ Message *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *InvalidNextToken) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *InvalidNextToken) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *InvalidNextToken) ErrorCode() string { return "InvalidNextToken" }
+func (e *InvalidNextToken) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// You have already reached a limit for your Amazon EC2 Auto Scaling resources (for
+// example, Auto Scaling groups, launch configurations, or lifecycle hooks). For
+// more information, see DescribeAccountLimits
+// (https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_DescribeAccountLimits.html)
+// in the Amazon EC2 Auto Scaling API Reference.
+type LimitExceededFault struct {
+ Message *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *LimitExceededFault) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *LimitExceededFault) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *LimitExceededFault) ErrorCode() string { return "LimitExceeded" }
+func (e *LimitExceededFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// You already have a pending update to an Amazon EC2 Auto Scaling resource (for
+// example, an Auto Scaling group, instance, or load balancer).
+type ResourceContentionFault struct {
+ Message *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *ResourceContentionFault) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *ResourceContentionFault) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *ResourceContentionFault) ErrorCode() string { return "ResourceContention" }
+func (e *ResourceContentionFault) ErrorFault() smithy.ErrorFault { return smithy.FaultServer }
+
+// The operation can't be performed because the resource is in use.
+type ResourceInUseFault struct {
+ Message *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *ResourceInUseFault) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *ResourceInUseFault) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *ResourceInUseFault) ErrorCode() string { return "ResourceInUse" }
+func (e *ResourceInUseFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// The operation can't be performed because there are scaling activities in
+// progress.
+type ScalingActivityInProgressFault struct {
+ Message *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *ScalingActivityInProgressFault) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *ScalingActivityInProgressFault) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *ScalingActivityInProgressFault) ErrorCode() string { return "ScalingActivityInProgress" }
+func (e *ScalingActivityInProgressFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// The service-linked role is not yet ready for use.
+type ServiceLinkedRoleFailure struct {
+ Message *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *ServiceLinkedRoleFailure) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *ServiceLinkedRoleFailure) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *ServiceLinkedRoleFailure) ErrorCode() string { return "ServiceLinkedRoleFailure" }
+func (e *ServiceLinkedRoleFailure) ErrorFault() smithy.ErrorFault { return smithy.FaultServer }
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/types/types.go b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/types/types.go
new file mode 100644
index 00000000..8a232abc
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/types/types.go
@@ -0,0 +1,2096 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package types
+
+import (
+ smithydocument "github.com/aws/smithy-go/document"
+ "time"
+)
+
+// Describes scaling activity, which is a long-running process that represents a
+// change to your Auto Scaling group, such as changing its size or replacing an
+// instance.
+type Activity struct {
+
+ // The ID of the activity.
+ //
+ // This member is required.
+ ActivityId *string
+
+ // The name of the Auto Scaling group.
+ //
+ // This member is required.
+ AutoScalingGroupName *string
+
+ // The reason the activity began.
+ //
+ // This member is required.
+ Cause *string
+
+ // The start time of the activity.
+ //
+ // This member is required.
+ StartTime *time.Time
+
+ // The current status of the activity.
+ //
+ // This member is required.
+ StatusCode ScalingActivityStatusCode
+
+ // The Amazon Resource Name (ARN) of the Auto Scaling group.
+ AutoScalingGroupARN *string
+
+ // The state of the Auto Scaling group, which is either InService or Deleted.
+ AutoScalingGroupState *string
+
+ // A friendly, more verbose description of the activity.
+ Description *string
+
+ // The details about the activity.
+ Details *string
+
+ // The end time of the activity.
+ EndTime *time.Time
+
+ // A value between 0 and 100 that indicates the progress of the activity.
+ Progress int32
+
+ // A friendly, more verbose description of the activity status.
+ StatusMessage *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes a policy adjustment type.
+type AdjustmentType struct {
+
+ // The policy adjustment type. The valid values are ChangeInCapacity,
+ // ExactCapacity, and PercentChangeInCapacity.
+ AdjustmentType *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes an alarm.
+type Alarm struct {
+
+ // The Amazon Resource Name (ARN) of the alarm.
+ AlarmARN *string
+
+ // The name of the alarm.
+ AlarmName *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes an Auto Scaling group.
+type AutoScalingGroup struct {
+
+ // The name of the Auto Scaling group.
+ //
+ // This member is required.
+ AutoScalingGroupName *string
+
+ // One or more Availability Zones for the group.
+ //
+ // This member is required.
+ AvailabilityZones []string
+
+ // The date and time the group was created.
+ //
+ // This member is required.
+ CreatedTime *time.Time
+
+ // The duration of the default cooldown period, in seconds.
+ //
+ // This member is required.
+ DefaultCooldown *int32
+
+ // The desired size of the group.
+ //
+ // This member is required.
+ DesiredCapacity *int32
+
+ // The service to use for the health checks. The valid values are EC2 and ELB. If
+ // you configure an Auto Scaling group to use ELB health checks, it considers the
+ // instance unhealthy if it fails either the EC2 status checks or the load balancer
+ // health checks.
+ //
+ // This member is required.
+ HealthCheckType *string
+
+ // The maximum size of the group.
+ //
+ // This member is required.
+ MaxSize *int32
+
+ // The minimum size of the group.
+ //
+ // This member is required.
+ MinSize *int32
+
+ // The Amazon Resource Name (ARN) of the Auto Scaling group.
+ AutoScalingGroupARN *string
+
+ // Indicates whether Capacity Rebalancing is enabled.
+ CapacityRebalance *bool
+
+ // Reserved.
+ Context *string
+
+ // The metrics enabled for the group.
+ EnabledMetrics []EnabledMetric
+
+ // The amount of time, in seconds, that Amazon EC2 Auto Scaling waits before
+ // checking the health status of an EC2 instance that has come into service.
+ HealthCheckGracePeriod *int32
+
+ // The EC2 instances associated with the group.
+ Instances []Instance
+
+ // The name of the associated launch configuration.
+ LaunchConfigurationName *string
+
+ // The launch template for the group.
+ LaunchTemplate *LaunchTemplateSpecification
+
+ // One or more load balancers associated with the group.
+ LoadBalancerNames []string
+
+ // The maximum amount of time, in seconds, that an instance can be in service.
+ // Valid Range: Minimum value of 0.
+ MaxInstanceLifetime *int32
+
+ // The mixed instances policy for the group.
+ MixedInstancesPolicy *MixedInstancesPolicy
+
+ // Indicates whether newly launched instances are protected from termination by
+ // Amazon EC2 Auto Scaling when scaling in.
+ NewInstancesProtectedFromScaleIn *bool
+
+ // The name of the placement group into which to launch your instances, if any.
+ PlacementGroup *string
+
+ // The predicted capacity of the group when it has a predictive scaling policy.
+ PredictedCapacity *int32
+
+ // The Amazon Resource Name (ARN) of the service-linked role that the Auto Scaling
+ // group uses to call other Amazon Web Services on your behalf.
+ ServiceLinkedRoleARN *string
+
+ // The current state of the group when the DeleteAutoScalingGroup operation is in
+ // progress.
+ Status *string
+
+ // The suspended processes associated with the group.
+ SuspendedProcesses []SuspendedProcess
+
+ // The tags for the group.
+ Tags []TagDescription
+
+ // The Amazon Resource Names (ARN) of the target groups for your load balancer.
+ TargetGroupARNs []string
+
+ // The termination policies for the group.
+ TerminationPolicies []string
+
+ // One or more subnet IDs, if applicable, separated by commas.
+ VPCZoneIdentifier *string
+
+ // The warm pool for the group.
+ WarmPoolConfiguration *WarmPoolConfiguration
+
+ // The current size of the warm pool.
+ WarmPoolSize *int32
+
+ noSmithyDocumentSerde
+}
+
+// Describes an EC2 instance associated with an Auto Scaling group.
+type AutoScalingInstanceDetails struct {
+
+ // The name of the Auto Scaling group for the instance.
+ //
+ // This member is required.
+ AutoScalingGroupName *string
+
+ // The Availability Zone for the instance.
+ //
+ // This member is required.
+ AvailabilityZone *string
+
+ // The last reported health status of this instance. "Healthy" means that the
+ // instance is healthy and should remain in service. "Unhealthy" means that the
+ // instance is unhealthy and Amazon EC2 Auto Scaling should terminate and replace
+ // it.
+ //
+ // This member is required.
+ HealthStatus *string
+
+ // The ID of the instance.
+ //
+ // This member is required.
+ InstanceId *string
+
+ // The lifecycle state for the instance. The Quarantined state is not used. For
+ // information about lifecycle states, see Instance lifecycle
+ // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/AutoScalingGroupLifecycle.html)
+ // in the Amazon EC2 Auto Scaling User Guide. Valid Values: Pending | Pending:Wait
+ // | Pending:Proceed | Quarantined | InService | Terminating | Terminating:Wait |
+ // Terminating:Proceed | Terminated | Detaching | Detached | EnteringStandby |
+ // Standby | Warmed:Pending | Warmed:Pending:Wait | Warmed:Pending:Proceed |
+ // Warmed:Terminating | Warmed:Terminating:Wait | Warmed:Terminating:Proceed |
+ // Warmed:Terminated | Warmed:Stopped | Warmed:Running
+ //
+ // This member is required.
+ LifecycleState *string
+
+ // Indicates whether the instance is protected from termination by Amazon EC2 Auto
+ // Scaling when scaling in.
+ //
+ // This member is required.
+ ProtectedFromScaleIn *bool
+
+ // The instance type of the EC2 instance.
+ InstanceType *string
+
+ // The launch configuration used to launch the instance. This value is not
+ // available if you attached the instance to the Auto Scaling group.
+ LaunchConfigurationName *string
+
+ // The launch template for the instance.
+ LaunchTemplate *LaunchTemplateSpecification
+
+ // The number of capacity units contributed by the instance based on its instance
+ // type. Valid Range: Minimum value of 1. Maximum value of 999.
+ WeightedCapacity *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes a block device mapping.
+type BlockDeviceMapping struct {
+
+ // The device name exposed to the EC2 instance (for example, /dev/sdh or xvdh). For
+ // more information, see Device Naming on Linux Instances
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/device_naming.html) in the
+ // Amazon EC2 User Guide for Linux Instances.
+ //
+ // This member is required.
+ DeviceName *string
+
+ // Parameters used to automatically set up EBS volumes when an instance is
+ // launched. You can specify either VirtualName or Ebs, but not both.
+ Ebs *Ebs
+
+ // Setting this value to true suppresses the specified device included in the block
+ // device mapping of the AMI. If NoDevice is true for the root device, instances
+ // might fail the EC2 health check. In that case, Amazon EC2 Auto Scaling launches
+ // replacement instances. If you specify NoDevice, you cannot specify Ebs.
+ NoDevice *bool
+
+ // The name of the virtual device (for example, ephemeral0). You can specify either
+ // VirtualName or Ebs, but not both.
+ VirtualName *string
+
+ noSmithyDocumentSerde
+}
+
+// A GetPredictiveScalingForecast call returns the capacity forecast for a
+// predictive scaling policy. This structure includes the data points for that
+// capacity forecast, along with the timestamps of those data points.
+type CapacityForecast struct {
+
+ // The time stamps for the data points, in UTC format.
+ //
+ // This member is required.
+ Timestamps []time.Time
+
+ // The values of the data points.
+ //
+ // This member is required.
+ Values []float64
+
+ noSmithyDocumentSerde
+}
+
+// Represents a CloudWatch metric of your choosing for a target tracking scaling
+// policy to use with Amazon EC2 Auto Scaling. To create your customized metric
+// specification:
+//
+// * Add values for each required parameter from CloudWatch. You
+// can use an existing metric, or a new metric that you create. To use your own
+// metric, you must first publish the metric to CloudWatch. For more information,
+// see Publish Custom Metrics
+// (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/publishingMetrics.html)
+// in the Amazon CloudWatch User Guide.
+//
+// * Choose a metric that changes
+// proportionally with capacity. The value of the metric should increase or
+// decrease in inverse proportion to the number of capacity units. That is, the
+// value of the metric should decrease when capacity increases.
+//
+// For more
+// information about CloudWatch, see Amazon CloudWatch Concepts
+// (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch_concepts.html).
+type CustomizedMetricSpecification struct {
+
+ // The name of the metric.
+ //
+ // This member is required.
+ MetricName *string
+
+ // The namespace of the metric.
+ //
+ // This member is required.
+ Namespace *string
+
+ // The statistic of the metric.
+ //
+ // This member is required.
+ Statistic MetricStatistic
+
+ // The dimensions of the metric. Conditional: If you published your metric with
+ // dimensions, you must specify the same dimensions in your scaling policy.
+ Dimensions []MetricDimension
+
+ // The unit of the metric.
+ Unit *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes the desired configuration for an instance refresh. If you specify a
+// desired configuration, you must specify either a LaunchTemplate or a
+// MixedInstancesPolicy.
+type DesiredConfiguration struct {
+
+ // Describes the launch template and the version of the launch template that Amazon
+ // EC2 Auto Scaling uses to launch Amazon EC2 instances. For more information about
+ // launch templates, see Launch templates
+ // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/LaunchTemplates.html) in
+ // the Amazon EC2 Auto Scaling User Guide.
+ LaunchTemplate *LaunchTemplateSpecification
+
+ // Describes a mixed instances policy. A mixed instances policy contains the
+ // instance types Amazon EC2 Auto Scaling can launch, and other information Amazon
+ // EC2 Auto Scaling can use to launch instances to help you optimize your costs.
+ // For more information, see Auto Scaling groups with multiple instance types and
+ // purchase options
+ // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-purchase-options.html)
+ // in the Amazon EC2 Auto Scaling User Guide.
+ MixedInstancesPolicy *MixedInstancesPolicy
+
+ noSmithyDocumentSerde
+}
+
+// Describes information used to set up an Amazon EBS volume specified in a block
+// device mapping.
+type Ebs struct {
+
+ // Indicates whether the volume is deleted on instance termination. For Amazon EC2
+ // Auto Scaling, the default value is true.
+ DeleteOnTermination *bool
+
+ // Specifies whether the volume should be encrypted. Encrypted EBS volumes can only
+ // be attached to instances that support Amazon EBS encryption. For more
+ // information, see Supported Instance Types
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html#EBSEncryption_supported_instances).
+ // If your AMI uses encrypted volumes, you can also only launch it on supported
+ // instance types. If you are creating a volume from a snapshot, you cannot specify
+ // an encryption value. Volumes that are created from encrypted snapshots are
+ // automatically encrypted, and volumes that are created from unencrypted snapshots
+ // are automatically unencrypted. By default, encrypted snapshots use the Amazon
+ // Web Services managed CMK that is used for EBS encryption, but you can specify a
+ // custom CMK when you create the snapshot. The ability to encrypt a snapshot
+ // during copying also allows you to apply a new CMK to an already-encrypted
+ // snapshot. Volumes restored from the resulting copy are only accessible using the
+ // new CMK. Enabling encryption by default
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html#encryption-by-default)
+ // results in all EBS volumes being encrypted with the Amazon Web Services managed
+ // CMK or a customer managed CMK, whether or not the snapshot was encrypted. For
+ // more information, see Using Encryption with EBS-Backed AMIs
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AMIEncryption.html) in the
+ // Amazon EC2 User Guide for Linux Instances and Required CMK key policy for use
+ // with encrypted volumes
+ // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/key-policy-requirements-EBS-encryption.html)
+ // in the Amazon EC2 Auto Scaling User Guide.
+ Encrypted *bool
+
+ // The number of input/output (I/O) operations per second (IOPS) to provision for
+ // the volume. For gp3 and io1 volumes, this represents the number of IOPS that are
+ // provisioned for the volume. For gp2 volumes, this represents the baseline
+ // performance of the volume and the rate at which the volume accumulates I/O
+ // credits for bursting. The following are the supported values for each volume
+ // type:
+ //
+ // * gp3: 3,000-16,000 IOPS
+ //
+ // * io1: 100-64,000 IOPS
+ //
+ // For io1 volumes, we
+ // guarantee 64,000 IOPS only for Instances built on the Nitro System
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#ec2-nitro-instances).
+ // Other instance families guarantee performance up to 32,000 IOPS. Iops is
+ // supported when the volume type is gp3 or io1 and required only when the volume
+ // type is io1. (Not used with standard, gp2, st1, or sc1 volumes.)
+ Iops *int32
+
+ // The snapshot ID of the volume to use. You must specify either a VolumeSize or a
+ // SnapshotId.
+ SnapshotId *string
+
+ // The throughput (MiBps) to provision for a gp3 volume.
+ Throughput *int32
+
+ // The volume size, in GiBs. The following are the supported volumes sizes for each
+ // volume type:
+ //
+ // * gp2 and gp3: 1-16,384
+ //
+ // * io1: 4-16,384
+ //
+ // * st1 and sc1:
+ // 125-16,384
+ //
+ // * standard: 1-1,024
+ //
+ // You must specify either a SnapshotId or a
+ // VolumeSize. If you specify both SnapshotId and VolumeSize, the volume size must
+ // be equal or greater than the size of the snapshot.
+ VolumeSize *int32
+
+ // The volume type. For more information, see Amazon EBS Volume Types
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html) in the
+ // Amazon EC2 User Guide for Linux Instances. Valid Values: standard | io1 | gp2 |
+ // st1 | sc1 | gp3
+ VolumeType *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes an enabled metric.
+type EnabledMetric struct {
+
+ // The granularity of the metric. The only valid value is 1Minute.
+ Granularity *string
+
+ // One of the following metrics:
+ //
+ // * GroupMinSize
+ //
+ // * GroupMaxSize
+ //
+ // *
+ // GroupDesiredCapacity
+ //
+ // * GroupInServiceInstances
+ //
+ // * GroupPendingInstances
+ //
+ // *
+ // GroupStandbyInstances
+ //
+ // * GroupTerminatingInstances
+ //
+ // * GroupTotalInstances
+ //
+ // *
+ // GroupInServiceCapacity
+ //
+ // * GroupPendingCapacity
+ //
+ // * GroupStandbyCapacity
+ //
+ // *
+ // GroupTerminatingCapacity
+ //
+ // * GroupTotalCapacity
+ //
+ // * WarmPoolDesiredCapacity
+ //
+ // *
+ // WarmPoolWarmedCapacity
+ //
+ // * WarmPoolPendingCapacity
+ //
+ // *
+ // WarmPoolTerminatingCapacity
+ //
+ // * WarmPoolTotalCapacity
+ //
+ // *
+ // GroupAndWarmPoolDesiredCapacity
+ //
+ // * GroupAndWarmPoolTotalCapacity
+ Metric *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes a scheduled action that could not be created, updated, or deleted.
+type FailedScheduledUpdateGroupActionRequest struct {
+
+ // The name of the scheduled action.
+ //
+ // This member is required.
+ ScheduledActionName *string
+
+ // The error code.
+ ErrorCode *string
+
+ // The error message accompanying the error code.
+ ErrorMessage *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes a filter that is used to return a more specific list of results when
+// describing tags. For more information, see Tagging Auto Scaling groups and
+// instances
+// (https://docs.aws.amazon.com/autoscaling/ec2/userguide/autoscaling-tagging.html)
+// in the Amazon EC2 Auto Scaling User Guide.
+type Filter struct {
+
+ // The name of the filter. The valid values are: auto-scaling-group, key, value,
+ // and propagate-at-launch.
+ Name *string
+
+ // One or more filter values. Filter values are case-sensitive.
+ Values []string
+
+ noSmithyDocumentSerde
+}
+
+// Describes an EC2 instance.
+type Instance struct {
+
+ // The Availability Zone in which the instance is running.
+ //
+ // This member is required.
+ AvailabilityZone *string
+
+ // The last reported health status of the instance. "Healthy" means that the
+ // instance is healthy and should remain in service. "Unhealthy" means that the
+ // instance is unhealthy and that Amazon EC2 Auto Scaling should terminate and
+ // replace it.
+ //
+ // This member is required.
+ HealthStatus *string
+
+ // The ID of the instance.
+ //
+ // This member is required.
+ InstanceId *string
+
+ // A description of the current lifecycle state. The Quarantined state is not used.
+ // For information about lifecycle states, see Instance lifecycle
+ // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/AutoScalingGroupLifecycle.html)
+ // in the Amazon EC2 Auto Scaling User Guide.
+ //
+ // This member is required.
+ LifecycleState LifecycleState
+
+ // Indicates whether the instance is protected from termination by Amazon EC2 Auto
+ // Scaling when scaling in.
+ //
+ // This member is required.
+ ProtectedFromScaleIn *bool
+
+ // The instance type of the EC2 instance.
+ InstanceType *string
+
+ // The launch configuration associated with the instance.
+ LaunchConfigurationName *string
+
+ // The launch template for the instance.
+ LaunchTemplate *LaunchTemplateSpecification
+
+ // The number of capacity units contributed by the instance based on its instance
+ // type. Valid Range: Minimum value of 1. Maximum value of 999.
+ WeightedCapacity *string
+
+ noSmithyDocumentSerde
+}
+
+// The metadata options for the instances. For more information, see Configuring
+// the Instance Metadata Options
+// (https://docs.aws.amazon.com/autoscaling/ec2/userguide/create-launch-config.html#launch-configurations-imds)
+// in the Amazon EC2 Auto Scaling User Guide.
+type InstanceMetadataOptions struct {
+
+ // This parameter enables or disables the HTTP metadata endpoint on your instances.
+ // If the parameter is not specified, the default state is enabled. If you specify
+ // a value of disabled, you will not be able to access your instance metadata.
+ HttpEndpoint InstanceMetadataEndpointState
+
+ // The desired HTTP PUT response hop limit for instance metadata requests. The
+ // larger the number, the further instance metadata requests can travel. Default: 1
+ HttpPutResponseHopLimit *int32
+
+ // The state of token usage for your instance metadata requests. If the parameter
+ // is not specified in the request, the default state is optional. If the state is
+ // optional, you can choose to retrieve instance metadata with or without a signed
+ // token header on your request. If you retrieve the IAM role credentials without a
+ // token, the version 1.0 role credentials are returned. If you retrieve the IAM
+ // role credentials using a valid signed token, the version 2.0 role credentials
+ // are returned. If the state is required, you must send a signed token header with
+ // any instance metadata retrieval requests. In this state, retrieving the IAM role
+ // credentials always returns the version 2.0 credentials; the version 1.0
+ // credentials are not available.
+ HttpTokens InstanceMetadataHttpTokensState
+
+ noSmithyDocumentSerde
+}
+
+// Describes whether detailed monitoring is enabled for the Auto Scaling instances.
+type InstanceMonitoring struct {
+
+ // If true, detailed monitoring is enabled. Otherwise, basic monitoring is enabled.
+ Enabled *bool
+
+ noSmithyDocumentSerde
+}
+
+// Describes an instance refresh for an Auto Scaling group.
+type InstanceRefresh struct {
+
+ // The name of the Auto Scaling group.
+ AutoScalingGroupName *string
+
+ // Describes the specific update you want to deploy.
+ DesiredConfiguration *DesiredConfiguration
+
+ // The date and time at which the instance refresh ended.
+ EndTime *time.Time
+
+ // The instance refresh ID.
+ InstanceRefreshId *string
+
+ // The number of instances remaining to update before the instance refresh is
+ // complete.
+ InstancesToUpdate *int32
+
+ // The percentage of the instance refresh that is complete. For each instance
+ // replacement, Amazon EC2 Auto Scaling tracks the instance's health status and
+ // warm-up time. When the instance's health status changes to healthy and the
+ // specified warm-up time passes, the instance is considered updated and is added
+ // to the percentage complete.
+ PercentageComplete *int32
+
+ // Describes the preferences for an instance refresh.
+ Preferences *RefreshPreferences
+
+ // Additional progress details for an Auto Scaling group that has a warm pool.
+ ProgressDetails *InstanceRefreshProgressDetails
+
+ // The date and time at which the instance refresh began.
+ StartTime *time.Time
+
+ // The current status for the instance refresh operation:
+ //
+ // * Pending - The request
+ // was created, but the operation has not started.
+ //
+ // * InProgress - The operation is
+ // in progress.
+ //
+ // * Successful - The operation completed successfully.
+ //
+ // * Failed -
+ // The operation failed to complete. You can troubleshoot using the status reason
+ // and the scaling activities.
+ //
+ // * Cancelling - An ongoing operation is being
+ // cancelled. Cancellation does not roll back any replacements that have already
+ // been completed, but it prevents new replacements from being started.
+ //
+ // *
+ // Cancelled - The operation is cancelled.
+ Status InstanceRefreshStatus
+
+ // Provides more details about the current status of the instance refresh.
+ StatusReason *string
+
+ noSmithyDocumentSerde
+}
+
+// Reports the progress of an instance refresh on instances that are in the Auto
+// Scaling group.
+type InstanceRefreshLivePoolProgress struct {
+
+ // The number of instances remaining to update.
+ InstancesToUpdate *int32
+
+ // The percentage of instances in the Auto Scaling group that have been replaced.
+ // For each instance replacement, Amazon EC2 Auto Scaling tracks the instance's
+ // health status and warm-up time. When the instance's health status changes to
+ // healthy and the specified warm-up time passes, the instance is considered
+ // updated and is added to the percentage complete.
+ PercentageComplete *int32
+
+ noSmithyDocumentSerde
+}
+
+// Reports the progress of an instance refresh on an Auto Scaling group that has a
+// warm pool. This includes separate details for instances in the warm pool and
+// instances in the Auto Scaling group (the live pool).
+type InstanceRefreshProgressDetails struct {
+
+ // Indicates the progress of an instance refresh on instances that are in the Auto
+ // Scaling group.
+ LivePoolProgress *InstanceRefreshLivePoolProgress
+
+ // Indicates the progress of an instance refresh on instances that are in the warm
+ // pool.
+ WarmPoolProgress *InstanceRefreshWarmPoolProgress
+
+ noSmithyDocumentSerde
+}
+
+// Reports the progress of an instance refresh on instances that are in the warm
+// pool.
+type InstanceRefreshWarmPoolProgress struct {
+
+ // The number of instances remaining to update.
+ InstancesToUpdate *int32
+
+ // The percentage of instances in the warm pool that have been replaced. For each
+ // instance replacement, Amazon EC2 Auto Scaling tracks the instance's health
+ // status and warm-up time. When the instance's health status changes to healthy
+ // and the specified warm-up time passes, the instance is considered updated and is
+ // added to the percentage complete.
+ PercentageComplete *int32
+
+ noSmithyDocumentSerde
+}
+
+// Describes an instances distribution for an Auto Scaling group with a
+// MixedInstancesPolicy. The instances distribution specifies the distribution of
+// On-Demand Instances and Spot Instances, the maximum price to pay for Spot
+// Instances, and how the Auto Scaling group allocates instance types to fulfill
+// On-Demand and Spot capacities. When you modify SpotAllocationStrategy,
+// SpotInstancePools, or SpotMaxPrice in the UpdateAutoScalingGroup API call, this
+// update action does not deploy any changes across the running Amazon EC2
+// instances in the group. Your existing Spot Instances continue to run as long as
+// the maximum price for those instances is higher than the current Spot price.
+// When scale out occurs, Amazon EC2 Auto Scaling launches instances based on the
+// new settings. When scale in occurs, Amazon EC2 Auto Scaling terminates instances
+// according to the group's termination policies.
+type InstancesDistribution struct {
+
+ // Indicates how to allocate instance types to fulfill On-Demand capacity. The only
+ // valid value is prioritized, which is also the default value. This strategy uses
+ // the order of instance types in the LaunchTemplateOverrides to define the launch
+ // priority of each instance type. The first instance type in the array is
+ // prioritized higher than the last. If all your On-Demand capacity cannot be
+ // fulfilled using your highest priority instance, then the Auto Scaling groups
+ // launches the remaining capacity using the second priority instance type, and so
+ // on.
+ OnDemandAllocationStrategy *string
+
+ // The minimum amount of the Auto Scaling group's capacity that must be fulfilled
+ // by On-Demand Instances. This base portion is provisioned first as your group
+ // scales. Defaults to 0 if not specified. If you specify weights for the instance
+ // types in the overrides, set the value of OnDemandBaseCapacity in terms of the
+ // number of capacity units, and not the number of instances.
+ OnDemandBaseCapacity *int32
+
+ // Controls the percentages of On-Demand Instances and Spot Instances for your
+ // additional capacity beyond OnDemandBaseCapacity. Expressed as a number (for
+ // example, 20 specifies 20% On-Demand Instances, 80% Spot Instances). Defaults to
+ // 100 if not specified. If set to 100, only On-Demand Instances are provisioned.
+ OnDemandPercentageAboveBaseCapacity *int32
+
+ // Indicates how to allocate instances across Spot Instance pools. If the
+ // allocation strategy is lowest-price, the Auto Scaling group launches instances
+ // using the Spot pools with the lowest price, and evenly allocates your instances
+ // across the number of Spot pools that you specify. Defaults to lowest-price if
+ // not specified. If the allocation strategy is capacity-optimized (recommended),
+ // the Auto Scaling group launches instances using Spot pools that are optimally
+ // chosen based on the available Spot capacity. Alternatively, you can use
+ // capacity-optimized-prioritized and set the order of instance types in the list
+ // of launch template overrides from highest to lowest priority (from first to last
+ // in the list). Amazon EC2 Auto Scaling honors the instance type priorities on a
+ // best-effort basis but optimizes for capacity first.
+ SpotAllocationStrategy *string
+
+ // The number of Spot Instance pools across which to allocate your Spot Instances.
+ // The Spot pools are determined from the different instance types in the
+ // overrides. Valid only when the Spot allocation strategy is lowest-price. Value
+ // must be in the range of 1 to 20. Defaults to 2 if not specified.
+ SpotInstancePools *int32
+
+ // The maximum price per unit hour that you are willing to pay for a Spot Instance.
+ // If you leave the value at its default (empty), Amazon EC2 Auto Scaling uses the
+ // On-Demand price as the maximum Spot price. To remove a value that you previously
+ // set, include the property but specify an empty string ("") for the value.
+ SpotMaxPrice *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes a launch configuration.
+type LaunchConfiguration struct {
+
+ // The creation date and time for the launch configuration.
+ //
+ // This member is required.
+ CreatedTime *time.Time
+
+ // The ID of the Amazon Machine Image (AMI) to use to launch your EC2 instances.
+ // For more information, see Finding an AMI
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/finding-an-ami.html) in the
+ // Amazon EC2 User Guide for Linux Instances.
+ //
+ // This member is required.
+ ImageId *string
+
+ // The instance type for the instances. For information about available instance
+ // types, see Available Instance Types
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#AvailableInstanceTypes)
+ // in the Amazon EC2 User Guide for Linux Instances.
+ //
+ // This member is required.
+ InstanceType *string
+
+ // The name of the launch configuration.
+ //
+ // This member is required.
+ LaunchConfigurationName *string
+
+ // For Auto Scaling groups that are running in a VPC, specifies whether to assign a
+ // public IP address to the group's instances. For more information, see Launching
+ // Auto Scaling instances in a VPC
+ // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-in-vpc.html) in the
+ // Amazon EC2 Auto Scaling User Guide.
+ AssociatePublicIpAddress *bool
+
+ // A block device mapping, which specifies the block devices for the instance. For
+ // more information, see Block Device Mapping
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html)
+ // in the Amazon EC2 User Guide for Linux Instances.
+ BlockDeviceMappings []BlockDeviceMapping
+
+ // The ID of a ClassicLink-enabled VPC to link your EC2-Classic instances to. For
+ // more information, see ClassicLink
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html) in
+ // the Amazon EC2 User Guide for Linux Instances and Linking EC2-Classic instances
+ // to a VPC
+ // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-in-vpc.html#as-ClassicLink)
+ // in the Amazon EC2 Auto Scaling User Guide.
+ ClassicLinkVPCId *string
+
+ // The IDs of one or more security groups for the VPC specified in
+ // ClassicLinkVPCId. For more information, see ClassicLink
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html) in
+ // the Amazon EC2 User Guide for Linux Instances and Linking EC2-Classic instances
+ // to a VPC
+ // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-in-vpc.html#as-ClassicLink)
+ // in the Amazon EC2 Auto Scaling User Guide.
+ ClassicLinkVPCSecurityGroups []string
+
+ // Specifies whether the launch configuration is optimized for EBS I/O (true) or
+ // not (false). For more information, see Amazon EBS-Optimized Instances
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSOptimized.html) in the
+ // Amazon EC2 User Guide for Linux Instances.
+ EbsOptimized *bool
+
+ // The name or the Amazon Resource Name (ARN) of the instance profile associated
+ // with the IAM role for the instance. The instance profile contains the IAM role.
+ // For more information, see IAM role for applications that run on Amazon EC2
+ // instances
+ // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/us-iam-role.html) in the
+ // Amazon EC2 Auto Scaling User Guide.
+ IamInstanceProfile *string
+
+ // Controls whether instances in this group are launched with detailed (true) or
+ // basic (false) monitoring. For more information, see Configure Monitoring for
+ // Auto Scaling Instances
+ // (https://docs.aws.amazon.com/autoscaling/latest/userguide/enable-as-instance-metrics.html)
+ // in the Amazon EC2 Auto Scaling User Guide.
+ InstanceMonitoring *InstanceMonitoring
+
+ // The ID of the kernel associated with the AMI.
+ KernelId *string
+
+ // The name of the key pair. For more information, see Amazon EC2 Key Pairs
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html) in the
+ // Amazon EC2 User Guide for Linux Instances.
+ KeyName *string
+
+ // The Amazon Resource Name (ARN) of the launch configuration.
+ LaunchConfigurationARN *string
+
+ // The metadata options for the instances. For more information, see Configuring
+ // the Instance Metadata Options
+ // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/create-launch-config.html#launch-configurations-imds)
+ // in the Amazon EC2 Auto Scaling User Guide.
+ MetadataOptions *InstanceMetadataOptions
+
+ // The tenancy of the instance, either default or dedicated. An instance with
+ // dedicated tenancy runs on isolated, single-tenant hardware and can only be
+ // launched into a VPC. For more information, see Configuring instance tenancy with
+ // Amazon EC2 Auto Scaling
+ // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/auto-scaling-dedicated-instances.html)
+ // in the Amazon EC2 Auto Scaling User Guide.
+ PlacementTenancy *string
+
+ // The ID of the RAM disk associated with the AMI.
+ RamdiskId *string
+
+ // A list that contains the security groups to assign to the instances in the Auto
+ // Scaling group. For more information, see Security Groups for Your VPC
+ // (https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_SecurityGroups.html)
+ // in the Amazon Virtual Private Cloud User Guide.
+ SecurityGroups []string
+
+ // The maximum hourly price to be paid for any Spot Instance launched to fulfill
+ // the request. Spot Instances are launched when the price you specify exceeds the
+ // current Spot price. For more information, see Requesting Spot Instances
+ // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-launch-spot-instances.html)
+ // in the Amazon EC2 Auto Scaling User Guide.
+ SpotPrice *string
+
+ // The user data to make available to the launched EC2 instances. For more
+ // information, see Instance metadata and user data
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html)
+ // (Linux) and Instance metadata and user data
+ // (https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ec2-instance-metadata.html)
+ // (Windows). If you are using a command line tool, base64-encoding is performed
+ // for you, and you can load the text from a file. Otherwise, you must provide
+ // base64-encoded text. User data is limited to 16 KB.
+ UserData *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes a launch template and overrides. You specify these properties as part
+// of a mixed instances policy. When you update the launch template or overrides in
+// the UpdateAutoScalingGroup API call, existing Amazon EC2 instances continue to
+// run. When scale out occurs, Amazon EC2 Auto Scaling launches instances to match
+// the new settings. When scale in occurs, Amazon EC2 Auto Scaling terminates
+// instances according to the group's termination policies.
+type LaunchTemplate struct {
+
+ // The launch template to use.
+ LaunchTemplateSpecification *LaunchTemplateSpecification
+
+ // Any properties that you specify override the same properties in the launch
+ // template. If not provided, Amazon EC2 Auto Scaling uses the instance type
+ // specified in the launch template when it launches an instance.
+ Overrides []LaunchTemplateOverrides
+
+ noSmithyDocumentSerde
+}
+
+// Describes an override for a launch template. The maximum number of instance
+// types that can be associated with an Auto Scaling group is 40. The maximum
+// number of distinct launch templates you can define for an Auto Scaling group is
+// 20. For more information about configuring overrides, see Configuring overrides
+// (https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-override-options.html)
+// in the Amazon EC2 Auto Scaling User Guide.
+type LaunchTemplateOverrides struct {
+
+ // The instance type, such as m3.xlarge. You must use an instance type that is
+ // supported in your requested Region and Availability Zones. For more information,
+ // see Instance types
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html) in the
+ // Amazon Elastic Compute Cloud User Guide.
+ InstanceType *string
+
+ // Provides the launch template to be used when launching the instance type. For
+ // example, some instance types might require a launch template with a different
+ // AMI. If not provided, Amazon EC2 Auto Scaling uses the launch template that's
+ // defined for your mixed instances policy. For more information, see Specifying a
+ // different launch template for an instance type
+ // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-launch-template-overrides.html)
+ // in the Amazon EC2 Auto Scaling User Guide.
+ LaunchTemplateSpecification *LaunchTemplateSpecification
+
+ // The number of capacity units provided by the specified instance type in terms of
+ // virtual CPUs, memory, storage, throughput, or other relative performance
+ // characteristic. When a Spot or On-Demand Instance is provisioned, the capacity
+ // units count toward the desired capacity. Amazon EC2 Auto Scaling provisions
+ // instances until the desired capacity is totally fulfilled, even if this results
+ // in an overage. For example, if there are 2 units remaining to fulfill capacity,
+ // and Amazon EC2 Auto Scaling can only provision an instance with a
+ // WeightedCapacity of 5 units, the instance is provisioned, and the desired
+ // capacity is exceeded by 3 units. For more information, see Instance weighting
+ // for Amazon EC2 Auto Scaling
+ // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-instance-weighting.html)
+ // in the Amazon EC2 Auto Scaling User Guide. Value must be in the range of 1 to
+ // 999.
+ WeightedCapacity *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes the launch template and the version of the launch template that Amazon
+// EC2 Auto Scaling uses to launch Amazon EC2 instances. For more information about
+// launch templates, see Launch templates
+// (https://docs.aws.amazon.com/autoscaling/ec2/userguide/LaunchTemplates.html) in
+// the Amazon EC2 Auto Scaling User Guide.
+type LaunchTemplateSpecification struct {
+
+ // The ID of the launch template. To get the template ID, use the Amazon EC2
+ // DescribeLaunchTemplates
+ // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeLaunchTemplates.html)
+ // API operation. New launch templates can be created using the Amazon EC2
+ // CreateLaunchTemplate
+ // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateLaunchTemplate.html)
+ // API. Conditional: You must specify either a LaunchTemplateId or a
+ // LaunchTemplateName.
+ LaunchTemplateId *string
+
+ // The name of the launch template. To get the template name, use the Amazon EC2
+ // DescribeLaunchTemplates
+ // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeLaunchTemplates.html)
+ // API operation. New launch templates can be created using the Amazon EC2
+ // CreateLaunchTemplate
+ // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateLaunchTemplate.html)
+ // API. Conditional: You must specify either a LaunchTemplateId or a
+ // LaunchTemplateName.
+ LaunchTemplateName *string
+
+ // The version number, $Latest, or $Default. To get the version number, use the
+ // Amazon EC2 DescribeLaunchTemplateVersions
+ // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeLaunchTemplateVersions.html)
+ // API operation. New launch template versions can be created using the Amazon EC2
+ // CreateLaunchTemplateVersion
+ // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateLaunchTemplateVersion.html)
+ // API. If the value is $Latest, Amazon EC2 Auto Scaling selects the latest version
+ // of the launch template when launching instances. If the value is $Default,
+ // Amazon EC2 Auto Scaling selects the default version of the launch template when
+ // launching instances. The default value is $Default.
+ Version *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes a lifecycle hook, which tells Amazon EC2 Auto Scaling that you want to
+// perform an action whenever it launches instances or terminates instances.
+type LifecycleHook struct {
+
+ // The name of the Auto Scaling group for the lifecycle hook.
+ AutoScalingGroupName *string
+
+ // Defines the action the Auto Scaling group should take when the lifecycle hook
+ // timeout elapses or if an unexpected failure occurs. The possible values are
+ // CONTINUE and ABANDON.
+ DefaultResult *string
+
+ // The maximum time, in seconds, that an instance can remain in a Pending:Wait or
+ // Terminating:Wait state. The maximum is 172800 seconds (48 hours) or 100 times
+ // HeartbeatTimeout, whichever is smaller.
+ GlobalTimeout *int32
+
+ // The maximum time, in seconds, that can elapse before the lifecycle hook times
+ // out. If the lifecycle hook times out, Amazon EC2 Auto Scaling performs the
+ // action that you specified in the DefaultResult parameter.
+ HeartbeatTimeout *int32
+
+ // The name of the lifecycle hook.
+ LifecycleHookName *string
+
+ // The state of the EC2 instance to which to attach the lifecycle hook. The
+ // following are possible values:
+ //
+ // * autoscaling:EC2_INSTANCE_LAUNCHING
+ //
+ // *
+ // autoscaling:EC2_INSTANCE_TERMINATING
+ LifecycleTransition *string
+
+ // Additional information that is included any time Amazon EC2 Auto Scaling sends a
+ // message to the notification target.
+ NotificationMetadata *string
+
+ // The ARN of the target that Amazon EC2 Auto Scaling sends notifications to when
+ // an instance is in the transition state for the lifecycle hook. The notification
+ // target can be either an SQS queue or an SNS topic.
+ NotificationTargetARN *string
+
+ // The ARN of the IAM role that allows the Auto Scaling group to publish to the
+ // specified notification target.
+ RoleARN *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes information used to specify a lifecycle hook for an Auto Scaling
+// group. A lifecycle hook tells Amazon EC2 Auto Scaling to perform an action on an
+// instance when the instance launches (before it is put into service) or as the
+// instance terminates (before it is fully terminated). This step is a part of the
+// procedure for creating a lifecycle hook for an Auto Scaling group:
+//
+// * (Optional)
+// Create a Lambda function and a rule that allows CloudWatch Events to invoke your
+// Lambda function when Amazon EC2 Auto Scaling launches or terminates
+// instances.
+//
+// * (Optional) Create a notification target and an IAM role. The
+// target can be either an Amazon SQS queue or an Amazon SNS topic. The role allows
+// Amazon EC2 Auto Scaling to publish lifecycle notifications to the target.
+//
+// *
+// Create the lifecycle hook. Specify whether the hook is used when the instances
+// launch or terminate.
+//
+// * If you need more time, record the lifecycle action
+// heartbeat to keep the instance in a pending state.
+//
+// * If you finish before the
+// timeout period ends, complete the lifecycle action.
+//
+// For more information, see
+// Amazon EC2 Auto Scaling lifecycle hooks
+// (https://docs.aws.amazon.com/autoscaling/ec2/userguide/lifecycle-hooks.html) in
+// the Amazon EC2 Auto Scaling User Guide.
+type LifecycleHookSpecification struct {
+
+ // The name of the lifecycle hook.
+ //
+ // This member is required.
+ LifecycleHookName *string
+
+ // The state of the EC2 instance to which you want to attach the lifecycle hook.
+ // The valid values are:
+ //
+ // * autoscaling:EC2_INSTANCE_LAUNCHING
+ //
+ // *
+ // autoscaling:EC2_INSTANCE_TERMINATING
+ //
+ // This member is required.
+ LifecycleTransition *string
+
+ // Defines the action the Auto Scaling group should take when the lifecycle hook
+ // timeout elapses or if an unexpected failure occurs. The valid values are
+ // CONTINUE and ABANDON. The default value is ABANDON.
+ DefaultResult *string
+
+ // The maximum time, in seconds, that can elapse before the lifecycle hook times
+ // out. If the lifecycle hook times out, Amazon EC2 Auto Scaling performs the
+ // action that you specified in the DefaultResult parameter. You can prevent the
+ // lifecycle hook from timing out by calling RecordLifecycleActionHeartbeat.
+ HeartbeatTimeout *int32
+
+ // Additional information that you want to include any time Amazon EC2 Auto Scaling
+ // sends a message to the notification target.
+ NotificationMetadata *string
+
+ // The ARN of the target that Amazon EC2 Auto Scaling sends notifications to when
+ // an instance is in the transition state for the lifecycle hook. The notification
+ // target can be either an SQS queue or an SNS topic.
+ NotificationTargetARN *string
+
+ // The ARN of the IAM role that allows the Auto Scaling group to publish to the
+ // specified notification target, for example, an Amazon SNS topic or an Amazon SQS
+ // queue.
+ RoleARN *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes the state of a Classic Load Balancer.
+type LoadBalancerState struct {
+
+ // The name of the load balancer.
+ LoadBalancerName *string
+
+ // One of the following load balancer states:
+ //
+ // * Adding - The Auto Scaling
+ // instances are being registered with the load balancer.
+ //
+ // * Added - All Auto
+ // Scaling instances are registered with the load balancer.
+ //
+ // * InService - At least
+ // one Auto Scaling instance passed an ELB health check.
+ //
+ // * Removing - The Auto
+ // Scaling instances are being deregistered from the load balancer. If connection
+ // draining is enabled, Elastic Load Balancing waits for in-flight requests to
+ // complete before deregistering the instances.
+ //
+ // * Removed - All Auto Scaling
+ // instances are deregistered from the load balancer.
+ State *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes the state of a target group.
+type LoadBalancerTargetGroupState struct {
+
+ // The Amazon Resource Name (ARN) of the target group.
+ LoadBalancerTargetGroupARN *string
+
+ // The state of the target group.
+ //
+ // * Adding - The Auto Scaling instances are being
+ // registered with the target group.
+ //
+ // * Added - All Auto Scaling instances are
+ // registered with the target group.
+ //
+ // * InService - At least one Auto Scaling
+ // instance passed an ELB health check.
+ //
+ // * Removing - The Auto Scaling instances
+ // are being deregistered from the target group. If connection draining is enabled,
+ // Elastic Load Balancing waits for in-flight requests to complete before
+ // deregistering the instances.
+ //
+ // * Removed - All Auto Scaling instances are
+ // deregistered from the target group.
+ State *string
+
+ noSmithyDocumentSerde
+}
+
+// A GetPredictiveScalingForecast call returns the load forecast for a predictive
+// scaling policy. This structure includes the data points for that load forecast,
+// along with the timestamps of those data points and the metric specification.
+type LoadForecast struct {
+
+ // The metric specification for the load forecast.
+ //
+ // This member is required.
+ MetricSpecification *PredictiveScalingMetricSpecification
+
+ // The time stamps for the data points, in UTC format.
+ //
+ // This member is required.
+ Timestamps []time.Time
+
+ // The values of the data points.
+ //
+ // This member is required.
+ Values []float64
+
+ noSmithyDocumentSerde
+}
+
+// Describes a metric.
+type MetricCollectionType struct {
+
+ // One of the following metrics:
+ //
+ // * GroupMinSize
+ //
+ // * GroupMaxSize
+ //
+ // *
+ // GroupDesiredCapacity
+ //
+ // * GroupInServiceInstances
+ //
+ // * GroupPendingInstances
+ //
+ // *
+ // GroupStandbyInstances
+ //
+ // * GroupTerminatingInstances
+ //
+ // * GroupTotalInstances
+ //
+ // *
+ // GroupInServiceCapacity
+ //
+ // * GroupPendingCapacity
+ //
+ // * GroupStandbyCapacity
+ //
+ // *
+ // GroupTerminatingCapacity
+ //
+ // * GroupTotalCapacity
+ //
+ // * WarmPoolDesiredCapacity
+ //
+ // *
+ // WarmPoolWarmedCapacity
+ //
+ // * WarmPoolPendingCapacity
+ //
+ // *
+ // WarmPoolTerminatingCapacity
+ //
+ // * WarmPoolTotalCapacity
+ //
+ // *
+ // GroupAndWarmPoolDesiredCapacity
+ //
+ // * GroupAndWarmPoolTotalCapacity
+ Metric *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes the dimension of a metric.
+type MetricDimension struct {
+
+ // The name of the dimension.
+ //
+ // This member is required.
+ Name *string
+
+ // The value of the dimension.
+ //
+ // This member is required.
+ Value *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes a granularity of a metric.
+type MetricGranularityType struct {
+
+ // The granularity. The only valid value is 1Minute.
+ Granularity *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes a mixed instances policy. A mixed instances policy contains the
+// instance types Amazon EC2 Auto Scaling can launch, and other information Amazon
+// EC2 Auto Scaling can use to launch instances to help you optimize your costs.
+// For more information, see Auto Scaling groups with multiple instance types and
+// purchase options
+// (https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-purchase-options.html)
+// in the Amazon EC2 Auto Scaling User Guide.
+type MixedInstancesPolicy struct {
+
+ // Specifies the instances distribution. If not provided, the value for each
+ // property in InstancesDistribution uses a default value.
+ InstancesDistribution *InstancesDistribution
+
+ // Specifies the launch template to use and the instance types (overrides) that are
+ // used to provision EC2 instances to fulfill On-Demand and Spot capacities.
+ // Required when creating a mixed instances policy.
+ LaunchTemplate *LaunchTemplate
+
+ noSmithyDocumentSerde
+}
+
+// Describes a notification.
+type NotificationConfiguration struct {
+
+ // The name of the Auto Scaling group.
+ AutoScalingGroupName *string
+
+ // One of the following event notification types:
+ //
+ // *
+ // autoscaling:EC2_INSTANCE_LAUNCH
+ //
+ // * autoscaling:EC2_INSTANCE_LAUNCH_ERROR
+ //
+ // *
+ // autoscaling:EC2_INSTANCE_TERMINATE
+ //
+ // *
+ // autoscaling:EC2_INSTANCE_TERMINATE_ERROR
+ //
+ // * autoscaling:TEST_NOTIFICATION
+ NotificationType *string
+
+ // The Amazon Resource Name (ARN) of the Amazon Simple Notification Service (Amazon
+ // SNS) topic.
+ TopicARN *string
+
+ noSmithyDocumentSerde
+}
+
+// Represents a predefined metric for a target tracking scaling policy to use with
+// Amazon EC2 Auto Scaling.
+type PredefinedMetricSpecification struct {
+
+ // The metric type. The following predefined metrics are available:
+ //
+ // *
+ // ASGAverageCPUUtilization - Average CPU utilization of the Auto Scaling group.
+ //
+ // *
+ // ASGAverageNetworkIn - Average number of bytes received on all network interfaces
+ // by the Auto Scaling group.
+ //
+ // * ASGAverageNetworkOut - Average number of bytes
+ // sent out on all network interfaces by the Auto Scaling group.
+ //
+ // *
+ // ALBRequestCountPerTarget - Number of requests completed per target in an
+ // Application Load Balancer target group.
+ //
+ // This member is required.
+ PredefinedMetricType MetricType
+
+ // A label that uniquely identifies a specific Application Load Balancer target
+ // group from which to determine the average request count served by your Auto
+ // Scaling group. You can't specify a resource label unless the target group is
+ // attached to the Auto Scaling group. You create the resource label by appending
+ // the final portion of the load balancer ARN and the final portion of the target
+ // group ARN into a single value, separated by a forward slash (/). The format of
+ // the resource label is:
+ // app/my-alb/778d41231b141a0f/targetgroup/my-alb-target-group/943f017f100becff.
+ // Where:
+ //
+ // * app// is the final portion of the load balancer ARN
+ //
+ // * targetgroup//
+ // is the final portion of the target group ARN.
+ //
+ // To find the ARN for an
+ // Application Load Balancer, use the DescribeLoadBalancers
+ // (https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_DescribeLoadBalancers.html)
+ // API operation. To find the ARN for the target group, use the
+ // DescribeTargetGroups
+ // (https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_DescribeTargetGroups.html)
+ // API operation.
+ ResourceLabel *string
+
+ noSmithyDocumentSerde
+}
+
+// Represents a predictive scaling policy configuration to use with Amazon EC2 Auto
+// Scaling.
+type PredictiveScalingConfiguration struct {
+
+ // This structure includes the metrics and target utilization to use for predictive
+ // scaling. This is an array, but we currently only support a single metric
+ // specification. That is, you can specify a target value and a single metric pair,
+ // or a target value and one scaling metric and one load metric.
+ //
+ // This member is required.
+ MetricSpecifications []PredictiveScalingMetricSpecification
+
+ // Defines the behavior that should be applied if the forecast capacity approaches
+ // or exceeds the maximum capacity of the Auto Scaling group. Defaults to
+ // HonorMaxCapacity if not specified. The following are possible values:
+ //
+ // *
+ // HonorMaxCapacity - Amazon EC2 Auto Scaling cannot scale out capacity higher than
+ // the maximum capacity. The maximum capacity is enforced as a hard limit.
+ //
+ // *
+ // IncreaseMaxCapacity - Amazon EC2 Auto Scaling can scale out capacity higher than
+ // the maximum capacity when the forecast capacity is close to or exceeds the
+ // maximum capacity. The upper limit is determined by the forecasted capacity and
+ // the value for MaxCapacityBuffer.
+ MaxCapacityBreachBehavior PredictiveScalingMaxCapacityBreachBehavior
+
+ // The size of the capacity buffer to use when the forecast capacity is close to or
+ // exceeds the maximum capacity. The value is specified as a percentage relative to
+ // the forecast capacity. For example, if the buffer is 10, this means a 10 percent
+ // buffer, such that if the forecast capacity is 50, and the maximum capacity is
+ // 40, then the effective maximum capacity is 55. If set to 0, Amazon EC2 Auto
+ // Scaling may scale capacity higher than the maximum capacity to equal but not
+ // exceed forecast capacity. Required if the MaxCapacityBreachBehavior property is
+ // set to IncreaseMaxCapacity, and cannot be used otherwise.
+ MaxCapacityBuffer *int32
+
+ // The predictive scaling mode. Defaults to ForecastOnly if not specified.
+ Mode PredictiveScalingMode
+
+ // The amount of time, in seconds, by which the instance launch time can be
+ // advanced. For example, the forecast says to add capacity at 10:00 AM, and you
+ // choose to pre-launch instances by 5 minutes. In that case, the instances will be
+ // launched at 9:55 AM. The intention is to give resources time to be provisioned.
+ // It can take a few minutes to launch an EC2 instance. The actual amount of time
+ // required depends on several factors, such as the size of the instance and
+ // whether there are startup scripts to complete. The value must be less than the
+ // forecast interval duration of 3600 seconds (60 minutes). Defaults to 300 seconds
+ // if not specified.
+ SchedulingBufferTime *int32
+
+ noSmithyDocumentSerde
+}
+
+// This structure specifies the metrics and target utilization settings for a
+// predictive scaling policy. You must specify either a metric pair, or a load
+// metric and a scaling metric individually. Specifying a metric pair instead of
+// individual metrics provides a simpler way to configure metrics for a scaling
+// policy. You choose the metric pair, and the policy automatically knows the
+// correct sum and average statistics to use for the load metric and the scaling
+// metric. Example
+//
+// * You create a predictive scaling policy and specify
+// ALBRequestCount as the value for the metric pair and 1000.0 as the target value.
+// For this type of metric, you must provide the metric dimension for the
+// corresponding target group, so you also provide a resource label for the
+// Application Load Balancer target group that is attached to your Auto Scaling
+// group.
+//
+// * The number of requests the target group receives per minute provides
+// the load metric, and the request count averaged between the members of the
+// target group provides the scaling metric. In CloudWatch, this refers to the
+// RequestCount and RequestCountPerTarget metrics, respectively.
+//
+// * For optimal use
+// of predictive scaling, you adhere to the best practice of using a dynamic
+// scaling policy to automatically scale between the minimum capacity and maximum
+// capacity in response to real-time changes in resource utilization.
+//
+// * Amazon EC2
+// Auto Scaling consumes data points for the load metric over the last 14 days and
+// creates an hourly load forecast for predictive scaling. (A minimum of 24 hours
+// of data is required.)
+//
+// * After creating the load forecast, Amazon EC2 Auto
+// Scaling determines when to reduce or increase the capacity of your Auto Scaling
+// group in each hour of the forecast period so that the average number of requests
+// received by each instance is as close to 1000 requests per minute as possible at
+// all times.
+type PredictiveScalingMetricSpecification struct {
+
+ // Specifies the target utilization.
+ //
+ // This member is required.
+ TargetValue *float64
+
+ // The load metric specification.
+ PredefinedLoadMetricSpecification *PredictiveScalingPredefinedLoadMetric
+
+ // The metric pair specification from which Amazon EC2 Auto Scaling determines the
+ // appropriate scaling metric and load metric to use.
+ PredefinedMetricPairSpecification *PredictiveScalingPredefinedMetricPair
+
+ // The scaling metric specification.
+ PredefinedScalingMetricSpecification *PredictiveScalingPredefinedScalingMetric
+
+ noSmithyDocumentSerde
+}
+
+// Describes a load metric for a predictive scaling policy. When returned in the
+// output of DescribePolicies, it indicates that a predictive scaling policy uses
+// individually specified load and scaling metrics instead of a metric pair.
+type PredictiveScalingPredefinedLoadMetric struct {
+
+ // The metric type.
+ //
+ // This member is required.
+ PredefinedMetricType PredefinedLoadMetricType
+
+ // A label that uniquely identifies a specific Application Load Balancer target
+ // group from which to determine the request count served by your Auto Scaling
+ // group. You can't specify a resource label unless the target group is attached to
+ // the Auto Scaling group. You create the resource label by appending the final
+ // portion of the load balancer ARN and the final portion of the target group ARN
+ // into a single value, separated by a forward slash (/). The format of the
+ // resource label is:
+ // app/my-alb/778d41231b141a0f/targetgroup/my-alb-target-group/943f017f100becff.
+ // Where:
+ //
+ // * app// is the final portion of the load balancer ARN
+ //
+ // * targetgroup//
+ // is the final portion of the target group ARN.
+ //
+ // To find the ARN for an
+ // Application Load Balancer, use the DescribeLoadBalancers
+ // (https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_DescribeLoadBalancers.html)
+ // API operation. To find the ARN for the target group, use the
+ // DescribeTargetGroups
+ // (https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_DescribeTargetGroups.html)
+ // API operation.
+ ResourceLabel *string
+
+ noSmithyDocumentSerde
+}
+
+// Represents a metric pair for a predictive scaling policy.
+type PredictiveScalingPredefinedMetricPair struct {
+
+ // Indicates which metrics to use. There are two different types of metrics for
+ // each metric type: one is a load metric and one is a scaling metric. For example,
+ // if the metric type is ASGCPUUtilization, the Auto Scaling group's total CPU
+ // metric is used as the load metric, and the average CPU metric is used for the
+ // scaling metric.
+ //
+ // This member is required.
+ PredefinedMetricType PredefinedMetricPairType
+
+ // A label that uniquely identifies a specific Application Load Balancer target
+ // group from which to determine the total and average request count served by your
+ // Auto Scaling group. You can't specify a resource label unless the target group
+ // is attached to the Auto Scaling group. You create the resource label by
+ // appending the final portion of the load balancer ARN and the final portion of
+ // the target group ARN into a single value, separated by a forward slash (/). The
+ // format of the resource label is:
+ // app/my-alb/778d41231b141a0f/targetgroup/my-alb-target-group/943f017f100becff.
+ // Where:
+ //
+ // * app// is the final portion of the load balancer ARN
+ //
+ // * targetgroup//
+ // is the final portion of the target group ARN.
+ //
+ // To find the ARN for an
+ // Application Load Balancer, use the DescribeLoadBalancers
+ // (https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_DescribeLoadBalancers.html)
+ // API operation. To find the ARN for the target group, use the
+ // DescribeTargetGroups
+ // (https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_DescribeTargetGroups.html)
+ // API operation.
+ ResourceLabel *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes a scaling metric for a predictive scaling policy. When returned in the
+// output of DescribePolicies, it indicates that a predictive scaling policy uses
+// individually specified load and scaling metrics instead of a metric pair.
+type PredictiveScalingPredefinedScalingMetric struct {
+
+ // The metric type.
+ //
+ // This member is required.
+ PredefinedMetricType PredefinedScalingMetricType
+
+ // A label that uniquely identifies a specific Application Load Balancer target
+ // group from which to determine the average request count served by your Auto
+ // Scaling group. You can't specify a resource label unless the target group is
+ // attached to the Auto Scaling group. You create the resource label by appending
+ // the final portion of the load balancer ARN and the final portion of the target
+ // group ARN into a single value, separated by a forward slash (/). The format of
+ // the resource label is:
+ // app/my-alb/778d41231b141a0f/targetgroup/my-alb-target-group/943f017f100becff.
+ // Where:
+ //
+ // * app// is the final portion of the load balancer ARN
+ //
+ // * targetgroup//
+ // is the final portion of the target group ARN.
+ //
+ // To find the ARN for an
+ // Application Load Balancer, use the DescribeLoadBalancers
+ // (https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_DescribeLoadBalancers.html)
+ // API operation. To find the ARN for the target group, use the
+ // DescribeTargetGroups
+ // (https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_DescribeTargetGroups.html)
+ // API operation.
+ ResourceLabel *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes a process type. For more information, see Scaling processes
+// (https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-suspend-resume-processes.html#process-types)
+// in the Amazon EC2 Auto Scaling User Guide.
+type ProcessType struct {
+
+ // One of the following processes:
+ //
+ // * Launch
+ //
+ // * Terminate
+ //
+ // * AddToLoadBalancer
+ //
+ // *
+ // AlarmNotification
+ //
+ // * AZRebalance
+ //
+ // * HealthCheck
+ //
+ // * InstanceRefresh
+ //
+ // *
+ // ReplaceUnhealthy
+ //
+ // * ScheduledActions
+ //
+ // This member is required.
+ ProcessName *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes the preferences for an instance refresh.
+type RefreshPreferences struct {
+
+ // The amount of time, in seconds, to wait after a checkpoint before continuing.
+ // This property is optional, but if you specify a value for it, you must also
+ // specify a value for CheckpointPercentages. If you specify a value for
+ // CheckpointPercentages and not for CheckpointDelay, the CheckpointDelay defaults
+ // to 3600 (1 hour).
+ CheckpointDelay *int32
+
+ // Threshold values for each checkpoint in ascending order. Each number must be
+ // unique. To replace all instances in the Auto Scaling group, the last number in
+ // the array must be 100. For usage examples, see Adding checkpoints to an instance
+ // refresh
+ // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-adding-checkpoints-instance-refresh.html)
+ // in the Amazon EC2 Auto Scaling User Guide.
+ CheckpointPercentages []int32
+
+ // The number of seconds until a newly launched instance is configured and ready to
+ // use. During this time, Amazon EC2 Auto Scaling does not immediately move on to
+ // the next replacement. The default is to use the value for the health check grace
+ // period defined for the group.
+ InstanceWarmup *int32
+
+ // The amount of capacity in the Auto Scaling group that must remain healthy during
+ // an instance refresh to allow the operation to continue. The value is expressed
+ // as a percentage of the desired capacity of the Auto Scaling group (rounded up to
+ // the nearest integer). The default is 90. Setting the minimum healthy percentage
+ // to 100 percent limits the rate of replacement to one instance at a time. In
+ // contrast, setting it to 0 percent has the effect of replacing all instances at
+ // the same time.
+ MinHealthyPercentage *int32
+
+ // A boolean value that indicates whether skip matching is enabled. If true, then
+ // Amazon EC2 Auto Scaling skips replacing instances that match the desired
+ // configuration. If no desired configuration is specified, then it skips replacing
+ // instances that have the same configuration that is already set on the group. The
+ // default is false.
+ SkipMatching *bool
+
+ noSmithyDocumentSerde
+}
+
+// Describes a scaling policy.
+type ScalingPolicy struct {
+
+ // Specifies how the scaling adjustment is interpreted (for example, an absolute
+ // number or a percentage). The valid values are ChangeInCapacity, ExactCapacity,
+ // and PercentChangeInCapacity.
+ AdjustmentType *string
+
+ // The CloudWatch alarms related to the policy.
+ Alarms []Alarm
+
+ // The name of the Auto Scaling group.
+ AutoScalingGroupName *string
+
+ // The duration of the policy's cooldown period, in seconds.
+ Cooldown *int32
+
+ // Indicates whether the policy is enabled (true) or disabled (false).
+ Enabled *bool
+
+ // The estimated time, in seconds, until a newly launched instance can contribute
+ // to the CloudWatch metrics.
+ EstimatedInstanceWarmup *int32
+
+ // The aggregation type for the CloudWatch metrics. The valid values are Minimum,
+ // Maximum, and Average.
+ MetricAggregationType *string
+
+ // The minimum value to scale by when the adjustment type is
+ // PercentChangeInCapacity.
+ MinAdjustmentMagnitude *int32
+
+ // Available for backward compatibility. Use MinAdjustmentMagnitude instead.
+ //
+ // Deprecated: This member has been deprecated.
+ MinAdjustmentStep *int32
+
+ // The Amazon Resource Name (ARN) of the policy.
+ PolicyARN *string
+
+ // The name of the scaling policy.
+ PolicyName *string
+
+ // One of the following policy types:
+ //
+ // * TargetTrackingScaling
+ //
+ // * StepScaling
+ //
+ // *
+ // SimpleScaling (default)
+ //
+ // * PredictiveScaling
+ //
+ // For more information, see Target
+ // tracking scaling policies
+ // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-scaling-target-tracking.html)
+ // and Step and simple scaling policies
+ // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-scaling-simple-step.html)
+ // in the Amazon EC2 Auto Scaling User Guide.
+ PolicyType *string
+
+ // A predictive scaling policy.
+ PredictiveScalingConfiguration *PredictiveScalingConfiguration
+
+ // The amount by which to scale, based on the specified adjustment type. A positive
+ // value adds to the current capacity while a negative number removes from the
+ // current capacity.
+ ScalingAdjustment *int32
+
+ // A set of adjustments that enable you to scale based on the size of the alarm
+ // breach.
+ StepAdjustments []StepAdjustment
+
+ // A target tracking scaling policy.
+ TargetTrackingConfiguration *TargetTrackingConfiguration
+
+ noSmithyDocumentSerde
+}
+
+// Describes a scheduled scaling action.
+type ScheduledUpdateGroupAction struct {
+
+ // The name of the Auto Scaling group.
+ AutoScalingGroupName *string
+
+ // The desired capacity is the initial capacity of the Auto Scaling group after the
+ // scheduled action runs and the capacity it attempts to maintain.
+ DesiredCapacity *int32
+
+ // The date and time in UTC for the recurring schedule to end. For example,
+ // "2019-06-01T00:00:00Z".
+ EndTime *time.Time
+
+ // The maximum size of the Auto Scaling group.
+ MaxSize *int32
+
+ // The minimum size of the Auto Scaling group.
+ MinSize *int32
+
+ // The recurring schedule for the action, in Unix cron syntax format. When
+ // StartTime and EndTime are specified with Recurrence, they form the boundaries of
+ // when the recurring action starts and stops.
+ Recurrence *string
+
+ // The Amazon Resource Name (ARN) of the scheduled action.
+ ScheduledActionARN *string
+
+ // The name of the scheduled action.
+ ScheduledActionName *string
+
+ // The date and time in UTC for this action to start. For example,
+ // "2019-06-01T00:00:00Z".
+ StartTime *time.Time
+
+ // This parameter is no longer used.
+ Time *time.Time
+
+ // The time zone for the cron expression.
+ TimeZone *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes information used for one or more scheduled scaling action updates in a
+// BatchPutScheduledUpdateGroupAction operation.
+type ScheduledUpdateGroupActionRequest struct {
+
+ // The name of the scaling action.
+ //
+ // This member is required.
+ ScheduledActionName *string
+
+ // The desired capacity is the initial capacity of the Auto Scaling group after the
+ // scheduled action runs and the capacity it attempts to maintain.
+ DesiredCapacity *int32
+
+ // The date and time for the recurring schedule to end, in UTC.
+ EndTime *time.Time
+
+ // The maximum size of the Auto Scaling group.
+ MaxSize *int32
+
+ // The minimum size of the Auto Scaling group.
+ MinSize *int32
+
+ // The recurring schedule for the action, in Unix cron syntax format. This format
+ // consists of five fields separated by white spaces: [Minute] [Hour]
+ // [Day_of_Month] [Month_of_Year] [Day_of_Week]. The value must be in quotes (for
+ // example, "30 0 1 1,6,12 *"). For more information about this format, see Crontab
+ // (http://crontab.org). When StartTime and EndTime are specified with Recurrence,
+ // they form the boundaries of when the recurring action starts and stops. Cron
+ // expressions use Universal Coordinated Time (UTC) by default.
+ Recurrence *string
+
+ // The date and time for the action to start, in YYYY-MM-DDThh:mm:ssZ format in
+ // UTC/GMT only and in quotes (for example, "2019-06-01T00:00:00Z"). If you specify
+ // Recurrence and StartTime, Amazon EC2 Auto Scaling performs the action at this
+ // time, and then performs the action based on the specified recurrence. If you try
+ // to schedule the action in the past, Amazon EC2 Auto Scaling returns an error
+ // message.
+ StartTime *time.Time
+
+ // Specifies the time zone for a cron expression. If a time zone is not provided,
+ // UTC is used by default. Valid values are the canonical names of the IANA time
+ // zones, derived from the IANA Time Zone Database (such as Etc/GMT+9 or
+ // Pacific/Tahiti). For more information, see
+ // https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
+ // (https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
+ TimeZone *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes information used to create a step adjustment for a step scaling
+// policy. For the following examples, suppose that you have an alarm with a breach
+// threshold of 50:
+//
+// * To trigger the adjustment when the metric is greater than or
+// equal to 50 and less than 60, specify a lower bound of 0 and an upper bound of
+// 10.
+//
+// * To trigger the adjustment when the metric is greater than 40 and less
+// than or equal to 50, specify a lower bound of -10 and an upper bound of
+// 0.
+//
+// There are a few rules for the step adjustments for your step policy:
+//
+// * The
+// ranges of your step adjustments can't overlap or have a gap.
+//
+// * At most, one
+// step adjustment can have a null lower bound. If one step adjustment has a
+// negative lower bound, then there must be a step adjustment with a null lower
+// bound.
+//
+// * At most, one step adjustment can have a null upper bound. If one step
+// adjustment has a positive upper bound, then there must be a step adjustment with
+// a null upper bound.
+//
+// * The upper and lower bound can't be null in the same step
+// adjustment.
+//
+// For more information, see Step adjustments
+// (https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-scaling-simple-step.html#as-scaling-steps)
+// in the Amazon EC2 Auto Scaling User Guide.
+type StepAdjustment struct {
+
+ // The amount by which to scale, based on the specified adjustment type. A positive
+ // value adds to the current capacity while a negative number removes from the
+ // current capacity.
+ //
+ // This member is required.
+ ScalingAdjustment *int32
+
+ // The lower bound for the difference between the alarm threshold and the
+ // CloudWatch metric. If the metric value is above the breach threshold, the lower
+ // bound is inclusive (the metric must be greater than or equal to the threshold
+ // plus the lower bound). Otherwise, it is exclusive (the metric must be greater
+ // than the threshold plus the lower bound). A null value indicates negative
+ // infinity.
+ MetricIntervalLowerBound *float64
+
+ // The upper bound for the difference between the alarm threshold and the
+ // CloudWatch metric. If the metric value is above the breach threshold, the upper
+ // bound is exclusive (the metric must be less than the threshold plus the upper
+ // bound). Otherwise, it is inclusive (the metric must be less than or equal to the
+ // threshold plus the upper bound). A null value indicates positive infinity. The
+ // upper bound must be greater than the lower bound.
+ MetricIntervalUpperBound *float64
+
+ noSmithyDocumentSerde
+}
+
+// Describes an auto scaling process that has been suspended. For more information,
+// see Scaling processes
+// (https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-suspend-resume-processes.html#process-types)
+// in the Amazon EC2 Auto Scaling User Guide.
+type SuspendedProcess struct {
+
+ // The name of the suspended process.
+ ProcessName *string
+
+ // The reason that the process was suspended.
+ SuspensionReason *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes a tag for an Auto Scaling group.
+type Tag struct {
+
+ // The tag key.
+ //
+ // This member is required.
+ Key *string
+
+ // Determines whether the tag is added to new instances as they are launched in the
+ // group.
+ PropagateAtLaunch *bool
+
+ // The name of the Auto Scaling group.
+ ResourceId *string
+
+ // The type of resource. The only supported value is auto-scaling-group.
+ ResourceType *string
+
+ // The tag value.
+ Value *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes a tag for an Auto Scaling group.
+type TagDescription struct {
+
+ // The tag key.
+ Key *string
+
+ // Determines whether the tag is added to new instances as they are launched in the
+ // group.
+ PropagateAtLaunch *bool
+
+ // The name of the group.
+ ResourceId *string
+
+ // The type of resource. The only supported value is auto-scaling-group.
+ ResourceType *string
+
+ // The tag value.
+ Value *string
+
+ noSmithyDocumentSerde
+}
+
+// Represents a target tracking scaling policy configuration to use with Amazon EC2
+// Auto Scaling.
+type TargetTrackingConfiguration struct {
+
+ // The target value for the metric.
+ //
+ // This member is required.
+ TargetValue *float64
+
+ // A customized metric. You must specify either a predefined metric or a customized
+ // metric.
+ CustomizedMetricSpecification *CustomizedMetricSpecification
+
+ // Indicates whether scaling in by the target tracking scaling policy is disabled.
+ // If scaling in is disabled, the target tracking scaling policy doesn't remove
+ // instances from the Auto Scaling group. Otherwise, the target tracking scaling
+ // policy can remove instances from the Auto Scaling group. The default is false.
+ DisableScaleIn *bool
+
+ // A predefined metric. You must specify either a predefined metric or a customized
+ // metric.
+ PredefinedMetricSpecification *PredefinedMetricSpecification
+
+ noSmithyDocumentSerde
+}
+
+// Describes a warm pool configuration.
+type WarmPoolConfiguration struct {
+
+ // The maximum number of instances that are allowed to be in the warm pool or in
+ // any state except Terminated for the Auto Scaling group.
+ MaxGroupPreparedCapacity *int32
+
+ // The minimum number of instances to maintain in the warm pool.
+ MinSize *int32
+
+ // The instance state to transition to after the lifecycle actions are complete.
+ PoolState WarmPoolState
+
+ // The status of a warm pool that is marked for deletion.
+ Status WarmPoolStatus
+
+ noSmithyDocumentSerde
+}
+
+type noSmithyDocumentSerde = smithydocument.NoSerde
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/validators.go b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/validators.go
new file mode 100644
index 00000000..605f47e5
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/autoscaling/validators.go
@@ -0,0 +1,2312 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package autoscaling
+
+import (
+ "context"
+ "fmt"
+ "github.com/aws/aws-sdk-go-v2/service/autoscaling/types"
+ smithy "github.com/aws/smithy-go"
+ "github.com/aws/smithy-go/middleware"
+)
+
+type validateOpAttachInstances struct {
+}
+
+func (*validateOpAttachInstances) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpAttachInstances) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*AttachInstancesInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpAttachInstancesInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpAttachLoadBalancers struct {
+}
+
+func (*validateOpAttachLoadBalancers) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpAttachLoadBalancers) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*AttachLoadBalancersInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpAttachLoadBalancersInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpAttachLoadBalancerTargetGroups struct {
+}
+
+func (*validateOpAttachLoadBalancerTargetGroups) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpAttachLoadBalancerTargetGroups) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*AttachLoadBalancerTargetGroupsInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpAttachLoadBalancerTargetGroupsInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpBatchDeleteScheduledAction struct {
+}
+
+func (*validateOpBatchDeleteScheduledAction) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpBatchDeleteScheduledAction) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*BatchDeleteScheduledActionInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpBatchDeleteScheduledActionInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpBatchPutScheduledUpdateGroupAction struct {
+}
+
+func (*validateOpBatchPutScheduledUpdateGroupAction) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpBatchPutScheduledUpdateGroupAction) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*BatchPutScheduledUpdateGroupActionInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpBatchPutScheduledUpdateGroupActionInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpCancelInstanceRefresh struct {
+}
+
+func (*validateOpCancelInstanceRefresh) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpCancelInstanceRefresh) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*CancelInstanceRefreshInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpCancelInstanceRefreshInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpCompleteLifecycleAction struct {
+}
+
+func (*validateOpCompleteLifecycleAction) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpCompleteLifecycleAction) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*CompleteLifecycleActionInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpCompleteLifecycleActionInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpCreateAutoScalingGroup struct {
+}
+
+func (*validateOpCreateAutoScalingGroup) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpCreateAutoScalingGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*CreateAutoScalingGroupInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpCreateAutoScalingGroupInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpCreateLaunchConfiguration struct {
+}
+
+func (*validateOpCreateLaunchConfiguration) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpCreateLaunchConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*CreateLaunchConfigurationInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpCreateLaunchConfigurationInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpCreateOrUpdateTags struct {
+}
+
+func (*validateOpCreateOrUpdateTags) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpCreateOrUpdateTags) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*CreateOrUpdateTagsInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpCreateOrUpdateTagsInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpDeleteAutoScalingGroup struct {
+}
+
+func (*validateOpDeleteAutoScalingGroup) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpDeleteAutoScalingGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*DeleteAutoScalingGroupInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpDeleteAutoScalingGroupInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpDeleteLaunchConfiguration struct {
+}
+
+func (*validateOpDeleteLaunchConfiguration) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpDeleteLaunchConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*DeleteLaunchConfigurationInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpDeleteLaunchConfigurationInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpDeleteLifecycleHook struct {
+}
+
+func (*validateOpDeleteLifecycleHook) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpDeleteLifecycleHook) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*DeleteLifecycleHookInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpDeleteLifecycleHookInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpDeleteNotificationConfiguration struct {
+}
+
+func (*validateOpDeleteNotificationConfiguration) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpDeleteNotificationConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*DeleteNotificationConfigurationInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpDeleteNotificationConfigurationInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpDeletePolicy struct {
+}
+
+func (*validateOpDeletePolicy) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpDeletePolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*DeletePolicyInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpDeletePolicyInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpDeleteScheduledAction struct {
+}
+
+func (*validateOpDeleteScheduledAction) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpDeleteScheduledAction) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*DeleteScheduledActionInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpDeleteScheduledActionInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpDeleteTags struct {
+}
+
+func (*validateOpDeleteTags) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpDeleteTags) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*DeleteTagsInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpDeleteTagsInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpDeleteWarmPool struct {
+}
+
+func (*validateOpDeleteWarmPool) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpDeleteWarmPool) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*DeleteWarmPoolInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpDeleteWarmPoolInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpDescribeInstanceRefreshes struct {
+}
+
+func (*validateOpDescribeInstanceRefreshes) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpDescribeInstanceRefreshes) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*DescribeInstanceRefreshesInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpDescribeInstanceRefreshesInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpDescribeLifecycleHooks struct {
+}
+
+func (*validateOpDescribeLifecycleHooks) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpDescribeLifecycleHooks) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*DescribeLifecycleHooksInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpDescribeLifecycleHooksInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpDescribeLoadBalancers struct {
+}
+
+func (*validateOpDescribeLoadBalancers) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpDescribeLoadBalancers) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*DescribeLoadBalancersInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpDescribeLoadBalancersInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpDescribeLoadBalancerTargetGroups struct {
+}
+
+func (*validateOpDescribeLoadBalancerTargetGroups) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpDescribeLoadBalancerTargetGroups) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*DescribeLoadBalancerTargetGroupsInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpDescribeLoadBalancerTargetGroupsInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpDescribeWarmPool struct {
+}
+
+func (*validateOpDescribeWarmPool) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpDescribeWarmPool) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*DescribeWarmPoolInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpDescribeWarmPoolInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpDetachInstances struct {
+}
+
+func (*validateOpDetachInstances) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpDetachInstances) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*DetachInstancesInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpDetachInstancesInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpDetachLoadBalancers struct {
+}
+
+func (*validateOpDetachLoadBalancers) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpDetachLoadBalancers) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*DetachLoadBalancersInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpDetachLoadBalancersInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpDetachLoadBalancerTargetGroups struct {
+}
+
+func (*validateOpDetachLoadBalancerTargetGroups) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpDetachLoadBalancerTargetGroups) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*DetachLoadBalancerTargetGroupsInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpDetachLoadBalancerTargetGroupsInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpDisableMetricsCollection struct {
+}
+
+func (*validateOpDisableMetricsCollection) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpDisableMetricsCollection) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*DisableMetricsCollectionInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpDisableMetricsCollectionInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpEnableMetricsCollection struct {
+}
+
+func (*validateOpEnableMetricsCollection) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpEnableMetricsCollection) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*EnableMetricsCollectionInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpEnableMetricsCollectionInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpEnterStandby struct {
+}
+
+func (*validateOpEnterStandby) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpEnterStandby) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*EnterStandbyInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpEnterStandbyInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpExecutePolicy struct {
+}
+
+func (*validateOpExecutePolicy) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpExecutePolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*ExecutePolicyInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpExecutePolicyInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpExitStandby struct {
+}
+
+func (*validateOpExitStandby) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpExitStandby) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*ExitStandbyInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpExitStandbyInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpGetPredictiveScalingForecast struct {
+}
+
+func (*validateOpGetPredictiveScalingForecast) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpGetPredictiveScalingForecast) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*GetPredictiveScalingForecastInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpGetPredictiveScalingForecastInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpPutLifecycleHook struct {
+}
+
+func (*validateOpPutLifecycleHook) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpPutLifecycleHook) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*PutLifecycleHookInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpPutLifecycleHookInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpPutNotificationConfiguration struct {
+}
+
+func (*validateOpPutNotificationConfiguration) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpPutNotificationConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*PutNotificationConfigurationInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpPutNotificationConfigurationInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpPutScalingPolicy struct {
+}
+
+func (*validateOpPutScalingPolicy) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpPutScalingPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*PutScalingPolicyInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpPutScalingPolicyInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpPutScheduledUpdateGroupAction struct {
+}
+
+func (*validateOpPutScheduledUpdateGroupAction) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpPutScheduledUpdateGroupAction) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*PutScheduledUpdateGroupActionInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpPutScheduledUpdateGroupActionInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpPutWarmPool struct {
+}
+
+func (*validateOpPutWarmPool) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpPutWarmPool) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*PutWarmPoolInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpPutWarmPoolInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpRecordLifecycleActionHeartbeat struct {
+}
+
+func (*validateOpRecordLifecycleActionHeartbeat) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpRecordLifecycleActionHeartbeat) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*RecordLifecycleActionHeartbeatInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpRecordLifecycleActionHeartbeatInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpResumeProcesses struct {
+}
+
+func (*validateOpResumeProcesses) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpResumeProcesses) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*ResumeProcessesInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpResumeProcessesInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpSetDesiredCapacity struct {
+}
+
+func (*validateOpSetDesiredCapacity) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpSetDesiredCapacity) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*SetDesiredCapacityInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpSetDesiredCapacityInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpSetInstanceHealth struct {
+}
+
+func (*validateOpSetInstanceHealth) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpSetInstanceHealth) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*SetInstanceHealthInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpSetInstanceHealthInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpSetInstanceProtection struct {
+}
+
+func (*validateOpSetInstanceProtection) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpSetInstanceProtection) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*SetInstanceProtectionInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpSetInstanceProtectionInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpStartInstanceRefresh struct {
+}
+
+func (*validateOpStartInstanceRefresh) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpStartInstanceRefresh) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*StartInstanceRefreshInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpStartInstanceRefreshInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpSuspendProcesses struct {
+}
+
+func (*validateOpSuspendProcesses) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpSuspendProcesses) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*SuspendProcessesInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpSuspendProcessesInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpTerminateInstanceInAutoScalingGroup struct {
+}
+
+func (*validateOpTerminateInstanceInAutoScalingGroup) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpTerminateInstanceInAutoScalingGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*TerminateInstanceInAutoScalingGroupInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpTerminateInstanceInAutoScalingGroupInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpUpdateAutoScalingGroup struct {
+}
+
+func (*validateOpUpdateAutoScalingGroup) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpUpdateAutoScalingGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*UpdateAutoScalingGroupInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpUpdateAutoScalingGroupInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+func addOpAttachInstancesValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpAttachInstances{}, middleware.After)
+}
+
+func addOpAttachLoadBalancersValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpAttachLoadBalancers{}, middleware.After)
+}
+
+func addOpAttachLoadBalancerTargetGroupsValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpAttachLoadBalancerTargetGroups{}, middleware.After)
+}
+
+func addOpBatchDeleteScheduledActionValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpBatchDeleteScheduledAction{}, middleware.After)
+}
+
+func addOpBatchPutScheduledUpdateGroupActionValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpBatchPutScheduledUpdateGroupAction{}, middleware.After)
+}
+
+func addOpCancelInstanceRefreshValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpCancelInstanceRefresh{}, middleware.After)
+}
+
+func addOpCompleteLifecycleActionValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpCompleteLifecycleAction{}, middleware.After)
+}
+
+func addOpCreateAutoScalingGroupValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpCreateAutoScalingGroup{}, middleware.After)
+}
+
+func addOpCreateLaunchConfigurationValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpCreateLaunchConfiguration{}, middleware.After)
+}
+
+func addOpCreateOrUpdateTagsValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpCreateOrUpdateTags{}, middleware.After)
+}
+
+func addOpDeleteAutoScalingGroupValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpDeleteAutoScalingGroup{}, middleware.After)
+}
+
+func addOpDeleteLaunchConfigurationValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpDeleteLaunchConfiguration{}, middleware.After)
+}
+
+func addOpDeleteLifecycleHookValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpDeleteLifecycleHook{}, middleware.After)
+}
+
+func addOpDeleteNotificationConfigurationValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpDeleteNotificationConfiguration{}, middleware.After)
+}
+
+func addOpDeletePolicyValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpDeletePolicy{}, middleware.After)
+}
+
+func addOpDeleteScheduledActionValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpDeleteScheduledAction{}, middleware.After)
+}
+
+func addOpDeleteTagsValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpDeleteTags{}, middleware.After)
+}
+
+func addOpDeleteWarmPoolValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpDeleteWarmPool{}, middleware.After)
+}
+
+func addOpDescribeInstanceRefreshesValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpDescribeInstanceRefreshes{}, middleware.After)
+}
+
+func addOpDescribeLifecycleHooksValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpDescribeLifecycleHooks{}, middleware.After)
+}
+
+func addOpDescribeLoadBalancersValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpDescribeLoadBalancers{}, middleware.After)
+}
+
+func addOpDescribeLoadBalancerTargetGroupsValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpDescribeLoadBalancerTargetGroups{}, middleware.After)
+}
+
+func addOpDescribeWarmPoolValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpDescribeWarmPool{}, middleware.After)
+}
+
+func addOpDetachInstancesValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpDetachInstances{}, middleware.After)
+}
+
+func addOpDetachLoadBalancersValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpDetachLoadBalancers{}, middleware.After)
+}
+
+func addOpDetachLoadBalancerTargetGroupsValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpDetachLoadBalancerTargetGroups{}, middleware.After)
+}
+
+func addOpDisableMetricsCollectionValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpDisableMetricsCollection{}, middleware.After)
+}
+
+func addOpEnableMetricsCollectionValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpEnableMetricsCollection{}, middleware.After)
+}
+
+func addOpEnterStandbyValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpEnterStandby{}, middleware.After)
+}
+
+func addOpExecutePolicyValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpExecutePolicy{}, middleware.After)
+}
+
+func addOpExitStandbyValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpExitStandby{}, middleware.After)
+}
+
+func addOpGetPredictiveScalingForecastValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpGetPredictiveScalingForecast{}, middleware.After)
+}
+
+func addOpPutLifecycleHookValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpPutLifecycleHook{}, middleware.After)
+}
+
+func addOpPutNotificationConfigurationValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpPutNotificationConfiguration{}, middleware.After)
+}
+
+func addOpPutScalingPolicyValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpPutScalingPolicy{}, middleware.After)
+}
+
+func addOpPutScheduledUpdateGroupActionValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpPutScheduledUpdateGroupAction{}, middleware.After)
+}
+
+func addOpPutWarmPoolValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpPutWarmPool{}, middleware.After)
+}
+
+func addOpRecordLifecycleActionHeartbeatValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpRecordLifecycleActionHeartbeat{}, middleware.After)
+}
+
+func addOpResumeProcessesValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpResumeProcesses{}, middleware.After)
+}
+
+func addOpSetDesiredCapacityValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpSetDesiredCapacity{}, middleware.After)
+}
+
+func addOpSetInstanceHealthValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpSetInstanceHealth{}, middleware.After)
+}
+
+func addOpSetInstanceProtectionValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpSetInstanceProtection{}, middleware.After)
+}
+
+func addOpStartInstanceRefreshValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpStartInstanceRefresh{}, middleware.After)
+}
+
+func addOpSuspendProcessesValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpSuspendProcesses{}, middleware.After)
+}
+
+func addOpTerminateInstanceInAutoScalingGroupValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpTerminateInstanceInAutoScalingGroup{}, middleware.After)
+}
+
+func addOpUpdateAutoScalingGroupValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpUpdateAutoScalingGroup{}, middleware.After)
+}
+
+func validateBlockDeviceMapping(v *types.BlockDeviceMapping) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "BlockDeviceMapping"}
+ if v.DeviceName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("DeviceName"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateBlockDeviceMappings(v []types.BlockDeviceMapping) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "BlockDeviceMappings"}
+ for i := range v {
+ if err := validateBlockDeviceMapping(&v[i]); err != nil {
+ invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateCustomizedMetricSpecification(v *types.CustomizedMetricSpecification) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "CustomizedMetricSpecification"}
+ if v.MetricName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("MetricName"))
+ }
+ if v.Namespace == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Namespace"))
+ }
+ if v.Dimensions != nil {
+ if err := validateMetricDimensions(v.Dimensions); err != nil {
+ invalidParams.AddNested("Dimensions", err.(smithy.InvalidParamsError))
+ }
+ }
+ if len(v.Statistic) == 0 {
+ invalidParams.Add(smithy.NewErrParamRequired("Statistic"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateLifecycleHookSpecification(v *types.LifecycleHookSpecification) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "LifecycleHookSpecification"}
+ if v.LifecycleHookName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("LifecycleHookName"))
+ }
+ if v.LifecycleTransition == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("LifecycleTransition"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateLifecycleHookSpecifications(v []types.LifecycleHookSpecification) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "LifecycleHookSpecifications"}
+ for i := range v {
+ if err := validateLifecycleHookSpecification(&v[i]); err != nil {
+ invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateMetricDimension(v *types.MetricDimension) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "MetricDimension"}
+ if v.Name == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Name"))
+ }
+ if v.Value == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Value"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateMetricDimensions(v []types.MetricDimension) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "MetricDimensions"}
+ for i := range v {
+ if err := validateMetricDimension(&v[i]); err != nil {
+ invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validatePredefinedMetricSpecification(v *types.PredefinedMetricSpecification) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "PredefinedMetricSpecification"}
+ if len(v.PredefinedMetricType) == 0 {
+ invalidParams.Add(smithy.NewErrParamRequired("PredefinedMetricType"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validatePredictiveScalingConfiguration(v *types.PredictiveScalingConfiguration) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "PredictiveScalingConfiguration"}
+ if v.MetricSpecifications == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("MetricSpecifications"))
+ } else if v.MetricSpecifications != nil {
+ if err := validatePredictiveScalingMetricSpecifications(v.MetricSpecifications); err != nil {
+ invalidParams.AddNested("MetricSpecifications", err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validatePredictiveScalingMetricSpecification(v *types.PredictiveScalingMetricSpecification) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "PredictiveScalingMetricSpecification"}
+ if v.TargetValue == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("TargetValue"))
+ }
+ if v.PredefinedMetricPairSpecification != nil {
+ if err := validatePredictiveScalingPredefinedMetricPair(v.PredefinedMetricPairSpecification); err != nil {
+ invalidParams.AddNested("PredefinedMetricPairSpecification", err.(smithy.InvalidParamsError))
+ }
+ }
+ if v.PredefinedScalingMetricSpecification != nil {
+ if err := validatePredictiveScalingPredefinedScalingMetric(v.PredefinedScalingMetricSpecification); err != nil {
+ invalidParams.AddNested("PredefinedScalingMetricSpecification", err.(smithy.InvalidParamsError))
+ }
+ }
+ if v.PredefinedLoadMetricSpecification != nil {
+ if err := validatePredictiveScalingPredefinedLoadMetric(v.PredefinedLoadMetricSpecification); err != nil {
+ invalidParams.AddNested("PredefinedLoadMetricSpecification", err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validatePredictiveScalingMetricSpecifications(v []types.PredictiveScalingMetricSpecification) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "PredictiveScalingMetricSpecifications"}
+ for i := range v {
+ if err := validatePredictiveScalingMetricSpecification(&v[i]); err != nil {
+ invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validatePredictiveScalingPredefinedLoadMetric(v *types.PredictiveScalingPredefinedLoadMetric) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "PredictiveScalingPredefinedLoadMetric"}
+ if len(v.PredefinedMetricType) == 0 {
+ invalidParams.Add(smithy.NewErrParamRequired("PredefinedMetricType"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validatePredictiveScalingPredefinedMetricPair(v *types.PredictiveScalingPredefinedMetricPair) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "PredictiveScalingPredefinedMetricPair"}
+ if len(v.PredefinedMetricType) == 0 {
+ invalidParams.Add(smithy.NewErrParamRequired("PredefinedMetricType"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validatePredictiveScalingPredefinedScalingMetric(v *types.PredictiveScalingPredefinedScalingMetric) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "PredictiveScalingPredefinedScalingMetric"}
+ if len(v.PredefinedMetricType) == 0 {
+ invalidParams.Add(smithy.NewErrParamRequired("PredefinedMetricType"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateScheduledUpdateGroupActionRequest(v *types.ScheduledUpdateGroupActionRequest) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "ScheduledUpdateGroupActionRequest"}
+ if v.ScheduledActionName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("ScheduledActionName"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateScheduledUpdateGroupActionRequests(v []types.ScheduledUpdateGroupActionRequest) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "ScheduledUpdateGroupActionRequests"}
+ for i := range v {
+ if err := validateScheduledUpdateGroupActionRequest(&v[i]); err != nil {
+ invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateStepAdjustment(v *types.StepAdjustment) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "StepAdjustment"}
+ if v.ScalingAdjustment == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("ScalingAdjustment"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateStepAdjustments(v []types.StepAdjustment) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "StepAdjustments"}
+ for i := range v {
+ if err := validateStepAdjustment(&v[i]); err != nil {
+ invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateTag(v *types.Tag) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "Tag"}
+ if v.Key == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Key"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateTags(v []types.Tag) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "Tags"}
+ for i := range v {
+ if err := validateTag(&v[i]); err != nil {
+ invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateTargetTrackingConfiguration(v *types.TargetTrackingConfiguration) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "TargetTrackingConfiguration"}
+ if v.PredefinedMetricSpecification != nil {
+ if err := validatePredefinedMetricSpecification(v.PredefinedMetricSpecification); err != nil {
+ invalidParams.AddNested("PredefinedMetricSpecification", err.(smithy.InvalidParamsError))
+ }
+ }
+ if v.CustomizedMetricSpecification != nil {
+ if err := validateCustomizedMetricSpecification(v.CustomizedMetricSpecification); err != nil {
+ invalidParams.AddNested("CustomizedMetricSpecification", err.(smithy.InvalidParamsError))
+ }
+ }
+ if v.TargetValue == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("TargetValue"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpAttachInstancesInput(v *AttachInstancesInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "AttachInstancesInput"}
+ if v.AutoScalingGroupName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("AutoScalingGroupName"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpAttachLoadBalancersInput(v *AttachLoadBalancersInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "AttachLoadBalancersInput"}
+ if v.AutoScalingGroupName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("AutoScalingGroupName"))
+ }
+ if v.LoadBalancerNames == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("LoadBalancerNames"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpAttachLoadBalancerTargetGroupsInput(v *AttachLoadBalancerTargetGroupsInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "AttachLoadBalancerTargetGroupsInput"}
+ if v.AutoScalingGroupName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("AutoScalingGroupName"))
+ }
+ if v.TargetGroupARNs == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("TargetGroupARNs"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpBatchDeleteScheduledActionInput(v *BatchDeleteScheduledActionInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "BatchDeleteScheduledActionInput"}
+ if v.AutoScalingGroupName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("AutoScalingGroupName"))
+ }
+ if v.ScheduledActionNames == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("ScheduledActionNames"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpBatchPutScheduledUpdateGroupActionInput(v *BatchPutScheduledUpdateGroupActionInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "BatchPutScheduledUpdateGroupActionInput"}
+ if v.AutoScalingGroupName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("AutoScalingGroupName"))
+ }
+ if v.ScheduledUpdateGroupActions == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("ScheduledUpdateGroupActions"))
+ } else if v.ScheduledUpdateGroupActions != nil {
+ if err := validateScheduledUpdateGroupActionRequests(v.ScheduledUpdateGroupActions); err != nil {
+ invalidParams.AddNested("ScheduledUpdateGroupActions", err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpCancelInstanceRefreshInput(v *CancelInstanceRefreshInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "CancelInstanceRefreshInput"}
+ if v.AutoScalingGroupName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("AutoScalingGroupName"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpCompleteLifecycleActionInput(v *CompleteLifecycleActionInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "CompleteLifecycleActionInput"}
+ if v.LifecycleHookName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("LifecycleHookName"))
+ }
+ if v.AutoScalingGroupName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("AutoScalingGroupName"))
+ }
+ if v.LifecycleActionResult == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("LifecycleActionResult"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpCreateAutoScalingGroupInput(v *CreateAutoScalingGroupInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "CreateAutoScalingGroupInput"}
+ if v.AutoScalingGroupName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("AutoScalingGroupName"))
+ }
+ if v.MinSize == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("MinSize"))
+ }
+ if v.MaxSize == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("MaxSize"))
+ }
+ if v.LifecycleHookSpecificationList != nil {
+ if err := validateLifecycleHookSpecifications(v.LifecycleHookSpecificationList); err != nil {
+ invalidParams.AddNested("LifecycleHookSpecificationList", err.(smithy.InvalidParamsError))
+ }
+ }
+ if v.Tags != nil {
+ if err := validateTags(v.Tags); err != nil {
+ invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpCreateLaunchConfigurationInput(v *CreateLaunchConfigurationInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "CreateLaunchConfigurationInput"}
+ if v.LaunchConfigurationName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("LaunchConfigurationName"))
+ }
+ if v.BlockDeviceMappings != nil {
+ if err := validateBlockDeviceMappings(v.BlockDeviceMappings); err != nil {
+ invalidParams.AddNested("BlockDeviceMappings", err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpCreateOrUpdateTagsInput(v *CreateOrUpdateTagsInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "CreateOrUpdateTagsInput"}
+ if v.Tags == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Tags"))
+ } else if v.Tags != nil {
+ if err := validateTags(v.Tags); err != nil {
+ invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpDeleteAutoScalingGroupInput(v *DeleteAutoScalingGroupInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "DeleteAutoScalingGroupInput"}
+ if v.AutoScalingGroupName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("AutoScalingGroupName"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpDeleteLaunchConfigurationInput(v *DeleteLaunchConfigurationInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "DeleteLaunchConfigurationInput"}
+ if v.LaunchConfigurationName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("LaunchConfigurationName"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpDeleteLifecycleHookInput(v *DeleteLifecycleHookInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "DeleteLifecycleHookInput"}
+ if v.LifecycleHookName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("LifecycleHookName"))
+ }
+ if v.AutoScalingGroupName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("AutoScalingGroupName"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpDeleteNotificationConfigurationInput(v *DeleteNotificationConfigurationInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "DeleteNotificationConfigurationInput"}
+ if v.AutoScalingGroupName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("AutoScalingGroupName"))
+ }
+ if v.TopicARN == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("TopicARN"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpDeletePolicyInput(v *DeletePolicyInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "DeletePolicyInput"}
+ if v.PolicyName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("PolicyName"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpDeleteScheduledActionInput(v *DeleteScheduledActionInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "DeleteScheduledActionInput"}
+ if v.AutoScalingGroupName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("AutoScalingGroupName"))
+ }
+ if v.ScheduledActionName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("ScheduledActionName"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpDeleteTagsInput(v *DeleteTagsInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "DeleteTagsInput"}
+ if v.Tags == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Tags"))
+ } else if v.Tags != nil {
+ if err := validateTags(v.Tags); err != nil {
+ invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpDeleteWarmPoolInput(v *DeleteWarmPoolInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "DeleteWarmPoolInput"}
+ if v.AutoScalingGroupName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("AutoScalingGroupName"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpDescribeInstanceRefreshesInput(v *DescribeInstanceRefreshesInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "DescribeInstanceRefreshesInput"}
+ if v.AutoScalingGroupName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("AutoScalingGroupName"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpDescribeLifecycleHooksInput(v *DescribeLifecycleHooksInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "DescribeLifecycleHooksInput"}
+ if v.AutoScalingGroupName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("AutoScalingGroupName"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpDescribeLoadBalancersInput(v *DescribeLoadBalancersInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "DescribeLoadBalancersInput"}
+ if v.AutoScalingGroupName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("AutoScalingGroupName"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpDescribeLoadBalancerTargetGroupsInput(v *DescribeLoadBalancerTargetGroupsInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "DescribeLoadBalancerTargetGroupsInput"}
+ if v.AutoScalingGroupName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("AutoScalingGroupName"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpDescribeWarmPoolInput(v *DescribeWarmPoolInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "DescribeWarmPoolInput"}
+ if v.AutoScalingGroupName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("AutoScalingGroupName"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpDetachInstancesInput(v *DetachInstancesInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "DetachInstancesInput"}
+ if v.AutoScalingGroupName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("AutoScalingGroupName"))
+ }
+ if v.ShouldDecrementDesiredCapacity == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("ShouldDecrementDesiredCapacity"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpDetachLoadBalancersInput(v *DetachLoadBalancersInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "DetachLoadBalancersInput"}
+ if v.AutoScalingGroupName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("AutoScalingGroupName"))
+ }
+ if v.LoadBalancerNames == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("LoadBalancerNames"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpDetachLoadBalancerTargetGroupsInput(v *DetachLoadBalancerTargetGroupsInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "DetachLoadBalancerTargetGroupsInput"}
+ if v.AutoScalingGroupName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("AutoScalingGroupName"))
+ }
+ if v.TargetGroupARNs == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("TargetGroupARNs"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpDisableMetricsCollectionInput(v *DisableMetricsCollectionInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "DisableMetricsCollectionInput"}
+ if v.AutoScalingGroupName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("AutoScalingGroupName"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpEnableMetricsCollectionInput(v *EnableMetricsCollectionInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "EnableMetricsCollectionInput"}
+ if v.AutoScalingGroupName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("AutoScalingGroupName"))
+ }
+ if v.Granularity == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Granularity"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpEnterStandbyInput(v *EnterStandbyInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "EnterStandbyInput"}
+ if v.AutoScalingGroupName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("AutoScalingGroupName"))
+ }
+ if v.ShouldDecrementDesiredCapacity == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("ShouldDecrementDesiredCapacity"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpExecutePolicyInput(v *ExecutePolicyInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "ExecutePolicyInput"}
+ if v.PolicyName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("PolicyName"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpExitStandbyInput(v *ExitStandbyInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "ExitStandbyInput"}
+ if v.AutoScalingGroupName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("AutoScalingGroupName"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpGetPredictiveScalingForecastInput(v *GetPredictiveScalingForecastInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "GetPredictiveScalingForecastInput"}
+ if v.AutoScalingGroupName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("AutoScalingGroupName"))
+ }
+ if v.PolicyName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("PolicyName"))
+ }
+ if v.StartTime == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("StartTime"))
+ }
+ if v.EndTime == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("EndTime"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpPutLifecycleHookInput(v *PutLifecycleHookInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "PutLifecycleHookInput"}
+ if v.LifecycleHookName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("LifecycleHookName"))
+ }
+ if v.AutoScalingGroupName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("AutoScalingGroupName"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpPutNotificationConfigurationInput(v *PutNotificationConfigurationInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "PutNotificationConfigurationInput"}
+ if v.AutoScalingGroupName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("AutoScalingGroupName"))
+ }
+ if v.TopicARN == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("TopicARN"))
+ }
+ if v.NotificationTypes == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("NotificationTypes"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpPutScalingPolicyInput(v *PutScalingPolicyInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "PutScalingPolicyInput"}
+ if v.AutoScalingGroupName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("AutoScalingGroupName"))
+ }
+ if v.PolicyName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("PolicyName"))
+ }
+ if v.StepAdjustments != nil {
+ if err := validateStepAdjustments(v.StepAdjustments); err != nil {
+ invalidParams.AddNested("StepAdjustments", err.(smithy.InvalidParamsError))
+ }
+ }
+ if v.TargetTrackingConfiguration != nil {
+ if err := validateTargetTrackingConfiguration(v.TargetTrackingConfiguration); err != nil {
+ invalidParams.AddNested("TargetTrackingConfiguration", err.(smithy.InvalidParamsError))
+ }
+ }
+ if v.PredictiveScalingConfiguration != nil {
+ if err := validatePredictiveScalingConfiguration(v.PredictiveScalingConfiguration); err != nil {
+ invalidParams.AddNested("PredictiveScalingConfiguration", err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpPutScheduledUpdateGroupActionInput(v *PutScheduledUpdateGroupActionInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "PutScheduledUpdateGroupActionInput"}
+ if v.AutoScalingGroupName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("AutoScalingGroupName"))
+ }
+ if v.ScheduledActionName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("ScheduledActionName"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpPutWarmPoolInput(v *PutWarmPoolInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "PutWarmPoolInput"}
+ if v.AutoScalingGroupName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("AutoScalingGroupName"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpRecordLifecycleActionHeartbeatInput(v *RecordLifecycleActionHeartbeatInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "RecordLifecycleActionHeartbeatInput"}
+ if v.LifecycleHookName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("LifecycleHookName"))
+ }
+ if v.AutoScalingGroupName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("AutoScalingGroupName"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpResumeProcessesInput(v *ResumeProcessesInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "ResumeProcessesInput"}
+ if v.AutoScalingGroupName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("AutoScalingGroupName"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpSetDesiredCapacityInput(v *SetDesiredCapacityInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "SetDesiredCapacityInput"}
+ if v.AutoScalingGroupName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("AutoScalingGroupName"))
+ }
+ if v.DesiredCapacity == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("DesiredCapacity"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpSetInstanceHealthInput(v *SetInstanceHealthInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "SetInstanceHealthInput"}
+ if v.InstanceId == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("InstanceId"))
+ }
+ if v.HealthStatus == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("HealthStatus"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpSetInstanceProtectionInput(v *SetInstanceProtectionInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "SetInstanceProtectionInput"}
+ if v.InstanceIds == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("InstanceIds"))
+ }
+ if v.AutoScalingGroupName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("AutoScalingGroupName"))
+ }
+ if v.ProtectedFromScaleIn == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("ProtectedFromScaleIn"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpStartInstanceRefreshInput(v *StartInstanceRefreshInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "StartInstanceRefreshInput"}
+ if v.AutoScalingGroupName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("AutoScalingGroupName"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpSuspendProcessesInput(v *SuspendProcessesInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "SuspendProcessesInput"}
+ if v.AutoScalingGroupName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("AutoScalingGroupName"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpTerminateInstanceInAutoScalingGroupInput(v *TerminateInstanceInAutoScalingGroupInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "TerminateInstanceInAutoScalingGroupInput"}
+ if v.InstanceId == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("InstanceId"))
+ }
+ if v.ShouldDecrementDesiredCapacity == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("ShouldDecrementDesiredCapacity"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpUpdateAutoScalingGroupInput(v *UpdateAutoScalingGroupInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "UpdateAutoScalingGroupInput"}
+ if v.AutoScalingGroupName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("AutoScalingGroupName"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/CHANGELOG.md
new file mode 100644
index 00000000..1d5994d5
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/CHANGELOG.md
@@ -0,0 +1,64 @@
+# v1.18.0 (2021-09-24)
+
+* **Feature**: API client updated
+
+# v1.17.0 (2021-09-17)
+
+* **Feature**: Updated API client and endpoints to latest revision.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.16.0 (2021-09-02)
+
+* **Feature**: API client updated
+
+# v1.15.0 (2021-08-27)
+
+* **Feature**: Updated API model to latest revision.
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.14.0 (2021-08-19)
+
+* **Feature**: API client updated
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.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.12.0 (2021-07-15)
+
+* **Feature**: Updated service model to latest version.
+* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.0 (2021-07-01)
+
+* **Feature**: API client updated
+
+# v1.10.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.9.0 (2021-06-04)
+
+* **Feature**: Updated service client to latest API model.
+
+# v1.8.0 (2021-05-25)
+
+* **Feature**: API client updated
+
+# v1.7.1 (2021-05-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.7.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/ec2/LICENSE.txt b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/LICENSE.txt
new file mode 100644
index 00000000..d6456956
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/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/ec2/api_client.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_client.go
new file mode 100644
index 00000000..6449c9b4
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_client.go
@@ -0,0 +1,382 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+import (
+ "context"
+ cryptorand "crypto/rand"
+ "github.com/aws/aws-sdk-go-v2/aws"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/protocol/query"
+ "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"
+ presignedurlcust "github.com/aws/aws-sdk-go-v2/service/internal/presigned-url"
+ 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"
+ smithyrand "github.com/aws/smithy-go/rand"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "net/http"
+ "time"
+)
+
+const ServiceID = "EC2"
+const ServiceAPIVersion = "2016-11-15"
+
+// Client provides the API client to make operations call for Amazon Elastic
+// Compute Cloud.
+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)
+
+ resolveRetryer(&options)
+
+ resolveHTTPClient(&options)
+
+ resolveHTTPSignerV4(&options)
+
+ resolveDefaultEndpointConfiguration(&options)
+
+ resolveIdempotencyTokenProvider(&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 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
+
+ // Provides idempotency tokens values that will be automatically populated into
+ // idempotent API operations.
+ IdempotencyTokenProvider IdempotencyTokenProvider
+
+ // The logger writer interface to write logging messages to.
+ Logger logging.Logger
+
+ // The region to send requests to. (Required)
+ Region string
+
+ // Retryer guides how HTTP requests should be retried in case of recoverable
+ // failures. When nil the API client will use a default retryer.
+ Retryer aws.Retryer
+
+ // 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)
+ }
+
+ 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)
+}
+
+// NewFromConfig returns a new client from the provided config.
+func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client {
+ opts := Options{
+ Region: cfg.Region,
+ HTTPClient: cfg.HTTPClient,
+ Credentials: cfg.Credentials,
+ APIOptions: cfg.APIOptions,
+ Logger: cfg.Logger,
+ ClientLogMode: cfg.ClientLogMode,
+ }
+ resolveAWSRetryerProvider(cfg, &opts)
+ resolveAWSEndpointResolver(cfg, &opts)
+ return New(opts, optFns...)
+}
+
+func resolveHTTPClient(o *Options) {
+ if o.HTTPClient != nil {
+ return
+ }
+ o.HTTPClient = awshttp.NewBuildableClient()
+}
+
+func resolveRetryer(o *Options) {
+ if o.Retryer != nil {
+ return
+ }
+ o.Retryer = retry.NewStandard()
+}
+
+func resolveAWSRetryerProvider(cfg aws.Config, o *Options) {
+ if cfg.Retryer == nil {
+ return
+ }
+ o.Retryer = cfg.Retryer()
+}
+
+func resolveAWSEndpointResolver(cfg aws.Config, o *Options) {
+ if cfg.EndpointResolver == nil {
+ return
+ }
+ o.EndpointResolver = withEndpointResolver(cfg.EndpointResolver, NewDefaultEndpointResolver())
+}
+
+func addClientUserAgent(stack *middleware.Stack) error {
+ return awsmiddleware.AddSDKAgentKeyValue(awsmiddleware.APIMetadata, "ec2", 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 resolveIdempotencyTokenProvider(o *Options) {
+ if o.IdempotencyTokenProvider != nil {
+ return
+ }
+ o.IdempotencyTokenProvider = smithyrand.NewUUIDIdempotencyToken(cryptorand.Reader)
+}
+
+func addRetryMiddlewares(stack *middleware.Stack, o Options) error {
+ mo := retry.AddRetryMiddlewaresOptions{
+ Retryer: o.Retryer,
+ LogRetryAttempts: o.ClientLogMode.IsRetries(),
+ }
+ return retry.AddRetryMiddlewares(stack, mo)
+}
+
+// IdempotencyTokenProvider interface for providing idempotency token
+type IdempotencyTokenProvider interface {
+ GetIdempotencyToken() (string, error)
+}
+
+func addRequestIDRetrieverMiddleware(stack *middleware.Stack) error {
+ return awsmiddleware.AddRequestIDRetrieverMiddleware(stack)
+}
+
+func addResponseErrorMiddleware(stack *middleware.Stack) error {
+ return awshttp.AddResponseErrorMiddleware(stack)
+}
+
+// HTTPPresignerV4 represents presigner interface used by presign url client
+type HTTPPresignerV4 interface {
+ PresignHTTP(
+ ctx context.Context, credentials aws.Credentials, r *http.Request,
+ payloadHash string, service string, region string, signingTime time.Time,
+ optFns ...func(*v4.SignerOptions),
+ ) (url string, signedHeader http.Header, err error)
+}
+
+// PresignOptions represents the presign client options
+type PresignOptions struct {
+
+ // ClientOptions are list of functional options to mutate client options used by
+ // the presign client.
+ ClientOptions []func(*Options)
+
+ // Presigner is the presigner used by the presign url client
+ Presigner HTTPPresignerV4
+}
+
+func (o PresignOptions) copy() PresignOptions {
+ clientOptions := make([]func(*Options), len(o.ClientOptions))
+ copy(clientOptions, o.ClientOptions)
+ o.ClientOptions = clientOptions
+ return o
+}
+
+// WithPresignClientFromClientOptions is a helper utility to retrieve a function
+// that takes PresignOption as input
+func WithPresignClientFromClientOptions(optFns ...func(*Options)) func(*PresignOptions) {
+ return withPresignClientFromClientOptions(optFns).options
+}
+
+type withPresignClientFromClientOptions []func(*Options)
+
+func (w withPresignClientFromClientOptions) options(o *PresignOptions) {
+ o.ClientOptions = append(o.ClientOptions, w...)
+}
+
+// PresignClient represents the presign url client
+type PresignClient struct {
+ client *Client
+ options PresignOptions
+}
+
+// NewPresignClient generates a presign client using provided API Client and
+// presign options
+func NewPresignClient(c *Client, optFns ...func(*PresignOptions)) *PresignClient {
+ var options PresignOptions
+ for _, fn := range optFns {
+ fn(&options)
+ }
+ if len(options.ClientOptions) != 0 {
+ c = New(c.options, options.ClientOptions...)
+ }
+
+ if options.Presigner == nil {
+ options.Presigner = newDefaultV4Signer(c.options)
+ }
+
+ return &PresignClient{
+ client: c,
+ options: options,
+ }
+}
+
+func withNopHTTPClientAPIOption(o *Options) {
+ o.HTTPClient = smithyhttp.NopClient{}
+}
+
+type presignConverter PresignOptions
+
+func (c presignConverter) convertToPresignMiddleware(stack *middleware.Stack, options Options) (err error) {
+ stack.Finalize.Clear()
+ stack.Deserialize.Clear()
+ stack.Build.Remove((*awsmiddleware.ClientRequestID)(nil).ID())
+ stack.Build.Remove("UserAgent")
+ pmw := v4.NewPresignHTTPRequestMiddleware(v4.PresignHTTPRequestMiddlewareOptions{
+ CredentialsProvider: options.Credentials,
+ Presigner: c.Presigner,
+ LogSigning: options.ClientLogMode.IsSigning(),
+ })
+ err = stack.Finalize.Add(pmw, middleware.After)
+ if err != nil {
+ return err
+ }
+ // convert request to a GET request
+ err = query.AddAsGetRequestMiddleware(stack)
+ if err != nil {
+ return err
+ }
+ err = presignedurlcust.AddAsIsPresigingMiddleware(stack)
+ if err != nil {
+ return err
+ }
+ 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/ec2/api_op_AcceptReservedInstancesExchangeQuote.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AcceptReservedInstancesExchangeQuote.go
new file mode 100644
index 00000000..bce398d8
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AcceptReservedInstancesExchangeQuote.go
@@ -0,0 +1,135 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Accepts the Convertible Reserved Instance exchange quote described in the
+// GetReservedInstancesExchangeQuote call.
+func (c *Client) AcceptReservedInstancesExchangeQuote(ctx context.Context, params *AcceptReservedInstancesExchangeQuoteInput, optFns ...func(*Options)) (*AcceptReservedInstancesExchangeQuoteOutput, error) {
+ if params == nil {
+ params = &AcceptReservedInstancesExchangeQuoteInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "AcceptReservedInstancesExchangeQuote", params, optFns, c.addOperationAcceptReservedInstancesExchangeQuoteMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*AcceptReservedInstancesExchangeQuoteOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+// Contains the parameters for accepting the quote.
+type AcceptReservedInstancesExchangeQuoteInput struct {
+
+ // The IDs of the Convertible Reserved Instances to exchange for another
+ // Convertible Reserved Instance of the same or higher value.
+ //
+ // This member is required.
+ ReservedInstanceIds []string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The configuration of the target Convertible Reserved Instance to exchange for
+ // your current Convertible Reserved Instances.
+ TargetConfigurations []types.TargetConfigurationRequest
+
+ noSmithyDocumentSerde
+}
+
+// The result of the exchange and whether it was successful.
+type AcceptReservedInstancesExchangeQuoteOutput struct {
+
+ // The ID of the successful exchange.
+ ExchangeId *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationAcceptReservedInstancesExchangeQuoteMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpAcceptReservedInstancesExchangeQuote{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpAcceptReservedInstancesExchangeQuote{}, 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 = addOpAcceptReservedInstancesExchangeQuoteValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAcceptReservedInstancesExchangeQuote(options.Region), middleware.Before); 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_opAcceptReservedInstancesExchangeQuote(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "AcceptReservedInstancesExchangeQuote",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AcceptTransitGatewayMulticastDomainAssociations.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AcceptTransitGatewayMulticastDomainAssociations.go
new file mode 100644
index 00000000..bfbcb0e9
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AcceptTransitGatewayMulticastDomainAssociations.go
@@ -0,0 +1,128 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Accepts a request to associate subnets with a transit gateway multicast domain.
+func (c *Client) AcceptTransitGatewayMulticastDomainAssociations(ctx context.Context, params *AcceptTransitGatewayMulticastDomainAssociationsInput, optFns ...func(*Options)) (*AcceptTransitGatewayMulticastDomainAssociationsOutput, error) {
+ if params == nil {
+ params = &AcceptTransitGatewayMulticastDomainAssociationsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "AcceptTransitGatewayMulticastDomainAssociations", params, optFns, c.addOperationAcceptTransitGatewayMulticastDomainAssociationsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*AcceptTransitGatewayMulticastDomainAssociationsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type AcceptTransitGatewayMulticastDomainAssociationsInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The IDs of the subnets to associate with the transit gateway multicast domain.
+ SubnetIds []string
+
+ // The ID of the transit gateway attachment.
+ TransitGatewayAttachmentId *string
+
+ // The ID of the transit gateway multicast domain.
+ TransitGatewayMulticastDomainId *string
+
+ noSmithyDocumentSerde
+}
+
+type AcceptTransitGatewayMulticastDomainAssociationsOutput struct {
+
+ // Describes the multicast domain associations.
+ Associations *types.TransitGatewayMulticastDomainAssociations
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationAcceptTransitGatewayMulticastDomainAssociationsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpAcceptTransitGatewayMulticastDomainAssociations{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpAcceptTransitGatewayMulticastDomainAssociations{}, 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_opAcceptTransitGatewayMulticastDomainAssociations(options.Region), middleware.Before); 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_opAcceptTransitGatewayMulticastDomainAssociations(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "AcceptTransitGatewayMulticastDomainAssociations",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AcceptTransitGatewayPeeringAttachment.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AcceptTransitGatewayPeeringAttachment.go
new file mode 100644
index 00000000..4e902e30
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AcceptTransitGatewayPeeringAttachment.go
@@ -0,0 +1,128 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Accepts a transit gateway peering attachment request. The peering attachment
+// must be in the pendingAcceptance state.
+func (c *Client) AcceptTransitGatewayPeeringAttachment(ctx context.Context, params *AcceptTransitGatewayPeeringAttachmentInput, optFns ...func(*Options)) (*AcceptTransitGatewayPeeringAttachmentOutput, error) {
+ if params == nil {
+ params = &AcceptTransitGatewayPeeringAttachmentInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "AcceptTransitGatewayPeeringAttachment", params, optFns, c.addOperationAcceptTransitGatewayPeeringAttachmentMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*AcceptTransitGatewayPeeringAttachmentOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type AcceptTransitGatewayPeeringAttachmentInput struct {
+
+ // The ID of the transit gateway attachment.
+ //
+ // This member is required.
+ TransitGatewayAttachmentId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type AcceptTransitGatewayPeeringAttachmentOutput struct {
+
+ // The transit gateway peering attachment.
+ TransitGatewayPeeringAttachment *types.TransitGatewayPeeringAttachment
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationAcceptTransitGatewayPeeringAttachmentMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpAcceptTransitGatewayPeeringAttachment{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpAcceptTransitGatewayPeeringAttachment{}, 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 = addOpAcceptTransitGatewayPeeringAttachmentValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAcceptTransitGatewayPeeringAttachment(options.Region), middleware.Before); 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_opAcceptTransitGatewayPeeringAttachment(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "AcceptTransitGatewayPeeringAttachment",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AcceptTransitGatewayVpcAttachment.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AcceptTransitGatewayVpcAttachment.go
new file mode 100644
index 00000000..791a24b1
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AcceptTransitGatewayVpcAttachment.go
@@ -0,0 +1,130 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Accepts a request to attach a VPC to a transit gateway. The VPC attachment must
+// be in the pendingAcceptance state. Use DescribeTransitGatewayVpcAttachments to
+// view your pending VPC attachment requests. Use RejectTransitGatewayVpcAttachment
+// to reject a VPC attachment request.
+func (c *Client) AcceptTransitGatewayVpcAttachment(ctx context.Context, params *AcceptTransitGatewayVpcAttachmentInput, optFns ...func(*Options)) (*AcceptTransitGatewayVpcAttachmentOutput, error) {
+ if params == nil {
+ params = &AcceptTransitGatewayVpcAttachmentInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "AcceptTransitGatewayVpcAttachment", params, optFns, c.addOperationAcceptTransitGatewayVpcAttachmentMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*AcceptTransitGatewayVpcAttachmentOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type AcceptTransitGatewayVpcAttachmentInput struct {
+
+ // The ID of the attachment.
+ //
+ // This member is required.
+ TransitGatewayAttachmentId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type AcceptTransitGatewayVpcAttachmentOutput struct {
+
+ // The VPC attachment.
+ TransitGatewayVpcAttachment *types.TransitGatewayVpcAttachment
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationAcceptTransitGatewayVpcAttachmentMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpAcceptTransitGatewayVpcAttachment{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpAcceptTransitGatewayVpcAttachment{}, 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 = addOpAcceptTransitGatewayVpcAttachmentValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAcceptTransitGatewayVpcAttachment(options.Region), middleware.Before); 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_opAcceptTransitGatewayVpcAttachment(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "AcceptTransitGatewayVpcAttachment",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AcceptVpcEndpointConnections.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AcceptVpcEndpointConnections.go
new file mode 100644
index 00000000..039c4543
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AcceptVpcEndpointConnections.go
@@ -0,0 +1,133 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Accepts one or more interface VPC endpoint connection requests to your VPC
+// endpoint service.
+func (c *Client) AcceptVpcEndpointConnections(ctx context.Context, params *AcceptVpcEndpointConnectionsInput, optFns ...func(*Options)) (*AcceptVpcEndpointConnectionsOutput, error) {
+ if params == nil {
+ params = &AcceptVpcEndpointConnectionsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "AcceptVpcEndpointConnections", params, optFns, c.addOperationAcceptVpcEndpointConnectionsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*AcceptVpcEndpointConnectionsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type AcceptVpcEndpointConnectionsInput struct {
+
+ // The ID of the VPC endpoint service.
+ //
+ // This member is required.
+ ServiceId *string
+
+ // The IDs of one or more interface VPC endpoints.
+ //
+ // This member is required.
+ VpcEndpointIds []string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type AcceptVpcEndpointConnectionsOutput struct {
+
+ // Information about the interface endpoints that were not accepted, if applicable.
+ Unsuccessful []types.UnsuccessfulItem
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationAcceptVpcEndpointConnectionsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpAcceptVpcEndpointConnections{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpAcceptVpcEndpointConnections{}, 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 = addOpAcceptVpcEndpointConnectionsValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAcceptVpcEndpointConnections(options.Region), middleware.Before); 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_opAcceptVpcEndpointConnections(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "AcceptVpcEndpointConnections",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AcceptVpcPeeringConnection.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AcceptVpcPeeringConnection.go
new file mode 100644
index 00000000..2d7a22a0
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AcceptVpcPeeringConnection.go
@@ -0,0 +1,127 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Accept a VPC peering connection request. To accept a request, the VPC peering
+// connection must be in the pending-acceptance state, and you must be the owner of
+// the peer VPC. Use DescribeVpcPeeringConnections to view your outstanding VPC
+// peering connection requests. For an inter-Region VPC peering connection request,
+// you must accept the VPC peering connection in the Region of the accepter VPC.
+func (c *Client) AcceptVpcPeeringConnection(ctx context.Context, params *AcceptVpcPeeringConnectionInput, optFns ...func(*Options)) (*AcceptVpcPeeringConnectionOutput, error) {
+ if params == nil {
+ params = &AcceptVpcPeeringConnectionInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "AcceptVpcPeeringConnection", params, optFns, c.addOperationAcceptVpcPeeringConnectionMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*AcceptVpcPeeringConnectionOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type AcceptVpcPeeringConnectionInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The ID of the VPC peering connection. You must specify this parameter in the
+ // request.
+ VpcPeeringConnectionId *string
+
+ noSmithyDocumentSerde
+}
+
+type AcceptVpcPeeringConnectionOutput struct {
+
+ // Information about the VPC peering connection.
+ VpcPeeringConnection *types.VpcPeeringConnection
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationAcceptVpcPeeringConnectionMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpAcceptVpcPeeringConnection{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpAcceptVpcPeeringConnection{}, 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_opAcceptVpcPeeringConnection(options.Region), middleware.Before); 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_opAcceptVpcPeeringConnection(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "AcceptVpcPeeringConnection",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AdvertiseByoipCidr.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AdvertiseByoipCidr.go
new file mode 100644
index 00000000..9856df5c
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AdvertiseByoipCidr.go
@@ -0,0 +1,139 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Advertises an IPv4 or IPv6 address range that is provisioned for use with your
+// Amazon Web Services resources through bring your own IP addresses (BYOIP). You
+// can perform this operation at most once every 10 seconds, even if you specify
+// different address ranges each time. We recommend that you stop advertising the
+// BYOIP CIDR from other locations when you advertise it from Amazon Web Services.
+// To minimize down time, you can configure your Amazon Web Services resources to
+// use an address from a BYOIP CIDR before it is advertised, and then
+// simultaneously stop advertising it from the current location and start
+// advertising it through Amazon Web Services. It can take a few minutes before
+// traffic to the specified addresses starts routing to Amazon Web Services because
+// of BGP propagation delays. To stop advertising the BYOIP CIDR, use
+// WithdrawByoipCidr.
+func (c *Client) AdvertiseByoipCidr(ctx context.Context, params *AdvertiseByoipCidrInput, optFns ...func(*Options)) (*AdvertiseByoipCidrOutput, error) {
+ if params == nil {
+ params = &AdvertiseByoipCidrInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "AdvertiseByoipCidr", params, optFns, c.addOperationAdvertiseByoipCidrMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*AdvertiseByoipCidrOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type AdvertiseByoipCidrInput struct {
+
+ // The address range, in CIDR notation. This must be the exact range that you
+ // provisioned. You can't advertise only a portion of the provisioned range.
+ //
+ // This member is required.
+ Cidr *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type AdvertiseByoipCidrOutput struct {
+
+ // Information about the address range.
+ ByoipCidr *types.ByoipCidr
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationAdvertiseByoipCidrMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpAdvertiseByoipCidr{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpAdvertiseByoipCidr{}, 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 = addOpAdvertiseByoipCidrValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAdvertiseByoipCidr(options.Region), middleware.Before); 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_opAdvertiseByoipCidr(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "AdvertiseByoipCidr",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AllocateAddress.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AllocateAddress.go
new file mode 100644
index 00000000..f973238b
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AllocateAddress.go
@@ -0,0 +1,200 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Allocates an Elastic IP address to your Amazon Web Services account. After you
+// allocate the Elastic IP address you can associate it with an instance or network
+// interface. After you release an Elastic IP address, it is released to the IP
+// address pool and can be allocated to a different Amazon Web Services account.
+// You can allocate an Elastic IP address from an address pool owned by Amazon Web
+// Services or from an address pool created from a public IPv4 address range that
+// you have brought to Amazon Web Services for use with your Amazon Web Services
+// resources using bring your own IP addresses (BYOIP). For more information, see
+// Bring Your Own IP Addresses (BYOIP)
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-byoip.html) in the
+// Amazon Elastic Compute Cloud User Guide. [EC2-VPC] If you release an Elastic IP
+// address, you might be able to recover it. You cannot recover an Elastic IP
+// address that you released after it is allocated to another Amazon Web Services
+// account. You cannot recover an Elastic IP address for EC2-Classic. To attempt to
+// recover an Elastic IP address that you released, specify it in this operation.
+// An Elastic IP address is for use either in the EC2-Classic platform or in a VPC.
+// By default, you can allocate 5 Elastic IP addresses for EC2-Classic per Region
+// and 5 Elastic IP addresses for EC2-VPC per Region. For more information, see
+// Elastic IP Addresses
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html)
+// in the Amazon Elastic Compute Cloud User Guide. You can allocate a carrier IP
+// address which is a public IP address from a telecommunication carrier, to a
+// network interface which resides in a subnet in a Wavelength Zone (for example an
+// EC2 instance).
+func (c *Client) AllocateAddress(ctx context.Context, params *AllocateAddressInput, optFns ...func(*Options)) (*AllocateAddressOutput, error) {
+ if params == nil {
+ params = &AllocateAddressInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "AllocateAddress", params, optFns, c.addOperationAllocateAddressMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*AllocateAddressOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type AllocateAddressInput struct {
+
+ // [EC2-VPC] The Elastic IP address to recover or an IPv4 address from an address
+ // pool.
+ Address *string
+
+ // The ID of a customer-owned address pool. Use this parameter to let Amazon EC2
+ // select an address from the address pool. Alternatively, specify a specific
+ // address from the address pool.
+ CustomerOwnedIpv4Pool *string
+
+ // Indicates whether the Elastic IP address is for use with instances in a VPC or
+ // instances in EC2-Classic. Default: If the Region supports EC2-Classic, the
+ // default is standard. Otherwise, the default is vpc.
+ Domain types.DomainType
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // A unique set of Availability Zones, Local Zones, or Wavelength Zones from which
+ // AWS advertises IP addresses. Use this parameter to limit the IP address to this
+ // location. IP addresses cannot move between network border groups. Use
+ // DescribeAvailabilityZones
+ // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeAvailabilityZones.html)
+ // to view the network border groups. You cannot use a network border group with
+ // EC2 Classic. If you attempt this operation on EC2 classic, you will receive an
+ // InvalidParameterCombination error. For more information, see Error Codes
+ // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/errors-overview.html).
+ NetworkBorderGroup *string
+
+ // The ID of an address pool that you own. Use this parameter to let Amazon EC2
+ // select an address from the address pool. To specify a specific address from the
+ // address pool, use the Address parameter instead.
+ PublicIpv4Pool *string
+
+ // The tags to assign to the Elastic IP address.
+ TagSpecifications []types.TagSpecification
+
+ noSmithyDocumentSerde
+}
+
+type AllocateAddressOutput struct {
+
+ // [EC2-VPC] The ID that Amazon Web Services assigns to represent the allocation of
+ // the Elastic IP address for use with instances in a VPC.
+ AllocationId *string
+
+ // The carrier IP address. This option is only available for network interfaces
+ // which reside in a subnet in a Wavelength Zone (for example an EC2 instance).
+ CarrierIp *string
+
+ // The customer-owned IP address.
+ CustomerOwnedIp *string
+
+ // The ID of the customer-owned address pool.
+ CustomerOwnedIpv4Pool *string
+
+ // Indicates whether the Elastic IP address is for use with instances in a VPC
+ // (vpc) or instances in EC2-Classic (standard).
+ Domain types.DomainType
+
+ // The set of Availability Zones, Local Zones, or Wavelength Zones from which AWS
+ // advertises IP addresses.
+ NetworkBorderGroup *string
+
+ // The Elastic IP address.
+ PublicIp *string
+
+ // The ID of an address pool.
+ PublicIpv4Pool *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationAllocateAddressMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpAllocateAddress{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpAllocateAddress{}, 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_opAllocateAddress(options.Region), middleware.Before); 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_opAllocateAddress(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "AllocateAddress",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AllocateHosts.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AllocateHosts.go
new file mode 100644
index 00000000..dac5a70f
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AllocateHosts.go
@@ -0,0 +1,167 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Allocates a Dedicated Host to your account. At a minimum, specify the supported
+// instance type or instance family, the Availability Zone in which to allocate the
+// host, and the number of hosts to allocate.
+func (c *Client) AllocateHosts(ctx context.Context, params *AllocateHostsInput, optFns ...func(*Options)) (*AllocateHostsOutput, error) {
+ if params == nil {
+ params = &AllocateHostsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "AllocateHosts", params, optFns, c.addOperationAllocateHostsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*AllocateHostsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type AllocateHostsInput struct {
+
+ // The Availability Zone in which to allocate the Dedicated Host.
+ //
+ // This member is required.
+ AvailabilityZone *string
+
+ // The number of Dedicated Hosts to allocate to your account with these parameters.
+ //
+ // This member is required.
+ Quantity *int32
+
+ // Indicates whether the host accepts any untargeted instance launches that match
+ // its instance type configuration, or if it only accepts Host tenancy instance
+ // launches that specify its unique host ID. For more information, see
+ // Understanding auto-placement and affinity
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/how-dedicated-hosts-work.html#dedicated-hosts-understanding)
+ // in the Amazon EC2 User Guide. Default: on
+ AutoPlacement types.AutoPlacement
+
+ // Unique, case-sensitive identifier that you provide to ensure the idempotency of
+ // the request. For more information, see Ensuring Idempotency
+ // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html).
+ ClientToken *string
+
+ // Indicates whether to enable or disable host recovery for the Dedicated Host.
+ // Host recovery is disabled by default. For more information, see Host recovery
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/dedicated-hosts-recovery.html)
+ // in the Amazon EC2 User Guide. Default: off
+ HostRecovery types.HostRecovery
+
+ // Specifies the instance family to be supported by the Dedicated Hosts. If you
+ // specify an instance family, the Dedicated Hosts support multiple instance types
+ // within that instance family. If you want the Dedicated Hosts to support a
+ // specific instance type only, omit this parameter and specify InstanceType
+ // instead. You cannot specify InstanceFamily and InstanceType in the same request.
+ InstanceFamily *string
+
+ // Specifies the instance type to be supported by the Dedicated Hosts. If you
+ // specify an instance type, the Dedicated Hosts support instances of the specified
+ // instance type only. If you want the Dedicated Hosts to support multiple instance
+ // types in a specific instance family, omit this parameter and specify
+ // InstanceFamily instead. You cannot specify InstanceType and InstanceFamily in
+ // the same request.
+ InstanceType *string
+
+ // The tags to apply to the Dedicated Host during creation.
+ TagSpecifications []types.TagSpecification
+
+ noSmithyDocumentSerde
+}
+
+// Contains the output of AllocateHosts.
+type AllocateHostsOutput struct {
+
+ // The ID of the allocated Dedicated Host. This is used to launch an instance onto
+ // a specific host.
+ HostIds []string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationAllocateHostsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpAllocateHosts{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpAllocateHosts{}, 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 = addOpAllocateHostsValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAllocateHosts(options.Region), middleware.Before); 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_opAllocateHosts(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "AllocateHosts",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ApplySecurityGroupsToClientVpnTargetNetwork.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ApplySecurityGroupsToClientVpnTargetNetwork.go
new file mode 100644
index 00000000..e39c7d6e
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ApplySecurityGroupsToClientVpnTargetNetwork.go
@@ -0,0 +1,139 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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"
+)
+
+// Applies a security group to the association between the target network and the
+// Client VPN endpoint. This action replaces the existing security groups with the
+// specified security groups.
+func (c *Client) ApplySecurityGroupsToClientVpnTargetNetwork(ctx context.Context, params *ApplySecurityGroupsToClientVpnTargetNetworkInput, optFns ...func(*Options)) (*ApplySecurityGroupsToClientVpnTargetNetworkOutput, error) {
+ if params == nil {
+ params = &ApplySecurityGroupsToClientVpnTargetNetworkInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ApplySecurityGroupsToClientVpnTargetNetwork", params, optFns, c.addOperationApplySecurityGroupsToClientVpnTargetNetworkMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ApplySecurityGroupsToClientVpnTargetNetworkOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ApplySecurityGroupsToClientVpnTargetNetworkInput struct {
+
+ // The ID of the Client VPN endpoint.
+ //
+ // This member is required.
+ ClientVpnEndpointId *string
+
+ // The IDs of the security groups to apply to the associated target network. Up to
+ // 5 security groups can be applied to an associated target network.
+ //
+ // This member is required.
+ SecurityGroupIds []string
+
+ // The ID of the VPC in which the associated target network is located.
+ //
+ // This member is required.
+ VpcId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type ApplySecurityGroupsToClientVpnTargetNetworkOutput struct {
+
+ // The IDs of the applied security groups.
+ SecurityGroupIds []string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationApplySecurityGroupsToClientVpnTargetNetworkMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpApplySecurityGroupsToClientVpnTargetNetwork{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpApplySecurityGroupsToClientVpnTargetNetwork{}, 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 = addOpApplySecurityGroupsToClientVpnTargetNetworkValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opApplySecurityGroupsToClientVpnTargetNetwork(options.Region), middleware.Before); 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_opApplySecurityGroupsToClientVpnTargetNetwork(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "ApplySecurityGroupsToClientVpnTargetNetwork",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssignIpv6Addresses.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssignIpv6Addresses.go
new file mode 100644
index 00000000..31595710
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssignIpv6Addresses.go
@@ -0,0 +1,161 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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"
+)
+
+// Assigns one or more IPv6 addresses to the specified network interface. You can
+// specify one or more specific IPv6 addresses, or you can specify the number of
+// IPv6 addresses to be automatically assigned from within the subnet's IPv6 CIDR
+// block range. You can assign as many IPv6 addresses to a network interface as you
+// can assign private IPv4 addresses, and the limit varies per instance type. For
+// information, see IP Addresses Per Network Interface Per Instance Type
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-eni.html#AvailableIpPerENI)
+// in the Amazon Elastic Compute Cloud User Guide. You must specify either the IPv6
+// addresses or the IPv6 address count in the request. You can optionally use
+// Prefix Delegation on the network interface. You must specify either the IPV6
+// Prefix Delegation prefixes, or the IPv6 Prefix Delegation count. For
+// information, see Assigning prefixes to Amazon EC2 network interfaces
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-prefix-eni.html) in the
+// Amazon Elastic Compute Cloud User Guide.
+func (c *Client) AssignIpv6Addresses(ctx context.Context, params *AssignIpv6AddressesInput, optFns ...func(*Options)) (*AssignIpv6AddressesOutput, error) {
+ if params == nil {
+ params = &AssignIpv6AddressesInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "AssignIpv6Addresses", params, optFns, c.addOperationAssignIpv6AddressesMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*AssignIpv6AddressesOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type AssignIpv6AddressesInput struct {
+
+ // The ID of the network interface.
+ //
+ // This member is required.
+ NetworkInterfaceId *string
+
+ // The number of additional IPv6 addresses to assign to the network interface. The
+ // specified number of IPv6 addresses are assigned in addition to the existing IPv6
+ // addresses that are already assigned to the network interface. Amazon EC2
+ // automatically selects the IPv6 addresses from the subnet range. You can't use
+ // this option if specifying specific IPv6 addresses.
+ Ipv6AddressCount *int32
+
+ // One or more specific IPv6 addresses to be assigned to the network interface. You
+ // can't use this option if you're specifying a number of IPv6 addresses.
+ Ipv6Addresses []string
+
+ // The number of IPv6 prefixes that Amazon Web Services automatically assigns to
+ // the network interface. You cannot use this option if you use the Ipv6Prefixes
+ // option.
+ Ipv6PrefixCount *int32
+
+ // One or more IPv6 prefixes assigned to the network interface. You cannot use this
+ // option if you use the Ipv6PrefixCount option.
+ Ipv6Prefixes []string
+
+ noSmithyDocumentSerde
+}
+
+type AssignIpv6AddressesOutput struct {
+
+ // The new IPv6 addresses assigned to the network interface. Existing IPv6
+ // addresses that were assigned to the network interface before the request are not
+ // included.
+ AssignedIpv6Addresses []string
+
+ // The IPv6 prefixes that are assigned to the network interface.
+ AssignedIpv6Prefixes []string
+
+ // The ID of the network interface.
+ NetworkInterfaceId *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationAssignIpv6AddressesMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpAssignIpv6Addresses{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpAssignIpv6Addresses{}, 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 = addOpAssignIpv6AddressesValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssignIpv6Addresses(options.Region), middleware.Before); 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_opAssignIpv6Addresses(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "AssignIpv6Addresses",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssignPrivateIpAddresses.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssignPrivateIpAddresses.go
new file mode 100644
index 00000000..b135c134
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssignPrivateIpAddresses.go
@@ -0,0 +1,173 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Assigns one or more secondary private IP addresses to the specified network
+// interface. You can specify one or more specific secondary IP addresses, or you
+// can specify the number of secondary IP addresses to be automatically assigned
+// within the subnet's CIDR block range. The number of secondary IP addresses that
+// you can assign to an instance varies by instance type. For information about
+// instance types, see Instance Types
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html) in the
+// Amazon Elastic Compute Cloud User Guide. For more information about Elastic IP
+// addresses, see Elastic IP Addresses
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html)
+// in the Amazon Elastic Compute Cloud User Guide. When you move a secondary
+// private IP address to another network interface, any Elastic IP address that is
+// associated with the IP address is also moved. Remapping an IP address is an
+// asynchronous operation. When you move an IP address from one network interface
+// to another, check network/interfaces/macs/mac/local-ipv4s in the instance
+// metadata to confirm that the remapping is complete. You must specify either the
+// IP addresses or the IP address count in the request. You can optionally use
+// Prefix Delegation on the network interface. You must specify either the IPv4
+// Prefix Delegation prefixes, or the IPv4 Prefix Delegation count. For
+// information, see Assigning prefixes to Amazon EC2 network interfaces
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-prefix-eni.html) in the
+// Amazon Elastic Compute Cloud User Guide.
+func (c *Client) AssignPrivateIpAddresses(ctx context.Context, params *AssignPrivateIpAddressesInput, optFns ...func(*Options)) (*AssignPrivateIpAddressesOutput, error) {
+ if params == nil {
+ params = &AssignPrivateIpAddressesInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "AssignPrivateIpAddresses", params, optFns, c.addOperationAssignPrivateIpAddressesMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*AssignPrivateIpAddressesOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+// Contains the parameters for AssignPrivateIpAddresses.
+type AssignPrivateIpAddressesInput struct {
+
+ // The ID of the network interface.
+ //
+ // This member is required.
+ NetworkInterfaceId *string
+
+ // Indicates whether to allow an IP address that is already assigned to another
+ // network interface or instance to be reassigned to the specified network
+ // interface.
+ AllowReassignment *bool
+
+ // The number of IPv4 prefixes that Amazon Web Services automatically assigns to
+ // the network interface. You cannot use this option if you use the Ipv4 Prefixes
+ // option.
+ Ipv4PrefixCount *int32
+
+ // One or more IPv4 prefixes assigned to the network interface. You cannot use this
+ // option if you use the Ipv4PrefixCount option.
+ Ipv4Prefixes []string
+
+ // One or more IP addresses to be assigned as a secondary private IP address to the
+ // network interface. You can't specify this parameter when also specifying a
+ // number of secondary IP addresses. If you don't specify an IP address, Amazon EC2
+ // automatically selects an IP address within the subnet range.
+ PrivateIpAddresses []string
+
+ // The number of secondary IP addresses to assign to the network interface. You
+ // can't specify this parameter when also specifying private IP addresses.
+ SecondaryPrivateIpAddressCount *int32
+
+ noSmithyDocumentSerde
+}
+
+type AssignPrivateIpAddressesOutput struct {
+
+ // The IPv4 prefixes that are assigned to the network interface.
+ AssignedIpv4Prefixes []types.Ipv4PrefixSpecification
+
+ // The private IP addresses assigned to the network interface.
+ AssignedPrivateIpAddresses []types.AssignedPrivateIpAddress
+
+ // The ID of the network interface.
+ NetworkInterfaceId *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationAssignPrivateIpAddressesMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpAssignPrivateIpAddresses{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpAssignPrivateIpAddresses{}, 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 = addOpAssignPrivateIpAddressesValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssignPrivateIpAddresses(options.Region), middleware.Before); 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_opAssignPrivateIpAddresses(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "AssignPrivateIpAddresses",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssociateAddress.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssociateAddress.go
new file mode 100644
index 00000000..2d054657
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssociateAddress.go
@@ -0,0 +1,174 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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"
+)
+
+// Associates an Elastic IP address, or carrier IP address (for instances that are
+// in subnets in Wavelength Zones) with an instance or a network interface. Before
+// you can use an Elastic IP address, you must allocate it to your account. An
+// Elastic IP address is for use in either the EC2-Classic platform or in a VPC.
+// For more information, see Elastic IP Addresses
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html)
+// in the Amazon Elastic Compute Cloud User Guide. [EC2-Classic, VPC in an
+// EC2-VPC-only account] If the Elastic IP address is already associated with a
+// different instance, it is disassociated from that instance and associated with
+// the specified instance. If you associate an Elastic IP address with an instance
+// that has an existing Elastic IP address, the existing address is disassociated
+// from the instance, but remains allocated to your account. [VPC in an EC2-Classic
+// account] If you don't specify a private IP address, the Elastic IP address is
+// associated with the primary IP address. If the Elastic IP address is already
+// associated with a different instance or a network interface, you get an error
+// unless you allow reassociation. You cannot associate an Elastic IP address with
+// an instance or network interface that has an existing Elastic IP address.
+// [Subnets in Wavelength Zones] You can associate an IP address from the
+// telecommunication carrier to the instance or network interface. You cannot
+// associate an Elastic IP address with an interface in a different network border
+// group. This is an idempotent operation. If you perform the operation more than
+// once, Amazon EC2 doesn't return an error, and you may be charged for each time
+// the Elastic IP address is remapped to the same instance. For more information,
+// see the Elastic IP Addresses section of Amazon EC2 Pricing
+// (http://aws.amazon.com/ec2/pricing/).
+func (c *Client) AssociateAddress(ctx context.Context, params *AssociateAddressInput, optFns ...func(*Options)) (*AssociateAddressOutput, error) {
+ if params == nil {
+ params = &AssociateAddressInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "AssociateAddress", params, optFns, c.addOperationAssociateAddressMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*AssociateAddressOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type AssociateAddressInput struct {
+
+ // [EC2-VPC] The allocation ID. This is required for EC2-VPC.
+ AllocationId *string
+
+ // [EC2-VPC] For a VPC in an EC2-Classic account, specify true to allow an Elastic
+ // IP address that is already associated with an instance or network interface to
+ // be reassociated with the specified instance or network interface. Otherwise, the
+ // operation fails. In a VPC in an EC2-VPC-only account, reassociation is
+ // automatic, therefore you can specify false to ensure the operation fails if the
+ // Elastic IP address is already associated with another resource.
+ AllowReassociation *bool
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The ID of the instance. The instance must have exactly one attached network
+ // interface. For EC2-VPC, you can specify either the instance ID or the network
+ // interface ID, but not both. For EC2-Classic, you must specify an instance ID and
+ // the instance must be in the running state.
+ InstanceId *string
+
+ // [EC2-VPC] The ID of the network interface. If the instance has more than one
+ // network interface, you must specify a network interface ID. For EC2-VPC, you can
+ // specify either the instance ID or the network interface ID, but not both.
+ NetworkInterfaceId *string
+
+ // [EC2-VPC] The primary or secondary private IP address to associate with the
+ // Elastic IP address. If no private IP address is specified, the Elastic IP
+ // address is associated with the primary private IP address.
+ PrivateIpAddress *string
+
+ // [EC2-Classic] The Elastic IP address to associate with the instance. This is
+ // required for EC2-Classic.
+ PublicIp *string
+
+ noSmithyDocumentSerde
+}
+
+type AssociateAddressOutput struct {
+
+ // [EC2-VPC] The ID that represents the association of the Elastic IP address with
+ // an instance.
+ AssociationId *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationAssociateAddressMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpAssociateAddress{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpAssociateAddress{}, 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_opAssociateAddress(options.Region), middleware.Before); 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_opAssociateAddress(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "AssociateAddress",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssociateClientVpnTargetNetwork.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssociateClientVpnTargetNetwork.go
new file mode 100644
index 00000000..25518d73
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssociateClientVpnTargetNetwork.go
@@ -0,0 +1,185 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Associates a target network with a Client VPN endpoint. A target network is a
+// subnet in a VPC. You can associate multiple subnets from the same VPC with a
+// Client VPN endpoint. You can associate only one subnet in each Availability
+// Zone. We recommend that you associate at least two subnets to provide
+// Availability Zone redundancy. If you specified a VPC when you created the Client
+// VPN endpoint or if you have previous subnet associations, the specified subnet
+// must be in the same VPC. To specify a subnet that's in a different VPC, you must
+// first modify the Client VPN endpoint (ModifyClientVpnEndpoint) and change the
+// VPC that's associated with it.
+func (c *Client) AssociateClientVpnTargetNetwork(ctx context.Context, params *AssociateClientVpnTargetNetworkInput, optFns ...func(*Options)) (*AssociateClientVpnTargetNetworkOutput, error) {
+ if params == nil {
+ params = &AssociateClientVpnTargetNetworkInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "AssociateClientVpnTargetNetwork", params, optFns, c.addOperationAssociateClientVpnTargetNetworkMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*AssociateClientVpnTargetNetworkOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type AssociateClientVpnTargetNetworkInput struct {
+
+ // The ID of the Client VPN endpoint.
+ //
+ // This member is required.
+ ClientVpnEndpointId *string
+
+ // The ID of the subnet to associate with the Client VPN endpoint.
+ //
+ // This member is required.
+ SubnetId *string
+
+ // Unique, case-sensitive identifier that you provide to ensure the idempotency of
+ // the request. For more information, see How to ensure idempotency
+ // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html).
+ ClientToken *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type AssociateClientVpnTargetNetworkOutput struct {
+
+ // The unique ID of the target network association.
+ AssociationId *string
+
+ // The current state of the target network association.
+ Status *types.AssociationStatus
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationAssociateClientVpnTargetNetworkMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpAssociateClientVpnTargetNetwork{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpAssociateClientVpnTargetNetwork{}, 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 = addIdempotencyToken_opAssociateClientVpnTargetNetworkMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpAssociateClientVpnTargetNetworkValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssociateClientVpnTargetNetwork(options.Region), middleware.Before); 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
+}
+
+type idempotencyToken_initializeOpAssociateClientVpnTargetNetwork struct {
+ tokenProvider IdempotencyTokenProvider
+}
+
+func (*idempotencyToken_initializeOpAssociateClientVpnTargetNetwork) ID() string {
+ return "OperationIdempotencyTokenAutoFill"
+}
+
+func (m *idempotencyToken_initializeOpAssociateClientVpnTargetNetwork) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ if m.tokenProvider == nil {
+ return next.HandleInitialize(ctx, in)
+ }
+
+ input, ok := in.Parameters.(*AssociateClientVpnTargetNetworkInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("expected middleware input to be of type *AssociateClientVpnTargetNetworkInput ")
+ }
+
+ if input.ClientToken == nil {
+ t, err := m.tokenProvider.GetIdempotencyToken()
+ if err != nil {
+ return out, metadata, err
+ }
+ input.ClientToken = &t
+ }
+ return next.HandleInitialize(ctx, in)
+}
+func addIdempotencyToken_opAssociateClientVpnTargetNetworkMiddleware(stack *middleware.Stack, cfg Options) error {
+ return stack.Initialize.Add(&idempotencyToken_initializeOpAssociateClientVpnTargetNetwork{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before)
+}
+
+func newServiceMetadataMiddleware_opAssociateClientVpnTargetNetwork(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "AssociateClientVpnTargetNetwork",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssociateDhcpOptions.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssociateDhcpOptions.go
new file mode 100644
index 00000000..59bfc138
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssociateDhcpOptions.go
@@ -0,0 +1,137 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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"
+)
+
+// Associates a set of DHCP options (that you've previously created) with the
+// specified VPC, or associates no DHCP options with the VPC. After you associate
+// the options with the VPC, any existing instances and all new instances that you
+// launch in that VPC use the options. You don't need to restart or relaunch the
+// instances. They automatically pick up the changes within a few hours, depending
+// on how frequently the instance renews its DHCP lease. You can explicitly renew
+// the lease using the operating system on the instance. For more information, see
+// DHCP options sets
+// (https://docs.aws.amazon.com/vpc/latest/userguide/VPC_DHCP_Options.html) in the
+// Amazon Virtual Private Cloud User Guide.
+func (c *Client) AssociateDhcpOptions(ctx context.Context, params *AssociateDhcpOptionsInput, optFns ...func(*Options)) (*AssociateDhcpOptionsOutput, error) {
+ if params == nil {
+ params = &AssociateDhcpOptionsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "AssociateDhcpOptions", params, optFns, c.addOperationAssociateDhcpOptionsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*AssociateDhcpOptionsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type AssociateDhcpOptionsInput struct {
+
+ // The ID of the DHCP options set, or default to associate no DHCP options with the
+ // VPC.
+ //
+ // This member is required.
+ DhcpOptionsId *string
+
+ // The ID of the VPC.
+ //
+ // This member is required.
+ VpcId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type AssociateDhcpOptionsOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationAssociateDhcpOptionsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpAssociateDhcpOptions{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpAssociateDhcpOptions{}, 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 = addOpAssociateDhcpOptionsValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssociateDhcpOptions(options.Region), middleware.Before); 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_opAssociateDhcpOptions(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "AssociateDhcpOptions",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssociateEnclaveCertificateIamRole.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssociateEnclaveCertificateIamRole.go
new file mode 100644
index 00000000..4f7c29d1
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssociateEnclaveCertificateIamRole.go
@@ -0,0 +1,149 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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"
+)
+
+// Associates an Identity and Access Management (IAM) role with an Certificate
+// Manager (ACM) certificate. This enables the certificate to be used by the ACM
+// for Nitro Enclaves application inside an enclave. For more information, see
+// Certificate Manager for Nitro Enclaves
+// (https://docs.aws.amazon.com/enclaves/latest/user/nitro-enclave-refapp.html) in
+// the Amazon Web Services Nitro Enclaves User Guide. When the IAM role is
+// associated with the ACM certificate, the certificate, certificate chain, and
+// encrypted private key are placed in an Amazon S3 bucket that only the associated
+// IAM role can access. The private key of the certificate is encrypted with an
+// Amazon Web Services managed key that has an attached attestation-based key
+// policy. To enable the IAM role to access the Amazon S3 object, you must grant it
+// permission to call s3:GetObject on the Amazon S3 bucket returned by the command.
+// To enable the IAM role to access the KMS key, you must grant it permission to
+// call kms:Decrypt on the KMS key returned by the command. For more information,
+// see Grant the role permission to access the certificate and encryption key
+// (https://docs.aws.amazon.com/enclaves/latest/user/nitro-enclave-refapp.html#add-policy)
+// in the Amazon Web Services Nitro Enclaves User Guide.
+func (c *Client) AssociateEnclaveCertificateIamRole(ctx context.Context, params *AssociateEnclaveCertificateIamRoleInput, optFns ...func(*Options)) (*AssociateEnclaveCertificateIamRoleOutput, error) {
+ if params == nil {
+ params = &AssociateEnclaveCertificateIamRoleInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "AssociateEnclaveCertificateIamRole", params, optFns, c.addOperationAssociateEnclaveCertificateIamRoleMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*AssociateEnclaveCertificateIamRoleOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type AssociateEnclaveCertificateIamRoleInput struct {
+
+ // The ARN of the ACM certificate with which to associate the IAM role.
+ CertificateArn *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The ARN of the IAM role to associate with the ACM certificate. You can associate
+ // up to 16 IAM roles with an ACM certificate.
+ RoleArn *string
+
+ noSmithyDocumentSerde
+}
+
+type AssociateEnclaveCertificateIamRoleOutput struct {
+
+ // The name of the Amazon S3 bucket to which the certificate was uploaded.
+ CertificateS3BucketName *string
+
+ // The Amazon S3 object key where the certificate, certificate chain, and encrypted
+ // private key bundle are stored. The object key is formatted as follows:
+ // role_arn/certificate_arn.
+ CertificateS3ObjectKey *string
+
+ // The ID of the KMS key used to encrypt the private key of the certificate.
+ EncryptionKmsKeyId *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationAssociateEnclaveCertificateIamRoleMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpAssociateEnclaveCertificateIamRole{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpAssociateEnclaveCertificateIamRole{}, 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_opAssociateEnclaveCertificateIamRole(options.Region), middleware.Before); 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_opAssociateEnclaveCertificateIamRole(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "AssociateEnclaveCertificateIamRole",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssociateIamInstanceProfile.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssociateIamInstanceProfile.go
new file mode 100644
index 00000000..e8ee1437
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssociateIamInstanceProfile.go
@@ -0,0 +1,127 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Associates an IAM instance profile with a running or stopped instance. You
+// cannot associate more than one IAM instance profile with an instance.
+func (c *Client) AssociateIamInstanceProfile(ctx context.Context, params *AssociateIamInstanceProfileInput, optFns ...func(*Options)) (*AssociateIamInstanceProfileOutput, error) {
+ if params == nil {
+ params = &AssociateIamInstanceProfileInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "AssociateIamInstanceProfile", params, optFns, c.addOperationAssociateIamInstanceProfileMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*AssociateIamInstanceProfileOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type AssociateIamInstanceProfileInput struct {
+
+ // The IAM instance profile.
+ //
+ // This member is required.
+ IamInstanceProfile *types.IamInstanceProfileSpecification
+
+ // The ID of the instance.
+ //
+ // This member is required.
+ InstanceId *string
+
+ noSmithyDocumentSerde
+}
+
+type AssociateIamInstanceProfileOutput struct {
+
+ // Information about the IAM instance profile association.
+ IamInstanceProfileAssociation *types.IamInstanceProfileAssociation
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationAssociateIamInstanceProfileMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpAssociateIamInstanceProfile{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpAssociateIamInstanceProfile{}, 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 = addOpAssociateIamInstanceProfileValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssociateIamInstanceProfile(options.Region), middleware.Before); 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_opAssociateIamInstanceProfile(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "AssociateIamInstanceProfile",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssociateInstanceEventWindow.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssociateInstanceEventWindow.go
new file mode 100644
index 00000000..105c9b9e
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssociateInstanceEventWindow.go
@@ -0,0 +1,136 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Associates one or more targets with an event window. Only one type of target
+// (instance IDs, Dedicated Host IDs, or tags) can be specified with an event
+// window. For more information, see Define event windows for scheduled events
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/event-windows.html) in the
+// Amazon EC2 User Guide.
+func (c *Client) AssociateInstanceEventWindow(ctx context.Context, params *AssociateInstanceEventWindowInput, optFns ...func(*Options)) (*AssociateInstanceEventWindowOutput, error) {
+ if params == nil {
+ params = &AssociateInstanceEventWindowInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "AssociateInstanceEventWindow", params, optFns, c.addOperationAssociateInstanceEventWindowMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*AssociateInstanceEventWindowOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type AssociateInstanceEventWindowInput struct {
+
+ // One or more targets associated with the specified event window.
+ //
+ // This member is required.
+ AssociationTarget *types.InstanceEventWindowAssociationRequest
+
+ // The ID of the event window.
+ //
+ // This member is required.
+ InstanceEventWindowId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type AssociateInstanceEventWindowOutput struct {
+
+ // Information about the event window.
+ InstanceEventWindow *types.InstanceEventWindow
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationAssociateInstanceEventWindowMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpAssociateInstanceEventWindow{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpAssociateInstanceEventWindow{}, 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 = addOpAssociateInstanceEventWindowValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssociateInstanceEventWindow(options.Region), middleware.Before); 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_opAssociateInstanceEventWindow(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "AssociateInstanceEventWindow",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssociateRouteTable.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssociateRouteTable.go
new file mode 100644
index 00000000..5a9edbe4
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssociateRouteTable.go
@@ -0,0 +1,144 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Associates a subnet in your VPC or an internet gateway or virtual private
+// gateway attached to your VPC with a route table in your VPC. This association
+// causes traffic from the subnet or gateway to be routed according to the routes
+// in the route table. The action returns an association ID, which you need in
+// order to disassociate the route table later. A route table can be associated
+// with multiple subnets. For more information, see Route tables
+// (https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Route_Tables.html) in the
+// Amazon Virtual Private Cloud User Guide.
+func (c *Client) AssociateRouteTable(ctx context.Context, params *AssociateRouteTableInput, optFns ...func(*Options)) (*AssociateRouteTableOutput, error) {
+ if params == nil {
+ params = &AssociateRouteTableInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "AssociateRouteTable", params, optFns, c.addOperationAssociateRouteTableMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*AssociateRouteTableOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type AssociateRouteTableInput struct {
+
+ // The ID of the route table.
+ //
+ // This member is required.
+ RouteTableId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The ID of the internet gateway or virtual private gateway.
+ GatewayId *string
+
+ // The ID of the subnet.
+ SubnetId *string
+
+ noSmithyDocumentSerde
+}
+
+type AssociateRouteTableOutput struct {
+
+ // The route table association ID. This ID is required for disassociating the route
+ // table.
+ AssociationId *string
+
+ // The state of the association.
+ AssociationState *types.RouteTableAssociationState
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationAssociateRouteTableMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpAssociateRouteTable{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpAssociateRouteTable{}, 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 = addOpAssociateRouteTableValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssociateRouteTable(options.Region), middleware.Before); 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_opAssociateRouteTable(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "AssociateRouteTable",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssociateSubnetCidrBlock.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssociateSubnetCidrBlock.go
new file mode 100644
index 00000000..75f13b95
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssociateSubnetCidrBlock.go
@@ -0,0 +1,131 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Associates a CIDR block with your subnet. You can only associate a single IPv6
+// CIDR block with your subnet. An IPv6 CIDR block must have a prefix length of
+// /64.
+func (c *Client) AssociateSubnetCidrBlock(ctx context.Context, params *AssociateSubnetCidrBlockInput, optFns ...func(*Options)) (*AssociateSubnetCidrBlockOutput, error) {
+ if params == nil {
+ params = &AssociateSubnetCidrBlockInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "AssociateSubnetCidrBlock", params, optFns, c.addOperationAssociateSubnetCidrBlockMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*AssociateSubnetCidrBlockOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type AssociateSubnetCidrBlockInput struct {
+
+ // The IPv6 CIDR block for your subnet. The subnet must have a /64 prefix length.
+ //
+ // This member is required.
+ Ipv6CidrBlock *string
+
+ // The ID of your subnet.
+ //
+ // This member is required.
+ SubnetId *string
+
+ noSmithyDocumentSerde
+}
+
+type AssociateSubnetCidrBlockOutput struct {
+
+ // Information about the IPv6 CIDR block association.
+ Ipv6CidrBlockAssociation *types.SubnetIpv6CidrBlockAssociation
+
+ // The ID of the subnet.
+ SubnetId *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationAssociateSubnetCidrBlockMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpAssociateSubnetCidrBlock{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpAssociateSubnetCidrBlock{}, 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 = addOpAssociateSubnetCidrBlockValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssociateSubnetCidrBlock(options.Region), middleware.Before); 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_opAssociateSubnetCidrBlock(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "AssociateSubnetCidrBlock",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssociateTransitGatewayMulticastDomain.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssociateTransitGatewayMulticastDomain.go
new file mode 100644
index 00000000..ad5399da
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssociateTransitGatewayMulticastDomain.go
@@ -0,0 +1,134 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Associates the specified subnets and transit gateway attachments with the
+// specified transit gateway multicast domain. The transit gateway attachment must
+// be in the available state before you can add a resource. Use
+// DescribeTransitGatewayAttachments
+// (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeTransitGatewayAttachments.html)
+// to see the state of the attachment.
+func (c *Client) AssociateTransitGatewayMulticastDomain(ctx context.Context, params *AssociateTransitGatewayMulticastDomainInput, optFns ...func(*Options)) (*AssociateTransitGatewayMulticastDomainOutput, error) {
+ if params == nil {
+ params = &AssociateTransitGatewayMulticastDomainInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "AssociateTransitGatewayMulticastDomain", params, optFns, c.addOperationAssociateTransitGatewayMulticastDomainMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*AssociateTransitGatewayMulticastDomainOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type AssociateTransitGatewayMulticastDomainInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The IDs of the subnets to associate with the transit gateway multicast domain.
+ SubnetIds []string
+
+ // The ID of the transit gateway attachment to associate with the transit gateway
+ // multicast domain.
+ TransitGatewayAttachmentId *string
+
+ // The ID of the transit gateway multicast domain.
+ TransitGatewayMulticastDomainId *string
+
+ noSmithyDocumentSerde
+}
+
+type AssociateTransitGatewayMulticastDomainOutput struct {
+
+ // Information about the transit gateway multicast domain associations.
+ Associations *types.TransitGatewayMulticastDomainAssociations
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationAssociateTransitGatewayMulticastDomainMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpAssociateTransitGatewayMulticastDomain{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpAssociateTransitGatewayMulticastDomain{}, 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_opAssociateTransitGatewayMulticastDomain(options.Region), middleware.Before); 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_opAssociateTransitGatewayMulticastDomain(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "AssociateTransitGatewayMulticastDomain",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssociateTransitGatewayRouteTable.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssociateTransitGatewayRouteTable.go
new file mode 100644
index 00000000..bb040557
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssociateTransitGatewayRouteTable.go
@@ -0,0 +1,133 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Associates the specified attachment with the specified transit gateway route
+// table. You can associate only one route table with an attachment.
+func (c *Client) AssociateTransitGatewayRouteTable(ctx context.Context, params *AssociateTransitGatewayRouteTableInput, optFns ...func(*Options)) (*AssociateTransitGatewayRouteTableOutput, error) {
+ if params == nil {
+ params = &AssociateTransitGatewayRouteTableInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "AssociateTransitGatewayRouteTable", params, optFns, c.addOperationAssociateTransitGatewayRouteTableMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*AssociateTransitGatewayRouteTableOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type AssociateTransitGatewayRouteTableInput struct {
+
+ // The ID of the attachment.
+ //
+ // This member is required.
+ TransitGatewayAttachmentId *string
+
+ // The ID of the transit gateway route table.
+ //
+ // This member is required.
+ TransitGatewayRouteTableId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type AssociateTransitGatewayRouteTableOutput struct {
+
+ // The ID of the association.
+ Association *types.TransitGatewayAssociation
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationAssociateTransitGatewayRouteTableMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpAssociateTransitGatewayRouteTable{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpAssociateTransitGatewayRouteTable{}, 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 = addOpAssociateTransitGatewayRouteTableValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssociateTransitGatewayRouteTable(options.Region), middleware.Before); 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_opAssociateTransitGatewayRouteTable(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "AssociateTransitGatewayRouteTable",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssociateTrunkInterface.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssociateTrunkInterface.go
new file mode 100644
index 00000000..20aa95fc
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssociateTrunkInterface.go
@@ -0,0 +1,193 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// This API action is currently in limited preview only. If you are interested in
+// using this feature, contact your account manager. Associates a branch network
+// interface with a trunk network interface. Before you create the association, run
+// the create-network-interface
+// (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateNetworkInterface.html)
+// command and set --interface-type to trunk. You must also create a network
+// interface for each branch network interface that you want to associate with the
+// trunk network interface.
+func (c *Client) AssociateTrunkInterface(ctx context.Context, params *AssociateTrunkInterfaceInput, optFns ...func(*Options)) (*AssociateTrunkInterfaceOutput, error) {
+ if params == nil {
+ params = &AssociateTrunkInterfaceInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "AssociateTrunkInterface", params, optFns, c.addOperationAssociateTrunkInterfaceMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*AssociateTrunkInterfaceOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type AssociateTrunkInterfaceInput struct {
+
+ // The ID of the branch network interface.
+ //
+ // This member is required.
+ BranchInterfaceId *string
+
+ // The ID of the trunk network interface.
+ //
+ // This member is required.
+ TrunkInterfaceId *string
+
+ // Unique, case-sensitive identifier that you provide to ensure the idempotency of
+ // the request. For more information, see How to Ensure Idempotency
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html).
+ ClientToken *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The application key. This applies to the GRE protocol.
+ GreKey *int32
+
+ // The ID of the VLAN. This applies to the VLAN protocol.
+ VlanId *int32
+
+ noSmithyDocumentSerde
+}
+
+type AssociateTrunkInterfaceOutput struct {
+
+ // Unique, case-sensitive identifier that you provide to ensure the idempotency of
+ // the request. For more information, see How to Ensure Idempotency
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html).
+ ClientToken *string
+
+ // Information about the association between the trunk network interface and branch
+ // network interface.
+ InterfaceAssociation *types.TrunkInterfaceAssociation
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationAssociateTrunkInterfaceMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpAssociateTrunkInterface{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpAssociateTrunkInterface{}, 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 = addIdempotencyToken_opAssociateTrunkInterfaceMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpAssociateTrunkInterfaceValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssociateTrunkInterface(options.Region), middleware.Before); 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
+}
+
+type idempotencyToken_initializeOpAssociateTrunkInterface struct {
+ tokenProvider IdempotencyTokenProvider
+}
+
+func (*idempotencyToken_initializeOpAssociateTrunkInterface) ID() string {
+ return "OperationIdempotencyTokenAutoFill"
+}
+
+func (m *idempotencyToken_initializeOpAssociateTrunkInterface) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ if m.tokenProvider == nil {
+ return next.HandleInitialize(ctx, in)
+ }
+
+ input, ok := in.Parameters.(*AssociateTrunkInterfaceInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("expected middleware input to be of type *AssociateTrunkInterfaceInput ")
+ }
+
+ if input.ClientToken == nil {
+ t, err := m.tokenProvider.GetIdempotencyToken()
+ if err != nil {
+ return out, metadata, err
+ }
+ input.ClientToken = &t
+ }
+ return next.HandleInitialize(ctx, in)
+}
+func addIdempotencyToken_opAssociateTrunkInterfaceMiddleware(stack *middleware.Stack, cfg Options) error {
+ return stack.Initialize.Add(&idempotencyToken_initializeOpAssociateTrunkInterface{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before)
+}
+
+func newServiceMetadataMiddleware_opAssociateTrunkInterface(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "AssociateTrunkInterface",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssociateVpcCidrBlock.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssociateVpcCidrBlock.go
new file mode 100644
index 00000000..919b3c5c
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssociateVpcCidrBlock.go
@@ -0,0 +1,158 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Associates a CIDR block with your VPC. You can associate a secondary IPv4 CIDR
+// block, an Amazon-provided IPv6 CIDR block, or an IPv6 CIDR block from an IPv6
+// address pool that you provisioned through bring your own IP addresses (BYOIP
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-byoip.html)). The IPv6
+// CIDR block size is fixed at /56. You must specify one of the following in the
+// request: an IPv4 CIDR block, an IPv6 pool, or an Amazon-provided IPv6 CIDR
+// block. For more information about associating CIDR blocks with your VPC and
+// applicable restrictions, see VPC and subnet sizing
+// (https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Subnets.html#VPC_Sizing)
+// in the Amazon Virtual Private Cloud User Guide.
+func (c *Client) AssociateVpcCidrBlock(ctx context.Context, params *AssociateVpcCidrBlockInput, optFns ...func(*Options)) (*AssociateVpcCidrBlockOutput, error) {
+ if params == nil {
+ params = &AssociateVpcCidrBlockInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "AssociateVpcCidrBlock", params, optFns, c.addOperationAssociateVpcCidrBlockMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*AssociateVpcCidrBlockOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type AssociateVpcCidrBlockInput struct {
+
+ // The ID of the VPC.
+ //
+ // This member is required.
+ VpcId *string
+
+ // Requests an Amazon-provided IPv6 CIDR block with a /56 prefix length for the
+ // VPC. You cannot specify the range of IPv6 addresses, or the size of the CIDR
+ // block.
+ AmazonProvidedIpv6CidrBlock *bool
+
+ // An IPv4 CIDR block to associate with the VPC.
+ CidrBlock *string
+
+ // An IPv6 CIDR block from the IPv6 address pool. You must also specify Ipv6Pool in
+ // the request. To let Amazon choose the IPv6 CIDR block for you, omit this
+ // parameter.
+ Ipv6CidrBlock *string
+
+ // The name of the location from which we advertise the IPV6 CIDR block. Use this
+ // parameter to limit the CIDR block to this location. You must set
+ // AmazonProvidedIpv6CidrBlock to true to use this parameter. You can have one IPv6
+ // CIDR block association per network border group.
+ Ipv6CidrBlockNetworkBorderGroup *string
+
+ // The ID of an IPv6 address pool from which to allocate the IPv6 CIDR block.
+ Ipv6Pool *string
+
+ noSmithyDocumentSerde
+}
+
+type AssociateVpcCidrBlockOutput struct {
+
+ // Information about the IPv4 CIDR block association.
+ CidrBlockAssociation *types.VpcCidrBlockAssociation
+
+ // Information about the IPv6 CIDR block association.
+ Ipv6CidrBlockAssociation *types.VpcIpv6CidrBlockAssociation
+
+ // The ID of the VPC.
+ VpcId *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationAssociateVpcCidrBlockMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpAssociateVpcCidrBlock{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpAssociateVpcCidrBlock{}, 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 = addOpAssociateVpcCidrBlockValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssociateVpcCidrBlock(options.Region), middleware.Before); 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_opAssociateVpcCidrBlock(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "AssociateVpcCidrBlock",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AttachClassicLinkVpc.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AttachClassicLinkVpc.go
new file mode 100644
index 00000000..6cf442bf
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AttachClassicLinkVpc.go
@@ -0,0 +1,145 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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"
+)
+
+// Links an EC2-Classic instance to a ClassicLink-enabled VPC through one or more
+// of the VPC's security groups. You cannot link an EC2-Classic instance to more
+// than one VPC at a time. You can only link an instance that's in the running
+// state. An instance is automatically unlinked from a VPC when it's stopped - you
+// can link it to the VPC again when you restart it. After you've linked an
+// instance, you cannot change the VPC security groups that are associated with it.
+// To change the security groups, you must first unlink the instance, and then link
+// it again. Linking your instance to a VPC is sometimes referred to as attaching
+// your instance.
+func (c *Client) AttachClassicLinkVpc(ctx context.Context, params *AttachClassicLinkVpcInput, optFns ...func(*Options)) (*AttachClassicLinkVpcOutput, error) {
+ if params == nil {
+ params = &AttachClassicLinkVpcInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "AttachClassicLinkVpc", params, optFns, c.addOperationAttachClassicLinkVpcMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*AttachClassicLinkVpcOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type AttachClassicLinkVpcInput struct {
+
+ // The ID of one or more of the VPC's security groups. You cannot specify security
+ // groups from a different VPC.
+ //
+ // This member is required.
+ Groups []string
+
+ // The ID of an EC2-Classic instance to link to the ClassicLink-enabled VPC.
+ //
+ // This member is required.
+ InstanceId *string
+
+ // The ID of a ClassicLink-enabled VPC.
+ //
+ // This member is required.
+ VpcId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type AttachClassicLinkVpcOutput struct {
+
+ // Returns true if the request succeeds; otherwise, it returns an error.
+ Return *bool
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationAttachClassicLinkVpcMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpAttachClassicLinkVpc{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpAttachClassicLinkVpc{}, 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 = addOpAttachClassicLinkVpcValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAttachClassicLinkVpc(options.Region), middleware.Before); 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_opAttachClassicLinkVpc(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "AttachClassicLinkVpc",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AttachInternetGateway.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AttachInternetGateway.go
new file mode 100644
index 00000000..beb5e61c
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AttachInternetGateway.go
@@ -0,0 +1,130 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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"
+)
+
+// Attaches an internet gateway or a virtual private gateway to a VPC, enabling
+// connectivity between the internet and the VPC. For more information about your
+// VPC and internet gateway, see the Amazon Virtual Private Cloud User Guide
+// (https://docs.aws.amazon.com/vpc/latest/userguide/).
+func (c *Client) AttachInternetGateway(ctx context.Context, params *AttachInternetGatewayInput, optFns ...func(*Options)) (*AttachInternetGatewayOutput, error) {
+ if params == nil {
+ params = &AttachInternetGatewayInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "AttachInternetGateway", params, optFns, c.addOperationAttachInternetGatewayMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*AttachInternetGatewayOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type AttachInternetGatewayInput struct {
+
+ // The ID of the internet gateway.
+ //
+ // This member is required.
+ InternetGatewayId *string
+
+ // The ID of the VPC.
+ //
+ // This member is required.
+ VpcId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type AttachInternetGatewayOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationAttachInternetGatewayMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpAttachInternetGateway{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpAttachInternetGateway{}, 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 = addOpAttachInternetGatewayValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAttachInternetGateway(options.Region), middleware.Before); 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_opAttachInternetGateway(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "AttachInternetGateway",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AttachNetworkInterface.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AttachNetworkInterface.go
new file mode 100644
index 00000000..4d15cb8a
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AttachNetworkInterface.go
@@ -0,0 +1,146 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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"
+)
+
+// Attaches a network interface to an instance.
+func (c *Client) AttachNetworkInterface(ctx context.Context, params *AttachNetworkInterfaceInput, optFns ...func(*Options)) (*AttachNetworkInterfaceOutput, error) {
+ if params == nil {
+ params = &AttachNetworkInterfaceInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "AttachNetworkInterface", params, optFns, c.addOperationAttachNetworkInterfaceMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*AttachNetworkInterfaceOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+// Contains the parameters for AttachNetworkInterface.
+type AttachNetworkInterfaceInput struct {
+
+ // The index of the device for the network interface attachment.
+ //
+ // This member is required.
+ DeviceIndex *int32
+
+ // The ID of the instance.
+ //
+ // This member is required.
+ InstanceId *string
+
+ // The ID of the network interface.
+ //
+ // This member is required.
+ NetworkInterfaceId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The index of the network card. Some instance types support multiple network
+ // cards. The primary network interface must be assigned to network card index 0.
+ // The default is network card index 0.
+ NetworkCardIndex *int32
+
+ noSmithyDocumentSerde
+}
+
+// Contains the output of AttachNetworkInterface.
+type AttachNetworkInterfaceOutput struct {
+
+ // The ID of the network interface attachment.
+ AttachmentId *string
+
+ // The index of the network card.
+ NetworkCardIndex *int32
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationAttachNetworkInterfaceMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpAttachNetworkInterface{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpAttachNetworkInterface{}, 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 = addOpAttachNetworkInterfaceValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAttachNetworkInterface(options.Region), middleware.Before); 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_opAttachNetworkInterface(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "AttachNetworkInterface",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AttachVolume.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AttachVolume.go
new file mode 100644
index 00000000..949d3b6d
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AttachVolume.go
@@ -0,0 +1,182 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "time"
+)
+
+// Attaches an EBS volume to a running or stopped instance and exposes it to the
+// instance with the specified device name. Encrypted EBS volumes must be attached
+// to instances that support Amazon EBS encryption. For more information, see
+// Amazon EBS encryption
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html) in the
+// Amazon Elastic Compute Cloud User Guide. After you attach an EBS volume, you
+// must make it available. For more information, see Make an EBS volume available
+// for use
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-using-volumes.html). If
+// a volume has an Amazon Web Services Marketplace product code:
+//
+// * The volume can
+// be attached only to a stopped instance.
+//
+// * Amazon Web Services Marketplace
+// product codes are copied from the volume to the instance.
+//
+// * You must be
+// subscribed to the product.
+//
+// * The instance type and operating system of the
+// instance must support the product. For example, you can't detach a volume from a
+// Windows instance and attach it to a Linux instance.
+//
+// For more information, see
+// Attach an Amazon EBS volume to an instance
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-attaching-volume.html)
+// in the Amazon Elastic Compute Cloud User Guide.
+func (c *Client) AttachVolume(ctx context.Context, params *AttachVolumeInput, optFns ...func(*Options)) (*AttachVolumeOutput, error) {
+ if params == nil {
+ params = &AttachVolumeInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "AttachVolume", params, optFns, c.addOperationAttachVolumeMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*AttachVolumeOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type AttachVolumeInput struct {
+
+ // The device name (for example, /dev/sdh or xvdh).
+ //
+ // This member is required.
+ Device *string
+
+ // The ID of the instance.
+ //
+ // This member is required.
+ InstanceId *string
+
+ // The ID of the EBS volume. The volume and instance must be within the same
+ // Availability Zone.
+ //
+ // This member is required.
+ VolumeId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+// Describes volume attachment details.
+type AttachVolumeOutput struct {
+
+ // The time stamp when the attachment initiated.
+ AttachTime *time.Time
+
+ // Indicates whether the EBS volume is deleted on instance termination.
+ DeleteOnTermination *bool
+
+ // The device name.
+ Device *string
+
+ // The ID of the instance.
+ InstanceId *string
+
+ // The attachment state of the volume.
+ State types.VolumeAttachmentState
+
+ // The ID of the volume.
+ VolumeId *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationAttachVolumeMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpAttachVolume{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpAttachVolume{}, 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 = addOpAttachVolumeValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAttachVolume(options.Region), middleware.Before); 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_opAttachVolume(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "AttachVolume",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AttachVpnGateway.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AttachVpnGateway.go
new file mode 100644
index 00000000..25e94082
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AttachVpnGateway.go
@@ -0,0 +1,137 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Attaches a virtual private gateway to a VPC. You can attach one virtual private
+// gateway to one VPC at a time. For more information, see Amazon Web Services
+// Site-to-Site VPN (https://docs.aws.amazon.com/vpn/latest/s2svpn/VPC_VPN.html) in
+// the Amazon Web Services Site-to-Site VPN User Guide.
+func (c *Client) AttachVpnGateway(ctx context.Context, params *AttachVpnGatewayInput, optFns ...func(*Options)) (*AttachVpnGatewayOutput, error) {
+ if params == nil {
+ params = &AttachVpnGatewayInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "AttachVpnGateway", params, optFns, c.addOperationAttachVpnGatewayMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*AttachVpnGatewayOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+// Contains the parameters for AttachVpnGateway.
+type AttachVpnGatewayInput struct {
+
+ // The ID of the VPC.
+ //
+ // This member is required.
+ VpcId *string
+
+ // The ID of the virtual private gateway.
+ //
+ // This member is required.
+ VpnGatewayId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+// Contains the output of AttachVpnGateway.
+type AttachVpnGatewayOutput struct {
+
+ // Information about the attachment.
+ VpcAttachment *types.VpcAttachment
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationAttachVpnGatewayMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpAttachVpnGateway{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpAttachVpnGateway{}, 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 = addOpAttachVpnGatewayValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAttachVpnGateway(options.Region), middleware.Before); 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_opAttachVpnGateway(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "AttachVpnGateway",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AuthorizeClientVpnIngress.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AuthorizeClientVpnIngress.go
new file mode 100644
index 00000000..01a5d8a5
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AuthorizeClientVpnIngress.go
@@ -0,0 +1,191 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Adds an ingress authorization rule to a Client VPN endpoint. Ingress
+// authorization rules act as firewall rules that grant access to networks. You
+// must configure ingress authorization rules to enable clients to access resources
+// in Amazon Web Services or on-premises networks.
+func (c *Client) AuthorizeClientVpnIngress(ctx context.Context, params *AuthorizeClientVpnIngressInput, optFns ...func(*Options)) (*AuthorizeClientVpnIngressOutput, error) {
+ if params == nil {
+ params = &AuthorizeClientVpnIngressInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "AuthorizeClientVpnIngress", params, optFns, c.addOperationAuthorizeClientVpnIngressMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*AuthorizeClientVpnIngressOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type AuthorizeClientVpnIngressInput struct {
+
+ // The ID of the Client VPN endpoint.
+ //
+ // This member is required.
+ ClientVpnEndpointId *string
+
+ // The IPv4 address range, in CIDR notation, of the network for which access is
+ // being authorized.
+ //
+ // This member is required.
+ TargetNetworkCidr *string
+
+ // The ID of the group to grant access to, for example, the Active Directory group
+ // or identity provider (IdP) group. Required if AuthorizeAllGroups is false or not
+ // specified.
+ AccessGroupId *string
+
+ // Indicates whether to grant access to all clients. Specify true to grant all
+ // clients who successfully establish a VPN connection access to the network. Must
+ // be set to true if AccessGroupId is not specified.
+ AuthorizeAllGroups *bool
+
+ // Unique, case-sensitive identifier that you provide to ensure the idempotency of
+ // the request. For more information, see How to ensure idempotency
+ // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html).
+ ClientToken *string
+
+ // A brief description of the authorization rule.
+ Description *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type AuthorizeClientVpnIngressOutput struct {
+
+ // The current state of the authorization rule.
+ Status *types.ClientVpnAuthorizationRuleStatus
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationAuthorizeClientVpnIngressMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpAuthorizeClientVpnIngress{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpAuthorizeClientVpnIngress{}, 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 = addIdempotencyToken_opAuthorizeClientVpnIngressMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpAuthorizeClientVpnIngressValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAuthorizeClientVpnIngress(options.Region), middleware.Before); 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
+}
+
+type idempotencyToken_initializeOpAuthorizeClientVpnIngress struct {
+ tokenProvider IdempotencyTokenProvider
+}
+
+func (*idempotencyToken_initializeOpAuthorizeClientVpnIngress) ID() string {
+ return "OperationIdempotencyTokenAutoFill"
+}
+
+func (m *idempotencyToken_initializeOpAuthorizeClientVpnIngress) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ if m.tokenProvider == nil {
+ return next.HandleInitialize(ctx, in)
+ }
+
+ input, ok := in.Parameters.(*AuthorizeClientVpnIngressInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("expected middleware input to be of type *AuthorizeClientVpnIngressInput ")
+ }
+
+ if input.ClientToken == nil {
+ t, err := m.tokenProvider.GetIdempotencyToken()
+ if err != nil {
+ return out, metadata, err
+ }
+ input.ClientToken = &t
+ }
+ return next.HandleInitialize(ctx, in)
+}
+func addIdempotencyToken_opAuthorizeClientVpnIngressMiddleware(stack *middleware.Stack, cfg Options) error {
+ return stack.Initialize.Add(&idempotencyToken_initializeOpAuthorizeClientVpnIngress{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before)
+}
+
+func newServiceMetadataMiddleware_opAuthorizeClientVpnIngress(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "AuthorizeClientVpnIngress",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AuthorizeSecurityGroupEgress.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AuthorizeSecurityGroupEgress.go
new file mode 100644
index 00000000..ec7a2653
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AuthorizeSecurityGroupEgress.go
@@ -0,0 +1,168 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// [VPC only] Adds the specified outbound (egress) rules to a security group for
+// use with a VPC. An outbound rule permits instances to send traffic to the
+// specified IPv4 or IPv6 CIDR address ranges, or to the instances that are
+// associated with the specified destination security groups. You specify a
+// protocol for each rule (for example, TCP). For the TCP and UDP protocols, you
+// must also specify the destination port or port range. For the ICMP protocol, you
+// must also specify the ICMP type and code. You can use -1 for the type or code to
+// mean all types or all codes. Rule changes are propagated to affected instances
+// as quickly as possible. However, a small delay might occur. For information
+// about VPC security group quotas, see Amazon VPC quotas
+// (https://docs.aws.amazon.com/vpc/latest/userguide/amazon-vpc-limits.html).
+func (c *Client) AuthorizeSecurityGroupEgress(ctx context.Context, params *AuthorizeSecurityGroupEgressInput, optFns ...func(*Options)) (*AuthorizeSecurityGroupEgressOutput, error) {
+ if params == nil {
+ params = &AuthorizeSecurityGroupEgressInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "AuthorizeSecurityGroupEgress", params, optFns, c.addOperationAuthorizeSecurityGroupEgressMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*AuthorizeSecurityGroupEgressOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type AuthorizeSecurityGroupEgressInput struct {
+
+ // The ID of the security group.
+ //
+ // This member is required.
+ GroupId *string
+
+ // Not supported. Use a set of IP permissions to specify the CIDR.
+ CidrIp *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // Not supported. Use a set of IP permissions to specify the port.
+ FromPort *int32
+
+ // The sets of IP permissions. You can't specify a destination security group and a
+ // CIDR IP address range in the same set of permissions.
+ IpPermissions []types.IpPermission
+
+ // Not supported. Use a set of IP permissions to specify the protocol name or
+ // number.
+ IpProtocol *string
+
+ // Not supported. Use a set of IP permissions to specify a destination security
+ // group.
+ SourceSecurityGroupName *string
+
+ // Not supported. Use a set of IP permissions to specify a destination security
+ // group.
+ SourceSecurityGroupOwnerId *string
+
+ // The tags applied to the security group rule.
+ TagSpecifications []types.TagSpecification
+
+ // Not supported. Use a set of IP permissions to specify the port.
+ ToPort *int32
+
+ noSmithyDocumentSerde
+}
+
+type AuthorizeSecurityGroupEgressOutput struct {
+
+ // Returns true if the request succeeds; otherwise, returns an error.
+ Return *bool
+
+ // Information about the outbound (egress) security group rules that were added.
+ SecurityGroupRules []types.SecurityGroupRule
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationAuthorizeSecurityGroupEgressMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpAuthorizeSecurityGroupEgress{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpAuthorizeSecurityGroupEgress{}, 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 = addOpAuthorizeSecurityGroupEgressValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAuthorizeSecurityGroupEgress(options.Region), middleware.Before); 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_opAuthorizeSecurityGroupEgress(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "AuthorizeSecurityGroupEgress",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AuthorizeSecurityGroupIngress.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AuthorizeSecurityGroupIngress.go
new file mode 100644
index 00000000..c5576891
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AuthorizeSecurityGroupIngress.go
@@ -0,0 +1,190 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Adds the specified inbound (ingress) rules to a security group. An inbound rule
+// permits instances to receive traffic from the specified IPv4 or IPv6 CIDR
+// address range, or from the instances that are associated with the specified
+// destination security groups. You specify a protocol for each rule (for example,
+// TCP). For TCP and UDP, you must also specify the destination port or port range.
+// For ICMP/ICMPv6, you must also specify the ICMP/ICMPv6 type and code. You can
+// use -1 to mean all types or all codes. Rule changes are propagated to instances
+// within the security group as quickly as possible. However, a small delay might
+// occur. For more information about VPC security group quotas, see Amazon VPC
+// quotas
+// (https://docs.aws.amazon.com/vpc/latest/userguide/amazon-vpc-limits.html).
+func (c *Client) AuthorizeSecurityGroupIngress(ctx context.Context, params *AuthorizeSecurityGroupIngressInput, optFns ...func(*Options)) (*AuthorizeSecurityGroupIngressOutput, error) {
+ if params == nil {
+ params = &AuthorizeSecurityGroupIngressInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "AuthorizeSecurityGroupIngress", params, optFns, c.addOperationAuthorizeSecurityGroupIngressMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*AuthorizeSecurityGroupIngressOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type AuthorizeSecurityGroupIngressInput struct {
+
+ // The IPv4 address range, in CIDR format. You can't specify this parameter when
+ // specifying a source security group. To specify an IPv6 address range, use a set
+ // of IP permissions. Alternatively, use a set of IP permissions to specify
+ // multiple rules and a description for the rule.
+ CidrIp *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The start of port range for the TCP and UDP protocols, or an ICMP type number.
+ // For the ICMP type number, use -1 to specify all types. If you specify all ICMP
+ // types, you must specify all codes. Alternatively, use a set of IP permissions to
+ // specify multiple rules and a description for the rule.
+ FromPort *int32
+
+ // The ID of the security group. You must specify either the security group ID or
+ // the security group name in the request. For security groups in a nondefault VPC,
+ // you must specify the security group ID.
+ GroupId *string
+
+ // [EC2-Classic, default VPC] The name of the security group. You must specify
+ // either the security group ID or the security group name in the request.
+ GroupName *string
+
+ // The sets of IP permissions.
+ IpPermissions []types.IpPermission
+
+ // The IP protocol name (tcp, udp, icmp) or number (see Protocol Numbers
+ // (http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml)). To
+ // specify icmpv6, use a set of IP permissions. [VPC only] Use -1 to specify all
+ // protocols. If you specify -1 or a protocol other than tcp, udp, or icmp, traffic
+ // on all ports is allowed, regardless of any ports you specify. Alternatively, use
+ // a set of IP permissions to specify multiple rules and a description for the
+ // rule.
+ IpProtocol *string
+
+ // [EC2-Classic, default VPC] The name of the source security group. You can't
+ // specify this parameter in combination with the following parameters: the CIDR IP
+ // address range, the start of the port range, the IP protocol, and the end of the
+ // port range. Creates rules that grant full ICMP, UDP, and TCP access. To create a
+ // rule with a specific IP protocol and port range, use a set of IP permissions
+ // instead. For EC2-VPC, the source security group must be in the same VPC.
+ SourceSecurityGroupName *string
+
+ // [nondefault VPC] The Amazon Web Services account ID for the source security
+ // group, if the source security group is in a different account. You can't specify
+ // this parameter in combination with the following parameters: the CIDR IP address
+ // range, the IP protocol, the start of the port range, and the end of the port
+ // range. Creates rules that grant full ICMP, UDP, and TCP access. To create a rule
+ // with a specific IP protocol and port range, use a set of IP permissions instead.
+ SourceSecurityGroupOwnerId *string
+
+ // [VPC Only] The tags applied to the security group rule.
+ TagSpecifications []types.TagSpecification
+
+ // The end of port range for the TCP and UDP protocols, or an ICMP code number. For
+ // the ICMP code number, use -1 to specify all codes. If you specify all ICMP
+ // types, you must specify all codes. Alternatively, use a set of IP permissions to
+ // specify multiple rules and a description for the rule.
+ ToPort *int32
+
+ noSmithyDocumentSerde
+}
+
+type AuthorizeSecurityGroupIngressOutput struct {
+
+ // Returns true if the request succeeds; otherwise, returns an error.
+ Return *bool
+
+ // Information about the inbound (ingress) security group rules that were added.
+ SecurityGroupRules []types.SecurityGroupRule
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationAuthorizeSecurityGroupIngressMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpAuthorizeSecurityGroupIngress{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpAuthorizeSecurityGroupIngress{}, 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_opAuthorizeSecurityGroupIngress(options.Region), middleware.Before); 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_opAuthorizeSecurityGroupIngress(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "AuthorizeSecurityGroupIngress",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_BundleInstance.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_BundleInstance.go
new file mode 100644
index 00000000..9ed71893
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_BundleInstance.go
@@ -0,0 +1,139 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Bundles an Amazon instance store-backed Windows instance. During bundling, only
+// the root device volume (C:\) is bundled. Data on other instance store volumes is
+// not preserved. This action is not applicable for Linux/Unix instances or Windows
+// instances that are backed by Amazon EBS.
+func (c *Client) BundleInstance(ctx context.Context, params *BundleInstanceInput, optFns ...func(*Options)) (*BundleInstanceOutput, error) {
+ if params == nil {
+ params = &BundleInstanceInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "BundleInstance", params, optFns, c.addOperationBundleInstanceMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*BundleInstanceOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+// Contains the parameters for BundleInstance.
+type BundleInstanceInput struct {
+
+ // The ID of the instance to bundle. Type: String Default: None Required: Yes
+ //
+ // This member is required.
+ InstanceId *string
+
+ // The bucket in which to store the AMI. You can specify a bucket that you already
+ // own or a new bucket that Amazon EC2 creates on your behalf. If you specify a
+ // bucket that belongs to someone else, Amazon EC2 returns an error.
+ //
+ // This member is required.
+ Storage *types.Storage
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+// Contains the output of BundleInstance.
+type BundleInstanceOutput struct {
+
+ // Information about the bundle task.
+ BundleTask *types.BundleTask
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationBundleInstanceMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpBundleInstance{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpBundleInstance{}, 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 = addOpBundleInstanceValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opBundleInstance(options.Region), middleware.Before); 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_opBundleInstance(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "BundleInstance",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CancelBundleTask.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CancelBundleTask.go
new file mode 100644
index 00000000..efa7255a
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CancelBundleTask.go
@@ -0,0 +1,129 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Cancels a bundling operation for an instance store-backed Windows instance.
+func (c *Client) CancelBundleTask(ctx context.Context, params *CancelBundleTaskInput, optFns ...func(*Options)) (*CancelBundleTaskOutput, error) {
+ if params == nil {
+ params = &CancelBundleTaskInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CancelBundleTask", params, optFns, c.addOperationCancelBundleTaskMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CancelBundleTaskOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+// Contains the parameters for CancelBundleTask.
+type CancelBundleTaskInput struct {
+
+ // The ID of the bundle task.
+ //
+ // This member is required.
+ BundleId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+// Contains the output of CancelBundleTask.
+type CancelBundleTaskOutput struct {
+
+ // Information about the bundle task.
+ BundleTask *types.BundleTask
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCancelBundleTaskMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpCancelBundleTask{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpCancelBundleTask{}, 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 = addOpCancelBundleTaskValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCancelBundleTask(options.Region), middleware.Before); 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_opCancelBundleTask(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "CancelBundleTask",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CancelCapacityReservation.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CancelCapacityReservation.go
new file mode 100644
index 00000000..82f464cd
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CancelCapacityReservation.go
@@ -0,0 +1,132 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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"
+)
+
+// Cancels the specified Capacity Reservation, releases the reserved capacity, and
+// changes the Capacity Reservation's state to cancelled. Instances running in the
+// reserved capacity continue running until you stop them. Stopped instances that
+// target the Capacity Reservation can no longer launch. Modify these instances to
+// either target a different Capacity Reservation, launch On-Demand Instance
+// capacity, or run in any open Capacity Reservation that has matching attributes
+// and sufficient capacity.
+func (c *Client) CancelCapacityReservation(ctx context.Context, params *CancelCapacityReservationInput, optFns ...func(*Options)) (*CancelCapacityReservationOutput, error) {
+ if params == nil {
+ params = &CancelCapacityReservationInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CancelCapacityReservation", params, optFns, c.addOperationCancelCapacityReservationMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CancelCapacityReservationOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type CancelCapacityReservationInput struct {
+
+ // The ID of the Capacity Reservation to be cancelled.
+ //
+ // This member is required.
+ CapacityReservationId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type CancelCapacityReservationOutput struct {
+
+ // Returns true if the request succeeds; otherwise, it returns an error.
+ Return *bool
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCancelCapacityReservationMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpCancelCapacityReservation{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpCancelCapacityReservation{}, 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 = addOpCancelCapacityReservationValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCancelCapacityReservation(options.Region), middleware.Before); 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_opCancelCapacityReservation(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "CancelCapacityReservation",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CancelConversionTask.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CancelConversionTask.go
new file mode 100644
index 00000000..c1b3ed5f
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CancelConversionTask.go
@@ -0,0 +1,131 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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"
+)
+
+// Cancels an active conversion task. The task can be the import of an instance or
+// volume. The action removes all artifacts of the conversion, including a
+// partially uploaded volume or instance. If the conversion is complete or is in
+// the process of transferring the final disk image, the command fails and returns
+// an exception. For more information, see Importing a Virtual Machine Using the
+// Amazon EC2 CLI
+// (https://docs.aws.amazon.com/AWSEC2/latest/CommandLineReference/ec2-cli-vmimport-export.html).
+func (c *Client) CancelConversionTask(ctx context.Context, params *CancelConversionTaskInput, optFns ...func(*Options)) (*CancelConversionTaskOutput, error) {
+ if params == nil {
+ params = &CancelConversionTaskInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CancelConversionTask", params, optFns, c.addOperationCancelConversionTaskMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CancelConversionTaskOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type CancelConversionTaskInput struct {
+
+ // The ID of the conversion task.
+ //
+ // This member is required.
+ ConversionTaskId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The reason for canceling the conversion task.
+ ReasonMessage *string
+
+ noSmithyDocumentSerde
+}
+
+type CancelConversionTaskOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCancelConversionTaskMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpCancelConversionTask{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpCancelConversionTask{}, 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 = addOpCancelConversionTaskValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCancelConversionTask(options.Region), middleware.Before); 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_opCancelConversionTask(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "CancelConversionTask",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CancelExportTask.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CancelExportTask.go
new file mode 100644
index 00000000..133ff3a0
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CancelExportTask.go
@@ -0,0 +1,119 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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"
+)
+
+// Cancels an active export task. The request removes all artifacts of the export,
+// including any partially-created Amazon S3 objects. If the export task is
+// complete or is in the process of transferring the final disk image, the command
+// fails and returns an error.
+func (c *Client) CancelExportTask(ctx context.Context, params *CancelExportTaskInput, optFns ...func(*Options)) (*CancelExportTaskOutput, error) {
+ if params == nil {
+ params = &CancelExportTaskInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CancelExportTask", params, optFns, c.addOperationCancelExportTaskMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CancelExportTaskOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type CancelExportTaskInput struct {
+
+ // The ID of the export task. This is the ID returned by CreateInstanceExportTask.
+ //
+ // This member is required.
+ ExportTaskId *string
+
+ noSmithyDocumentSerde
+}
+
+type CancelExportTaskOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCancelExportTaskMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpCancelExportTask{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpCancelExportTask{}, 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 = addOpCancelExportTaskValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCancelExportTask(options.Region), middleware.Before); 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_opCancelExportTask(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "CancelExportTask",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CancelImportTask.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CancelImportTask.go
new file mode 100644
index 00000000..ae58f42f
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CancelImportTask.go
@@ -0,0 +1,130 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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"
+)
+
+// Cancels an in-process import virtual machine or import snapshot task.
+func (c *Client) CancelImportTask(ctx context.Context, params *CancelImportTaskInput, optFns ...func(*Options)) (*CancelImportTaskOutput, error) {
+ if params == nil {
+ params = &CancelImportTaskInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CancelImportTask", params, optFns, c.addOperationCancelImportTaskMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CancelImportTaskOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type CancelImportTaskInput struct {
+
+ // The reason for canceling the task.
+ CancelReason *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The ID of the import image or import snapshot task to be canceled.
+ ImportTaskId *string
+
+ noSmithyDocumentSerde
+}
+
+type CancelImportTaskOutput struct {
+
+ // The ID of the task being canceled.
+ ImportTaskId *string
+
+ // The current state of the task being canceled.
+ PreviousState *string
+
+ // The current state of the task being canceled.
+ State *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCancelImportTaskMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpCancelImportTask{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpCancelImportTask{}, 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_opCancelImportTask(options.Region), middleware.Before); 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_opCancelImportTask(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "CancelImportTask",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CancelReservedInstancesListing.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CancelReservedInstancesListing.go
new file mode 100644
index 00000000..95682e46
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CancelReservedInstancesListing.go
@@ -0,0 +1,126 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Cancels the specified Reserved Instance listing in the Reserved Instance
+// Marketplace. For more information, see Reserved Instance Marketplace
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-market-general.html) in
+// the Amazon EC2 User Guide.
+func (c *Client) CancelReservedInstancesListing(ctx context.Context, params *CancelReservedInstancesListingInput, optFns ...func(*Options)) (*CancelReservedInstancesListingOutput, error) {
+ if params == nil {
+ params = &CancelReservedInstancesListingInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CancelReservedInstancesListing", params, optFns, c.addOperationCancelReservedInstancesListingMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CancelReservedInstancesListingOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+// Contains the parameters for CancelReservedInstancesListing.
+type CancelReservedInstancesListingInput struct {
+
+ // The ID of the Reserved Instance listing.
+ //
+ // This member is required.
+ ReservedInstancesListingId *string
+
+ noSmithyDocumentSerde
+}
+
+// Contains the output of CancelReservedInstancesListing.
+type CancelReservedInstancesListingOutput struct {
+
+ // The Reserved Instance listing.
+ ReservedInstancesListings []types.ReservedInstancesListing
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCancelReservedInstancesListingMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpCancelReservedInstancesListing{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpCancelReservedInstancesListing{}, 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 = addOpCancelReservedInstancesListingValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCancelReservedInstancesListing(options.Region), middleware.Before); 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_opCancelReservedInstancesListing(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "CancelReservedInstancesListing",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CancelSpotFleetRequests.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CancelSpotFleetRequests.go
new file mode 100644
index 00000000..19f72043
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CancelSpotFleetRequests.go
@@ -0,0 +1,144 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Cancels the specified Spot Fleet requests. After you cancel a Spot Fleet
+// request, the Spot Fleet launches no new Spot Instances. You must specify whether
+// the Spot Fleet should also terminate its Spot Instances. If you terminate the
+// instances, the Spot Fleet request enters the cancelled_terminating state.
+// Otherwise, the Spot Fleet request enters the cancelled_running state and the
+// instances continue to run until they are interrupted or you terminate them
+// manually.
+func (c *Client) CancelSpotFleetRequests(ctx context.Context, params *CancelSpotFleetRequestsInput, optFns ...func(*Options)) (*CancelSpotFleetRequestsOutput, error) {
+ if params == nil {
+ params = &CancelSpotFleetRequestsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CancelSpotFleetRequests", params, optFns, c.addOperationCancelSpotFleetRequestsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CancelSpotFleetRequestsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+// Contains the parameters for CancelSpotFleetRequests.
+type CancelSpotFleetRequestsInput struct {
+
+ // The IDs of the Spot Fleet requests.
+ //
+ // This member is required.
+ SpotFleetRequestIds []string
+
+ // Indicates whether to terminate instances for a Spot Fleet request if it is
+ // canceled successfully.
+ //
+ // This member is required.
+ TerminateInstances *bool
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+// Contains the output of CancelSpotFleetRequests.
+type CancelSpotFleetRequestsOutput struct {
+
+ // Information about the Spot Fleet requests that are successfully canceled.
+ SuccessfulFleetRequests []types.CancelSpotFleetRequestsSuccessItem
+
+ // Information about the Spot Fleet requests that are not successfully canceled.
+ UnsuccessfulFleetRequests []types.CancelSpotFleetRequestsErrorItem
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCancelSpotFleetRequestsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpCancelSpotFleetRequests{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpCancelSpotFleetRequests{}, 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 = addOpCancelSpotFleetRequestsValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCancelSpotFleetRequests(options.Region), middleware.Before); 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_opCancelSpotFleetRequests(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "CancelSpotFleetRequests",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CancelSpotInstanceRequests.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CancelSpotInstanceRequests.go
new file mode 100644
index 00000000..44804376
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CancelSpotInstanceRequests.go
@@ -0,0 +1,130 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Cancels one or more Spot Instance requests. Canceling a Spot Instance request
+// does not terminate running Spot Instances associated with the request.
+func (c *Client) CancelSpotInstanceRequests(ctx context.Context, params *CancelSpotInstanceRequestsInput, optFns ...func(*Options)) (*CancelSpotInstanceRequestsOutput, error) {
+ if params == nil {
+ params = &CancelSpotInstanceRequestsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CancelSpotInstanceRequests", params, optFns, c.addOperationCancelSpotInstanceRequestsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CancelSpotInstanceRequestsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+// Contains the parameters for CancelSpotInstanceRequests.
+type CancelSpotInstanceRequestsInput struct {
+
+ // One or more Spot Instance request IDs.
+ //
+ // This member is required.
+ SpotInstanceRequestIds []string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+// Contains the output of CancelSpotInstanceRequests.
+type CancelSpotInstanceRequestsOutput struct {
+
+ // One or more Spot Instance requests.
+ CancelledSpotInstanceRequests []types.CancelledSpotInstanceRequest
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCancelSpotInstanceRequestsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpCancelSpotInstanceRequests{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpCancelSpotInstanceRequests{}, 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 = addOpCancelSpotInstanceRequestsValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCancelSpotInstanceRequests(options.Region), middleware.Before); 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_opCancelSpotInstanceRequests(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "CancelSpotInstanceRequests",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ConfirmProductInstance.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ConfirmProductInstance.go
new file mode 100644
index 00000000..bfad4916
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ConfirmProductInstance.go
@@ -0,0 +1,138 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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"
+)
+
+// Determines whether a product code is associated with an instance. This action
+// can only be used by the owner of the product code. It is useful when a product
+// code owner must verify whether another user's instance is eligible for support.
+func (c *Client) ConfirmProductInstance(ctx context.Context, params *ConfirmProductInstanceInput, optFns ...func(*Options)) (*ConfirmProductInstanceOutput, error) {
+ if params == nil {
+ params = &ConfirmProductInstanceInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ConfirmProductInstance", params, optFns, c.addOperationConfirmProductInstanceMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ConfirmProductInstanceOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ConfirmProductInstanceInput struct {
+
+ // The ID of the instance.
+ //
+ // This member is required.
+ InstanceId *string
+
+ // The product code. This must be a product code that you own.
+ //
+ // This member is required.
+ ProductCode *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type ConfirmProductInstanceOutput struct {
+
+ // The Amazon Web Services account ID of the instance owner. This is only present
+ // if the product code is attached to the instance.
+ OwnerId *string
+
+ // The return value of the request. Returns true if the specified product code is
+ // owned by the requester and associated with the specified instance.
+ Return *bool
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationConfirmProductInstanceMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpConfirmProductInstance{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpConfirmProductInstance{}, 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 = addOpConfirmProductInstanceValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opConfirmProductInstance(options.Region), middleware.Before); 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_opConfirmProductInstance(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "ConfirmProductInstance",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CopyFpgaImage.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CopyFpgaImage.go
new file mode 100644
index 00000000..ee4c7fb3
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CopyFpgaImage.go
@@ -0,0 +1,142 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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"
+)
+
+// Copies the specified Amazon FPGA Image (AFI) to the current Region.
+func (c *Client) CopyFpgaImage(ctx context.Context, params *CopyFpgaImageInput, optFns ...func(*Options)) (*CopyFpgaImageOutput, error) {
+ if params == nil {
+ params = &CopyFpgaImageInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CopyFpgaImage", params, optFns, c.addOperationCopyFpgaImageMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CopyFpgaImageOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type CopyFpgaImageInput struct {
+
+ // The ID of the source AFI.
+ //
+ // This member is required.
+ SourceFpgaImageId *string
+
+ // The Region that contains the source AFI.
+ //
+ // This member is required.
+ SourceRegion *string
+
+ // Unique, case-sensitive identifier that you provide to ensure the idempotency of
+ // the request. For more information, see Ensuring Idempotency
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html).
+ ClientToken *string
+
+ // The description for the new AFI.
+ Description *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The name for the new AFI. The default is the name of the source AFI.
+ Name *string
+
+ noSmithyDocumentSerde
+}
+
+type CopyFpgaImageOutput struct {
+
+ // The ID of the new AFI.
+ FpgaImageId *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCopyFpgaImageMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpCopyFpgaImage{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpCopyFpgaImage{}, 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 = addOpCopyFpgaImageValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCopyFpgaImage(options.Region), middleware.Before); 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_opCopyFpgaImage(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "CopyFpgaImage",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CopyImage.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CopyImage.go
new file mode 100644
index 00000000..55957557
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CopyImage.go
@@ -0,0 +1,217 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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"
+)
+
+// Initiates the copy of an AMI. You can copy an AMI from one Region to another, or
+// from a Region to an Outpost. You can't copy an AMI from an Outpost to a Region,
+// from one Outpost to another, or within the same Outpost. To copy an AMI to
+// another partition, see CreateStoreImageTask
+// (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateStoreImageTask.html).
+// To copy an AMI from one Region to another, specify the source Region using
+// the
+//
+// SourceRegion parameter, and specify the destination Region using its
+// endpoint. Copies of encrypted backing snapshots for the AMI are encrypted.
+// Copies of unencrypted backing snapshots remain unencrypted, unless you set
+// Encrypted during the copy operation. You cannot create an unencrypted copy of an
+// encrypted backing snapshot. To copy an AMI from a Region to an Outpost, specify
+// the source Region using the
+//
+// SourceRegion parameter, and specify the ARN of the
+// destination Outpost using DestinationOutpostArn. Backing snapshots copied to an
+// Outpost are encrypted by default using the default encryption key for the
+// Region, or a different key that you specify in the request using KmsKeyId.
+// Outposts do not support unencrypted snapshots. For more information, Amazon EBS
+// local snapshots on Outposts
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/snapshots-outposts.html#ami)
+// in the Amazon Elastic Compute Cloud User Guide. For more information about the
+// prerequisites and limits when copying an AMI, see Copying an AMI
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/CopyingAMIs.html) in the
+// Amazon Elastic Compute Cloud User Guide.
+func (c *Client) CopyImage(ctx context.Context, params *CopyImageInput, optFns ...func(*Options)) (*CopyImageOutput, error) {
+ if params == nil {
+ params = &CopyImageInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CopyImage", params, optFns, c.addOperationCopyImageMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CopyImageOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+// Contains the parameters for CopyImage.
+type CopyImageInput struct {
+
+ // The name of the new AMI in the destination Region.
+ //
+ // This member is required.
+ Name *string
+
+ // The ID of the AMI to copy.
+ //
+ // This member is required.
+ SourceImageId *string
+
+ // The name of the Region that contains the AMI to copy.
+ //
+ // This member is required.
+ SourceRegion *string
+
+ // Unique, case-sensitive identifier you provide to ensure idempotency of the
+ // request. For more information, see Ensuring idempotency
+ // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html)
+ // in the Amazon EC2 API Reference.
+ ClientToken *string
+
+ // A description for the new AMI in the destination Region.
+ Description *string
+
+ // The Amazon Resource Name (ARN) of the Outpost to which to copy the AMI. Only
+ // specify this parameter when copying an AMI from an Amazon Web Services Region to
+ // an Outpost. The AMI must be in the Region of the destination Outpost. You cannot
+ // copy an AMI from an Outpost to a Region, from one Outpost to another, or within
+ // the same Outpost. For more information, see Copying AMIs from an Amazon Web
+ // Services Region to an Outpost
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/snapshots-outposts.html#copy-amis)
+ // in the Amazon Elastic Compute Cloud User Guide.
+ DestinationOutpostArn *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // Specifies whether the destination snapshots of the copied image should be
+ // encrypted. You can encrypt a copy of an unencrypted snapshot, but you cannot
+ // create an unencrypted copy of an encrypted snapshot. The default KMS key for
+ // Amazon EBS is used unless you specify a non-default Key Management Service (KMS)
+ // KMS key using KmsKeyId. For more information, see Amazon EBS Encryption
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html) in the
+ // Amazon Elastic Compute Cloud User Guide.
+ Encrypted *bool
+
+ // The identifier of the symmetric Key Management Service (KMS) KMS key to use when
+ // creating encrypted volumes. If this parameter is not specified, your Amazon Web
+ // Services managed KMS key for Amazon EBS is used. If you specify a KMS key, you
+ // must also set the encrypted state to true. You can specify a KMS key using any
+ // of the following:
+ //
+ // * Key ID. For example,
+ // 1234abcd-12ab-34cd-56ef-1234567890ab.
+ //
+ // * Key alias. For example,
+ // alias/ExampleAlias.
+ //
+ // * Key ARN. For example,
+ // arn:aws:kms:us-east-1:012345678910:key/1234abcd-12ab-34cd-56ef-1234567890ab.
+ //
+ // *
+ // Alias ARN. For example,
+ // arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias.
+ //
+ // Amazon Web Services
+ // authenticates the KMS key asynchronously. Therefore, if you specify an
+ // identifier that is not valid, the action can appear to complete, but eventually
+ // fails. The specified KMS key must exist in the destination Region. Amazon EBS
+ // does not support asymmetric KMS keys.
+ KmsKeyId *string
+
+ noSmithyDocumentSerde
+}
+
+// Contains the output of CopyImage.
+type CopyImageOutput struct {
+
+ // The ID of the new AMI.
+ ImageId *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCopyImageMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpCopyImage{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpCopyImage{}, 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 = addOpCopyImageValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCopyImage(options.Region), middleware.Before); 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_opCopyImage(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "CopyImage",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CopySnapshot.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CopySnapshot.go
new file mode 100644
index 00000000..a4648c5e
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CopySnapshot.go
@@ -0,0 +1,332 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ presignedurlcust "github.com/aws/aws-sdk-go-v2/service/internal/presigned-url"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Copies a point-in-time snapshot of an EBS volume and stores it in Amazon S3. You
+// can copy a snapshot within the same Region, from one Region to another, or from
+// a Region to an Outpost. You can't copy a snapshot from an Outpost to a Region,
+// from one Outpost to another, or within the same Outpost. You can use the
+// snapshot to create EBS volumes or Amazon Machine Images (AMIs). When copying
+// snapshots to a Region, copies of encrypted EBS snapshots remain encrypted.
+// Copies of unencrypted snapshots remain unencrypted, unless you enable encryption
+// for the snapshot copy operation. By default, encrypted snapshot copies use the
+// default Key Management Service (KMS) KMS key; however, you can specify a
+// different KMS key. To copy an encrypted snapshot that has been shared from
+// another account, you must have permissions for the KMS key used to encrypt the
+// snapshot. Snapshots copied to an Outpost are encrypted by default using the
+// default encryption key for the Region, or a different key that you specify in
+// the request using KmsKeyId. Outposts do not support unencrypted snapshots. For
+// more information, Amazon EBS local snapshots on Outposts
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/snapshots-outposts.html#ami)
+// in the Amazon Elastic Compute Cloud User Guide. Snapshots created by copying
+// another snapshot have an arbitrary volume ID that should not be used for any
+// purpose. For more information, see Copy an Amazon EBS snapshot
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-copy-snapshot.html) in
+// the Amazon Elastic Compute Cloud User Guide.
+func (c *Client) CopySnapshot(ctx context.Context, params *CopySnapshotInput, optFns ...func(*Options)) (*CopySnapshotOutput, error) {
+ if params == nil {
+ params = &CopySnapshotInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CopySnapshot", params, optFns, c.addOperationCopySnapshotMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CopySnapshotOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type CopySnapshotInput struct {
+
+ // The ID of the Region that contains the snapshot to be copied.
+ //
+ // This member is required.
+ SourceRegion *string
+
+ // The ID of the EBS snapshot to copy.
+ //
+ // This member is required.
+ SourceSnapshotId *string
+
+ // A description for the EBS snapshot.
+ Description *string
+
+ // The Amazon Resource Name (ARN) of the Outpost to which to copy the snapshot.
+ // Only specify this parameter when copying a snapshot from an Amazon Web Services
+ // Region to an Outpost. The snapshot must be in the Region for the destination
+ // Outpost. You cannot copy a snapshot from an Outpost to a Region, from one
+ // Outpost to another, or within the same Outpost. For more information, see Copy
+ // snapshots from an Amazon Web Services Region to an Outpost
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/snapshots-outposts.html#copy-snapshots)
+ // in the Amazon Elastic Compute Cloud User Guide.
+ DestinationOutpostArn *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // To encrypt a copy of an unencrypted snapshot if encryption by default is not
+ // enabled, enable encryption using this parameter. Otherwise, omit this parameter.
+ // Encrypted snapshots are encrypted, even if you omit this parameter and
+ // encryption by default is not enabled. You cannot set this parameter to false.
+ // For more information, see Amazon EBS encryption
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html) in the
+ // Amazon Elastic Compute Cloud User Guide.
+ Encrypted *bool
+
+ // The identifier of the Key Management Service (KMS) KMS key to use for Amazon EBS
+ // encryption. If this parameter is not specified, your KMS key for Amazon EBS is
+ // used. If KmsKeyId is specified, the encrypted state must be true. You can
+ // specify the KMS key using any of the following:
+ //
+ // * Key ID. For example,
+ // 1234abcd-12ab-34cd-56ef-1234567890ab.
+ //
+ // * Key alias. For example,
+ // alias/ExampleAlias.
+ //
+ // * Key ARN. For example,
+ // arn:aws:kms:us-east-1:012345678910:key/1234abcd-12ab-34cd-56ef-1234567890ab.
+ //
+ // *
+ // Alias ARN. For example,
+ // arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias.
+ //
+ // Amazon Web Services
+ // authenticates the KMS key asynchronously. Therefore, if you specify an ID,
+ // alias, or ARN that is not valid, the action can appear to complete, but
+ // eventually fails.
+ KmsKeyId *string
+
+ // When you copy an encrypted source snapshot using the Amazon EC2 Query API, you
+ // must supply a pre-signed URL. This parameter is optional for unencrypted
+ // snapshots. For more information, see Query requests
+ // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html).
+ // The PresignedUrl should use the snapshot source endpoint, the CopySnapshot
+ // action, and include the SourceRegion, SourceSnapshotId, and DestinationRegion
+ // parameters. The PresignedUrl must be signed using Amazon Web Services Signature
+ // Version 4. Because EBS snapshots are stored in Amazon S3, the signing algorithm
+ // for this parameter uses the same logic that is described in Authenticating
+ // Requests: Using Query Parameters (Amazon Web Services Signature Version 4)
+ // (https://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-query-string-auth.html)
+ // in the Amazon Simple Storage Service API Reference. An invalid or improperly
+ // signed PresignedUrl will cause the copy operation to fail asynchronously, and
+ // the snapshot will move to an error state.
+ PresignedUrl *string
+
+ // The tags to apply to the new snapshot.
+ TagSpecifications []types.TagSpecification
+
+ // Used by the SDK's PresignURL autofill customization to specify the region the of
+ // the client's request.
+ destinationRegion *string
+
+ noSmithyDocumentSerde
+}
+
+type CopySnapshotOutput struct {
+
+ // The ID of the new snapshot.
+ SnapshotId *string
+
+ // Any tags applied to the new snapshot.
+ Tags []types.Tag
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCopySnapshotMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpCopySnapshot{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpCopySnapshot{}, 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 = addCopySnapshotPresignURLMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpCopySnapshotValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCopySnapshot(options.Region), middleware.Before); 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 copyCopySnapshotInputForPresign(params interface{}) (interface{}, error) {
+ input, ok := params.(*CopySnapshotInput)
+ if !ok {
+ return nil, fmt.Errorf("expect *CopySnapshotInput type, got %T", params)
+ }
+ cpy := *input
+ return &cpy, nil
+}
+func getCopySnapshotPresignedUrl(params interface{}) (string, bool, error) {
+ input, ok := params.(*CopySnapshotInput)
+ if !ok {
+ return ``, false, fmt.Errorf("expect *CopySnapshotInput type, got %T", params)
+ }
+ if input.PresignedUrl == nil || len(*input.PresignedUrl) == 0 {
+ return ``, false, nil
+ }
+ return *input.PresignedUrl, true, nil
+}
+func getCopySnapshotSourceRegion(params interface{}) (string, bool, error) {
+ input, ok := params.(*CopySnapshotInput)
+ if !ok {
+ return ``, false, fmt.Errorf("expect *CopySnapshotInput type, got %T", params)
+ }
+ if input.SourceRegion == nil || len(*input.SourceRegion) == 0 {
+ return ``, false, nil
+ }
+ return *input.SourceRegion, true, nil
+}
+func setCopySnapshotPresignedUrl(params interface{}, value string) error {
+ input, ok := params.(*CopySnapshotInput)
+ if !ok {
+ return fmt.Errorf("expect *CopySnapshotInput type, got %T", params)
+ }
+ input.PresignedUrl = &value
+ return nil
+}
+func setCopySnapshotdestinationRegion(params interface{}, value string) error {
+ input, ok := params.(*CopySnapshotInput)
+ if !ok {
+ return fmt.Errorf("expect *CopySnapshotInput type, got %T", params)
+ }
+ input.destinationRegion = &value
+ return nil
+}
+func addCopySnapshotPresignURLMiddleware(stack *middleware.Stack, options Options) error {
+ return presignedurlcust.AddMiddleware(stack, presignedurlcust.Options{
+ Accessor: presignedurlcust.ParameterAccessor{
+ GetPresignedURL: getCopySnapshotPresignedUrl,
+
+ GetSourceRegion: getCopySnapshotSourceRegion,
+
+ CopyInput: copyCopySnapshotInputForPresign,
+
+ SetDestinationRegion: setCopySnapshotdestinationRegion,
+
+ SetPresignedURL: setCopySnapshotPresignedUrl,
+ },
+ Presigner: &presignAutoFillCopySnapshotClient{client: NewPresignClient(New(options))},
+ })
+}
+
+type presignAutoFillCopySnapshotClient struct {
+ client *PresignClient
+}
+
+// PresignURL is a middleware accessor that satisfies URLPresigner interface.
+func (c *presignAutoFillCopySnapshotClient) PresignURL(ctx context.Context, srcRegion string, params interface{}) (*v4.PresignedHTTPRequest, error) {
+ input, ok := params.(*CopySnapshotInput)
+ if !ok {
+ return nil, fmt.Errorf("expect *CopySnapshotInput type, got %T", params)
+ }
+ optFn := func(o *Options) {
+ o.Region = srcRegion
+ o.APIOptions = append(o.APIOptions, presignedurlcust.RemoveMiddleware)
+ }
+ presignOptFn := WithPresignClientFromClientOptions(optFn)
+ return c.client.PresignCopySnapshot(ctx, input, presignOptFn)
+}
+
+func newServiceMetadataMiddleware_opCopySnapshot(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "CopySnapshot",
+ }
+}
+
+// PresignCopySnapshot is used to generate a presigned HTTP Request which contains
+// presigned URL, signed headers and HTTP method used.
+func (c *PresignClient) PresignCopySnapshot(ctx context.Context, params *CopySnapshotInput, optFns ...func(*PresignOptions)) (*v4.PresignedHTTPRequest, error) {
+ if params == nil {
+ params = &CopySnapshotInput{}
+ }
+ options := c.options.copy()
+ for _, fn := range optFns {
+ fn(&options)
+ }
+ clientOptFns := append(options.ClientOptions, withNopHTTPClientAPIOption)
+
+ result, _, err := c.client.invokeOperation(ctx, "CopySnapshot", params, clientOptFns,
+ c.client.addOperationCopySnapshotMiddlewares,
+ presignConverter(options).convertToPresignMiddleware,
+ )
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*v4.PresignedHTTPRequest)
+ return out, nil
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateCapacityReservation.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateCapacityReservation.go
new file mode 100644
index 00000000..87d5b293
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateCapacityReservation.go
@@ -0,0 +1,241 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "time"
+)
+
+// Creates a new Capacity Reservation with the specified attributes. Capacity
+// Reservations enable you to reserve capacity for your Amazon EC2 instances in a
+// specific Availability Zone for any duration. This gives you the flexibility to
+// selectively add capacity reservations and still get the Regional RI discounts
+// for that usage. By creating Capacity Reservations, you ensure that you always
+// have access to Amazon EC2 capacity when you need it, for as long as you need it.
+// For more information, see Capacity Reservations
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-capacity-reservations.html)
+// in the Amazon EC2 User Guide. Your request to create a Capacity Reservation
+// could fail if Amazon EC2 does not have sufficient capacity to fulfill the
+// request. If your request fails due to Amazon EC2 capacity constraints, either
+// try again at a later time, try in a different Availability Zone, or request a
+// smaller capacity reservation. If your application is flexible across instance
+// types and sizes, try to create a Capacity Reservation with different instance
+// attributes. Your request could also fail if the requested quantity exceeds your
+// On-Demand Instance limit for the selected instance type. If your request fails
+// due to limit constraints, increase your On-Demand Instance limit for the
+// required instance type and try again. For more information about increasing your
+// instance limits, see Amazon EC2 Service Quotas
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-resource-limits.html)
+// in the Amazon EC2 User Guide.
+func (c *Client) CreateCapacityReservation(ctx context.Context, params *CreateCapacityReservationInput, optFns ...func(*Options)) (*CreateCapacityReservationOutput, error) {
+ if params == nil {
+ params = &CreateCapacityReservationInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CreateCapacityReservation", params, optFns, c.addOperationCreateCapacityReservationMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CreateCapacityReservationOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type CreateCapacityReservationInput struct {
+
+ // The number of instances for which to reserve capacity. Valid range: 1 - 1000
+ //
+ // This member is required.
+ InstanceCount *int32
+
+ // The type of operating system for which to reserve capacity.
+ //
+ // This member is required.
+ InstancePlatform types.CapacityReservationInstancePlatform
+
+ // The instance type for which to reserve capacity. For more information, see
+ // Instance types
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html) in the
+ // Amazon EC2 User Guide.
+ //
+ // This member is required.
+ InstanceType *string
+
+ // The Availability Zone in which to create the Capacity Reservation.
+ AvailabilityZone *string
+
+ // The ID of the Availability Zone in which to create the Capacity Reservation.
+ AvailabilityZoneId *string
+
+ // Unique, case-sensitive identifier that you provide to ensure the idempotency of
+ // the request. For more information, see Ensure Idempotency
+ // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html).
+ ClientToken *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // Indicates whether the Capacity Reservation supports EBS-optimized instances.
+ // This optimization provides dedicated throughput to Amazon EBS and an optimized
+ // configuration stack to provide optimal I/O performance. This optimization isn't
+ // available with all instance types. Additional usage charges apply when using an
+ // EBS- optimized instance.
+ EbsOptimized *bool
+
+ // The date and time at which the Capacity Reservation expires. When a Capacity
+ // Reservation expires, the reserved capacity is released and you can no longer
+ // launch instances into it. The Capacity Reservation's state changes to expired
+ // when it reaches its end date and time. You must provide an EndDate value if
+ // EndDateType is limited. Omit EndDate if EndDateType is unlimited. If the
+ // EndDateType is limited, the Capacity Reservation is cancelled within an hour
+ // from the specified time. For example, if you specify 5/31/2019, 13:30:55, the
+ // Capacity Reservation is guaranteed to end between 13:30:55 and 14:30:55 on
+ // 5/31/2019.
+ EndDate *time.Time
+
+ // Indicates the way in which the Capacity Reservation ends. A Capacity Reservation
+ // can have one of the following end types:
+ //
+ // * unlimited - The Capacity Reservation
+ // remains active until you explicitly cancel it. Do not provide an EndDate if the
+ // EndDateType is unlimited.
+ //
+ // * limited - The Capacity Reservation expires
+ // automatically at a specified date and time. You must provide an EndDate value if
+ // the EndDateType value is limited.
+ EndDateType types.EndDateType
+
+ // Indicates whether the Capacity Reservation supports instances with temporary,
+ // block-level storage.
+ EphemeralStorage *bool
+
+ // Indicates the type of instance launches that the Capacity Reservation accepts.
+ // The options include:
+ //
+ // * open - The Capacity Reservation automatically matches
+ // all instances that have matching attributes (instance type, platform, and
+ // Availability Zone). Instances that have matching attributes run in the Capacity
+ // Reservation automatically without specifying any additional parameters.
+ //
+ // *
+ // targeted - The Capacity Reservation only accepts instances that have matching
+ // attributes (instance type, platform, and Availability Zone), and explicitly
+ // target the Capacity Reservation. This ensures that only permitted instances can
+ // use the reserved capacity.
+ //
+ // Default: open
+ InstanceMatchCriteria types.InstanceMatchCriteria
+
+ // The Amazon Resource Name (ARN) of the Outpost on which to create the Capacity
+ // Reservation.
+ OutpostArn *string
+
+ // The tags to apply to the Capacity Reservation during launch.
+ TagSpecifications []types.TagSpecification
+
+ // Indicates the tenancy of the Capacity Reservation. A Capacity Reservation can
+ // have one of the following tenancy settings:
+ //
+ // * default - The Capacity
+ // Reservation is created on hardware that is shared with other Amazon Web Services
+ // accounts.
+ //
+ // * dedicated - The Capacity Reservation is created on single-tenant
+ // hardware that is dedicated to a single Amazon Web Services account.
+ Tenancy types.CapacityReservationTenancy
+
+ noSmithyDocumentSerde
+}
+
+type CreateCapacityReservationOutput struct {
+
+ // Information about the Capacity Reservation.
+ CapacityReservation *types.CapacityReservation
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCreateCapacityReservationMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpCreateCapacityReservation{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateCapacityReservation{}, 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 = addOpCreateCapacityReservationValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateCapacityReservation(options.Region), middleware.Before); 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_opCreateCapacityReservation(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "CreateCapacityReservation",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateCarrierGateway.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateCarrierGateway.go
new file mode 100644
index 00000000..d8e4045f
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateCarrierGateway.go
@@ -0,0 +1,175 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Creates a carrier gateway. For more information about carrier gateways, see
+// Carrier gateways
+// (https://docs.aws.amazon.com/wavelength/latest/developerguide/how-wavelengths-work.html#wavelength-carrier-gateway)
+// in the Amazon Web Services Wavelength Developer Guide.
+func (c *Client) CreateCarrierGateway(ctx context.Context, params *CreateCarrierGatewayInput, optFns ...func(*Options)) (*CreateCarrierGatewayOutput, error) {
+ if params == nil {
+ params = &CreateCarrierGatewayInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CreateCarrierGateway", params, optFns, c.addOperationCreateCarrierGatewayMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CreateCarrierGatewayOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type CreateCarrierGatewayInput struct {
+
+ // The ID of the VPC to associate with the carrier gateway.
+ //
+ // This member is required.
+ VpcId *string
+
+ // Unique, case-sensitive identifier that you provide to ensure the idempotency of
+ // the request. For more information, see How to ensure idempotency
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html).
+ ClientToken *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The tags to associate with the carrier gateway.
+ TagSpecifications []types.TagSpecification
+
+ noSmithyDocumentSerde
+}
+
+type CreateCarrierGatewayOutput struct {
+
+ // Information about the carrier gateway.
+ CarrierGateway *types.CarrierGateway
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCreateCarrierGatewayMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpCreateCarrierGateway{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateCarrierGateway{}, 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 = addIdempotencyToken_opCreateCarrierGatewayMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpCreateCarrierGatewayValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateCarrierGateway(options.Region), middleware.Before); 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
+}
+
+type idempotencyToken_initializeOpCreateCarrierGateway struct {
+ tokenProvider IdempotencyTokenProvider
+}
+
+func (*idempotencyToken_initializeOpCreateCarrierGateway) ID() string {
+ return "OperationIdempotencyTokenAutoFill"
+}
+
+func (m *idempotencyToken_initializeOpCreateCarrierGateway) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ if m.tokenProvider == nil {
+ return next.HandleInitialize(ctx, in)
+ }
+
+ input, ok := in.Parameters.(*CreateCarrierGatewayInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateCarrierGatewayInput ")
+ }
+
+ if input.ClientToken == nil {
+ t, err := m.tokenProvider.GetIdempotencyToken()
+ if err != nil {
+ return out, metadata, err
+ }
+ input.ClientToken = &t
+ }
+ return next.HandleInitialize(ctx, in)
+}
+func addIdempotencyToken_opCreateCarrierGatewayMiddleware(stack *middleware.Stack, cfg Options) error {
+ return stack.Initialize.Add(&idempotencyToken_initializeOpCreateCarrierGateway{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before)
+}
+
+func newServiceMetadataMiddleware_opCreateCarrierGateway(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "CreateCarrierGateway",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateClientVpnEndpoint.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateClientVpnEndpoint.go
new file mode 100644
index 00000000..6494cdc7
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateClientVpnEndpoint.go
@@ -0,0 +1,251 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Creates a Client VPN endpoint. A Client VPN endpoint is the resource you create
+// and configure to enable and manage client VPN sessions. It is the destination
+// endpoint at which all client VPN sessions are terminated.
+func (c *Client) CreateClientVpnEndpoint(ctx context.Context, params *CreateClientVpnEndpointInput, optFns ...func(*Options)) (*CreateClientVpnEndpointOutput, error) {
+ if params == nil {
+ params = &CreateClientVpnEndpointInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CreateClientVpnEndpoint", params, optFns, c.addOperationCreateClientVpnEndpointMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CreateClientVpnEndpointOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type CreateClientVpnEndpointInput struct {
+
+ // Information about the authentication method to be used to authenticate clients.
+ //
+ // This member is required.
+ AuthenticationOptions []types.ClientVpnAuthenticationRequest
+
+ // The IPv4 address range, in CIDR notation, from which to assign client IP
+ // addresses. The address range cannot overlap with the local CIDR of the VPC in
+ // which the associated subnet is located, or the routes that you add manually. The
+ // address range cannot be changed after the Client VPN endpoint has been created.
+ // The CIDR block should be /22 or greater.
+ //
+ // This member is required.
+ ClientCidrBlock *string
+
+ // Information about the client connection logging options. If you enable client
+ // connection logging, data about client connections is sent to a Cloudwatch Logs
+ // log stream. The following information is logged:
+ //
+ // * Client connection
+ // requests
+ //
+ // * Client connection results (successful and unsuccessful)
+ //
+ // * Reasons
+ // for unsuccessful client connection requests
+ //
+ // * Client connection termination
+ // time
+ //
+ // This member is required.
+ ConnectionLogOptions *types.ConnectionLogOptions
+
+ // The ARN of the server certificate. For more information, see the Certificate
+ // Manager User Guide (https://docs.aws.amazon.com/acm/latest/userguide/).
+ //
+ // This member is required.
+ ServerCertificateArn *string
+
+ // The options for managing connection authorization for new client connections.
+ ClientConnectOptions *types.ClientConnectOptions
+
+ // Unique, case-sensitive identifier that you provide to ensure the idempotency of
+ // the request. For more information, see How to ensure idempotency
+ // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html).
+ ClientToken *string
+
+ // A brief description of the Client VPN endpoint.
+ Description *string
+
+ // Information about the DNS servers to be used for DNS resolution. A Client VPN
+ // endpoint can have up to two DNS servers. If no DNS server is specified, the DNS
+ // address configured on the device is used for the DNS server.
+ DnsServers []string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The IDs of one or more security groups to apply to the target network. You must
+ // also specify the ID of the VPC that contains the security groups.
+ SecurityGroupIds []string
+
+ // Specify whether to enable the self-service portal for the Client VPN endpoint.
+ // Default Value: enabled
+ SelfServicePortal types.SelfServicePortal
+
+ // Indicates whether split-tunnel is enabled on the Client VPN endpoint. By
+ // default, split-tunnel on a VPN endpoint is disabled. For information about
+ // split-tunnel VPN endpoints, see Split-tunnel Client VPN endpoint
+ // (https://docs.aws.amazon.com/vpn/latest/clientvpn-admin/split-tunnel-vpn.html)
+ // in the Client VPN Administrator Guide.
+ SplitTunnel *bool
+
+ // The tags to apply to the Client VPN endpoint during creation.
+ TagSpecifications []types.TagSpecification
+
+ // The transport protocol to be used by the VPN session. Default value: udp
+ TransportProtocol types.TransportProtocol
+
+ // The ID of the VPC to associate with the Client VPN endpoint. If no security
+ // group IDs are specified in the request, the default security group for the VPC
+ // is applied.
+ VpcId *string
+
+ // The port number to assign to the Client VPN endpoint for TCP and UDP traffic.
+ // Valid Values: 443 | 1194 Default Value: 443
+ VpnPort *int32
+
+ noSmithyDocumentSerde
+}
+
+type CreateClientVpnEndpointOutput struct {
+
+ // The ID of the Client VPN endpoint.
+ ClientVpnEndpointId *string
+
+ // The DNS name to be used by clients when establishing their VPN session.
+ DnsName *string
+
+ // The current state of the Client VPN endpoint.
+ Status *types.ClientVpnEndpointStatus
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCreateClientVpnEndpointMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpCreateClientVpnEndpoint{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateClientVpnEndpoint{}, 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 = addIdempotencyToken_opCreateClientVpnEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpCreateClientVpnEndpointValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateClientVpnEndpoint(options.Region), middleware.Before); 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
+}
+
+type idempotencyToken_initializeOpCreateClientVpnEndpoint struct {
+ tokenProvider IdempotencyTokenProvider
+}
+
+func (*idempotencyToken_initializeOpCreateClientVpnEndpoint) ID() string {
+ return "OperationIdempotencyTokenAutoFill"
+}
+
+func (m *idempotencyToken_initializeOpCreateClientVpnEndpoint) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ if m.tokenProvider == nil {
+ return next.HandleInitialize(ctx, in)
+ }
+
+ input, ok := in.Parameters.(*CreateClientVpnEndpointInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateClientVpnEndpointInput ")
+ }
+
+ if input.ClientToken == nil {
+ t, err := m.tokenProvider.GetIdempotencyToken()
+ if err != nil {
+ return out, metadata, err
+ }
+ input.ClientToken = &t
+ }
+ return next.HandleInitialize(ctx, in)
+}
+func addIdempotencyToken_opCreateClientVpnEndpointMiddleware(stack *middleware.Stack, cfg Options) error {
+ return stack.Initialize.Add(&idempotencyToken_initializeOpCreateClientVpnEndpoint{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before)
+}
+
+func newServiceMetadataMiddleware_opCreateClientVpnEndpoint(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "CreateClientVpnEndpoint",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateClientVpnRoute.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateClientVpnRoute.go
new file mode 100644
index 00000000..f933eeea
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateClientVpnRoute.go
@@ -0,0 +1,200 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Adds a route to a network to a Client VPN endpoint. Each Client VPN endpoint has
+// a route table that describes the available destination network routes. Each
+// route in the route table specifies the path for traffic to specific resources or
+// networks.
+func (c *Client) CreateClientVpnRoute(ctx context.Context, params *CreateClientVpnRouteInput, optFns ...func(*Options)) (*CreateClientVpnRouteOutput, error) {
+ if params == nil {
+ params = &CreateClientVpnRouteInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CreateClientVpnRoute", params, optFns, c.addOperationCreateClientVpnRouteMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CreateClientVpnRouteOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type CreateClientVpnRouteInput struct {
+
+ // The ID of the Client VPN endpoint to which to add the route.
+ //
+ // This member is required.
+ ClientVpnEndpointId *string
+
+ // The IPv4 address range, in CIDR notation, of the route destination. For
+ // example:
+ //
+ // * To add a route for Internet access, enter 0.0.0.0/0
+ //
+ // * To add a
+ // route for a peered VPC, enter the peered VPC's IPv4 CIDR range
+ //
+ // * To add a route
+ // for an on-premises network, enter the Amazon Web Services Site-to-Site VPN
+ // connection's IPv4 CIDR range
+ //
+ // * To add a route for the local network, enter the
+ // client CIDR range
+ //
+ // This member is required.
+ DestinationCidrBlock *string
+
+ // The ID of the subnet through which you want to route traffic. The specified
+ // subnet must be an existing target network of the Client VPN endpoint.
+ // Alternatively, if you're adding a route for the local network, specify local.
+ //
+ // This member is required.
+ TargetVpcSubnetId *string
+
+ // Unique, case-sensitive identifier that you provide to ensure the idempotency of
+ // the request. For more information, see How to ensure idempotency
+ // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html).
+ ClientToken *string
+
+ // A brief description of the route.
+ Description *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type CreateClientVpnRouteOutput struct {
+
+ // The current state of the route.
+ Status *types.ClientVpnRouteStatus
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCreateClientVpnRouteMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpCreateClientVpnRoute{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateClientVpnRoute{}, 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 = addIdempotencyToken_opCreateClientVpnRouteMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpCreateClientVpnRouteValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateClientVpnRoute(options.Region), middleware.Before); 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
+}
+
+type idempotencyToken_initializeOpCreateClientVpnRoute struct {
+ tokenProvider IdempotencyTokenProvider
+}
+
+func (*idempotencyToken_initializeOpCreateClientVpnRoute) ID() string {
+ return "OperationIdempotencyTokenAutoFill"
+}
+
+func (m *idempotencyToken_initializeOpCreateClientVpnRoute) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ if m.tokenProvider == nil {
+ return next.HandleInitialize(ctx, in)
+ }
+
+ input, ok := in.Parameters.(*CreateClientVpnRouteInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateClientVpnRouteInput ")
+ }
+
+ if input.ClientToken == nil {
+ t, err := m.tokenProvider.GetIdempotencyToken()
+ if err != nil {
+ return out, metadata, err
+ }
+ input.ClientToken = &t
+ }
+ return next.HandleInitialize(ctx, in)
+}
+func addIdempotencyToken_opCreateClientVpnRouteMiddleware(stack *middleware.Stack, cfg Options) error {
+ return stack.Initialize.Add(&idempotencyToken_initializeOpCreateClientVpnRoute{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before)
+}
+
+func newServiceMetadataMiddleware_opCreateClientVpnRoute(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "CreateClientVpnRoute",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateCustomerGateway.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateCustomerGateway.go
new file mode 100644
index 00000000..fa162da0
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateCustomerGateway.go
@@ -0,0 +1,176 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Provides information to Amazon Web Services about your VPN customer gateway
+// device. The customer gateway is the appliance at your end of the VPN connection.
+// (The device on the Amazon Web Services side of the VPN connection is the virtual
+// private gateway.) You must provide the internet-routable IP address of the
+// customer gateway's external interface. The IP address must be static and can be
+// behind a device performing network address translation (NAT). For devices that
+// use Border Gateway Protocol (BGP), you can also provide the device's BGP
+// Autonomous System Number (ASN). You can use an existing ASN assigned to your
+// network. If you don't have an ASN already, you can use a private ASN (in the
+// 64512 - 65534 range). Amazon EC2 supports all 4-byte ASN numbers in the range of
+// 1 - 2147483647, with the exception of the following:
+//
+// * 7224 - reserved in the
+// us-east-1 Region
+//
+// * 9059 - reserved in the eu-west-1 Region
+//
+// * 17943 - reserved
+// in the ap-southeast-1 Region
+//
+// * 10124 - reserved in the ap-northeast-1
+// Region
+//
+// For more information, see Amazon Web Services Site-to-Site VPN
+// (https://docs.aws.amazon.com/vpn/latest/s2svpn/VPC_VPN.html) in the Amazon Web
+// Services Site-to-Site VPN User Guide. To create more than one customer gateway
+// with the same VPN type, IP address, and BGP ASN, specify a unique device name
+// for each customer gateway. Identical requests return information about the
+// existing customer gateway and do not create new customer gateways.
+func (c *Client) CreateCustomerGateway(ctx context.Context, params *CreateCustomerGatewayInput, optFns ...func(*Options)) (*CreateCustomerGatewayOutput, error) {
+ if params == nil {
+ params = &CreateCustomerGatewayInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CreateCustomerGateway", params, optFns, c.addOperationCreateCustomerGatewayMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CreateCustomerGatewayOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+// Contains the parameters for CreateCustomerGateway.
+type CreateCustomerGatewayInput struct {
+
+ // For devices that support BGP, the customer gateway's BGP ASN. Default: 65000
+ //
+ // This member is required.
+ BgpAsn *int32
+
+ // The type of VPN connection that this customer gateway supports (ipsec.1).
+ //
+ // This member is required.
+ Type types.GatewayType
+
+ // The Amazon Resource Name (ARN) for the customer gateway certificate.
+ CertificateArn *string
+
+ // A name for the customer gateway device. Length Constraints: Up to 255
+ // characters.
+ DeviceName *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The Internet-routable IP address for the customer gateway's outside interface.
+ // The address must be static.
+ PublicIp *string
+
+ // The tags to apply to the customer gateway.
+ TagSpecifications []types.TagSpecification
+
+ noSmithyDocumentSerde
+}
+
+// Contains the output of CreateCustomerGateway.
+type CreateCustomerGatewayOutput struct {
+
+ // Information about the customer gateway.
+ CustomerGateway *types.CustomerGateway
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCreateCustomerGatewayMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpCreateCustomerGateway{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateCustomerGateway{}, 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 = addOpCreateCustomerGatewayValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateCustomerGateway(options.Region), middleware.Before); 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_opCreateCustomerGateway(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "CreateCustomerGateway",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateDefaultSubnet.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateDefaultSubnet.go
new file mode 100644
index 00000000..86b347a1
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateDefaultSubnet.go
@@ -0,0 +1,131 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Creates a default subnet with a size /20 IPv4 CIDR block in the specified
+// Availability Zone in your default VPC. You can have only one default subnet per
+// Availability Zone. For more information, see Creating a default subnet
+// (https://docs.aws.amazon.com/vpc/latest/userguide/default-vpc.html#create-default-subnet)
+// in the Amazon Virtual Private Cloud User Guide.
+func (c *Client) CreateDefaultSubnet(ctx context.Context, params *CreateDefaultSubnetInput, optFns ...func(*Options)) (*CreateDefaultSubnetOutput, error) {
+ if params == nil {
+ params = &CreateDefaultSubnetInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CreateDefaultSubnet", params, optFns, c.addOperationCreateDefaultSubnetMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CreateDefaultSubnetOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type CreateDefaultSubnetInput struct {
+
+ // The Availability Zone in which to create the default subnet.
+ //
+ // This member is required.
+ AvailabilityZone *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type CreateDefaultSubnetOutput struct {
+
+ // Information about the subnet.
+ Subnet *types.Subnet
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCreateDefaultSubnetMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpCreateDefaultSubnet{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateDefaultSubnet{}, 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 = addOpCreateDefaultSubnetValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateDefaultSubnet(options.Region), middleware.Before); 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_opCreateDefaultSubnet(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "CreateDefaultSubnet",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateDefaultVpc.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateDefaultVpc.go
new file mode 100644
index 00000000..f73b31d1
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateDefaultVpc.go
@@ -0,0 +1,130 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Creates a default VPC with a size /16 IPv4 CIDR block and a default subnet in
+// each Availability Zone. For more information about the components of a default
+// VPC, see Default VPC and default subnets
+// (https://docs.aws.amazon.com/vpc/latest/userguide/default-vpc.html) in the
+// Amazon Virtual Private Cloud User Guide. You cannot specify the components of
+// the default VPC yourself. If you deleted your previous default VPC, you can
+// create a default VPC. You cannot have more than one default VPC per Region. If
+// your account supports EC2-Classic, you cannot use this action to create a
+// default VPC in a Region that supports EC2-Classic. If you want a default VPC in
+// a Region that supports EC2-Classic, see "I really want a default VPC for my
+// existing EC2 account. Is that possible?" in the Default VPCs FAQ
+// (http://aws.amazon.com/vpc/faqs/#Default_VPCs).
+func (c *Client) CreateDefaultVpc(ctx context.Context, params *CreateDefaultVpcInput, optFns ...func(*Options)) (*CreateDefaultVpcOutput, error) {
+ if params == nil {
+ params = &CreateDefaultVpcInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CreateDefaultVpc", params, optFns, c.addOperationCreateDefaultVpcMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CreateDefaultVpcOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type CreateDefaultVpcInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type CreateDefaultVpcOutput struct {
+
+ // Information about the VPC.
+ Vpc *types.Vpc
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCreateDefaultVpcMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpCreateDefaultVpc{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateDefaultVpc{}, 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_opCreateDefaultVpc(options.Region), middleware.Before); 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_opCreateDefaultVpc(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "CreateDefaultVpc",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateDhcpOptions.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateDhcpOptions.go
new file mode 100644
index 00000000..d9bfb9bb
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateDhcpOptions.go
@@ -0,0 +1,173 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Creates a set of DHCP options for your VPC. After creating the set, you must
+// associate it with the VPC, causing all existing and new instances that you
+// launch in the VPC to use this set of DHCP options. The following are the
+// individual DHCP options you can specify. For more information about the options,
+// see RFC 2132 (http://www.ietf.org/rfc/rfc2132.txt).
+//
+// * domain-name-servers - The
+// IP addresses of up to four domain name servers, or AmazonProvidedDNS. The
+// default DHCP option set specifies AmazonProvidedDNS. If specifying more than one
+// domain name server, specify the IP addresses in a single parameter, separated by
+// commas. To have your instance receive a custom DNS hostname as specified in
+// domain-name, you must set domain-name-servers to a custom DNS server.
+//
+// *
+// domain-name - If you're using AmazonProvidedDNS in us-east-1, specify
+// ec2.internal. If you're using AmazonProvidedDNS in another Region, specify
+// region.compute.internal (for example, ap-northeast-1.compute.internal).
+// Otherwise, specify a domain name (for example, ExampleCompany.com). This value
+// is used to complete unqualified DNS hostnames. Important: Some Linux operating
+// systems accept multiple domain names separated by spaces. However, Windows and
+// other Linux operating systems treat the value as a single domain, which results
+// in unexpected behavior. If your DHCP options set is associated with a VPC that
+// has instances with multiple operating systems, specify only one domain name.
+//
+// *
+// ntp-servers - The IP addresses of up to four Network Time Protocol (NTP)
+// servers.
+//
+// * netbios-name-servers - The IP addresses of up to four NetBIOS name
+// servers.
+//
+// * netbios-node-type - The NetBIOS node type (1, 2, 4, or 8). We
+// recommend that you specify 2 (broadcast and multicast are not currently
+// supported). For more information about these node types, see RFC 2132
+// (http://www.ietf.org/rfc/rfc2132.txt).
+//
+// Your VPC automatically starts out with a
+// set of DHCP options that includes only a DNS server that we provide
+// (AmazonProvidedDNS). If you create a set of options, and if your VPC has an
+// internet gateway, make sure to set the domain-name-servers option either to
+// AmazonProvidedDNS or to a domain name server of your choice. For more
+// information, see DHCP options sets
+// (https://docs.aws.amazon.com/vpc/latest/userguide/VPC_DHCP_Options.html) in the
+// Amazon Virtual Private Cloud User Guide.
+func (c *Client) CreateDhcpOptions(ctx context.Context, params *CreateDhcpOptionsInput, optFns ...func(*Options)) (*CreateDhcpOptionsOutput, error) {
+ if params == nil {
+ params = &CreateDhcpOptionsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CreateDhcpOptions", params, optFns, c.addOperationCreateDhcpOptionsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CreateDhcpOptionsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type CreateDhcpOptionsInput struct {
+
+ // A DHCP configuration option.
+ //
+ // This member is required.
+ DhcpConfigurations []types.NewDhcpConfiguration
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The tags to assign to the DHCP option.
+ TagSpecifications []types.TagSpecification
+
+ noSmithyDocumentSerde
+}
+
+type CreateDhcpOptionsOutput struct {
+
+ // A set of DHCP options.
+ DhcpOptions *types.DhcpOptions
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCreateDhcpOptionsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpCreateDhcpOptions{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateDhcpOptions{}, 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 = addOpCreateDhcpOptionsValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateDhcpOptions(options.Region), middleware.Before); 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_opCreateDhcpOptions(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "CreateDhcpOptions",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateEgressOnlyInternetGateway.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateEgressOnlyInternetGateway.go
new file mode 100644
index 00000000..9c494b72
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateEgressOnlyInternetGateway.go
@@ -0,0 +1,142 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// [IPv6 only] Creates an egress-only internet gateway for your VPC. An egress-only
+// internet gateway is used to enable outbound communication over IPv6 from
+// instances in your VPC to the internet, and prevents hosts outside of your VPC
+// from initiating an IPv6 connection with your instance.
+func (c *Client) CreateEgressOnlyInternetGateway(ctx context.Context, params *CreateEgressOnlyInternetGatewayInput, optFns ...func(*Options)) (*CreateEgressOnlyInternetGatewayOutput, error) {
+ if params == nil {
+ params = &CreateEgressOnlyInternetGatewayInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CreateEgressOnlyInternetGateway", params, optFns, c.addOperationCreateEgressOnlyInternetGatewayMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CreateEgressOnlyInternetGatewayOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type CreateEgressOnlyInternetGatewayInput struct {
+
+ // The ID of the VPC for which to create the egress-only internet gateway.
+ //
+ // This member is required.
+ VpcId *string
+
+ // Unique, case-sensitive identifier that you provide to ensure the idempotency of
+ // the request. For more information, see How to ensure idempotency
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html).
+ ClientToken *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The tags to assign to the egress-only internet gateway.
+ TagSpecifications []types.TagSpecification
+
+ noSmithyDocumentSerde
+}
+
+type CreateEgressOnlyInternetGatewayOutput struct {
+
+ // Unique, case-sensitive identifier that you provide to ensure the idempotency of
+ // the request.
+ ClientToken *string
+
+ // Information about the egress-only internet gateway.
+ EgressOnlyInternetGateway *types.EgressOnlyInternetGateway
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCreateEgressOnlyInternetGatewayMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpCreateEgressOnlyInternetGateway{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateEgressOnlyInternetGateway{}, 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 = addOpCreateEgressOnlyInternetGatewayValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateEgressOnlyInternetGateway(options.Region), middleware.Before); 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_opCreateEgressOnlyInternetGateway(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "CreateEgressOnlyInternetGateway",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateFleet.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateFleet.go
new file mode 100644
index 00000000..74310d79
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateFleet.go
@@ -0,0 +1,217 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "time"
+)
+
+// Launches an EC2 Fleet. You can create a single EC2 Fleet that includes multiple
+// launch specifications that vary by instance type, AMI, Availability Zone, or
+// subnet. For more information, see Launching an EC2 Fleet
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet.html) in the
+// Amazon EC2 User Guide.
+func (c *Client) CreateFleet(ctx context.Context, params *CreateFleetInput, optFns ...func(*Options)) (*CreateFleetOutput, error) {
+ if params == nil {
+ params = &CreateFleetInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CreateFleet", params, optFns, c.addOperationCreateFleetMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CreateFleetOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type CreateFleetInput struct {
+
+ // The configuration for the EC2 Fleet.
+ //
+ // This member is required.
+ LaunchTemplateConfigs []types.FleetLaunchTemplateConfigRequest
+
+ // The number of units to request.
+ //
+ // This member is required.
+ TargetCapacitySpecification *types.TargetCapacitySpecificationRequest
+
+ // Unique, case-sensitive identifier that you provide to ensure the idempotency of
+ // the request. For more information, see Ensuring Idempotency
+ // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html).
+ ClientToken *string
+
+ // Reserved.
+ Context *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // Indicates whether running instances should be terminated if the total target
+ // capacity of the EC2 Fleet is decreased below the current size of the EC2 Fleet.
+ ExcessCapacityTerminationPolicy types.FleetExcessCapacityTerminationPolicy
+
+ // Describes the configuration of On-Demand Instances in an EC2 Fleet.
+ OnDemandOptions *types.OnDemandOptionsRequest
+
+ // Indicates whether EC2 Fleet should replace unhealthy Spot Instances. Supported
+ // only for fleets of type maintain. For more information, see EC2 Fleet health
+ // checks
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/manage-ec2-fleet.html#ec2-fleet-health-checks)
+ // in the Amazon EC2 User Guide.
+ ReplaceUnhealthyInstances *bool
+
+ // Describes the configuration of Spot Instances in an EC2 Fleet.
+ SpotOptions *types.SpotOptionsRequest
+
+ // The key-value pair for tagging the EC2 Fleet request on creation. For more
+ // information, see Tagging your resources
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html#tag-resources).
+ // If the fleet type is instant, specify a resource type of fleet to tag the fleet
+ // or instance to tag the instances at launch. If the fleet type is maintain or
+ // request, specify a resource type of fleet to tag the fleet. You cannot specify a
+ // resource type of instance. To tag instances at launch, specify the tags in a
+ // launch template
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html#create-launch-template).
+ TagSpecifications []types.TagSpecification
+
+ // Indicates whether running instances should be terminated when the EC2 Fleet
+ // expires.
+ TerminateInstancesWithExpiration *bool
+
+ // The fleet type. The default value is maintain.
+ //
+ // * maintain - The EC2 Fleet
+ // places an asynchronous request for your desired capacity, and continues to
+ // maintain your desired Spot capacity by replenishing interrupted Spot
+ // Instances.
+ //
+ // * request - The EC2 Fleet places an asynchronous one-time request
+ // for your desired capacity, but does submit Spot requests in alternative capacity
+ // pools if Spot capacity is unavailable, and does not maintain Spot capacity if
+ // Spot Instances are interrupted.
+ //
+ // * instant - The EC2 Fleet places a synchronous
+ // one-time request for your desired capacity, and returns errors for any instances
+ // that could not be launched.
+ //
+ // For more information, see EC2 Fleet request types
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet-configuration-strategies.html#ec2-fleet-request-type)
+ // in the Amazon EC2 User Guide.
+ Type types.FleetType
+
+ // The start date and time of the request, in UTC format (for example,
+ // YYYY-MM-DDTHH:MM:SSZ). The default is to start fulfilling the request
+ // immediately.
+ ValidFrom *time.Time
+
+ // The end date and time of the request, in UTC format (for example,
+ // YYYY-MM-DDTHH:MM:SSZ). At this point, no new EC2 Fleet requests are placed or
+ // able to fulfill the request. If no value is specified, the request remains until
+ // you cancel it.
+ ValidUntil *time.Time
+
+ noSmithyDocumentSerde
+}
+
+type CreateFleetOutput struct {
+
+ // Information about the instances that could not be launched by the fleet.
+ // Supported only for fleets of type instant.
+ Errors []types.CreateFleetError
+
+ // The ID of the EC2 Fleet.
+ FleetId *string
+
+ // Information about the instances that were launched by the fleet. Supported only
+ // for fleets of type instant.
+ Instances []types.CreateFleetInstance
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCreateFleetMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpCreateFleet{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateFleet{}, 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 = addOpCreateFleetValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateFleet(options.Region), middleware.Before); 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_opCreateFleet(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "CreateFleet",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateFlowLogs.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateFlowLogs.go
new file mode 100644
index 00000000..b564c2eb
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateFlowLogs.go
@@ -0,0 +1,219 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Creates one or more flow logs to capture information about IP traffic for a
+// specific network interface, subnet, or VPC. Flow log data for a monitored
+// network interface is recorded as flow log records, which are log events
+// consisting of fields that describe the traffic flow. For more information, see
+// Flow log records
+// (https://docs.aws.amazon.com/vpc/latest/userguide/flow-logs.html#flow-log-records)
+// in the Amazon Virtual Private Cloud User Guide. When publishing to CloudWatch
+// Logs, flow log records are published to a log group, and each network interface
+// has a unique log stream in the log group. When publishing to Amazon S3, flow log
+// records for all of the monitored network interfaces are published to a single
+// log file object that is stored in the specified bucket. For more information,
+// see VPC Flow Logs
+// (https://docs.aws.amazon.com/vpc/latest/userguide/flow-logs.html) in the Amazon
+// Virtual Private Cloud User Guide.
+func (c *Client) CreateFlowLogs(ctx context.Context, params *CreateFlowLogsInput, optFns ...func(*Options)) (*CreateFlowLogsOutput, error) {
+ if params == nil {
+ params = &CreateFlowLogsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CreateFlowLogs", params, optFns, c.addOperationCreateFlowLogsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CreateFlowLogsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type CreateFlowLogsInput struct {
+
+ // The ID of the subnet, network interface, or VPC for which you want to create a
+ // flow log. Constraints: Maximum of 1000 resources
+ //
+ // This member is required.
+ ResourceIds []string
+
+ // The type of resource for which to create the flow log. For example, if you
+ // specified a VPC ID for the ResourceId property, specify VPC for this property.
+ //
+ // This member is required.
+ ResourceType types.FlowLogsResourceType
+
+ // The type of traffic to log. You can log traffic that the resource accepts or
+ // rejects, or all traffic.
+ //
+ // This member is required.
+ TrafficType types.TrafficType
+
+ // Unique, case-sensitive identifier that you provide to ensure the idempotency of
+ // the request. For more information, see How to ensure idempotency
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html).
+ ClientToken *string
+
+ // The ARN for the IAM role that permits Amazon EC2 to publish flow logs to a
+ // CloudWatch Logs log group in your account. If you specify LogDestinationType as
+ // s3, do not specify DeliverLogsPermissionArn or LogGroupName.
+ DeliverLogsPermissionArn *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // Specifies the destination to which the flow log data is to be published. Flow
+ // log data can be published to a CloudWatch Logs log group or an Amazon S3 bucket.
+ // The value specified for this parameter depends on the value specified for
+ // LogDestinationType. If LogDestinationType is not specified or cloud-watch-logs,
+ // specify the Amazon Resource Name (ARN) of the CloudWatch Logs log group. For
+ // example, to publish to a log group called my-logs, specify
+ // arn:aws:logs:us-east-1:123456789012:log-group:my-logs. Alternatively, use
+ // LogGroupName instead. If LogDestinationType is s3, specify the ARN of the Amazon
+ // S3 bucket. You can also specify a subfolder in the bucket. To specify a
+ // subfolder in the bucket, use the following ARN format:
+ // bucket_ARN/subfolder_name/. For example, to specify a subfolder named my-logs in
+ // a bucket named my-bucket, use the following ARN:
+ // arn:aws:s3:::my-bucket/my-logs/. You cannot use AWSLogs as a subfolder name.
+ // This is a reserved term.
+ LogDestination *string
+
+ // Specifies the type of destination to which the flow log data is to be published.
+ // Flow log data can be published to CloudWatch Logs or Amazon S3. To publish flow
+ // log data to CloudWatch Logs, specify cloud-watch-logs. To publish flow log data
+ // to Amazon S3, specify s3. If you specify LogDestinationType as s3, do not
+ // specify DeliverLogsPermissionArn or LogGroupName. Default: cloud-watch-logs
+ LogDestinationType types.LogDestinationType
+
+ // The fields to include in the flow log record, in the order in which they should
+ // appear. For a list of available fields, see Flow log records
+ // (https://docs.aws.amazon.com/vpc/latest/userguide/flow-logs.html#flow-log-records).
+ // If you omit this parameter, the flow log is created using the default format. If
+ // you specify this parameter, you must specify at least one field. Specify the
+ // fields using the ${field-id} format, separated by spaces. For the CLI, use
+ // single quotation marks (' ') to surround the parameter value.
+ LogFormat *string
+
+ // The name of a new or existing CloudWatch Logs log group where Amazon EC2
+ // publishes your flow logs. If you specify LogDestinationType as s3, do not
+ // specify DeliverLogsPermissionArn or LogGroupName.
+ LogGroupName *string
+
+ // The maximum interval of time during which a flow of packets is captured and
+ // aggregated into a flow log record. You can specify 60 seconds (1 minute) or 600
+ // seconds (10 minutes). When a network interface is attached to a Nitro-based
+ // instance
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#ec2-nitro-instances),
+ // the aggregation interval is always 60 seconds or less, regardless of the value
+ // that you specify. Default: 600
+ MaxAggregationInterval *int32
+
+ // The tags to apply to the flow logs.
+ TagSpecifications []types.TagSpecification
+
+ noSmithyDocumentSerde
+}
+
+type CreateFlowLogsOutput struct {
+
+ // Unique, case-sensitive identifier that you provide to ensure the idempotency of
+ // the request.
+ ClientToken *string
+
+ // The IDs of the flow logs.
+ FlowLogIds []string
+
+ // Information about the flow logs that could not be created successfully.
+ Unsuccessful []types.UnsuccessfulItem
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCreateFlowLogsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpCreateFlowLogs{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateFlowLogs{}, 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 = addOpCreateFlowLogsValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateFlowLogs(options.Region), middleware.Before); 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_opCreateFlowLogs(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "CreateFlowLogs",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateFpgaImage.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateFpgaImage.go
new file mode 100644
index 00000000..df43bc59
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateFpgaImage.go
@@ -0,0 +1,153 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Creates an Amazon FPGA Image (AFI) from the specified design checkpoint (DCP).
+// The create operation is asynchronous. To verify that the AFI is ready for use,
+// check the output logs. An AFI contains the FPGA bitstream that is ready to
+// download to an FPGA. You can securely deploy an AFI on multiple FPGA-accelerated
+// instances. For more information, see the AWS FPGA Hardware Development Kit
+// (https://github.com/aws/aws-fpga/).
+func (c *Client) CreateFpgaImage(ctx context.Context, params *CreateFpgaImageInput, optFns ...func(*Options)) (*CreateFpgaImageOutput, error) {
+ if params == nil {
+ params = &CreateFpgaImageInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CreateFpgaImage", params, optFns, c.addOperationCreateFpgaImageMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CreateFpgaImageOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type CreateFpgaImageInput struct {
+
+ // The location of the encrypted design checkpoint in Amazon S3. The input must be
+ // a tarball.
+ //
+ // This member is required.
+ InputStorageLocation *types.StorageLocation
+
+ // Unique, case-sensitive identifier that you provide to ensure the idempotency of
+ // the request. For more information, see Ensuring Idempotency
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html).
+ ClientToken *string
+
+ // A description for the AFI.
+ Description *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The location in Amazon S3 for the output logs.
+ LogsStorageLocation *types.StorageLocation
+
+ // A name for the AFI.
+ Name *string
+
+ // The tags to apply to the FPGA image during creation.
+ TagSpecifications []types.TagSpecification
+
+ noSmithyDocumentSerde
+}
+
+type CreateFpgaImageOutput struct {
+
+ // The global FPGA image identifier (AGFI ID).
+ FpgaImageGlobalId *string
+
+ // The FPGA image identifier (AFI ID).
+ FpgaImageId *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCreateFpgaImageMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpCreateFpgaImage{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateFpgaImage{}, 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 = addOpCreateFpgaImageValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateFpgaImage(options.Region), middleware.Before); 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_opCreateFpgaImage(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "CreateFpgaImage",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateImage.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateImage.go
new file mode 100644
index 00000000..88983acd
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateImage.go
@@ -0,0 +1,174 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Creates an Amazon EBS-backed AMI from an Amazon EBS-backed instance that is
+// either running or stopped. If you customized your instance with instance store
+// volumes or Amazon EBS volumes in addition to the root device volume, the new AMI
+// contains block device mapping information for those volumes. When you launch an
+// instance from this new AMI, the instance automatically launches with those
+// additional volumes. For more information, see Creating Amazon EBS-Backed Linux
+// AMIs
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/creating-an-ami-ebs.html)
+// in the Amazon Elastic Compute Cloud User Guide.
+func (c *Client) CreateImage(ctx context.Context, params *CreateImageInput, optFns ...func(*Options)) (*CreateImageOutput, error) {
+ if params == nil {
+ params = &CreateImageInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CreateImage", params, optFns, c.addOperationCreateImageMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CreateImageOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type CreateImageInput struct {
+
+ // The ID of the instance.
+ //
+ // This member is required.
+ InstanceId *string
+
+ // A name for the new image. Constraints: 3-128 alphanumeric characters,
+ // parentheses (()), square brackets ([]), spaces ( ), periods (.), slashes (/),
+ // dashes (-), single quotes ('), at-signs (@), or underscores(_)
+ //
+ // This member is required.
+ Name *string
+
+ // The block device mappings. This parameter cannot be used to modify the
+ // encryption status of existing volumes or snapshots. To create an AMI with
+ // encrypted snapshots, use the CopyImage action.
+ BlockDeviceMappings []types.BlockDeviceMapping
+
+ // A description for the new image.
+ Description *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // By default, Amazon EC2 attempts to shut down and reboot the instance before
+ // creating the image. If the No Reboot option is set, Amazon EC2 doesn't shut down
+ // the instance before creating the image. Without a reboot, the AMI will be crash
+ // consistent (all the volumes are snapshotted at the same time), but not
+ // application consistent (all the operating system buffers are not flushed to disk
+ // before the snapshots are created).
+ NoReboot *bool
+
+ // The tags to apply to the AMI and snapshots on creation. You can tag the AMI, the
+ // snapshots, or both.
+ //
+ // * To tag the AMI, the value for ResourceType must be
+ // image.
+ //
+ // * To tag the snapshots that are created of the root volume and of other
+ // Amazon EBS volumes that are attached to the instance, the value for ResourceType
+ // must be snapshot. The same tag is applied to all of the snapshots that are
+ // created.
+ //
+ // If you specify other values for ResourceType, the request fails. To
+ // tag an AMI or snapshot after it has been created, see CreateTags
+ // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateTags.html).
+ TagSpecifications []types.TagSpecification
+
+ noSmithyDocumentSerde
+}
+
+type CreateImageOutput struct {
+
+ // The ID of the new AMI.
+ ImageId *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCreateImageMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpCreateImage{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateImage{}, 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 = addOpCreateImageValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateImage(options.Region), middleware.Before); 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_opCreateImage(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "CreateImage",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateInstanceEventWindow.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateInstanceEventWindow.go
new file mode 100644
index 00000000..9d0e1d63
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateInstanceEventWindow.go
@@ -0,0 +1,174 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Creates an event window in which scheduled events for the associated Amazon EC2
+// instances can run. You can define either a set of time ranges or a cron
+// expression when creating the event window, but not both. All event window times
+// are in UTC. You can create up to 200 event windows per Amazon Web Services
+// Region. When you create the event window, targets (instance IDs, Dedicated Host
+// IDs, or tags) are not yet associated with it. To ensure that the event window
+// can be used, you must associate one or more targets with it by using the
+// AssociateInstanceEventWindow API. Event windows are applicable only for
+// scheduled events that stop, reboot, or terminate instances. Event windows are
+// not applicable for:
+//
+// * Expedited scheduled events and network maintenance
+// events.
+//
+// * Unscheduled maintenance such as AutoRecovery and unplanned
+// reboots.
+//
+// For more information, see Define event windows for scheduled events
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/event-windows.html) in the
+// Amazon EC2 User Guide.
+func (c *Client) CreateInstanceEventWindow(ctx context.Context, params *CreateInstanceEventWindowInput, optFns ...func(*Options)) (*CreateInstanceEventWindowOutput, error) {
+ if params == nil {
+ params = &CreateInstanceEventWindowInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CreateInstanceEventWindow", params, optFns, c.addOperationCreateInstanceEventWindowMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CreateInstanceEventWindowOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type CreateInstanceEventWindowInput struct {
+
+ // The cron expression for the event window, for example, * 0-4,20-23 * * 1,5. If
+ // you specify a cron expression, you can't specify a time range. Constraints:
+ //
+ // *
+ // Only hour and day of the week values are supported.
+ //
+ // * For day of the week
+ // values, you can specify either integers 0 through 6, or alternative single
+ // values SUN through SAT.
+ //
+ // * The minute, month, and year must be specified by
+ // *.
+ //
+ // * The hour value must be one or a multiple range, for example, 0-4 or
+ // 0-4,20-23.
+ //
+ // * Each hour range must be >= 2 hours, for example, 0-2 or 20-23.
+ //
+ // *
+ // The event window must be >= 4 hours. The combined total time ranges in the event
+ // window must be >= 4 hours.
+ //
+ // For more information about cron expressions, see
+ // cron (https://en.wikipedia.org/wiki/Cron) on the Wikipedia website.
+ CronExpression *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The name of the event window.
+ Name *string
+
+ // The tags to apply to the event window.
+ TagSpecifications []types.TagSpecification
+
+ // The time range for the event window. If you specify a time range, you can't
+ // specify a cron expression.
+ TimeRanges []types.InstanceEventWindowTimeRangeRequest
+
+ noSmithyDocumentSerde
+}
+
+type CreateInstanceEventWindowOutput struct {
+
+ // Information about the event window.
+ InstanceEventWindow *types.InstanceEventWindow
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCreateInstanceEventWindowMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpCreateInstanceEventWindow{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateInstanceEventWindow{}, 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_opCreateInstanceEventWindow(options.Region), middleware.Before); 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_opCreateInstanceEventWindow(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "CreateInstanceEventWindow",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateInstanceExportTask.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateInstanceExportTask.go
new file mode 100644
index 00000000..70005555
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateInstanceExportTask.go
@@ -0,0 +1,143 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Exports a running or stopped instance to an Amazon S3 bucket. For information
+// about the supported operating systems, image formats, and known limitations for
+// the types of instances you can export, see Exporting an instance as a VM Using
+// VM Import/Export
+// (https://docs.aws.amazon.com/vm-import/latest/userguide/vmexport.html) in the VM
+// Import/Export User Guide.
+func (c *Client) CreateInstanceExportTask(ctx context.Context, params *CreateInstanceExportTaskInput, optFns ...func(*Options)) (*CreateInstanceExportTaskOutput, error) {
+ if params == nil {
+ params = &CreateInstanceExportTaskInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CreateInstanceExportTask", params, optFns, c.addOperationCreateInstanceExportTaskMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CreateInstanceExportTaskOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type CreateInstanceExportTaskInput struct {
+
+ // The format and location for an export instance task.
+ //
+ // This member is required.
+ ExportToS3Task *types.ExportToS3TaskSpecification
+
+ // The ID of the instance.
+ //
+ // This member is required.
+ InstanceId *string
+
+ // The target virtualization environment.
+ //
+ // This member is required.
+ TargetEnvironment types.ExportEnvironment
+
+ // A description for the conversion task or the resource being exported. The
+ // maximum length is 255 characters.
+ Description *string
+
+ // The tags to apply to the export instance task during creation.
+ TagSpecifications []types.TagSpecification
+
+ noSmithyDocumentSerde
+}
+
+type CreateInstanceExportTaskOutput struct {
+
+ // Information about the export instance task.
+ ExportTask *types.ExportTask
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCreateInstanceExportTaskMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpCreateInstanceExportTask{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateInstanceExportTask{}, 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 = addOpCreateInstanceExportTaskValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateInstanceExportTask(options.Region), middleware.Before); 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_opCreateInstanceExportTask(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "CreateInstanceExportTask",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateInternetGateway.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateInternetGateway.go
new file mode 100644
index 00000000..72c253c6
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateInternetGateway.go
@@ -0,0 +1,125 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Creates an internet gateway for use with a VPC. After creating the internet
+// gateway, you attach it to a VPC using AttachInternetGateway. For more
+// information about your VPC and internet gateway, see the Amazon Virtual Private
+// Cloud User Guide (https://docs.aws.amazon.com/vpc/latest/userguide/).
+func (c *Client) CreateInternetGateway(ctx context.Context, params *CreateInternetGatewayInput, optFns ...func(*Options)) (*CreateInternetGatewayOutput, error) {
+ if params == nil {
+ params = &CreateInternetGatewayInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CreateInternetGateway", params, optFns, c.addOperationCreateInternetGatewayMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CreateInternetGatewayOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type CreateInternetGatewayInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The tags to assign to the internet gateway.
+ TagSpecifications []types.TagSpecification
+
+ noSmithyDocumentSerde
+}
+
+type CreateInternetGatewayOutput struct {
+
+ // Information about the internet gateway.
+ InternetGateway *types.InternetGateway
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCreateInternetGatewayMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpCreateInternetGateway{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateInternetGateway{}, 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_opCreateInternetGateway(options.Region), middleware.Before); 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_opCreateInternetGateway(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "CreateInternetGateway",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateKeyPair.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateKeyPair.go
new file mode 100644
index 00000000..e0fb26bb
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateKeyPair.go
@@ -0,0 +1,157 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Creates an ED25519 or 2048-bit RSA key pair with the specified name. Amazon EC2
+// stores the public key and displays the private key for you to save to a file.
+// The private key is returned as an unencrypted PEM encoded PKCS#1 private key. If
+// a key with the specified name already exists, Amazon EC2 returns an error. The
+// key pair returned to you is available only in the Amazon Web Services Region in
+// which you create it. If you prefer, you can create your own key pair using a
+// third-party tool and upload it to any Region using ImportKeyPair. You can have
+// up to 5,000 key pairs per Amazon Web Services Region. For more information, see
+// Amazon EC2 key pairs
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html) in the
+// Amazon Elastic Compute Cloud User Guide.
+func (c *Client) CreateKeyPair(ctx context.Context, params *CreateKeyPairInput, optFns ...func(*Options)) (*CreateKeyPairOutput, error) {
+ if params == nil {
+ params = &CreateKeyPairInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CreateKeyPair", params, optFns, c.addOperationCreateKeyPairMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CreateKeyPairOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type CreateKeyPairInput struct {
+
+ // A unique name for the key pair. Constraints: Up to 255 ASCII characters
+ //
+ // This member is required.
+ KeyName *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The type of key pair. Note that ED25519 keys are not supported for Windows
+ // instances, EC2 Instance Connect, and EC2 Serial Console. Default: rsa
+ KeyType types.KeyType
+
+ // The tags to apply to the new key pair.
+ TagSpecifications []types.TagSpecification
+
+ noSmithyDocumentSerde
+}
+
+// Describes a key pair.
+type CreateKeyPairOutput struct {
+
+ // The SHA-1 digest of the DER encoded private key.
+ KeyFingerprint *string
+
+ // An unencrypted PEM encoded RSA or ED25519 private key.
+ KeyMaterial *string
+
+ // The name of the key pair.
+ KeyName *string
+
+ // The ID of the key pair.
+ KeyPairId *string
+
+ // Any tags applied to the key pair.
+ Tags []types.Tag
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCreateKeyPairMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpCreateKeyPair{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateKeyPair{}, 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 = addOpCreateKeyPairValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateKeyPair(options.Region), middleware.Before); 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_opCreateKeyPair(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "CreateKeyPair",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateLaunchTemplate.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateLaunchTemplate.go
new file mode 100644
index 00000000..e04336dc
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateLaunchTemplate.go
@@ -0,0 +1,154 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Creates a launch template. A launch template contains the parameters to launch
+// an instance. When you launch an instance using RunInstances, you can specify a
+// launch template instead of providing the launch parameters in the request. For
+// more information, see Launching an instance from a launch template
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html)in
+// the Amazon Elastic Compute Cloud User Guide.
+func (c *Client) CreateLaunchTemplate(ctx context.Context, params *CreateLaunchTemplateInput, optFns ...func(*Options)) (*CreateLaunchTemplateOutput, error) {
+ if params == nil {
+ params = &CreateLaunchTemplateInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CreateLaunchTemplate", params, optFns, c.addOperationCreateLaunchTemplateMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CreateLaunchTemplateOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type CreateLaunchTemplateInput struct {
+
+ // The information for the launch template.
+ //
+ // This member is required.
+ LaunchTemplateData *types.RequestLaunchTemplateData
+
+ // A name for the launch template.
+ //
+ // This member is required.
+ LaunchTemplateName *string
+
+ // Unique, case-sensitive identifier you provide to ensure the idempotency of the
+ // request. For more information, see Ensuring Idempotency
+ // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html).
+ // Constraint: Maximum 128 ASCII characters.
+ ClientToken *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The tags to apply to the launch template during creation.
+ TagSpecifications []types.TagSpecification
+
+ // A description for the first version of the launch template.
+ VersionDescription *string
+
+ noSmithyDocumentSerde
+}
+
+type CreateLaunchTemplateOutput struct {
+
+ // Information about the launch template.
+ LaunchTemplate *types.LaunchTemplate
+
+ // If the launch template contains parameters or parameter combinations that are
+ // not valid, an error code and an error message are returned for each issue that's
+ // found.
+ Warning *types.ValidationWarning
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCreateLaunchTemplateMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpCreateLaunchTemplate{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateLaunchTemplate{}, 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 = addOpCreateLaunchTemplateValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateLaunchTemplate(options.Region), middleware.Before); 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_opCreateLaunchTemplate(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "CreateLaunchTemplate",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateLaunchTemplateVersion.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateLaunchTemplateVersion.go
new file mode 100644
index 00000000..b1df7c74
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateLaunchTemplateVersion.go
@@ -0,0 +1,162 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Creates a new version for a launch template. You can specify an existing version
+// of launch template from which to base the new version. Launch template versions
+// are numbered in the order in which they are created. You cannot specify, change,
+// or replace the numbering of launch template versions. For more information, see
+// Managing launch template versions
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html#manage-launch-template-versions)in
+// the Amazon Elastic Compute Cloud User Guide.
+func (c *Client) CreateLaunchTemplateVersion(ctx context.Context, params *CreateLaunchTemplateVersionInput, optFns ...func(*Options)) (*CreateLaunchTemplateVersionOutput, error) {
+ if params == nil {
+ params = &CreateLaunchTemplateVersionInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CreateLaunchTemplateVersion", params, optFns, c.addOperationCreateLaunchTemplateVersionMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CreateLaunchTemplateVersionOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type CreateLaunchTemplateVersionInput struct {
+
+ // The information for the launch template.
+ //
+ // This member is required.
+ LaunchTemplateData *types.RequestLaunchTemplateData
+
+ // Unique, case-sensitive identifier you provide to ensure the idempotency of the
+ // request. For more information, see Ensuring Idempotency
+ // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html).
+ // Constraint: Maximum 128 ASCII characters.
+ ClientToken *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The ID of the launch template. You must specify either the launch template ID or
+ // launch template name in the request.
+ LaunchTemplateId *string
+
+ // The name of the launch template. You must specify either the launch template ID
+ // or launch template name in the request.
+ LaunchTemplateName *string
+
+ // The version number of the launch template version on which to base the new
+ // version. The new version inherits the same launch parameters as the source
+ // version, except for parameters that you specify in LaunchTemplateData. Snapshots
+ // applied to the block device mapping are ignored when creating a new version
+ // unless they are explicitly included.
+ SourceVersion *string
+
+ // A description for the version of the launch template.
+ VersionDescription *string
+
+ noSmithyDocumentSerde
+}
+
+type CreateLaunchTemplateVersionOutput struct {
+
+ // Information about the launch template version.
+ LaunchTemplateVersion *types.LaunchTemplateVersion
+
+ // If the new version of the launch template contains parameters or parameter
+ // combinations that are not valid, an error code and an error message are returned
+ // for each issue that's found.
+ Warning *types.ValidationWarning
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCreateLaunchTemplateVersionMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpCreateLaunchTemplateVersion{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateLaunchTemplateVersion{}, 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 = addOpCreateLaunchTemplateVersionValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateLaunchTemplateVersion(options.Region), middleware.Before); 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_opCreateLaunchTemplateVersion(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "CreateLaunchTemplateVersion",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateLocalGatewayRoute.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateLocalGatewayRoute.go
new file mode 100644
index 00000000..4cf0da0e
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateLocalGatewayRoute.go
@@ -0,0 +1,138 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Creates a static route for the specified local gateway route table.
+func (c *Client) CreateLocalGatewayRoute(ctx context.Context, params *CreateLocalGatewayRouteInput, optFns ...func(*Options)) (*CreateLocalGatewayRouteOutput, error) {
+ if params == nil {
+ params = &CreateLocalGatewayRouteInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CreateLocalGatewayRoute", params, optFns, c.addOperationCreateLocalGatewayRouteMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CreateLocalGatewayRouteOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type CreateLocalGatewayRouteInput struct {
+
+ // The CIDR range used for destination matches. Routing decisions are based on the
+ // most specific match.
+ //
+ // This member is required.
+ DestinationCidrBlock *string
+
+ // The ID of the local gateway route table.
+ //
+ // This member is required.
+ LocalGatewayRouteTableId *string
+
+ // The ID of the virtual interface group.
+ //
+ // This member is required.
+ LocalGatewayVirtualInterfaceGroupId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type CreateLocalGatewayRouteOutput struct {
+
+ // Information about the route.
+ Route *types.LocalGatewayRoute
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCreateLocalGatewayRouteMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpCreateLocalGatewayRoute{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateLocalGatewayRoute{}, 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 = addOpCreateLocalGatewayRouteValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateLocalGatewayRoute(options.Region), middleware.Before); 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_opCreateLocalGatewayRoute(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "CreateLocalGatewayRoute",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateLocalGatewayRouteTableVpcAssociation.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateLocalGatewayRouteTableVpcAssociation.go
new file mode 100644
index 00000000..bad406ff
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateLocalGatewayRouteTableVpcAssociation.go
@@ -0,0 +1,135 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Associates the specified VPC with the specified local gateway route table.
+func (c *Client) CreateLocalGatewayRouteTableVpcAssociation(ctx context.Context, params *CreateLocalGatewayRouteTableVpcAssociationInput, optFns ...func(*Options)) (*CreateLocalGatewayRouteTableVpcAssociationOutput, error) {
+ if params == nil {
+ params = &CreateLocalGatewayRouteTableVpcAssociationInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CreateLocalGatewayRouteTableVpcAssociation", params, optFns, c.addOperationCreateLocalGatewayRouteTableVpcAssociationMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CreateLocalGatewayRouteTableVpcAssociationOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type CreateLocalGatewayRouteTableVpcAssociationInput struct {
+
+ // The ID of the local gateway route table.
+ //
+ // This member is required.
+ LocalGatewayRouteTableId *string
+
+ // The ID of the VPC.
+ //
+ // This member is required.
+ VpcId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The tags to assign to the local gateway route table VPC association.
+ TagSpecifications []types.TagSpecification
+
+ noSmithyDocumentSerde
+}
+
+type CreateLocalGatewayRouteTableVpcAssociationOutput struct {
+
+ // Information about the association.
+ LocalGatewayRouteTableVpcAssociation *types.LocalGatewayRouteTableVpcAssociation
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCreateLocalGatewayRouteTableVpcAssociationMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpCreateLocalGatewayRouteTableVpcAssociation{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateLocalGatewayRouteTableVpcAssociation{}, 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 = addOpCreateLocalGatewayRouteTableVpcAssociationValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateLocalGatewayRouteTableVpcAssociation(options.Region), middleware.Before); 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_opCreateLocalGatewayRouteTableVpcAssociation(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "CreateLocalGatewayRouteTableVpcAssociation",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateManagedPrefixList.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateManagedPrefixList.go
new file mode 100644
index 00000000..30146305
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateManagedPrefixList.go
@@ -0,0 +1,188 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Creates a managed prefix list. You can specify one or more entries for the
+// prefix list. Each entry consists of a CIDR block and an optional description.
+func (c *Client) CreateManagedPrefixList(ctx context.Context, params *CreateManagedPrefixListInput, optFns ...func(*Options)) (*CreateManagedPrefixListOutput, error) {
+ if params == nil {
+ params = &CreateManagedPrefixListInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CreateManagedPrefixList", params, optFns, c.addOperationCreateManagedPrefixListMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CreateManagedPrefixListOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type CreateManagedPrefixListInput struct {
+
+ // The IP address type. Valid Values: IPv4 | IPv6
+ //
+ // This member is required.
+ AddressFamily *string
+
+ // The maximum number of entries for the prefix list.
+ //
+ // This member is required.
+ MaxEntries *int32
+
+ // A name for the prefix list. Constraints: Up to 255 characters in length. The
+ // name cannot start with com.amazonaws.
+ //
+ // This member is required.
+ PrefixListName *string
+
+ // Unique, case-sensitive identifier you provide to ensure the idempotency of the
+ // request. For more information, see Ensuring Idempotency
+ // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html).
+ // Constraints: Up to 255 UTF-8 characters in length.
+ ClientToken *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // One or more entries for the prefix list.
+ Entries []types.AddPrefixListEntry
+
+ // The tags to apply to the prefix list during creation.
+ TagSpecifications []types.TagSpecification
+
+ noSmithyDocumentSerde
+}
+
+type CreateManagedPrefixListOutput struct {
+
+ // Information about the prefix list.
+ PrefixList *types.ManagedPrefixList
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCreateManagedPrefixListMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpCreateManagedPrefixList{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateManagedPrefixList{}, 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 = addIdempotencyToken_opCreateManagedPrefixListMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpCreateManagedPrefixListValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateManagedPrefixList(options.Region), middleware.Before); 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
+}
+
+type idempotencyToken_initializeOpCreateManagedPrefixList struct {
+ tokenProvider IdempotencyTokenProvider
+}
+
+func (*idempotencyToken_initializeOpCreateManagedPrefixList) ID() string {
+ return "OperationIdempotencyTokenAutoFill"
+}
+
+func (m *idempotencyToken_initializeOpCreateManagedPrefixList) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ if m.tokenProvider == nil {
+ return next.HandleInitialize(ctx, in)
+ }
+
+ input, ok := in.Parameters.(*CreateManagedPrefixListInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateManagedPrefixListInput ")
+ }
+
+ if input.ClientToken == nil {
+ t, err := m.tokenProvider.GetIdempotencyToken()
+ if err != nil {
+ return out, metadata, err
+ }
+ input.ClientToken = &t
+ }
+ return next.HandleInitialize(ctx, in)
+}
+func addIdempotencyToken_opCreateManagedPrefixListMiddleware(stack *middleware.Stack, cfg Options) error {
+ return stack.Initialize.Add(&idempotencyToken_initializeOpCreateManagedPrefixList{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before)
+}
+
+func newServiceMetadataMiddleware_opCreateManagedPrefixList(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "CreateManagedPrefixList",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateNatGateway.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateNatGateway.go
new file mode 100644
index 00000000..339bec2d
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateNatGateway.go
@@ -0,0 +1,198 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Creates a NAT gateway in the specified subnet. This action creates a network
+// interface in the specified subnet with a private IP address from the IP address
+// range of the subnet. You can create either a public NAT gateway or a private NAT
+// gateway. With a public NAT gateway, internet-bound traffic from a private subnet
+// can be routed to the NAT gateway, so that instances in a private subnet can
+// connect to the internet. With a private NAT gateway, private communication is
+// routed across VPCs and on-premises networks through a transit gateway or virtual
+// private gateway. Common use cases include running large workloads behind a small
+// pool of allowlisted IPv4 addresses, preserving private IPv4 addresses, and
+// communicating between overlapping networks. For more information, see NAT
+// gateways (https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html)
+// in the Amazon Virtual Private Cloud User Guide.
+func (c *Client) CreateNatGateway(ctx context.Context, params *CreateNatGatewayInput, optFns ...func(*Options)) (*CreateNatGatewayOutput, error) {
+ if params == nil {
+ params = &CreateNatGatewayInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CreateNatGateway", params, optFns, c.addOperationCreateNatGatewayMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CreateNatGatewayOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type CreateNatGatewayInput struct {
+
+ // The subnet in which to create the NAT gateway.
+ //
+ // This member is required.
+ SubnetId *string
+
+ // [Public NAT gateways only] The allocation ID of an Elastic IP address to
+ // associate with the NAT gateway. You cannot specify an Elastic IP address with a
+ // private NAT gateway. If the Elastic IP address is associated with another
+ // resource, you must first disassociate it.
+ AllocationId *string
+
+ // Unique, case-sensitive identifier that you provide to ensure the idempotency of
+ // the request. For more information, see How to ensure idempotency
+ // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html).
+ // Constraint: Maximum 64 ASCII characters.
+ ClientToken *string
+
+ // Indicates whether the NAT gateway supports public or private connectivity. The
+ // default is public connectivity.
+ ConnectivityType types.ConnectivityType
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The tags to assign to the NAT gateway.
+ TagSpecifications []types.TagSpecification
+
+ noSmithyDocumentSerde
+}
+
+type CreateNatGatewayOutput struct {
+
+ // Unique, case-sensitive identifier to ensure the idempotency of the request. Only
+ // returned if a client token was provided in the request.
+ ClientToken *string
+
+ // Information about the NAT gateway.
+ NatGateway *types.NatGateway
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCreateNatGatewayMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpCreateNatGateway{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateNatGateway{}, 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 = addIdempotencyToken_opCreateNatGatewayMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpCreateNatGatewayValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateNatGateway(options.Region), middleware.Before); 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
+}
+
+type idempotencyToken_initializeOpCreateNatGateway struct {
+ tokenProvider IdempotencyTokenProvider
+}
+
+func (*idempotencyToken_initializeOpCreateNatGateway) ID() string {
+ return "OperationIdempotencyTokenAutoFill"
+}
+
+func (m *idempotencyToken_initializeOpCreateNatGateway) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ if m.tokenProvider == nil {
+ return next.HandleInitialize(ctx, in)
+ }
+
+ input, ok := in.Parameters.(*CreateNatGatewayInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateNatGatewayInput ")
+ }
+
+ if input.ClientToken == nil {
+ t, err := m.tokenProvider.GetIdempotencyToken()
+ if err != nil {
+ return out, metadata, err
+ }
+ input.ClientToken = &t
+ }
+ return next.HandleInitialize(ctx, in)
+}
+func addIdempotencyToken_opCreateNatGatewayMiddleware(stack *middleware.Stack, cfg Options) error {
+ return stack.Initialize.Add(&idempotencyToken_initializeOpCreateNatGateway{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before)
+}
+
+func newServiceMetadataMiddleware_opCreateNatGateway(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "CreateNatGateway",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateNetworkAcl.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateNetworkAcl.go
new file mode 100644
index 00000000..a747a6f1
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateNetworkAcl.go
@@ -0,0 +1,134 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Creates a network ACL in a VPC. Network ACLs provide an optional layer of
+// security (in addition to security groups) for the instances in your VPC. For
+// more information, see Network ACLs
+// (https://docs.aws.amazon.com/vpc/latest/userguide/VPC_ACLs.html) in the Amazon
+// Virtual Private Cloud User Guide.
+func (c *Client) CreateNetworkAcl(ctx context.Context, params *CreateNetworkAclInput, optFns ...func(*Options)) (*CreateNetworkAclOutput, error) {
+ if params == nil {
+ params = &CreateNetworkAclInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CreateNetworkAcl", params, optFns, c.addOperationCreateNetworkAclMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CreateNetworkAclOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type CreateNetworkAclInput struct {
+
+ // The ID of the VPC.
+ //
+ // This member is required.
+ VpcId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The tags to assign to the network ACL.
+ TagSpecifications []types.TagSpecification
+
+ noSmithyDocumentSerde
+}
+
+type CreateNetworkAclOutput struct {
+
+ // Information about the network ACL.
+ NetworkAcl *types.NetworkAcl
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCreateNetworkAclMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpCreateNetworkAcl{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateNetworkAcl{}, 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 = addOpCreateNetworkAclValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateNetworkAcl(options.Region), middleware.Before); 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_opCreateNetworkAcl(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "CreateNetworkAcl",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateNetworkAclEntry.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateNetworkAclEntry.go
new file mode 100644
index 00000000..f64d2b88
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateNetworkAclEntry.go
@@ -0,0 +1,182 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Creates an entry (a rule) in a network ACL with the specified rule number. Each
+// network ACL has a set of numbered ingress rules and a separate set of numbered
+// egress rules. When determining whether a packet should be allowed in or out of a
+// subnet associated with the ACL, we process the entries in the ACL according to
+// the rule numbers, in ascending order. Each network ACL has a set of ingress
+// rules and a separate set of egress rules. We recommend that you leave room
+// between the rule numbers (for example, 100, 110, 120, ...), and not number them
+// one right after the other (for example, 101, 102, 103, ...). This makes it
+// easier to add a rule between existing ones without having to renumber the rules.
+// After you add an entry, you can't modify it; you must either replace it, or
+// create an entry and delete the old one. For more information about network ACLs,
+// see Network ACLs
+// (https://docs.aws.amazon.com/vpc/latest/userguide/VPC_ACLs.html) in the Amazon
+// Virtual Private Cloud User Guide.
+func (c *Client) CreateNetworkAclEntry(ctx context.Context, params *CreateNetworkAclEntryInput, optFns ...func(*Options)) (*CreateNetworkAclEntryOutput, error) {
+ if params == nil {
+ params = &CreateNetworkAclEntryInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CreateNetworkAclEntry", params, optFns, c.addOperationCreateNetworkAclEntryMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CreateNetworkAclEntryOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type CreateNetworkAclEntryInput struct {
+
+ // Indicates whether this is an egress rule (rule is applied to traffic leaving the
+ // subnet).
+ //
+ // This member is required.
+ Egress *bool
+
+ // The ID of the network ACL.
+ //
+ // This member is required.
+ NetworkAclId *string
+
+ // The protocol number. A value of "-1" means all protocols. If you specify "-1" or
+ // a protocol number other than "6" (TCP), "17" (UDP), or "1" (ICMP), traffic on
+ // all ports is allowed, regardless of any ports or ICMP types or codes that you
+ // specify. If you specify protocol "58" (ICMPv6) and specify an IPv4 CIDR block,
+ // traffic for all ICMP types and codes allowed, regardless of any that you
+ // specify. If you specify protocol "58" (ICMPv6) and specify an IPv6 CIDR block,
+ // you must specify an ICMP type and code.
+ //
+ // This member is required.
+ Protocol *string
+
+ // Indicates whether to allow or deny the traffic that matches the rule.
+ //
+ // This member is required.
+ RuleAction types.RuleAction
+
+ // The rule number for the entry (for example, 100). ACL entries are processed in
+ // ascending order by rule number. Constraints: Positive integer from 1 to 32766.
+ // The range 32767 to 65535 is reserved for internal use.
+ //
+ // This member is required.
+ RuleNumber *int32
+
+ // The IPv4 network range to allow or deny, in CIDR notation (for example
+ // 172.16.0.0/24). We modify the specified CIDR block to its canonical form; for
+ // example, if you specify 100.68.0.18/18, we modify it to 100.68.0.0/18.
+ CidrBlock *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // ICMP protocol: The ICMP or ICMPv6 type and code. Required if specifying protocol
+ // 1 (ICMP) or protocol 58 (ICMPv6) with an IPv6 CIDR block.
+ IcmpTypeCode *types.IcmpTypeCode
+
+ // The IPv6 network range to allow or deny, in CIDR notation (for example
+ // 2001:db8:1234:1a00::/64).
+ Ipv6CidrBlock *string
+
+ // TCP or UDP protocols: The range of ports the rule applies to. Required if
+ // specifying protocol 6 (TCP) or 17 (UDP).
+ PortRange *types.PortRange
+
+ noSmithyDocumentSerde
+}
+
+type CreateNetworkAclEntryOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCreateNetworkAclEntryMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpCreateNetworkAclEntry{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateNetworkAclEntry{}, 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 = addOpCreateNetworkAclEntryValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateNetworkAclEntry(options.Region), middleware.Before); 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_opCreateNetworkAclEntry(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "CreateNetworkAclEntry",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateNetworkInsightsPath.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateNetworkInsightsPath.go
new file mode 100644
index 00000000..82402c4c
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateNetworkInsightsPath.go
@@ -0,0 +1,198 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Creates a path to analyze for reachability. Reachability Analyzer enables you to
+// analyze and debug network reachability between two resources in your virtual
+// private cloud (VPC). For more information, see What is Reachability Analyzer
+// (https://docs.aws.amazon.com/vpc/latest/reachability/).
+func (c *Client) CreateNetworkInsightsPath(ctx context.Context, params *CreateNetworkInsightsPathInput, optFns ...func(*Options)) (*CreateNetworkInsightsPathOutput, error) {
+ if params == nil {
+ params = &CreateNetworkInsightsPathInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CreateNetworkInsightsPath", params, optFns, c.addOperationCreateNetworkInsightsPathMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CreateNetworkInsightsPathOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type CreateNetworkInsightsPathInput struct {
+
+ // Unique, case-sensitive identifier that you provide to ensure the idempotency of
+ // the request. For more information, see How to ensure idempotency
+ // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html).
+ //
+ // This member is required.
+ ClientToken *string
+
+ // The Amazon Web Services resource that is the destination of the path.
+ //
+ // This member is required.
+ Destination *string
+
+ // The protocol.
+ //
+ // This member is required.
+ Protocol types.Protocol
+
+ // The Amazon Web Services resource that is the source of the path.
+ //
+ // This member is required.
+ Source *string
+
+ // The IP address of the Amazon Web Services resource that is the destination of
+ // the path.
+ DestinationIp *string
+
+ // The destination port.
+ DestinationPort *int32
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The IP address of the Amazon Web Services resource that is the source of the
+ // path.
+ SourceIp *string
+
+ // The tags to add to the path.
+ TagSpecifications []types.TagSpecification
+
+ noSmithyDocumentSerde
+}
+
+type CreateNetworkInsightsPathOutput struct {
+
+ // Information about the path.
+ NetworkInsightsPath *types.NetworkInsightsPath
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCreateNetworkInsightsPathMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpCreateNetworkInsightsPath{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateNetworkInsightsPath{}, 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 = addIdempotencyToken_opCreateNetworkInsightsPathMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpCreateNetworkInsightsPathValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateNetworkInsightsPath(options.Region), middleware.Before); 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
+}
+
+type idempotencyToken_initializeOpCreateNetworkInsightsPath struct {
+ tokenProvider IdempotencyTokenProvider
+}
+
+func (*idempotencyToken_initializeOpCreateNetworkInsightsPath) ID() string {
+ return "OperationIdempotencyTokenAutoFill"
+}
+
+func (m *idempotencyToken_initializeOpCreateNetworkInsightsPath) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ if m.tokenProvider == nil {
+ return next.HandleInitialize(ctx, in)
+ }
+
+ input, ok := in.Parameters.(*CreateNetworkInsightsPathInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateNetworkInsightsPathInput ")
+ }
+
+ if input.ClientToken == nil {
+ t, err := m.tokenProvider.GetIdempotencyToken()
+ if err != nil {
+ return out, metadata, err
+ }
+ input.ClientToken = &t
+ }
+ return next.HandleInitialize(ctx, in)
+}
+func addIdempotencyToken_opCreateNetworkInsightsPathMiddleware(stack *middleware.Stack, cfg Options) error {
+ return stack.Initialize.Add(&idempotencyToken_initializeOpCreateNetworkInsightsPath{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before)
+}
+
+func newServiceMetadataMiddleware_opCreateNetworkInsightsPath(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "CreateNetworkInsightsPath",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateNetworkInterface.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateNetworkInterface.go
new file mode 100644
index 00000000..b33e45aa
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateNetworkInterface.go
@@ -0,0 +1,246 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Creates a network interface in the specified subnet. For more information about
+// network interfaces, see Elastic Network Interfaces
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-eni.html) in the
+// Amazon Virtual Private Cloud User Guide.
+func (c *Client) CreateNetworkInterface(ctx context.Context, params *CreateNetworkInterfaceInput, optFns ...func(*Options)) (*CreateNetworkInterfaceOutput, error) {
+ if params == nil {
+ params = &CreateNetworkInterfaceInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CreateNetworkInterface", params, optFns, c.addOperationCreateNetworkInterfaceMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CreateNetworkInterfaceOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+// Contains the parameters for CreateNetworkInterface.
+type CreateNetworkInterfaceInput struct {
+
+ // The ID of the subnet to associate with the network interface.
+ //
+ // This member is required.
+ SubnetId *string
+
+ // Unique, case-sensitive identifier that you provide to ensure the idempotency of
+ // the request. For more information, see Ensuring Idempotency
+ // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html).
+ ClientToken *string
+
+ // A description for the network interface.
+ Description *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The IDs of one or more security groups.
+ Groups []string
+
+ // Indicates the type of network interface. To create an Elastic Fabric Adapter
+ // (EFA), specify efa. For more information, see Elastic Fabric Adapter
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/efa.html) in the Amazon
+ // Elastic Compute Cloud User Guide. To create a trunk network interface, specify
+ // efa. For more information, see Network interface trunking
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/eni-trunking.html) in the
+ // Amazon Elastic Compute Cloud User Guide.
+ InterfaceType types.NetworkInterfaceCreationType
+
+ // The number of IPv4 prefixes that Amazon Web Services automatically assigns to
+ // the network interface. You cannot use this option if you use the Ipv4 Prefixes
+ // option.
+ Ipv4PrefixCount *int32
+
+ // One or more IPv4 prefixes assigned to the network interface. You cannot use this
+ // option if you use the Ipv4PrefixCount option.
+ Ipv4Prefixes []types.Ipv4PrefixSpecificationRequest
+
+ // The number of IPv6 addresses to assign to a network interface. Amazon EC2
+ // automatically selects the IPv6 addresses from the subnet range. You can't use
+ // this option if specifying specific IPv6 addresses. If your subnet has the
+ // AssignIpv6AddressOnCreation attribute set to true, you can specify 0 to override
+ // this setting.
+ Ipv6AddressCount *int32
+
+ // One or more specific IPv6 addresses from the IPv6 CIDR block range of your
+ // subnet. You can't use this option if you're specifying a number of IPv6
+ // addresses.
+ Ipv6Addresses []types.InstanceIpv6Address
+
+ // The number of IPv6 prefixes that Amazon Web Services automatically assigns to
+ // the network interface. You cannot use this option if you use the Ipv6Prefixes
+ // option.
+ Ipv6PrefixCount *int32
+
+ // One or more IPv6 prefixes assigned to the network interface. You cannot use this
+ // option if you use the Ipv6PrefixCount option.
+ Ipv6Prefixes []types.Ipv6PrefixSpecificationRequest
+
+ // The primary private IPv4 address of the network interface. If you don't specify
+ // an IPv4 address, Amazon EC2 selects one for you from the subnet's IPv4 CIDR
+ // range. If you specify an IP address, you cannot indicate any IP addresses
+ // specified in privateIpAddresses as primary (only one IP address can be
+ // designated as primary).
+ PrivateIpAddress *string
+
+ // One or more private IPv4 addresses.
+ PrivateIpAddresses []types.PrivateIpAddressSpecification
+
+ // The number of secondary private IPv4 addresses to assign to a network interface.
+ // When you specify a number of secondary IPv4 addresses, Amazon EC2 selects these
+ // IP addresses within the subnet's IPv4 CIDR range. You can't specify this option
+ // and specify more than one private IP address using privateIpAddresses. The
+ // number of IP addresses you can assign to a network interface varies by instance
+ // type. For more information, see IP Addresses Per ENI Per Instance Type
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-eni.html#AvailableIpPerENI)
+ // in the Amazon Virtual Private Cloud User Guide.
+ SecondaryPrivateIpAddressCount *int32
+
+ // The tags to apply to the new network interface.
+ TagSpecifications []types.TagSpecification
+
+ noSmithyDocumentSerde
+}
+
+// Contains the output of CreateNetworkInterface.
+type CreateNetworkInterfaceOutput struct {
+
+ // The token to use to retrieve the next page of results. This value is null when
+ // there are no more results to return.
+ ClientToken *string
+
+ // Information about the network interface.
+ NetworkInterface *types.NetworkInterface
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCreateNetworkInterfaceMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpCreateNetworkInterface{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateNetworkInterface{}, 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 = addIdempotencyToken_opCreateNetworkInterfaceMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpCreateNetworkInterfaceValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateNetworkInterface(options.Region), middleware.Before); 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
+}
+
+type idempotencyToken_initializeOpCreateNetworkInterface struct {
+ tokenProvider IdempotencyTokenProvider
+}
+
+func (*idempotencyToken_initializeOpCreateNetworkInterface) ID() string {
+ return "OperationIdempotencyTokenAutoFill"
+}
+
+func (m *idempotencyToken_initializeOpCreateNetworkInterface) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ if m.tokenProvider == nil {
+ return next.HandleInitialize(ctx, in)
+ }
+
+ input, ok := in.Parameters.(*CreateNetworkInterfaceInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateNetworkInterfaceInput ")
+ }
+
+ if input.ClientToken == nil {
+ t, err := m.tokenProvider.GetIdempotencyToken()
+ if err != nil {
+ return out, metadata, err
+ }
+ input.ClientToken = &t
+ }
+ return next.HandleInitialize(ctx, in)
+}
+func addIdempotencyToken_opCreateNetworkInterfaceMiddleware(stack *middleware.Stack, cfg Options) error {
+ return stack.Initialize.Add(&idempotencyToken_initializeOpCreateNetworkInterface{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before)
+}
+
+func newServiceMetadataMiddleware_opCreateNetworkInterface(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "CreateNetworkInterface",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateNetworkInterfacePermission.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateNetworkInterfacePermission.go
new file mode 100644
index 00000000..0b3fb26b
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateNetworkInterfacePermission.go
@@ -0,0 +1,143 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Grants an Amazon Web Services-authorized account permission to attach the
+// specified network interface to an instance in their account. You can grant
+// permission to a single Amazon Web Services account only, and only one account at
+// a time.
+func (c *Client) CreateNetworkInterfacePermission(ctx context.Context, params *CreateNetworkInterfacePermissionInput, optFns ...func(*Options)) (*CreateNetworkInterfacePermissionOutput, error) {
+ if params == nil {
+ params = &CreateNetworkInterfacePermissionInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CreateNetworkInterfacePermission", params, optFns, c.addOperationCreateNetworkInterfacePermissionMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CreateNetworkInterfacePermissionOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+// Contains the parameters for CreateNetworkInterfacePermission.
+type CreateNetworkInterfacePermissionInput struct {
+
+ // The ID of the network interface.
+ //
+ // This member is required.
+ NetworkInterfaceId *string
+
+ // The type of permission to grant.
+ //
+ // This member is required.
+ Permission types.InterfacePermissionType
+
+ // The Amazon Web Services account ID.
+ AwsAccountId *string
+
+ // The Amazon Web Service. Currently not supported.
+ AwsService *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+// Contains the output of CreateNetworkInterfacePermission.
+type CreateNetworkInterfacePermissionOutput struct {
+
+ // Information about the permission for the network interface.
+ InterfacePermission *types.NetworkInterfacePermission
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCreateNetworkInterfacePermissionMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpCreateNetworkInterfacePermission{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateNetworkInterfacePermission{}, 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 = addOpCreateNetworkInterfacePermissionValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateNetworkInterfacePermission(options.Region), middleware.Before); 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_opCreateNetworkInterfacePermission(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "CreateNetworkInterfacePermission",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreatePlacementGroup.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreatePlacementGroup.go
new file mode 100644
index 00000000..30221373
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreatePlacementGroup.go
@@ -0,0 +1,141 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Creates a placement group in which to launch instances. The strategy of the
+// placement group determines how the instances are organized within the group. A
+// cluster placement group is a logical grouping of instances within a single
+// Availability Zone that benefit from low network latency, high network
+// throughput. A spread placement group places instances on distinct hardware. A
+// partition placement group places groups of instances in different partitions,
+// where instances in one partition do not share the same hardware with instances
+// in another partition. For more information, see Placement groups
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/placement-groups.html) in
+// the Amazon EC2 User Guide.
+func (c *Client) CreatePlacementGroup(ctx context.Context, params *CreatePlacementGroupInput, optFns ...func(*Options)) (*CreatePlacementGroupOutput, error) {
+ if params == nil {
+ params = &CreatePlacementGroupInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CreatePlacementGroup", params, optFns, c.addOperationCreatePlacementGroupMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CreatePlacementGroupOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type CreatePlacementGroupInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // A name for the placement group. Must be unique within the scope of your account
+ // for the Region. Constraints: Up to 255 ASCII characters
+ GroupName *string
+
+ // The number of partitions. Valid only when Strategy is set to partition.
+ PartitionCount *int32
+
+ // The placement strategy.
+ Strategy types.PlacementStrategy
+
+ // The tags to apply to the new placement group.
+ TagSpecifications []types.TagSpecification
+
+ noSmithyDocumentSerde
+}
+
+type CreatePlacementGroupOutput struct {
+
+ // Describes a placement group.
+ PlacementGroup *types.PlacementGroup
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCreatePlacementGroupMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpCreatePlacementGroup{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreatePlacementGroup{}, 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_opCreatePlacementGroup(options.Region), middleware.Before); 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_opCreatePlacementGroup(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "CreatePlacementGroup",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateReplaceRootVolumeTask.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateReplaceRootVolumeTask.go
new file mode 100644
index 00000000..f706c6a8
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateReplaceRootVolumeTask.go
@@ -0,0 +1,182 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Creates a root volume replacement task for an Amazon EC2 instance. The root
+// volume can either be restored to its initial launch state, or it can be restored
+// using a specific snapshot. For more information, see Replace a root volume
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-restoring-volume.html#replace-root)
+// in the Amazon Elastic Compute Cloud User Guide.
+func (c *Client) CreateReplaceRootVolumeTask(ctx context.Context, params *CreateReplaceRootVolumeTaskInput, optFns ...func(*Options)) (*CreateReplaceRootVolumeTaskOutput, error) {
+ if params == nil {
+ params = &CreateReplaceRootVolumeTaskInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CreateReplaceRootVolumeTask", params, optFns, c.addOperationCreateReplaceRootVolumeTaskMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CreateReplaceRootVolumeTaskOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type CreateReplaceRootVolumeTaskInput struct {
+
+ // The ID of the instance for which to replace the root volume.
+ //
+ // This member is required.
+ InstanceId *string
+
+ // Unique, case-sensitive identifier you provide to ensure the idempotency of the
+ // request. If you do not specify a client token, a randomly generated token is
+ // used for the request to ensure idempotency. For more information, see Ensuring
+ // idempotency
+ // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html).
+ ClientToken *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The ID of the snapshot from which to restore the replacement root volume. If you
+ // want to restore the volume to the initial launch state, omit this parameter.
+ SnapshotId *string
+
+ // The tags to apply to the root volume replacement task.
+ TagSpecifications []types.TagSpecification
+
+ noSmithyDocumentSerde
+}
+
+type CreateReplaceRootVolumeTaskOutput struct {
+
+ // Information about the root volume replacement task.
+ ReplaceRootVolumeTask *types.ReplaceRootVolumeTask
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCreateReplaceRootVolumeTaskMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpCreateReplaceRootVolumeTask{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateReplaceRootVolumeTask{}, 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 = addIdempotencyToken_opCreateReplaceRootVolumeTaskMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpCreateReplaceRootVolumeTaskValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateReplaceRootVolumeTask(options.Region), middleware.Before); 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
+}
+
+type idempotencyToken_initializeOpCreateReplaceRootVolumeTask struct {
+ tokenProvider IdempotencyTokenProvider
+}
+
+func (*idempotencyToken_initializeOpCreateReplaceRootVolumeTask) ID() string {
+ return "OperationIdempotencyTokenAutoFill"
+}
+
+func (m *idempotencyToken_initializeOpCreateReplaceRootVolumeTask) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ if m.tokenProvider == nil {
+ return next.HandleInitialize(ctx, in)
+ }
+
+ input, ok := in.Parameters.(*CreateReplaceRootVolumeTaskInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateReplaceRootVolumeTaskInput ")
+ }
+
+ if input.ClientToken == nil {
+ t, err := m.tokenProvider.GetIdempotencyToken()
+ if err != nil {
+ return out, metadata, err
+ }
+ input.ClientToken = &t
+ }
+ return next.HandleInitialize(ctx, in)
+}
+func addIdempotencyToken_opCreateReplaceRootVolumeTaskMiddleware(stack *middleware.Stack, cfg Options) error {
+ return stack.Initialize.Add(&idempotencyToken_initializeOpCreateReplaceRootVolumeTask{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before)
+}
+
+func newServiceMetadataMiddleware_opCreateReplaceRootVolumeTask(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "CreateReplaceRootVolumeTask",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateReservedInstancesListing.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateReservedInstancesListing.go
new file mode 100644
index 00000000..38992252
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateReservedInstancesListing.go
@@ -0,0 +1,163 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Creates a listing for Amazon EC2 Standard Reserved Instances to be sold in the
+// Reserved Instance Marketplace. You can submit one Standard Reserved Instance
+// listing at a time. To get a list of your Standard Reserved Instances, you can
+// use the DescribeReservedInstances operation. Only Standard Reserved Instances
+// can be sold in the Reserved Instance Marketplace. Convertible Reserved Instances
+// cannot be sold. The Reserved Instance Marketplace matches sellers who want to
+// resell Standard Reserved Instance capacity that they no longer need with buyers
+// who want to purchase additional capacity. Reserved Instances bought and sold
+// through the Reserved Instance Marketplace work like any other Reserved
+// Instances. To sell your Standard Reserved Instances, you must first register as
+// a seller in the Reserved Instance Marketplace. After completing the registration
+// process, you can create a Reserved Instance Marketplace listing of some or all
+// of your Standard Reserved Instances, and specify the upfront price to receive
+// for them. Your Standard Reserved Instance listings then become available for
+// purchase. To view the details of your Standard Reserved Instance listing, you
+// can use the DescribeReservedInstancesListings operation. For more information,
+// see Reserved Instance Marketplace
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-market-general.html) in
+// the Amazon EC2 User Guide.
+func (c *Client) CreateReservedInstancesListing(ctx context.Context, params *CreateReservedInstancesListingInput, optFns ...func(*Options)) (*CreateReservedInstancesListingOutput, error) {
+ if params == nil {
+ params = &CreateReservedInstancesListingInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CreateReservedInstancesListing", params, optFns, c.addOperationCreateReservedInstancesListingMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CreateReservedInstancesListingOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+// Contains the parameters for CreateReservedInstancesListing.
+type CreateReservedInstancesListingInput struct {
+
+ // Unique, case-sensitive identifier you provide to ensure idempotency of your
+ // listings. This helps avoid duplicate listings. For more information, see
+ // Ensuring Idempotency
+ // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html).
+ //
+ // This member is required.
+ ClientToken *string
+
+ // The number of instances that are a part of a Reserved Instance account to be
+ // listed in the Reserved Instance Marketplace. This number should be less than or
+ // equal to the instance count associated with the Reserved Instance ID specified
+ // in this call.
+ //
+ // This member is required.
+ InstanceCount *int32
+
+ // A list specifying the price of the Standard Reserved Instance for each month
+ // remaining in the Reserved Instance term.
+ //
+ // This member is required.
+ PriceSchedules []types.PriceScheduleSpecification
+
+ // The ID of the active Standard Reserved Instance.
+ //
+ // This member is required.
+ ReservedInstancesId *string
+
+ noSmithyDocumentSerde
+}
+
+// Contains the output of CreateReservedInstancesListing.
+type CreateReservedInstancesListingOutput struct {
+
+ // Information about the Standard Reserved Instance listing.
+ ReservedInstancesListings []types.ReservedInstancesListing
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCreateReservedInstancesListingMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpCreateReservedInstancesListing{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateReservedInstancesListing{}, 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 = addOpCreateReservedInstancesListingValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateReservedInstancesListing(options.Region), middleware.Before); 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_opCreateReservedInstancesListing(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "CreateReservedInstancesListing",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateRestoreImageTask.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateRestoreImageTask.go
new file mode 100644
index 00000000..711f9ca1
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateRestoreImageTask.go
@@ -0,0 +1,156 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Starts a task that restores an AMI from an Amazon S3 object that was previously
+// created by using CreateStoreImageTask
+// (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateStoreImageTask.html).
+// To use this API, you must have the required permissions. For more information,
+// see Permissions for storing and restoring AMIs using Amazon S3
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-store-restore.html#ami-s3-permissions)
+// in the Amazon Elastic Compute Cloud User Guide. For more information, see Store
+// and restore an AMI using Amazon S3
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-store-restore.html) in
+// the Amazon Elastic Compute Cloud User Guide.
+func (c *Client) CreateRestoreImageTask(ctx context.Context, params *CreateRestoreImageTaskInput, optFns ...func(*Options)) (*CreateRestoreImageTaskOutput, error) {
+ if params == nil {
+ params = &CreateRestoreImageTaskInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CreateRestoreImageTask", params, optFns, c.addOperationCreateRestoreImageTaskMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CreateRestoreImageTaskOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type CreateRestoreImageTaskInput struct {
+
+ // The name of the Amazon S3 bucket that contains the stored AMI object.
+ //
+ // This member is required.
+ Bucket *string
+
+ // The name of the stored AMI object in the bucket.
+ //
+ // This member is required.
+ ObjectKey *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The name for the restored AMI. The name must be unique for AMIs in the Region
+ // for this account. If you do not provide a name, the new AMI gets the same name
+ // as the original AMI.
+ Name *string
+
+ // The tags to apply to the AMI and snapshots on restoration. You can tag the AMI,
+ // the snapshots, or both.
+ //
+ // * To tag the AMI, the value for ResourceType must be
+ // image.
+ //
+ // * To tag the snapshots, the value for ResourceType must be snapshot. The
+ // same tag is applied to all of the snapshots that are created.
+ TagSpecifications []types.TagSpecification
+
+ noSmithyDocumentSerde
+}
+
+type CreateRestoreImageTaskOutput struct {
+
+ // The AMI ID.
+ ImageId *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCreateRestoreImageTaskMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpCreateRestoreImageTask{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateRestoreImageTask{}, 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 = addOpCreateRestoreImageTaskValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateRestoreImageTask(options.Region), middleware.Before); 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_opCreateRestoreImageTask(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "CreateRestoreImageTask",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateRoute.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateRoute.go
new file mode 100644
index 00000000..9ade8de0
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateRoute.go
@@ -0,0 +1,189 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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"
+)
+
+// Creates a route in a route table within a VPC. You must specify one of the
+// following targets: internet gateway or virtual private gateway, NAT instance,
+// NAT gateway, VPC peering connection, network interface, egress-only internet
+// gateway, or transit gateway. When determining how to route traffic, we use the
+// route with the most specific match. For example, traffic is destined for the
+// IPv4 address 192.0.2.3, and the route table includes the following two IPv4
+// routes:
+//
+// * 192.0.2.0/24 (goes to some target A)
+//
+// * 192.0.2.0/28 (goes to some
+// target B)
+//
+// Both routes apply to the traffic destined for 192.0.2.3. However, the
+// second route in the list covers a smaller number of IP addresses and is
+// therefore more specific, so we use that route to determine where to target the
+// traffic. For more information about route tables, see Route tables
+// (https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Route_Tables.html) in the
+// Amazon Virtual Private Cloud User Guide.
+func (c *Client) CreateRoute(ctx context.Context, params *CreateRouteInput, optFns ...func(*Options)) (*CreateRouteOutput, error) {
+ if params == nil {
+ params = &CreateRouteInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CreateRoute", params, optFns, c.addOperationCreateRouteMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CreateRouteOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type CreateRouteInput struct {
+
+ // The ID of the route table for the route.
+ //
+ // This member is required.
+ RouteTableId *string
+
+ // The ID of the carrier gateway. You can only use this option when the VPC
+ // contains a subnet which is associated with a Wavelength Zone.
+ CarrierGatewayId *string
+
+ // The IPv4 CIDR address block used for the destination match. Routing decisions
+ // are based on the most specific match. We modify the specified CIDR block to its
+ // canonical form; for example, if you specify 100.68.0.18/18, we modify it to
+ // 100.68.0.0/18.
+ DestinationCidrBlock *string
+
+ // The IPv6 CIDR block used for the destination match. Routing decisions are based
+ // on the most specific match.
+ DestinationIpv6CidrBlock *string
+
+ // The ID of a prefix list used for the destination match.
+ DestinationPrefixListId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // [IPv6 traffic only] The ID of an egress-only internet gateway.
+ EgressOnlyInternetGatewayId *string
+
+ // The ID of an internet gateway or virtual private gateway attached to your VPC.
+ GatewayId *string
+
+ // The ID of a NAT instance in your VPC. The operation fails if you specify an
+ // instance ID unless exactly one network interface is attached.
+ InstanceId *string
+
+ // The ID of the local gateway.
+ LocalGatewayId *string
+
+ // [IPv4 traffic only] The ID of a NAT gateway.
+ NatGatewayId *string
+
+ // The ID of a network interface.
+ NetworkInterfaceId *string
+
+ // The ID of a transit gateway.
+ TransitGatewayId *string
+
+ // The ID of a VPC endpoint. Supported for Gateway Load Balancer endpoints only.
+ VpcEndpointId *string
+
+ // The ID of a VPC peering connection.
+ VpcPeeringConnectionId *string
+
+ noSmithyDocumentSerde
+}
+
+type CreateRouteOutput struct {
+
+ // Returns true if the request succeeds; otherwise, it returns an error.
+ Return *bool
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCreateRouteMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpCreateRoute{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateRoute{}, 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 = addOpCreateRouteValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateRoute(options.Region), middleware.Before); 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_opCreateRoute(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "CreateRoute",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateRouteTable.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateRouteTable.go
new file mode 100644
index 00000000..b5439145
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateRouteTable.go
@@ -0,0 +1,134 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Creates a route table for the specified VPC. After you create a route table, you
+// can add routes and associate the table with a subnet. For more information, see
+// Route tables
+// (https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Route_Tables.html) in the
+// Amazon Virtual Private Cloud User Guide.
+func (c *Client) CreateRouteTable(ctx context.Context, params *CreateRouteTableInput, optFns ...func(*Options)) (*CreateRouteTableOutput, error) {
+ if params == nil {
+ params = &CreateRouteTableInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CreateRouteTable", params, optFns, c.addOperationCreateRouteTableMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CreateRouteTableOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type CreateRouteTableInput struct {
+
+ // The ID of the VPC.
+ //
+ // This member is required.
+ VpcId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The tags to assign to the route table.
+ TagSpecifications []types.TagSpecification
+
+ noSmithyDocumentSerde
+}
+
+type CreateRouteTableOutput struct {
+
+ // Information about the route table.
+ RouteTable *types.RouteTable
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCreateRouteTableMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpCreateRouteTable{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateRouteTable{}, 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 = addOpCreateRouteTableValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateRouteTable(options.Region), middleware.Before); 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_opCreateRouteTable(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "CreateRouteTable",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateSecurityGroup.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateSecurityGroup.go
new file mode 100644
index 00000000..6a935e49
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateSecurityGroup.go
@@ -0,0 +1,165 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Creates a security group. A security group acts as a virtual firewall for your
+// instance to control inbound and outbound traffic. For more information, see
+// Amazon EC2 security groups
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-network-security.html)
+// in the Amazon Elastic Compute Cloud User Guide and Security groups for your VPC
+// (https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_SecurityGroups.html)
+// in the Amazon Virtual Private Cloud User Guide. When you create a security
+// group, you specify a friendly name of your choice. You can have a security group
+// for use in EC2-Classic with the same name as a security group for use in a VPC.
+// However, you can't have two security groups for use in EC2-Classic with the same
+// name or two security groups for use in a VPC with the same name. You have a
+// default security group for use in EC2-Classic and a default security group for
+// use in your VPC. If you don't specify a security group when you launch an
+// instance, the instance is launched into the appropriate default security group.
+// A default security group includes a default rule that grants instances
+// unrestricted network access to each other. You can add or remove rules from your
+// security groups using AuthorizeSecurityGroupIngress,
+// AuthorizeSecurityGroupEgress, RevokeSecurityGroupIngress, and
+// RevokeSecurityGroupEgress. For more information about VPC security group limits,
+// see Amazon VPC Limits
+// (https://docs.aws.amazon.com/vpc/latest/userguide/amazon-vpc-limits.html).
+func (c *Client) CreateSecurityGroup(ctx context.Context, params *CreateSecurityGroupInput, optFns ...func(*Options)) (*CreateSecurityGroupOutput, error) {
+ if params == nil {
+ params = &CreateSecurityGroupInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CreateSecurityGroup", params, optFns, c.addOperationCreateSecurityGroupMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CreateSecurityGroupOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type CreateSecurityGroupInput struct {
+
+ // A description for the security group. This is informational only. Constraints:
+ // Up to 255 characters in length Constraints for EC2-Classic: ASCII characters
+ // Constraints for EC2-VPC: a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*
+ //
+ // This member is required.
+ Description *string
+
+ // The name of the security group. Constraints: Up to 255 characters in length.
+ // Cannot start with sg-. Constraints for EC2-Classic: ASCII characters Constraints
+ // for EC2-VPC: a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*
+ //
+ // This member is required.
+ GroupName *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The tags to assign to the security group.
+ TagSpecifications []types.TagSpecification
+
+ // [EC2-VPC] The ID of the VPC. Required for EC2-VPC.
+ VpcId *string
+
+ noSmithyDocumentSerde
+}
+
+type CreateSecurityGroupOutput struct {
+
+ // The ID of the security group.
+ GroupId *string
+
+ // The tags assigned to the security group.
+ Tags []types.Tag
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCreateSecurityGroupMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpCreateSecurityGroup{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateSecurityGroup{}, 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 = addOpCreateSecurityGroupValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateSecurityGroup(options.Region), middleware.Before); 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_opCreateSecurityGroup(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "CreateSecurityGroup",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateSnapshot.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateSnapshot.go
new file mode 100644
index 00000000..06b47898
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateSnapshot.go
@@ -0,0 +1,246 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "time"
+)
+
+// Creates a snapshot of an EBS volume and stores it in Amazon S3. You can use
+// snapshots for backups, to make copies of EBS volumes, and to save data before
+// shutting down an instance. You can create snapshots of volumes in a Region and
+// volumes on an Outpost. If you create a snapshot of a volume in a Region, the
+// snapshot must be stored in the same Region as the volume. If you create a
+// snapshot of a volume on an Outpost, the snapshot can be stored on the same
+// Outpost as the volume, or in the Region for that Outpost. When a snapshot is
+// created, any Amazon Web Services Marketplace product codes that are associated
+// with the source volume are propagated to the snapshot. You can take a snapshot
+// of an attached volume that is in use. However, snapshots only capture data that
+// has been written to your Amazon EBS volume at the time the snapshot command is
+// issued; this might exclude any data that has been cached by any applications or
+// the operating system. If you can pause any file systems on the volume long
+// enough to take a snapshot, your snapshot should be complete. However, if you
+// cannot pause all file writes to the volume, you should unmount the volume from
+// within the instance, issue the snapshot command, and then remount the volume to
+// ensure a consistent and complete snapshot. You may remount and use your volume
+// while the snapshot status is pending. To create a snapshot for Amazon EBS
+// volumes that serve as root devices, you should stop the instance before taking
+// the snapshot. Snapshots that are taken from encrypted volumes are automatically
+// encrypted. Volumes that are created from encrypted snapshots are also
+// automatically encrypted. Your encrypted volumes and any associated snapshots
+// always remain protected. You can tag your snapshots during creation. For more
+// information, see Tag your Amazon EC2 resources
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html) in the
+// Amazon Elastic Compute Cloud User Guide. For more information, see Amazon
+// Elastic Block Store
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AmazonEBS.html) and Amazon
+// EBS encryption
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html) in the
+// Amazon Elastic Compute Cloud User Guide.
+func (c *Client) CreateSnapshot(ctx context.Context, params *CreateSnapshotInput, optFns ...func(*Options)) (*CreateSnapshotOutput, error) {
+ if params == nil {
+ params = &CreateSnapshotInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CreateSnapshot", params, optFns, c.addOperationCreateSnapshotMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CreateSnapshotOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type CreateSnapshotInput struct {
+
+ // The ID of the Amazon EBS volume.
+ //
+ // This member is required.
+ VolumeId *string
+
+ // A description for the snapshot.
+ Description *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The Amazon Resource Name (ARN) of the Outpost on which to create a local
+ // snapshot.
+ //
+ // * To create a snapshot of a volume in a Region, omit this parameter.
+ // The snapshot is created in the same Region as the volume.
+ //
+ // * To create a
+ // snapshot of a volume on an Outpost and store the snapshot in the Region, omit
+ // this parameter. The snapshot is created in the Region for the Outpost.
+ //
+ // * To
+ // create a snapshot of a volume on an Outpost and store the snapshot on an
+ // Outpost, specify the ARN of the destination Outpost. The snapshot must be
+ // created on the same Outpost as the volume.
+ //
+ // For more information, see Create
+ // local snapshots from volumes on an Outpost
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/snapshots-outposts.html#create-snapshot)
+ // in the Amazon Elastic Compute Cloud User Guide.
+ OutpostArn *string
+
+ // The tags to apply to the snapshot during creation.
+ TagSpecifications []types.TagSpecification
+
+ noSmithyDocumentSerde
+}
+
+// Describes a snapshot.
+type CreateSnapshotOutput struct {
+
+ // The data encryption key identifier for the snapshot. This value is a unique
+ // identifier that corresponds to the data encryption key that was used to encrypt
+ // the original volume or snapshot copy. Because data encryption keys are inherited
+ // by volumes created from snapshots, and vice versa, if snapshots share the same
+ // data encryption key identifier, then they belong to the same volume/snapshot
+ // lineage. This parameter is only returned by DescribeSnapshots.
+ DataEncryptionKeyId *string
+
+ // The description for the snapshot.
+ Description *string
+
+ // Indicates whether the snapshot is encrypted.
+ Encrypted *bool
+
+ // The Amazon Resource Name (ARN) of the Key Management Service (KMS) KMS key that
+ // was used to protect the volume encryption key for the parent volume.
+ KmsKeyId *string
+
+ // The ARN of the Outpost on which the snapshot is stored. For more information,
+ // see Amazon EBS local snapshots on Outposts
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/snapshots-outposts.html) in
+ // the Amazon Elastic Compute Cloud User Guide.
+ OutpostArn *string
+
+ // The Amazon Web Services owner alias, from an Amazon-maintained list (amazon).
+ // This is not the user-configured Amazon Web Services account alias set using the
+ // IAM console.
+ OwnerAlias *string
+
+ // The ID of the Amazon Web Services account that owns the EBS snapshot.
+ OwnerId *string
+
+ // The progress of the snapshot, as a percentage.
+ Progress *string
+
+ // The ID of the snapshot. Each snapshot receives a unique identifier when it is
+ // created.
+ SnapshotId *string
+
+ // The time stamp when the snapshot was initiated.
+ StartTime *time.Time
+
+ // The snapshot state.
+ State types.SnapshotState
+
+ // Encrypted Amazon EBS snapshots are copied asynchronously. If a snapshot copy
+ // operation fails (for example, if the proper Key Management Service (KMS)
+ // permissions are not obtained) this field displays error state details to help
+ // you diagnose why the error occurred. This parameter is only returned by
+ // DescribeSnapshots.
+ StateMessage *string
+
+ // Any tags assigned to the snapshot.
+ Tags []types.Tag
+
+ // The ID of the volume that was used to create the snapshot. Snapshots created by
+ // the CopySnapshot action have an arbitrary volume ID that should not be used for
+ // any purpose.
+ VolumeId *string
+
+ // The size of the volume, in GiB.
+ VolumeSize *int32
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCreateSnapshotMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpCreateSnapshot{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateSnapshot{}, 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 = addOpCreateSnapshotValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateSnapshot(options.Region), middleware.Before); 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_opCreateSnapshot(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "CreateSnapshot",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateSnapshots.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateSnapshots.go
new file mode 100644
index 00000000..0f349502
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateSnapshots.go
@@ -0,0 +1,166 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Creates crash-consistent snapshots of multiple EBS volumes and stores the data
+// in S3. Volumes are chosen by specifying an instance. Any attached volumes will
+// produce one snapshot each that is crash-consistent across the instance. Boot
+// volumes can be excluded by changing the parameters. You can create multi-volume
+// snapshots of instances in a Region and instances on an Outpost. If you create
+// snapshots from an instance in a Region, the snapshots must be stored in the same
+// Region as the instance. If you create snapshots from an instance on an Outpost,
+// the snapshots can be stored on the same Outpost as the instance, or in the
+// Region for that Outpost.
+func (c *Client) CreateSnapshots(ctx context.Context, params *CreateSnapshotsInput, optFns ...func(*Options)) (*CreateSnapshotsOutput, error) {
+ if params == nil {
+ params = &CreateSnapshotsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CreateSnapshots", params, optFns, c.addOperationCreateSnapshotsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CreateSnapshotsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type CreateSnapshotsInput struct {
+
+ // The instance to specify which volumes should be included in the snapshots.
+ //
+ // This member is required.
+ InstanceSpecification *types.InstanceSpecification
+
+ // Copies the tags from the specified volume to corresponding snapshot.
+ CopyTagsFromSource types.CopyTagsFromSource
+
+ // A description propagated to every snapshot specified by the instance.
+ Description *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The Amazon Resource Name (ARN) of the Outpost on which to create the local
+ // snapshots.
+ //
+ // * To create snapshots from an instance in a Region, omit this
+ // parameter. The snapshots are created in the same Region as the instance.
+ //
+ // * To
+ // create snapshots from an instance on an Outpost and store the snapshots in the
+ // Region, omit this parameter. The snapshots are created in the Region for the
+ // Outpost.
+ //
+ // * To create snapshots from an instance on an Outpost and store the
+ // snapshots on an Outpost, specify the ARN of the destination Outpost. The
+ // snapshots must be created on the same Outpost as the instance.
+ //
+ // For more
+ // information, see Create multi-volume local snapshots from instances on an
+ // Outpost
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/snapshots-outposts.html#create-multivol-snapshot)
+ // in the Amazon Elastic Compute Cloud User Guide.
+ OutpostArn *string
+
+ // Tags to apply to every snapshot specified by the instance.
+ TagSpecifications []types.TagSpecification
+
+ noSmithyDocumentSerde
+}
+
+type CreateSnapshotsOutput struct {
+
+ // List of snapshots.
+ Snapshots []types.SnapshotInfo
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCreateSnapshotsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpCreateSnapshots{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateSnapshots{}, 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 = addOpCreateSnapshotsValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateSnapshots(options.Region), middleware.Before); 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_opCreateSnapshots(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "CreateSnapshots",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateSpotDatafeedSubscription.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateSpotDatafeedSubscription.go
new file mode 100644
index 00000000..343a6eab
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateSpotDatafeedSubscription.go
@@ -0,0 +1,139 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Creates a data feed for Spot Instances, enabling you to view Spot Instance usage
+// logs. You can create one data feed per Amazon Web Services account. For more
+// information, see Spot Instance data feed
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-data-feeds.html) in
+// the Amazon EC2 User Guide for Linux Instances.
+func (c *Client) CreateSpotDatafeedSubscription(ctx context.Context, params *CreateSpotDatafeedSubscriptionInput, optFns ...func(*Options)) (*CreateSpotDatafeedSubscriptionOutput, error) {
+ if params == nil {
+ params = &CreateSpotDatafeedSubscriptionInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CreateSpotDatafeedSubscription", params, optFns, c.addOperationCreateSpotDatafeedSubscriptionMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CreateSpotDatafeedSubscriptionOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+// Contains the parameters for CreateSpotDatafeedSubscription.
+type CreateSpotDatafeedSubscriptionInput struct {
+
+ // The name of the Amazon S3 bucket in which to store the Spot Instance data feed.
+ // For more information about bucket names, see Rules for bucket naming
+ // (https://docs.aws.amazon.com/AmazonS3/latest/dev/BucketRestrictions.html#bucketnamingrules)
+ // in the Amazon S3 Developer Guide.
+ //
+ // This member is required.
+ Bucket *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The prefix for the data feed file names.
+ Prefix *string
+
+ noSmithyDocumentSerde
+}
+
+// Contains the output of CreateSpotDatafeedSubscription.
+type CreateSpotDatafeedSubscriptionOutput struct {
+
+ // The Spot Instance data feed subscription.
+ SpotDatafeedSubscription *types.SpotDatafeedSubscription
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCreateSpotDatafeedSubscriptionMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpCreateSpotDatafeedSubscription{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateSpotDatafeedSubscription{}, 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 = addOpCreateSpotDatafeedSubscriptionValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateSpotDatafeedSubscription(options.Region), middleware.Before); 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_opCreateSpotDatafeedSubscription(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "CreateSpotDatafeedSubscription",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateStoreImageTask.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateStoreImageTask.go
new file mode 100644
index 00000000..3b1b1e17
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateStoreImageTask.go
@@ -0,0 +1,144 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Stores an AMI as a single object in an Amazon S3 bucket. To use this API, you
+// must have the required permissions. For more information, see Permissions for
+// storing and restoring AMIs using Amazon S3
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-store-restore.html#ami-s3-permissions)
+// in the Amazon Elastic Compute Cloud User Guide. For more information, see Store
+// and restore an AMI using Amazon S3
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-store-restore.html) in
+// the Amazon Elastic Compute Cloud User Guide.
+func (c *Client) CreateStoreImageTask(ctx context.Context, params *CreateStoreImageTaskInput, optFns ...func(*Options)) (*CreateStoreImageTaskOutput, error) {
+ if params == nil {
+ params = &CreateStoreImageTaskInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CreateStoreImageTask", params, optFns, c.addOperationCreateStoreImageTaskMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CreateStoreImageTaskOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type CreateStoreImageTaskInput struct {
+
+ // The name of the Amazon S3 bucket in which the AMI object will be stored. The
+ // bucket must be in the Region in which the request is being made. The AMI object
+ // appears in the bucket only after the upload task has completed.
+ //
+ // This member is required.
+ Bucket *string
+
+ // The ID of the AMI.
+ //
+ // This member is required.
+ ImageId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The tags to apply to the AMI object that will be stored in the Amazon S3 bucket.
+ S3ObjectTags []types.S3ObjectTag
+
+ noSmithyDocumentSerde
+}
+
+type CreateStoreImageTaskOutput struct {
+
+ // The name of the stored AMI object in the S3 bucket.
+ ObjectKey *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCreateStoreImageTaskMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpCreateStoreImageTask{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateStoreImageTask{}, 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 = addOpCreateStoreImageTaskValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateStoreImageTask(options.Region), middleware.Before); 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_opCreateStoreImageTask(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "CreateStoreImageTask",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateSubnet.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateSubnet.go
new file mode 100644
index 00000000..6829fdd3
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateSubnet.go
@@ -0,0 +1,174 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Creates a subnet in a specified VPC. You must specify an IPv4 CIDR block for the
+// subnet. After you create a subnet, you can't change its CIDR block. The allowed
+// block size is between a /16 netmask (65,536 IP addresses) and /28 netmask (16 IP
+// addresses). The CIDR block must not overlap with the CIDR block of an existing
+// subnet in the VPC. If you've associated an IPv6 CIDR block with your VPC, you
+// can create a subnet with an IPv6 CIDR block that uses a /64 prefix length.
+// Amazon Web Services reserves both the first four and the last IPv4 address in
+// each subnet's CIDR block. They're not available for use. If you add more than
+// one subnet to a VPC, they're set up in a star topology with a logical router in
+// the middle. When you stop an instance in a subnet, it retains its private IPv4
+// address. It's therefore possible to have a subnet with no running instances
+// (they're all stopped), but no remaining IP addresses available. For more
+// information about subnets, see Your VPC and subnets
+// (https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Subnets.html) in the
+// Amazon Virtual Private Cloud User Guide.
+func (c *Client) CreateSubnet(ctx context.Context, params *CreateSubnetInput, optFns ...func(*Options)) (*CreateSubnetOutput, error) {
+ if params == nil {
+ params = &CreateSubnetInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CreateSubnet", params, optFns, c.addOperationCreateSubnetMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CreateSubnetOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type CreateSubnetInput struct {
+
+ // The IPv4 network range for the subnet, in CIDR notation. For example,
+ // 10.0.0.0/24. We modify the specified CIDR block to its canonical form; for
+ // example, if you specify 100.68.0.18/18, we modify it to 100.68.0.0/18.
+ //
+ // This member is required.
+ CidrBlock *string
+
+ // The ID of the VPC.
+ //
+ // This member is required.
+ VpcId *string
+
+ // The Availability Zone or Local Zone for the subnet. Default: Amazon Web Services
+ // selects one for you. If you create more than one subnet in your VPC, we do not
+ // necessarily select a different zone for each subnet. To create a subnet in a
+ // Local Zone, set this value to the Local Zone ID, for example us-west-2-lax-1a.
+ // For information about the Regions that support Local Zones, see Available
+ // Regions
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html#concepts-available-regions)
+ // in the Amazon Elastic Compute Cloud User Guide. To create a subnet in an
+ // Outpost, set this value to the Availability Zone for the Outpost and specify the
+ // Outpost ARN.
+ AvailabilityZone *string
+
+ // The AZ ID or the Local Zone ID of the subnet.
+ AvailabilityZoneId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The IPv6 network range for the subnet, in CIDR notation. The subnet size must
+ // use a /64 prefix length.
+ Ipv6CidrBlock *string
+
+ // The Amazon Resource Name (ARN) of the Outpost. If you specify an Outpost ARN,
+ // you must also specify the Availability Zone of the Outpost subnet.
+ OutpostArn *string
+
+ // The tags to assign to the subnet.
+ TagSpecifications []types.TagSpecification
+
+ noSmithyDocumentSerde
+}
+
+type CreateSubnetOutput struct {
+
+ // Information about the subnet.
+ Subnet *types.Subnet
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCreateSubnetMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpCreateSubnet{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateSubnet{}, 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 = addOpCreateSubnetValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateSubnet(options.Region), middleware.Before); 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_opCreateSubnet(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "CreateSubnet",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateSubnetCidrReservation.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateSubnetCidrReservation.go
new file mode 100644
index 00000000..6f446750
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateSubnetCidrReservation.go
@@ -0,0 +1,156 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Creates a subnet CIDR reservation. For information about subnet CIDR
+// reservations, see Subnet CIDR reservations
+// (https://docs.aws.amazon.com/vpc/latest/userguide/subnet-cidr-reservation.html)
+// in the Amazon Virtual Private Cloud User Guide.
+func (c *Client) CreateSubnetCidrReservation(ctx context.Context, params *CreateSubnetCidrReservationInput, optFns ...func(*Options)) (*CreateSubnetCidrReservationOutput, error) {
+ if params == nil {
+ params = &CreateSubnetCidrReservationInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CreateSubnetCidrReservation", params, optFns, c.addOperationCreateSubnetCidrReservationMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CreateSubnetCidrReservationOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type CreateSubnetCidrReservationInput struct {
+
+ // The IPv4 or IPV6 CIDR range to reserve.
+ //
+ // This member is required.
+ Cidr *string
+
+ // The type of reservation. The following are valid values:
+ //
+ // * prefix: The Amazon
+ // EC2 Prefix Delegation feature assigns the IP addresses to network interfaces
+ // that are associated with an instance. For information about Prefix Delegation,
+ // see Prefix Delegation for Amazon EC2 network interfaces
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-prefix-delegation.html)
+ // in the Amazon Elastic Compute Cloud User Guide.
+ //
+ // * explicit: You manually assign
+ // the IP addresses to resources that reside in your subnet.
+ //
+ // This member is required.
+ ReservationType types.SubnetCidrReservationType
+
+ // The ID of the subnet.
+ //
+ // This member is required.
+ SubnetId *string
+
+ // The description to assign to the subnet CIDR reservation.
+ Description *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The tags to assign to the subnet CIDR reservation.
+ TagSpecifications []types.TagSpecification
+
+ noSmithyDocumentSerde
+}
+
+type CreateSubnetCidrReservationOutput struct {
+
+ // Information about the created subnet CIDR reservation.
+ SubnetCidrReservation *types.SubnetCidrReservation
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCreateSubnetCidrReservationMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpCreateSubnetCidrReservation{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateSubnetCidrReservation{}, 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 = addOpCreateSubnetCidrReservationValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateSubnetCidrReservation(options.Region), middleware.Before); 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_opCreateSubnetCidrReservation(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "CreateSubnetCidrReservation",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateTags.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateTags.go
new file mode 100644
index 00000000..922e77be
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateTags.go
@@ -0,0 +1,141 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Adds or overwrites only the specified tags for the specified Amazon EC2 resource
+// or resources. When you specify an existing tag key, the value is overwritten
+// with the new value. Each resource can have a maximum of 50 tags. Each tag
+// consists of a key and optional value. Tag keys must be unique per resource. For
+// more information about tags, see Tagging Your Resources
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html) in the
+// Amazon Elastic Compute Cloud User Guide. For more information about creating IAM
+// policies that control users' access to resources based on tags, see Supported
+// Resource-Level Permissions for Amazon EC2 API Actions
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-supported-iam-actions-resources.html)
+// in the Amazon Elastic Compute Cloud User Guide.
+func (c *Client) CreateTags(ctx context.Context, params *CreateTagsInput, optFns ...func(*Options)) (*CreateTagsOutput, error) {
+ if params == nil {
+ params = &CreateTagsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CreateTags", params, optFns, c.addOperationCreateTagsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CreateTagsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type CreateTagsInput struct {
+
+ // The IDs of the resources, separated by spaces. Constraints: Up to 1000 resource
+ // IDs. We recommend breaking up this request into smaller batches.
+ //
+ // This member is required.
+ Resources []string
+
+ // The tags. The value parameter is required, but if you don't want the tag to have
+ // a value, specify the parameter with no value, and we set the value to an empty
+ // string.
+ //
+ // This member is required.
+ Tags []types.Tag
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type CreateTagsOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCreateTagsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpCreateTags{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateTags{}, 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 = addOpCreateTagsValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateTags(options.Region), middleware.Before); 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_opCreateTags(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "CreateTags",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateTrafficMirrorFilter.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateTrafficMirrorFilter.go
new file mode 100644
index 00000000..057537c7
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateTrafficMirrorFilter.go
@@ -0,0 +1,179 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Creates a Traffic Mirror filter. A Traffic Mirror filter is a set of rules that
+// defines the traffic to mirror. By default, no traffic is mirrored. To mirror
+// traffic, use CreateTrafficMirrorFilterRule
+// (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateTrafficMirrorFilterRule.htm)
+// to add Traffic Mirror rules to the filter. The rules you add define what traffic
+// gets mirrored. You can also use ModifyTrafficMirrorFilterNetworkServices
+// (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ModifyTrafficMirrorFilterNetworkServices.html)
+// to mirror supported network services.
+func (c *Client) CreateTrafficMirrorFilter(ctx context.Context, params *CreateTrafficMirrorFilterInput, optFns ...func(*Options)) (*CreateTrafficMirrorFilterOutput, error) {
+ if params == nil {
+ params = &CreateTrafficMirrorFilterInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CreateTrafficMirrorFilter", params, optFns, c.addOperationCreateTrafficMirrorFilterMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CreateTrafficMirrorFilterOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type CreateTrafficMirrorFilterInput struct {
+
+ // Unique, case-sensitive identifier that you provide to ensure the idempotency of
+ // the request. For more information, see How to Ensure Idempotency
+ // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html).
+ ClientToken *string
+
+ // The description of the Traffic Mirror filter.
+ Description *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The tags to assign to a Traffic Mirror filter.
+ TagSpecifications []types.TagSpecification
+
+ noSmithyDocumentSerde
+}
+
+type CreateTrafficMirrorFilterOutput struct {
+
+ // Unique, case-sensitive identifier that you provide to ensure the idempotency of
+ // the request. For more information, see How to Ensure Idempotency
+ // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html).
+ ClientToken *string
+
+ // Information about the Traffic Mirror filter.
+ TrafficMirrorFilter *types.TrafficMirrorFilter
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCreateTrafficMirrorFilterMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpCreateTrafficMirrorFilter{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateTrafficMirrorFilter{}, 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 = addIdempotencyToken_opCreateTrafficMirrorFilterMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateTrafficMirrorFilter(options.Region), middleware.Before); 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
+}
+
+type idempotencyToken_initializeOpCreateTrafficMirrorFilter struct {
+ tokenProvider IdempotencyTokenProvider
+}
+
+func (*idempotencyToken_initializeOpCreateTrafficMirrorFilter) ID() string {
+ return "OperationIdempotencyTokenAutoFill"
+}
+
+func (m *idempotencyToken_initializeOpCreateTrafficMirrorFilter) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ if m.tokenProvider == nil {
+ return next.HandleInitialize(ctx, in)
+ }
+
+ input, ok := in.Parameters.(*CreateTrafficMirrorFilterInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateTrafficMirrorFilterInput ")
+ }
+
+ if input.ClientToken == nil {
+ t, err := m.tokenProvider.GetIdempotencyToken()
+ if err != nil {
+ return out, metadata, err
+ }
+ input.ClientToken = &t
+ }
+ return next.HandleInitialize(ctx, in)
+}
+func addIdempotencyToken_opCreateTrafficMirrorFilterMiddleware(stack *middleware.Stack, cfg Options) error {
+ return stack.Initialize.Add(&idempotencyToken_initializeOpCreateTrafficMirrorFilter{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before)
+}
+
+func newServiceMetadataMiddleware_opCreateTrafficMirrorFilter(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "CreateTrafficMirrorFilter",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateTrafficMirrorFilterRule.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateTrafficMirrorFilterRule.go
new file mode 100644
index 00000000..7865348c
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateTrafficMirrorFilterRule.go
@@ -0,0 +1,218 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Creates a Traffic Mirror filter rule. A Traffic Mirror rule defines the Traffic
+// Mirror source traffic to mirror. You need the Traffic Mirror filter ID when you
+// create the rule.
+func (c *Client) CreateTrafficMirrorFilterRule(ctx context.Context, params *CreateTrafficMirrorFilterRuleInput, optFns ...func(*Options)) (*CreateTrafficMirrorFilterRuleOutput, error) {
+ if params == nil {
+ params = &CreateTrafficMirrorFilterRuleInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CreateTrafficMirrorFilterRule", params, optFns, c.addOperationCreateTrafficMirrorFilterRuleMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CreateTrafficMirrorFilterRuleOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type CreateTrafficMirrorFilterRuleInput struct {
+
+ // The destination CIDR block to assign to the Traffic Mirror rule.
+ //
+ // This member is required.
+ DestinationCidrBlock *string
+
+ // The action to take (accept | reject) on the filtered traffic.
+ //
+ // This member is required.
+ RuleAction types.TrafficMirrorRuleAction
+
+ // The number of the Traffic Mirror rule. This number must be unique for each
+ // Traffic Mirror rule in a given direction. The rules are processed in ascending
+ // order by rule number.
+ //
+ // This member is required.
+ RuleNumber *int32
+
+ // The source CIDR block to assign to the Traffic Mirror rule.
+ //
+ // This member is required.
+ SourceCidrBlock *string
+
+ // The type of traffic (ingress | egress).
+ //
+ // This member is required.
+ TrafficDirection types.TrafficDirection
+
+ // The ID of the filter that this rule is associated with.
+ //
+ // This member is required.
+ TrafficMirrorFilterId *string
+
+ // Unique, case-sensitive identifier that you provide to ensure the idempotency of
+ // the request. For more information, see How to Ensure Idempotency
+ // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html).
+ ClientToken *string
+
+ // The description of the Traffic Mirror rule.
+ Description *string
+
+ // The destination port range.
+ DestinationPortRange *types.TrafficMirrorPortRangeRequest
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The protocol, for example UDP, to assign to the Traffic Mirror rule. For
+ // information about the protocol value, see Protocol Numbers
+ // (https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml) on
+ // the Internet Assigned Numbers Authority (IANA) website.
+ Protocol *int32
+
+ // The source port range.
+ SourcePortRange *types.TrafficMirrorPortRangeRequest
+
+ noSmithyDocumentSerde
+}
+
+type CreateTrafficMirrorFilterRuleOutput struct {
+
+ // Unique, case-sensitive identifier that you provide to ensure the idempotency of
+ // the request. For more information, see How to Ensure Idempotency
+ // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html).
+ ClientToken *string
+
+ // The Traffic Mirror rule.
+ TrafficMirrorFilterRule *types.TrafficMirrorFilterRule
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCreateTrafficMirrorFilterRuleMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpCreateTrafficMirrorFilterRule{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateTrafficMirrorFilterRule{}, 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 = addIdempotencyToken_opCreateTrafficMirrorFilterRuleMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpCreateTrafficMirrorFilterRuleValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateTrafficMirrorFilterRule(options.Region), middleware.Before); 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
+}
+
+type idempotencyToken_initializeOpCreateTrafficMirrorFilterRule struct {
+ tokenProvider IdempotencyTokenProvider
+}
+
+func (*idempotencyToken_initializeOpCreateTrafficMirrorFilterRule) ID() string {
+ return "OperationIdempotencyTokenAutoFill"
+}
+
+func (m *idempotencyToken_initializeOpCreateTrafficMirrorFilterRule) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ if m.tokenProvider == nil {
+ return next.HandleInitialize(ctx, in)
+ }
+
+ input, ok := in.Parameters.(*CreateTrafficMirrorFilterRuleInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateTrafficMirrorFilterRuleInput ")
+ }
+
+ if input.ClientToken == nil {
+ t, err := m.tokenProvider.GetIdempotencyToken()
+ if err != nil {
+ return out, metadata, err
+ }
+ input.ClientToken = &t
+ }
+ return next.HandleInitialize(ctx, in)
+}
+func addIdempotencyToken_opCreateTrafficMirrorFilterRuleMiddleware(stack *middleware.Stack, cfg Options) error {
+ return stack.Initialize.Add(&idempotencyToken_initializeOpCreateTrafficMirrorFilterRule{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before)
+}
+
+func newServiceMetadataMiddleware_opCreateTrafficMirrorFilterRule(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "CreateTrafficMirrorFilterRule",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateTrafficMirrorSession.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateTrafficMirrorSession.go
new file mode 100644
index 00000000..0d5fe6a0
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateTrafficMirrorSession.go
@@ -0,0 +1,219 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Creates a Traffic Mirror session. A Traffic Mirror session actively copies
+// packets from a Traffic Mirror source to a Traffic Mirror target. Create a
+// filter, and then assign it to the session to define a subset of the traffic to
+// mirror, for example all TCP traffic. The Traffic Mirror source and the Traffic
+// Mirror target (monitoring appliances) can be in the same VPC, or in a different
+// VPC connected via VPC peering or a transit gateway. By default, no traffic is
+// mirrored. Use CreateTrafficMirrorFilter
+// (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateTrafficMirrorFilter.htm)
+// to create filter rules that specify the traffic to mirror.
+func (c *Client) CreateTrafficMirrorSession(ctx context.Context, params *CreateTrafficMirrorSessionInput, optFns ...func(*Options)) (*CreateTrafficMirrorSessionOutput, error) {
+ if params == nil {
+ params = &CreateTrafficMirrorSessionInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CreateTrafficMirrorSession", params, optFns, c.addOperationCreateTrafficMirrorSessionMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CreateTrafficMirrorSessionOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type CreateTrafficMirrorSessionInput struct {
+
+ // The ID of the source network interface.
+ //
+ // This member is required.
+ NetworkInterfaceId *string
+
+ // The session number determines the order in which sessions are evaluated when an
+ // interface is used by multiple sessions. The first session with a matching filter
+ // is the one that mirrors the packets. Valid values are 1-32766.
+ //
+ // This member is required.
+ SessionNumber *int32
+
+ // The ID of the Traffic Mirror filter.
+ //
+ // This member is required.
+ TrafficMirrorFilterId *string
+
+ // The ID of the Traffic Mirror target.
+ //
+ // This member is required.
+ TrafficMirrorTargetId *string
+
+ // Unique, case-sensitive identifier that you provide to ensure the idempotency of
+ // the request. For more information, see How to Ensure Idempotency
+ // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html).
+ ClientToken *string
+
+ // The description of the Traffic Mirror session.
+ Description *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The number of bytes in each packet to mirror. These are bytes after the VXLAN
+ // header. Do not specify this parameter when you want to mirror the entire packet.
+ // To mirror a subset of the packet, set this to the length (in bytes) that you
+ // want to mirror. For example, if you set this value to 100, then the first 100
+ // bytes that meet the filter criteria are copied to the target. If you do not want
+ // to mirror the entire packet, use the PacketLength parameter to specify the
+ // number of bytes in each packet to mirror.
+ PacketLength *int32
+
+ // The tags to assign to a Traffic Mirror session.
+ TagSpecifications []types.TagSpecification
+
+ // The VXLAN ID for the Traffic Mirror session. For more information about the
+ // VXLAN protocol, see RFC 7348 (https://tools.ietf.org/html/rfc7348). If you do
+ // not specify a VirtualNetworkId, an account-wide unique id is chosen at random.
+ VirtualNetworkId *int32
+
+ noSmithyDocumentSerde
+}
+
+type CreateTrafficMirrorSessionOutput struct {
+
+ // Unique, case-sensitive identifier that you provide to ensure the idempotency of
+ // the request. For more information, see How to Ensure Idempotency
+ // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html).
+ ClientToken *string
+
+ // Information about the Traffic Mirror session.
+ TrafficMirrorSession *types.TrafficMirrorSession
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCreateTrafficMirrorSessionMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpCreateTrafficMirrorSession{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateTrafficMirrorSession{}, 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 = addIdempotencyToken_opCreateTrafficMirrorSessionMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpCreateTrafficMirrorSessionValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateTrafficMirrorSession(options.Region), middleware.Before); 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
+}
+
+type idempotencyToken_initializeOpCreateTrafficMirrorSession struct {
+ tokenProvider IdempotencyTokenProvider
+}
+
+func (*idempotencyToken_initializeOpCreateTrafficMirrorSession) ID() string {
+ return "OperationIdempotencyTokenAutoFill"
+}
+
+func (m *idempotencyToken_initializeOpCreateTrafficMirrorSession) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ if m.tokenProvider == nil {
+ return next.HandleInitialize(ctx, in)
+ }
+
+ input, ok := in.Parameters.(*CreateTrafficMirrorSessionInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateTrafficMirrorSessionInput ")
+ }
+
+ if input.ClientToken == nil {
+ t, err := m.tokenProvider.GetIdempotencyToken()
+ if err != nil {
+ return out, metadata, err
+ }
+ input.ClientToken = &t
+ }
+ return next.HandleInitialize(ctx, in)
+}
+func addIdempotencyToken_opCreateTrafficMirrorSessionMiddleware(stack *middleware.Stack, cfg Options) error {
+ return stack.Initialize.Add(&idempotencyToken_initializeOpCreateTrafficMirrorSession{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before)
+}
+
+func newServiceMetadataMiddleware_opCreateTrafficMirrorSession(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "CreateTrafficMirrorSession",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateTrafficMirrorTarget.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateTrafficMirrorTarget.go
new file mode 100644
index 00000000..8ac0888c
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateTrafficMirrorTarget.go
@@ -0,0 +1,185 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Creates a target for your Traffic Mirror session. A Traffic Mirror target is the
+// destination for mirrored traffic. The Traffic Mirror source and the Traffic
+// Mirror target (monitoring appliances) can be in the same VPC, or in different
+// VPCs connected via VPC peering or a transit gateway. A Traffic Mirror target can
+// be a network interface, or a Network Load Balancer. To use the target in a
+// Traffic Mirror session, use CreateTrafficMirrorSession
+// (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateTrafficMirrorSession.htm).
+func (c *Client) CreateTrafficMirrorTarget(ctx context.Context, params *CreateTrafficMirrorTargetInput, optFns ...func(*Options)) (*CreateTrafficMirrorTargetOutput, error) {
+ if params == nil {
+ params = &CreateTrafficMirrorTargetInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CreateTrafficMirrorTarget", params, optFns, c.addOperationCreateTrafficMirrorTargetMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CreateTrafficMirrorTargetOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type CreateTrafficMirrorTargetInput struct {
+
+ // Unique, case-sensitive identifier that you provide to ensure the idempotency of
+ // the request. For more information, see How to Ensure Idempotency
+ // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html).
+ ClientToken *string
+
+ // The description of the Traffic Mirror target.
+ Description *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The network interface ID that is associated with the target.
+ NetworkInterfaceId *string
+
+ // The Amazon Resource Name (ARN) of the Network Load Balancer that is associated
+ // with the target.
+ NetworkLoadBalancerArn *string
+
+ // The tags to assign to the Traffic Mirror target.
+ TagSpecifications []types.TagSpecification
+
+ noSmithyDocumentSerde
+}
+
+type CreateTrafficMirrorTargetOutput struct {
+
+ // Unique, case-sensitive identifier that you provide to ensure the idempotency of
+ // the request. For more information, see How to Ensure Idempotency
+ // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html).
+ ClientToken *string
+
+ // Information about the Traffic Mirror target.
+ TrafficMirrorTarget *types.TrafficMirrorTarget
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCreateTrafficMirrorTargetMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpCreateTrafficMirrorTarget{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateTrafficMirrorTarget{}, 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 = addIdempotencyToken_opCreateTrafficMirrorTargetMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateTrafficMirrorTarget(options.Region), middleware.Before); 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
+}
+
+type idempotencyToken_initializeOpCreateTrafficMirrorTarget struct {
+ tokenProvider IdempotencyTokenProvider
+}
+
+func (*idempotencyToken_initializeOpCreateTrafficMirrorTarget) ID() string {
+ return "OperationIdempotencyTokenAutoFill"
+}
+
+func (m *idempotencyToken_initializeOpCreateTrafficMirrorTarget) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ if m.tokenProvider == nil {
+ return next.HandleInitialize(ctx, in)
+ }
+
+ input, ok := in.Parameters.(*CreateTrafficMirrorTargetInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateTrafficMirrorTargetInput ")
+ }
+
+ if input.ClientToken == nil {
+ t, err := m.tokenProvider.GetIdempotencyToken()
+ if err != nil {
+ return out, metadata, err
+ }
+ input.ClientToken = &t
+ }
+ return next.HandleInitialize(ctx, in)
+}
+func addIdempotencyToken_opCreateTrafficMirrorTargetMiddleware(stack *middleware.Stack, cfg Options) error {
+ return stack.Initialize.Add(&idempotencyToken_initializeOpCreateTrafficMirrorTarget{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before)
+}
+
+func newServiceMetadataMiddleware_opCreateTrafficMirrorTarget(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "CreateTrafficMirrorTarget",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateTransitGateway.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateTransitGateway.go
new file mode 100644
index 00000000..f6b42fee
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateTransitGateway.go
@@ -0,0 +1,143 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Creates a transit gateway. You can use a transit gateway to interconnect your
+// virtual private clouds (VPC) and on-premises networks. After the transit gateway
+// enters the available state, you can attach your VPCs and VPN connections to the
+// transit gateway. To attach your VPCs, use CreateTransitGatewayVpcAttachment. To
+// attach a VPN connection, use CreateCustomerGateway to create a customer gateway
+// and specify the ID of the customer gateway and the ID of the transit gateway in
+// a call to CreateVpnConnection. When you create a transit gateway, we create a
+// default transit gateway route table and use it as the default association route
+// table and the default propagation route table. You can use
+// CreateTransitGatewayRouteTable to create additional transit gateway route
+// tables. If you disable automatic route propagation, we do not create a default
+// transit gateway route table. You can use
+// EnableTransitGatewayRouteTablePropagation to propagate routes from a resource
+// attachment to a transit gateway route table. If you disable automatic
+// associations, you can use AssociateTransitGatewayRouteTable to associate a
+// resource attachment with a transit gateway route table.
+func (c *Client) CreateTransitGateway(ctx context.Context, params *CreateTransitGatewayInput, optFns ...func(*Options)) (*CreateTransitGatewayOutput, error) {
+ if params == nil {
+ params = &CreateTransitGatewayInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CreateTransitGateway", params, optFns, c.addOperationCreateTransitGatewayMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CreateTransitGatewayOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type CreateTransitGatewayInput struct {
+
+ // A description of the transit gateway.
+ Description *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The transit gateway options.
+ Options *types.TransitGatewayRequestOptions
+
+ // The tags to apply to the transit gateway.
+ TagSpecifications []types.TagSpecification
+
+ noSmithyDocumentSerde
+}
+
+type CreateTransitGatewayOutput struct {
+
+ // Information about the transit gateway.
+ TransitGateway *types.TransitGateway
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCreateTransitGatewayMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpCreateTransitGateway{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateTransitGateway{}, 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_opCreateTransitGateway(options.Region), middleware.Before); 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_opCreateTransitGateway(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "CreateTransitGateway",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateTransitGatewayConnect.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateTransitGatewayConnect.go
new file mode 100644
index 00000000..f4c9f6f1
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateTransitGatewayConnect.go
@@ -0,0 +1,140 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Creates a Connect attachment from a specified transit gateway attachment. A
+// Connect attachment is a GRE-based tunnel attachment that you can use to
+// establish a connection between a transit gateway and an appliance. A Connect
+// attachment uses an existing VPC or Amazon Web Services Direct Connect attachment
+// as the underlying transport mechanism.
+func (c *Client) CreateTransitGatewayConnect(ctx context.Context, params *CreateTransitGatewayConnectInput, optFns ...func(*Options)) (*CreateTransitGatewayConnectOutput, error) {
+ if params == nil {
+ params = &CreateTransitGatewayConnectInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CreateTransitGatewayConnect", params, optFns, c.addOperationCreateTransitGatewayConnectMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CreateTransitGatewayConnectOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type CreateTransitGatewayConnectInput struct {
+
+ // The Connect attachment options.
+ //
+ // This member is required.
+ Options *types.CreateTransitGatewayConnectRequestOptions
+
+ // The ID of the transit gateway attachment. You can specify a VPC attachment or
+ // Amazon Web Services Direct Connect attachment.
+ //
+ // This member is required.
+ TransportTransitGatewayAttachmentId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The tags to apply to the Connect attachment.
+ TagSpecifications []types.TagSpecification
+
+ noSmithyDocumentSerde
+}
+
+type CreateTransitGatewayConnectOutput struct {
+
+ // Information about the Connect attachment.
+ TransitGatewayConnect *types.TransitGatewayConnect
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCreateTransitGatewayConnectMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpCreateTransitGatewayConnect{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateTransitGatewayConnect{}, 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 = addOpCreateTransitGatewayConnectValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateTransitGatewayConnect(options.Region), middleware.Before); 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_opCreateTransitGatewayConnect(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "CreateTransitGatewayConnect",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateTransitGatewayConnectPeer.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateTransitGatewayConnectPeer.go
new file mode 100644
index 00000000..cdcb8c1d
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateTransitGatewayConnectPeer.go
@@ -0,0 +1,158 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Creates a Connect peer for a specified transit gateway Connect attachment
+// between a transit gateway and an appliance. The peer address and transit gateway
+// address must be the same IP address family (IPv4 or IPv6). For more information,
+// see Connect peers
+// (https://docs.aws.amazon.com/vpc/latest/tgw/tgw-connect.html#tgw-connect-peer)
+// in the Transit Gateways Guide.
+func (c *Client) CreateTransitGatewayConnectPeer(ctx context.Context, params *CreateTransitGatewayConnectPeerInput, optFns ...func(*Options)) (*CreateTransitGatewayConnectPeerOutput, error) {
+ if params == nil {
+ params = &CreateTransitGatewayConnectPeerInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CreateTransitGatewayConnectPeer", params, optFns, c.addOperationCreateTransitGatewayConnectPeerMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CreateTransitGatewayConnectPeerOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type CreateTransitGatewayConnectPeerInput struct {
+
+ // The range of inside IP addresses that are used for BGP peering. You must specify
+ // a size /29 IPv4 CIDR block from the 169.254.0.0/16 range. The first address from
+ // the range must be configured on the appliance as the BGP IP address. You can
+ // also optionally specify a size /125 IPv6 CIDR block from the fd00::/8 range.
+ //
+ // This member is required.
+ InsideCidrBlocks []string
+
+ // The peer IP address (GRE outer IP address) on the appliance side of the Connect
+ // peer.
+ //
+ // This member is required.
+ PeerAddress *string
+
+ // The ID of the Connect attachment.
+ //
+ // This member is required.
+ TransitGatewayAttachmentId *string
+
+ // The BGP options for the Connect peer.
+ BgpOptions *types.TransitGatewayConnectRequestBgpOptions
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The tags to apply to the Connect peer.
+ TagSpecifications []types.TagSpecification
+
+ // The peer IP address (GRE outer IP address) on the transit gateway side of the
+ // Connect peer, which must be specified from a transit gateway CIDR block. If not
+ // specified, Amazon automatically assigns the first available IP address from the
+ // transit gateway CIDR block.
+ TransitGatewayAddress *string
+
+ noSmithyDocumentSerde
+}
+
+type CreateTransitGatewayConnectPeerOutput struct {
+
+ // Information about the Connect peer.
+ TransitGatewayConnectPeer *types.TransitGatewayConnectPeer
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCreateTransitGatewayConnectPeerMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpCreateTransitGatewayConnectPeer{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateTransitGatewayConnectPeer{}, 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 = addOpCreateTransitGatewayConnectPeerValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateTransitGatewayConnectPeer(options.Region), middleware.Before); 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_opCreateTransitGatewayConnectPeer(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "CreateTransitGatewayConnectPeer",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateTransitGatewayMulticastDomain.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateTransitGatewayMulticastDomain.go
new file mode 100644
index 00000000..111b35ce
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateTransitGatewayMulticastDomain.go
@@ -0,0 +1,137 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Creates a multicast domain using the specified transit gateway. The transit
+// gateway must be in the available state before you create a domain. Use
+// DescribeTransitGateways
+// (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeTransitGateways.html)
+// to see the state of transit gateway.
+func (c *Client) CreateTransitGatewayMulticastDomain(ctx context.Context, params *CreateTransitGatewayMulticastDomainInput, optFns ...func(*Options)) (*CreateTransitGatewayMulticastDomainOutput, error) {
+ if params == nil {
+ params = &CreateTransitGatewayMulticastDomainInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CreateTransitGatewayMulticastDomain", params, optFns, c.addOperationCreateTransitGatewayMulticastDomainMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CreateTransitGatewayMulticastDomainOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type CreateTransitGatewayMulticastDomainInput struct {
+
+ // The ID of the transit gateway.
+ //
+ // This member is required.
+ TransitGatewayId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The options for the transit gateway multicast domain.
+ Options *types.CreateTransitGatewayMulticastDomainRequestOptions
+
+ // The tags for the transit gateway multicast domain.
+ TagSpecifications []types.TagSpecification
+
+ noSmithyDocumentSerde
+}
+
+type CreateTransitGatewayMulticastDomainOutput struct {
+
+ // Information about the transit gateway multicast domain.
+ TransitGatewayMulticastDomain *types.TransitGatewayMulticastDomain
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCreateTransitGatewayMulticastDomainMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpCreateTransitGatewayMulticastDomain{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateTransitGatewayMulticastDomain{}, 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 = addOpCreateTransitGatewayMulticastDomainValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateTransitGatewayMulticastDomain(options.Region), middleware.Before); 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_opCreateTransitGatewayMulticastDomain(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "CreateTransitGatewayMulticastDomain",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateTransitGatewayPeeringAttachment.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateTransitGatewayPeeringAttachment.go
new file mode 100644
index 00000000..709ca90d
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateTransitGatewayPeeringAttachment.go
@@ -0,0 +1,150 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Requests a transit gateway peering attachment between the specified transit
+// gateway (requester) and a peer transit gateway (accepter). The transit gateways
+// must be in different Regions. The peer transit gateway can be in your account or
+// a different Amazon Web Services account. After you create the peering
+// attachment, the owner of the accepter transit gateway must accept the attachment
+// request.
+func (c *Client) CreateTransitGatewayPeeringAttachment(ctx context.Context, params *CreateTransitGatewayPeeringAttachmentInput, optFns ...func(*Options)) (*CreateTransitGatewayPeeringAttachmentOutput, error) {
+ if params == nil {
+ params = &CreateTransitGatewayPeeringAttachmentInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CreateTransitGatewayPeeringAttachment", params, optFns, c.addOperationCreateTransitGatewayPeeringAttachmentMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CreateTransitGatewayPeeringAttachmentOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type CreateTransitGatewayPeeringAttachmentInput struct {
+
+ // The ID of the Amazon Web Services account that owns the peer transit gateway.
+ //
+ // This member is required.
+ PeerAccountId *string
+
+ // The Region where the peer transit gateway is located.
+ //
+ // This member is required.
+ PeerRegion *string
+
+ // The ID of the peer transit gateway with which to create the peering attachment.
+ //
+ // This member is required.
+ PeerTransitGatewayId *string
+
+ // The ID of the transit gateway.
+ //
+ // This member is required.
+ TransitGatewayId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The tags to apply to the transit gateway peering attachment.
+ TagSpecifications []types.TagSpecification
+
+ noSmithyDocumentSerde
+}
+
+type CreateTransitGatewayPeeringAttachmentOutput struct {
+
+ // The transit gateway peering attachment.
+ TransitGatewayPeeringAttachment *types.TransitGatewayPeeringAttachment
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCreateTransitGatewayPeeringAttachmentMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpCreateTransitGatewayPeeringAttachment{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateTransitGatewayPeeringAttachment{}, 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 = addOpCreateTransitGatewayPeeringAttachmentValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateTransitGatewayPeeringAttachment(options.Region), middleware.Before); 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_opCreateTransitGatewayPeeringAttachment(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "CreateTransitGatewayPeeringAttachment",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateTransitGatewayPrefixListReference.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateTransitGatewayPrefixListReference.go
new file mode 100644
index 00000000..b93e8ee1
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateTransitGatewayPrefixListReference.go
@@ -0,0 +1,139 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Creates a reference (route) to a prefix list in a specified transit gateway
+// route table.
+func (c *Client) CreateTransitGatewayPrefixListReference(ctx context.Context, params *CreateTransitGatewayPrefixListReferenceInput, optFns ...func(*Options)) (*CreateTransitGatewayPrefixListReferenceOutput, error) {
+ if params == nil {
+ params = &CreateTransitGatewayPrefixListReferenceInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CreateTransitGatewayPrefixListReference", params, optFns, c.addOperationCreateTransitGatewayPrefixListReferenceMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CreateTransitGatewayPrefixListReferenceOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type CreateTransitGatewayPrefixListReferenceInput struct {
+
+ // The ID of the prefix list that is used for destination matches.
+ //
+ // This member is required.
+ PrefixListId *string
+
+ // The ID of the transit gateway route table.
+ //
+ // This member is required.
+ TransitGatewayRouteTableId *string
+
+ // Indicates whether to drop traffic that matches this route.
+ Blackhole *bool
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The ID of the attachment to which traffic is routed.
+ TransitGatewayAttachmentId *string
+
+ noSmithyDocumentSerde
+}
+
+type CreateTransitGatewayPrefixListReferenceOutput struct {
+
+ // Information about the prefix list reference.
+ TransitGatewayPrefixListReference *types.TransitGatewayPrefixListReference
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCreateTransitGatewayPrefixListReferenceMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpCreateTransitGatewayPrefixListReference{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateTransitGatewayPrefixListReference{}, 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 = addOpCreateTransitGatewayPrefixListReferenceValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateTransitGatewayPrefixListReference(options.Region), middleware.Before); 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_opCreateTransitGatewayPrefixListReference(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "CreateTransitGatewayPrefixListReference",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateTransitGatewayRoute.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateTransitGatewayRoute.go
new file mode 100644
index 00000000..c04309bc
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateTransitGatewayRoute.go
@@ -0,0 +1,139 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Creates a static route for the specified transit gateway route table.
+func (c *Client) CreateTransitGatewayRoute(ctx context.Context, params *CreateTransitGatewayRouteInput, optFns ...func(*Options)) (*CreateTransitGatewayRouteOutput, error) {
+ if params == nil {
+ params = &CreateTransitGatewayRouteInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CreateTransitGatewayRoute", params, optFns, c.addOperationCreateTransitGatewayRouteMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CreateTransitGatewayRouteOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type CreateTransitGatewayRouteInput struct {
+
+ // The CIDR range used for destination matches. Routing decisions are based on the
+ // most specific match.
+ //
+ // This member is required.
+ DestinationCidrBlock *string
+
+ // The ID of the transit gateway route table.
+ //
+ // This member is required.
+ TransitGatewayRouteTableId *string
+
+ // Indicates whether to drop traffic that matches this route.
+ Blackhole *bool
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The ID of the attachment.
+ TransitGatewayAttachmentId *string
+
+ noSmithyDocumentSerde
+}
+
+type CreateTransitGatewayRouteOutput struct {
+
+ // Information about the route.
+ Route *types.TransitGatewayRoute
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCreateTransitGatewayRouteMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpCreateTransitGatewayRoute{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateTransitGatewayRoute{}, 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 = addOpCreateTransitGatewayRouteValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateTransitGatewayRoute(options.Region), middleware.Before); 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_opCreateTransitGatewayRoute(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "CreateTransitGatewayRoute",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateTransitGatewayRouteTable.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateTransitGatewayRouteTable.go
new file mode 100644
index 00000000..8132d0f8
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateTransitGatewayRouteTable.go
@@ -0,0 +1,130 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Creates a route table for the specified transit gateway.
+func (c *Client) CreateTransitGatewayRouteTable(ctx context.Context, params *CreateTransitGatewayRouteTableInput, optFns ...func(*Options)) (*CreateTransitGatewayRouteTableOutput, error) {
+ if params == nil {
+ params = &CreateTransitGatewayRouteTableInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CreateTransitGatewayRouteTable", params, optFns, c.addOperationCreateTransitGatewayRouteTableMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CreateTransitGatewayRouteTableOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type CreateTransitGatewayRouteTableInput struct {
+
+ // The ID of the transit gateway.
+ //
+ // This member is required.
+ TransitGatewayId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The tags to apply to the transit gateway route table.
+ TagSpecifications []types.TagSpecification
+
+ noSmithyDocumentSerde
+}
+
+type CreateTransitGatewayRouteTableOutput struct {
+
+ // Information about the transit gateway route table.
+ TransitGatewayRouteTable *types.TransitGatewayRouteTable
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCreateTransitGatewayRouteTableMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpCreateTransitGatewayRouteTable{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateTransitGatewayRouteTable{}, 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 = addOpCreateTransitGatewayRouteTableValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateTransitGatewayRouteTable(options.Region), middleware.Before); 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_opCreateTransitGatewayRouteTable(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "CreateTransitGatewayRouteTable",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateTransitGatewayVpcAttachment.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateTransitGatewayVpcAttachment.go
new file mode 100644
index 00000000..781ca395
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateTransitGatewayVpcAttachment.go
@@ -0,0 +1,150 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Attaches the specified VPC to the specified transit gateway. If you attach a VPC
+// with a CIDR range that overlaps the CIDR range of a VPC that is already
+// attached, the new VPC CIDR range is not propagated to the default propagation
+// route table. To send VPC traffic to an attached transit gateway, add a route to
+// the VPC route table using CreateRoute.
+func (c *Client) CreateTransitGatewayVpcAttachment(ctx context.Context, params *CreateTransitGatewayVpcAttachmentInput, optFns ...func(*Options)) (*CreateTransitGatewayVpcAttachmentOutput, error) {
+ if params == nil {
+ params = &CreateTransitGatewayVpcAttachmentInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CreateTransitGatewayVpcAttachment", params, optFns, c.addOperationCreateTransitGatewayVpcAttachmentMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CreateTransitGatewayVpcAttachmentOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type CreateTransitGatewayVpcAttachmentInput struct {
+
+ // The IDs of one or more subnets. You can specify only one subnet per Availability
+ // Zone. You must specify at least one subnet, but we recommend that you specify
+ // two subnets for better availability. The transit gateway uses one IP address
+ // from each specified subnet.
+ //
+ // This member is required.
+ SubnetIds []string
+
+ // The ID of the transit gateway.
+ //
+ // This member is required.
+ TransitGatewayId *string
+
+ // The ID of the VPC.
+ //
+ // This member is required.
+ VpcId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The VPC attachment options.
+ Options *types.CreateTransitGatewayVpcAttachmentRequestOptions
+
+ // The tags to apply to the VPC attachment.
+ TagSpecifications []types.TagSpecification
+
+ noSmithyDocumentSerde
+}
+
+type CreateTransitGatewayVpcAttachmentOutput struct {
+
+ // Information about the VPC attachment.
+ TransitGatewayVpcAttachment *types.TransitGatewayVpcAttachment
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCreateTransitGatewayVpcAttachmentMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpCreateTransitGatewayVpcAttachment{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateTransitGatewayVpcAttachment{}, 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 = addOpCreateTransitGatewayVpcAttachmentValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateTransitGatewayVpcAttachment(options.Region), middleware.Before); 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_opCreateTransitGatewayVpcAttachment(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "CreateTransitGatewayVpcAttachment",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateVolume.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateVolume.go
new file mode 100644
index 00000000..4fc5110b
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateVolume.go
@@ -0,0 +1,350 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "time"
+)
+
+// Creates an EBS volume that can be attached to an instance in the same
+// Availability Zone. You can create a new empty volume or restore a volume from an
+// EBS snapshot. Any Amazon Web Services Marketplace product codes from the
+// snapshot are propagated to the volume. You can create encrypted volumes.
+// Encrypted volumes must be attached to instances that support Amazon EBS
+// encryption. Volumes that are created from encrypted snapshots are also
+// automatically encrypted. For more information, see Amazon EBS encryption
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html) in the
+// Amazon Elastic Compute Cloud User Guide. You can tag your volumes during
+// creation. For more information, see Tag your Amazon EC2 resources
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html) in the
+// Amazon Elastic Compute Cloud User Guide. For more information, see Create an
+// Amazon EBS volume
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-creating-volume.html)
+// in the Amazon Elastic Compute Cloud User Guide.
+func (c *Client) CreateVolume(ctx context.Context, params *CreateVolumeInput, optFns ...func(*Options)) (*CreateVolumeOutput, error) {
+ if params == nil {
+ params = &CreateVolumeInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CreateVolume", params, optFns, c.addOperationCreateVolumeMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CreateVolumeOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type CreateVolumeInput struct {
+
+ // The Availability Zone in which to create the volume.
+ //
+ // This member is required.
+ AvailabilityZone *string
+
+ // Unique, case-sensitive identifier that you provide to ensure the idempotency of
+ // the request. For more information, see Ensure Idempotency
+ // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html).
+ ClientToken *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // Indicates whether the volume should be encrypted. The effect of setting the
+ // encryption state to true depends on the volume origin (new or from a snapshot),
+ // starting encryption state, ownership, and whether encryption by default is
+ // enabled. For more information, see Encryption by default
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html#encryption-by-default)
+ // in the Amazon Elastic Compute Cloud User Guide. Encrypted Amazon EBS volumes
+ // must be attached to instances that support Amazon EBS encryption. For more
+ // information, see Supported instance types
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html#EBSEncryption_supported_instances).
+ Encrypted *bool
+
+ // The number of I/O operations per second (IOPS). For gp3, io1, and io2 volumes,
+ // this represents the number of IOPS that are provisioned for the volume. For gp2
+ // volumes, this represents the baseline performance of the volume and the rate at
+ // which the volume accumulates I/O credits for bursting. The following are the
+ // supported values for each volume type:
+ //
+ // * gp3: 3,000-16,000 IOPS
+ //
+ // * io1:
+ // 100-64,000 IOPS
+ //
+ // * io2: 100-64,000 IOPS
+ //
+ // io1 and io2 volumes support up to
+ // 64,000 IOPS only on Instances built on the Nitro System
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#ec2-nitro-instances).
+ // Other instance families support performance up to 32,000 IOPS. This parameter is
+ // required for io1 and io2 volumes. The default for gp3 volumes is 3,000 IOPS.
+ // This parameter is not supported for gp2, st1, sc1, or standard volumes.
+ Iops *int32
+
+ // The identifier of the Key Management Service (KMS) KMS key to use for Amazon EBS
+ // encryption. If this parameter is not specified, your KMS key for Amazon EBS is
+ // used. If KmsKeyId is specified, the encrypted state must be true. You can
+ // specify the KMS key using any of the following:
+ //
+ // * Key ID. For example,
+ // 1234abcd-12ab-34cd-56ef-1234567890ab.
+ //
+ // * Key alias. For example,
+ // alias/ExampleAlias.
+ //
+ // * Key ARN. For example,
+ // arn:aws:kms:us-east-1:012345678910:key/1234abcd-12ab-34cd-56ef-1234567890ab.
+ //
+ // *
+ // Alias ARN. For example,
+ // arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias.
+ //
+ // Amazon Web Services
+ // authenticates the KMS key asynchronously. Therefore, if you specify an ID,
+ // alias, or ARN that is not valid, the action can appear to complete, but
+ // eventually fails.
+ KmsKeyId *string
+
+ // Indicates whether to enable Amazon EBS Multi-Attach. If you enable Multi-Attach,
+ // you can attach the volume to up to 16 Instances built on the Nitro System
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#ec2-nitro-instances)
+ // in the same Availability Zone. This parameter is supported with io1 and io2
+ // volumes only. For more information, see Amazon EBS Multi-Attach
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-volumes-multi.html) in
+ // the Amazon Elastic Compute Cloud User Guide.
+ MultiAttachEnabled *bool
+
+ // The Amazon Resource Name (ARN) of the Outpost.
+ OutpostArn *string
+
+ // The size of the volume, in GiBs. You must specify either a snapshot ID or a
+ // volume size. If you specify a snapshot, the default is the snapshot size. You
+ // can specify a volume size that is equal to or larger than the snapshot size. The
+ // following are the supported volumes sizes for each volume type:
+ //
+ // * gp2 and gp3:
+ // 1-16,384
+ //
+ // * io1 and io2: 4-16,384
+ //
+ // * st1 and sc1: 125-16,384
+ //
+ // * standard:
+ // 1-1,024
+ Size *int32
+
+ // The snapshot from which to create the volume. You must specify either a snapshot
+ // ID or a volume size.
+ SnapshotId *string
+
+ // The tags to apply to the volume during creation.
+ TagSpecifications []types.TagSpecification
+
+ // The throughput to provision for a volume, with a maximum of 1,000 MiB/s. This
+ // parameter is valid only for gp3 volumes. Valid Range: Minimum value of 125.
+ // Maximum value of 1000.
+ Throughput *int32
+
+ // The volume type. This parameter can be one of the following values:
+ //
+ // * General
+ // Purpose SSD: gp2 | gp3
+ //
+ // * Provisioned IOPS SSD: io1 | io2
+ //
+ // * Throughput
+ // Optimized HDD: st1
+ //
+ // * Cold HDD: sc1
+ //
+ // * Magnetic: standard
+ //
+ // For more information,
+ // see Amazon EBS volume types
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html) in the
+ // Amazon Elastic Compute Cloud User Guide. Default: gp2
+ VolumeType types.VolumeType
+
+ noSmithyDocumentSerde
+}
+
+// Describes a volume.
+type CreateVolumeOutput struct {
+
+ // Information about the volume attachments.
+ Attachments []types.VolumeAttachment
+
+ // The Availability Zone for the volume.
+ AvailabilityZone *string
+
+ // The time stamp when volume creation was initiated.
+ CreateTime *time.Time
+
+ // Indicates whether the volume is encrypted.
+ Encrypted *bool
+
+ // Indicates whether the volume was created using fast snapshot restore.
+ FastRestored *bool
+
+ // The number of I/O operations per second (IOPS). For gp3, io1, and io2 volumes,
+ // this represents the number of IOPS that are provisioned for the volume. For gp2
+ // volumes, this represents the baseline performance of the volume and the rate at
+ // which the volume accumulates I/O credits for bursting.
+ Iops *int32
+
+ // The Amazon Resource Name (ARN) of the Key Management Service (KMS) KMS key that
+ // was used to protect the volume encryption key for the volume.
+ KmsKeyId *string
+
+ // Indicates whether Amazon EBS Multi-Attach is enabled.
+ MultiAttachEnabled *bool
+
+ // The Amazon Resource Name (ARN) of the Outpost.
+ OutpostArn *string
+
+ // The size of the volume, in GiBs.
+ Size *int32
+
+ // The snapshot from which the volume was created, if applicable.
+ SnapshotId *string
+
+ // The volume state.
+ State types.VolumeState
+
+ // Any tags assigned to the volume.
+ Tags []types.Tag
+
+ // The throughput that the volume supports, in MiB/s.
+ Throughput *int32
+
+ // The ID of the volume.
+ VolumeId *string
+
+ // The volume type.
+ VolumeType types.VolumeType
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCreateVolumeMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpCreateVolume{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateVolume{}, 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 = addIdempotencyToken_opCreateVolumeMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpCreateVolumeValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateVolume(options.Region), middleware.Before); 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
+}
+
+type idempotencyToken_initializeOpCreateVolume struct {
+ tokenProvider IdempotencyTokenProvider
+}
+
+func (*idempotencyToken_initializeOpCreateVolume) ID() string {
+ return "OperationIdempotencyTokenAutoFill"
+}
+
+func (m *idempotencyToken_initializeOpCreateVolume) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ if m.tokenProvider == nil {
+ return next.HandleInitialize(ctx, in)
+ }
+
+ input, ok := in.Parameters.(*CreateVolumeInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateVolumeInput ")
+ }
+
+ if input.ClientToken == nil {
+ t, err := m.tokenProvider.GetIdempotencyToken()
+ if err != nil {
+ return out, metadata, err
+ }
+ input.ClientToken = &t
+ }
+ return next.HandleInitialize(ctx, in)
+}
+func addIdempotencyToken_opCreateVolumeMiddleware(stack *middleware.Stack, cfg Options) error {
+ return stack.Initialize.Add(&idempotencyToken_initializeOpCreateVolume{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before)
+}
+
+func newServiceMetadataMiddleware_opCreateVolume(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "CreateVolume",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateVpc.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateVpc.go
new file mode 100644
index 00000000..9335754f
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateVpc.go
@@ -0,0 +1,177 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Creates a VPC with the specified IPv4 CIDR block. The smallest VPC you can
+// create uses a /28 netmask (16 IPv4 addresses), and the largest uses a /16
+// netmask (65,536 IPv4 addresses). For more information about how large to make
+// your VPC, see Your VPC and subnets
+// (https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Subnets.html) in the
+// Amazon Virtual Private Cloud User Guide. You can optionally request an IPv6 CIDR
+// block for the VPC. You can request an Amazon-provided IPv6 CIDR block from
+// Amazon's pool of IPv6 addresses, or an IPv6 CIDR block from an IPv6 address pool
+// that you provisioned through bring your own IP addresses (BYOIP
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-byoip.html)). By
+// default, each instance you launch in the VPC has the default DHCP options, which
+// include only a default DNS server that we provide (AmazonProvidedDNS). For more
+// information, see DHCP options sets
+// (https://docs.aws.amazon.com/vpc/latest/userguide/VPC_DHCP_Options.html) in the
+// Amazon Virtual Private Cloud User Guide. You can specify the instance tenancy
+// value for the VPC when you create it. You can't change this value for the VPC
+// after you create it. For more information, see Dedicated Instances
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/dedicated-instance.html) in
+// the Amazon Elastic Compute Cloud User Guide.
+func (c *Client) CreateVpc(ctx context.Context, params *CreateVpcInput, optFns ...func(*Options)) (*CreateVpcOutput, error) {
+ if params == nil {
+ params = &CreateVpcInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CreateVpc", params, optFns, c.addOperationCreateVpcMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CreateVpcOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type CreateVpcInput struct {
+
+ // The IPv4 network range for the VPC, in CIDR notation. For example, 10.0.0.0/16.
+ // We modify the specified CIDR block to its canonical form; for example, if you
+ // specify 100.68.0.18/18, we modify it to 100.68.0.0/18.
+ //
+ // This member is required.
+ CidrBlock *string
+
+ // Requests an Amazon-provided IPv6 CIDR block with a /56 prefix length for the
+ // VPC. You cannot specify the range of IP addresses, or the size of the CIDR
+ // block.
+ AmazonProvidedIpv6CidrBlock *bool
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The tenancy options for instances launched into the VPC. For default, instances
+ // are launched with shared tenancy by default. You can launch instances with any
+ // tenancy into a shared tenancy VPC. For dedicated, instances are launched as
+ // dedicated tenancy instances by default. You can only launch instances with a
+ // tenancy of dedicated or host into a dedicated tenancy VPC. Important: The host
+ // value cannot be used with this parameter. Use the default or dedicated values
+ // only. Default: default
+ InstanceTenancy types.Tenancy
+
+ // The IPv6 CIDR block from the IPv6 address pool. You must also specify Ipv6Pool
+ // in the request. To let Amazon choose the IPv6 CIDR block for you, omit this
+ // parameter.
+ Ipv6CidrBlock *string
+
+ // The name of the location from which we advertise the IPV6 CIDR block. Use this
+ // parameter to limit the address to this location. You must set
+ // AmazonProvidedIpv6CidrBlock to true to use this parameter.
+ Ipv6CidrBlockNetworkBorderGroup *string
+
+ // The ID of an IPv6 address pool from which to allocate the IPv6 CIDR block.
+ Ipv6Pool *string
+
+ // The tags to assign to the VPC.
+ TagSpecifications []types.TagSpecification
+
+ noSmithyDocumentSerde
+}
+
+type CreateVpcOutput struct {
+
+ // Information about the VPC.
+ Vpc *types.Vpc
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCreateVpcMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpCreateVpc{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateVpc{}, 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 = addOpCreateVpcValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateVpc(options.Region), middleware.Before); 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_opCreateVpc(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "CreateVpc",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateVpcEndpoint.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateVpcEndpoint.go
new file mode 100644
index 00000000..42dfa5ec
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateVpcEndpoint.go
@@ -0,0 +1,196 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Creates a VPC endpoint for a specified service. An endpoint enables you to
+// create a private connection between your VPC and the service. The service may be
+// provided by AWS, an AWS Marketplace Partner, or another AWS account. For more
+// information, see VPC Endpoints
+// (https://docs.aws.amazon.com/vpc/latest/userguide/vpc-endpoints.html) in the
+// Amazon Virtual Private Cloud User Guide. A gateway endpoint serves as a target
+// for a route in your route table for traffic destined for the AWS service. You
+// can specify an endpoint policy to attach to the endpoint, which will control
+// access to the service from your VPC. You can also specify the VPC route tables
+// that use the endpoint. An interface endpoint is a network interface in your
+// subnet that serves as an endpoint for communicating with the specified service.
+// You can specify the subnets in which to create an endpoint, and the security
+// groups to associate with the endpoint network interface. A GatewayLoadBalancer
+// endpoint is a network interface in your subnet that serves an endpoint for
+// communicating with a Gateway Load Balancer that you've configured as a VPC
+// endpoint service. Use DescribeVpcEndpointServices to get a list of supported
+// services.
+func (c *Client) CreateVpcEndpoint(ctx context.Context, params *CreateVpcEndpointInput, optFns ...func(*Options)) (*CreateVpcEndpointOutput, error) {
+ if params == nil {
+ params = &CreateVpcEndpointInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CreateVpcEndpoint", params, optFns, c.addOperationCreateVpcEndpointMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CreateVpcEndpointOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+// Contains the parameters for CreateVpcEndpoint.
+type CreateVpcEndpointInput struct {
+
+ // The service name. To get a list of available services, use the
+ // DescribeVpcEndpointServices request, or get the name from the service provider.
+ //
+ // This member is required.
+ ServiceName *string
+
+ // The ID of the VPC in which the endpoint will be used.
+ //
+ // This member is required.
+ VpcId *string
+
+ // Unique, case-sensitive identifier that you provide to ensure the idempotency of
+ // the request. For more information, see How to Ensure Idempotency
+ // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html).
+ ClientToken *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // (Interface and gateway endpoints) A policy to attach to the endpoint that
+ // controls access to the service. The policy must be in valid JSON format. If this
+ // parameter is not specified, we attach a default policy that allows full access
+ // to the service.
+ PolicyDocument *string
+
+ // (Interface endpoint) Indicates whether to associate a private hosted zone with
+ // the specified VPC. The private hosted zone contains a record set for the default
+ // public DNS name for the service for the Region (for example,
+ // kinesis.us-east-1.amazonaws.com), which resolves to the private IP addresses of
+ // the endpoint network interfaces in the VPC. This enables you to make requests to
+ // the default public DNS name for the service instead of the public DNS names that
+ // are automatically generated by the VPC endpoint service. To use a private hosted
+ // zone, you must set the following VPC attributes to true: enableDnsHostnames and
+ // enableDnsSupport. Use ModifyVpcAttribute to set the VPC attributes. Default:
+ // true
+ PrivateDnsEnabled *bool
+
+ // (Gateway endpoint) One or more route table IDs.
+ RouteTableIds []string
+
+ // (Interface endpoint) The ID of one or more security groups to associate with the
+ // endpoint network interface.
+ SecurityGroupIds []string
+
+ // (Interface and Gateway Load Balancer endpoints) The ID of one or more subnets in
+ // which to create an endpoint network interface. For a Gateway Load Balancer
+ // endpoint, you can specify one subnet only.
+ SubnetIds []string
+
+ // The tags to associate with the endpoint.
+ TagSpecifications []types.TagSpecification
+
+ // The type of endpoint. Default: Gateway
+ VpcEndpointType types.VpcEndpointType
+
+ noSmithyDocumentSerde
+}
+
+// Contains the output of CreateVpcEndpoint.
+type CreateVpcEndpointOutput struct {
+
+ // Unique, case-sensitive identifier that you provide to ensure the idempotency of
+ // the request.
+ ClientToken *string
+
+ // Information about the endpoint.
+ VpcEndpoint *types.VpcEndpoint
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCreateVpcEndpointMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpCreateVpcEndpoint{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateVpcEndpoint{}, 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 = addOpCreateVpcEndpointValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateVpcEndpoint(options.Region), middleware.Before); 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_opCreateVpcEndpoint(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "CreateVpcEndpoint",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateVpcEndpointConnectionNotification.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateVpcEndpointConnectionNotification.go
new file mode 100644
index 00000000..326ff67e
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateVpcEndpointConnectionNotification.go
@@ -0,0 +1,153 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Creates a connection notification for a specified VPC endpoint or VPC endpoint
+// service. A connection notification notifies you of specific endpoint events. You
+// must create an SNS topic to receive notifications. For more information, see
+// Create a Topic (https://docs.aws.amazon.com/sns/latest/dg/CreateTopic.html) in
+// the Amazon Simple Notification Service Developer Guide. You can create a
+// connection notification for interface endpoints only.
+func (c *Client) CreateVpcEndpointConnectionNotification(ctx context.Context, params *CreateVpcEndpointConnectionNotificationInput, optFns ...func(*Options)) (*CreateVpcEndpointConnectionNotificationOutput, error) {
+ if params == nil {
+ params = &CreateVpcEndpointConnectionNotificationInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CreateVpcEndpointConnectionNotification", params, optFns, c.addOperationCreateVpcEndpointConnectionNotificationMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CreateVpcEndpointConnectionNotificationOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type CreateVpcEndpointConnectionNotificationInput struct {
+
+ // One or more endpoint events for which to receive notifications. Valid values are
+ // Accept, Connect, Delete, and Reject.
+ //
+ // This member is required.
+ ConnectionEvents []string
+
+ // The ARN of the SNS topic for the notifications.
+ //
+ // This member is required.
+ ConnectionNotificationArn *string
+
+ // Unique, case-sensitive identifier that you provide to ensure the idempotency of
+ // the request. For more information, see How to Ensure Idempotency
+ // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html).
+ ClientToken *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The ID of the endpoint service.
+ ServiceId *string
+
+ // The ID of the endpoint.
+ VpcEndpointId *string
+
+ noSmithyDocumentSerde
+}
+
+type CreateVpcEndpointConnectionNotificationOutput struct {
+
+ // Unique, case-sensitive identifier that you provide to ensure the idempotency of
+ // the request.
+ ClientToken *string
+
+ // Information about the notification.
+ ConnectionNotification *types.ConnectionNotification
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCreateVpcEndpointConnectionNotificationMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpCreateVpcEndpointConnectionNotification{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateVpcEndpointConnectionNotification{}, 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 = addOpCreateVpcEndpointConnectionNotificationValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateVpcEndpointConnectionNotification(options.Region), middleware.Before); 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_opCreateVpcEndpointConnectionNotification(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "CreateVpcEndpointConnectionNotification",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateVpcEndpointServiceConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateVpcEndpointServiceConfiguration.go
new file mode 100644
index 00000000..315f3aab
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateVpcEndpointServiceConfiguration.go
@@ -0,0 +1,167 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Creates a VPC endpoint service configuration to which service consumers (AWS
+// accounts, IAM users, and IAM roles) can connect. To create an endpoint service
+// configuration, you must first create one of the following for your service:
+//
+// * A
+// Network Load Balancer
+// (https://docs.aws.amazon.com/elasticloadbalancing/latest/network/introduction.html).
+// Service consumers connect to your service using an interface endpoint.
+//
+// * A
+// Gateway Load Balancer
+// (https://docs.aws.amazon.com/elasticloadbalancing/latest/gateway/introduction.html).
+// Service consumers connect to your service using a Gateway Load Balancer
+// endpoint.
+//
+// For more information, see VPC Endpoint Services
+// (https://docs.aws.amazon.com/vpc/latest/userguide/endpoint-service.html) in the
+// Amazon Virtual Private Cloud User Guide. If you set the private DNS name, you
+// must prove that you own the private DNS domain name. For more information, see
+// VPC Endpoint Service Private DNS Name Verification
+// (https://docs.aws.amazon.com/vpc/latest/userguide/endpoint-services-dns-validation.html)
+// in the Amazon Virtual Private Cloud User Guide.
+func (c *Client) CreateVpcEndpointServiceConfiguration(ctx context.Context, params *CreateVpcEndpointServiceConfigurationInput, optFns ...func(*Options)) (*CreateVpcEndpointServiceConfigurationOutput, error) {
+ if params == nil {
+ params = &CreateVpcEndpointServiceConfigurationInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CreateVpcEndpointServiceConfiguration", params, optFns, c.addOperationCreateVpcEndpointServiceConfigurationMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CreateVpcEndpointServiceConfigurationOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type CreateVpcEndpointServiceConfigurationInput struct {
+
+ // Indicates whether requests from service consumers to create an endpoint to your
+ // service must be accepted. To accept a request, use AcceptVpcEndpointConnections.
+ AcceptanceRequired *bool
+
+ // Unique, case-sensitive identifier that you provide to ensure the idempotency of
+ // the request. For more information, see How to Ensure Idempotency
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html).
+ ClientToken *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The Amazon Resource Names (ARNs) of one or more Gateway Load Balancers.
+ GatewayLoadBalancerArns []string
+
+ // The Amazon Resource Names (ARNs) of one or more Network Load Balancers for your
+ // service.
+ NetworkLoadBalancerArns []string
+
+ // (Interface endpoint configuration) The private DNS name to assign to the VPC
+ // endpoint service.
+ PrivateDnsName *string
+
+ // The tags to associate with the service.
+ TagSpecifications []types.TagSpecification
+
+ noSmithyDocumentSerde
+}
+
+type CreateVpcEndpointServiceConfigurationOutput struct {
+
+ // Unique, case-sensitive identifier that you provide to ensure the idempotency of
+ // the request.
+ ClientToken *string
+
+ // Information about the service configuration.
+ ServiceConfiguration *types.ServiceConfiguration
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCreateVpcEndpointServiceConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpCreateVpcEndpointServiceConfiguration{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateVpcEndpointServiceConfiguration{}, 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_opCreateVpcEndpointServiceConfiguration(options.Region), middleware.Before); 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_opCreateVpcEndpointServiceConfiguration(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "CreateVpcEndpointServiceConfiguration",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateVpcPeeringConnection.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateVpcPeeringConnection.go
new file mode 100644
index 00000000..fb38cdf7
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateVpcPeeringConnection.go
@@ -0,0 +1,149 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Requests a VPC peering connection between two VPCs: a requester VPC that you own
+// and an accepter VPC with which to create the connection. The accepter VPC can
+// belong to another Amazon Web Services account and can be in a different Region
+// to the requester VPC. The requester VPC and accepter VPC cannot have overlapping
+// CIDR blocks. Limitations and rules apply to a VPC peering connection. For more
+// information, see the limitations
+// (https://docs.aws.amazon.com/vpc/latest/peering/vpc-peering-basics.html#vpc-peering-limitations)
+// section in the VPC Peering Guide. The owner of the accepter VPC must accept the
+// peering request to activate the peering connection. The VPC peering connection
+// request expires after 7 days, after which it cannot be accepted or rejected. If
+// you create a VPC peering connection request between VPCs with overlapping CIDR
+// blocks, the VPC peering connection has a status of failed.
+func (c *Client) CreateVpcPeeringConnection(ctx context.Context, params *CreateVpcPeeringConnectionInput, optFns ...func(*Options)) (*CreateVpcPeeringConnectionOutput, error) {
+ if params == nil {
+ params = &CreateVpcPeeringConnectionInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CreateVpcPeeringConnection", params, optFns, c.addOperationCreateVpcPeeringConnectionMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CreateVpcPeeringConnectionOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type CreateVpcPeeringConnectionInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The Amazon Web Services account ID of the owner of the accepter VPC. Default:
+ // Your Amazon Web Services account ID
+ PeerOwnerId *string
+
+ // The Region code for the accepter VPC, if the accepter VPC is located in a Region
+ // other than the Region in which you make the request. Default: The Region in
+ // which you make the request.
+ PeerRegion *string
+
+ // The ID of the VPC with which you are creating the VPC peering connection. You
+ // must specify this parameter in the request.
+ PeerVpcId *string
+
+ // The tags to assign to the peering connection.
+ TagSpecifications []types.TagSpecification
+
+ // The ID of the requester VPC. You must specify this parameter in the request.
+ VpcId *string
+
+ noSmithyDocumentSerde
+}
+
+type CreateVpcPeeringConnectionOutput struct {
+
+ // Information about the VPC peering connection.
+ VpcPeeringConnection *types.VpcPeeringConnection
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCreateVpcPeeringConnectionMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpCreateVpcPeeringConnection{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateVpcPeeringConnection{}, 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_opCreateVpcPeeringConnection(options.Region), middleware.Before); 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_opCreateVpcPeeringConnection(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "CreateVpcPeeringConnection",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateVpnConnection.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateVpnConnection.go
new file mode 100644
index 00000000..a7e2192f
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateVpnConnection.go
@@ -0,0 +1,160 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Creates a VPN connection between an existing virtual private gateway or transit
+// gateway and a customer gateway. The supported connection type is ipsec.1. The
+// response includes information that you need to give to your network
+// administrator to configure your customer gateway. We strongly recommend that you
+// use HTTPS when calling this operation because the response contains sensitive
+// cryptographic information for configuring your customer gateway device. If you
+// decide to shut down your VPN connection for any reason and later create a new
+// VPN connection, you must reconfigure your customer gateway with the new
+// information returned from this call. This is an idempotent operation. If you
+// perform the operation more than once, Amazon EC2 doesn't return an error. For
+// more information, see Amazon Web Services Site-to-Site VPN
+// (https://docs.aws.amazon.com/vpn/latest/s2svpn/VPC_VPN.html) in the Amazon Web
+// Services Site-to-Site VPN User Guide.
+func (c *Client) CreateVpnConnection(ctx context.Context, params *CreateVpnConnectionInput, optFns ...func(*Options)) (*CreateVpnConnectionOutput, error) {
+ if params == nil {
+ params = &CreateVpnConnectionInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CreateVpnConnection", params, optFns, c.addOperationCreateVpnConnectionMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CreateVpnConnectionOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+// Contains the parameters for CreateVpnConnection.
+type CreateVpnConnectionInput struct {
+
+ // The ID of the customer gateway.
+ //
+ // This member is required.
+ CustomerGatewayId *string
+
+ // The type of VPN connection (ipsec.1).
+ //
+ // This member is required.
+ Type *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The options for the VPN connection.
+ Options *types.VpnConnectionOptionsSpecification
+
+ // The tags to apply to the VPN connection.
+ TagSpecifications []types.TagSpecification
+
+ // The ID of the transit gateway. If you specify a transit gateway, you cannot
+ // specify a virtual private gateway.
+ TransitGatewayId *string
+
+ // The ID of the virtual private gateway. If you specify a virtual private gateway,
+ // you cannot specify a transit gateway.
+ VpnGatewayId *string
+
+ noSmithyDocumentSerde
+}
+
+// Contains the output of CreateVpnConnection.
+type CreateVpnConnectionOutput struct {
+
+ // Information about the VPN connection.
+ VpnConnection *types.VpnConnection
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCreateVpnConnectionMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpCreateVpnConnection{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateVpnConnection{}, 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 = addOpCreateVpnConnectionValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateVpnConnection(options.Region), middleware.Before); 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_opCreateVpnConnection(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "CreateVpnConnection",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateVpnConnectionRoute.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateVpnConnectionRoute.go
new file mode 100644
index 00000000..fce5cf69
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateVpnConnectionRoute.go
@@ -0,0 +1,127 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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"
+)
+
+// Creates a static route associated with a VPN connection between an existing
+// virtual private gateway and a VPN customer gateway. The static route allows
+// traffic to be routed from the virtual private gateway to the VPN customer
+// gateway. For more information, see Amazon Web Services Site-to-Site VPN
+// (https://docs.aws.amazon.com/vpn/latest/s2svpn/VPC_VPN.html) in the Amazon Web
+// Services Site-to-Site VPN User Guide.
+func (c *Client) CreateVpnConnectionRoute(ctx context.Context, params *CreateVpnConnectionRouteInput, optFns ...func(*Options)) (*CreateVpnConnectionRouteOutput, error) {
+ if params == nil {
+ params = &CreateVpnConnectionRouteInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CreateVpnConnectionRoute", params, optFns, c.addOperationCreateVpnConnectionRouteMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CreateVpnConnectionRouteOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+// Contains the parameters for CreateVpnConnectionRoute.
+type CreateVpnConnectionRouteInput struct {
+
+ // The CIDR block associated with the local subnet of the customer network.
+ //
+ // This member is required.
+ DestinationCidrBlock *string
+
+ // The ID of the VPN connection.
+ //
+ // This member is required.
+ VpnConnectionId *string
+
+ noSmithyDocumentSerde
+}
+
+type CreateVpnConnectionRouteOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCreateVpnConnectionRouteMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpCreateVpnConnectionRoute{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateVpnConnectionRoute{}, 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 = addOpCreateVpnConnectionRouteValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateVpnConnectionRoute(options.Region), middleware.Before); 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_opCreateVpnConnectionRoute(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "CreateVpnConnectionRoute",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateVpnGateway.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateVpnGateway.go
new file mode 100644
index 00000000..0dd58126
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateVpnGateway.go
@@ -0,0 +1,145 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Creates a virtual private gateway. A virtual private gateway is the endpoint on
+// the VPC side of your VPN connection. You can create a virtual private gateway
+// before creating the VPC itself. For more information, see Amazon Web Services
+// Site-to-Site VPN (https://docs.aws.amazon.com/vpn/latest/s2svpn/VPC_VPN.html) in
+// the Amazon Web Services Site-to-Site VPN User Guide.
+func (c *Client) CreateVpnGateway(ctx context.Context, params *CreateVpnGatewayInput, optFns ...func(*Options)) (*CreateVpnGatewayOutput, error) {
+ if params == nil {
+ params = &CreateVpnGatewayInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CreateVpnGateway", params, optFns, c.addOperationCreateVpnGatewayMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CreateVpnGatewayOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+// Contains the parameters for CreateVpnGateway.
+type CreateVpnGatewayInput struct {
+
+ // The type of VPN connection this virtual private gateway supports.
+ //
+ // This member is required.
+ Type types.GatewayType
+
+ // A private Autonomous System Number (ASN) for the Amazon side of a BGP session.
+ // If you're using a 16-bit ASN, it must be in the 64512 to 65534 range. If you're
+ // using a 32-bit ASN, it must be in the 4200000000 to 4294967294 range. Default:
+ // 64512
+ AmazonSideAsn *int64
+
+ // The Availability Zone for the virtual private gateway.
+ AvailabilityZone *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The tags to apply to the virtual private gateway.
+ TagSpecifications []types.TagSpecification
+
+ noSmithyDocumentSerde
+}
+
+// Contains the output of CreateVpnGateway.
+type CreateVpnGatewayOutput struct {
+
+ // Information about the virtual private gateway.
+ VpnGateway *types.VpnGateway
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCreateVpnGatewayMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpCreateVpnGateway{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateVpnGateway{}, 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 = addOpCreateVpnGatewayValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateVpnGateway(options.Region), middleware.Before); 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_opCreateVpnGateway(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "CreateVpnGateway",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteCarrierGateway.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteCarrierGateway.go
new file mode 100644
index 00000000..cf6bf4a3
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteCarrierGateway.go
@@ -0,0 +1,130 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Deletes a carrier gateway. If you do not delete the route that contains the
+// carrier gateway as the Target, the route is a blackhole route. For information
+// about how to delete a route, see DeleteRoute
+// (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DeleteRoute.html).
+func (c *Client) DeleteCarrierGateway(ctx context.Context, params *DeleteCarrierGatewayInput, optFns ...func(*Options)) (*DeleteCarrierGatewayOutput, error) {
+ if params == nil {
+ params = &DeleteCarrierGatewayInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeleteCarrierGateway", params, optFns, c.addOperationDeleteCarrierGatewayMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeleteCarrierGatewayOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DeleteCarrierGatewayInput struct {
+
+ // The ID of the carrier gateway.
+ //
+ // This member is required.
+ CarrierGatewayId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type DeleteCarrierGatewayOutput struct {
+
+ // Information about the carrier gateway.
+ CarrierGateway *types.CarrierGateway
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeleteCarrierGatewayMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteCarrierGateway{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteCarrierGateway{}, 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 = addOpDeleteCarrierGatewayValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteCarrierGateway(options.Region), middleware.Before); 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_opDeleteCarrierGateway(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DeleteCarrierGateway",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteClientVpnEndpoint.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteClientVpnEndpoint.go
new file mode 100644
index 00000000..061bbd7a
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteClientVpnEndpoint.go
@@ -0,0 +1,128 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Deletes the specified Client VPN endpoint. You must disassociate all target
+// networks before you can delete a Client VPN endpoint.
+func (c *Client) DeleteClientVpnEndpoint(ctx context.Context, params *DeleteClientVpnEndpointInput, optFns ...func(*Options)) (*DeleteClientVpnEndpointOutput, error) {
+ if params == nil {
+ params = &DeleteClientVpnEndpointInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeleteClientVpnEndpoint", params, optFns, c.addOperationDeleteClientVpnEndpointMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeleteClientVpnEndpointOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DeleteClientVpnEndpointInput struct {
+
+ // The ID of the Client VPN to be deleted.
+ //
+ // This member is required.
+ ClientVpnEndpointId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type DeleteClientVpnEndpointOutput struct {
+
+ // The current state of the Client VPN endpoint.
+ Status *types.ClientVpnEndpointStatus
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeleteClientVpnEndpointMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteClientVpnEndpoint{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteClientVpnEndpoint{}, 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 = addOpDeleteClientVpnEndpointValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteClientVpnEndpoint(options.Region), middleware.Before); 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_opDeleteClientVpnEndpoint(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DeleteClientVpnEndpoint",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteClientVpnRoute.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteClientVpnRoute.go
new file mode 100644
index 00000000..41d72574
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteClientVpnRoute.go
@@ -0,0 +1,139 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Deletes a route from a Client VPN endpoint. You can only delete routes that you
+// manually added using the CreateClientVpnRoute action. You cannot delete routes
+// that were automatically added when associating a subnet. To remove routes that
+// have been automatically added, disassociate the target subnet from the Client
+// VPN endpoint.
+func (c *Client) DeleteClientVpnRoute(ctx context.Context, params *DeleteClientVpnRouteInput, optFns ...func(*Options)) (*DeleteClientVpnRouteOutput, error) {
+ if params == nil {
+ params = &DeleteClientVpnRouteInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeleteClientVpnRoute", params, optFns, c.addOperationDeleteClientVpnRouteMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeleteClientVpnRouteOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DeleteClientVpnRouteInput struct {
+
+ // The ID of the Client VPN endpoint from which the route is to be deleted.
+ //
+ // This member is required.
+ ClientVpnEndpointId *string
+
+ // The IPv4 address range, in CIDR notation, of the route to be deleted.
+ //
+ // This member is required.
+ DestinationCidrBlock *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The ID of the target subnet used by the route.
+ TargetVpcSubnetId *string
+
+ noSmithyDocumentSerde
+}
+
+type DeleteClientVpnRouteOutput struct {
+
+ // The current state of the route.
+ Status *types.ClientVpnRouteStatus
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeleteClientVpnRouteMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteClientVpnRoute{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteClientVpnRoute{}, 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 = addOpDeleteClientVpnRouteValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteClientVpnRoute(options.Region), middleware.Before); 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_opDeleteClientVpnRoute(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DeleteClientVpnRoute",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteCustomerGateway.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteCustomerGateway.go
new file mode 100644
index 00000000..d87f6814
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteCustomerGateway.go
@@ -0,0 +1,124 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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 the specified customer gateway. You must delete the VPN connection
+// before you can delete the customer gateway.
+func (c *Client) DeleteCustomerGateway(ctx context.Context, params *DeleteCustomerGatewayInput, optFns ...func(*Options)) (*DeleteCustomerGatewayOutput, error) {
+ if params == nil {
+ params = &DeleteCustomerGatewayInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeleteCustomerGateway", params, optFns, c.addOperationDeleteCustomerGatewayMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeleteCustomerGatewayOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+// Contains the parameters for DeleteCustomerGateway.
+type DeleteCustomerGatewayInput struct {
+
+ // The ID of the customer gateway.
+ //
+ // This member is required.
+ CustomerGatewayId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type DeleteCustomerGatewayOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeleteCustomerGatewayMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteCustomerGateway{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteCustomerGateway{}, 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 = addOpDeleteCustomerGatewayValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteCustomerGateway(options.Region), middleware.Before); 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_opDeleteCustomerGateway(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DeleteCustomerGateway",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteDhcpOptions.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteDhcpOptions.go
new file mode 100644
index 00000000..2e6ccb94
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteDhcpOptions.go
@@ -0,0 +1,125 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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 the specified set of DHCP options. You must disassociate the set of DHCP
+// options before you can delete it. You can disassociate the set of DHCP options
+// by associating either a new set of options or the default set of options with
+// the VPC.
+func (c *Client) DeleteDhcpOptions(ctx context.Context, params *DeleteDhcpOptionsInput, optFns ...func(*Options)) (*DeleteDhcpOptionsOutput, error) {
+ if params == nil {
+ params = &DeleteDhcpOptionsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeleteDhcpOptions", params, optFns, c.addOperationDeleteDhcpOptionsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeleteDhcpOptionsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DeleteDhcpOptionsInput struct {
+
+ // The ID of the DHCP options set.
+ //
+ // This member is required.
+ DhcpOptionsId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type DeleteDhcpOptionsOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeleteDhcpOptionsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteDhcpOptions{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteDhcpOptions{}, 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 = addOpDeleteDhcpOptionsValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteDhcpOptions(options.Region), middleware.Before); 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_opDeleteDhcpOptions(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DeleteDhcpOptions",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteEgressOnlyInternetGateway.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteEgressOnlyInternetGateway.go
new file mode 100644
index 00000000..5ec37545
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteEgressOnlyInternetGateway.go
@@ -0,0 +1,126 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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 an egress-only internet gateway.
+func (c *Client) DeleteEgressOnlyInternetGateway(ctx context.Context, params *DeleteEgressOnlyInternetGatewayInput, optFns ...func(*Options)) (*DeleteEgressOnlyInternetGatewayOutput, error) {
+ if params == nil {
+ params = &DeleteEgressOnlyInternetGatewayInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeleteEgressOnlyInternetGateway", params, optFns, c.addOperationDeleteEgressOnlyInternetGatewayMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeleteEgressOnlyInternetGatewayOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DeleteEgressOnlyInternetGatewayInput struct {
+
+ // The ID of the egress-only internet gateway.
+ //
+ // This member is required.
+ EgressOnlyInternetGatewayId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type DeleteEgressOnlyInternetGatewayOutput struct {
+
+ // Returns true if the request succeeds; otherwise, it returns an error.
+ ReturnCode *bool
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeleteEgressOnlyInternetGatewayMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteEgressOnlyInternetGateway{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteEgressOnlyInternetGateway{}, 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 = addOpDeleteEgressOnlyInternetGatewayValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteEgressOnlyInternetGateway(options.Region), middleware.Before); 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_opDeleteEgressOnlyInternetGateway(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DeleteEgressOnlyInternetGateway",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteFleets.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteFleets.go
new file mode 100644
index 00000000..8d983b40
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteFleets.go
@@ -0,0 +1,160 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Deletes the specified EC2 Fleet. After you delete an EC2 Fleet, it launches no
+// new instances. You must specify whether a deleted EC2 Fleet should also
+// terminate its instances. If you choose to terminate the instances, the EC2 Fleet
+// enters the deleted_terminating state. Otherwise, the EC2 Fleet enters the
+// deleted_running state, and the instances continue to run until they are
+// interrupted or you terminate them manually. For instant fleets, EC2 Fleet must
+// terminate the instances when the fleet is deleted. A deleted instant fleet with
+// running instances is not supported. Restrictions
+//
+// * You can delete up to 25
+// instant fleets in a single request. If you exceed this number, no instant fleets
+// are deleted and an error is returned. There is no restriction on the number of
+// fleets of type maintain or request that can be deleted in a single request.
+//
+// *
+// Up to 1000 instances can be terminated in a single request to delete instant
+// fleets.
+//
+// For more information, see Deleting an EC2 Fleet
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/manage-ec2-fleet.html#delete-fleet)
+// in the Amazon EC2 User Guide.
+func (c *Client) DeleteFleets(ctx context.Context, params *DeleteFleetsInput, optFns ...func(*Options)) (*DeleteFleetsOutput, error) {
+ if params == nil {
+ params = &DeleteFleetsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeleteFleets", params, optFns, c.addOperationDeleteFleetsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeleteFleetsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DeleteFleetsInput struct {
+
+ // The IDs of the EC2 Fleets.
+ //
+ // This member is required.
+ FleetIds []string
+
+ // Indicates whether to terminate the instances when the EC2 Fleet is deleted. The
+ // default is to terminate the instances. To let the instances continue to run
+ // after the EC2 Fleet is deleted, specify NoTerminateInstances. Supported only for
+ // fleets of type maintain and request. For instant fleets, you cannot specify
+ // NoTerminateInstances. A deleted instant fleet with running instances is not
+ // supported.
+ //
+ // This member is required.
+ TerminateInstances *bool
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type DeleteFleetsOutput struct {
+
+ // Information about the EC2 Fleets that are successfully deleted.
+ SuccessfulFleetDeletions []types.DeleteFleetSuccessItem
+
+ // Information about the EC2 Fleets that are not successfully deleted.
+ UnsuccessfulFleetDeletions []types.DeleteFleetErrorItem
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeleteFleetsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteFleets{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteFleets{}, 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 = addOpDeleteFleetsValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteFleets(options.Region), middleware.Before); 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_opDeleteFleets(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DeleteFleets",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteFlowLogs.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteFlowLogs.go
new file mode 100644
index 00000000..ac3800fb
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteFlowLogs.go
@@ -0,0 +1,127 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Deletes one or more flow logs.
+func (c *Client) DeleteFlowLogs(ctx context.Context, params *DeleteFlowLogsInput, optFns ...func(*Options)) (*DeleteFlowLogsOutput, error) {
+ if params == nil {
+ params = &DeleteFlowLogsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeleteFlowLogs", params, optFns, c.addOperationDeleteFlowLogsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeleteFlowLogsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DeleteFlowLogsInput struct {
+
+ // One or more flow log IDs. Constraint: Maximum of 1000 flow log IDs.
+ //
+ // This member is required.
+ FlowLogIds []string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type DeleteFlowLogsOutput struct {
+
+ // Information about the flow logs that could not be deleted successfully.
+ Unsuccessful []types.UnsuccessfulItem
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeleteFlowLogsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteFlowLogs{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteFlowLogs{}, 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 = addOpDeleteFlowLogsValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteFlowLogs(options.Region), middleware.Before); 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_opDeleteFlowLogs(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DeleteFlowLogs",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteFpgaImage.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteFpgaImage.go
new file mode 100644
index 00000000..5235ed51
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteFpgaImage.go
@@ -0,0 +1,126 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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 the specified Amazon FPGA Image (AFI).
+func (c *Client) DeleteFpgaImage(ctx context.Context, params *DeleteFpgaImageInput, optFns ...func(*Options)) (*DeleteFpgaImageOutput, error) {
+ if params == nil {
+ params = &DeleteFpgaImageInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeleteFpgaImage", params, optFns, c.addOperationDeleteFpgaImageMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeleteFpgaImageOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DeleteFpgaImageInput struct {
+
+ // The ID of the AFI.
+ //
+ // This member is required.
+ FpgaImageId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type DeleteFpgaImageOutput struct {
+
+ // Is true if the request succeeds, and an error otherwise.
+ Return *bool
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeleteFpgaImageMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteFpgaImage{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteFpgaImage{}, 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 = addOpDeleteFpgaImageValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteFpgaImage(options.Region), middleware.Before); 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_opDeleteFpgaImage(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DeleteFpgaImage",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteInstanceEventWindow.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteInstanceEventWindow.go
new file mode 100644
index 00000000..a4fc2aa9
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteInstanceEventWindow.go
@@ -0,0 +1,134 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Deletes the specified event window. For more information, see Define event
+// windows for scheduled events
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/event-windows.html) in the
+// Amazon EC2 User Guide.
+func (c *Client) DeleteInstanceEventWindow(ctx context.Context, params *DeleteInstanceEventWindowInput, optFns ...func(*Options)) (*DeleteInstanceEventWindowOutput, error) {
+ if params == nil {
+ params = &DeleteInstanceEventWindowInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeleteInstanceEventWindow", params, optFns, c.addOperationDeleteInstanceEventWindowMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeleteInstanceEventWindowOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DeleteInstanceEventWindowInput struct {
+
+ // The ID of the event window.
+ //
+ // This member is required.
+ InstanceEventWindowId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // Specify true to force delete the event window. Use the force delete parameter if
+ // the event window is currently associated with targets.
+ ForceDelete *bool
+
+ noSmithyDocumentSerde
+}
+
+type DeleteInstanceEventWindowOutput struct {
+
+ // The state of the event window.
+ InstanceEventWindowState *types.InstanceEventWindowStateChange
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeleteInstanceEventWindowMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteInstanceEventWindow{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteInstanceEventWindow{}, 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 = addOpDeleteInstanceEventWindowValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteInstanceEventWindow(options.Region), middleware.Before); 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_opDeleteInstanceEventWindow(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DeleteInstanceEventWindow",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteInternetGateway.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteInternetGateway.go
new file mode 100644
index 00000000..362b9d51
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteInternetGateway.go
@@ -0,0 +1,123 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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 the specified internet gateway. You must detach the internet gateway
+// from the VPC before you can delete it.
+func (c *Client) DeleteInternetGateway(ctx context.Context, params *DeleteInternetGatewayInput, optFns ...func(*Options)) (*DeleteInternetGatewayOutput, error) {
+ if params == nil {
+ params = &DeleteInternetGatewayInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeleteInternetGateway", params, optFns, c.addOperationDeleteInternetGatewayMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeleteInternetGatewayOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DeleteInternetGatewayInput struct {
+
+ // The ID of the internet gateway.
+ //
+ // This member is required.
+ InternetGatewayId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type DeleteInternetGatewayOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeleteInternetGatewayMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteInternetGateway{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteInternetGateway{}, 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 = addOpDeleteInternetGatewayValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteInternetGateway(options.Region), middleware.Before); 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_opDeleteInternetGateway(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DeleteInternetGateway",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteKeyPair.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteKeyPair.go
new file mode 100644
index 00000000..0e9c67c9
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteKeyPair.go
@@ -0,0 +1,120 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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 the specified key pair, by removing the public key from Amazon EC2.
+func (c *Client) DeleteKeyPair(ctx context.Context, params *DeleteKeyPairInput, optFns ...func(*Options)) (*DeleteKeyPairOutput, error) {
+ if params == nil {
+ params = &DeleteKeyPairInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeleteKeyPair", params, optFns, c.addOperationDeleteKeyPairMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeleteKeyPairOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DeleteKeyPairInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The name of the key pair.
+ KeyName *string
+
+ // The ID of the key pair.
+ KeyPairId *string
+
+ noSmithyDocumentSerde
+}
+
+type DeleteKeyPairOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeleteKeyPairMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteKeyPair{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteKeyPair{}, 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_opDeleteKeyPair(options.Region), middleware.Before); 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_opDeleteKeyPair(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DeleteKeyPair",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteLaunchTemplate.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteLaunchTemplate.go
new file mode 100644
index 00000000..d4285716
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteLaunchTemplate.go
@@ -0,0 +1,128 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Deletes a launch template. Deleting a launch template deletes all of its
+// versions.
+func (c *Client) DeleteLaunchTemplate(ctx context.Context, params *DeleteLaunchTemplateInput, optFns ...func(*Options)) (*DeleteLaunchTemplateOutput, error) {
+ if params == nil {
+ params = &DeleteLaunchTemplateInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeleteLaunchTemplate", params, optFns, c.addOperationDeleteLaunchTemplateMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeleteLaunchTemplateOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DeleteLaunchTemplateInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The ID of the launch template. You must specify either the launch template ID or
+ // launch template name in the request.
+ LaunchTemplateId *string
+
+ // The name of the launch template. You must specify either the launch template ID
+ // or launch template name in the request.
+ LaunchTemplateName *string
+
+ noSmithyDocumentSerde
+}
+
+type DeleteLaunchTemplateOutput struct {
+
+ // Information about the launch template.
+ LaunchTemplate *types.LaunchTemplate
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeleteLaunchTemplateMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteLaunchTemplate{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteLaunchTemplate{}, 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_opDeleteLaunchTemplate(options.Region), middleware.Before); 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_opDeleteLaunchTemplate(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DeleteLaunchTemplate",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteLaunchTemplateVersions.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteLaunchTemplateVersions.go
new file mode 100644
index 00000000..8553b850
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteLaunchTemplateVersions.go
@@ -0,0 +1,141 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Deletes one or more versions of a launch template. You cannot delete the default
+// version of a launch template; you must first assign a different version as the
+// default. If the default version is the only version for the launch template, you
+// must delete the entire launch template using DeleteLaunchTemplate.
+func (c *Client) DeleteLaunchTemplateVersions(ctx context.Context, params *DeleteLaunchTemplateVersionsInput, optFns ...func(*Options)) (*DeleteLaunchTemplateVersionsOutput, error) {
+ if params == nil {
+ params = &DeleteLaunchTemplateVersionsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeleteLaunchTemplateVersions", params, optFns, c.addOperationDeleteLaunchTemplateVersionsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeleteLaunchTemplateVersionsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DeleteLaunchTemplateVersionsInput struct {
+
+ // The version numbers of one or more launch template versions to delete.
+ //
+ // This member is required.
+ Versions []string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The ID of the launch template. You must specify either the launch template ID or
+ // launch template name in the request.
+ LaunchTemplateId *string
+
+ // The name of the launch template. You must specify either the launch template ID
+ // or launch template name in the request.
+ LaunchTemplateName *string
+
+ noSmithyDocumentSerde
+}
+
+type DeleteLaunchTemplateVersionsOutput struct {
+
+ // Information about the launch template versions that were successfully deleted.
+ SuccessfullyDeletedLaunchTemplateVersions []types.DeleteLaunchTemplateVersionsResponseSuccessItem
+
+ // Information about the launch template versions that could not be deleted.
+ UnsuccessfullyDeletedLaunchTemplateVersions []types.DeleteLaunchTemplateVersionsResponseErrorItem
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeleteLaunchTemplateVersionsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteLaunchTemplateVersions{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteLaunchTemplateVersions{}, 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 = addOpDeleteLaunchTemplateVersionsValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteLaunchTemplateVersions(options.Region), middleware.Before); 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_opDeleteLaunchTemplateVersions(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DeleteLaunchTemplateVersions",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteLocalGatewayRoute.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteLocalGatewayRoute.go
new file mode 100644
index 00000000..b9d80f46
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteLocalGatewayRoute.go
@@ -0,0 +1,132 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Deletes the specified route from the specified local gateway route table.
+func (c *Client) DeleteLocalGatewayRoute(ctx context.Context, params *DeleteLocalGatewayRouteInput, optFns ...func(*Options)) (*DeleteLocalGatewayRouteOutput, error) {
+ if params == nil {
+ params = &DeleteLocalGatewayRouteInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeleteLocalGatewayRoute", params, optFns, c.addOperationDeleteLocalGatewayRouteMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeleteLocalGatewayRouteOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DeleteLocalGatewayRouteInput struct {
+
+ // The CIDR range for the route. This must match the CIDR for the route exactly.
+ //
+ // This member is required.
+ DestinationCidrBlock *string
+
+ // The ID of the local gateway route table.
+ //
+ // This member is required.
+ LocalGatewayRouteTableId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type DeleteLocalGatewayRouteOutput struct {
+
+ // Information about the route.
+ Route *types.LocalGatewayRoute
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeleteLocalGatewayRouteMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteLocalGatewayRoute{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteLocalGatewayRoute{}, 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 = addOpDeleteLocalGatewayRouteValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteLocalGatewayRoute(options.Region), middleware.Before); 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_opDeleteLocalGatewayRoute(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DeleteLocalGatewayRoute",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteLocalGatewayRouteTableVpcAssociation.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteLocalGatewayRouteTableVpcAssociation.go
new file mode 100644
index 00000000..1bef56f6
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteLocalGatewayRouteTableVpcAssociation.go
@@ -0,0 +1,127 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Deletes the specified association between a VPC and local gateway route table.
+func (c *Client) DeleteLocalGatewayRouteTableVpcAssociation(ctx context.Context, params *DeleteLocalGatewayRouteTableVpcAssociationInput, optFns ...func(*Options)) (*DeleteLocalGatewayRouteTableVpcAssociationOutput, error) {
+ if params == nil {
+ params = &DeleteLocalGatewayRouteTableVpcAssociationInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeleteLocalGatewayRouteTableVpcAssociation", params, optFns, c.addOperationDeleteLocalGatewayRouteTableVpcAssociationMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeleteLocalGatewayRouteTableVpcAssociationOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DeleteLocalGatewayRouteTableVpcAssociationInput struct {
+
+ // The ID of the association.
+ //
+ // This member is required.
+ LocalGatewayRouteTableVpcAssociationId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type DeleteLocalGatewayRouteTableVpcAssociationOutput struct {
+
+ // Information about the association.
+ LocalGatewayRouteTableVpcAssociation *types.LocalGatewayRouteTableVpcAssociation
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeleteLocalGatewayRouteTableVpcAssociationMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteLocalGatewayRouteTableVpcAssociation{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteLocalGatewayRouteTableVpcAssociation{}, 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 = addOpDeleteLocalGatewayRouteTableVpcAssociationValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteLocalGatewayRouteTableVpcAssociation(options.Region), middleware.Before); 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_opDeleteLocalGatewayRouteTableVpcAssociation(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DeleteLocalGatewayRouteTableVpcAssociation",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteManagedPrefixList.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteManagedPrefixList.go
new file mode 100644
index 00000000..09b5849f
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteManagedPrefixList.go
@@ -0,0 +1,128 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Deletes the specified managed prefix list. You must first remove all references
+// to the prefix list in your resources.
+func (c *Client) DeleteManagedPrefixList(ctx context.Context, params *DeleteManagedPrefixListInput, optFns ...func(*Options)) (*DeleteManagedPrefixListOutput, error) {
+ if params == nil {
+ params = &DeleteManagedPrefixListInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeleteManagedPrefixList", params, optFns, c.addOperationDeleteManagedPrefixListMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeleteManagedPrefixListOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DeleteManagedPrefixListInput struct {
+
+ // The ID of the prefix list.
+ //
+ // This member is required.
+ PrefixListId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type DeleteManagedPrefixListOutput struct {
+
+ // Information about the prefix list.
+ PrefixList *types.ManagedPrefixList
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeleteManagedPrefixListMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteManagedPrefixList{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteManagedPrefixList{}, 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 = addOpDeleteManagedPrefixListValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteManagedPrefixList(options.Region), middleware.Before); 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_opDeleteManagedPrefixList(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DeleteManagedPrefixList",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteNatGateway.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteNatGateway.go
new file mode 100644
index 00000000..1f2a9f21
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteNatGateway.go
@@ -0,0 +1,129 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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 the specified NAT gateway. Deleting a public NAT gateway disassociates
+// its Elastic IP address, but does not release the address from your account.
+// Deleting a NAT gateway does not delete any NAT gateway routes in your route
+// tables.
+func (c *Client) DeleteNatGateway(ctx context.Context, params *DeleteNatGatewayInput, optFns ...func(*Options)) (*DeleteNatGatewayOutput, error) {
+ if params == nil {
+ params = &DeleteNatGatewayInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeleteNatGateway", params, optFns, c.addOperationDeleteNatGatewayMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeleteNatGatewayOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DeleteNatGatewayInput struct {
+
+ // The ID of the NAT gateway.
+ //
+ // This member is required.
+ NatGatewayId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type DeleteNatGatewayOutput struct {
+
+ // The ID of the NAT gateway.
+ NatGatewayId *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeleteNatGatewayMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteNatGateway{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteNatGateway{}, 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 = addOpDeleteNatGatewayValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteNatGateway(options.Region), middleware.Before); 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_opDeleteNatGateway(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DeleteNatGateway",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteNetworkAcl.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteNetworkAcl.go
new file mode 100644
index 00000000..a8318868
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteNetworkAcl.go
@@ -0,0 +1,123 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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 the specified network ACL. You can't delete the ACL if it's associated
+// with any subnets. You can't delete the default network ACL.
+func (c *Client) DeleteNetworkAcl(ctx context.Context, params *DeleteNetworkAclInput, optFns ...func(*Options)) (*DeleteNetworkAclOutput, error) {
+ if params == nil {
+ params = &DeleteNetworkAclInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeleteNetworkAcl", params, optFns, c.addOperationDeleteNetworkAclMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeleteNetworkAclOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DeleteNetworkAclInput struct {
+
+ // The ID of the network ACL.
+ //
+ // This member is required.
+ NetworkAclId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type DeleteNetworkAclOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeleteNetworkAclMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteNetworkAcl{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteNetworkAcl{}, 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 = addOpDeleteNetworkAclValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteNetworkAcl(options.Region), middleware.Before); 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_opDeleteNetworkAcl(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DeleteNetworkAcl",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteNetworkAclEntry.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteNetworkAclEntry.go
new file mode 100644
index 00000000..84b84b2b
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteNetworkAclEntry.go
@@ -0,0 +1,133 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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 the specified ingress or egress entry (rule) from the specified network
+// ACL.
+func (c *Client) DeleteNetworkAclEntry(ctx context.Context, params *DeleteNetworkAclEntryInput, optFns ...func(*Options)) (*DeleteNetworkAclEntryOutput, error) {
+ if params == nil {
+ params = &DeleteNetworkAclEntryInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeleteNetworkAclEntry", params, optFns, c.addOperationDeleteNetworkAclEntryMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeleteNetworkAclEntryOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DeleteNetworkAclEntryInput struct {
+
+ // Indicates whether the rule is an egress rule.
+ //
+ // This member is required.
+ Egress *bool
+
+ // The ID of the network ACL.
+ //
+ // This member is required.
+ NetworkAclId *string
+
+ // The rule number of the entry to delete.
+ //
+ // This member is required.
+ RuleNumber *int32
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type DeleteNetworkAclEntryOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeleteNetworkAclEntryMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteNetworkAclEntry{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteNetworkAclEntry{}, 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 = addOpDeleteNetworkAclEntryValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteNetworkAclEntry(options.Region), middleware.Before); 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_opDeleteNetworkAclEntry(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DeleteNetworkAclEntry",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteNetworkInsightsAnalysis.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteNetworkInsightsAnalysis.go
new file mode 100644
index 00000000..b695d001
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteNetworkInsightsAnalysis.go
@@ -0,0 +1,126 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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 the specified network insights analysis.
+func (c *Client) DeleteNetworkInsightsAnalysis(ctx context.Context, params *DeleteNetworkInsightsAnalysisInput, optFns ...func(*Options)) (*DeleteNetworkInsightsAnalysisOutput, error) {
+ if params == nil {
+ params = &DeleteNetworkInsightsAnalysisInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeleteNetworkInsightsAnalysis", params, optFns, c.addOperationDeleteNetworkInsightsAnalysisMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeleteNetworkInsightsAnalysisOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DeleteNetworkInsightsAnalysisInput struct {
+
+ // The ID of the network insights analysis.
+ //
+ // This member is required.
+ NetworkInsightsAnalysisId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type DeleteNetworkInsightsAnalysisOutput struct {
+
+ // The ID of the network insights analysis.
+ NetworkInsightsAnalysisId *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeleteNetworkInsightsAnalysisMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteNetworkInsightsAnalysis{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteNetworkInsightsAnalysis{}, 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 = addOpDeleteNetworkInsightsAnalysisValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteNetworkInsightsAnalysis(options.Region), middleware.Before); 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_opDeleteNetworkInsightsAnalysis(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DeleteNetworkInsightsAnalysis",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteNetworkInsightsPath.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteNetworkInsightsPath.go
new file mode 100644
index 00000000..b94321bf
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteNetworkInsightsPath.go
@@ -0,0 +1,126 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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 the specified path.
+func (c *Client) DeleteNetworkInsightsPath(ctx context.Context, params *DeleteNetworkInsightsPathInput, optFns ...func(*Options)) (*DeleteNetworkInsightsPathOutput, error) {
+ if params == nil {
+ params = &DeleteNetworkInsightsPathInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeleteNetworkInsightsPath", params, optFns, c.addOperationDeleteNetworkInsightsPathMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeleteNetworkInsightsPathOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DeleteNetworkInsightsPathInput struct {
+
+ // The ID of the path.
+ //
+ // This member is required.
+ NetworkInsightsPathId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type DeleteNetworkInsightsPathOutput struct {
+
+ // The ID of the path.
+ NetworkInsightsPathId *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeleteNetworkInsightsPathMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteNetworkInsightsPath{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteNetworkInsightsPath{}, 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 = addOpDeleteNetworkInsightsPathValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteNetworkInsightsPath(options.Region), middleware.Before); 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_opDeleteNetworkInsightsPath(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DeleteNetworkInsightsPath",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteNetworkInterface.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteNetworkInterface.go
new file mode 100644
index 00000000..b96b187c
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteNetworkInterface.go
@@ -0,0 +1,124 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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 the specified network interface. You must detach the network interface
+// before you can delete it.
+func (c *Client) DeleteNetworkInterface(ctx context.Context, params *DeleteNetworkInterfaceInput, optFns ...func(*Options)) (*DeleteNetworkInterfaceOutput, error) {
+ if params == nil {
+ params = &DeleteNetworkInterfaceInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeleteNetworkInterface", params, optFns, c.addOperationDeleteNetworkInterfaceMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeleteNetworkInterfaceOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+// Contains the parameters for DeleteNetworkInterface.
+type DeleteNetworkInterfaceInput struct {
+
+ // The ID of the network interface.
+ //
+ // This member is required.
+ NetworkInterfaceId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type DeleteNetworkInterfaceOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeleteNetworkInterfaceMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteNetworkInterface{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteNetworkInterface{}, 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 = addOpDeleteNetworkInterfaceValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteNetworkInterface(options.Region), middleware.Before); 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_opDeleteNetworkInterface(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DeleteNetworkInterface",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteNetworkInterfacePermission.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteNetworkInterfacePermission.go
new file mode 100644
index 00000000..807a76c9
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteNetworkInterfacePermission.go
@@ -0,0 +1,135 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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 permission for a network interface. By default, you cannot delete the
+// permission if the account for which you're removing the permission has attached
+// the network interface to an instance. However, you can force delete the
+// permission, regardless of any attachment.
+func (c *Client) DeleteNetworkInterfacePermission(ctx context.Context, params *DeleteNetworkInterfacePermissionInput, optFns ...func(*Options)) (*DeleteNetworkInterfacePermissionOutput, error) {
+ if params == nil {
+ params = &DeleteNetworkInterfacePermissionInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeleteNetworkInterfacePermission", params, optFns, c.addOperationDeleteNetworkInterfacePermissionMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeleteNetworkInterfacePermissionOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+// Contains the parameters for DeleteNetworkInterfacePermission.
+type DeleteNetworkInterfacePermissionInput struct {
+
+ // The ID of the network interface permission.
+ //
+ // This member is required.
+ NetworkInterfacePermissionId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // Specify true to remove the permission even if the network interface is attached
+ // to an instance.
+ Force *bool
+
+ noSmithyDocumentSerde
+}
+
+// Contains the output for DeleteNetworkInterfacePermission.
+type DeleteNetworkInterfacePermissionOutput struct {
+
+ // Returns true if the request succeeds, otherwise returns an error.
+ Return *bool
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeleteNetworkInterfacePermissionMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteNetworkInterfacePermission{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteNetworkInterfacePermission{}, 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 = addOpDeleteNetworkInterfacePermissionValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteNetworkInterfacePermission(options.Region), middleware.Before); 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_opDeleteNetworkInterfacePermission(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DeleteNetworkInterfacePermission",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeletePlacementGroup.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeletePlacementGroup.go
new file mode 100644
index 00000000..a8eead5b
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeletePlacementGroup.go
@@ -0,0 +1,126 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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 the specified placement group. You must terminate all instances in the
+// placement group before you can delete the placement group. For more information,
+// see Placement groups
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/placement-groups.html) in
+// the Amazon EC2 User Guide.
+func (c *Client) DeletePlacementGroup(ctx context.Context, params *DeletePlacementGroupInput, optFns ...func(*Options)) (*DeletePlacementGroupOutput, error) {
+ if params == nil {
+ params = &DeletePlacementGroupInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeletePlacementGroup", params, optFns, c.addOperationDeletePlacementGroupMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeletePlacementGroupOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DeletePlacementGroupInput struct {
+
+ // The name of the placement group.
+ //
+ // This member is required.
+ GroupName *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type DeletePlacementGroupOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeletePlacementGroupMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDeletePlacementGroup{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeletePlacementGroup{}, 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 = addOpDeletePlacementGroupValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeletePlacementGroup(options.Region), middleware.Before); 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_opDeletePlacementGroup(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DeletePlacementGroup",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteQueuedReservedInstances.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteQueuedReservedInstances.go
new file mode 100644
index 00000000..d3a527fb
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteQueuedReservedInstances.go
@@ -0,0 +1,130 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Deletes the queued purchases for the specified Reserved Instances.
+func (c *Client) DeleteQueuedReservedInstances(ctx context.Context, params *DeleteQueuedReservedInstancesInput, optFns ...func(*Options)) (*DeleteQueuedReservedInstancesOutput, error) {
+ if params == nil {
+ params = &DeleteQueuedReservedInstancesInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeleteQueuedReservedInstances", params, optFns, c.addOperationDeleteQueuedReservedInstancesMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeleteQueuedReservedInstancesOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DeleteQueuedReservedInstancesInput struct {
+
+ // The IDs of the Reserved Instances.
+ //
+ // This member is required.
+ ReservedInstancesIds []string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type DeleteQueuedReservedInstancesOutput struct {
+
+ // Information about the queued purchases that could not be deleted.
+ FailedQueuedPurchaseDeletions []types.FailedQueuedPurchaseDeletion
+
+ // Information about the queued purchases that were successfully deleted.
+ SuccessfulQueuedPurchaseDeletions []types.SuccessfulQueuedPurchaseDeletion
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeleteQueuedReservedInstancesMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteQueuedReservedInstances{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteQueuedReservedInstances{}, 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 = addOpDeleteQueuedReservedInstancesValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteQueuedReservedInstances(options.Region), middleware.Before); 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_opDeleteQueuedReservedInstances(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DeleteQueuedReservedInstances",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteRoute.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteRoute.go
new file mode 100644
index 00000000..b9ca73a0
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteRoute.go
@@ -0,0 +1,133 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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 the specified route from the specified route table.
+func (c *Client) DeleteRoute(ctx context.Context, params *DeleteRouteInput, optFns ...func(*Options)) (*DeleteRouteOutput, error) {
+ if params == nil {
+ params = &DeleteRouteInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeleteRoute", params, optFns, c.addOperationDeleteRouteMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeleteRouteOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DeleteRouteInput struct {
+
+ // The ID of the route table.
+ //
+ // This member is required.
+ RouteTableId *string
+
+ // The IPv4 CIDR range for the route. The value you specify must match the CIDR for
+ // the route exactly.
+ DestinationCidrBlock *string
+
+ // The IPv6 CIDR range for the route. The value you specify must match the CIDR for
+ // the route exactly.
+ DestinationIpv6CidrBlock *string
+
+ // The ID of the prefix list for the route.
+ DestinationPrefixListId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type DeleteRouteOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeleteRouteMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteRoute{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteRoute{}, 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 = addOpDeleteRouteValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteRoute(options.Region), middleware.Before); 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_opDeleteRoute(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DeleteRoute",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteRouteTable.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteRouteTable.go
new file mode 100644
index 00000000..ab5cb9cf
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteRouteTable.go
@@ -0,0 +1,123 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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 the specified route table. You must disassociate the route table from
+// any subnets before you can delete it. You can't delete the main route table.
+func (c *Client) DeleteRouteTable(ctx context.Context, params *DeleteRouteTableInput, optFns ...func(*Options)) (*DeleteRouteTableOutput, error) {
+ if params == nil {
+ params = &DeleteRouteTableInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeleteRouteTable", params, optFns, c.addOperationDeleteRouteTableMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeleteRouteTableOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DeleteRouteTableInput struct {
+
+ // The ID of the route table.
+ //
+ // This member is required.
+ RouteTableId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type DeleteRouteTableOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeleteRouteTableMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteRouteTable{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteRouteTable{}, 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 = addOpDeleteRouteTableValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteRouteTable(options.Region), middleware.Before); 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_opDeleteRouteTable(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DeleteRouteTable",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteSecurityGroup.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteSecurityGroup.go
new file mode 100644
index 00000000..f8a2e6b7
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteSecurityGroup.go
@@ -0,0 +1,124 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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 security group. If you attempt to delete a security group that is
+// associated with an instance, or is referenced by another security group, the
+// operation fails with InvalidGroup.InUse in EC2-Classic or DependencyViolation in
+// EC2-VPC.
+func (c *Client) DeleteSecurityGroup(ctx context.Context, params *DeleteSecurityGroupInput, optFns ...func(*Options)) (*DeleteSecurityGroupOutput, error) {
+ if params == nil {
+ params = &DeleteSecurityGroupInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeleteSecurityGroup", params, optFns, c.addOperationDeleteSecurityGroupMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeleteSecurityGroupOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DeleteSecurityGroupInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The ID of the security group. Required for a nondefault VPC.
+ GroupId *string
+
+ // [EC2-Classic, default VPC] The name of the security group. You can specify
+ // either the security group name or the security group ID.
+ GroupName *string
+
+ noSmithyDocumentSerde
+}
+
+type DeleteSecurityGroupOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeleteSecurityGroupMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteSecurityGroup{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteSecurityGroup{}, 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_opDeleteSecurityGroup(options.Region), middleware.Before); 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_opDeleteSecurityGroup(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DeleteSecurityGroup",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteSnapshot.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteSnapshot.go
new file mode 100644
index 00000000..111ce40b
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteSnapshot.go
@@ -0,0 +1,132 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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 the specified snapshot. When you make periodic snapshots of a volume,
+// the snapshots are incremental, and only the blocks on the device that have
+// changed since your last snapshot are saved in the new snapshot. When you delete
+// a snapshot, only the data not needed for any other snapshot is removed. So
+// regardless of which prior snapshots have been deleted, all active snapshots will
+// have access to all the information needed to restore the volume. You cannot
+// delete a snapshot of the root device of an EBS volume used by a registered AMI.
+// You must first de-register the AMI before you can delete the snapshot. For more
+// information, see Delete an Amazon EBS snapshot
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-deleting-snapshot.html)
+// in the Amazon Elastic Compute Cloud User Guide.
+func (c *Client) DeleteSnapshot(ctx context.Context, params *DeleteSnapshotInput, optFns ...func(*Options)) (*DeleteSnapshotOutput, error) {
+ if params == nil {
+ params = &DeleteSnapshotInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeleteSnapshot", params, optFns, c.addOperationDeleteSnapshotMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeleteSnapshotOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DeleteSnapshotInput struct {
+
+ // The ID of the EBS snapshot.
+ //
+ // This member is required.
+ SnapshotId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type DeleteSnapshotOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeleteSnapshotMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteSnapshot{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteSnapshot{}, 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 = addOpDeleteSnapshotValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteSnapshot(options.Region), middleware.Before); 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_opDeleteSnapshot(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DeleteSnapshot",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteSpotDatafeedSubscription.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteSpotDatafeedSubscription.go
new file mode 100644
index 00000000..35491109
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteSpotDatafeedSubscription.go
@@ -0,0 +1,115 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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 the data feed for Spot Instances.
+func (c *Client) DeleteSpotDatafeedSubscription(ctx context.Context, params *DeleteSpotDatafeedSubscriptionInput, optFns ...func(*Options)) (*DeleteSpotDatafeedSubscriptionOutput, error) {
+ if params == nil {
+ params = &DeleteSpotDatafeedSubscriptionInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeleteSpotDatafeedSubscription", params, optFns, c.addOperationDeleteSpotDatafeedSubscriptionMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeleteSpotDatafeedSubscriptionOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+// Contains the parameters for DeleteSpotDatafeedSubscription.
+type DeleteSpotDatafeedSubscriptionInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type DeleteSpotDatafeedSubscriptionOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeleteSpotDatafeedSubscriptionMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteSpotDatafeedSubscription{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteSpotDatafeedSubscription{}, 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_opDeleteSpotDatafeedSubscription(options.Region), middleware.Before); 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_opDeleteSpotDatafeedSubscription(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DeleteSpotDatafeedSubscription",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteSubnet.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteSubnet.go
new file mode 100644
index 00000000..05c69654
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteSubnet.go
@@ -0,0 +1,123 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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 the specified subnet. You must terminate all running instances in the
+// subnet before you can delete the subnet.
+func (c *Client) DeleteSubnet(ctx context.Context, params *DeleteSubnetInput, optFns ...func(*Options)) (*DeleteSubnetOutput, error) {
+ if params == nil {
+ params = &DeleteSubnetInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeleteSubnet", params, optFns, c.addOperationDeleteSubnetMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeleteSubnetOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DeleteSubnetInput struct {
+
+ // The ID of the subnet.
+ //
+ // This member is required.
+ SubnetId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type DeleteSubnetOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeleteSubnetMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteSubnet{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteSubnet{}, 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 = addOpDeleteSubnetValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteSubnet(options.Region), middleware.Before); 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_opDeleteSubnet(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DeleteSubnet",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteSubnetCidrReservation.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteSubnetCidrReservation.go
new file mode 100644
index 00000000..4b964f2b
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteSubnetCidrReservation.go
@@ -0,0 +1,127 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Deletes a subnet CIDR reservation.
+func (c *Client) DeleteSubnetCidrReservation(ctx context.Context, params *DeleteSubnetCidrReservationInput, optFns ...func(*Options)) (*DeleteSubnetCidrReservationOutput, error) {
+ if params == nil {
+ params = &DeleteSubnetCidrReservationInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeleteSubnetCidrReservation", params, optFns, c.addOperationDeleteSubnetCidrReservationMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeleteSubnetCidrReservationOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DeleteSubnetCidrReservationInput struct {
+
+ // The ID of the subnet CIDR reservation.
+ //
+ // This member is required.
+ SubnetCidrReservationId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type DeleteSubnetCidrReservationOutput struct {
+
+ // Information about the deleted subnet CIDR reservation.
+ DeletedSubnetCidrReservation *types.SubnetCidrReservation
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeleteSubnetCidrReservationMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteSubnetCidrReservation{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteSubnetCidrReservation{}, 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 = addOpDeleteSubnetCidrReservationValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteSubnetCidrReservation(options.Region), middleware.Before); 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_opDeleteSubnetCidrReservation(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DeleteSubnetCidrReservation",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteTags.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteTags.go
new file mode 100644
index 00000000..e087038e
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteTags.go
@@ -0,0 +1,137 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Deletes the specified set of tags from the specified set of resources. To list
+// the current tags, use DescribeTags. For more information about tags, see Tagging
+// Your Resources
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html) in the
+// Amazon Elastic Compute Cloud User Guide.
+func (c *Client) DeleteTags(ctx context.Context, params *DeleteTagsInput, optFns ...func(*Options)) (*DeleteTagsOutput, error) {
+ if params == nil {
+ params = &DeleteTagsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeleteTags", params, optFns, c.addOperationDeleteTagsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeleteTagsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DeleteTagsInput struct {
+
+ // The IDs of the resources, separated by spaces. Constraints: Up to 1000 resource
+ // IDs. We recommend breaking up this request into smaller batches.
+ //
+ // This member is required.
+ Resources []string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The tags to delete. Specify a tag key and an optional tag value to delete
+ // specific tags. If you specify a tag key without a tag value, we delete any tag
+ // with this key regardless of its value. If you specify a tag key with an empty
+ // string as the tag value, we delete the tag only if its value is an empty string.
+ // If you omit this parameter, we delete all user-defined tags for the specified
+ // resources. We do not delete Amazon Web Services-generated tags (tags that have
+ // the aws: prefix).
+ Tags []types.Tag
+
+ noSmithyDocumentSerde
+}
+
+type DeleteTagsOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeleteTagsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteTags{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteTags{}, 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 = addOpDeleteTagsValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteTags(options.Region), middleware.Before); 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_opDeleteTags(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DeleteTags",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteTrafficMirrorFilter.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteTrafficMirrorFilter.go
new file mode 100644
index 00000000..458225ce
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteTrafficMirrorFilter.go
@@ -0,0 +1,127 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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 the specified Traffic Mirror filter. You cannot delete a Traffic Mirror
+// filter that is in use by a Traffic Mirror session.
+func (c *Client) DeleteTrafficMirrorFilter(ctx context.Context, params *DeleteTrafficMirrorFilterInput, optFns ...func(*Options)) (*DeleteTrafficMirrorFilterOutput, error) {
+ if params == nil {
+ params = &DeleteTrafficMirrorFilterInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeleteTrafficMirrorFilter", params, optFns, c.addOperationDeleteTrafficMirrorFilterMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeleteTrafficMirrorFilterOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DeleteTrafficMirrorFilterInput struct {
+
+ // The ID of the Traffic Mirror filter.
+ //
+ // This member is required.
+ TrafficMirrorFilterId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type DeleteTrafficMirrorFilterOutput struct {
+
+ // The ID of the Traffic Mirror filter.
+ TrafficMirrorFilterId *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeleteTrafficMirrorFilterMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteTrafficMirrorFilter{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteTrafficMirrorFilter{}, 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 = addOpDeleteTrafficMirrorFilterValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteTrafficMirrorFilter(options.Region), middleware.Before); 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_opDeleteTrafficMirrorFilter(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DeleteTrafficMirrorFilter",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteTrafficMirrorFilterRule.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteTrafficMirrorFilterRule.go
new file mode 100644
index 00000000..b52ea71c
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteTrafficMirrorFilterRule.go
@@ -0,0 +1,126 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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 the specified Traffic Mirror rule.
+func (c *Client) DeleteTrafficMirrorFilterRule(ctx context.Context, params *DeleteTrafficMirrorFilterRuleInput, optFns ...func(*Options)) (*DeleteTrafficMirrorFilterRuleOutput, error) {
+ if params == nil {
+ params = &DeleteTrafficMirrorFilterRuleInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeleteTrafficMirrorFilterRule", params, optFns, c.addOperationDeleteTrafficMirrorFilterRuleMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeleteTrafficMirrorFilterRuleOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DeleteTrafficMirrorFilterRuleInput struct {
+
+ // The ID of the Traffic Mirror rule.
+ //
+ // This member is required.
+ TrafficMirrorFilterRuleId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type DeleteTrafficMirrorFilterRuleOutput struct {
+
+ // The ID of the deleted Traffic Mirror rule.
+ TrafficMirrorFilterRuleId *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeleteTrafficMirrorFilterRuleMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteTrafficMirrorFilterRule{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteTrafficMirrorFilterRule{}, 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 = addOpDeleteTrafficMirrorFilterRuleValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteTrafficMirrorFilterRule(options.Region), middleware.Before); 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_opDeleteTrafficMirrorFilterRule(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DeleteTrafficMirrorFilterRule",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteTrafficMirrorSession.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteTrafficMirrorSession.go
new file mode 100644
index 00000000..cc0247bc
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteTrafficMirrorSession.go
@@ -0,0 +1,126 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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 the specified Traffic Mirror session.
+func (c *Client) DeleteTrafficMirrorSession(ctx context.Context, params *DeleteTrafficMirrorSessionInput, optFns ...func(*Options)) (*DeleteTrafficMirrorSessionOutput, error) {
+ if params == nil {
+ params = &DeleteTrafficMirrorSessionInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeleteTrafficMirrorSession", params, optFns, c.addOperationDeleteTrafficMirrorSessionMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeleteTrafficMirrorSessionOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DeleteTrafficMirrorSessionInput struct {
+
+ // The ID of the Traffic Mirror session.
+ //
+ // This member is required.
+ TrafficMirrorSessionId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type DeleteTrafficMirrorSessionOutput struct {
+
+ // The ID of the deleted Traffic Mirror session.
+ TrafficMirrorSessionId *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeleteTrafficMirrorSessionMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteTrafficMirrorSession{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteTrafficMirrorSession{}, 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 = addOpDeleteTrafficMirrorSessionValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteTrafficMirrorSession(options.Region), middleware.Before); 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_opDeleteTrafficMirrorSession(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DeleteTrafficMirrorSession",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteTrafficMirrorTarget.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteTrafficMirrorTarget.go
new file mode 100644
index 00000000..14137c9b
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteTrafficMirrorTarget.go
@@ -0,0 +1,127 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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 the specified Traffic Mirror target. You cannot delete a Traffic Mirror
+// target that is in use by a Traffic Mirror session.
+func (c *Client) DeleteTrafficMirrorTarget(ctx context.Context, params *DeleteTrafficMirrorTargetInput, optFns ...func(*Options)) (*DeleteTrafficMirrorTargetOutput, error) {
+ if params == nil {
+ params = &DeleteTrafficMirrorTargetInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeleteTrafficMirrorTarget", params, optFns, c.addOperationDeleteTrafficMirrorTargetMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeleteTrafficMirrorTargetOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DeleteTrafficMirrorTargetInput struct {
+
+ // The ID of the Traffic Mirror target.
+ //
+ // This member is required.
+ TrafficMirrorTargetId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type DeleteTrafficMirrorTargetOutput struct {
+
+ // The ID of the deleted Traffic Mirror target.
+ TrafficMirrorTargetId *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeleteTrafficMirrorTargetMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteTrafficMirrorTarget{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteTrafficMirrorTarget{}, 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 = addOpDeleteTrafficMirrorTargetValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteTrafficMirrorTarget(options.Region), middleware.Before); 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_opDeleteTrafficMirrorTarget(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DeleteTrafficMirrorTarget",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteTransitGateway.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteTransitGateway.go
new file mode 100644
index 00000000..5af86cf2
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteTransitGateway.go
@@ -0,0 +1,127 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Deletes the specified transit gateway.
+func (c *Client) DeleteTransitGateway(ctx context.Context, params *DeleteTransitGatewayInput, optFns ...func(*Options)) (*DeleteTransitGatewayOutput, error) {
+ if params == nil {
+ params = &DeleteTransitGatewayInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeleteTransitGateway", params, optFns, c.addOperationDeleteTransitGatewayMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeleteTransitGatewayOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DeleteTransitGatewayInput struct {
+
+ // The ID of the transit gateway.
+ //
+ // This member is required.
+ TransitGatewayId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type DeleteTransitGatewayOutput struct {
+
+ // Information about the deleted transit gateway.
+ TransitGateway *types.TransitGateway
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeleteTransitGatewayMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteTransitGateway{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteTransitGateway{}, 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 = addOpDeleteTransitGatewayValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteTransitGateway(options.Region), middleware.Before); 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_opDeleteTransitGateway(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DeleteTransitGateway",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteTransitGatewayConnect.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteTransitGatewayConnect.go
new file mode 100644
index 00000000..4434a59b
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteTransitGatewayConnect.go
@@ -0,0 +1,128 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Deletes the specified Connect attachment. You must first delete any Connect
+// peers for the attachment.
+func (c *Client) DeleteTransitGatewayConnect(ctx context.Context, params *DeleteTransitGatewayConnectInput, optFns ...func(*Options)) (*DeleteTransitGatewayConnectOutput, error) {
+ if params == nil {
+ params = &DeleteTransitGatewayConnectInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeleteTransitGatewayConnect", params, optFns, c.addOperationDeleteTransitGatewayConnectMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeleteTransitGatewayConnectOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DeleteTransitGatewayConnectInput struct {
+
+ // The ID of the Connect attachment.
+ //
+ // This member is required.
+ TransitGatewayAttachmentId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type DeleteTransitGatewayConnectOutput struct {
+
+ // Information about the deleted Connect attachment.
+ TransitGatewayConnect *types.TransitGatewayConnect
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeleteTransitGatewayConnectMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteTransitGatewayConnect{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteTransitGatewayConnect{}, 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 = addOpDeleteTransitGatewayConnectValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteTransitGatewayConnect(options.Region), middleware.Before); 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_opDeleteTransitGatewayConnect(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DeleteTransitGatewayConnect",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteTransitGatewayConnectPeer.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteTransitGatewayConnectPeer.go
new file mode 100644
index 00000000..9b233a0d
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteTransitGatewayConnectPeer.go
@@ -0,0 +1,127 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Deletes the specified Connect peer.
+func (c *Client) DeleteTransitGatewayConnectPeer(ctx context.Context, params *DeleteTransitGatewayConnectPeerInput, optFns ...func(*Options)) (*DeleteTransitGatewayConnectPeerOutput, error) {
+ if params == nil {
+ params = &DeleteTransitGatewayConnectPeerInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeleteTransitGatewayConnectPeer", params, optFns, c.addOperationDeleteTransitGatewayConnectPeerMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeleteTransitGatewayConnectPeerOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DeleteTransitGatewayConnectPeerInput struct {
+
+ // The ID of the Connect peer.
+ //
+ // This member is required.
+ TransitGatewayConnectPeerId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type DeleteTransitGatewayConnectPeerOutput struct {
+
+ // Information about the deleted Connect peer.
+ TransitGatewayConnectPeer *types.TransitGatewayConnectPeer
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeleteTransitGatewayConnectPeerMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteTransitGatewayConnectPeer{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteTransitGatewayConnectPeer{}, 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 = addOpDeleteTransitGatewayConnectPeerValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteTransitGatewayConnectPeer(options.Region), middleware.Before); 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_opDeleteTransitGatewayConnectPeer(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DeleteTransitGatewayConnectPeer",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteTransitGatewayMulticastDomain.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteTransitGatewayMulticastDomain.go
new file mode 100644
index 00000000..0a12c818
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteTransitGatewayMulticastDomain.go
@@ -0,0 +1,127 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Deletes the specified transit gateway multicast domain.
+func (c *Client) DeleteTransitGatewayMulticastDomain(ctx context.Context, params *DeleteTransitGatewayMulticastDomainInput, optFns ...func(*Options)) (*DeleteTransitGatewayMulticastDomainOutput, error) {
+ if params == nil {
+ params = &DeleteTransitGatewayMulticastDomainInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeleteTransitGatewayMulticastDomain", params, optFns, c.addOperationDeleteTransitGatewayMulticastDomainMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeleteTransitGatewayMulticastDomainOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DeleteTransitGatewayMulticastDomainInput struct {
+
+ // The ID of the transit gateway multicast domain.
+ //
+ // This member is required.
+ TransitGatewayMulticastDomainId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type DeleteTransitGatewayMulticastDomainOutput struct {
+
+ // Information about the deleted transit gateway multicast domain.
+ TransitGatewayMulticastDomain *types.TransitGatewayMulticastDomain
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeleteTransitGatewayMulticastDomainMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteTransitGatewayMulticastDomain{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteTransitGatewayMulticastDomain{}, 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 = addOpDeleteTransitGatewayMulticastDomainValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteTransitGatewayMulticastDomain(options.Region), middleware.Before); 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_opDeleteTransitGatewayMulticastDomain(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DeleteTransitGatewayMulticastDomain",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteTransitGatewayPeeringAttachment.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteTransitGatewayPeeringAttachment.go
new file mode 100644
index 00000000..76723e8d
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteTransitGatewayPeeringAttachment.go
@@ -0,0 +1,127 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Deletes a transit gateway peering attachment.
+func (c *Client) DeleteTransitGatewayPeeringAttachment(ctx context.Context, params *DeleteTransitGatewayPeeringAttachmentInput, optFns ...func(*Options)) (*DeleteTransitGatewayPeeringAttachmentOutput, error) {
+ if params == nil {
+ params = &DeleteTransitGatewayPeeringAttachmentInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeleteTransitGatewayPeeringAttachment", params, optFns, c.addOperationDeleteTransitGatewayPeeringAttachmentMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeleteTransitGatewayPeeringAttachmentOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DeleteTransitGatewayPeeringAttachmentInput struct {
+
+ // The ID of the transit gateway peering attachment.
+ //
+ // This member is required.
+ TransitGatewayAttachmentId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type DeleteTransitGatewayPeeringAttachmentOutput struct {
+
+ // The transit gateway peering attachment.
+ TransitGatewayPeeringAttachment *types.TransitGatewayPeeringAttachment
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeleteTransitGatewayPeeringAttachmentMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteTransitGatewayPeeringAttachment{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteTransitGatewayPeeringAttachment{}, 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 = addOpDeleteTransitGatewayPeeringAttachmentValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteTransitGatewayPeeringAttachment(options.Region), middleware.Before); 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_opDeleteTransitGatewayPeeringAttachment(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DeleteTransitGatewayPeeringAttachment",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteTransitGatewayPrefixListReference.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteTransitGatewayPrefixListReference.go
new file mode 100644
index 00000000..297a62cd
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteTransitGatewayPrefixListReference.go
@@ -0,0 +1,133 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Deletes a reference (route) to a prefix list in a specified transit gateway
+// route table.
+func (c *Client) DeleteTransitGatewayPrefixListReference(ctx context.Context, params *DeleteTransitGatewayPrefixListReferenceInput, optFns ...func(*Options)) (*DeleteTransitGatewayPrefixListReferenceOutput, error) {
+ if params == nil {
+ params = &DeleteTransitGatewayPrefixListReferenceInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeleteTransitGatewayPrefixListReference", params, optFns, c.addOperationDeleteTransitGatewayPrefixListReferenceMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeleteTransitGatewayPrefixListReferenceOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DeleteTransitGatewayPrefixListReferenceInput struct {
+
+ // The ID of the prefix list.
+ //
+ // This member is required.
+ PrefixListId *string
+
+ // The ID of the route table.
+ //
+ // This member is required.
+ TransitGatewayRouteTableId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type DeleteTransitGatewayPrefixListReferenceOutput struct {
+
+ // Information about the deleted prefix list reference.
+ TransitGatewayPrefixListReference *types.TransitGatewayPrefixListReference
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeleteTransitGatewayPrefixListReferenceMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteTransitGatewayPrefixListReference{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteTransitGatewayPrefixListReference{}, 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 = addOpDeleteTransitGatewayPrefixListReferenceValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteTransitGatewayPrefixListReference(options.Region), middleware.Before); 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_opDeleteTransitGatewayPrefixListReference(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DeleteTransitGatewayPrefixListReference",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteTransitGatewayRoute.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteTransitGatewayRoute.go
new file mode 100644
index 00000000..f80404fa
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteTransitGatewayRoute.go
@@ -0,0 +1,132 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Deletes the specified route from the specified transit gateway route table.
+func (c *Client) DeleteTransitGatewayRoute(ctx context.Context, params *DeleteTransitGatewayRouteInput, optFns ...func(*Options)) (*DeleteTransitGatewayRouteOutput, error) {
+ if params == nil {
+ params = &DeleteTransitGatewayRouteInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeleteTransitGatewayRoute", params, optFns, c.addOperationDeleteTransitGatewayRouteMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeleteTransitGatewayRouteOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DeleteTransitGatewayRouteInput struct {
+
+ // The CIDR range for the route. This must match the CIDR for the route exactly.
+ //
+ // This member is required.
+ DestinationCidrBlock *string
+
+ // The ID of the transit gateway route table.
+ //
+ // This member is required.
+ TransitGatewayRouteTableId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type DeleteTransitGatewayRouteOutput struct {
+
+ // Information about the route.
+ Route *types.TransitGatewayRoute
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeleteTransitGatewayRouteMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteTransitGatewayRoute{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteTransitGatewayRoute{}, 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 = addOpDeleteTransitGatewayRouteValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteTransitGatewayRoute(options.Region), middleware.Before); 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_opDeleteTransitGatewayRoute(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DeleteTransitGatewayRoute",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteTransitGatewayRouteTable.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteTransitGatewayRouteTable.go
new file mode 100644
index 00000000..293754c5
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteTransitGatewayRouteTable.go
@@ -0,0 +1,128 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Deletes the specified transit gateway route table. You must disassociate the
+// route table from any transit gateway route tables before you can delete it.
+func (c *Client) DeleteTransitGatewayRouteTable(ctx context.Context, params *DeleteTransitGatewayRouteTableInput, optFns ...func(*Options)) (*DeleteTransitGatewayRouteTableOutput, error) {
+ if params == nil {
+ params = &DeleteTransitGatewayRouteTableInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeleteTransitGatewayRouteTable", params, optFns, c.addOperationDeleteTransitGatewayRouteTableMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeleteTransitGatewayRouteTableOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DeleteTransitGatewayRouteTableInput struct {
+
+ // The ID of the transit gateway route table.
+ //
+ // This member is required.
+ TransitGatewayRouteTableId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type DeleteTransitGatewayRouteTableOutput struct {
+
+ // Information about the deleted transit gateway route table.
+ TransitGatewayRouteTable *types.TransitGatewayRouteTable
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeleteTransitGatewayRouteTableMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteTransitGatewayRouteTable{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteTransitGatewayRouteTable{}, 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 = addOpDeleteTransitGatewayRouteTableValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteTransitGatewayRouteTable(options.Region), middleware.Before); 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_opDeleteTransitGatewayRouteTable(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DeleteTransitGatewayRouteTable",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteTransitGatewayVpcAttachment.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteTransitGatewayVpcAttachment.go
new file mode 100644
index 00000000..7539cd20
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteTransitGatewayVpcAttachment.go
@@ -0,0 +1,127 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Deletes the specified VPC attachment.
+func (c *Client) DeleteTransitGatewayVpcAttachment(ctx context.Context, params *DeleteTransitGatewayVpcAttachmentInput, optFns ...func(*Options)) (*DeleteTransitGatewayVpcAttachmentOutput, error) {
+ if params == nil {
+ params = &DeleteTransitGatewayVpcAttachmentInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeleteTransitGatewayVpcAttachment", params, optFns, c.addOperationDeleteTransitGatewayVpcAttachmentMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeleteTransitGatewayVpcAttachmentOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DeleteTransitGatewayVpcAttachmentInput struct {
+
+ // The ID of the attachment.
+ //
+ // This member is required.
+ TransitGatewayAttachmentId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type DeleteTransitGatewayVpcAttachmentOutput struct {
+
+ // Information about the deleted VPC attachment.
+ TransitGatewayVpcAttachment *types.TransitGatewayVpcAttachment
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeleteTransitGatewayVpcAttachmentMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteTransitGatewayVpcAttachment{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteTransitGatewayVpcAttachment{}, 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 = addOpDeleteTransitGatewayVpcAttachmentValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteTransitGatewayVpcAttachment(options.Region), middleware.Before); 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_opDeleteTransitGatewayVpcAttachment(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DeleteTransitGatewayVpcAttachment",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteVolume.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteVolume.go
new file mode 100644
index 00000000..9c132308
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteVolume.go
@@ -0,0 +1,126 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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 the specified EBS volume. The volume must be in the available state (not
+// attached to an instance). The volume can remain in the deleting state for
+// several minutes. For more information, see Delete an Amazon EBS volume
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-deleting-volume.html)
+// in the Amazon Elastic Compute Cloud User Guide.
+func (c *Client) DeleteVolume(ctx context.Context, params *DeleteVolumeInput, optFns ...func(*Options)) (*DeleteVolumeOutput, error) {
+ if params == nil {
+ params = &DeleteVolumeInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeleteVolume", params, optFns, c.addOperationDeleteVolumeMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeleteVolumeOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DeleteVolumeInput struct {
+
+ // The ID of the volume.
+ //
+ // This member is required.
+ VolumeId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type DeleteVolumeOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeleteVolumeMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteVolume{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteVolume{}, 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 = addOpDeleteVolumeValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteVolume(options.Region), middleware.Before); 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_opDeleteVolume(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DeleteVolume",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteVpc.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteVpc.go
new file mode 100644
index 00000000..8dfd60a7
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteVpc.go
@@ -0,0 +1,126 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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 the specified VPC. You must detach or delete all gateways and resources
+// that are associated with the VPC before you can delete it. For example, you must
+// terminate all instances running in the VPC, delete all security groups
+// associated with the VPC (except the default one), delete all route tables
+// associated with the VPC (except the default one), and so on.
+func (c *Client) DeleteVpc(ctx context.Context, params *DeleteVpcInput, optFns ...func(*Options)) (*DeleteVpcOutput, error) {
+ if params == nil {
+ params = &DeleteVpcInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeleteVpc", params, optFns, c.addOperationDeleteVpcMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeleteVpcOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DeleteVpcInput struct {
+
+ // The ID of the VPC.
+ //
+ // This member is required.
+ VpcId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type DeleteVpcOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeleteVpcMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteVpc{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteVpc{}, 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 = addOpDeleteVpcValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteVpc(options.Region), middleware.Before); 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_opDeleteVpc(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DeleteVpc",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteVpcEndpointConnectionNotifications.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteVpcEndpointConnectionNotifications.go
new file mode 100644
index 00000000..0e13a489
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteVpcEndpointConnectionNotifications.go
@@ -0,0 +1,127 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Deletes one or more VPC endpoint connection notifications.
+func (c *Client) DeleteVpcEndpointConnectionNotifications(ctx context.Context, params *DeleteVpcEndpointConnectionNotificationsInput, optFns ...func(*Options)) (*DeleteVpcEndpointConnectionNotificationsOutput, error) {
+ if params == nil {
+ params = &DeleteVpcEndpointConnectionNotificationsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeleteVpcEndpointConnectionNotifications", params, optFns, c.addOperationDeleteVpcEndpointConnectionNotificationsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeleteVpcEndpointConnectionNotificationsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DeleteVpcEndpointConnectionNotificationsInput struct {
+
+ // One or more notification IDs.
+ //
+ // This member is required.
+ ConnectionNotificationIds []string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type DeleteVpcEndpointConnectionNotificationsOutput struct {
+
+ // Information about the notifications that could not be deleted successfully.
+ Unsuccessful []types.UnsuccessfulItem
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeleteVpcEndpointConnectionNotificationsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteVpcEndpointConnectionNotifications{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteVpcEndpointConnectionNotifications{}, 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 = addOpDeleteVpcEndpointConnectionNotificationsValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteVpcEndpointConnectionNotifications(options.Region), middleware.Before); 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_opDeleteVpcEndpointConnectionNotifications(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DeleteVpcEndpointConnectionNotifications",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteVpcEndpointServiceConfigurations.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteVpcEndpointServiceConfigurations.go
new file mode 100644
index 00000000..16584556
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteVpcEndpointServiceConfigurations.go
@@ -0,0 +1,131 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Deletes one or more VPC endpoint service configurations in your account. Before
+// you delete the endpoint service configuration, you must reject any Available or
+// PendingAcceptance interface endpoint connections that are attached to the
+// service.
+func (c *Client) DeleteVpcEndpointServiceConfigurations(ctx context.Context, params *DeleteVpcEndpointServiceConfigurationsInput, optFns ...func(*Options)) (*DeleteVpcEndpointServiceConfigurationsOutput, error) {
+ if params == nil {
+ params = &DeleteVpcEndpointServiceConfigurationsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeleteVpcEndpointServiceConfigurations", params, optFns, c.addOperationDeleteVpcEndpointServiceConfigurationsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeleteVpcEndpointServiceConfigurationsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DeleteVpcEndpointServiceConfigurationsInput struct {
+
+ // The IDs of one or more services.
+ //
+ // This member is required.
+ ServiceIds []string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type DeleteVpcEndpointServiceConfigurationsOutput struct {
+
+ // Information about the service configurations that were not deleted, if
+ // applicable.
+ Unsuccessful []types.UnsuccessfulItem
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeleteVpcEndpointServiceConfigurationsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteVpcEndpointServiceConfigurations{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteVpcEndpointServiceConfigurations{}, 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 = addOpDeleteVpcEndpointServiceConfigurationsValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteVpcEndpointServiceConfigurations(options.Region), middleware.Before); 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_opDeleteVpcEndpointServiceConfigurations(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DeleteVpcEndpointServiceConfigurations",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteVpcEndpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteVpcEndpoints.go
new file mode 100644
index 00000000..0be582a3
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteVpcEndpoints.go
@@ -0,0 +1,151 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Deletes one or more specified VPC endpoints. You can delete any of the following
+// types of VPC endpoints.
+//
+// * Gateway endpoint,
+//
+// * Gateway Load Balancer
+// endpoint,
+//
+// * Interface endpoint
+//
+// The following rules apply when you delete a VPC
+// endpoint:
+//
+// * When you delete a gateway endpoint, we delete the endpoint routes
+// in the route tables that are associated with the endpoint.
+//
+// * When you delete a
+// Gateway Load Balancer endpoint, we delete the endpoint network interfaces. You
+// can only delete Gateway Load Balancer endpoints when the routes that are
+// associated with the endpoint are deleted.
+//
+// * When you delete an interface
+// endpoint, we delete the endpoint network interfaces.
+func (c *Client) DeleteVpcEndpoints(ctx context.Context, params *DeleteVpcEndpointsInput, optFns ...func(*Options)) (*DeleteVpcEndpointsOutput, error) {
+ if params == nil {
+ params = &DeleteVpcEndpointsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeleteVpcEndpoints", params, optFns, c.addOperationDeleteVpcEndpointsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeleteVpcEndpointsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+// Contains the parameters for DeleteVpcEndpoints.
+type DeleteVpcEndpointsInput struct {
+
+ // One or more VPC endpoint IDs.
+ //
+ // This member is required.
+ VpcEndpointIds []string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+// Contains the output of DeleteVpcEndpoints.
+type DeleteVpcEndpointsOutput struct {
+
+ // Information about the VPC endpoints that were not successfully deleted.
+ Unsuccessful []types.UnsuccessfulItem
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeleteVpcEndpointsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteVpcEndpoints{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteVpcEndpoints{}, 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 = addOpDeleteVpcEndpointsValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteVpcEndpoints(options.Region), middleware.Before); 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_opDeleteVpcEndpoints(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DeleteVpcEndpoints",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteVpcPeeringConnection.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteVpcPeeringConnection.go
new file mode 100644
index 00000000..935a5fda
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteVpcPeeringConnection.go
@@ -0,0 +1,130 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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 VPC peering connection. Either the owner of the requester VPC or the
+// owner of the accepter VPC can delete the VPC peering connection if it's in the
+// active state. The owner of the requester VPC can delete a VPC peering connection
+// in the pending-acceptance state. You cannot delete a VPC peering connection
+// that's in the failed state.
+func (c *Client) DeleteVpcPeeringConnection(ctx context.Context, params *DeleteVpcPeeringConnectionInput, optFns ...func(*Options)) (*DeleteVpcPeeringConnectionOutput, error) {
+ if params == nil {
+ params = &DeleteVpcPeeringConnectionInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeleteVpcPeeringConnection", params, optFns, c.addOperationDeleteVpcPeeringConnectionMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeleteVpcPeeringConnectionOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DeleteVpcPeeringConnectionInput struct {
+
+ // The ID of the VPC peering connection.
+ //
+ // This member is required.
+ VpcPeeringConnectionId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type DeleteVpcPeeringConnectionOutput struct {
+
+ // Returns true if the request succeeds; otherwise, it returns an error.
+ Return *bool
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeleteVpcPeeringConnectionMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteVpcPeeringConnection{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteVpcPeeringConnection{}, 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 = addOpDeleteVpcPeeringConnectionValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteVpcPeeringConnection(options.Region), middleware.Before); 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_opDeleteVpcPeeringConnection(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DeleteVpcPeeringConnection",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteVpnConnection.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteVpnConnection.go
new file mode 100644
index 00000000..89702e4d
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteVpnConnection.go
@@ -0,0 +1,133 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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 the specified VPN connection. If you're deleting the VPC and its
+// associated components, we recommend that you detach the virtual private gateway
+// from the VPC and delete the VPC before deleting the VPN connection. If you
+// believe that the tunnel credentials for your VPN connection have been
+// compromised, you can delete the VPN connection and create a new one that has new
+// keys, without needing to delete the VPC or virtual private gateway. If you
+// create a new VPN connection, you must reconfigure the customer gateway device
+// using the new configuration information returned with the new VPN connection ID.
+// For certificate-based authentication, delete all Certificate Manager (ACM)
+// private certificates used for the Amazon Web Services-side tunnel endpoints for
+// the VPN connection before deleting the VPN connection.
+func (c *Client) DeleteVpnConnection(ctx context.Context, params *DeleteVpnConnectionInput, optFns ...func(*Options)) (*DeleteVpnConnectionOutput, error) {
+ if params == nil {
+ params = &DeleteVpnConnectionInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeleteVpnConnection", params, optFns, c.addOperationDeleteVpnConnectionMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeleteVpnConnectionOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+// Contains the parameters for DeleteVpnConnection.
+type DeleteVpnConnectionInput struct {
+
+ // The ID of the VPN connection.
+ //
+ // This member is required.
+ VpnConnectionId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type DeleteVpnConnectionOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeleteVpnConnectionMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteVpnConnection{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteVpnConnection{}, 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 = addOpDeleteVpnConnectionValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteVpnConnection(options.Region), middleware.Before); 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_opDeleteVpnConnection(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DeleteVpnConnection",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteVpnConnectionRoute.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteVpnConnectionRoute.go
new file mode 100644
index 00000000..a8285893
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteVpnConnectionRoute.go
@@ -0,0 +1,125 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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 the specified static route associated with a VPN connection between an
+// existing virtual private gateway and a VPN customer gateway. The static route
+// allows traffic to be routed from the virtual private gateway to the VPN customer
+// gateway.
+func (c *Client) DeleteVpnConnectionRoute(ctx context.Context, params *DeleteVpnConnectionRouteInput, optFns ...func(*Options)) (*DeleteVpnConnectionRouteOutput, error) {
+ if params == nil {
+ params = &DeleteVpnConnectionRouteInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeleteVpnConnectionRoute", params, optFns, c.addOperationDeleteVpnConnectionRouteMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeleteVpnConnectionRouteOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+// Contains the parameters for DeleteVpnConnectionRoute.
+type DeleteVpnConnectionRouteInput struct {
+
+ // The CIDR block associated with the local subnet of the customer network.
+ //
+ // This member is required.
+ DestinationCidrBlock *string
+
+ // The ID of the VPN connection.
+ //
+ // This member is required.
+ VpnConnectionId *string
+
+ noSmithyDocumentSerde
+}
+
+type DeleteVpnConnectionRouteOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeleteVpnConnectionRouteMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteVpnConnectionRoute{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteVpnConnectionRoute{}, 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 = addOpDeleteVpnConnectionRouteValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteVpnConnectionRoute(options.Region), middleware.Before); 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_opDeleteVpnConnectionRoute(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DeleteVpnConnectionRoute",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteVpnGateway.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteVpnGateway.go
new file mode 100644
index 00000000..f546dbec
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteVpnGateway.go
@@ -0,0 +1,126 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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 the specified virtual private gateway. You must first detach the virtual
+// private gateway from the VPC. Note that you don't need to delete the virtual
+// private gateway if you plan to delete and recreate the VPN connection between
+// your VPC and your network.
+func (c *Client) DeleteVpnGateway(ctx context.Context, params *DeleteVpnGatewayInput, optFns ...func(*Options)) (*DeleteVpnGatewayOutput, error) {
+ if params == nil {
+ params = &DeleteVpnGatewayInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeleteVpnGateway", params, optFns, c.addOperationDeleteVpnGatewayMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeleteVpnGatewayOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+// Contains the parameters for DeleteVpnGateway.
+type DeleteVpnGatewayInput struct {
+
+ // The ID of the virtual private gateway.
+ //
+ // This member is required.
+ VpnGatewayId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type DeleteVpnGatewayOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeleteVpnGatewayMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteVpnGateway{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteVpnGateway{}, 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 = addOpDeleteVpnGatewayValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteVpnGateway(options.Region), middleware.Before); 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_opDeleteVpnGateway(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DeleteVpnGateway",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeprovisionByoipCidr.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeprovisionByoipCidr.go
new file mode 100644
index 00000000..a018e4ec
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeprovisionByoipCidr.go
@@ -0,0 +1,132 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Releases the specified address range that you provisioned for use with your
+// Amazon Web Services resources through bring your own IP addresses (BYOIP) and
+// deletes the corresponding address pool. Before you can release an address range,
+// you must stop advertising it using WithdrawByoipCidr and you must not have any
+// IP addresses allocated from its address range.
+func (c *Client) DeprovisionByoipCidr(ctx context.Context, params *DeprovisionByoipCidrInput, optFns ...func(*Options)) (*DeprovisionByoipCidrOutput, error) {
+ if params == nil {
+ params = &DeprovisionByoipCidrInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeprovisionByoipCidr", params, optFns, c.addOperationDeprovisionByoipCidrMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeprovisionByoipCidrOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DeprovisionByoipCidrInput struct {
+
+ // The address range, in CIDR notation. The prefix must be the same prefix that you
+ // specified when you provisioned the address range.
+ //
+ // This member is required.
+ Cidr *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type DeprovisionByoipCidrOutput struct {
+
+ // Information about the address range.
+ ByoipCidr *types.ByoipCidr
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeprovisionByoipCidrMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDeprovisionByoipCidr{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeprovisionByoipCidr{}, 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 = addOpDeprovisionByoipCidrValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeprovisionByoipCidr(options.Region), middleware.Before); 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_opDeprovisionByoipCidr(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DeprovisionByoipCidr",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeregisterImage.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeregisterImage.go
new file mode 100644
index 00000000..009daabd
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeregisterImage.go
@@ -0,0 +1,130 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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"
+)
+
+// Deregisters the specified AMI. After you deregister an AMI, it can't be used to
+// launch new instances; however, it doesn't affect any instances that you've
+// already launched from the AMI. You'll continue to incur usage costs for those
+// instances until you terminate them. When you deregister an Amazon EBS-backed
+// AMI, it doesn't affect the snapshot that was created for the root volume of the
+// instance during the AMI creation process. When you deregister an instance
+// store-backed AMI, it doesn't affect the files that you uploaded to Amazon S3
+// when you created the AMI.
+func (c *Client) DeregisterImage(ctx context.Context, params *DeregisterImageInput, optFns ...func(*Options)) (*DeregisterImageOutput, error) {
+ if params == nil {
+ params = &DeregisterImageInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeregisterImage", params, optFns, c.addOperationDeregisterImageMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeregisterImageOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+// Contains the parameters for DeregisterImage.
+type DeregisterImageInput struct {
+
+ // The ID of the AMI.
+ //
+ // This member is required.
+ ImageId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type DeregisterImageOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeregisterImageMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDeregisterImage{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeregisterImage{}, 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 = addOpDeregisterImageValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeregisterImage(options.Region), middleware.Before); 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_opDeregisterImage(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DeregisterImage",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeregisterInstanceEventNotificationAttributes.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeregisterInstanceEventNotificationAttributes.go
new file mode 100644
index 00000000..7eb38669
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeregisterInstanceEventNotificationAttributes.go
@@ -0,0 +1,123 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// c Deregisters tag keys to prevent tags that have the specified tag keys from
+// being included in scheduled event notifications for resources in the Region.
+func (c *Client) DeregisterInstanceEventNotificationAttributes(ctx context.Context, params *DeregisterInstanceEventNotificationAttributesInput, optFns ...func(*Options)) (*DeregisterInstanceEventNotificationAttributesOutput, error) {
+ if params == nil {
+ params = &DeregisterInstanceEventNotificationAttributesInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeregisterInstanceEventNotificationAttributes", params, optFns, c.addOperationDeregisterInstanceEventNotificationAttributesMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeregisterInstanceEventNotificationAttributesOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DeregisterInstanceEventNotificationAttributesInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // Information about the tag keys to deregister.
+ InstanceTagAttribute *types.DeregisterInstanceTagAttributeRequest
+
+ noSmithyDocumentSerde
+}
+
+type DeregisterInstanceEventNotificationAttributesOutput struct {
+
+ // The resulting set of tag keys.
+ InstanceTagAttribute *types.InstanceTagNotificationAttribute
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeregisterInstanceEventNotificationAttributesMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDeregisterInstanceEventNotificationAttributes{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeregisterInstanceEventNotificationAttributes{}, 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_opDeregisterInstanceEventNotificationAttributes(options.Region), middleware.Before); 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_opDeregisterInstanceEventNotificationAttributes(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DeregisterInstanceEventNotificationAttributes",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeregisterTransitGatewayMulticastGroupMembers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeregisterTransitGatewayMulticastGroupMembers.go
new file mode 100644
index 00000000..cb21a50b
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeregisterTransitGatewayMulticastGroupMembers.go
@@ -0,0 +1,129 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Deregisters the specified members (network interfaces) from the transit gateway
+// multicast group.
+func (c *Client) DeregisterTransitGatewayMulticastGroupMembers(ctx context.Context, params *DeregisterTransitGatewayMulticastGroupMembersInput, optFns ...func(*Options)) (*DeregisterTransitGatewayMulticastGroupMembersOutput, error) {
+ if params == nil {
+ params = &DeregisterTransitGatewayMulticastGroupMembersInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeregisterTransitGatewayMulticastGroupMembers", params, optFns, c.addOperationDeregisterTransitGatewayMulticastGroupMembersMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeregisterTransitGatewayMulticastGroupMembersOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DeregisterTransitGatewayMulticastGroupMembersInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The IP address assigned to the transit gateway multicast group.
+ GroupIpAddress *string
+
+ // The IDs of the group members' network interfaces.
+ NetworkInterfaceIds []string
+
+ // The ID of the transit gateway multicast domain.
+ TransitGatewayMulticastDomainId *string
+
+ noSmithyDocumentSerde
+}
+
+type DeregisterTransitGatewayMulticastGroupMembersOutput struct {
+
+ // Information about the deregistered members.
+ DeregisteredMulticastGroupMembers *types.TransitGatewayMulticastDeregisteredGroupMembers
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeregisterTransitGatewayMulticastGroupMembersMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDeregisterTransitGatewayMulticastGroupMembers{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeregisterTransitGatewayMulticastGroupMembers{}, 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_opDeregisterTransitGatewayMulticastGroupMembers(options.Region), middleware.Before); 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_opDeregisterTransitGatewayMulticastGroupMembers(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DeregisterTransitGatewayMulticastGroupMembers",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeregisterTransitGatewayMulticastGroupSources.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeregisterTransitGatewayMulticastGroupSources.go
new file mode 100644
index 00000000..aeac236a
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeregisterTransitGatewayMulticastGroupSources.go
@@ -0,0 +1,129 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Deregisters the specified sources (network interfaces) from the transit gateway
+// multicast group.
+func (c *Client) DeregisterTransitGatewayMulticastGroupSources(ctx context.Context, params *DeregisterTransitGatewayMulticastGroupSourcesInput, optFns ...func(*Options)) (*DeregisterTransitGatewayMulticastGroupSourcesOutput, error) {
+ if params == nil {
+ params = &DeregisterTransitGatewayMulticastGroupSourcesInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeregisterTransitGatewayMulticastGroupSources", params, optFns, c.addOperationDeregisterTransitGatewayMulticastGroupSourcesMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeregisterTransitGatewayMulticastGroupSourcesOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DeregisterTransitGatewayMulticastGroupSourcesInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The IP address assigned to the transit gateway multicast group.
+ GroupIpAddress *string
+
+ // The IDs of the group sources' network interfaces.
+ NetworkInterfaceIds []string
+
+ // The ID of the transit gateway multicast domain.
+ TransitGatewayMulticastDomainId *string
+
+ noSmithyDocumentSerde
+}
+
+type DeregisterTransitGatewayMulticastGroupSourcesOutput struct {
+
+ // Information about the deregistered group sources.
+ DeregisteredMulticastGroupSources *types.TransitGatewayMulticastDeregisteredGroupSources
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeregisterTransitGatewayMulticastGroupSourcesMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDeregisterTransitGatewayMulticastGroupSources{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeregisterTransitGatewayMulticastGroupSources{}, 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_opDeregisterTransitGatewayMulticastGroupSources(options.Region), middleware.Before); 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_opDeregisterTransitGatewayMulticastGroupSources(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DeregisterTransitGatewayMulticastGroupSources",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeAccountAttributes.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeAccountAttributes.go
new file mode 100644
index 00000000..c939a076
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeAccountAttributes.go
@@ -0,0 +1,147 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes attributes of your AWS account. The following are the supported
+// account attributes:
+//
+// * supported-platforms: Indicates whether your account can
+// launch instances into EC2-Classic and EC2-VPC, or only into EC2-VPC.
+//
+// *
+// default-vpc: The ID of the default VPC for your account, or none.
+//
+// *
+// max-instances: This attribute is no longer supported. The returned value does
+// not reflect your actual vCPU limit for running On-Demand Instances. For more
+// information, see On-Demand Instance Limits
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-on-demand-instances.html#ec2-on-demand-instances-limits)
+// in the Amazon Elastic Compute Cloud User Guide.
+//
+// *
+// vpc-max-security-groups-per-interface: The maximum number of security groups
+// that you can assign to a network interface.
+//
+// * max-elastic-ips: The maximum
+// number of Elastic IP addresses that you can allocate for use with
+// EC2-Classic.
+//
+// * vpc-max-elastic-ips: The maximum number of Elastic IP addresses
+// that you can allocate for use with EC2-VPC.
+func (c *Client) DescribeAccountAttributes(ctx context.Context, params *DescribeAccountAttributesInput, optFns ...func(*Options)) (*DescribeAccountAttributesOutput, error) {
+ if params == nil {
+ params = &DescribeAccountAttributesInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeAccountAttributes", params, optFns, c.addOperationDescribeAccountAttributesMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeAccountAttributesOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeAccountAttributesInput struct {
+
+ // The account attribute names.
+ AttributeNames []types.AccountAttributeName
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type DescribeAccountAttributesOutput struct {
+
+ // Information about the account attributes.
+ AccountAttributes []types.AccountAttribute
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeAccountAttributesMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeAccountAttributes{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeAccountAttributes{}, 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_opDescribeAccountAttributes(options.Region), middleware.Before); 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_opDescribeAccountAttributes(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeAccountAttributes",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeAddresses.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeAddresses.go
new file mode 100644
index 00000000..9b39fe99
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeAddresses.go
@@ -0,0 +1,172 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes the specified Elastic IP addresses or all of your Elastic IP
+// addresses. An Elastic IP address is for use in either the EC2-Classic platform
+// or in a VPC. For more information, see Elastic IP Addresses
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html)
+// in the Amazon Elastic Compute Cloud User Guide.
+func (c *Client) DescribeAddresses(ctx context.Context, params *DescribeAddressesInput, optFns ...func(*Options)) (*DescribeAddressesOutput, error) {
+ if params == nil {
+ params = &DescribeAddressesInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeAddresses", params, optFns, c.addOperationDescribeAddressesMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeAddressesOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeAddressesInput struct {
+
+ // [EC2-VPC] Information about the allocation IDs.
+ AllocationIds []string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // One or more filters. Filter names and values are case-sensitive.
+ //
+ // *
+ // allocation-id - [EC2-VPC] The allocation ID for the address.
+ //
+ // * association-id -
+ // [EC2-VPC] The association ID for the address.
+ //
+ // * domain - Indicates whether the
+ // address is for use in EC2-Classic (standard) or in a VPC (vpc).
+ //
+ // * instance-id -
+ // The ID of the instance the address is associated with, if any.
+ //
+ // *
+ // network-border-group - A unique set of Availability Zones, Local Zones, or
+ // Wavelength Zones from where Amazon Web Services advertises IP addresses.
+ //
+ // *
+ // network-interface-id - [EC2-VPC] The ID of the network interface that the
+ // address is associated with, if any.
+ //
+ // * network-interface-owner-id - The Amazon
+ // Web Services account ID of the owner.
+ //
+ // * private-ip-address - [EC2-VPC] The
+ // private IP address associated with the Elastic IP address.
+ //
+ // * public-ip - The
+ // Elastic IP address, or the carrier IP address.
+ //
+ // * tag: - The key/value
+ // combination of a tag assigned to the resource. Use the tag key in the filter
+ // name and the tag value as the filter value. For example, to find all resources
+ // that have a tag with the key Owner and the value TeamA, specify tag:Owner for
+ // the filter name and TeamA for the filter value.
+ //
+ // * tag-key - The key of a tag
+ // assigned to the resource. Use this filter to find all resources assigned a tag
+ // with a specific key, regardless of the tag value.
+ Filters []types.Filter
+
+ // One or more Elastic IP addresses. Default: Describes all your Elastic IP
+ // addresses.
+ PublicIps []string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeAddressesOutput struct {
+
+ // Information about the Elastic IP addresses.
+ Addresses []types.Address
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeAddressesMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeAddresses{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeAddresses{}, 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_opDescribeAddresses(options.Region), middleware.Before); 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_opDescribeAddresses(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeAddresses",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeAddressesAttribute.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeAddressesAttribute.go
new file mode 100644
index 00000000..92767fb1
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeAddressesAttribute.go
@@ -0,0 +1,229 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes the attributes of the specified Elastic IP addresses. For
+// requirements, see Using reverse DNS for email applications
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html#Using_Elastic_Addressing_Reverse_DNS).
+func (c *Client) DescribeAddressesAttribute(ctx context.Context, params *DescribeAddressesAttributeInput, optFns ...func(*Options)) (*DescribeAddressesAttributeOutput, error) {
+ if params == nil {
+ params = &DescribeAddressesAttributeInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeAddressesAttribute", params, optFns, c.addOperationDescribeAddressesAttributeMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeAddressesAttributeOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeAddressesAttributeInput struct {
+
+ // [EC2-VPC] The allocation IDs.
+ AllocationIds []string
+
+ // The attribute of the IP address.
+ Attribute types.AddressAttributeName
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ MaxResults *int32
+
+ // The token for the next page of results.
+ NextToken *string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeAddressesAttributeOutput struct {
+
+ // Information about the IP addresses.
+ Addresses []types.AddressAttribute
+
+ // The token to use to retrieve the next page of results. This value is null when
+ // there are no more results to return.
+ NextToken *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeAddressesAttributeMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeAddressesAttribute{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeAddressesAttribute{}, 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_opDescribeAddressesAttribute(options.Region), middleware.Before); 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
+}
+
+// DescribeAddressesAttributeAPIClient is a client that implements the
+// DescribeAddressesAttribute operation.
+type DescribeAddressesAttributeAPIClient interface {
+ DescribeAddressesAttribute(context.Context, *DescribeAddressesAttributeInput, ...func(*Options)) (*DescribeAddressesAttributeOutput, error)
+}
+
+var _ DescribeAddressesAttributeAPIClient = (*Client)(nil)
+
+// DescribeAddressesAttributePaginatorOptions is the paginator options for
+// DescribeAddressesAttribute
+type DescribeAddressesAttributePaginatorOptions struct {
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ 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
+}
+
+// DescribeAddressesAttributePaginator is a paginator for
+// DescribeAddressesAttribute
+type DescribeAddressesAttributePaginator struct {
+ options DescribeAddressesAttributePaginatorOptions
+ client DescribeAddressesAttributeAPIClient
+ params *DescribeAddressesAttributeInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribeAddressesAttributePaginator returns a new
+// DescribeAddressesAttributePaginator
+func NewDescribeAddressesAttributePaginator(client DescribeAddressesAttributeAPIClient, params *DescribeAddressesAttributeInput, optFns ...func(*DescribeAddressesAttributePaginatorOptions)) *DescribeAddressesAttributePaginator {
+ if params == nil {
+ params = &DescribeAddressesAttributeInput{}
+ }
+
+ options := DescribeAddressesAttributePaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribeAddressesAttributePaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribeAddressesAttributePaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribeAddressesAttribute page.
+func (p *DescribeAddressesAttributePaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeAddressesAttributeOutput, 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.DescribeAddressesAttribute(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_opDescribeAddressesAttribute(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeAddressesAttribute",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeAggregateIdFormat.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeAggregateIdFormat.go
new file mode 100644
index 00000000..b16b41eb
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeAggregateIdFormat.go
@@ -0,0 +1,135 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes the longer ID format settings for all resource types in a specific
+// Region. This request is useful for performing a quick audit to determine whether
+// a specific Region is fully opted in for longer IDs (17-character IDs). This
+// request only returns information about resource types that support longer IDs.
+// The following resource types support longer IDs: bundle | conversion-task |
+// customer-gateway | dhcp-options | elastic-ip-allocation | elastic-ip-association
+// | export-task | flow-log | image | import-task | instance | internet-gateway |
+// network-acl | network-acl-association | network-interface |
+// network-interface-attachment | prefix-list | reservation | route-table |
+// route-table-association | security-group | snapshot | subnet |
+// subnet-cidr-block-association | volume | vpc | vpc-cidr-block-association |
+// vpc-endpoint | vpc-peering-connection | vpn-connection | vpn-gateway.
+func (c *Client) DescribeAggregateIdFormat(ctx context.Context, params *DescribeAggregateIdFormatInput, optFns ...func(*Options)) (*DescribeAggregateIdFormatOutput, error) {
+ if params == nil {
+ params = &DescribeAggregateIdFormatInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeAggregateIdFormat", params, optFns, c.addOperationDescribeAggregateIdFormatMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeAggregateIdFormatOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeAggregateIdFormatInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type DescribeAggregateIdFormatOutput struct {
+
+ // Information about each resource's ID format.
+ Statuses []types.IdFormat
+
+ // Indicates whether all resource types in the Region are configured to use longer
+ // IDs. This value is only true if all users are configured to use longer IDs for
+ // all resources types in the Region.
+ UseLongIdsAggregated *bool
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeAggregateIdFormatMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeAggregateIdFormat{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeAggregateIdFormat{}, 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_opDescribeAggregateIdFormat(options.Region), middleware.Before); 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_opDescribeAggregateIdFormat(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeAggregateIdFormat",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeAvailabilityZones.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeAvailabilityZones.go
new file mode 100644
index 00000000..e06a8df4
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeAvailabilityZones.go
@@ -0,0 +1,179 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes the Availability Zones, Local Zones, and Wavelength Zones that are
+// available to you. If there is an event impacting a zone, you can use this
+// request to view the state and any provided messages for that zone. For more
+// information about Availability Zones, Local Zones, and Wavelength Zones, see
+// Regions, Zones and Outposts
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html)
+// in the Amazon Elastic Compute Cloud User Guide.
+func (c *Client) DescribeAvailabilityZones(ctx context.Context, params *DescribeAvailabilityZonesInput, optFns ...func(*Options)) (*DescribeAvailabilityZonesOutput, error) {
+ if params == nil {
+ params = &DescribeAvailabilityZonesInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeAvailabilityZones", params, optFns, c.addOperationDescribeAvailabilityZonesMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeAvailabilityZonesOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeAvailabilityZonesInput struct {
+
+ // Include all Availability Zones, Local Zones, and Wavelength Zones regardless of
+ // your opt-in status. If you do not use this parameter, the results include only
+ // the zones for the Regions where you have chosen the option to opt in.
+ AllAvailabilityZones *bool
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The filters.
+ //
+ // * group-name - For Availability Zones, use the Region name. For
+ // Local Zones, use the name of the group associated with the Local Zone (for
+ // example, us-west-2-lax-1) For Wavelength Zones, use the name of the group
+ // associated with the Wavelength Zone (for example, us-east-1-wl1-bos-wlz-1).
+ //
+ // *
+ // message - The Zone message.
+ //
+ // * opt-in-status - The opt-in status (opted-in, and
+ // not-opted-in | opt-in-not-required).
+ //
+ // * parent-zoneID - The ID of the zone that
+ // handles some of the Local Zone and Wavelength Zone control plane operations,
+ // such as API calls.
+ //
+ // * parent-zoneName - The ID of the zone that handles some of
+ // the Local Zone and Wavelength Zone control plane operations, such as API
+ // calls.
+ //
+ // * region-name - The name of the Region for the Zone (for example,
+ // us-east-1).
+ //
+ // * state - The state of the Availability Zone, the Local Zone, or
+ // the Wavelength Zone (available | information | impaired | unavailable).
+ //
+ // *
+ // zone-id - The ID of the Availability Zone (for example, use1-az1), the Local
+ // Zone (for example, usw2-lax1-az1), or the Wavelength Zone (for example,
+ // us-east-1-wl1-bos-wlz-1).
+ //
+ // * zone-type - The type of zone, for example,
+ // local-zone.
+ //
+ // * zone-name - The name of the Availability Zone (for example,
+ // us-east-1a), the Local Zone (for example, us-west-2-lax-1a), or the Wavelength
+ // Zone (for example, us-east-1-wl1-bos-wlz-1).
+ //
+ // * zone-type - The type of zone,
+ // for example, local-zone.
+ Filters []types.Filter
+
+ // The IDs of the Availability Zones, Local Zones, and Wavelength Zones.
+ ZoneIds []string
+
+ // The names of the Availability Zones, Local Zones, and Wavelength Zones.
+ ZoneNames []string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeAvailabilityZonesOutput struct {
+
+ // Information about the Availability Zones, Local Zones, and Wavelength Zones.
+ AvailabilityZones []types.AvailabilityZone
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeAvailabilityZonesMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeAvailabilityZones{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeAvailabilityZones{}, 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_opDescribeAvailabilityZones(options.Region), middleware.Before); 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_opDescribeAvailabilityZones(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeAvailabilityZones",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeBundleTasks.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeBundleTasks.go
new file mode 100644
index 00000000..c5a4927a
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeBundleTasks.go
@@ -0,0 +1,360 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/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"
+)
+
+// Describes the specified bundle tasks or all of your bundle tasks. Completed
+// bundle tasks are listed for only a limited time. If your bundle task is no
+// longer in the list, you can still register an AMI from it. Just use
+// RegisterImage with the Amazon S3 bucket name and image manifest name you
+// provided to the bundle task.
+func (c *Client) DescribeBundleTasks(ctx context.Context, params *DescribeBundleTasksInput, optFns ...func(*Options)) (*DescribeBundleTasksOutput, error) {
+ if params == nil {
+ params = &DescribeBundleTasksInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeBundleTasks", params, optFns, c.addOperationDescribeBundleTasksMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeBundleTasksOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeBundleTasksInput struct {
+
+ // The bundle task IDs. Default: Describes all your bundle tasks.
+ BundleIds []string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The filters.
+ //
+ // * bundle-id - The ID of the bundle task.
+ //
+ // * error-code - If the
+ // task failed, the error code returned.
+ //
+ // * error-message - If the task failed, the
+ // error message returned.
+ //
+ // * instance-id - The ID of the instance.
+ //
+ // * progress -
+ // The level of task completion, as a percentage (for example, 20%).
+ //
+ // * s3-bucket -
+ // The Amazon S3 bucket to store the AMI.
+ //
+ // * s3-prefix - The beginning of the AMI
+ // name.
+ //
+ // * start-time - The time the task started (for example,
+ // 2013-09-15T17:15:20.000Z).
+ //
+ // * state - The state of the task (pending |
+ // waiting-for-shutdown | bundling | storing | cancelling | complete | failed).
+ //
+ // *
+ // update-time - The time of the most recent update for the task.
+ Filters []types.Filter
+
+ noSmithyDocumentSerde
+}
+
+type DescribeBundleTasksOutput struct {
+
+ // Information about the bundle tasks.
+ BundleTasks []types.BundleTask
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeBundleTasksMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeBundleTasks{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeBundleTasks{}, 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_opDescribeBundleTasks(options.Region), middleware.Before); 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
+}
+
+// DescribeBundleTasksAPIClient is a client that implements the DescribeBundleTasks
+// operation.
+type DescribeBundleTasksAPIClient interface {
+ DescribeBundleTasks(context.Context, *DescribeBundleTasksInput, ...func(*Options)) (*DescribeBundleTasksOutput, error)
+}
+
+var _ DescribeBundleTasksAPIClient = (*Client)(nil)
+
+// BundleTaskCompleteWaiterOptions are waiter options for BundleTaskCompleteWaiter
+type BundleTaskCompleteWaiterOptions 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,
+ // BundleTaskCompleteWaiter will use default minimum delay of 15 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, BundleTaskCompleteWaiter 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, *DescribeBundleTasksInput, *DescribeBundleTasksOutput, error) (bool, error)
+}
+
+// BundleTaskCompleteWaiter defines the waiters for BundleTaskComplete
+type BundleTaskCompleteWaiter struct {
+ client DescribeBundleTasksAPIClient
+
+ options BundleTaskCompleteWaiterOptions
+}
+
+// NewBundleTaskCompleteWaiter constructs a BundleTaskCompleteWaiter.
+func NewBundleTaskCompleteWaiter(client DescribeBundleTasksAPIClient, optFns ...func(*BundleTaskCompleteWaiterOptions)) *BundleTaskCompleteWaiter {
+ options := BundleTaskCompleteWaiterOptions{}
+ options.MinDelay = 15 * time.Second
+ options.MaxDelay = 120 * time.Second
+ options.Retryable = bundleTaskCompleteStateRetryable
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+ return &BundleTaskCompleteWaiter{
+ client: client,
+ options: options,
+ }
+}
+
+// Wait calls the waiter function for BundleTaskComplete waiter. The maxWaitDur is
+// the maximum wait duration the waiter will wait. The maxWaitDur is required and
+// must be greater than zero.
+func (w *BundleTaskCompleteWaiter) Wait(ctx context.Context, params *DescribeBundleTasksInput, maxWaitDur time.Duration, optFns ...func(*BundleTaskCompleteWaiterOptions)) error {
+ if maxWaitDur <= 0 {
+ return 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 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.DescribeBundleTasks(ctx, params, func(o *Options) {
+ o.APIOptions = append(o.APIOptions, apiOptions...)
+ })
+
+ retryable, err := options.Retryable(ctx, params, out, err)
+ if err != nil {
+ return err
+ }
+ if !retryable {
+ return 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 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 fmt.Errorf("request cancelled while waiting, %w", err)
+ }
+ }
+ return fmt.Errorf("exceeded max wait time for BundleTaskComplete waiter")
+}
+
+func bundleTaskCompleteStateRetryable(ctx context.Context, input *DescribeBundleTasksInput, output *DescribeBundleTasksOutput, err error) (bool, error) {
+
+ if err == nil {
+ pathValue, err := jmespath.Search("BundleTasks[].State", output)
+ if err != nil {
+ return false, fmt.Errorf("error evaluating waiter state: %w", err)
+ }
+
+ expectedValue := "complete"
+ var match = true
+ listOfValues, ok := pathValue.([]interface{})
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected list got %T", pathValue)
+ }
+
+ if len(listOfValues) == 0 {
+ match = false
+ }
+ for _, v := range listOfValues {
+ value, ok := v.(types.BundleTaskState)
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected types.BundleTaskState value, got %T", pathValue)
+ }
+
+ if string(value) != expectedValue {
+ match = false
+ }
+ }
+
+ if match {
+ return false, nil
+ }
+ }
+
+ if err == nil {
+ pathValue, err := jmespath.Search("BundleTasks[].State", output)
+ if err != nil {
+ return false, fmt.Errorf("error evaluating waiter state: %w", err)
+ }
+
+ expectedValue := "failed"
+ listOfValues, ok := pathValue.([]interface{})
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected list got %T", pathValue)
+ }
+
+ for _, v := range listOfValues {
+ value, ok := v.(types.BundleTaskState)
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected types.BundleTaskState value, got %T", pathValue)
+ }
+
+ if string(value) == expectedValue {
+ return false, fmt.Errorf("waiter state transitioned to Failure")
+ }
+ }
+ }
+
+ return true, nil
+}
+
+func newServiceMetadataMiddleware_opDescribeBundleTasks(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeBundleTasks",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeByoipCidrs.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeByoipCidrs.go
new file mode 100644
index 00000000..cababadf
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeByoipCidrs.go
@@ -0,0 +1,227 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes the IP address ranges that were specified in calls to
+// ProvisionByoipCidr. To describe the address pools that were created when you
+// provisioned the address ranges, use DescribePublicIpv4Pools or
+// DescribeIpv6Pools.
+func (c *Client) DescribeByoipCidrs(ctx context.Context, params *DescribeByoipCidrsInput, optFns ...func(*Options)) (*DescribeByoipCidrsOutput, error) {
+ if params == nil {
+ params = &DescribeByoipCidrsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeByoipCidrs", params, optFns, c.addOperationDescribeByoipCidrsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeByoipCidrsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeByoipCidrsInput struct {
+
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ //
+ // This member is required.
+ MaxResults *int32
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The token for the next page of results.
+ NextToken *string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeByoipCidrsOutput struct {
+
+ // Information about your address ranges.
+ ByoipCidrs []types.ByoipCidr
+
+ // The token to use to retrieve the next page of results. This value is null when
+ // there are no more results to return.
+ NextToken *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeByoipCidrsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeByoipCidrs{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeByoipCidrs{}, 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 = addOpDescribeByoipCidrsValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeByoipCidrs(options.Region), middleware.Before); 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
+}
+
+// DescribeByoipCidrsAPIClient is a client that implements the DescribeByoipCidrs
+// operation.
+type DescribeByoipCidrsAPIClient interface {
+ DescribeByoipCidrs(context.Context, *DescribeByoipCidrsInput, ...func(*Options)) (*DescribeByoipCidrsOutput, error)
+}
+
+var _ DescribeByoipCidrsAPIClient = (*Client)(nil)
+
+// DescribeByoipCidrsPaginatorOptions is the paginator options for
+// DescribeByoipCidrs
+type DescribeByoipCidrsPaginatorOptions struct {
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ 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
+}
+
+// DescribeByoipCidrsPaginator is a paginator for DescribeByoipCidrs
+type DescribeByoipCidrsPaginator struct {
+ options DescribeByoipCidrsPaginatorOptions
+ client DescribeByoipCidrsAPIClient
+ params *DescribeByoipCidrsInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribeByoipCidrsPaginator returns a new DescribeByoipCidrsPaginator
+func NewDescribeByoipCidrsPaginator(client DescribeByoipCidrsAPIClient, params *DescribeByoipCidrsInput, optFns ...func(*DescribeByoipCidrsPaginatorOptions)) *DescribeByoipCidrsPaginator {
+ if params == nil {
+ params = &DescribeByoipCidrsInput{}
+ }
+
+ options := DescribeByoipCidrsPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribeByoipCidrsPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribeByoipCidrsPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribeByoipCidrs page.
+func (p *DescribeByoipCidrsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeByoipCidrsOutput, 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.DescribeByoipCidrs(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_opDescribeByoipCidrs(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeByoipCidrs",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeCapacityReservations.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeCapacityReservations.go
new file mode 100644
index 00000000..8dd2b494
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeCapacityReservations.go
@@ -0,0 +1,319 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes one or more of your Capacity Reservations. The results describe only
+// the Capacity Reservations in the Amazon Web Services Region that you're
+// currently using.
+func (c *Client) DescribeCapacityReservations(ctx context.Context, params *DescribeCapacityReservationsInput, optFns ...func(*Options)) (*DescribeCapacityReservationsOutput, error) {
+ if params == nil {
+ params = &DescribeCapacityReservationsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeCapacityReservations", params, optFns, c.addOperationDescribeCapacityReservationsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeCapacityReservationsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeCapacityReservationsInput struct {
+
+ // The ID of the Capacity Reservation.
+ CapacityReservationIds []string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // One or more filters.
+ //
+ // * instance-type - The type of instance for which the
+ // Capacity Reservation reserves capacity.
+ //
+ // * owner-id - The ID of the Amazon Web
+ // Services account that owns the Capacity Reservation.
+ //
+ // * availability-zone-id -
+ // The Availability Zone ID of the Capacity Reservation.
+ //
+ // * instance-platform - The
+ // type of operating system for which the Capacity Reservation reserves
+ // capacity.
+ //
+ // * availability-zone - The Availability Zone ID of the Capacity
+ // Reservation.
+ //
+ // * tenancy - Indicates the tenancy of the Capacity Reservation. A
+ // Capacity Reservation can have one of the following tenancy settings:
+ //
+ // * default
+ // - The Capacity Reservation is created on hardware that is shared with other
+ // Amazon Web Services accounts.
+ //
+ // * dedicated - The Capacity Reservation is created
+ // on single-tenant hardware that is dedicated to a single Amazon Web Services
+ // account.
+ //
+ // * outpost-arn - The Amazon Resource Name (ARN) of the Outpost on which
+ // the Capacity Reservation was created.
+ //
+ // * state - The current state of the
+ // Capacity Reservation. A Capacity Reservation can be in one of the following
+ // states:
+ //
+ // * active- The Capacity Reservation is active and the capacity is
+ // available for your use.
+ //
+ // * expired - The Capacity Reservation expired
+ // automatically at the date and time specified in your request. The reserved
+ // capacity is no longer available for your use.
+ //
+ // * cancelled - The Capacity
+ // Reservation was cancelled. The reserved capacity is no longer available for your
+ // use.
+ //
+ // * pending - The Capacity Reservation request was successful but the
+ // capacity provisioning is still pending.
+ //
+ // * failed - The Capacity Reservation
+ // request has failed. A request might fail due to invalid request parameters,
+ // capacity constraints, or instance limit constraints. Failed requests are
+ // retained for 60 minutes.
+ //
+ // * start-date - The date and time at which the Capacity
+ // Reservation was started.
+ //
+ // * end-date - The date and time at which the Capacity
+ // Reservation expires. When a Capacity Reservation expires, the reserved capacity
+ // is released and you can no longer launch instances into it. The Capacity
+ // Reservation's state changes to expired when it reaches its end date and time.
+ //
+ // *
+ // end-date-type - Indicates the way in which the Capacity Reservation ends. A
+ // Capacity Reservation can have one of the following end types:
+ //
+ // * unlimited - The
+ // Capacity Reservation remains active until you explicitly cancel it.
+ //
+ // * limited -
+ // The Capacity Reservation expires automatically at a specified date and time.
+ //
+ // *
+ // instance-match-criteria - Indicates the type of instance launches that the
+ // Capacity Reservation accepts. The options include:
+ //
+ // * open - The Capacity
+ // Reservation accepts all instances that have matching attributes (instance type,
+ // platform, and Availability Zone). Instances that have matching attributes launch
+ // into the Capacity Reservation automatically without specifying any additional
+ // parameters.
+ //
+ // * targeted - The Capacity Reservation only accepts instances that
+ // have matching attributes (instance type, platform, and Availability Zone), and
+ // explicitly target the Capacity Reservation. This ensures that only permitted
+ // instances can use the reserved capacity.
+ Filters []types.Filter
+
+ // The maximum number of results to return for the request in a single page. The
+ // remaining results can be seen by sending another request with the returned
+ // nextToken value. This value can be between 5 and 500. If maxResults is given a
+ // larger value than 500, you receive an error.
+ MaxResults *int32
+
+ // The token to use to retrieve the next page of results.
+ NextToken *string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeCapacityReservationsOutput struct {
+
+ // Information about the Capacity Reservations.
+ CapacityReservations []types.CapacityReservation
+
+ // The token to use to retrieve the next page of results. This value is null when
+ // there are no more results to return.
+ NextToken *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeCapacityReservationsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeCapacityReservations{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeCapacityReservations{}, 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_opDescribeCapacityReservations(options.Region), middleware.Before); 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
+}
+
+// DescribeCapacityReservationsAPIClient is a client that implements the
+// DescribeCapacityReservations operation.
+type DescribeCapacityReservationsAPIClient interface {
+ DescribeCapacityReservations(context.Context, *DescribeCapacityReservationsInput, ...func(*Options)) (*DescribeCapacityReservationsOutput, error)
+}
+
+var _ DescribeCapacityReservationsAPIClient = (*Client)(nil)
+
+// DescribeCapacityReservationsPaginatorOptions is the paginator options for
+// DescribeCapacityReservations
+type DescribeCapacityReservationsPaginatorOptions struct {
+ // The maximum number of results to return for the request in a single page. The
+ // remaining results can be seen by sending another request with the returned
+ // nextToken value. This value can be between 5 and 500. If maxResults is given a
+ // larger value than 500, you receive an error.
+ 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
+}
+
+// DescribeCapacityReservationsPaginator is a paginator for
+// DescribeCapacityReservations
+type DescribeCapacityReservationsPaginator struct {
+ options DescribeCapacityReservationsPaginatorOptions
+ client DescribeCapacityReservationsAPIClient
+ params *DescribeCapacityReservationsInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribeCapacityReservationsPaginator returns a new
+// DescribeCapacityReservationsPaginator
+func NewDescribeCapacityReservationsPaginator(client DescribeCapacityReservationsAPIClient, params *DescribeCapacityReservationsInput, optFns ...func(*DescribeCapacityReservationsPaginatorOptions)) *DescribeCapacityReservationsPaginator {
+ if params == nil {
+ params = &DescribeCapacityReservationsInput{}
+ }
+
+ options := DescribeCapacityReservationsPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribeCapacityReservationsPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribeCapacityReservationsPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribeCapacityReservations page.
+func (p *DescribeCapacityReservationsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeCapacityReservationsOutput, 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.DescribeCapacityReservations(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_opDescribeCapacityReservations(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeCapacityReservations",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeCarrierGateways.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeCarrierGateways.go
new file mode 100644
index 00000000..f59dba19
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeCarrierGateways.go
@@ -0,0 +1,248 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes one or more of your carrier gateways.
+func (c *Client) DescribeCarrierGateways(ctx context.Context, params *DescribeCarrierGatewaysInput, optFns ...func(*Options)) (*DescribeCarrierGatewaysOutput, error) {
+ if params == nil {
+ params = &DescribeCarrierGatewaysInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeCarrierGateways", params, optFns, c.addOperationDescribeCarrierGatewaysMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeCarrierGatewaysOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeCarrierGatewaysInput struct {
+
+ // One or more carrier gateway IDs.
+ CarrierGatewayIds []string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // One or more filters.
+ //
+ // * carrier-gateway-id - The ID of the carrier gateway.
+ //
+ // *
+ // state - The state of the carrier gateway (pending | failed | available |
+ // deleting | deleted).
+ //
+ // * owner-id - The Amazon Web Services account ID of the
+ // owner of the carrier gateway.
+ //
+ // * tag: - The key/value combination of a tag
+ // assigned to the resource. Use the tag key in the filter name and the tag value
+ // as the filter value. For example, to find all resources that have a tag with the
+ // key Owner and the value TeamA, specify tag:Owner for the filter name and TeamA
+ // for the filter value.
+ //
+ // * tag-key - The key of a tag assigned to the resource.
+ // Use this filter to find all resources assigned a tag with a specific key,
+ // regardless of the tag value.
+ //
+ // * vpc-id - The ID of the VPC associated with the
+ // carrier gateway.
+ Filters []types.Filter
+
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ MaxResults *int32
+
+ // The token for the next page of results.
+ NextToken *string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeCarrierGatewaysOutput struct {
+
+ // Information about the carrier gateway.
+ CarrierGateways []types.CarrierGateway
+
+ // The token to use to retrieve the next page of results. This value is null when
+ // there are no more results to return.
+ NextToken *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeCarrierGatewaysMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeCarrierGateways{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeCarrierGateways{}, 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_opDescribeCarrierGateways(options.Region), middleware.Before); 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
+}
+
+// DescribeCarrierGatewaysAPIClient is a client that implements the
+// DescribeCarrierGateways operation.
+type DescribeCarrierGatewaysAPIClient interface {
+ DescribeCarrierGateways(context.Context, *DescribeCarrierGatewaysInput, ...func(*Options)) (*DescribeCarrierGatewaysOutput, error)
+}
+
+var _ DescribeCarrierGatewaysAPIClient = (*Client)(nil)
+
+// DescribeCarrierGatewaysPaginatorOptions is the paginator options for
+// DescribeCarrierGateways
+type DescribeCarrierGatewaysPaginatorOptions struct {
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ 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
+}
+
+// DescribeCarrierGatewaysPaginator is a paginator for DescribeCarrierGateways
+type DescribeCarrierGatewaysPaginator struct {
+ options DescribeCarrierGatewaysPaginatorOptions
+ client DescribeCarrierGatewaysAPIClient
+ params *DescribeCarrierGatewaysInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribeCarrierGatewaysPaginator returns a new
+// DescribeCarrierGatewaysPaginator
+func NewDescribeCarrierGatewaysPaginator(client DescribeCarrierGatewaysAPIClient, params *DescribeCarrierGatewaysInput, optFns ...func(*DescribeCarrierGatewaysPaginatorOptions)) *DescribeCarrierGatewaysPaginator {
+ if params == nil {
+ params = &DescribeCarrierGatewaysInput{}
+ }
+
+ options := DescribeCarrierGatewaysPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribeCarrierGatewaysPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribeCarrierGatewaysPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribeCarrierGateways page.
+func (p *DescribeCarrierGatewaysPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeCarrierGatewaysOutput, 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.DescribeCarrierGateways(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_opDescribeCarrierGateways(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeCarrierGateways",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeClassicLinkInstances.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeClassicLinkInstances.go
new file mode 100644
index 00000000..63f61783
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeClassicLinkInstances.go
@@ -0,0 +1,251 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes one or more of your linked EC2-Classic instances. This request only
+// returns information about EC2-Classic instances linked to a VPC through
+// ClassicLink. You cannot use this request to return information about other
+// instances.
+func (c *Client) DescribeClassicLinkInstances(ctx context.Context, params *DescribeClassicLinkInstancesInput, optFns ...func(*Options)) (*DescribeClassicLinkInstancesOutput, error) {
+ if params == nil {
+ params = &DescribeClassicLinkInstancesInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeClassicLinkInstances", params, optFns, c.addOperationDescribeClassicLinkInstancesMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeClassicLinkInstancesOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeClassicLinkInstancesInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // One or more filters.
+ //
+ // * group-id - The ID of a VPC security group that's
+ // associated with the instance.
+ //
+ // * instance-id - The ID of the instance.
+ //
+ // * tag: -
+ // The key/value combination of a tag assigned to the resource. Use the tag key in
+ // the filter name and the tag value as the filter value. For example, to find all
+ // resources that have a tag with the key Owner and the value TeamA, specify
+ // tag:Owner for the filter name and TeamA for the filter value.
+ //
+ // * tag-key - The
+ // key of a tag assigned to the resource. Use this filter to find all resources
+ // assigned a tag with a specific key, regardless of the tag value.
+ //
+ // * vpc-id - The
+ // ID of the VPC to which the instance is linked. vpc-id - The ID of the VPC that
+ // the instance is linked to.
+ Filters []types.Filter
+
+ // One or more instance IDs. Must be instances linked to a VPC through ClassicLink.
+ InstanceIds []string
+
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ // Constraint: If the value is greater than 1000, we return only 1000 items.
+ MaxResults *int32
+
+ // The token for the next page of results.
+ NextToken *string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeClassicLinkInstancesOutput struct {
+
+ // Information about one or more linked EC2-Classic instances.
+ Instances []types.ClassicLinkInstance
+
+ // The token to use to retrieve the next page of results. This value is null when
+ // there are no more results to return.
+ NextToken *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeClassicLinkInstancesMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeClassicLinkInstances{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeClassicLinkInstances{}, 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_opDescribeClassicLinkInstances(options.Region), middleware.Before); 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
+}
+
+// DescribeClassicLinkInstancesAPIClient is a client that implements the
+// DescribeClassicLinkInstances operation.
+type DescribeClassicLinkInstancesAPIClient interface {
+ DescribeClassicLinkInstances(context.Context, *DescribeClassicLinkInstancesInput, ...func(*Options)) (*DescribeClassicLinkInstancesOutput, error)
+}
+
+var _ DescribeClassicLinkInstancesAPIClient = (*Client)(nil)
+
+// DescribeClassicLinkInstancesPaginatorOptions is the paginator options for
+// DescribeClassicLinkInstances
+type DescribeClassicLinkInstancesPaginatorOptions struct {
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ // Constraint: If the value is greater than 1000, we return only 1000 items.
+ 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
+}
+
+// DescribeClassicLinkInstancesPaginator is a paginator for
+// DescribeClassicLinkInstances
+type DescribeClassicLinkInstancesPaginator struct {
+ options DescribeClassicLinkInstancesPaginatorOptions
+ client DescribeClassicLinkInstancesAPIClient
+ params *DescribeClassicLinkInstancesInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribeClassicLinkInstancesPaginator returns a new
+// DescribeClassicLinkInstancesPaginator
+func NewDescribeClassicLinkInstancesPaginator(client DescribeClassicLinkInstancesAPIClient, params *DescribeClassicLinkInstancesInput, optFns ...func(*DescribeClassicLinkInstancesPaginatorOptions)) *DescribeClassicLinkInstancesPaginator {
+ if params == nil {
+ params = &DescribeClassicLinkInstancesInput{}
+ }
+
+ options := DescribeClassicLinkInstancesPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribeClassicLinkInstancesPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribeClassicLinkInstancesPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribeClassicLinkInstances page.
+func (p *DescribeClassicLinkInstancesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeClassicLinkInstancesOutput, 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.DescribeClassicLinkInstances(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_opDescribeClassicLinkInstances(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeClassicLinkInstances",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeClientVpnAuthorizationRules.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeClientVpnAuthorizationRules.go
new file mode 100644
index 00000000..28173d24
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeClientVpnAuthorizationRules.go
@@ -0,0 +1,243 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes the authorization rules for a specified Client VPN endpoint.
+func (c *Client) DescribeClientVpnAuthorizationRules(ctx context.Context, params *DescribeClientVpnAuthorizationRulesInput, optFns ...func(*Options)) (*DescribeClientVpnAuthorizationRulesOutput, error) {
+ if params == nil {
+ params = &DescribeClientVpnAuthorizationRulesInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeClientVpnAuthorizationRules", params, optFns, c.addOperationDescribeClientVpnAuthorizationRulesMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeClientVpnAuthorizationRulesOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeClientVpnAuthorizationRulesInput struct {
+
+ // The ID of the Client VPN endpoint.
+ //
+ // This member is required.
+ ClientVpnEndpointId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // One or more filters. Filter names and values are case-sensitive.
+ //
+ // * description
+ // - The description of the authorization rule.
+ //
+ // * destination-cidr - The CIDR of
+ // the network to which the authorization rule applies.
+ //
+ // * group-id - The ID of the
+ // Active Directory group to which the authorization rule grants access.
+ Filters []types.Filter
+
+ // The maximum number of results to return for the request in a single page. The
+ // remaining results can be seen by sending another request with the nextToken
+ // value.
+ MaxResults *int32
+
+ // The token to retrieve the next page of results.
+ NextToken *string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeClientVpnAuthorizationRulesOutput struct {
+
+ // Information about the authorization rules.
+ AuthorizationRules []types.AuthorizationRule
+
+ // The token to use to retrieve the next page of results. This value is null when
+ // there are no more results to return.
+ NextToken *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeClientVpnAuthorizationRulesMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeClientVpnAuthorizationRules{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeClientVpnAuthorizationRules{}, 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 = addOpDescribeClientVpnAuthorizationRulesValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeClientVpnAuthorizationRules(options.Region), middleware.Before); 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
+}
+
+// DescribeClientVpnAuthorizationRulesAPIClient is a client that implements the
+// DescribeClientVpnAuthorizationRules operation.
+type DescribeClientVpnAuthorizationRulesAPIClient interface {
+ DescribeClientVpnAuthorizationRules(context.Context, *DescribeClientVpnAuthorizationRulesInput, ...func(*Options)) (*DescribeClientVpnAuthorizationRulesOutput, error)
+}
+
+var _ DescribeClientVpnAuthorizationRulesAPIClient = (*Client)(nil)
+
+// DescribeClientVpnAuthorizationRulesPaginatorOptions is the paginator options for
+// DescribeClientVpnAuthorizationRules
+type DescribeClientVpnAuthorizationRulesPaginatorOptions struct {
+ // The maximum number of results to return for the request in a single page. The
+ // remaining results can be seen by sending another request with the nextToken
+ // value.
+ 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
+}
+
+// DescribeClientVpnAuthorizationRulesPaginator is a paginator for
+// DescribeClientVpnAuthorizationRules
+type DescribeClientVpnAuthorizationRulesPaginator struct {
+ options DescribeClientVpnAuthorizationRulesPaginatorOptions
+ client DescribeClientVpnAuthorizationRulesAPIClient
+ params *DescribeClientVpnAuthorizationRulesInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribeClientVpnAuthorizationRulesPaginator returns a new
+// DescribeClientVpnAuthorizationRulesPaginator
+func NewDescribeClientVpnAuthorizationRulesPaginator(client DescribeClientVpnAuthorizationRulesAPIClient, params *DescribeClientVpnAuthorizationRulesInput, optFns ...func(*DescribeClientVpnAuthorizationRulesPaginatorOptions)) *DescribeClientVpnAuthorizationRulesPaginator {
+ if params == nil {
+ params = &DescribeClientVpnAuthorizationRulesInput{}
+ }
+
+ options := DescribeClientVpnAuthorizationRulesPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribeClientVpnAuthorizationRulesPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribeClientVpnAuthorizationRulesPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribeClientVpnAuthorizationRules page.
+func (p *DescribeClientVpnAuthorizationRulesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeClientVpnAuthorizationRulesOutput, 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.DescribeClientVpnAuthorizationRules(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_opDescribeClientVpnAuthorizationRules(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeClientVpnAuthorizationRules",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeClientVpnConnections.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeClientVpnConnections.go
new file mode 100644
index 00000000..07cc11e8
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeClientVpnConnections.go
@@ -0,0 +1,242 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes active client connections and connections that have been terminated
+// within the last 60 minutes for the specified Client VPN endpoint.
+func (c *Client) DescribeClientVpnConnections(ctx context.Context, params *DescribeClientVpnConnectionsInput, optFns ...func(*Options)) (*DescribeClientVpnConnectionsOutput, error) {
+ if params == nil {
+ params = &DescribeClientVpnConnectionsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeClientVpnConnections", params, optFns, c.addOperationDescribeClientVpnConnectionsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeClientVpnConnectionsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeClientVpnConnectionsInput struct {
+
+ // The ID of the Client VPN endpoint.
+ //
+ // This member is required.
+ ClientVpnEndpointId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // One or more filters. Filter names and values are case-sensitive.
+ //
+ // *
+ // connection-id - The ID of the connection.
+ //
+ // * username - For Active Directory
+ // client authentication, the user name of the client who established the client
+ // connection.
+ Filters []types.Filter
+
+ // The maximum number of results to return for the request in a single page. The
+ // remaining results can be seen by sending another request with the nextToken
+ // value.
+ MaxResults *int32
+
+ // The token to retrieve the next page of results.
+ NextToken *string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeClientVpnConnectionsOutput struct {
+
+ // Information about the active and terminated client connections.
+ Connections []types.ClientVpnConnection
+
+ // The token to use to retrieve the next page of results. This value is null when
+ // there are no more results to return.
+ NextToken *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeClientVpnConnectionsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeClientVpnConnections{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeClientVpnConnections{}, 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 = addOpDescribeClientVpnConnectionsValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeClientVpnConnections(options.Region), middleware.Before); 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
+}
+
+// DescribeClientVpnConnectionsAPIClient is a client that implements the
+// DescribeClientVpnConnections operation.
+type DescribeClientVpnConnectionsAPIClient interface {
+ DescribeClientVpnConnections(context.Context, *DescribeClientVpnConnectionsInput, ...func(*Options)) (*DescribeClientVpnConnectionsOutput, error)
+}
+
+var _ DescribeClientVpnConnectionsAPIClient = (*Client)(nil)
+
+// DescribeClientVpnConnectionsPaginatorOptions is the paginator options for
+// DescribeClientVpnConnections
+type DescribeClientVpnConnectionsPaginatorOptions struct {
+ // The maximum number of results to return for the request in a single page. The
+ // remaining results can be seen by sending another request with the nextToken
+ // value.
+ 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
+}
+
+// DescribeClientVpnConnectionsPaginator is a paginator for
+// DescribeClientVpnConnections
+type DescribeClientVpnConnectionsPaginator struct {
+ options DescribeClientVpnConnectionsPaginatorOptions
+ client DescribeClientVpnConnectionsAPIClient
+ params *DescribeClientVpnConnectionsInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribeClientVpnConnectionsPaginator returns a new
+// DescribeClientVpnConnectionsPaginator
+func NewDescribeClientVpnConnectionsPaginator(client DescribeClientVpnConnectionsAPIClient, params *DescribeClientVpnConnectionsInput, optFns ...func(*DescribeClientVpnConnectionsPaginatorOptions)) *DescribeClientVpnConnectionsPaginator {
+ if params == nil {
+ params = &DescribeClientVpnConnectionsInput{}
+ }
+
+ options := DescribeClientVpnConnectionsPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribeClientVpnConnectionsPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribeClientVpnConnectionsPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribeClientVpnConnections page.
+func (p *DescribeClientVpnConnectionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeClientVpnConnectionsOutput, 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.DescribeClientVpnConnections(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_opDescribeClientVpnConnections(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeClientVpnConnections",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeClientVpnEndpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeClientVpnEndpoints.go
new file mode 100644
index 00000000..89d811d5
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeClientVpnEndpoints.go
@@ -0,0 +1,235 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes one or more Client VPN endpoints in the account.
+func (c *Client) DescribeClientVpnEndpoints(ctx context.Context, params *DescribeClientVpnEndpointsInput, optFns ...func(*Options)) (*DescribeClientVpnEndpointsOutput, error) {
+ if params == nil {
+ params = &DescribeClientVpnEndpointsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeClientVpnEndpoints", params, optFns, c.addOperationDescribeClientVpnEndpointsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeClientVpnEndpointsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeClientVpnEndpointsInput struct {
+
+ // The ID of the Client VPN endpoint.
+ ClientVpnEndpointIds []string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // One or more filters. Filter names and values are case-sensitive.
+ //
+ // * endpoint-id
+ // - The ID of the Client VPN endpoint.
+ //
+ // * transport-protocol - The transport
+ // protocol (tcp | udp).
+ Filters []types.Filter
+
+ // The maximum number of results to return for the request in a single page. The
+ // remaining results can be seen by sending another request with the nextToken
+ // value.
+ MaxResults *int32
+
+ // The token to retrieve the next page of results.
+ NextToken *string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeClientVpnEndpointsOutput struct {
+
+ // Information about the Client VPN endpoints.
+ ClientVpnEndpoints []types.ClientVpnEndpoint
+
+ // The token to use to retrieve the next page of results. This value is null when
+ // there are no more results to return.
+ NextToken *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeClientVpnEndpointsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeClientVpnEndpoints{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeClientVpnEndpoints{}, 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_opDescribeClientVpnEndpoints(options.Region), middleware.Before); 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
+}
+
+// DescribeClientVpnEndpointsAPIClient is a client that implements the
+// DescribeClientVpnEndpoints operation.
+type DescribeClientVpnEndpointsAPIClient interface {
+ DescribeClientVpnEndpoints(context.Context, *DescribeClientVpnEndpointsInput, ...func(*Options)) (*DescribeClientVpnEndpointsOutput, error)
+}
+
+var _ DescribeClientVpnEndpointsAPIClient = (*Client)(nil)
+
+// DescribeClientVpnEndpointsPaginatorOptions is the paginator options for
+// DescribeClientVpnEndpoints
+type DescribeClientVpnEndpointsPaginatorOptions struct {
+ // The maximum number of results to return for the request in a single page. The
+ // remaining results can be seen by sending another request with the nextToken
+ // value.
+ 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
+}
+
+// DescribeClientVpnEndpointsPaginator is a paginator for
+// DescribeClientVpnEndpoints
+type DescribeClientVpnEndpointsPaginator struct {
+ options DescribeClientVpnEndpointsPaginatorOptions
+ client DescribeClientVpnEndpointsAPIClient
+ params *DescribeClientVpnEndpointsInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribeClientVpnEndpointsPaginator returns a new
+// DescribeClientVpnEndpointsPaginator
+func NewDescribeClientVpnEndpointsPaginator(client DescribeClientVpnEndpointsAPIClient, params *DescribeClientVpnEndpointsInput, optFns ...func(*DescribeClientVpnEndpointsPaginatorOptions)) *DescribeClientVpnEndpointsPaginator {
+ if params == nil {
+ params = &DescribeClientVpnEndpointsInput{}
+ }
+
+ options := DescribeClientVpnEndpointsPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribeClientVpnEndpointsPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribeClientVpnEndpointsPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribeClientVpnEndpoints page.
+func (p *DescribeClientVpnEndpointsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeClientVpnEndpointsOutput, 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.DescribeClientVpnEndpoints(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_opDescribeClientVpnEndpoints(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeClientVpnEndpoints",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeClientVpnRoutes.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeClientVpnRoutes.go
new file mode 100644
index 00000000..e7607f57
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeClientVpnRoutes.go
@@ -0,0 +1,242 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes the routes for the specified Client VPN endpoint.
+func (c *Client) DescribeClientVpnRoutes(ctx context.Context, params *DescribeClientVpnRoutesInput, optFns ...func(*Options)) (*DescribeClientVpnRoutesOutput, error) {
+ if params == nil {
+ params = &DescribeClientVpnRoutesInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeClientVpnRoutes", params, optFns, c.addOperationDescribeClientVpnRoutesMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeClientVpnRoutesOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeClientVpnRoutesInput struct {
+
+ // The ID of the Client VPN endpoint.
+ //
+ // This member is required.
+ ClientVpnEndpointId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // One or more filters. Filter names and values are case-sensitive.
+ //
+ // *
+ // destination-cidr - The CIDR of the route destination.
+ //
+ // * origin - How the route
+ // was associated with the Client VPN endpoint (associate | add-route).
+ //
+ // *
+ // target-subnet - The ID of the subnet through which traffic is routed.
+ Filters []types.Filter
+
+ // The maximum number of results to return for the request in a single page. The
+ // remaining results can be seen by sending another request with the nextToken
+ // value.
+ MaxResults *int32
+
+ // The token to retrieve the next page of results.
+ NextToken *string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeClientVpnRoutesOutput struct {
+
+ // The token to use to retrieve the next page of results. This value is null when
+ // there are no more results to return.
+ NextToken *string
+
+ // Information about the Client VPN endpoint routes.
+ Routes []types.ClientVpnRoute
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeClientVpnRoutesMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeClientVpnRoutes{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeClientVpnRoutes{}, 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 = addOpDescribeClientVpnRoutesValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeClientVpnRoutes(options.Region), middleware.Before); 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
+}
+
+// DescribeClientVpnRoutesAPIClient is a client that implements the
+// DescribeClientVpnRoutes operation.
+type DescribeClientVpnRoutesAPIClient interface {
+ DescribeClientVpnRoutes(context.Context, *DescribeClientVpnRoutesInput, ...func(*Options)) (*DescribeClientVpnRoutesOutput, error)
+}
+
+var _ DescribeClientVpnRoutesAPIClient = (*Client)(nil)
+
+// DescribeClientVpnRoutesPaginatorOptions is the paginator options for
+// DescribeClientVpnRoutes
+type DescribeClientVpnRoutesPaginatorOptions struct {
+ // The maximum number of results to return for the request in a single page. The
+ // remaining results can be seen by sending another request with the nextToken
+ // value.
+ 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
+}
+
+// DescribeClientVpnRoutesPaginator is a paginator for DescribeClientVpnRoutes
+type DescribeClientVpnRoutesPaginator struct {
+ options DescribeClientVpnRoutesPaginatorOptions
+ client DescribeClientVpnRoutesAPIClient
+ params *DescribeClientVpnRoutesInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribeClientVpnRoutesPaginator returns a new
+// DescribeClientVpnRoutesPaginator
+func NewDescribeClientVpnRoutesPaginator(client DescribeClientVpnRoutesAPIClient, params *DescribeClientVpnRoutesInput, optFns ...func(*DescribeClientVpnRoutesPaginatorOptions)) *DescribeClientVpnRoutesPaginator {
+ if params == nil {
+ params = &DescribeClientVpnRoutesInput{}
+ }
+
+ options := DescribeClientVpnRoutesPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribeClientVpnRoutesPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribeClientVpnRoutesPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribeClientVpnRoutes page.
+func (p *DescribeClientVpnRoutesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeClientVpnRoutesOutput, 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.DescribeClientVpnRoutes(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_opDescribeClientVpnRoutes(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeClientVpnRoutes",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeClientVpnTargetNetworks.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeClientVpnTargetNetworks.go
new file mode 100644
index 00000000..991179c6
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeClientVpnTargetNetworks.go
@@ -0,0 +1,246 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes the target networks associated with the specified Client VPN endpoint.
+func (c *Client) DescribeClientVpnTargetNetworks(ctx context.Context, params *DescribeClientVpnTargetNetworksInput, optFns ...func(*Options)) (*DescribeClientVpnTargetNetworksOutput, error) {
+ if params == nil {
+ params = &DescribeClientVpnTargetNetworksInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeClientVpnTargetNetworks", params, optFns, c.addOperationDescribeClientVpnTargetNetworksMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeClientVpnTargetNetworksOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeClientVpnTargetNetworksInput struct {
+
+ // The ID of the Client VPN endpoint.
+ //
+ // This member is required.
+ ClientVpnEndpointId *string
+
+ // The IDs of the target network associations.
+ AssociationIds []string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // One or more filters. Filter names and values are case-sensitive.
+ //
+ // *
+ // association-id - The ID of the association.
+ //
+ // * target-network-id - The ID of the
+ // subnet specified as the target network.
+ //
+ // * vpc-id - The ID of the VPC in which
+ // the target network is located.
+ Filters []types.Filter
+
+ // The maximum number of results to return for the request in a single page. The
+ // remaining results can be seen by sending another request with the nextToken
+ // value.
+ MaxResults *int32
+
+ // The token to retrieve the next page of results.
+ NextToken *string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeClientVpnTargetNetworksOutput struct {
+
+ // Information about the associated target networks.
+ ClientVpnTargetNetworks []types.TargetNetwork
+
+ // The token to use to retrieve the next page of results. This value is null when
+ // there are no more results to return.
+ NextToken *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeClientVpnTargetNetworksMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeClientVpnTargetNetworks{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeClientVpnTargetNetworks{}, 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 = addOpDescribeClientVpnTargetNetworksValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeClientVpnTargetNetworks(options.Region), middleware.Before); 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
+}
+
+// DescribeClientVpnTargetNetworksAPIClient is a client that implements the
+// DescribeClientVpnTargetNetworks operation.
+type DescribeClientVpnTargetNetworksAPIClient interface {
+ DescribeClientVpnTargetNetworks(context.Context, *DescribeClientVpnTargetNetworksInput, ...func(*Options)) (*DescribeClientVpnTargetNetworksOutput, error)
+}
+
+var _ DescribeClientVpnTargetNetworksAPIClient = (*Client)(nil)
+
+// DescribeClientVpnTargetNetworksPaginatorOptions is the paginator options for
+// DescribeClientVpnTargetNetworks
+type DescribeClientVpnTargetNetworksPaginatorOptions struct {
+ // The maximum number of results to return for the request in a single page. The
+ // remaining results can be seen by sending another request with the nextToken
+ // value.
+ 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
+}
+
+// DescribeClientVpnTargetNetworksPaginator is a paginator for
+// DescribeClientVpnTargetNetworks
+type DescribeClientVpnTargetNetworksPaginator struct {
+ options DescribeClientVpnTargetNetworksPaginatorOptions
+ client DescribeClientVpnTargetNetworksAPIClient
+ params *DescribeClientVpnTargetNetworksInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribeClientVpnTargetNetworksPaginator returns a new
+// DescribeClientVpnTargetNetworksPaginator
+func NewDescribeClientVpnTargetNetworksPaginator(client DescribeClientVpnTargetNetworksAPIClient, params *DescribeClientVpnTargetNetworksInput, optFns ...func(*DescribeClientVpnTargetNetworksPaginatorOptions)) *DescribeClientVpnTargetNetworksPaginator {
+ if params == nil {
+ params = &DescribeClientVpnTargetNetworksInput{}
+ }
+
+ options := DescribeClientVpnTargetNetworksPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribeClientVpnTargetNetworksPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribeClientVpnTargetNetworksPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribeClientVpnTargetNetworks page.
+func (p *DescribeClientVpnTargetNetworksPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeClientVpnTargetNetworksOutput, 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.DescribeClientVpnTargetNetworks(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_opDescribeClientVpnTargetNetworks(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeClientVpnTargetNetworks",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeCoipPools.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeCoipPools.go
new file mode 100644
index 00000000..3f9b5a4d
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeCoipPools.go
@@ -0,0 +1,230 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes the specified customer-owned address pools or all of your
+// customer-owned address pools.
+func (c *Client) DescribeCoipPools(ctx context.Context, params *DescribeCoipPoolsInput, optFns ...func(*Options)) (*DescribeCoipPoolsOutput, error) {
+ if params == nil {
+ params = &DescribeCoipPoolsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeCoipPools", params, optFns, c.addOperationDescribeCoipPoolsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeCoipPoolsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeCoipPoolsInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The filters. The following are the possible values:
+ //
+ // * coip-pool.pool-id
+ //
+ // *
+ // coip-pool.local-gateway-route-table-id
+ Filters []types.Filter
+
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ MaxResults *int32
+
+ // The token for the next page of results.
+ NextToken *string
+
+ // The IDs of the address pools.
+ PoolIds []string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeCoipPoolsOutput struct {
+
+ // Information about the address pools.
+ CoipPools []types.CoipPool
+
+ // The token to use to retrieve the next page of results. This value is null when
+ // there are no more results to return.
+ NextToken *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeCoipPoolsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeCoipPools{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeCoipPools{}, 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_opDescribeCoipPools(options.Region), middleware.Before); 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
+}
+
+// DescribeCoipPoolsAPIClient is a client that implements the DescribeCoipPools
+// operation.
+type DescribeCoipPoolsAPIClient interface {
+ DescribeCoipPools(context.Context, *DescribeCoipPoolsInput, ...func(*Options)) (*DescribeCoipPoolsOutput, error)
+}
+
+var _ DescribeCoipPoolsAPIClient = (*Client)(nil)
+
+// DescribeCoipPoolsPaginatorOptions is the paginator options for DescribeCoipPools
+type DescribeCoipPoolsPaginatorOptions struct {
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ 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
+}
+
+// DescribeCoipPoolsPaginator is a paginator for DescribeCoipPools
+type DescribeCoipPoolsPaginator struct {
+ options DescribeCoipPoolsPaginatorOptions
+ client DescribeCoipPoolsAPIClient
+ params *DescribeCoipPoolsInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribeCoipPoolsPaginator returns a new DescribeCoipPoolsPaginator
+func NewDescribeCoipPoolsPaginator(client DescribeCoipPoolsAPIClient, params *DescribeCoipPoolsInput, optFns ...func(*DescribeCoipPoolsPaginatorOptions)) *DescribeCoipPoolsPaginator {
+ if params == nil {
+ params = &DescribeCoipPoolsInput{}
+ }
+
+ options := DescribeCoipPoolsPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribeCoipPoolsPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribeCoipPoolsPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribeCoipPools page.
+func (p *DescribeCoipPoolsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeCoipPoolsOutput, 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.DescribeCoipPools(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_opDescribeCoipPools(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeCoipPools",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeConversionTasks.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeConversionTasks.go
new file mode 100644
index 00000000..851710fb
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeConversionTasks.go
@@ -0,0 +1,690 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/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"
+)
+
+// Describes the specified conversion tasks or all your conversion tasks. For more
+// information, see the VM Import/Export User Guide
+// (https://docs.aws.amazon.com/vm-import/latest/userguide/). For information about
+// the import manifest referenced by this API action, see VM Import Manifest
+// (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/manifest.html).
+func (c *Client) DescribeConversionTasks(ctx context.Context, params *DescribeConversionTasksInput, optFns ...func(*Options)) (*DescribeConversionTasksOutput, error) {
+ if params == nil {
+ params = &DescribeConversionTasksInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeConversionTasks", params, optFns, c.addOperationDescribeConversionTasksMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeConversionTasksOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeConversionTasksInput struct {
+
+ // The conversion task IDs.
+ ConversionTaskIds []string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type DescribeConversionTasksOutput struct {
+
+ // Information about the conversion tasks.
+ ConversionTasks []types.ConversionTask
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeConversionTasksMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeConversionTasks{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeConversionTasks{}, 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_opDescribeConversionTasks(options.Region), middleware.Before); 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
+}
+
+// DescribeConversionTasksAPIClient is a client that implements the
+// DescribeConversionTasks operation.
+type DescribeConversionTasksAPIClient interface {
+ DescribeConversionTasks(context.Context, *DescribeConversionTasksInput, ...func(*Options)) (*DescribeConversionTasksOutput, error)
+}
+
+var _ DescribeConversionTasksAPIClient = (*Client)(nil)
+
+// ConversionTaskCancelledWaiterOptions are waiter options for
+// ConversionTaskCancelledWaiter
+type ConversionTaskCancelledWaiterOptions 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,
+ // ConversionTaskCancelledWaiter will use default minimum delay of 15 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, ConversionTaskCancelledWaiter 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, *DescribeConversionTasksInput, *DescribeConversionTasksOutput, error) (bool, error)
+}
+
+// ConversionTaskCancelledWaiter defines the waiters for ConversionTaskCancelled
+type ConversionTaskCancelledWaiter struct {
+ client DescribeConversionTasksAPIClient
+
+ options ConversionTaskCancelledWaiterOptions
+}
+
+// NewConversionTaskCancelledWaiter constructs a ConversionTaskCancelledWaiter.
+func NewConversionTaskCancelledWaiter(client DescribeConversionTasksAPIClient, optFns ...func(*ConversionTaskCancelledWaiterOptions)) *ConversionTaskCancelledWaiter {
+ options := ConversionTaskCancelledWaiterOptions{}
+ options.MinDelay = 15 * time.Second
+ options.MaxDelay = 120 * time.Second
+ options.Retryable = conversionTaskCancelledStateRetryable
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+ return &ConversionTaskCancelledWaiter{
+ client: client,
+ options: options,
+ }
+}
+
+// Wait calls the waiter function for ConversionTaskCancelled waiter. The
+// maxWaitDur is the maximum wait duration the waiter will wait. The maxWaitDur is
+// required and must be greater than zero.
+func (w *ConversionTaskCancelledWaiter) Wait(ctx context.Context, params *DescribeConversionTasksInput, maxWaitDur time.Duration, optFns ...func(*ConversionTaskCancelledWaiterOptions)) error {
+ if maxWaitDur <= 0 {
+ return 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 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.DescribeConversionTasks(ctx, params, func(o *Options) {
+ o.APIOptions = append(o.APIOptions, apiOptions...)
+ })
+
+ retryable, err := options.Retryable(ctx, params, out, err)
+ if err != nil {
+ return err
+ }
+ if !retryable {
+ return 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 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 fmt.Errorf("request cancelled while waiting, %w", err)
+ }
+ }
+ return fmt.Errorf("exceeded max wait time for ConversionTaskCancelled waiter")
+}
+
+func conversionTaskCancelledStateRetryable(ctx context.Context, input *DescribeConversionTasksInput, output *DescribeConversionTasksOutput, err error) (bool, error) {
+
+ if err == nil {
+ pathValue, err := jmespath.Search("ConversionTasks[].State", output)
+ if err != nil {
+ return false, fmt.Errorf("error evaluating waiter state: %w", err)
+ }
+
+ expectedValue := "cancelled"
+ var match = true
+ listOfValues, ok := pathValue.([]interface{})
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected list got %T", pathValue)
+ }
+
+ if len(listOfValues) == 0 {
+ match = false
+ }
+ for _, v := range listOfValues {
+ value, ok := v.(types.ConversionTaskState)
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected types.ConversionTaskState value, got %T", pathValue)
+ }
+
+ if string(value) != expectedValue {
+ match = false
+ }
+ }
+
+ if match {
+ return false, nil
+ }
+ }
+
+ return true, nil
+}
+
+// ConversionTaskCompletedWaiterOptions are waiter options for
+// ConversionTaskCompletedWaiter
+type ConversionTaskCompletedWaiterOptions 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,
+ // ConversionTaskCompletedWaiter will use default minimum delay of 15 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, ConversionTaskCompletedWaiter 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, *DescribeConversionTasksInput, *DescribeConversionTasksOutput, error) (bool, error)
+}
+
+// ConversionTaskCompletedWaiter defines the waiters for ConversionTaskCompleted
+type ConversionTaskCompletedWaiter struct {
+ client DescribeConversionTasksAPIClient
+
+ options ConversionTaskCompletedWaiterOptions
+}
+
+// NewConversionTaskCompletedWaiter constructs a ConversionTaskCompletedWaiter.
+func NewConversionTaskCompletedWaiter(client DescribeConversionTasksAPIClient, optFns ...func(*ConversionTaskCompletedWaiterOptions)) *ConversionTaskCompletedWaiter {
+ options := ConversionTaskCompletedWaiterOptions{}
+ options.MinDelay = 15 * time.Second
+ options.MaxDelay = 120 * time.Second
+ options.Retryable = conversionTaskCompletedStateRetryable
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+ return &ConversionTaskCompletedWaiter{
+ client: client,
+ options: options,
+ }
+}
+
+// Wait calls the waiter function for ConversionTaskCompleted waiter. The
+// maxWaitDur is the maximum wait duration the waiter will wait. The maxWaitDur is
+// required and must be greater than zero.
+func (w *ConversionTaskCompletedWaiter) Wait(ctx context.Context, params *DescribeConversionTasksInput, maxWaitDur time.Duration, optFns ...func(*ConversionTaskCompletedWaiterOptions)) error {
+ if maxWaitDur <= 0 {
+ return 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 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.DescribeConversionTasks(ctx, params, func(o *Options) {
+ o.APIOptions = append(o.APIOptions, apiOptions...)
+ })
+
+ retryable, err := options.Retryable(ctx, params, out, err)
+ if err != nil {
+ return err
+ }
+ if !retryable {
+ return 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 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 fmt.Errorf("request cancelled while waiting, %w", err)
+ }
+ }
+ return fmt.Errorf("exceeded max wait time for ConversionTaskCompleted waiter")
+}
+
+func conversionTaskCompletedStateRetryable(ctx context.Context, input *DescribeConversionTasksInput, output *DescribeConversionTasksOutput, err error) (bool, error) {
+
+ if err == nil {
+ pathValue, err := jmespath.Search("ConversionTasks[].State", output)
+ if err != nil {
+ return false, fmt.Errorf("error evaluating waiter state: %w", err)
+ }
+
+ expectedValue := "completed"
+ var match = true
+ listOfValues, ok := pathValue.([]interface{})
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected list got %T", pathValue)
+ }
+
+ if len(listOfValues) == 0 {
+ match = false
+ }
+ for _, v := range listOfValues {
+ value, ok := v.(types.ConversionTaskState)
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected types.ConversionTaskState value, got %T", pathValue)
+ }
+
+ if string(value) != expectedValue {
+ match = false
+ }
+ }
+
+ if match {
+ return false, nil
+ }
+ }
+
+ if err == nil {
+ pathValue, err := jmespath.Search("ConversionTasks[].State", output)
+ if err != nil {
+ return false, fmt.Errorf("error evaluating waiter state: %w", err)
+ }
+
+ expectedValue := "cancelled"
+ listOfValues, ok := pathValue.([]interface{})
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected list got %T", pathValue)
+ }
+
+ for _, v := range listOfValues {
+ value, ok := v.(types.ConversionTaskState)
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected types.ConversionTaskState value, got %T", pathValue)
+ }
+
+ if string(value) == expectedValue {
+ return false, fmt.Errorf("waiter state transitioned to Failure")
+ }
+ }
+ }
+
+ if err == nil {
+ pathValue, err := jmespath.Search("ConversionTasks[].State", output)
+ if err != nil {
+ return false, fmt.Errorf("error evaluating waiter state: %w", err)
+ }
+
+ expectedValue := "cancelling"
+ listOfValues, ok := pathValue.([]interface{})
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected list got %T", pathValue)
+ }
+
+ for _, v := range listOfValues {
+ value, ok := v.(types.ConversionTaskState)
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected types.ConversionTaskState value, got %T", pathValue)
+ }
+
+ if string(value) == expectedValue {
+ return false, fmt.Errorf("waiter state transitioned to Failure")
+ }
+ }
+ }
+
+ return true, nil
+}
+
+// ConversionTaskDeletedWaiterOptions are waiter options for
+// ConversionTaskDeletedWaiter
+type ConversionTaskDeletedWaiterOptions 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,
+ // ConversionTaskDeletedWaiter will use default minimum delay of 15 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, ConversionTaskDeletedWaiter 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, *DescribeConversionTasksInput, *DescribeConversionTasksOutput, error) (bool, error)
+}
+
+// ConversionTaskDeletedWaiter defines the waiters for ConversionTaskDeleted
+type ConversionTaskDeletedWaiter struct {
+ client DescribeConversionTasksAPIClient
+
+ options ConversionTaskDeletedWaiterOptions
+}
+
+// NewConversionTaskDeletedWaiter constructs a ConversionTaskDeletedWaiter.
+func NewConversionTaskDeletedWaiter(client DescribeConversionTasksAPIClient, optFns ...func(*ConversionTaskDeletedWaiterOptions)) *ConversionTaskDeletedWaiter {
+ options := ConversionTaskDeletedWaiterOptions{}
+ options.MinDelay = 15 * time.Second
+ options.MaxDelay = 120 * time.Second
+ options.Retryable = conversionTaskDeletedStateRetryable
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+ return &ConversionTaskDeletedWaiter{
+ client: client,
+ options: options,
+ }
+}
+
+// Wait calls the waiter function for ConversionTaskDeleted waiter. The maxWaitDur
+// is the maximum wait duration the waiter will wait. The maxWaitDur is required
+// and must be greater than zero.
+func (w *ConversionTaskDeletedWaiter) Wait(ctx context.Context, params *DescribeConversionTasksInput, maxWaitDur time.Duration, optFns ...func(*ConversionTaskDeletedWaiterOptions)) error {
+ if maxWaitDur <= 0 {
+ return 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 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.DescribeConversionTasks(ctx, params, func(o *Options) {
+ o.APIOptions = append(o.APIOptions, apiOptions...)
+ })
+
+ retryable, err := options.Retryable(ctx, params, out, err)
+ if err != nil {
+ return err
+ }
+ if !retryable {
+ return 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 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 fmt.Errorf("request cancelled while waiting, %w", err)
+ }
+ }
+ return fmt.Errorf("exceeded max wait time for ConversionTaskDeleted waiter")
+}
+
+func conversionTaskDeletedStateRetryable(ctx context.Context, input *DescribeConversionTasksInput, output *DescribeConversionTasksOutput, err error) (bool, error) {
+
+ if err == nil {
+ pathValue, err := jmespath.Search("ConversionTasks[].State", output)
+ if err != nil {
+ return false, fmt.Errorf("error evaluating waiter state: %w", err)
+ }
+
+ expectedValue := "deleted"
+ var match = true
+ listOfValues, ok := pathValue.([]interface{})
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected list got %T", pathValue)
+ }
+
+ if len(listOfValues) == 0 {
+ match = false
+ }
+ for _, v := range listOfValues {
+ value, ok := v.(types.ConversionTaskState)
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected types.ConversionTaskState value, got %T", pathValue)
+ }
+
+ if string(value) != expectedValue {
+ match = false
+ }
+ }
+
+ if match {
+ return false, nil
+ }
+ }
+
+ return true, nil
+}
+
+func newServiceMetadataMiddleware_opDescribeConversionTasks(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeConversionTasks",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeCustomerGateways.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeCustomerGateways.go
new file mode 100644
index 00000000..a33c51b0
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeCustomerGateways.go
@@ -0,0 +1,384 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/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"
+)
+
+// Describes one or more of your VPN customer gateways. For more information, see
+// Amazon Web Services Site-to-Site VPN
+// (https://docs.aws.amazon.com/vpn/latest/s2svpn/VPC_VPN.html) in the Amazon Web
+// Services Site-to-Site VPN User Guide.
+func (c *Client) DescribeCustomerGateways(ctx context.Context, params *DescribeCustomerGatewaysInput, optFns ...func(*Options)) (*DescribeCustomerGatewaysOutput, error) {
+ if params == nil {
+ params = &DescribeCustomerGatewaysInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeCustomerGateways", params, optFns, c.addOperationDescribeCustomerGatewaysMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeCustomerGatewaysOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+// Contains the parameters for DescribeCustomerGateways.
+type DescribeCustomerGatewaysInput struct {
+
+ // One or more customer gateway IDs. Default: Describes all your customer gateways.
+ CustomerGatewayIds []string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // One or more filters.
+ //
+ // * bgp-asn - The customer gateway's Border Gateway Protocol
+ // (BGP) Autonomous System Number (ASN).
+ //
+ // * customer-gateway-id - The ID of the
+ // customer gateway.
+ //
+ // * ip-address - The IP address of the customer gateway's
+ // Internet-routable external interface.
+ //
+ // * state - The state of the customer
+ // gateway (pending | available | deleting | deleted).
+ //
+ // * type - The type of
+ // customer gateway. Currently, the only supported type is ipsec.1.
+ //
+ // * tag: - The
+ // key/value combination of a tag assigned to the resource. Use the tag key in the
+ // filter name and the tag value as the filter value. For example, to find all
+ // resources that have a tag with the key Owner and the value TeamA, specify
+ // tag:Owner for the filter name and TeamA for the filter value.
+ //
+ // * tag-key - The
+ // key of a tag assigned to the resource. Use this filter to find all resources
+ // assigned a tag with a specific key, regardless of the tag value.
+ Filters []types.Filter
+
+ noSmithyDocumentSerde
+}
+
+// Contains the output of DescribeCustomerGateways.
+type DescribeCustomerGatewaysOutput struct {
+
+ // Information about one or more customer gateways.
+ CustomerGateways []types.CustomerGateway
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeCustomerGatewaysMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeCustomerGateways{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeCustomerGateways{}, 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_opDescribeCustomerGateways(options.Region), middleware.Before); 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
+}
+
+// DescribeCustomerGatewaysAPIClient is a client that implements the
+// DescribeCustomerGateways operation.
+type DescribeCustomerGatewaysAPIClient interface {
+ DescribeCustomerGateways(context.Context, *DescribeCustomerGatewaysInput, ...func(*Options)) (*DescribeCustomerGatewaysOutput, error)
+}
+
+var _ DescribeCustomerGatewaysAPIClient = (*Client)(nil)
+
+// CustomerGatewayAvailableWaiterOptions are waiter options for
+// CustomerGatewayAvailableWaiter
+type CustomerGatewayAvailableWaiterOptions 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,
+ // CustomerGatewayAvailableWaiter will use default minimum delay of 15 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, CustomerGatewayAvailableWaiter 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, *DescribeCustomerGatewaysInput, *DescribeCustomerGatewaysOutput, error) (bool, error)
+}
+
+// CustomerGatewayAvailableWaiter defines the waiters for CustomerGatewayAvailable
+type CustomerGatewayAvailableWaiter struct {
+ client DescribeCustomerGatewaysAPIClient
+
+ options CustomerGatewayAvailableWaiterOptions
+}
+
+// NewCustomerGatewayAvailableWaiter constructs a CustomerGatewayAvailableWaiter.
+func NewCustomerGatewayAvailableWaiter(client DescribeCustomerGatewaysAPIClient, optFns ...func(*CustomerGatewayAvailableWaiterOptions)) *CustomerGatewayAvailableWaiter {
+ options := CustomerGatewayAvailableWaiterOptions{}
+ options.MinDelay = 15 * time.Second
+ options.MaxDelay = 120 * time.Second
+ options.Retryable = customerGatewayAvailableStateRetryable
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+ return &CustomerGatewayAvailableWaiter{
+ client: client,
+ options: options,
+ }
+}
+
+// Wait calls the waiter function for CustomerGatewayAvailable waiter. The
+// maxWaitDur is the maximum wait duration the waiter will wait. The maxWaitDur is
+// required and must be greater than zero.
+func (w *CustomerGatewayAvailableWaiter) Wait(ctx context.Context, params *DescribeCustomerGatewaysInput, maxWaitDur time.Duration, optFns ...func(*CustomerGatewayAvailableWaiterOptions)) error {
+ if maxWaitDur <= 0 {
+ return 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 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.DescribeCustomerGateways(ctx, params, func(o *Options) {
+ o.APIOptions = append(o.APIOptions, apiOptions...)
+ })
+
+ retryable, err := options.Retryable(ctx, params, out, err)
+ if err != nil {
+ return err
+ }
+ if !retryable {
+ return 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 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 fmt.Errorf("request cancelled while waiting, %w", err)
+ }
+ }
+ return fmt.Errorf("exceeded max wait time for CustomerGatewayAvailable waiter")
+}
+
+func customerGatewayAvailableStateRetryable(ctx context.Context, input *DescribeCustomerGatewaysInput, output *DescribeCustomerGatewaysOutput, err error) (bool, error) {
+
+ if err == nil {
+ pathValue, err := jmespath.Search("CustomerGateways[].State", output)
+ if err != nil {
+ return false, fmt.Errorf("error evaluating waiter state: %w", err)
+ }
+
+ expectedValue := "available"
+ var match = true
+ listOfValues, ok := pathValue.([]interface{})
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected list got %T", pathValue)
+ }
+
+ if len(listOfValues) == 0 {
+ match = false
+ }
+ for _, v := range listOfValues {
+ value, ok := v.(*string)
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected *string value, got %T", pathValue)
+ }
+
+ if string(*value) != expectedValue {
+ match = false
+ }
+ }
+
+ if match {
+ return false, nil
+ }
+ }
+
+ if err == nil {
+ pathValue, err := jmespath.Search("CustomerGateways[].State", output)
+ if err != nil {
+ return false, fmt.Errorf("error evaluating waiter state: %w", err)
+ }
+
+ expectedValue := "deleted"
+ listOfValues, ok := pathValue.([]interface{})
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected list got %T", pathValue)
+ }
+
+ for _, v := range listOfValues {
+ value, ok := v.(*string)
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected *string value, got %T", pathValue)
+ }
+
+ if string(*value) == expectedValue {
+ return false, fmt.Errorf("waiter state transitioned to Failure")
+ }
+ }
+ }
+
+ if err == nil {
+ pathValue, err := jmespath.Search("CustomerGateways[].State", output)
+ if err != nil {
+ return false, fmt.Errorf("error evaluating waiter state: %w", err)
+ }
+
+ expectedValue := "deleting"
+ listOfValues, ok := pathValue.([]interface{})
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected list got %T", pathValue)
+ }
+
+ for _, v := range listOfValues {
+ value, ok := v.(*string)
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected *string value, got %T", pathValue)
+ }
+
+ if string(*value) == expectedValue {
+ return false, fmt.Errorf("waiter state transitioned to Failure")
+ }
+ }
+ }
+
+ return true, nil
+}
+
+func newServiceMetadataMiddleware_opDescribeCustomerGateways(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeCustomerGateways",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeDhcpOptions.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeDhcpOptions.go
new file mode 100644
index 00000000..76414644
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeDhcpOptions.go
@@ -0,0 +1,250 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes one or more of your DHCP options sets. For more information, see DHCP
+// options sets
+// (https://docs.aws.amazon.com/vpc/latest/userguide/VPC_DHCP_Options.html) in the
+// Amazon Virtual Private Cloud User Guide.
+func (c *Client) DescribeDhcpOptions(ctx context.Context, params *DescribeDhcpOptionsInput, optFns ...func(*Options)) (*DescribeDhcpOptionsOutput, error) {
+ if params == nil {
+ params = &DescribeDhcpOptionsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeDhcpOptions", params, optFns, c.addOperationDescribeDhcpOptionsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeDhcpOptionsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeDhcpOptionsInput struct {
+
+ // The IDs of one or more DHCP options sets. Default: Describes all your DHCP
+ // options sets.
+ DhcpOptionsIds []string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // One or more filters.
+ //
+ // * dhcp-options-id - The ID of a DHCP options set.
+ //
+ // * key -
+ // The key for one of the options (for example, domain-name).
+ //
+ // * value - The value
+ // for one of the options.
+ //
+ // * owner-id - The ID of the Amazon Web Services account
+ // that owns the DHCP options set.
+ //
+ // * tag: - The key/value combination of a tag
+ // assigned to the resource. Use the tag key in the filter name and the tag value
+ // as the filter value. For example, to find all resources that have a tag with the
+ // key Owner and the value TeamA, specify tag:Owner for the filter name and TeamA
+ // for the filter value.
+ //
+ // * tag-key - The key of a tag assigned to the resource.
+ // Use this filter to find all resources assigned a tag with a specific key,
+ // regardless of the tag value.
+ Filters []types.Filter
+
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ MaxResults *int32
+
+ // The token for the next page of results.
+ NextToken *string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeDhcpOptionsOutput struct {
+
+ // Information about one or more DHCP options sets.
+ DhcpOptions []types.DhcpOptions
+
+ // The token to use to retrieve the next page of results. This value is null when
+ // there are no more results to return.
+ NextToken *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeDhcpOptionsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeDhcpOptions{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeDhcpOptions{}, 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_opDescribeDhcpOptions(options.Region), middleware.Before); 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
+}
+
+// DescribeDhcpOptionsAPIClient is a client that implements the DescribeDhcpOptions
+// operation.
+type DescribeDhcpOptionsAPIClient interface {
+ DescribeDhcpOptions(context.Context, *DescribeDhcpOptionsInput, ...func(*Options)) (*DescribeDhcpOptionsOutput, error)
+}
+
+var _ DescribeDhcpOptionsAPIClient = (*Client)(nil)
+
+// DescribeDhcpOptionsPaginatorOptions is the paginator options for
+// DescribeDhcpOptions
+type DescribeDhcpOptionsPaginatorOptions struct {
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ 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
+}
+
+// DescribeDhcpOptionsPaginator is a paginator for DescribeDhcpOptions
+type DescribeDhcpOptionsPaginator struct {
+ options DescribeDhcpOptionsPaginatorOptions
+ client DescribeDhcpOptionsAPIClient
+ params *DescribeDhcpOptionsInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribeDhcpOptionsPaginator returns a new DescribeDhcpOptionsPaginator
+func NewDescribeDhcpOptionsPaginator(client DescribeDhcpOptionsAPIClient, params *DescribeDhcpOptionsInput, optFns ...func(*DescribeDhcpOptionsPaginatorOptions)) *DescribeDhcpOptionsPaginator {
+ if params == nil {
+ params = &DescribeDhcpOptionsInput{}
+ }
+
+ options := DescribeDhcpOptionsPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribeDhcpOptionsPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribeDhcpOptionsPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribeDhcpOptions page.
+func (p *DescribeDhcpOptionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeDhcpOptionsOutput, 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.DescribeDhcpOptions(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_opDescribeDhcpOptions(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeDhcpOptions",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeEgressOnlyInternetGateways.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeEgressOnlyInternetGateways.go
new file mode 100644
index 00000000..0c2bb15c
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeEgressOnlyInternetGateways.go
@@ -0,0 +1,237 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes one or more of your egress-only internet gateways.
+func (c *Client) DescribeEgressOnlyInternetGateways(ctx context.Context, params *DescribeEgressOnlyInternetGatewaysInput, optFns ...func(*Options)) (*DescribeEgressOnlyInternetGatewaysOutput, error) {
+ if params == nil {
+ params = &DescribeEgressOnlyInternetGatewaysInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeEgressOnlyInternetGateways", params, optFns, c.addOperationDescribeEgressOnlyInternetGatewaysMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeEgressOnlyInternetGatewaysOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeEgressOnlyInternetGatewaysInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // One or more egress-only internet gateway IDs.
+ EgressOnlyInternetGatewayIds []string
+
+ // One or more filters.
+ //
+ // * tag: - The key/value combination of a tag assigned to
+ // the resource. Use the tag key in the filter name and the tag value as the filter
+ // value. For example, to find all resources that have a tag with the key Owner and
+ // the value TeamA, specify tag:Owner for the filter name and TeamA for the filter
+ // value.
+ //
+ // * tag-key - The key of a tag assigned to the resource. Use this filter
+ // to find all resources assigned a tag with a specific key, regardless of the tag
+ // value.
+ Filters []types.Filter
+
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ MaxResults *int32
+
+ // The token for the next page of results.
+ NextToken *string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeEgressOnlyInternetGatewaysOutput struct {
+
+ // Information about the egress-only internet gateways.
+ EgressOnlyInternetGateways []types.EgressOnlyInternetGateway
+
+ // The token to use to retrieve the next page of results. This value is null when
+ // there are no more results to return.
+ NextToken *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeEgressOnlyInternetGatewaysMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeEgressOnlyInternetGateways{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeEgressOnlyInternetGateways{}, 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_opDescribeEgressOnlyInternetGateways(options.Region), middleware.Before); 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
+}
+
+// DescribeEgressOnlyInternetGatewaysAPIClient is a client that implements the
+// DescribeEgressOnlyInternetGateways operation.
+type DescribeEgressOnlyInternetGatewaysAPIClient interface {
+ DescribeEgressOnlyInternetGateways(context.Context, *DescribeEgressOnlyInternetGatewaysInput, ...func(*Options)) (*DescribeEgressOnlyInternetGatewaysOutput, error)
+}
+
+var _ DescribeEgressOnlyInternetGatewaysAPIClient = (*Client)(nil)
+
+// DescribeEgressOnlyInternetGatewaysPaginatorOptions is the paginator options for
+// DescribeEgressOnlyInternetGateways
+type DescribeEgressOnlyInternetGatewaysPaginatorOptions struct {
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ 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
+}
+
+// DescribeEgressOnlyInternetGatewaysPaginator is a paginator for
+// DescribeEgressOnlyInternetGateways
+type DescribeEgressOnlyInternetGatewaysPaginator struct {
+ options DescribeEgressOnlyInternetGatewaysPaginatorOptions
+ client DescribeEgressOnlyInternetGatewaysAPIClient
+ params *DescribeEgressOnlyInternetGatewaysInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribeEgressOnlyInternetGatewaysPaginator returns a new
+// DescribeEgressOnlyInternetGatewaysPaginator
+func NewDescribeEgressOnlyInternetGatewaysPaginator(client DescribeEgressOnlyInternetGatewaysAPIClient, params *DescribeEgressOnlyInternetGatewaysInput, optFns ...func(*DescribeEgressOnlyInternetGatewaysPaginatorOptions)) *DescribeEgressOnlyInternetGatewaysPaginator {
+ if params == nil {
+ params = &DescribeEgressOnlyInternetGatewaysInput{}
+ }
+
+ options := DescribeEgressOnlyInternetGatewaysPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribeEgressOnlyInternetGatewaysPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribeEgressOnlyInternetGatewaysPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribeEgressOnlyInternetGateways page.
+func (p *DescribeEgressOnlyInternetGatewaysPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeEgressOnlyInternetGatewaysOutput, 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.DescribeEgressOnlyInternetGateways(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_opDescribeEgressOnlyInternetGateways(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeEgressOnlyInternetGateways",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeElasticGpus.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeElasticGpus.go
new file mode 100644
index 00000000..6c13d0ec
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeElasticGpus.go
@@ -0,0 +1,159 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes the Elastic Graphics accelerator associated with your instances. For
+// more information about Elastic Graphics, see Amazon Elastic Graphics
+// (https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/elastic-graphics.html).
+func (c *Client) DescribeElasticGpus(ctx context.Context, params *DescribeElasticGpusInput, optFns ...func(*Options)) (*DescribeElasticGpusOutput, error) {
+ if params == nil {
+ params = &DescribeElasticGpusInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeElasticGpus", params, optFns, c.addOperationDescribeElasticGpusMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeElasticGpusOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeElasticGpusInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The Elastic Graphics accelerator IDs.
+ ElasticGpuIds []string
+
+ // The filters.
+ //
+ // * availability-zone - The Availability Zone in which the Elastic
+ // Graphics accelerator resides.
+ //
+ // * elastic-gpu-health - The status of the Elastic
+ // Graphics accelerator (OK | IMPAIRED).
+ //
+ // * elastic-gpu-state - The state of the
+ // Elastic Graphics accelerator (ATTACHED).
+ //
+ // * elastic-gpu-type - The type of
+ // Elastic Graphics accelerator; for example, eg1.medium.
+ //
+ // * instance-id - The ID
+ // of the instance to which the Elastic Graphics accelerator is associated.
+ Filters []types.Filter
+
+ // The maximum number of results to return in a single call. To retrieve the
+ // remaining results, make another call with the returned NextToken value. This
+ // value can be between 5 and 1000.
+ MaxResults *int32
+
+ // The token to request the next page of results.
+ NextToken *string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeElasticGpusOutput struct {
+
+ // Information about the Elastic Graphics accelerators.
+ ElasticGpuSet []types.ElasticGpus
+
+ // The total number of items to return. If the total number of items available is
+ // more than the value specified in max-items then a Next-Token will be provided in
+ // the output that you can use to resume pagination.
+ MaxResults *int32
+
+ // The token to use to retrieve the next page of results. This value is null when
+ // there are no more results to return.
+ NextToken *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeElasticGpusMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeElasticGpus{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeElasticGpus{}, 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_opDescribeElasticGpus(options.Region), middleware.Before); 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_opDescribeElasticGpus(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeElasticGpus",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeExportImageTasks.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeExportImageTasks.go
new file mode 100644
index 00000000..d01fa8da
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeExportImageTasks.go
@@ -0,0 +1,225 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes the specified export image tasks or all of your export image tasks.
+func (c *Client) DescribeExportImageTasks(ctx context.Context, params *DescribeExportImageTasksInput, optFns ...func(*Options)) (*DescribeExportImageTasksOutput, error) {
+ if params == nil {
+ params = &DescribeExportImageTasksInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeExportImageTasks", params, optFns, c.addOperationDescribeExportImageTasksMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeExportImageTasksOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeExportImageTasksInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The IDs of the export image tasks.
+ ExportImageTaskIds []string
+
+ // Filter tasks using the task-state filter and one of the following values:
+ // active, completed, deleting, or deleted.
+ Filters []types.Filter
+
+ // The maximum number of results to return in a single call.
+ MaxResults *int32
+
+ // A token that indicates the next page of results.
+ NextToken *string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeExportImageTasksOutput struct {
+
+ // Information about the export image tasks.
+ ExportImageTasks []types.ExportImageTask
+
+ // The token to use to get the next page of results. This value is null when there
+ // are no more results to return.
+ NextToken *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeExportImageTasksMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeExportImageTasks{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeExportImageTasks{}, 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_opDescribeExportImageTasks(options.Region), middleware.Before); 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
+}
+
+// DescribeExportImageTasksAPIClient is a client that implements the
+// DescribeExportImageTasks operation.
+type DescribeExportImageTasksAPIClient interface {
+ DescribeExportImageTasks(context.Context, *DescribeExportImageTasksInput, ...func(*Options)) (*DescribeExportImageTasksOutput, error)
+}
+
+var _ DescribeExportImageTasksAPIClient = (*Client)(nil)
+
+// DescribeExportImageTasksPaginatorOptions is the paginator options for
+// DescribeExportImageTasks
+type DescribeExportImageTasksPaginatorOptions struct {
+ // The maximum number of results to return in a single call.
+ 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
+}
+
+// DescribeExportImageTasksPaginator is a paginator for DescribeExportImageTasks
+type DescribeExportImageTasksPaginator struct {
+ options DescribeExportImageTasksPaginatorOptions
+ client DescribeExportImageTasksAPIClient
+ params *DescribeExportImageTasksInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribeExportImageTasksPaginator returns a new
+// DescribeExportImageTasksPaginator
+func NewDescribeExportImageTasksPaginator(client DescribeExportImageTasksAPIClient, params *DescribeExportImageTasksInput, optFns ...func(*DescribeExportImageTasksPaginatorOptions)) *DescribeExportImageTasksPaginator {
+ if params == nil {
+ params = &DescribeExportImageTasksInput{}
+ }
+
+ options := DescribeExportImageTasksPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribeExportImageTasksPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribeExportImageTasksPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribeExportImageTasks page.
+func (p *DescribeExportImageTasksPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeExportImageTasksOutput, 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.DescribeExportImageTasks(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_opDescribeExportImageTasks(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeExportImageTasks",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeExportTasks.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeExportTasks.go
new file mode 100644
index 00000000..6bac0035
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeExportTasks.go
@@ -0,0 +1,467 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/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"
+)
+
+// Describes the specified export instance tasks or all of your export instance
+// tasks.
+func (c *Client) DescribeExportTasks(ctx context.Context, params *DescribeExportTasksInput, optFns ...func(*Options)) (*DescribeExportTasksOutput, error) {
+ if params == nil {
+ params = &DescribeExportTasksInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeExportTasks", params, optFns, c.addOperationDescribeExportTasksMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeExportTasksOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeExportTasksInput struct {
+
+ // The export task IDs.
+ ExportTaskIds []string
+
+ // the filters for the export tasks.
+ Filters []types.Filter
+
+ noSmithyDocumentSerde
+}
+
+type DescribeExportTasksOutput struct {
+
+ // Information about the export tasks.
+ ExportTasks []types.ExportTask
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeExportTasksMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeExportTasks{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeExportTasks{}, 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_opDescribeExportTasks(options.Region), middleware.Before); 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
+}
+
+// DescribeExportTasksAPIClient is a client that implements the DescribeExportTasks
+// operation.
+type DescribeExportTasksAPIClient interface {
+ DescribeExportTasks(context.Context, *DescribeExportTasksInput, ...func(*Options)) (*DescribeExportTasksOutput, error)
+}
+
+var _ DescribeExportTasksAPIClient = (*Client)(nil)
+
+// ExportTaskCancelledWaiterOptions are waiter options for
+// ExportTaskCancelledWaiter
+type ExportTaskCancelledWaiterOptions 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,
+ // ExportTaskCancelledWaiter will use default minimum delay of 15 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, ExportTaskCancelledWaiter 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, *DescribeExportTasksInput, *DescribeExportTasksOutput, error) (bool, error)
+}
+
+// ExportTaskCancelledWaiter defines the waiters for ExportTaskCancelled
+type ExportTaskCancelledWaiter struct {
+ client DescribeExportTasksAPIClient
+
+ options ExportTaskCancelledWaiterOptions
+}
+
+// NewExportTaskCancelledWaiter constructs a ExportTaskCancelledWaiter.
+func NewExportTaskCancelledWaiter(client DescribeExportTasksAPIClient, optFns ...func(*ExportTaskCancelledWaiterOptions)) *ExportTaskCancelledWaiter {
+ options := ExportTaskCancelledWaiterOptions{}
+ options.MinDelay = 15 * time.Second
+ options.MaxDelay = 120 * time.Second
+ options.Retryable = exportTaskCancelledStateRetryable
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+ return &ExportTaskCancelledWaiter{
+ client: client,
+ options: options,
+ }
+}
+
+// Wait calls the waiter function for ExportTaskCancelled waiter. The maxWaitDur is
+// the maximum wait duration the waiter will wait. The maxWaitDur is required and
+// must be greater than zero.
+func (w *ExportTaskCancelledWaiter) Wait(ctx context.Context, params *DescribeExportTasksInput, maxWaitDur time.Duration, optFns ...func(*ExportTaskCancelledWaiterOptions)) error {
+ if maxWaitDur <= 0 {
+ return 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 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.DescribeExportTasks(ctx, params, func(o *Options) {
+ o.APIOptions = append(o.APIOptions, apiOptions...)
+ })
+
+ retryable, err := options.Retryable(ctx, params, out, err)
+ if err != nil {
+ return err
+ }
+ if !retryable {
+ return 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 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 fmt.Errorf("request cancelled while waiting, %w", err)
+ }
+ }
+ return fmt.Errorf("exceeded max wait time for ExportTaskCancelled waiter")
+}
+
+func exportTaskCancelledStateRetryable(ctx context.Context, input *DescribeExportTasksInput, output *DescribeExportTasksOutput, err error) (bool, error) {
+
+ if err == nil {
+ pathValue, err := jmespath.Search("ExportTasks[].State", output)
+ if err != nil {
+ return false, fmt.Errorf("error evaluating waiter state: %w", err)
+ }
+
+ expectedValue := "cancelled"
+ var match = true
+ listOfValues, ok := pathValue.([]interface{})
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected list got %T", pathValue)
+ }
+
+ if len(listOfValues) == 0 {
+ match = false
+ }
+ for _, v := range listOfValues {
+ value, ok := v.(types.ExportTaskState)
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected types.ExportTaskState value, got %T", pathValue)
+ }
+
+ if string(value) != expectedValue {
+ match = false
+ }
+ }
+
+ if match {
+ return false, nil
+ }
+ }
+
+ return true, nil
+}
+
+// ExportTaskCompletedWaiterOptions are waiter options for
+// ExportTaskCompletedWaiter
+type ExportTaskCompletedWaiterOptions 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,
+ // ExportTaskCompletedWaiter will use default minimum delay of 15 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, ExportTaskCompletedWaiter 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, *DescribeExportTasksInput, *DescribeExportTasksOutput, error) (bool, error)
+}
+
+// ExportTaskCompletedWaiter defines the waiters for ExportTaskCompleted
+type ExportTaskCompletedWaiter struct {
+ client DescribeExportTasksAPIClient
+
+ options ExportTaskCompletedWaiterOptions
+}
+
+// NewExportTaskCompletedWaiter constructs a ExportTaskCompletedWaiter.
+func NewExportTaskCompletedWaiter(client DescribeExportTasksAPIClient, optFns ...func(*ExportTaskCompletedWaiterOptions)) *ExportTaskCompletedWaiter {
+ options := ExportTaskCompletedWaiterOptions{}
+ options.MinDelay = 15 * time.Second
+ options.MaxDelay = 120 * time.Second
+ options.Retryable = exportTaskCompletedStateRetryable
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+ return &ExportTaskCompletedWaiter{
+ client: client,
+ options: options,
+ }
+}
+
+// Wait calls the waiter function for ExportTaskCompleted waiter. The maxWaitDur is
+// the maximum wait duration the waiter will wait. The maxWaitDur is required and
+// must be greater than zero.
+func (w *ExportTaskCompletedWaiter) Wait(ctx context.Context, params *DescribeExportTasksInput, maxWaitDur time.Duration, optFns ...func(*ExportTaskCompletedWaiterOptions)) error {
+ if maxWaitDur <= 0 {
+ return 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 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.DescribeExportTasks(ctx, params, func(o *Options) {
+ o.APIOptions = append(o.APIOptions, apiOptions...)
+ })
+
+ retryable, err := options.Retryable(ctx, params, out, err)
+ if err != nil {
+ return err
+ }
+ if !retryable {
+ return 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 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 fmt.Errorf("request cancelled while waiting, %w", err)
+ }
+ }
+ return fmt.Errorf("exceeded max wait time for ExportTaskCompleted waiter")
+}
+
+func exportTaskCompletedStateRetryable(ctx context.Context, input *DescribeExportTasksInput, output *DescribeExportTasksOutput, err error) (bool, error) {
+
+ if err == nil {
+ pathValue, err := jmespath.Search("ExportTasks[].State", output)
+ if err != nil {
+ return false, fmt.Errorf("error evaluating waiter state: %w", err)
+ }
+
+ expectedValue := "completed"
+ var match = true
+ listOfValues, ok := pathValue.([]interface{})
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected list got %T", pathValue)
+ }
+
+ if len(listOfValues) == 0 {
+ match = false
+ }
+ for _, v := range listOfValues {
+ value, ok := v.(types.ExportTaskState)
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected types.ExportTaskState value, got %T", pathValue)
+ }
+
+ if string(value) != expectedValue {
+ match = false
+ }
+ }
+
+ if match {
+ return false, nil
+ }
+ }
+
+ return true, nil
+}
+
+func newServiceMetadataMiddleware_opDescribeExportTasks(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeExportTasks",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeFastSnapshotRestores.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeFastSnapshotRestores.go
new file mode 100644
index 00000000..1355444a
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeFastSnapshotRestores.go
@@ -0,0 +1,236 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes the state of fast snapshot restores for your snapshots.
+func (c *Client) DescribeFastSnapshotRestores(ctx context.Context, params *DescribeFastSnapshotRestoresInput, optFns ...func(*Options)) (*DescribeFastSnapshotRestoresOutput, error) {
+ if params == nil {
+ params = &DescribeFastSnapshotRestoresInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeFastSnapshotRestores", params, optFns, c.addOperationDescribeFastSnapshotRestoresMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeFastSnapshotRestoresOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeFastSnapshotRestoresInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The filters. The possible values are:
+ //
+ // * availability-zone: The Availability
+ // Zone of the snapshot.
+ //
+ // * owner-id: The ID of the Amazon Web Services account
+ // that enabled fast snapshot restore on the snapshot.
+ //
+ // * snapshot-id: The ID of
+ // the snapshot.
+ //
+ // * state: The state of fast snapshot restores for the snapshot
+ // (enabling | optimizing | enabled | disabling | disabled).
+ Filters []types.Filter
+
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ MaxResults *int32
+
+ // The token for the next page of results.
+ NextToken *string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeFastSnapshotRestoresOutput struct {
+
+ // Information about the state of fast snapshot restores.
+ FastSnapshotRestores []types.DescribeFastSnapshotRestoreSuccessItem
+
+ // The token to use to retrieve the next page of results. This value is null when
+ // there are no more results to return.
+ NextToken *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeFastSnapshotRestoresMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeFastSnapshotRestores{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeFastSnapshotRestores{}, 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_opDescribeFastSnapshotRestores(options.Region), middleware.Before); 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
+}
+
+// DescribeFastSnapshotRestoresAPIClient is a client that implements the
+// DescribeFastSnapshotRestores operation.
+type DescribeFastSnapshotRestoresAPIClient interface {
+ DescribeFastSnapshotRestores(context.Context, *DescribeFastSnapshotRestoresInput, ...func(*Options)) (*DescribeFastSnapshotRestoresOutput, error)
+}
+
+var _ DescribeFastSnapshotRestoresAPIClient = (*Client)(nil)
+
+// DescribeFastSnapshotRestoresPaginatorOptions is the paginator options for
+// DescribeFastSnapshotRestores
+type DescribeFastSnapshotRestoresPaginatorOptions struct {
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ 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
+}
+
+// DescribeFastSnapshotRestoresPaginator is a paginator for
+// DescribeFastSnapshotRestores
+type DescribeFastSnapshotRestoresPaginator struct {
+ options DescribeFastSnapshotRestoresPaginatorOptions
+ client DescribeFastSnapshotRestoresAPIClient
+ params *DescribeFastSnapshotRestoresInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribeFastSnapshotRestoresPaginator returns a new
+// DescribeFastSnapshotRestoresPaginator
+func NewDescribeFastSnapshotRestoresPaginator(client DescribeFastSnapshotRestoresAPIClient, params *DescribeFastSnapshotRestoresInput, optFns ...func(*DescribeFastSnapshotRestoresPaginatorOptions)) *DescribeFastSnapshotRestoresPaginator {
+ if params == nil {
+ params = &DescribeFastSnapshotRestoresInput{}
+ }
+
+ options := DescribeFastSnapshotRestoresPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribeFastSnapshotRestoresPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribeFastSnapshotRestoresPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribeFastSnapshotRestores page.
+func (p *DescribeFastSnapshotRestoresPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeFastSnapshotRestoresOutput, 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.DescribeFastSnapshotRestores(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_opDescribeFastSnapshotRestores(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeFastSnapshotRestores",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeFleetHistory.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeFleetHistory.go
new file mode 100644
index 00000000..80b14724
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeFleetHistory.go
@@ -0,0 +1,166 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "time"
+)
+
+// Describes the events for the specified EC2 Fleet during the specified time. EC2
+// Fleet events are delayed by up to 30 seconds before they can be described. This
+// ensures that you can query by the last evaluated time and not miss a recorded
+// event. EC2 Fleet events are available for 48 hours. For more information, see
+// Monitoring your EC2 Fleet
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet.html#monitor-ec2-fleet)
+// in the Amazon EC2 User Guide.
+func (c *Client) DescribeFleetHistory(ctx context.Context, params *DescribeFleetHistoryInput, optFns ...func(*Options)) (*DescribeFleetHistoryOutput, error) {
+ if params == nil {
+ params = &DescribeFleetHistoryInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeFleetHistory", params, optFns, c.addOperationDescribeFleetHistoryMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeFleetHistoryOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeFleetHistoryInput struct {
+
+ // The ID of the EC2 Fleet.
+ //
+ // This member is required.
+ FleetId *string
+
+ // The start date and time for the events, in UTC format (for example,
+ // YYYY-MM-DDTHH:MM:SSZ).
+ //
+ // This member is required.
+ StartTime *time.Time
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The type of events to describe. By default, all events are described.
+ EventType types.FleetEventType
+
+ // The maximum number of results to return in a single call. Specify a value
+ // between 1 and 1000. The default value is 1000. To retrieve the remaining
+ // results, make another call with the returned NextToken value.
+ MaxResults *int32
+
+ // The token for the next set of results.
+ NextToken *string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeFleetHistoryOutput struct {
+
+ // The ID of the EC Fleet.
+ FleetId *string
+
+ // Information about the events in the history of the EC2 Fleet.
+ HistoryRecords []types.HistoryRecordEntry
+
+ // The last date and time for the events, in UTC format (for example,
+ // YYYY-MM-DDTHH:MM:SSZ). All records up to this time were retrieved. If nextToken
+ // indicates that there are more results, this value is not present.
+ LastEvaluatedTime *time.Time
+
+ // The token for the next set of results.
+ NextToken *string
+
+ // The start date and time for the events, in UTC format (for example,
+ // YYYY-MM-DDTHH:MM:SSZ).
+ StartTime *time.Time
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeFleetHistoryMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeFleetHistory{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeFleetHistory{}, 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 = addOpDescribeFleetHistoryValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeFleetHistory(options.Region), middleware.Before); 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_opDescribeFleetHistory(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeFleetHistory",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeFleetInstances.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeFleetInstances.go
new file mode 100644
index 00000000..dbd23afc
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeFleetInstances.go
@@ -0,0 +1,150 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes the running instances for the specified EC2 Fleet. For more
+// information, see Monitoring your EC2 Fleet
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet.html#monitor-ec2-fleet)
+// in the Amazon EC2 User Guide.
+func (c *Client) DescribeFleetInstances(ctx context.Context, params *DescribeFleetInstancesInput, optFns ...func(*Options)) (*DescribeFleetInstancesOutput, error) {
+ if params == nil {
+ params = &DescribeFleetInstancesInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeFleetInstances", params, optFns, c.addOperationDescribeFleetInstancesMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeFleetInstancesOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeFleetInstancesInput struct {
+
+ // The ID of the EC2 Fleet.
+ //
+ // This member is required.
+ FleetId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The filters.
+ //
+ // * instance-type - The instance type.
+ Filters []types.Filter
+
+ // The maximum number of results to return in a single call. Specify a value
+ // between 1 and 1000. The default value is 1000. To retrieve the remaining
+ // results, make another call with the returned NextToken value.
+ MaxResults *int32
+
+ // The token for the next set of results.
+ NextToken *string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeFleetInstancesOutput struct {
+
+ // The running instances. This list is refreshed periodically and might be out of
+ // date.
+ ActiveInstances []types.ActiveInstance
+
+ // The ID of the EC2 Fleet.
+ FleetId *string
+
+ // The token for the next set of results.
+ NextToken *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeFleetInstancesMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeFleetInstances{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeFleetInstances{}, 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 = addOpDescribeFleetInstancesValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeFleetInstances(options.Region), middleware.Before); 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_opDescribeFleetInstances(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeFleetInstances",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeFleets.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeFleets.go
new file mode 100644
index 00000000..3f647bca
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeFleets.go
@@ -0,0 +1,246 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes the specified EC2 Fleets or all of your EC2 Fleets. For more
+// information, see Monitoring your EC2 Fleet
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet.html#monitor-ec2-fleet)
+// in the Amazon EC2 User Guide.
+func (c *Client) DescribeFleets(ctx context.Context, params *DescribeFleetsInput, optFns ...func(*Options)) (*DescribeFleetsOutput, error) {
+ if params == nil {
+ params = &DescribeFleetsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeFleets", params, optFns, c.addOperationDescribeFleetsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeFleetsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeFleetsInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The filters.
+ //
+ // * activity-status - The progress of the EC2 Fleet ( error |
+ // pending-fulfillment | pending-termination | fulfilled).
+ //
+ // *
+ // excess-capacity-termination-policy - Indicates whether to terminate running
+ // instances if the target capacity is decreased below the current EC2 Fleet size
+ // (true | false).
+ //
+ // * fleet-state - The state of the EC2 Fleet (submitted | active
+ // | deleted | failed | deleted-running | deleted-terminating | modifying).
+ //
+ // *
+ // replace-unhealthy-instances - Indicates whether EC2 Fleet should replace
+ // unhealthy instances (true | false).
+ //
+ // * type - The type of request (instant |
+ // request | maintain).
+ Filters []types.Filter
+
+ // The ID of the EC2 Fleets.
+ FleetIds []string
+
+ // The maximum number of results to return in a single call. Specify a value
+ // between 1 and 1000. The default value is 1000. To retrieve the remaining
+ // results, make another call with the returned NextToken value.
+ MaxResults *int32
+
+ // The token for the next set of results.
+ NextToken *string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeFleetsOutput struct {
+
+ // Information about the EC2 Fleets.
+ Fleets []types.FleetData
+
+ // The token for the next set of results.
+ NextToken *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeFleetsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeFleets{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeFleets{}, 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_opDescribeFleets(options.Region), middleware.Before); 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
+}
+
+// DescribeFleetsAPIClient is a client that implements the DescribeFleets
+// operation.
+type DescribeFleetsAPIClient interface {
+ DescribeFleets(context.Context, *DescribeFleetsInput, ...func(*Options)) (*DescribeFleetsOutput, error)
+}
+
+var _ DescribeFleetsAPIClient = (*Client)(nil)
+
+// DescribeFleetsPaginatorOptions is the paginator options for DescribeFleets
+type DescribeFleetsPaginatorOptions struct {
+ // The maximum number of results to return in a single call. Specify a value
+ // between 1 and 1000. The default value is 1000. To retrieve the remaining
+ // results, make another call with the returned NextToken value.
+ 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
+}
+
+// DescribeFleetsPaginator is a paginator for DescribeFleets
+type DescribeFleetsPaginator struct {
+ options DescribeFleetsPaginatorOptions
+ client DescribeFleetsAPIClient
+ params *DescribeFleetsInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribeFleetsPaginator returns a new DescribeFleetsPaginator
+func NewDescribeFleetsPaginator(client DescribeFleetsAPIClient, params *DescribeFleetsInput, optFns ...func(*DescribeFleetsPaginatorOptions)) *DescribeFleetsPaginator {
+ if params == nil {
+ params = &DescribeFleetsInput{}
+ }
+
+ options := DescribeFleetsPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribeFleetsPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribeFleetsPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribeFleets page.
+func (p *DescribeFleetsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeFleetsOutput, 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.DescribeFleets(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_opDescribeFleets(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeFleets",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeFlowLogs.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeFlowLogs.go
new file mode 100644
index 00000000..e1bbaee0
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeFlowLogs.go
@@ -0,0 +1,253 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes one or more flow logs. To view the information in your flow logs (the
+// log streams for the network interfaces), you must use the CloudWatch Logs
+// console or the CloudWatch Logs API.
+func (c *Client) DescribeFlowLogs(ctx context.Context, params *DescribeFlowLogsInput, optFns ...func(*Options)) (*DescribeFlowLogsOutput, error) {
+ if params == nil {
+ params = &DescribeFlowLogsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeFlowLogs", params, optFns, c.addOperationDescribeFlowLogsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeFlowLogsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeFlowLogsInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // One or more filters.
+ //
+ // * deliver-log-status - The status of the logs delivery
+ // (SUCCESS | FAILED).
+ //
+ // * log-destination-type - The type of destination to which
+ // the flow log publishes data. Possible destination types include cloud-watch-logs
+ // and s3.
+ //
+ // * flow-log-id - The ID of the flow log.
+ //
+ // * log-group-name - The name of
+ // the log group.
+ //
+ // * resource-id - The ID of the VPC, subnet, or network
+ // interface.
+ //
+ // * traffic-type - The type of traffic (ACCEPT | REJECT | ALL).
+ //
+ // *
+ // tag: - The key/value combination of a tag assigned to the resource. Use the tag
+ // key in the filter name and the tag value as the filter value. For example, to
+ // find all resources that have a tag with the key Owner and the value TeamA,
+ // specify tag:Owner for the filter name and TeamA for the filter value.
+ //
+ // * tag-key
+ // - The key of a tag assigned to the resource. Use this filter to find all
+ // resources assigned a tag with a specific key, regardless of the tag value.
+ Filter []types.Filter
+
+ // One or more flow log IDs. Constraint: Maximum of 1000 flow log IDs.
+ FlowLogIds []string
+
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ MaxResults *int32
+
+ // The token for the next page of results.
+ NextToken *string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeFlowLogsOutput struct {
+
+ // Information about the flow logs.
+ FlowLogs []types.FlowLog
+
+ // The token to use to retrieve the next page of results. This value is null when
+ // there are no more results to return.
+ NextToken *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeFlowLogsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeFlowLogs{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeFlowLogs{}, 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_opDescribeFlowLogs(options.Region), middleware.Before); 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
+}
+
+// DescribeFlowLogsAPIClient is a client that implements the DescribeFlowLogs
+// operation.
+type DescribeFlowLogsAPIClient interface {
+ DescribeFlowLogs(context.Context, *DescribeFlowLogsInput, ...func(*Options)) (*DescribeFlowLogsOutput, error)
+}
+
+var _ DescribeFlowLogsAPIClient = (*Client)(nil)
+
+// DescribeFlowLogsPaginatorOptions is the paginator options for DescribeFlowLogs
+type DescribeFlowLogsPaginatorOptions struct {
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ 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
+}
+
+// DescribeFlowLogsPaginator is a paginator for DescribeFlowLogs
+type DescribeFlowLogsPaginator struct {
+ options DescribeFlowLogsPaginatorOptions
+ client DescribeFlowLogsAPIClient
+ params *DescribeFlowLogsInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribeFlowLogsPaginator returns a new DescribeFlowLogsPaginator
+func NewDescribeFlowLogsPaginator(client DescribeFlowLogsAPIClient, params *DescribeFlowLogsInput, optFns ...func(*DescribeFlowLogsPaginatorOptions)) *DescribeFlowLogsPaginator {
+ if params == nil {
+ params = &DescribeFlowLogsInput{}
+ }
+
+ options := DescribeFlowLogsPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribeFlowLogsPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribeFlowLogsPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribeFlowLogs page.
+func (p *DescribeFlowLogsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeFlowLogsOutput, 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.DescribeFlowLogs(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_opDescribeFlowLogs(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeFlowLogs",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeFpgaImageAttribute.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeFpgaImageAttribute.go
new file mode 100644
index 00000000..11a3fe36
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeFpgaImageAttribute.go
@@ -0,0 +1,132 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes the specified attribute of the specified Amazon FPGA Image (AFI).
+func (c *Client) DescribeFpgaImageAttribute(ctx context.Context, params *DescribeFpgaImageAttributeInput, optFns ...func(*Options)) (*DescribeFpgaImageAttributeOutput, error) {
+ if params == nil {
+ params = &DescribeFpgaImageAttributeInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeFpgaImageAttribute", params, optFns, c.addOperationDescribeFpgaImageAttributeMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeFpgaImageAttributeOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeFpgaImageAttributeInput struct {
+
+ // The AFI attribute.
+ //
+ // This member is required.
+ Attribute types.FpgaImageAttributeName
+
+ // The ID of the AFI.
+ //
+ // This member is required.
+ FpgaImageId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type DescribeFpgaImageAttributeOutput struct {
+
+ // Information about the attribute.
+ FpgaImageAttribute *types.FpgaImageAttribute
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeFpgaImageAttributeMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeFpgaImageAttribute{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeFpgaImageAttribute{}, 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 = addOpDescribeFpgaImageAttributeValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeFpgaImageAttribute(options.Region), middleware.Before); 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_opDescribeFpgaImageAttribute(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeFpgaImageAttribute",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeFpgaImages.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeFpgaImages.go
new file mode 100644
index 00000000..4ed6c36b
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeFpgaImages.go
@@ -0,0 +1,264 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes the Amazon FPGA Images (AFIs) available to you. These include public
+// AFIs, private AFIs that you own, and AFIs owned by other AWS accounts for which
+// you have load permissions.
+func (c *Client) DescribeFpgaImages(ctx context.Context, params *DescribeFpgaImagesInput, optFns ...func(*Options)) (*DescribeFpgaImagesOutput, error) {
+ if params == nil {
+ params = &DescribeFpgaImagesInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeFpgaImages", params, optFns, c.addOperationDescribeFpgaImagesMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeFpgaImagesOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeFpgaImagesInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The filters.
+ //
+ // * create-time - The creation time of the AFI.
+ //
+ // * fpga-image-id -
+ // The FPGA image identifier (AFI ID).
+ //
+ // * fpga-image-global-id - The global FPGA
+ // image identifier (AGFI ID).
+ //
+ // * name - The name of the AFI.
+ //
+ // * owner-id - The AWS
+ // account ID of the AFI owner.
+ //
+ // * product-code - The product code.
+ //
+ // *
+ // shell-version - The version of the AWS Shell that was used to create the
+ // bitstream.
+ //
+ // * state - The state of the AFI (pending | failed | available |
+ // unavailable).
+ //
+ // * tag: - The key/value combination of a tag assigned to the
+ // resource. Use the tag key in the filter name and the tag value as the filter
+ // value. For example, to find all resources that have a tag with the key Owner and
+ // the value TeamA, specify tag:Owner for the filter name and TeamA for the filter
+ // value.
+ //
+ // * tag-key - The key of a tag assigned to the resource. Use this filter
+ // to find all resources assigned a tag with a specific key, regardless of the tag
+ // value.
+ //
+ // * update-time - The time of the most recent update.
+ Filters []types.Filter
+
+ // The AFI IDs.
+ FpgaImageIds []string
+
+ // The maximum number of results to return in a single call.
+ MaxResults *int32
+
+ // The token to retrieve the next page of results.
+ NextToken *string
+
+ // Filters the AFI by owner. Specify an AWS account ID, self (owner is the sender
+ // of the request), or an AWS owner alias (valid values are amazon |
+ // aws-marketplace).
+ Owners []string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeFpgaImagesOutput struct {
+
+ // Information about the FPGA images.
+ FpgaImages []types.FpgaImage
+
+ // The token to use to retrieve the next page of results. This value is null when
+ // there are no more results to return.
+ NextToken *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeFpgaImagesMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeFpgaImages{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeFpgaImages{}, 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_opDescribeFpgaImages(options.Region), middleware.Before); 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
+}
+
+// DescribeFpgaImagesAPIClient is a client that implements the DescribeFpgaImages
+// operation.
+type DescribeFpgaImagesAPIClient interface {
+ DescribeFpgaImages(context.Context, *DescribeFpgaImagesInput, ...func(*Options)) (*DescribeFpgaImagesOutput, error)
+}
+
+var _ DescribeFpgaImagesAPIClient = (*Client)(nil)
+
+// DescribeFpgaImagesPaginatorOptions is the paginator options for
+// DescribeFpgaImages
+type DescribeFpgaImagesPaginatorOptions struct {
+ // The maximum number of results to return in a single call.
+ 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
+}
+
+// DescribeFpgaImagesPaginator is a paginator for DescribeFpgaImages
+type DescribeFpgaImagesPaginator struct {
+ options DescribeFpgaImagesPaginatorOptions
+ client DescribeFpgaImagesAPIClient
+ params *DescribeFpgaImagesInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribeFpgaImagesPaginator returns a new DescribeFpgaImagesPaginator
+func NewDescribeFpgaImagesPaginator(client DescribeFpgaImagesAPIClient, params *DescribeFpgaImagesInput, optFns ...func(*DescribeFpgaImagesPaginatorOptions)) *DescribeFpgaImagesPaginator {
+ if params == nil {
+ params = &DescribeFpgaImagesInput{}
+ }
+
+ options := DescribeFpgaImagesPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribeFpgaImagesPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribeFpgaImagesPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribeFpgaImages page.
+func (p *DescribeFpgaImagesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeFpgaImagesOutput, 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.DescribeFpgaImages(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_opDescribeFpgaImages(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeFpgaImages",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeHostReservationOfferings.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeHostReservationOfferings.go
new file mode 100644
index 00000000..d6a2212e
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeHostReservationOfferings.go
@@ -0,0 +1,253 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes the Dedicated Host reservations that are available to purchase. The
+// results describe all of the Dedicated Host reservation offerings, including
+// offerings that might not match the instance family and Region of your Dedicated
+// Hosts. When purchasing an offering, ensure that the instance family and Region
+// of the offering matches that of the Dedicated Hosts with which it is to be
+// associated. For more information about supported instance types, see Dedicated
+// Hosts
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/dedicated-hosts-overview.html)
+// in the Amazon EC2 User Guide.
+func (c *Client) DescribeHostReservationOfferings(ctx context.Context, params *DescribeHostReservationOfferingsInput, optFns ...func(*Options)) (*DescribeHostReservationOfferingsOutput, error) {
+ if params == nil {
+ params = &DescribeHostReservationOfferingsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeHostReservationOfferings", params, optFns, c.addOperationDescribeHostReservationOfferingsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeHostReservationOfferingsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeHostReservationOfferingsInput struct {
+
+ // The filters.
+ //
+ // * instance-family - The instance family of the offering (for
+ // example, m4).
+ //
+ // * payment-option - The payment option (NoUpfront | PartialUpfront
+ // | AllUpfront).
+ Filter []types.Filter
+
+ // This is the maximum duration of the reservation to purchase, specified in
+ // seconds. Reservations are available in one-year and three-year terms. The number
+ // of seconds specified must be the number of seconds in a year (365x24x60x60)
+ // times one of the supported durations (1 or 3). For example, specify 94608000 for
+ // three years.
+ MaxDuration *int32
+
+ // The maximum number of results to return for the request in a single page. The
+ // remaining results can be seen by sending another request with the returned
+ // nextToken value. This value can be between 5 and 500. If maxResults is given a
+ // larger value than 500, you receive an error.
+ MaxResults *int32
+
+ // This is the minimum duration of the reservation you'd like to purchase,
+ // specified in seconds. Reservations are available in one-year and three-year
+ // terms. The number of seconds specified must be the number of seconds in a year
+ // (365x24x60x60) times one of the supported durations (1 or 3). For example,
+ // specify 31536000 for one year.
+ MinDuration *int32
+
+ // The token to use to retrieve the next page of results.
+ NextToken *string
+
+ // The ID of the reservation offering.
+ OfferingId *string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeHostReservationOfferingsOutput struct {
+
+ // The token to use to retrieve the next page of results. This value is null when
+ // there are no more results to return.
+ NextToken *string
+
+ // Information about the offerings.
+ OfferingSet []types.HostOffering
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeHostReservationOfferingsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeHostReservationOfferings{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeHostReservationOfferings{}, 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_opDescribeHostReservationOfferings(options.Region), middleware.Before); 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
+}
+
+// DescribeHostReservationOfferingsAPIClient is a client that implements the
+// DescribeHostReservationOfferings operation.
+type DescribeHostReservationOfferingsAPIClient interface {
+ DescribeHostReservationOfferings(context.Context, *DescribeHostReservationOfferingsInput, ...func(*Options)) (*DescribeHostReservationOfferingsOutput, error)
+}
+
+var _ DescribeHostReservationOfferingsAPIClient = (*Client)(nil)
+
+// DescribeHostReservationOfferingsPaginatorOptions is the paginator options for
+// DescribeHostReservationOfferings
+type DescribeHostReservationOfferingsPaginatorOptions struct {
+ // The maximum number of results to return for the request in a single page. The
+ // remaining results can be seen by sending another request with the returned
+ // nextToken value. This value can be between 5 and 500. If maxResults is given a
+ // larger value than 500, you receive an error.
+ 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
+}
+
+// DescribeHostReservationOfferingsPaginator is a paginator for
+// DescribeHostReservationOfferings
+type DescribeHostReservationOfferingsPaginator struct {
+ options DescribeHostReservationOfferingsPaginatorOptions
+ client DescribeHostReservationOfferingsAPIClient
+ params *DescribeHostReservationOfferingsInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribeHostReservationOfferingsPaginator returns a new
+// DescribeHostReservationOfferingsPaginator
+func NewDescribeHostReservationOfferingsPaginator(client DescribeHostReservationOfferingsAPIClient, params *DescribeHostReservationOfferingsInput, optFns ...func(*DescribeHostReservationOfferingsPaginatorOptions)) *DescribeHostReservationOfferingsPaginator {
+ if params == nil {
+ params = &DescribeHostReservationOfferingsInput{}
+ }
+
+ options := DescribeHostReservationOfferingsPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribeHostReservationOfferingsPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribeHostReservationOfferingsPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribeHostReservationOfferings page.
+func (p *DescribeHostReservationOfferingsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeHostReservationOfferingsOutput, 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.DescribeHostReservationOfferings(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_opDescribeHostReservationOfferings(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeHostReservationOfferings",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeHostReservations.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeHostReservations.go
new file mode 100644
index 00000000..0613dabc
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeHostReservations.go
@@ -0,0 +1,243 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes reservations that are associated with Dedicated Hosts in your account.
+func (c *Client) DescribeHostReservations(ctx context.Context, params *DescribeHostReservationsInput, optFns ...func(*Options)) (*DescribeHostReservationsOutput, error) {
+ if params == nil {
+ params = &DescribeHostReservationsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeHostReservations", params, optFns, c.addOperationDescribeHostReservationsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeHostReservationsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeHostReservationsInput struct {
+
+ // The filters.
+ //
+ // * instance-family - The instance family (for example, m4).
+ //
+ // *
+ // payment-option - The payment option (NoUpfront | PartialUpfront |
+ // AllUpfront).
+ //
+ // * state - The state of the reservation (payment-pending |
+ // payment-failed | active | retired).
+ //
+ // * tag: - The key/value combination of a tag
+ // assigned to the resource. Use the tag key in the filter name and the tag value
+ // as the filter value. For example, to find all resources that have a tag with the
+ // key Owner and the value TeamA, specify tag:Owner for the filter name and TeamA
+ // for the filter value.
+ //
+ // * tag-key - The key of a tag assigned to the resource.
+ // Use this filter to find all resources assigned a tag with a specific key,
+ // regardless of the tag value.
+ Filter []types.Filter
+
+ // The host reservation IDs.
+ HostReservationIdSet []string
+
+ // The maximum number of results to return for the request in a single page. The
+ // remaining results can be seen by sending another request with the returned
+ // nextToken value. This value can be between 5 and 500. If maxResults is given a
+ // larger value than 500, you receive an error.
+ MaxResults *int32
+
+ // The token to use to retrieve the next page of results.
+ NextToken *string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeHostReservationsOutput struct {
+
+ // Details about the reservation's configuration.
+ HostReservationSet []types.HostReservation
+
+ // The token to use to retrieve the next page of results. This value is null when
+ // there are no more results to return.
+ NextToken *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeHostReservationsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeHostReservations{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeHostReservations{}, 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_opDescribeHostReservations(options.Region), middleware.Before); 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
+}
+
+// DescribeHostReservationsAPIClient is a client that implements the
+// DescribeHostReservations operation.
+type DescribeHostReservationsAPIClient interface {
+ DescribeHostReservations(context.Context, *DescribeHostReservationsInput, ...func(*Options)) (*DescribeHostReservationsOutput, error)
+}
+
+var _ DescribeHostReservationsAPIClient = (*Client)(nil)
+
+// DescribeHostReservationsPaginatorOptions is the paginator options for
+// DescribeHostReservations
+type DescribeHostReservationsPaginatorOptions struct {
+ // The maximum number of results to return for the request in a single page. The
+ // remaining results can be seen by sending another request with the returned
+ // nextToken value. This value can be between 5 and 500. If maxResults is given a
+ // larger value than 500, you receive an error.
+ 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
+}
+
+// DescribeHostReservationsPaginator is a paginator for DescribeHostReservations
+type DescribeHostReservationsPaginator struct {
+ options DescribeHostReservationsPaginatorOptions
+ client DescribeHostReservationsAPIClient
+ params *DescribeHostReservationsInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribeHostReservationsPaginator returns a new
+// DescribeHostReservationsPaginator
+func NewDescribeHostReservationsPaginator(client DescribeHostReservationsAPIClient, params *DescribeHostReservationsInput, optFns ...func(*DescribeHostReservationsPaginatorOptions)) *DescribeHostReservationsPaginator {
+ if params == nil {
+ params = &DescribeHostReservationsInput{}
+ }
+
+ options := DescribeHostReservationsPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribeHostReservationsPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribeHostReservationsPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribeHostReservations page.
+func (p *DescribeHostReservationsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeHostReservationsOutput, 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.DescribeHostReservations(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_opDescribeHostReservations(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeHostReservations",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeHosts.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeHosts.go
new file mode 100644
index 00000000..f51be0bf
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeHosts.go
@@ -0,0 +1,249 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes the specified Dedicated Hosts or all your Dedicated Hosts. The results
+// describe only the Dedicated Hosts in the Region you're currently using. All
+// listed instances consume capacity on your Dedicated Host. Dedicated Hosts that
+// have recently been released are listed with the state released.
+func (c *Client) DescribeHosts(ctx context.Context, params *DescribeHostsInput, optFns ...func(*Options)) (*DescribeHostsOutput, error) {
+ if params == nil {
+ params = &DescribeHostsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeHosts", params, optFns, c.addOperationDescribeHostsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeHostsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeHostsInput struct {
+
+ // The filters.
+ //
+ // * auto-placement - Whether auto-placement is enabled or disabled
+ // (on | off).
+ //
+ // * availability-zone - The Availability Zone of the host.
+ //
+ // *
+ // client-token - The idempotency token that you provided when you allocated the
+ // host.
+ //
+ // * host-reservation-id - The ID of the reservation assigned to this
+ // host.
+ //
+ // * instance-type - The instance type size that the Dedicated Host is
+ // configured to support.
+ //
+ // * state - The allocation state of the Dedicated Host
+ // (available | under-assessment | permanent-failure | released |
+ // released-permanent-failure).
+ //
+ // * tag-key - The key of a tag assigned to the
+ // resource. Use this filter to find all resources assigned a tag with a specific
+ // key, regardless of the tag value.
+ Filter []types.Filter
+
+ // The IDs of the Dedicated Hosts. The IDs are used for targeted instance launches.
+ HostIds []string
+
+ // The maximum number of results to return for the request in a single page. The
+ // remaining results can be seen by sending another request with the returned
+ // nextToken value. This value can be between 5 and 500. If maxResults is given a
+ // larger value than 500, you receive an error. You cannot specify this parameter
+ // and the host IDs parameter in the same request.
+ MaxResults *int32
+
+ // The token to use to retrieve the next page of results.
+ NextToken *string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeHostsOutput struct {
+
+ // Information about the Dedicated Hosts.
+ Hosts []types.Host
+
+ // The token to use to retrieve the next page of results. This value is null when
+ // there are no more results to return.
+ NextToken *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeHostsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeHosts{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeHosts{}, 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_opDescribeHosts(options.Region), middleware.Before); 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
+}
+
+// DescribeHostsAPIClient is a client that implements the DescribeHosts operation.
+type DescribeHostsAPIClient interface {
+ DescribeHosts(context.Context, *DescribeHostsInput, ...func(*Options)) (*DescribeHostsOutput, error)
+}
+
+var _ DescribeHostsAPIClient = (*Client)(nil)
+
+// DescribeHostsPaginatorOptions is the paginator options for DescribeHosts
+type DescribeHostsPaginatorOptions struct {
+ // The maximum number of results to return for the request in a single page. The
+ // remaining results can be seen by sending another request with the returned
+ // nextToken value. This value can be between 5 and 500. If maxResults is given a
+ // larger value than 500, you receive an error. You cannot specify this parameter
+ // and the host IDs parameter in the same 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
+}
+
+// DescribeHostsPaginator is a paginator for DescribeHosts
+type DescribeHostsPaginator struct {
+ options DescribeHostsPaginatorOptions
+ client DescribeHostsAPIClient
+ params *DescribeHostsInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribeHostsPaginator returns a new DescribeHostsPaginator
+func NewDescribeHostsPaginator(client DescribeHostsAPIClient, params *DescribeHostsInput, optFns ...func(*DescribeHostsPaginatorOptions)) *DescribeHostsPaginator {
+ if params == nil {
+ params = &DescribeHostsInput{}
+ }
+
+ options := DescribeHostsPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribeHostsPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribeHostsPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribeHosts page.
+func (p *DescribeHostsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeHostsOutput, 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.DescribeHosts(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_opDescribeHosts(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeHosts",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeIamInstanceProfileAssociations.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeIamInstanceProfileAssociations.go
new file mode 100644
index 00000000..29e86061
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeIamInstanceProfileAssociations.go
@@ -0,0 +1,226 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes your IAM instance profile associations.
+func (c *Client) DescribeIamInstanceProfileAssociations(ctx context.Context, params *DescribeIamInstanceProfileAssociationsInput, optFns ...func(*Options)) (*DescribeIamInstanceProfileAssociationsOutput, error) {
+ if params == nil {
+ params = &DescribeIamInstanceProfileAssociationsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeIamInstanceProfileAssociations", params, optFns, c.addOperationDescribeIamInstanceProfileAssociationsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeIamInstanceProfileAssociationsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeIamInstanceProfileAssociationsInput struct {
+
+ // The IAM instance profile associations.
+ AssociationIds []string
+
+ // The filters.
+ //
+ // * instance-id - The ID of the instance.
+ //
+ // * state - The state of
+ // the association (associating | associated | disassociating).
+ Filters []types.Filter
+
+ // The maximum number of results to return in a single call. To retrieve the
+ // remaining results, make another call with the returned NextToken value.
+ MaxResults *int32
+
+ // The token to request the next page of results.
+ NextToken *string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeIamInstanceProfileAssociationsOutput struct {
+
+ // Information about the IAM instance profile associations.
+ IamInstanceProfileAssociations []types.IamInstanceProfileAssociation
+
+ // The token to use to retrieve the next page of results. This value is null when
+ // there are no more results to return.
+ NextToken *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeIamInstanceProfileAssociationsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeIamInstanceProfileAssociations{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeIamInstanceProfileAssociations{}, 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_opDescribeIamInstanceProfileAssociations(options.Region), middleware.Before); 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
+}
+
+// DescribeIamInstanceProfileAssociationsAPIClient is a client that implements the
+// DescribeIamInstanceProfileAssociations operation.
+type DescribeIamInstanceProfileAssociationsAPIClient interface {
+ DescribeIamInstanceProfileAssociations(context.Context, *DescribeIamInstanceProfileAssociationsInput, ...func(*Options)) (*DescribeIamInstanceProfileAssociationsOutput, error)
+}
+
+var _ DescribeIamInstanceProfileAssociationsAPIClient = (*Client)(nil)
+
+// DescribeIamInstanceProfileAssociationsPaginatorOptions is the paginator options
+// for DescribeIamInstanceProfileAssociations
+type DescribeIamInstanceProfileAssociationsPaginatorOptions struct {
+ // The maximum number of results to return in a single call. To retrieve the
+ // remaining results, make another call with the returned NextToken value.
+ 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
+}
+
+// DescribeIamInstanceProfileAssociationsPaginator is a paginator for
+// DescribeIamInstanceProfileAssociations
+type DescribeIamInstanceProfileAssociationsPaginator struct {
+ options DescribeIamInstanceProfileAssociationsPaginatorOptions
+ client DescribeIamInstanceProfileAssociationsAPIClient
+ params *DescribeIamInstanceProfileAssociationsInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribeIamInstanceProfileAssociationsPaginator returns a new
+// DescribeIamInstanceProfileAssociationsPaginator
+func NewDescribeIamInstanceProfileAssociationsPaginator(client DescribeIamInstanceProfileAssociationsAPIClient, params *DescribeIamInstanceProfileAssociationsInput, optFns ...func(*DescribeIamInstanceProfileAssociationsPaginatorOptions)) *DescribeIamInstanceProfileAssociationsPaginator {
+ if params == nil {
+ params = &DescribeIamInstanceProfileAssociationsInput{}
+ }
+
+ options := DescribeIamInstanceProfileAssociationsPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribeIamInstanceProfileAssociationsPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribeIamInstanceProfileAssociationsPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribeIamInstanceProfileAssociations page.
+func (p *DescribeIamInstanceProfileAssociationsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeIamInstanceProfileAssociationsOutput, 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.DescribeIamInstanceProfileAssociations(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_opDescribeIamInstanceProfileAssociations(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeIamInstanceProfileAssociations",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeIdFormat.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeIdFormat.go
new file mode 100644
index 00000000..b46cb6ea
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeIdFormat.go
@@ -0,0 +1,140 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes the ID format settings for your resources on a per-Region basis, for
+// example, to view which resource types are enabled for longer IDs. This request
+// only returns information about resource types whose ID formats can be modified;
+// it does not return information about other resource types. The following
+// resource types support longer IDs: bundle | conversion-task | customer-gateway |
+// dhcp-options | elastic-ip-allocation | elastic-ip-association | export-task |
+// flow-log | image | import-task | instance | internet-gateway | network-acl |
+// network-acl-association | network-interface | network-interface-attachment |
+// prefix-list | reservation | route-table | route-table-association |
+// security-group | snapshot | subnet | subnet-cidr-block-association | volume |
+// vpc | vpc-cidr-block-association | vpc-endpoint | vpc-peering-connection |
+// vpn-connection | vpn-gateway. These settings apply to the IAM user who makes the
+// request; they do not apply to the entire AWS account. By default, an IAM user
+// defaults to the same settings as the root user, unless they explicitly override
+// the settings by running the ModifyIdFormat command. Resources created with
+// longer IDs are visible to all IAM users, regardless of these settings and
+// provided that they have permission to use the relevant Describe command for the
+// resource type.
+func (c *Client) DescribeIdFormat(ctx context.Context, params *DescribeIdFormatInput, optFns ...func(*Options)) (*DescribeIdFormatOutput, error) {
+ if params == nil {
+ params = &DescribeIdFormatInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeIdFormat", params, optFns, c.addOperationDescribeIdFormatMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeIdFormatOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeIdFormatInput struct {
+
+ // The type of resource: bundle | conversion-task | customer-gateway | dhcp-options
+ // | elastic-ip-allocation | elastic-ip-association | export-task | flow-log |
+ // image | import-task | instance | internet-gateway | network-acl |
+ // network-acl-association | network-interface | network-interface-attachment |
+ // prefix-list | reservation | route-table | route-table-association |
+ // security-group | snapshot | subnet | subnet-cidr-block-association | volume |
+ // vpc | vpc-cidr-block-association | vpc-endpoint | vpc-peering-connection |
+ // vpn-connection | vpn-gateway
+ Resource *string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeIdFormatOutput struct {
+
+ // Information about the ID format for the resource.
+ Statuses []types.IdFormat
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeIdFormatMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeIdFormat{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeIdFormat{}, 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_opDescribeIdFormat(options.Region), middleware.Before); 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_opDescribeIdFormat(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeIdFormat",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeIdentityIdFormat.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeIdentityIdFormat.go
new file mode 100644
index 00000000..bc70c60d
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeIdentityIdFormat.go
@@ -0,0 +1,146 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes the ID format settings for resources for the specified IAM user, IAM
+// role, or root user. For example, you can view the resource types that are
+// enabled for longer IDs. This request only returns information about resource
+// types whose ID formats can be modified; it does not return information about
+// other resource types. For more information, see Resource IDs
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/resource-ids.html) in the
+// Amazon Elastic Compute Cloud User Guide. The following resource types support
+// longer IDs: bundle | conversion-task | customer-gateway | dhcp-options |
+// elastic-ip-allocation | elastic-ip-association | export-task | flow-log | image
+// | import-task | instance | internet-gateway | network-acl |
+// network-acl-association | network-interface | network-interface-attachment |
+// prefix-list | reservation | route-table | route-table-association |
+// security-group | snapshot | subnet | subnet-cidr-block-association | volume |
+// vpc | vpc-cidr-block-association | vpc-endpoint | vpc-peering-connection |
+// vpn-connection | vpn-gateway. These settings apply to the principal specified in
+// the request. They do not apply to the principal that makes the request.
+func (c *Client) DescribeIdentityIdFormat(ctx context.Context, params *DescribeIdentityIdFormatInput, optFns ...func(*Options)) (*DescribeIdentityIdFormatOutput, error) {
+ if params == nil {
+ params = &DescribeIdentityIdFormatInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeIdentityIdFormat", params, optFns, c.addOperationDescribeIdentityIdFormatMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeIdentityIdFormatOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeIdentityIdFormatInput struct {
+
+ // The ARN of the principal, which can be an IAM role, IAM user, or the root user.
+ //
+ // This member is required.
+ PrincipalArn *string
+
+ // The type of resource: bundle | conversion-task | customer-gateway | dhcp-options
+ // | elastic-ip-allocation | elastic-ip-association | export-task | flow-log |
+ // image | import-task | instance | internet-gateway | network-acl |
+ // network-acl-association | network-interface | network-interface-attachment |
+ // prefix-list | reservation | route-table | route-table-association |
+ // security-group | snapshot | subnet | subnet-cidr-block-association | volume |
+ // vpc | vpc-cidr-block-association | vpc-endpoint | vpc-peering-connection |
+ // vpn-connection | vpn-gateway
+ Resource *string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeIdentityIdFormatOutput struct {
+
+ // Information about the ID format for the resources.
+ Statuses []types.IdFormat
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeIdentityIdFormatMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeIdentityIdFormat{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeIdentityIdFormat{}, 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 = addOpDescribeIdentityIdFormatValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeIdentityIdFormat(options.Region), middleware.Before); 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_opDescribeIdentityIdFormat(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeIdentityIdFormat",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeImageAttribute.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeImageAttribute.go
new file mode 100644
index 00000000..d2620f99
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeImageAttribute.go
@@ -0,0 +1,162 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes the specified attribute of the specified AMI. You can specify only one
+// attribute at a time.
+func (c *Client) DescribeImageAttribute(ctx context.Context, params *DescribeImageAttributeInput, optFns ...func(*Options)) (*DescribeImageAttributeOutput, error) {
+ if params == nil {
+ params = &DescribeImageAttributeInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeImageAttribute", params, optFns, c.addOperationDescribeImageAttributeMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeImageAttributeOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+// Contains the parameters for DescribeImageAttribute.
+type DescribeImageAttributeInput struct {
+
+ // The AMI attribute. Note: The blockDeviceMapping attribute is deprecated. Using
+ // this attribute returns the Client.AuthFailure error. To get information about
+ // the block device mappings for an AMI, use the DescribeImages action.
+ //
+ // This member is required.
+ Attribute types.ImageAttributeName
+
+ // The ID of the AMI.
+ //
+ // This member is required.
+ ImageId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+// Describes an image attribute.
+type DescribeImageAttributeOutput struct {
+
+ // The block device mapping entries.
+ BlockDeviceMappings []types.BlockDeviceMapping
+
+ // Describes a value for a resource attribute that is a String.
+ BootMode *types.AttributeValue
+
+ // A description for the AMI.
+ Description *types.AttributeValue
+
+ // The ID of the AMI.
+ ImageId *string
+
+ // The kernel ID.
+ KernelId *types.AttributeValue
+
+ // The launch permissions.
+ LaunchPermissions []types.LaunchPermission
+
+ // The product codes.
+ ProductCodes []types.ProductCode
+
+ // The RAM disk ID.
+ RamdiskId *types.AttributeValue
+
+ // Indicates whether enhanced networking with the Intel 82599 Virtual Function
+ // interface is enabled.
+ SriovNetSupport *types.AttributeValue
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeImageAttributeMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeImageAttribute{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeImageAttribute{}, 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 = addOpDescribeImageAttributeValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeImageAttribute(options.Region), middleware.Before); 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_opDescribeImageAttribute(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeImageAttribute",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeImages.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeImages.go
new file mode 100644
index 00000000..b85c727c
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeImages.go
@@ -0,0 +1,622 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+import (
+ "context"
+ "errors"
+ "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/ec2/types"
+ smithy "github.com/aws/smithy-go"
+ "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"
+ "strconv"
+ "time"
+)
+
+// Describes the specified images (AMIs, AKIs, and ARIs) available to you or all of
+// the images available to you. The images available to you include public images,
+// private images that you own, and private images owned by other Amazon Web
+// Services accounts for which you have explicit launch permissions. Recently
+// deregistered images appear in the returned results for a short interval and then
+// return empty results. After all instances that reference a deregistered AMI are
+// terminated, specifying the ID of the image will eventually return an error
+// indicating that the AMI ID cannot be found.
+func (c *Client) DescribeImages(ctx context.Context, params *DescribeImagesInput, optFns ...func(*Options)) (*DescribeImagesOutput, error) {
+ if params == nil {
+ params = &DescribeImagesInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeImages", params, optFns, c.addOperationDescribeImagesMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeImagesOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeImagesInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // Scopes the images by users with explicit launch permissions. Specify an Amazon
+ // Web Services account ID, self (the sender of the request), or all (public AMIs).
+ ExecutableUsers []string
+
+ // The filters.
+ //
+ // * architecture - The image architecture (i386 | x86_64 |
+ // arm64).
+ //
+ // * block-device-mapping.delete-on-termination - A Boolean value that
+ // indicates whether the Amazon EBS volume is deleted on instance termination.
+ //
+ // *
+ // block-device-mapping.device-name - The device name specified in the block device
+ // mapping (for example, /dev/sdh or xvdh).
+ //
+ // * block-device-mapping.snapshot-id -
+ // The ID of the snapshot used for the Amazon EBS volume.
+ //
+ // *
+ // block-device-mapping.volume-size - The volume size of the Amazon EBS volume, in
+ // GiB.
+ //
+ // * block-device-mapping.volume-type - The volume type of the Amazon EBS
+ // volume (io1 | io2 | gp2 | gp3 | sc1 | st1 | standard).
+ //
+ // *
+ // block-device-mapping.encrypted - A Boolean that indicates whether the Amazon EBS
+ // volume is encrypted.
+ //
+ // * description - The description of the image (provided
+ // during image creation).
+ //
+ // * ena-support - A Boolean that indicates whether
+ // enhanced networking with ENA is enabled.
+ //
+ // * hypervisor - The hypervisor type
+ // (ovm | xen).
+ //
+ // * image-id - The ID of the image.
+ //
+ // * image-type - The image type
+ // (machine | kernel | ramdisk).
+ //
+ // * is-public - A Boolean that indicates whether
+ // the image is public.
+ //
+ // * kernel-id - The kernel ID.
+ //
+ // * manifest-location - The
+ // location of the image manifest.
+ //
+ // * name - The name of the AMI (provided during
+ // image creation).
+ //
+ // * owner-alias - The owner alias (amazon | aws-marketplace).
+ // The valid aliases are defined in an Amazon-maintained list. This is not the
+ // Amazon Web Services account alias that can be set using the IAM console. We
+ // recommend that you use the Owner request parameter instead of this filter.
+ //
+ // *
+ // owner-id - The Amazon Web Services account ID of the owner. We recommend that
+ // you use the Owner request parameter instead of this filter.
+ //
+ // * platform - The
+ // platform. To only list Windows-based AMIs, use windows.
+ //
+ // * product-code - The
+ // product code.
+ //
+ // * product-code.type - The type of the product code
+ // (marketplace).
+ //
+ // * ramdisk-id - The RAM disk ID.
+ //
+ // * root-device-name - The device
+ // name of the root device volume (for example, /dev/sda1).
+ //
+ // * root-device-type -
+ // The type of the root device volume (ebs | instance-store).
+ //
+ // * state - The state
+ // of the image (available | pending | failed).
+ //
+ // * state-reason-code - The reason
+ // code for the state change.
+ //
+ // * state-reason-message - The message for the state
+ // change.
+ //
+ // * sriov-net-support - A value of simple indicates that enhanced
+ // networking with the Intel 82599 VF interface is enabled.
+ //
+ // * tag: - The key/value
+ // combination of a tag assigned to the resource. Use the tag key in the filter
+ // name and the tag value as the filter value. For example, to find all resources
+ // that have a tag with the key Owner and the value TeamA, specify tag:Owner for
+ // the filter name and TeamA for the filter value.
+ //
+ // * tag-key - The key of a tag
+ // assigned to the resource. Use this filter to find all resources assigned a tag
+ // with a specific key, regardless of the tag value.
+ //
+ // * virtualization-type - The
+ // virtualization type (paravirtual | hvm).
+ Filters []types.Filter
+
+ // The image IDs. Default: Describes all images available to you.
+ ImageIds []string
+
+ // If true, all deprecated AMIs are included in the response. If false, no
+ // deprecated AMIs are included in the response. If no value is specified, the
+ // default value is false. If you are the AMI owner, all deprecated AMIs appear in
+ // the response regardless of the value (true or false) that you set for this
+ // parameter.
+ IncludeDeprecated *bool
+
+ // Scopes the results to images with the specified owners. You can specify a
+ // combination of Amazon Web Services account IDs, self, amazon, and
+ // aws-marketplace. If you omit this parameter, the results include all images for
+ // which you have launch permissions, regardless of ownership.
+ Owners []string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeImagesOutput struct {
+
+ // Information about the images.
+ Images []types.Image
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeImagesMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeImages{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeImages{}, 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_opDescribeImages(options.Region), middleware.Before); 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
+}
+
+// DescribeImagesAPIClient is a client that implements the DescribeImages
+// operation.
+type DescribeImagesAPIClient interface {
+ DescribeImages(context.Context, *DescribeImagesInput, ...func(*Options)) (*DescribeImagesOutput, error)
+}
+
+var _ DescribeImagesAPIClient = (*Client)(nil)
+
+// ImageAvailableWaiterOptions are waiter options for ImageAvailableWaiter
+type ImageAvailableWaiterOptions 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,
+ // ImageAvailableWaiter will use default minimum delay of 15 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, ImageAvailableWaiter 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, *DescribeImagesInput, *DescribeImagesOutput, error) (bool, error)
+}
+
+// ImageAvailableWaiter defines the waiters for ImageAvailable
+type ImageAvailableWaiter struct {
+ client DescribeImagesAPIClient
+
+ options ImageAvailableWaiterOptions
+}
+
+// NewImageAvailableWaiter constructs a ImageAvailableWaiter.
+func NewImageAvailableWaiter(client DescribeImagesAPIClient, optFns ...func(*ImageAvailableWaiterOptions)) *ImageAvailableWaiter {
+ options := ImageAvailableWaiterOptions{}
+ options.MinDelay = 15 * time.Second
+ options.MaxDelay = 120 * time.Second
+ options.Retryable = imageAvailableStateRetryable
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+ return &ImageAvailableWaiter{
+ client: client,
+ options: options,
+ }
+}
+
+// Wait calls the waiter function for ImageAvailable waiter. The maxWaitDur is the
+// maximum wait duration the waiter will wait. The maxWaitDur is required and must
+// be greater than zero.
+func (w *ImageAvailableWaiter) Wait(ctx context.Context, params *DescribeImagesInput, maxWaitDur time.Duration, optFns ...func(*ImageAvailableWaiterOptions)) error {
+ if maxWaitDur <= 0 {
+ return 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 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.DescribeImages(ctx, params, func(o *Options) {
+ o.APIOptions = append(o.APIOptions, apiOptions...)
+ })
+
+ retryable, err := options.Retryable(ctx, params, out, err)
+ if err != nil {
+ return err
+ }
+ if !retryable {
+ return 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 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 fmt.Errorf("request cancelled while waiting, %w", err)
+ }
+ }
+ return fmt.Errorf("exceeded max wait time for ImageAvailable waiter")
+}
+
+func imageAvailableStateRetryable(ctx context.Context, input *DescribeImagesInput, output *DescribeImagesOutput, err error) (bool, error) {
+
+ if err == nil {
+ pathValue, err := jmespath.Search("Images[].State", output)
+ if err != nil {
+ return false, fmt.Errorf("error evaluating waiter state: %w", err)
+ }
+
+ expectedValue := "available"
+ var match = true
+ listOfValues, ok := pathValue.([]interface{})
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected list got %T", pathValue)
+ }
+
+ if len(listOfValues) == 0 {
+ match = false
+ }
+ for _, v := range listOfValues {
+ value, ok := v.(types.ImageState)
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected types.ImageState value, got %T", pathValue)
+ }
+
+ if string(value) != expectedValue {
+ match = false
+ }
+ }
+
+ if match {
+ return false, nil
+ }
+ }
+
+ if err == nil {
+ pathValue, err := jmespath.Search("Images[].State", output)
+ if err != nil {
+ return false, fmt.Errorf("error evaluating waiter state: %w", err)
+ }
+
+ expectedValue := "failed"
+ listOfValues, ok := pathValue.([]interface{})
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected list got %T", pathValue)
+ }
+
+ for _, v := range listOfValues {
+ value, ok := v.(types.ImageState)
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected types.ImageState value, got %T", pathValue)
+ }
+
+ if string(value) == expectedValue {
+ return false, fmt.Errorf("waiter state transitioned to Failure")
+ }
+ }
+ }
+
+ return true, nil
+}
+
+// ImageExistsWaiterOptions are waiter options for ImageExistsWaiter
+type ImageExistsWaiterOptions 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,
+ // ImageExistsWaiter will use default minimum delay of 15 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, ImageExistsWaiter 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, *DescribeImagesInput, *DescribeImagesOutput, error) (bool, error)
+}
+
+// ImageExistsWaiter defines the waiters for ImageExists
+type ImageExistsWaiter struct {
+ client DescribeImagesAPIClient
+
+ options ImageExistsWaiterOptions
+}
+
+// NewImageExistsWaiter constructs a ImageExistsWaiter.
+func NewImageExistsWaiter(client DescribeImagesAPIClient, optFns ...func(*ImageExistsWaiterOptions)) *ImageExistsWaiter {
+ options := ImageExistsWaiterOptions{}
+ options.MinDelay = 15 * time.Second
+ options.MaxDelay = 120 * time.Second
+ options.Retryable = imageExistsStateRetryable
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+ return &ImageExistsWaiter{
+ client: client,
+ options: options,
+ }
+}
+
+// Wait calls the waiter function for ImageExists waiter. The maxWaitDur is the
+// maximum wait duration the waiter will wait. The maxWaitDur is required and must
+// be greater than zero.
+func (w *ImageExistsWaiter) Wait(ctx context.Context, params *DescribeImagesInput, maxWaitDur time.Duration, optFns ...func(*ImageExistsWaiterOptions)) error {
+ if maxWaitDur <= 0 {
+ return 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 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.DescribeImages(ctx, params, func(o *Options) {
+ o.APIOptions = append(o.APIOptions, apiOptions...)
+ })
+
+ retryable, err := options.Retryable(ctx, params, out, err)
+ if err != nil {
+ return err
+ }
+ if !retryable {
+ return 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 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 fmt.Errorf("request cancelled while waiting, %w", err)
+ }
+ }
+ return fmt.Errorf("exceeded max wait time for ImageExists waiter")
+}
+
+func imageExistsStateRetryable(ctx context.Context, input *DescribeImagesInput, output *DescribeImagesOutput, err error) (bool, error) {
+
+ if err == nil {
+ pathValue, err := jmespath.Search("length(Images[]) > `0`", output)
+ if err != nil {
+ return false, fmt.Errorf("error evaluating waiter state: %w", err)
+ }
+
+ expectedValue := "true"
+ bv, err := strconv.ParseBool(expectedValue)
+ if err != nil {
+ return false, fmt.Errorf("error parsing boolean from string %w", err)
+ }
+ value, ok := pathValue.(bool)
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected bool value got %T", pathValue)
+ }
+
+ if value == bv {
+ return false, nil
+ }
+ }
+
+ if err != nil {
+ var apiErr smithy.APIError
+ ok := errors.As(err, &apiErr)
+ if !ok {
+ return false, fmt.Errorf("expected err to be of type smithy.APIError, got %w", err)
+ }
+
+ if "InvalidAMIID.NotFound" == apiErr.ErrorCode() {
+ return true, nil
+ }
+ }
+
+ return true, nil
+}
+
+func newServiceMetadataMiddleware_opDescribeImages(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeImages",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeImportImageTasks.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeImportImageTasks.go
new file mode 100644
index 00000000..6171f3c1
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeImportImageTasks.go
@@ -0,0 +1,227 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Displays details about an import virtual machine or import snapshot tasks that
+// are already created.
+func (c *Client) DescribeImportImageTasks(ctx context.Context, params *DescribeImportImageTasksInput, optFns ...func(*Options)) (*DescribeImportImageTasksOutput, error) {
+ if params == nil {
+ params = &DescribeImportImageTasksInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeImportImageTasks", params, optFns, c.addOperationDescribeImportImageTasksMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeImportImageTasksOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeImportImageTasksInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // Filter tasks using the task-state filter and one of the following values:
+ // active, completed, deleting, or deleted.
+ Filters []types.Filter
+
+ // The IDs of the import image tasks.
+ ImportTaskIds []string
+
+ // The maximum number of results to return in a single call.
+ MaxResults *int32
+
+ // A token that indicates the next page of results.
+ NextToken *string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeImportImageTasksOutput struct {
+
+ // A list of zero or more import image tasks that are currently active or were
+ // completed or canceled in the previous 7 days.
+ ImportImageTasks []types.ImportImageTask
+
+ // The token to use to get the next page of results. This value is null when there
+ // are no more results to return.
+ NextToken *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeImportImageTasksMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeImportImageTasks{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeImportImageTasks{}, 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_opDescribeImportImageTasks(options.Region), middleware.Before); 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
+}
+
+// DescribeImportImageTasksAPIClient is a client that implements the
+// DescribeImportImageTasks operation.
+type DescribeImportImageTasksAPIClient interface {
+ DescribeImportImageTasks(context.Context, *DescribeImportImageTasksInput, ...func(*Options)) (*DescribeImportImageTasksOutput, error)
+}
+
+var _ DescribeImportImageTasksAPIClient = (*Client)(nil)
+
+// DescribeImportImageTasksPaginatorOptions is the paginator options for
+// DescribeImportImageTasks
+type DescribeImportImageTasksPaginatorOptions struct {
+ // The maximum number of results to return in a single call.
+ 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
+}
+
+// DescribeImportImageTasksPaginator is a paginator for DescribeImportImageTasks
+type DescribeImportImageTasksPaginator struct {
+ options DescribeImportImageTasksPaginatorOptions
+ client DescribeImportImageTasksAPIClient
+ params *DescribeImportImageTasksInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribeImportImageTasksPaginator returns a new
+// DescribeImportImageTasksPaginator
+func NewDescribeImportImageTasksPaginator(client DescribeImportImageTasksAPIClient, params *DescribeImportImageTasksInput, optFns ...func(*DescribeImportImageTasksPaginatorOptions)) *DescribeImportImageTasksPaginator {
+ if params == nil {
+ params = &DescribeImportImageTasksInput{}
+ }
+
+ options := DescribeImportImageTasksPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribeImportImageTasksPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribeImportImageTasksPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribeImportImageTasks page.
+func (p *DescribeImportImageTasksPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeImportImageTasksOutput, 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.DescribeImportImageTasks(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_opDescribeImportImageTasks(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeImportImageTasks",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeImportSnapshotTasks.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeImportSnapshotTasks.go
new file mode 100644
index 00000000..56d84118
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeImportSnapshotTasks.go
@@ -0,0 +1,228 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes your import snapshot tasks.
+func (c *Client) DescribeImportSnapshotTasks(ctx context.Context, params *DescribeImportSnapshotTasksInput, optFns ...func(*Options)) (*DescribeImportSnapshotTasksOutput, error) {
+ if params == nil {
+ params = &DescribeImportSnapshotTasksInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeImportSnapshotTasks", params, optFns, c.addOperationDescribeImportSnapshotTasksMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeImportSnapshotTasksOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeImportSnapshotTasksInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The filters.
+ Filters []types.Filter
+
+ // A list of import snapshot task IDs.
+ ImportTaskIds []string
+
+ // The maximum number of results to return in a single call. To retrieve the
+ // remaining results, make another call with the returned NextToken value.
+ MaxResults *int32
+
+ // A token that indicates the next page of results.
+ NextToken *string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeImportSnapshotTasksOutput struct {
+
+ // A list of zero or more import snapshot tasks that are currently active or were
+ // completed or canceled in the previous 7 days.
+ ImportSnapshotTasks []types.ImportSnapshotTask
+
+ // The token to use to get the next page of results. This value is null when there
+ // are no more results to return.
+ NextToken *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeImportSnapshotTasksMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeImportSnapshotTasks{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeImportSnapshotTasks{}, 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_opDescribeImportSnapshotTasks(options.Region), middleware.Before); 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
+}
+
+// DescribeImportSnapshotTasksAPIClient is a client that implements the
+// DescribeImportSnapshotTasks operation.
+type DescribeImportSnapshotTasksAPIClient interface {
+ DescribeImportSnapshotTasks(context.Context, *DescribeImportSnapshotTasksInput, ...func(*Options)) (*DescribeImportSnapshotTasksOutput, error)
+}
+
+var _ DescribeImportSnapshotTasksAPIClient = (*Client)(nil)
+
+// DescribeImportSnapshotTasksPaginatorOptions is the paginator options for
+// DescribeImportSnapshotTasks
+type DescribeImportSnapshotTasksPaginatorOptions struct {
+ // The maximum number of results to return in a single call. To retrieve the
+ // remaining results, make another call with the returned NextToken value.
+ 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
+}
+
+// DescribeImportSnapshotTasksPaginator is a paginator for
+// DescribeImportSnapshotTasks
+type DescribeImportSnapshotTasksPaginator struct {
+ options DescribeImportSnapshotTasksPaginatorOptions
+ client DescribeImportSnapshotTasksAPIClient
+ params *DescribeImportSnapshotTasksInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribeImportSnapshotTasksPaginator returns a new
+// DescribeImportSnapshotTasksPaginator
+func NewDescribeImportSnapshotTasksPaginator(client DescribeImportSnapshotTasksAPIClient, params *DescribeImportSnapshotTasksInput, optFns ...func(*DescribeImportSnapshotTasksPaginatorOptions)) *DescribeImportSnapshotTasksPaginator {
+ if params == nil {
+ params = &DescribeImportSnapshotTasksInput{}
+ }
+
+ options := DescribeImportSnapshotTasksPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribeImportSnapshotTasksPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribeImportSnapshotTasksPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribeImportSnapshotTasks page.
+func (p *DescribeImportSnapshotTasksPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeImportSnapshotTasksOutput, 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.DescribeImportSnapshotTasks(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_opDescribeImportSnapshotTasks(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeImportSnapshotTasks",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeInstanceAttribute.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeInstanceAttribute.go
new file mode 100644
index 00000000..fbb125a4
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeInstanceAttribute.go
@@ -0,0 +1,192 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes the specified attribute of the specified instance. You can specify
+// only one attribute at a time. Valid attribute values are: instanceType | kernel
+// | ramdisk | userData | disableApiTermination | instanceInitiatedShutdownBehavior
+// | rootDeviceName | blockDeviceMapping | productCodes | sourceDestCheck |
+// groupSet | ebsOptimized | sriovNetSupport
+func (c *Client) DescribeInstanceAttribute(ctx context.Context, params *DescribeInstanceAttributeInput, optFns ...func(*Options)) (*DescribeInstanceAttributeOutput, error) {
+ if params == nil {
+ params = &DescribeInstanceAttributeInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeInstanceAttribute", params, optFns, c.addOperationDescribeInstanceAttributeMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeInstanceAttributeOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeInstanceAttributeInput struct {
+
+ // The instance attribute. Note: The enaSupport attribute is not supported at this
+ // time.
+ //
+ // This member is required.
+ Attribute types.InstanceAttributeName
+
+ // The ID of the instance.
+ //
+ // This member is required.
+ InstanceId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+// Describes an instance attribute.
+type DescribeInstanceAttributeOutput struct {
+
+ // The block device mapping of the instance.
+ BlockDeviceMappings []types.InstanceBlockDeviceMapping
+
+ // If the value is true, you can't terminate the instance through the Amazon EC2
+ // console, CLI, or API; otherwise, you can.
+ DisableApiTermination *types.AttributeBooleanValue
+
+ // Indicates whether the instance is optimized for Amazon EBS I/O.
+ EbsOptimized *types.AttributeBooleanValue
+
+ // Indicates whether enhanced networking with ENA is enabled.
+ EnaSupport *types.AttributeBooleanValue
+
+ // To enable the instance for Amazon Web Services Nitro Enclaves, set this
+ // parameter to true; otherwise, set it to false.
+ EnclaveOptions *types.EnclaveOptions
+
+ // The security groups associated with the instance.
+ Groups []types.GroupIdentifier
+
+ // The ID of the instance.
+ InstanceId *string
+
+ // Indicates whether an instance stops or terminates when you initiate shutdown
+ // from the instance (using the operating system command for system shutdown).
+ InstanceInitiatedShutdownBehavior *types.AttributeValue
+
+ // The instance type.
+ InstanceType *types.AttributeValue
+
+ // The kernel ID.
+ KernelId *types.AttributeValue
+
+ // A list of product codes.
+ ProductCodes []types.ProductCode
+
+ // The RAM disk ID.
+ RamdiskId *types.AttributeValue
+
+ // The device name of the root device volume (for example, /dev/sda1).
+ RootDeviceName *types.AttributeValue
+
+ // Enable or disable source/destination checks, which ensure that the instance is
+ // either the source or the destination of any traffic that it receives. If the
+ // value is true, source/destination checks are enabled; otherwise, they are
+ // disabled. The default value is true. You must disable source/destination checks
+ // if the instance runs services such as network address translation, routing, or
+ // firewalls.
+ SourceDestCheck *types.AttributeBooleanValue
+
+ // Indicates whether enhanced networking with the Intel 82599 Virtual Function
+ // interface is enabled.
+ SriovNetSupport *types.AttributeValue
+
+ // The user data.
+ UserData *types.AttributeValue
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeInstanceAttributeMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeInstanceAttribute{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeInstanceAttribute{}, 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 = addOpDescribeInstanceAttributeValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeInstanceAttribute(options.Region), middleware.Before); 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_opDescribeInstanceAttribute(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeInstanceAttribute",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeInstanceCreditSpecifications.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeInstanceCreditSpecifications.go
new file mode 100644
index 00000000..b3e7c450
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeInstanceCreditSpecifications.go
@@ -0,0 +1,251 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes the credit option for CPU usage of the specified burstable performance
+// instances. The credit options are standard and unlimited. If you do not specify
+// an instance ID, Amazon EC2 returns burstable performance instances with the
+// unlimited credit option, as well as instances that were previously configured as
+// T2, T3, and T3a with the unlimited credit option. For example, if you resize a
+// T2 instance, while it is configured as unlimited, to an M4 instance, Amazon EC2
+// returns the M4 instance. If you specify one or more instance IDs, Amazon EC2
+// returns the credit option (standard or unlimited) of those instances. If you
+// specify an instance ID that is not valid, such as an instance that is not a
+// burstable performance instance, an error is returned. Recently terminated
+// instances might appear in the returned results. This interval is usually less
+// than one hour. If an Availability Zone is experiencing a service disruption and
+// you specify instance IDs in the affected zone, or do not specify any instance
+// IDs at all, the call fails. If you specify only instance IDs in an unaffected
+// zone, the call works normally. For more information, see Burstable performance
+// instances
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-performance-instances.html)
+// in the Amazon EC2 User Guide.
+func (c *Client) DescribeInstanceCreditSpecifications(ctx context.Context, params *DescribeInstanceCreditSpecificationsInput, optFns ...func(*Options)) (*DescribeInstanceCreditSpecificationsOutput, error) {
+ if params == nil {
+ params = &DescribeInstanceCreditSpecificationsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeInstanceCreditSpecifications", params, optFns, c.addOperationDescribeInstanceCreditSpecificationsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeInstanceCreditSpecificationsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeInstanceCreditSpecificationsInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The filters.
+ //
+ // * instance-id - The ID of the instance.
+ Filters []types.Filter
+
+ // The instance IDs. Default: Describes all your instances. Constraints: Maximum
+ // 1000 explicitly specified instance IDs.
+ InstanceIds []string
+
+ // The maximum number of results to return in a single call. To retrieve the
+ // remaining results, make another call with the returned NextToken value. This
+ // value can be between 5 and 1000. You cannot specify this parameter and the
+ // instance IDs parameter in the same call.
+ MaxResults *int32
+
+ // The token to retrieve the next page of results.
+ NextToken *string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeInstanceCreditSpecificationsOutput struct {
+
+ // Information about the credit option for CPU usage of an instance.
+ InstanceCreditSpecifications []types.InstanceCreditSpecification
+
+ // The token to use to retrieve the next page of results. This value is null when
+ // there are no more results to return.
+ NextToken *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeInstanceCreditSpecificationsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeInstanceCreditSpecifications{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeInstanceCreditSpecifications{}, 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_opDescribeInstanceCreditSpecifications(options.Region), middleware.Before); 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
+}
+
+// DescribeInstanceCreditSpecificationsAPIClient is a client that implements the
+// DescribeInstanceCreditSpecifications operation.
+type DescribeInstanceCreditSpecificationsAPIClient interface {
+ DescribeInstanceCreditSpecifications(context.Context, *DescribeInstanceCreditSpecificationsInput, ...func(*Options)) (*DescribeInstanceCreditSpecificationsOutput, error)
+}
+
+var _ DescribeInstanceCreditSpecificationsAPIClient = (*Client)(nil)
+
+// DescribeInstanceCreditSpecificationsPaginatorOptions is the paginator options
+// for DescribeInstanceCreditSpecifications
+type DescribeInstanceCreditSpecificationsPaginatorOptions struct {
+ // The maximum number of results to return in a single call. To retrieve the
+ // remaining results, make another call with the returned NextToken value. This
+ // value can be between 5 and 1000. You cannot specify this parameter and the
+ // instance IDs parameter in the same call.
+ 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
+}
+
+// DescribeInstanceCreditSpecificationsPaginator is a paginator for
+// DescribeInstanceCreditSpecifications
+type DescribeInstanceCreditSpecificationsPaginator struct {
+ options DescribeInstanceCreditSpecificationsPaginatorOptions
+ client DescribeInstanceCreditSpecificationsAPIClient
+ params *DescribeInstanceCreditSpecificationsInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribeInstanceCreditSpecificationsPaginator returns a new
+// DescribeInstanceCreditSpecificationsPaginator
+func NewDescribeInstanceCreditSpecificationsPaginator(client DescribeInstanceCreditSpecificationsAPIClient, params *DescribeInstanceCreditSpecificationsInput, optFns ...func(*DescribeInstanceCreditSpecificationsPaginatorOptions)) *DescribeInstanceCreditSpecificationsPaginator {
+ if params == nil {
+ params = &DescribeInstanceCreditSpecificationsInput{}
+ }
+
+ options := DescribeInstanceCreditSpecificationsPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribeInstanceCreditSpecificationsPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribeInstanceCreditSpecificationsPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribeInstanceCreditSpecifications page.
+func (p *DescribeInstanceCreditSpecificationsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeInstanceCreditSpecificationsOutput, 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.DescribeInstanceCreditSpecifications(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_opDescribeInstanceCreditSpecifications(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeInstanceCreditSpecifications",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeInstanceEventNotificationAttributes.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeInstanceEventNotificationAttributes.go
new file mode 100644
index 00000000..52f9a0eb
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeInstanceEventNotificationAttributes.go
@@ -0,0 +1,120 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes the tag keys that are registered to appear in scheduled event
+// notifications for resources in the current Region.
+func (c *Client) DescribeInstanceEventNotificationAttributes(ctx context.Context, params *DescribeInstanceEventNotificationAttributesInput, optFns ...func(*Options)) (*DescribeInstanceEventNotificationAttributesOutput, error) {
+ if params == nil {
+ params = &DescribeInstanceEventNotificationAttributesInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeInstanceEventNotificationAttributes", params, optFns, c.addOperationDescribeInstanceEventNotificationAttributesMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeInstanceEventNotificationAttributesOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeInstanceEventNotificationAttributesInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type DescribeInstanceEventNotificationAttributesOutput struct {
+
+ // Information about the registered tag keys.
+ InstanceTagAttribute *types.InstanceTagNotificationAttribute
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeInstanceEventNotificationAttributesMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeInstanceEventNotificationAttributes{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeInstanceEventNotificationAttributes{}, 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_opDescribeInstanceEventNotificationAttributes(options.Region), middleware.Before); 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_opDescribeInstanceEventNotificationAttributes(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeInstanceEventNotificationAttributes",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeInstanceEventWindows.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeInstanceEventWindows.go
new file mode 100644
index 00000000..47b13189
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeInstanceEventWindows.go
@@ -0,0 +1,274 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes the specified event windows or all event windows. If you specify event
+// window IDs, the output includes information for only the specified event
+// windows. If you specify filters, the output includes information for only those
+// event windows that meet the filter criteria. If you do not specify event windows
+// IDs or filters, the output includes information for all event windows, which can
+// affect performance. We recommend that you use pagination to ensure that the
+// operation returns quickly and successfully. For more information, see Define
+// event windows for scheduled events
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/event-windows.html) in the
+// Amazon EC2 User Guide.
+func (c *Client) DescribeInstanceEventWindows(ctx context.Context, params *DescribeInstanceEventWindowsInput, optFns ...func(*Options)) (*DescribeInstanceEventWindowsOutput, error) {
+ if params == nil {
+ params = &DescribeInstanceEventWindowsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeInstanceEventWindows", params, optFns, c.addOperationDescribeInstanceEventWindowsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeInstanceEventWindowsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+// Describe instance event windows by InstanceEventWindow.
+type DescribeInstanceEventWindowsInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // One or more filters.
+ //
+ // * dedicated-host-id - The event windows associated with
+ // the specified Dedicated Host ID.
+ //
+ // * event-window-name - The event windows
+ // associated with the specified names.
+ //
+ // * instance-id - The event windows
+ // associated with the specified instance ID.
+ //
+ // * instance-tag - The event windows
+ // associated with the specified tag and value.
+ //
+ // * instance-tag-key - The event
+ // windows associated with the specified tag key, regardless of the value.
+ //
+ // *
+ // instance-tag-value - The event windows associated with the specified tag value,
+ // regardless of the key.
+ //
+ // * tag: - The key/value combination of a tag assigned to
+ // the event window. Use the tag key in the filter name and the tag value as the
+ // filter value. For example, to find all resources that have a tag with the key
+ // Owner and the value CMX, specify tag:Owner for the filter name and CMX for the
+ // filter value.
+ //
+ // * tag-key - The key of a tag assigned to the event window. Use
+ // this filter to find all event windows that have a tag with a specific key,
+ // regardless of the tag value.
+ //
+ // * tag-value - The value of a tag assigned to the
+ // event window. Use this filter to find all event windows that have a tag with a
+ // specific value, regardless of the tag key.
+ Filters []types.Filter
+
+ // The IDs of the event windows.
+ InstanceEventWindowIds []string
+
+ // The maximum number of results to return in a single call. To retrieve the
+ // remaining results, make another call with the returned NextToken value. This
+ // value can be between 20 and 500. You cannot specify this parameter and the event
+ // window IDs parameter in the same call.
+ MaxResults *int32
+
+ // The token to request the next page of results.
+ NextToken *string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeInstanceEventWindowsOutput struct {
+
+ // Information about the event windows.
+ InstanceEventWindows []types.InstanceEventWindow
+
+ // The token to use to retrieve the next page of results. This value is null when
+ // there are no more results to return.
+ NextToken *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeInstanceEventWindowsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeInstanceEventWindows{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeInstanceEventWindows{}, 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_opDescribeInstanceEventWindows(options.Region), middleware.Before); 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
+}
+
+// DescribeInstanceEventWindowsAPIClient is a client that implements the
+// DescribeInstanceEventWindows operation.
+type DescribeInstanceEventWindowsAPIClient interface {
+ DescribeInstanceEventWindows(context.Context, *DescribeInstanceEventWindowsInput, ...func(*Options)) (*DescribeInstanceEventWindowsOutput, error)
+}
+
+var _ DescribeInstanceEventWindowsAPIClient = (*Client)(nil)
+
+// DescribeInstanceEventWindowsPaginatorOptions is the paginator options for
+// DescribeInstanceEventWindows
+type DescribeInstanceEventWindowsPaginatorOptions struct {
+ // The maximum number of results to return in a single call. To retrieve the
+ // remaining results, make another call with the returned NextToken value. This
+ // value can be between 20 and 500. You cannot specify this parameter and the event
+ // window IDs parameter in the same call.
+ 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
+}
+
+// DescribeInstanceEventWindowsPaginator is a paginator for
+// DescribeInstanceEventWindows
+type DescribeInstanceEventWindowsPaginator struct {
+ options DescribeInstanceEventWindowsPaginatorOptions
+ client DescribeInstanceEventWindowsAPIClient
+ params *DescribeInstanceEventWindowsInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribeInstanceEventWindowsPaginator returns a new
+// DescribeInstanceEventWindowsPaginator
+func NewDescribeInstanceEventWindowsPaginator(client DescribeInstanceEventWindowsAPIClient, params *DescribeInstanceEventWindowsInput, optFns ...func(*DescribeInstanceEventWindowsPaginatorOptions)) *DescribeInstanceEventWindowsPaginator {
+ if params == nil {
+ params = &DescribeInstanceEventWindowsInput{}
+ }
+
+ options := DescribeInstanceEventWindowsPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribeInstanceEventWindowsPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribeInstanceEventWindowsPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribeInstanceEventWindows page.
+func (p *DescribeInstanceEventWindowsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeInstanceEventWindowsOutput, 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.DescribeInstanceEventWindows(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_opDescribeInstanceEventWindows(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeInstanceEventWindows",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeInstanceStatus.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeInstanceStatus.go
new file mode 100644
index 00000000..e2651c7e
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeInstanceStatus.go
@@ -0,0 +1,656 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+import (
+ "context"
+ "errors"
+ "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/ec2/types"
+ smithy "github.com/aws/smithy-go"
+ "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"
+)
+
+// Describes the status of the specified instances or all of your instances. By
+// default, only running instances are described, unless you specifically indicate
+// to return the status of all instances. Instance status includes the following
+// components:
+//
+// * Status checks - Amazon EC2 performs status checks on running EC2
+// instances to identify hardware and software issues. For more information, see
+// Status checks for your instances
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/monitoring-system-instance-status-check.html)
+// and Troubleshooting instances with failed status checks
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/TroubleshootingInstances.html)
+// in the Amazon EC2 User Guide.
+//
+// * Scheduled events - Amazon EC2 can schedule
+// events (such as reboot, stop, or terminate) for your instances related to
+// hardware issues, software updates, or system maintenance. For more information,
+// see Scheduled events for your instances
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/monitoring-instances-status-check_sched.html)
+// in the Amazon EC2 User Guide.
+//
+// * Instance state - You can manage your instances
+// from the moment you launch them through their termination. For more information,
+// see Instance lifecycle
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-lifecycle.html)
+// in the Amazon EC2 User Guide.
+func (c *Client) DescribeInstanceStatus(ctx context.Context, params *DescribeInstanceStatusInput, optFns ...func(*Options)) (*DescribeInstanceStatusOutput, error) {
+ if params == nil {
+ params = &DescribeInstanceStatusInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeInstanceStatus", params, optFns, c.addOperationDescribeInstanceStatusMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeInstanceStatusOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeInstanceStatusInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The filters.
+ //
+ // * availability-zone - The Availability Zone of the instance.
+ //
+ // *
+ // event.code - The code for the scheduled event (instance-reboot | system-reboot |
+ // system-maintenance | instance-retirement | instance-stop).
+ //
+ // * event.description
+ // - A description of the event.
+ //
+ // * event.instance-event-id - The ID of the event
+ // whose date and time you are modifying.
+ //
+ // * event.not-after - The latest end time
+ // for the scheduled event (for example, 2014-09-15T17:15:20.000Z).
+ //
+ // *
+ // event.not-before - The earliest start time for the scheduled event (for example,
+ // 2014-09-15T17:15:20.000Z).
+ //
+ // * event.not-before-deadline - The deadline for
+ // starting the event (for example, 2014-09-15T17:15:20.000Z).
+ //
+ // *
+ // instance-state-code - The code for the instance state, as a 16-bit unsigned
+ // integer. The high byte is used for internal purposes and should be ignored. The
+ // low byte is set based on the state represented. The valid values are 0
+ // (pending), 16 (running), 32 (shutting-down), 48 (terminated), 64 (stopping), and
+ // 80 (stopped).
+ //
+ // * instance-state-name - The state of the instance (pending |
+ // running | shutting-down | terminated | stopping | stopped).
+ //
+ // *
+ // instance-status.reachability - Filters on instance status where the name is
+ // reachability (passed | failed | initializing | insufficient-data).
+ //
+ // *
+ // instance-status.status - The status of the instance (ok | impaired |
+ // initializing | insufficient-data | not-applicable).
+ //
+ // *
+ // system-status.reachability - Filters on system status where the name is
+ // reachability (passed | failed | initializing | insufficient-data).
+ //
+ // *
+ // system-status.status - The system status of the instance (ok | impaired |
+ // initializing | insufficient-data | not-applicable).
+ Filters []types.Filter
+
+ // When true, includes the health status for all instances. When false, includes
+ // the health status for running instances only. Default: false
+ IncludeAllInstances *bool
+
+ // The instance IDs. Default: Describes all your instances. Constraints: Maximum
+ // 100 explicitly specified instance IDs.
+ InstanceIds []string
+
+ // The maximum number of results to return in a single call. To retrieve the
+ // remaining results, make another call with the returned NextToken value. This
+ // value can be between 5 and 1000. You cannot specify this parameter and the
+ // instance IDs parameter in the same call.
+ MaxResults *int32
+
+ // The token to retrieve the next page of results.
+ NextToken *string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeInstanceStatusOutput struct {
+
+ // Information about the status of the instances.
+ InstanceStatuses []types.InstanceStatus
+
+ // The token to use to retrieve the next page of results. This value is null when
+ // there are no more results to return.
+ NextToken *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeInstanceStatusMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeInstanceStatus{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeInstanceStatus{}, 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_opDescribeInstanceStatus(options.Region), middleware.Before); 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
+}
+
+// DescribeInstanceStatusAPIClient is a client that implements the
+// DescribeInstanceStatus operation.
+type DescribeInstanceStatusAPIClient interface {
+ DescribeInstanceStatus(context.Context, *DescribeInstanceStatusInput, ...func(*Options)) (*DescribeInstanceStatusOutput, error)
+}
+
+var _ DescribeInstanceStatusAPIClient = (*Client)(nil)
+
+// DescribeInstanceStatusPaginatorOptions is the paginator options for
+// DescribeInstanceStatus
+type DescribeInstanceStatusPaginatorOptions struct {
+ // The maximum number of results to return in a single call. To retrieve the
+ // remaining results, make another call with the returned NextToken value. This
+ // value can be between 5 and 1000. You cannot specify this parameter and the
+ // instance IDs parameter in the same call.
+ 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
+}
+
+// DescribeInstanceStatusPaginator is a paginator for DescribeInstanceStatus
+type DescribeInstanceStatusPaginator struct {
+ options DescribeInstanceStatusPaginatorOptions
+ client DescribeInstanceStatusAPIClient
+ params *DescribeInstanceStatusInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribeInstanceStatusPaginator returns a new DescribeInstanceStatusPaginator
+func NewDescribeInstanceStatusPaginator(client DescribeInstanceStatusAPIClient, params *DescribeInstanceStatusInput, optFns ...func(*DescribeInstanceStatusPaginatorOptions)) *DescribeInstanceStatusPaginator {
+ if params == nil {
+ params = &DescribeInstanceStatusInput{}
+ }
+
+ options := DescribeInstanceStatusPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribeInstanceStatusPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribeInstanceStatusPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribeInstanceStatus page.
+func (p *DescribeInstanceStatusPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeInstanceStatusOutput, 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.DescribeInstanceStatus(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
+}
+
+// InstanceStatusOkWaiterOptions are waiter options for InstanceStatusOkWaiter
+type InstanceStatusOkWaiterOptions 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,
+ // InstanceStatusOkWaiter will use default minimum delay of 15 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, InstanceStatusOkWaiter 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, *DescribeInstanceStatusInput, *DescribeInstanceStatusOutput, error) (bool, error)
+}
+
+// InstanceStatusOkWaiter defines the waiters for InstanceStatusOk
+type InstanceStatusOkWaiter struct {
+ client DescribeInstanceStatusAPIClient
+
+ options InstanceStatusOkWaiterOptions
+}
+
+// NewInstanceStatusOkWaiter constructs a InstanceStatusOkWaiter.
+func NewInstanceStatusOkWaiter(client DescribeInstanceStatusAPIClient, optFns ...func(*InstanceStatusOkWaiterOptions)) *InstanceStatusOkWaiter {
+ options := InstanceStatusOkWaiterOptions{}
+ options.MinDelay = 15 * time.Second
+ options.MaxDelay = 120 * time.Second
+ options.Retryable = instanceStatusOkStateRetryable
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+ return &InstanceStatusOkWaiter{
+ client: client,
+ options: options,
+ }
+}
+
+// Wait calls the waiter function for InstanceStatusOk waiter. The maxWaitDur is
+// the maximum wait duration the waiter will wait. The maxWaitDur is required and
+// must be greater than zero.
+func (w *InstanceStatusOkWaiter) Wait(ctx context.Context, params *DescribeInstanceStatusInput, maxWaitDur time.Duration, optFns ...func(*InstanceStatusOkWaiterOptions)) error {
+ if maxWaitDur <= 0 {
+ return 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 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.DescribeInstanceStatus(ctx, params, func(o *Options) {
+ o.APIOptions = append(o.APIOptions, apiOptions...)
+ })
+
+ retryable, err := options.Retryable(ctx, params, out, err)
+ if err != nil {
+ return err
+ }
+ if !retryable {
+ return 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 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 fmt.Errorf("request cancelled while waiting, %w", err)
+ }
+ }
+ return fmt.Errorf("exceeded max wait time for InstanceStatusOk waiter")
+}
+
+func instanceStatusOkStateRetryable(ctx context.Context, input *DescribeInstanceStatusInput, output *DescribeInstanceStatusOutput, err error) (bool, error) {
+
+ if err == nil {
+ pathValue, err := jmespath.Search("InstanceStatuses[].InstanceStatus.Status", output)
+ if err != nil {
+ return false, fmt.Errorf("error evaluating waiter state: %w", err)
+ }
+
+ expectedValue := "ok"
+ var match = true
+ listOfValues, ok := pathValue.([]interface{})
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected list got %T", pathValue)
+ }
+
+ if len(listOfValues) == 0 {
+ match = false
+ }
+ for _, v := range listOfValues {
+ value, ok := v.(types.SummaryStatus)
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected types.SummaryStatus value, got %T", pathValue)
+ }
+
+ if string(value) != expectedValue {
+ match = false
+ }
+ }
+
+ if match {
+ return false, nil
+ }
+ }
+
+ if err != nil {
+ var apiErr smithy.APIError
+ ok := errors.As(err, &apiErr)
+ if !ok {
+ return false, fmt.Errorf("expected err to be of type smithy.APIError, got %w", err)
+ }
+
+ if "InvalidInstanceID.NotFound" == apiErr.ErrorCode() {
+ return true, nil
+ }
+ }
+
+ return true, nil
+}
+
+// SystemStatusOkWaiterOptions are waiter options for SystemStatusOkWaiter
+type SystemStatusOkWaiterOptions 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,
+ // SystemStatusOkWaiter will use default minimum delay of 15 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, SystemStatusOkWaiter 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, *DescribeInstanceStatusInput, *DescribeInstanceStatusOutput, error) (bool, error)
+}
+
+// SystemStatusOkWaiter defines the waiters for SystemStatusOk
+type SystemStatusOkWaiter struct {
+ client DescribeInstanceStatusAPIClient
+
+ options SystemStatusOkWaiterOptions
+}
+
+// NewSystemStatusOkWaiter constructs a SystemStatusOkWaiter.
+func NewSystemStatusOkWaiter(client DescribeInstanceStatusAPIClient, optFns ...func(*SystemStatusOkWaiterOptions)) *SystemStatusOkWaiter {
+ options := SystemStatusOkWaiterOptions{}
+ options.MinDelay = 15 * time.Second
+ options.MaxDelay = 120 * time.Second
+ options.Retryable = systemStatusOkStateRetryable
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+ return &SystemStatusOkWaiter{
+ client: client,
+ options: options,
+ }
+}
+
+// Wait calls the waiter function for SystemStatusOk waiter. The maxWaitDur is the
+// maximum wait duration the waiter will wait. The maxWaitDur is required and must
+// be greater than zero.
+func (w *SystemStatusOkWaiter) Wait(ctx context.Context, params *DescribeInstanceStatusInput, maxWaitDur time.Duration, optFns ...func(*SystemStatusOkWaiterOptions)) error {
+ if maxWaitDur <= 0 {
+ return 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 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.DescribeInstanceStatus(ctx, params, func(o *Options) {
+ o.APIOptions = append(o.APIOptions, apiOptions...)
+ })
+
+ retryable, err := options.Retryable(ctx, params, out, err)
+ if err != nil {
+ return err
+ }
+ if !retryable {
+ return 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 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 fmt.Errorf("request cancelled while waiting, %w", err)
+ }
+ }
+ return fmt.Errorf("exceeded max wait time for SystemStatusOk waiter")
+}
+
+func systemStatusOkStateRetryable(ctx context.Context, input *DescribeInstanceStatusInput, output *DescribeInstanceStatusOutput, err error) (bool, error) {
+
+ if err == nil {
+ pathValue, err := jmespath.Search("InstanceStatuses[].SystemStatus.Status", output)
+ if err != nil {
+ return false, fmt.Errorf("error evaluating waiter state: %w", err)
+ }
+
+ expectedValue := "ok"
+ var match = true
+ listOfValues, ok := pathValue.([]interface{})
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected list got %T", pathValue)
+ }
+
+ if len(listOfValues) == 0 {
+ match = false
+ }
+ for _, v := range listOfValues {
+ value, ok := v.(types.SummaryStatus)
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected types.SummaryStatus value, got %T", pathValue)
+ }
+
+ if string(value) != expectedValue {
+ match = false
+ }
+ }
+
+ if match {
+ return false, nil
+ }
+ }
+
+ return true, nil
+}
+
+func newServiceMetadataMiddleware_opDescribeInstanceStatus(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeInstanceStatus",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeInstanceTypeOfferings.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeInstanceTypeOfferings.go
new file mode 100644
index 00000000..739ee7d7
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeInstanceTypeOfferings.go
@@ -0,0 +1,238 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Returns a list of all instance types offered. The results can be filtered by
+// location (Region or Availability Zone). If no location is specified, the
+// instance types offered in the current Region are returned.
+func (c *Client) DescribeInstanceTypeOfferings(ctx context.Context, params *DescribeInstanceTypeOfferingsInput, optFns ...func(*Options)) (*DescribeInstanceTypeOfferingsOutput, error) {
+ if params == nil {
+ params = &DescribeInstanceTypeOfferingsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeInstanceTypeOfferings", params, optFns, c.addOperationDescribeInstanceTypeOfferingsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeInstanceTypeOfferingsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeInstanceTypeOfferingsInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // One or more filters. Filter names and values are case-sensitive.
+ //
+ // * location -
+ // This depends on the location type. For example, if the location type is region
+ // (default), the location is the Region code (for example, us-east-2.)
+ //
+ // *
+ // instance-type - The instance type. For example, c5.2xlarge.
+ Filters []types.Filter
+
+ // The location type.
+ LocationType types.LocationType
+
+ // The maximum number of results to return for the request in a single page. The
+ // remaining results can be seen by sending another request with the next token
+ // value.
+ MaxResults *int32
+
+ // The token to retrieve the next page of results.
+ NextToken *string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeInstanceTypeOfferingsOutput struct {
+
+ // The instance types offered.
+ InstanceTypeOfferings []types.InstanceTypeOffering
+
+ // The token to use to retrieve the next page of results. This value is null when
+ // there are no more results to return.
+ NextToken *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeInstanceTypeOfferingsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeInstanceTypeOfferings{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeInstanceTypeOfferings{}, 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_opDescribeInstanceTypeOfferings(options.Region), middleware.Before); 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
+}
+
+// DescribeInstanceTypeOfferingsAPIClient is a client that implements the
+// DescribeInstanceTypeOfferings operation.
+type DescribeInstanceTypeOfferingsAPIClient interface {
+ DescribeInstanceTypeOfferings(context.Context, *DescribeInstanceTypeOfferingsInput, ...func(*Options)) (*DescribeInstanceTypeOfferingsOutput, error)
+}
+
+var _ DescribeInstanceTypeOfferingsAPIClient = (*Client)(nil)
+
+// DescribeInstanceTypeOfferingsPaginatorOptions is the paginator options for
+// DescribeInstanceTypeOfferings
+type DescribeInstanceTypeOfferingsPaginatorOptions struct {
+ // The maximum number of results to return for the request in a single page. The
+ // remaining results can be seen by sending another request with the next token
+ // value.
+ 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
+}
+
+// DescribeInstanceTypeOfferingsPaginator is a paginator for
+// DescribeInstanceTypeOfferings
+type DescribeInstanceTypeOfferingsPaginator struct {
+ options DescribeInstanceTypeOfferingsPaginatorOptions
+ client DescribeInstanceTypeOfferingsAPIClient
+ params *DescribeInstanceTypeOfferingsInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribeInstanceTypeOfferingsPaginator returns a new
+// DescribeInstanceTypeOfferingsPaginator
+func NewDescribeInstanceTypeOfferingsPaginator(client DescribeInstanceTypeOfferingsAPIClient, params *DescribeInstanceTypeOfferingsInput, optFns ...func(*DescribeInstanceTypeOfferingsPaginatorOptions)) *DescribeInstanceTypeOfferingsPaginator {
+ if params == nil {
+ params = &DescribeInstanceTypeOfferingsInput{}
+ }
+
+ options := DescribeInstanceTypeOfferingsPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribeInstanceTypeOfferingsPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribeInstanceTypeOfferingsPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribeInstanceTypeOfferings page.
+func (p *DescribeInstanceTypeOfferingsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeInstanceTypeOfferingsOutput, 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.DescribeInstanceTypeOfferings(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_opDescribeInstanceTypeOfferings(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeInstanceTypeOfferings",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeInstanceTypes.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeInstanceTypes.go
new file mode 100644
index 00000000..5844d377
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeInstanceTypes.go
@@ -0,0 +1,386 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes the details of the instance types that are offered in a location. The
+// results can be filtered by the attributes of the instance types.
+func (c *Client) DescribeInstanceTypes(ctx context.Context, params *DescribeInstanceTypesInput, optFns ...func(*Options)) (*DescribeInstanceTypesOutput, error) {
+ if params == nil {
+ params = &DescribeInstanceTypesInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeInstanceTypes", params, optFns, c.addOperationDescribeInstanceTypesMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeInstanceTypesOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeInstanceTypesInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // One or more filters. Filter names and values are case-sensitive.
+ //
+ // *
+ // auto-recovery-supported - Indicates whether auto recovery is supported (true |
+ // false).
+ //
+ // * bare-metal - Indicates whether it is a bare metal instance type (true
+ // | false).
+ //
+ // * burstable-performance-supported - Indicates whether it is a
+ // burstable performance instance type (true | false).
+ //
+ // * current-generation -
+ // Indicates whether this instance type is the latest generation instance type of
+ // an instance family (true | false).
+ //
+ // *
+ // ebs-info.ebs-optimized-info.baseline-bandwidth-in-mbps - The baseline bandwidth
+ // performance for an EBS-optimized instance type, in Mbps.
+ //
+ // *
+ // ebs-info.ebs-optimized-info.baseline-iops - The baseline input/output storage
+ // operations per second for an EBS-optimized instance type.
+ //
+ // *
+ // ebs-info.ebs-optimized-info.baseline-throughput-in-mbps - The baseline
+ // throughput performance for an EBS-optimized instance type, in MB/s.
+ //
+ // *
+ // ebs-info.ebs-optimized-info.maximum-bandwidth-in-mbps - The maximum bandwidth
+ // performance for an EBS-optimized instance type, in Mbps.
+ //
+ // *
+ // ebs-info.ebs-optimized-info.maximum-iops - The maximum input/output storage
+ // operations per second for an EBS-optimized instance type.
+ //
+ // *
+ // ebs-info.ebs-optimized-info.maximum-throughput-in-mbps - The maximum throughput
+ // performance for an EBS-optimized instance type, in MB/s.
+ //
+ // *
+ // ebs-info.ebs-optimized-support - Indicates whether the instance type is
+ // EBS-optimized (supported | unsupported | default).
+ //
+ // *
+ // ebs-info.encryption-support - Indicates whether EBS encryption is supported
+ // (supported | unsupported).
+ //
+ // * ebs-info.nvme-support - Indicates whether
+ // non-volatile memory express (NVMe) is supported for EBS volumes (required |
+ // supported | unsupported).
+ //
+ // * free-tier-eligible - Indicates whether the instance
+ // type is eligible to use in the free tier (true | false).
+ //
+ // *
+ // hibernation-supported - Indicates whether On-Demand hibernation is supported
+ // (true | false).
+ //
+ // * hypervisor - The hypervisor (nitro | xen).
+ //
+ // *
+ // instance-storage-info.disk.count - The number of local disks.
+ //
+ // *
+ // instance-storage-info.disk.size-in-gb - The storage size of each instance
+ // storage disk, in GB.
+ //
+ // * instance-storage-info.disk.type - The storage technology
+ // for the local instance storage disks (hdd | ssd).
+ //
+ // *
+ // instance-storage-info.nvme-support - Indicates whether non-volatile memory
+ // express (NVMe) is supported for instance store (required | supported) |
+ // unsupported).
+ //
+ // * instance-storage-info.total-size-in-gb - The total amount of
+ // storage available from all local instance storage, in GB.
+ //
+ // *
+ // instance-storage-supported - Indicates whether the instance type has local
+ // instance storage (true | false).
+ //
+ // * instance-type - The instance type (for
+ // example c5.2xlarge or c5*).
+ //
+ // * memory-info.size-in-mib - The memory size.
+ //
+ // *
+ // network-info.efa-info.maximum-efa-interfaces - The maximum number of Elastic
+ // Fabric Adapters (EFAs) per instance.
+ //
+ // * network-info.efa-supported - Indicates
+ // whether the instance type supports Elastic Fabric Adapter (EFA) (true |
+ // false).
+ //
+ // * network-info.ena-support - Indicates whether Elastic Network Adapter
+ // (ENA) is supported or required (required | supported | unsupported).
+ //
+ // *
+ // network-info.encryption-in-transit-supported - Indicates whether the instance
+ // type automatically encrypts in-transit traffic between instances (true |
+ // false).
+ //
+ // * network-info.ipv4-addresses-per-interface - The maximum number of
+ // private IPv4 addresses per network interface.
+ //
+ // *
+ // network-info.ipv6-addresses-per-interface - The maximum number of private IPv6
+ // addresses per network interface.
+ //
+ // * network-info.ipv6-supported - Indicates
+ // whether the instance type supports IPv6 (true | false).
+ //
+ // *
+ // network-info.maximum-network-interfaces - The maximum number of network
+ // interfaces per instance.
+ //
+ // * network-info.network-performance - The network
+ // performance (for example, "25 Gigabit").
+ //
+ // *
+ // processor-info.supported-architecture - The CPU architecture (arm64 | i386 |
+ // x86_64).
+ //
+ // * processor-info.sustained-clock-speed-in-ghz - The CPU clock speed,
+ // in GHz.
+ //
+ // * supported-boot-mode - The boot mode (legacy-bios | uefi).
+ //
+ // *
+ // supported-root-device-type - The root device type (ebs | instance-store).
+ //
+ // *
+ // supported-usage-class - The usage class (on-demand | spot).
+ //
+ // *
+ // supported-virtualization-type - The virtualization type (hvm | paravirtual).
+ //
+ // *
+ // vcpu-info.default-cores - The default number of cores for the instance type.
+ //
+ // *
+ // vcpu-info.default-threads-per-core - The default number of threads per core for
+ // the instance type.
+ //
+ // * vcpu-info.default-vcpus - The default number of vCPUs for
+ // the instance type.
+ //
+ // * vcpu-info.valid-cores - The number of cores that can be
+ // configured for the instance type.
+ //
+ // * vcpu-info.valid-threads-per-core - The
+ // number of threads per core that can be configured for the instance type. For
+ // example, "1" or "1,2".
+ Filters []types.Filter
+
+ // The instance types. For more information, see Instance types
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html) in the
+ // Amazon EC2 User Guide.
+ InstanceTypes []types.InstanceType
+
+ // The maximum number of results to return for the request in a single page. The
+ // remaining results can be seen by sending another request with the next token
+ // value.
+ MaxResults *int32
+
+ // The token to retrieve the next page of results.
+ NextToken *string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeInstanceTypesOutput struct {
+
+ // The instance type. For more information, see Instance types
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html) in the
+ // Amazon EC2 User Guide.
+ InstanceTypes []types.InstanceTypeInfo
+
+ // The token to use to retrieve the next page of results. This value is null when
+ // there are no more results to return.
+ NextToken *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeInstanceTypesMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeInstanceTypes{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeInstanceTypes{}, 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_opDescribeInstanceTypes(options.Region), middleware.Before); 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
+}
+
+// DescribeInstanceTypesAPIClient is a client that implements the
+// DescribeInstanceTypes operation.
+type DescribeInstanceTypesAPIClient interface {
+ DescribeInstanceTypes(context.Context, *DescribeInstanceTypesInput, ...func(*Options)) (*DescribeInstanceTypesOutput, error)
+}
+
+var _ DescribeInstanceTypesAPIClient = (*Client)(nil)
+
+// DescribeInstanceTypesPaginatorOptions is the paginator options for
+// DescribeInstanceTypes
+type DescribeInstanceTypesPaginatorOptions struct {
+ // The maximum number of results to return for the request in a single page. The
+ // remaining results can be seen by sending another request with the next token
+ // value.
+ 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
+}
+
+// DescribeInstanceTypesPaginator is a paginator for DescribeInstanceTypes
+type DescribeInstanceTypesPaginator struct {
+ options DescribeInstanceTypesPaginatorOptions
+ client DescribeInstanceTypesAPIClient
+ params *DescribeInstanceTypesInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribeInstanceTypesPaginator returns a new DescribeInstanceTypesPaginator
+func NewDescribeInstanceTypesPaginator(client DescribeInstanceTypesAPIClient, params *DescribeInstanceTypesInput, optFns ...func(*DescribeInstanceTypesPaginatorOptions)) *DescribeInstanceTypesPaginator {
+ if params == nil {
+ params = &DescribeInstanceTypesInput{}
+ }
+
+ options := DescribeInstanceTypesPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribeInstanceTypesPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribeInstanceTypesPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribeInstanceTypes page.
+func (p *DescribeInstanceTypesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeInstanceTypesOutput, 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.DescribeInstanceTypes(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_opDescribeInstanceTypes(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeInstanceTypes",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeInstances.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeInstances.go
new file mode 100644
index 00000000..0f629f83
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeInstances.go
@@ -0,0 +1,1398 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+import (
+ "context"
+ "errors"
+ "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/ec2/types"
+ smithy "github.com/aws/smithy-go"
+ "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"
+ "strconv"
+ "time"
+)
+
+// Describes the specified instances or all instances. If you specify instance IDs,
+// the output includes information for only the specified instances. If you specify
+// filters, the output includes information for only those instances that meet the
+// filter criteria. If you do not specify instance IDs or filters, the output
+// includes information for all instances, which can affect performance. We
+// recommend that you use pagination to ensure that the operation returns quickly
+// and successfully. If you specify an instance ID that is not valid, an error is
+// returned. If you specify an instance that you do not own, it is not included in
+// the output. Recently terminated instances might appear in the returned results.
+// This interval is usually less than one hour. If you describe instances in the
+// rare case where an Availability Zone is experiencing a service disruption and
+// you specify instance IDs that are in the affected zone, or do not specify any
+// instance IDs at all, the call fails. If you describe instances and specify only
+// instance IDs that are in an unaffected zone, the call works normally.
+func (c *Client) DescribeInstances(ctx context.Context, params *DescribeInstancesInput, optFns ...func(*Options)) (*DescribeInstancesOutput, error) {
+ if params == nil {
+ params = &DescribeInstancesInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeInstances", params, optFns, c.addOperationDescribeInstancesMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeInstancesOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeInstancesInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The filters.
+ //
+ // * affinity - The affinity setting for an instance running on a
+ // Dedicated Host (default | host).
+ //
+ // * architecture - The instance architecture
+ // (i386 | x86_64 | arm64).
+ //
+ // * availability-zone - The Availability Zone of the
+ // instance.
+ //
+ // * block-device-mapping.attach-time - The attach time for an EBS
+ // volume mapped to the instance, for example, 2010-09-15T17:15:20.000Z.
+ //
+ // *
+ // block-device-mapping.delete-on-termination - A Boolean that indicates whether
+ // the EBS volume is deleted on instance termination.
+ //
+ // *
+ // block-device-mapping.device-name - The device name specified in the block device
+ // mapping (for example, /dev/sdh or xvdh).
+ //
+ // * block-device-mapping.status - The
+ // status for the EBS volume (attaching | attached | detaching | detached).
+ //
+ // *
+ // block-device-mapping.volume-id - The volume ID of the EBS volume.
+ //
+ // *
+ // client-token - The idempotency token you provided when you launched the
+ // instance.
+ //
+ // * dns-name - The public DNS name of the instance.
+ //
+ // * group-id - The
+ // ID of the security group for the instance. EC2-Classic only.
+ //
+ // * group-name - The
+ // name of the security group for the instance. EC2-Classic only.
+ //
+ // *
+ // hibernation-options.configured - A Boolean that indicates whether the instance
+ // is enabled for hibernation. A value of true means that the instance is enabled
+ // for hibernation.
+ //
+ // * host-id - The ID of the Dedicated Host on which the instance
+ // is running, if applicable.
+ //
+ // * hypervisor - The hypervisor type of the instance
+ // (ovm | xen). The value xen is used for both Xen and Nitro hypervisors.
+ //
+ // *
+ // iam-instance-profile.arn - The instance profile associated with the instance.
+ // Specified as an ARN.
+ //
+ // * image-id - The ID of the image used to launch the
+ // instance.
+ //
+ // * instance-id - The ID of the instance.
+ //
+ // * instance-lifecycle -
+ // Indicates whether this is a Spot Instance or a Scheduled Instance (spot |
+ // scheduled).
+ //
+ // * instance-state-code - The state of the instance, as a 16-bit
+ // unsigned integer. The high byte is used for internal purposes and should be
+ // ignored. The low byte is set based on the state represented. The valid values
+ // are: 0 (pending), 16 (running), 32 (shutting-down), 48 (terminated), 64
+ // (stopping), and 80 (stopped).
+ //
+ // * instance-state-name - The state of the instance
+ // (pending | running | shutting-down | terminated | stopping | stopped).
+ //
+ // *
+ // instance-type - The type of instance (for example, t2.micro).
+ //
+ // *
+ // instance.group-id - The ID of the security group for the instance.
+ //
+ // *
+ // instance.group-name - The name of the security group for the instance.
+ //
+ // *
+ // ip-address - The public IPv4 address of the instance.
+ //
+ // * kernel-id - The kernel
+ // ID.
+ //
+ // * key-name - The name of the key pair used when the instance was
+ // launched.
+ //
+ // * launch-index - When launching multiple instances, this is the index
+ // for the instance in the launch group (for example, 0, 1, 2, and so on).
+ //
+ // *
+ // launch-time - The time when the instance was launched.
+ //
+ // *
+ // metadata-options.http-tokens - The metadata request authorization state
+ // (optional | required)
+ //
+ // * metadata-options.http-put-response-hop-limit - The http
+ // metadata request put response hop limit (integer, possible values 1 to 64)
+ //
+ // *
+ // metadata-options.http-endpoint - Enable or disable metadata access on http
+ // endpoint (enabled | disabled)
+ //
+ // * monitoring-state - Indicates whether detailed
+ // monitoring is enabled (disabled | enabled).
+ //
+ // *
+ // network-interface.addresses.private-ip-address - The private IPv4 address
+ // associated with the network interface.
+ //
+ // * network-interface.addresses.primary -
+ // Specifies whether the IPv4 address of the network interface is the primary
+ // private IPv4 address.
+ //
+ // * network-interface.addresses.association.public-ip - The
+ // ID of the association of an Elastic IP address (IPv4) with a network
+ // interface.
+ //
+ // * network-interface.addresses.association.ip-owner-id - The owner ID
+ // of the private IPv4 address associated with the network interface.
+ //
+ // *
+ // network-interface.association.public-ip - The address of the Elastic IP address
+ // (IPv4) bound to the network interface.
+ //
+ // *
+ // network-interface.association.ip-owner-id - The owner of the Elastic IP address
+ // (IPv4) associated with the network interface.
+ //
+ // *
+ // network-interface.association.allocation-id - The allocation ID returned when
+ // you allocated the Elastic IP address (IPv4) for your network interface.
+ //
+ // *
+ // network-interface.association.association-id - The association ID returned when
+ // the network interface was associated with an IPv4 address.
+ //
+ // *
+ // network-interface.attachment.attachment-id - The ID of the interface
+ // attachment.
+ //
+ // * network-interface.attachment.instance-id - The ID of the instance
+ // to which the network interface is attached.
+ //
+ // *
+ // network-interface.attachment.instance-owner-id - The owner ID of the instance to
+ // which the network interface is attached.
+ //
+ // *
+ // network-interface.attachment.device-index - The device index to which the
+ // network interface is attached.
+ //
+ // * network-interface.attachment.status - The
+ // status of the attachment (attaching | attached | detaching | detached).
+ //
+ // *
+ // network-interface.attachment.attach-time - The time that the network interface
+ // was attached to an instance.
+ //
+ // *
+ // network-interface.attachment.delete-on-termination - Specifies whether the
+ // attachment is deleted when an instance is terminated.
+ //
+ // *
+ // network-interface.availability-zone - The Availability Zone for the network
+ // interface.
+ //
+ // * network-interface.description - The description of the network
+ // interface.
+ //
+ // * network-interface.group-id - The ID of a security group associated
+ // with the network interface.
+ //
+ // * network-interface.group-name - The name of a
+ // security group associated with the network interface.
+ //
+ // *
+ // network-interface.ipv6-addresses.ipv6-address - The IPv6 address associated with
+ // the network interface.
+ //
+ // * network-interface.mac-address - The MAC address of the
+ // network interface.
+ //
+ // * network-interface.network-interface-id - The ID of the
+ // network interface.
+ //
+ // * network-interface.owner-id - The ID of the owner of the
+ // network interface.
+ //
+ // * network-interface.private-dns-name - The private DNS name
+ // of the network interface.
+ //
+ // * network-interface.requester-id - The requester ID
+ // for the network interface.
+ //
+ // * network-interface.requester-managed - Indicates
+ // whether the network interface is being managed by Amazon Web Services.
+ //
+ // *
+ // network-interface.status - The status of the network interface (available) |
+ // in-use).
+ //
+ // * network-interface.source-dest-check - Whether the network interface
+ // performs source/destination checking. A value of true means that checking is
+ // enabled, and false means that checking is disabled. The value must be false for
+ // the network interface to perform network address translation (NAT) in your
+ // VPC.
+ //
+ // * network-interface.subnet-id - The ID of the subnet for the network
+ // interface.
+ //
+ // * network-interface.vpc-id - The ID of the VPC for the network
+ // interface.
+ //
+ // * outpost-arn - The Amazon Resource Name (ARN) of the Outpost.
+ //
+ // *
+ // owner-id - The Amazon Web Services account ID of the instance owner.
+ //
+ // *
+ // placement-group-name - The name of the placement group for the instance.
+ //
+ // *
+ // placement-partition-number - The partition in which the instance is located.
+ //
+ // *
+ // platform - The platform. To list only Windows instances, use windows.
+ //
+ // *
+ // private-dns-name - The private IPv4 DNS name of the instance.
+ //
+ // *
+ // private-ip-address - The private IPv4 address of the instance.
+ //
+ // * product-code -
+ // The product code associated with the AMI used to launch the instance.
+ //
+ // *
+ // product-code.type - The type of product code (devpay | marketplace).
+ //
+ // *
+ // ramdisk-id - The RAM disk ID.
+ //
+ // * reason - The reason for the current state of
+ // the instance (for example, shows "User Initiated [date]" when you stop or
+ // terminate the instance). Similar to the state-reason-code filter.
+ //
+ // *
+ // requester-id - The ID of the entity that launched the instance on your behalf
+ // (for example, Amazon Web Services Management Console, Auto Scaling, and so
+ // on).
+ //
+ // * reservation-id - The ID of the instance's reservation. A reservation ID
+ // is created any time you launch an instance. A reservation ID has a one-to-one
+ // relationship with an instance launch request, but can be associated with more
+ // than one instance if you launch multiple instances using the same launch
+ // request. For example, if you launch one instance, you get one reservation ID. If
+ // you launch ten instances using the same launch request, you also get one
+ // reservation ID.
+ //
+ // * root-device-name - The device name of the root device volume
+ // (for example, /dev/sda1).
+ //
+ // * root-device-type - The type of the root device
+ // volume (ebs | instance-store).
+ //
+ // * source-dest-check - Indicates whether the
+ // instance performs source/destination checking. A value of true means that
+ // checking is enabled, and false means that checking is disabled. The value must
+ // be false for the instance to perform network address translation (NAT) in your
+ // VPC.
+ //
+ // * spot-instance-request-id - The ID of the Spot Instance request.
+ //
+ // *
+ // state-reason-code - The reason code for the state change.
+ //
+ // *
+ // state-reason-message - A message that describes the state change.
+ //
+ // * subnet-id -
+ // The ID of the subnet for the instance.
+ //
+ // * tag: - The key/value combination of a
+ // tag assigned to the resource. Use the tag key in the filter name and the tag
+ // value as the filter value. For example, to find all resources that have a tag
+ // with the key Owner and the value TeamA, specify tag:Owner for the filter name
+ // and TeamA for the filter value.
+ //
+ // * tag-key - The key of a tag assigned to the
+ // resource. Use this filter to find all resources that have a tag with a specific
+ // key, regardless of the tag value.
+ //
+ // * tenancy - The tenancy of an instance
+ // (dedicated | default | host).
+ //
+ // * virtualization-type - The virtualization type
+ // of the instance (paravirtual | hvm).
+ //
+ // * vpc-id - The ID of the VPC that the
+ // instance is running in.
+ Filters []types.Filter
+
+ // The instance IDs. Default: Describes all your instances.
+ InstanceIds []string
+
+ // The maximum number of results to return in a single call. To retrieve the
+ // remaining results, make another call with the returned NextToken value. This
+ // value can be between 5 and 1000. You cannot specify this parameter and the
+ // instance IDs parameter in the same call.
+ MaxResults *int32
+
+ // The token to request the next page of results.
+ NextToken *string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeInstancesOutput struct {
+
+ // The token to use to retrieve the next page of results. This value is null when
+ // there are no more results to return.
+ NextToken *string
+
+ // Information about the reservations.
+ Reservations []types.Reservation
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeInstancesMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeInstances{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeInstances{}, 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_opDescribeInstances(options.Region), middleware.Before); 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
+}
+
+// DescribeInstancesAPIClient is a client that implements the DescribeInstances
+// operation.
+type DescribeInstancesAPIClient interface {
+ DescribeInstances(context.Context, *DescribeInstancesInput, ...func(*Options)) (*DescribeInstancesOutput, error)
+}
+
+var _ DescribeInstancesAPIClient = (*Client)(nil)
+
+// DescribeInstancesPaginatorOptions is the paginator options for DescribeInstances
+type DescribeInstancesPaginatorOptions struct {
+ // The maximum number of results to return in a single call. To retrieve the
+ // remaining results, make another call with the returned NextToken value. This
+ // value can be between 5 and 1000. You cannot specify this parameter and the
+ // instance IDs parameter in the same call.
+ 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
+}
+
+// DescribeInstancesPaginator is a paginator for DescribeInstances
+type DescribeInstancesPaginator struct {
+ options DescribeInstancesPaginatorOptions
+ client DescribeInstancesAPIClient
+ params *DescribeInstancesInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribeInstancesPaginator returns a new DescribeInstancesPaginator
+func NewDescribeInstancesPaginator(client DescribeInstancesAPIClient, params *DescribeInstancesInput, optFns ...func(*DescribeInstancesPaginatorOptions)) *DescribeInstancesPaginator {
+ if params == nil {
+ params = &DescribeInstancesInput{}
+ }
+
+ options := DescribeInstancesPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribeInstancesPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribeInstancesPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribeInstances page.
+func (p *DescribeInstancesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeInstancesOutput, 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.DescribeInstances(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
+}
+
+// InstanceExistsWaiterOptions are waiter options for InstanceExistsWaiter
+type InstanceExistsWaiterOptions 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,
+ // InstanceExistsWaiter will use default minimum delay of 5 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, InstanceExistsWaiter 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, *DescribeInstancesInput, *DescribeInstancesOutput, error) (bool, error)
+}
+
+// InstanceExistsWaiter defines the waiters for InstanceExists
+type InstanceExistsWaiter struct {
+ client DescribeInstancesAPIClient
+
+ options InstanceExistsWaiterOptions
+}
+
+// NewInstanceExistsWaiter constructs a InstanceExistsWaiter.
+func NewInstanceExistsWaiter(client DescribeInstancesAPIClient, optFns ...func(*InstanceExistsWaiterOptions)) *InstanceExistsWaiter {
+ options := InstanceExistsWaiterOptions{}
+ options.MinDelay = 5 * time.Second
+ options.MaxDelay = 120 * time.Second
+ options.Retryable = instanceExistsStateRetryable
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+ return &InstanceExistsWaiter{
+ client: client,
+ options: options,
+ }
+}
+
+// Wait calls the waiter function for InstanceExists waiter. The maxWaitDur is the
+// maximum wait duration the waiter will wait. The maxWaitDur is required and must
+// be greater than zero.
+func (w *InstanceExistsWaiter) Wait(ctx context.Context, params *DescribeInstancesInput, maxWaitDur time.Duration, optFns ...func(*InstanceExistsWaiterOptions)) error {
+ if maxWaitDur <= 0 {
+ return 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 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.DescribeInstances(ctx, params, func(o *Options) {
+ o.APIOptions = append(o.APIOptions, apiOptions...)
+ })
+
+ retryable, err := options.Retryable(ctx, params, out, err)
+ if err != nil {
+ return err
+ }
+ if !retryable {
+ return 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 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 fmt.Errorf("request cancelled while waiting, %w", err)
+ }
+ }
+ return fmt.Errorf("exceeded max wait time for InstanceExists waiter")
+}
+
+func instanceExistsStateRetryable(ctx context.Context, input *DescribeInstancesInput, output *DescribeInstancesOutput, err error) (bool, error) {
+
+ if err == nil {
+ pathValue, err := jmespath.Search("length(Reservations[]) > `0`", output)
+ if err != nil {
+ return false, fmt.Errorf("error evaluating waiter state: %w", err)
+ }
+
+ expectedValue := "true"
+ bv, err := strconv.ParseBool(expectedValue)
+ if err != nil {
+ return false, fmt.Errorf("error parsing boolean from string %w", err)
+ }
+ value, ok := pathValue.(bool)
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected bool value got %T", pathValue)
+ }
+
+ if value == bv {
+ return false, nil
+ }
+ }
+
+ if err != nil {
+ var apiErr smithy.APIError
+ ok := errors.As(err, &apiErr)
+ if !ok {
+ return false, fmt.Errorf("expected err to be of type smithy.APIError, got %w", err)
+ }
+
+ if "InvalidInstanceID.NotFound" == apiErr.ErrorCode() {
+ return true, nil
+ }
+ }
+
+ return true, nil
+}
+
+// InstanceRunningWaiterOptions are waiter options for InstanceRunningWaiter
+type InstanceRunningWaiterOptions 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,
+ // InstanceRunningWaiter will use default minimum delay of 15 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, InstanceRunningWaiter 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, *DescribeInstancesInput, *DescribeInstancesOutput, error) (bool, error)
+}
+
+// InstanceRunningWaiter defines the waiters for InstanceRunning
+type InstanceRunningWaiter struct {
+ client DescribeInstancesAPIClient
+
+ options InstanceRunningWaiterOptions
+}
+
+// NewInstanceRunningWaiter constructs a InstanceRunningWaiter.
+func NewInstanceRunningWaiter(client DescribeInstancesAPIClient, optFns ...func(*InstanceRunningWaiterOptions)) *InstanceRunningWaiter {
+ options := InstanceRunningWaiterOptions{}
+ options.MinDelay = 15 * time.Second
+ options.MaxDelay = 120 * time.Second
+ options.Retryable = instanceRunningStateRetryable
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+ return &InstanceRunningWaiter{
+ client: client,
+ options: options,
+ }
+}
+
+// Wait calls the waiter function for InstanceRunning waiter. The maxWaitDur is the
+// maximum wait duration the waiter will wait. The maxWaitDur is required and must
+// be greater than zero.
+func (w *InstanceRunningWaiter) Wait(ctx context.Context, params *DescribeInstancesInput, maxWaitDur time.Duration, optFns ...func(*InstanceRunningWaiterOptions)) error {
+ if maxWaitDur <= 0 {
+ return 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 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.DescribeInstances(ctx, params, func(o *Options) {
+ o.APIOptions = append(o.APIOptions, apiOptions...)
+ })
+
+ retryable, err := options.Retryable(ctx, params, out, err)
+ if err != nil {
+ return err
+ }
+ if !retryable {
+ return 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 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 fmt.Errorf("request cancelled while waiting, %w", err)
+ }
+ }
+ return fmt.Errorf("exceeded max wait time for InstanceRunning waiter")
+}
+
+func instanceRunningStateRetryable(ctx context.Context, input *DescribeInstancesInput, output *DescribeInstancesOutput, err error) (bool, error) {
+
+ if err == nil {
+ pathValue, err := jmespath.Search("Reservations[].Instances[].State.Name", output)
+ if err != nil {
+ return false, fmt.Errorf("error evaluating waiter state: %w", err)
+ }
+
+ expectedValue := "running"
+ var match = true
+ listOfValues, ok := pathValue.([]interface{})
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected list got %T", pathValue)
+ }
+
+ if len(listOfValues) == 0 {
+ match = false
+ }
+ for _, v := range listOfValues {
+ value, ok := v.(types.InstanceStateName)
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected types.InstanceStateName value, got %T", pathValue)
+ }
+
+ if string(value) != expectedValue {
+ match = false
+ }
+ }
+
+ if match {
+ return false, nil
+ }
+ }
+
+ if err == nil {
+ pathValue, err := jmespath.Search("Reservations[].Instances[].State.Name", output)
+ if err != nil {
+ return false, fmt.Errorf("error evaluating waiter state: %w", err)
+ }
+
+ expectedValue := "shutting-down"
+ listOfValues, ok := pathValue.([]interface{})
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected list got %T", pathValue)
+ }
+
+ for _, v := range listOfValues {
+ value, ok := v.(types.InstanceStateName)
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected types.InstanceStateName value, got %T", pathValue)
+ }
+
+ if string(value) == expectedValue {
+ return false, fmt.Errorf("waiter state transitioned to Failure")
+ }
+ }
+ }
+
+ if err == nil {
+ pathValue, err := jmespath.Search("Reservations[].Instances[].State.Name", output)
+ if err != nil {
+ return false, fmt.Errorf("error evaluating waiter state: %w", err)
+ }
+
+ expectedValue := "terminated"
+ listOfValues, ok := pathValue.([]interface{})
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected list got %T", pathValue)
+ }
+
+ for _, v := range listOfValues {
+ value, ok := v.(types.InstanceStateName)
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected types.InstanceStateName value, got %T", pathValue)
+ }
+
+ if string(value) == expectedValue {
+ return false, fmt.Errorf("waiter state transitioned to Failure")
+ }
+ }
+ }
+
+ if err == nil {
+ pathValue, err := jmespath.Search("Reservations[].Instances[].State.Name", output)
+ if err != nil {
+ return false, fmt.Errorf("error evaluating waiter state: %w", err)
+ }
+
+ expectedValue := "stopping"
+ listOfValues, ok := pathValue.([]interface{})
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected list got %T", pathValue)
+ }
+
+ for _, v := range listOfValues {
+ value, ok := v.(types.InstanceStateName)
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected types.InstanceStateName value, got %T", pathValue)
+ }
+
+ if string(value) == expectedValue {
+ return false, fmt.Errorf("waiter state transitioned to Failure")
+ }
+ }
+ }
+
+ if err != nil {
+ var apiErr smithy.APIError
+ ok := errors.As(err, &apiErr)
+ if !ok {
+ return false, fmt.Errorf("expected err to be of type smithy.APIError, got %w", err)
+ }
+
+ if "InvalidInstanceID.NotFound" == apiErr.ErrorCode() {
+ return true, nil
+ }
+ }
+
+ return true, nil
+}
+
+// InstanceStoppedWaiterOptions are waiter options for InstanceStoppedWaiter
+type InstanceStoppedWaiterOptions 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,
+ // InstanceStoppedWaiter will use default minimum delay of 15 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, InstanceStoppedWaiter 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, *DescribeInstancesInput, *DescribeInstancesOutput, error) (bool, error)
+}
+
+// InstanceStoppedWaiter defines the waiters for InstanceStopped
+type InstanceStoppedWaiter struct {
+ client DescribeInstancesAPIClient
+
+ options InstanceStoppedWaiterOptions
+}
+
+// NewInstanceStoppedWaiter constructs a InstanceStoppedWaiter.
+func NewInstanceStoppedWaiter(client DescribeInstancesAPIClient, optFns ...func(*InstanceStoppedWaiterOptions)) *InstanceStoppedWaiter {
+ options := InstanceStoppedWaiterOptions{}
+ options.MinDelay = 15 * time.Second
+ options.MaxDelay = 120 * time.Second
+ options.Retryable = instanceStoppedStateRetryable
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+ return &InstanceStoppedWaiter{
+ client: client,
+ options: options,
+ }
+}
+
+// Wait calls the waiter function for InstanceStopped waiter. The maxWaitDur is the
+// maximum wait duration the waiter will wait. The maxWaitDur is required and must
+// be greater than zero.
+func (w *InstanceStoppedWaiter) Wait(ctx context.Context, params *DescribeInstancesInput, maxWaitDur time.Duration, optFns ...func(*InstanceStoppedWaiterOptions)) error {
+ if maxWaitDur <= 0 {
+ return 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 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.DescribeInstances(ctx, params, func(o *Options) {
+ o.APIOptions = append(o.APIOptions, apiOptions...)
+ })
+
+ retryable, err := options.Retryable(ctx, params, out, err)
+ if err != nil {
+ return err
+ }
+ if !retryable {
+ return 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 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 fmt.Errorf("request cancelled while waiting, %w", err)
+ }
+ }
+ return fmt.Errorf("exceeded max wait time for InstanceStopped waiter")
+}
+
+func instanceStoppedStateRetryable(ctx context.Context, input *DescribeInstancesInput, output *DescribeInstancesOutput, err error) (bool, error) {
+
+ if err == nil {
+ pathValue, err := jmespath.Search("Reservations[].Instances[].State.Name", output)
+ if err != nil {
+ return false, fmt.Errorf("error evaluating waiter state: %w", err)
+ }
+
+ expectedValue := "stopped"
+ var match = true
+ listOfValues, ok := pathValue.([]interface{})
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected list got %T", pathValue)
+ }
+
+ if len(listOfValues) == 0 {
+ match = false
+ }
+ for _, v := range listOfValues {
+ value, ok := v.(types.InstanceStateName)
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected types.InstanceStateName value, got %T", pathValue)
+ }
+
+ if string(value) != expectedValue {
+ match = false
+ }
+ }
+
+ if match {
+ return false, nil
+ }
+ }
+
+ if err == nil {
+ pathValue, err := jmespath.Search("Reservations[].Instances[].State.Name", output)
+ if err != nil {
+ return false, fmt.Errorf("error evaluating waiter state: %w", err)
+ }
+
+ expectedValue := "pending"
+ listOfValues, ok := pathValue.([]interface{})
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected list got %T", pathValue)
+ }
+
+ for _, v := range listOfValues {
+ value, ok := v.(types.InstanceStateName)
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected types.InstanceStateName value, got %T", pathValue)
+ }
+
+ if string(value) == expectedValue {
+ return false, fmt.Errorf("waiter state transitioned to Failure")
+ }
+ }
+ }
+
+ if err == nil {
+ pathValue, err := jmespath.Search("Reservations[].Instances[].State.Name", output)
+ if err != nil {
+ return false, fmt.Errorf("error evaluating waiter state: %w", err)
+ }
+
+ expectedValue := "terminated"
+ listOfValues, ok := pathValue.([]interface{})
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected list got %T", pathValue)
+ }
+
+ for _, v := range listOfValues {
+ value, ok := v.(types.InstanceStateName)
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected types.InstanceStateName value, got %T", pathValue)
+ }
+
+ if string(value) == expectedValue {
+ return false, fmt.Errorf("waiter state transitioned to Failure")
+ }
+ }
+ }
+
+ return true, nil
+}
+
+// InstanceTerminatedWaiterOptions are waiter options for InstanceTerminatedWaiter
+type InstanceTerminatedWaiterOptions 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,
+ // InstanceTerminatedWaiter will use default minimum delay of 15 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, InstanceTerminatedWaiter 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, *DescribeInstancesInput, *DescribeInstancesOutput, error) (bool, error)
+}
+
+// InstanceTerminatedWaiter defines the waiters for InstanceTerminated
+type InstanceTerminatedWaiter struct {
+ client DescribeInstancesAPIClient
+
+ options InstanceTerminatedWaiterOptions
+}
+
+// NewInstanceTerminatedWaiter constructs a InstanceTerminatedWaiter.
+func NewInstanceTerminatedWaiter(client DescribeInstancesAPIClient, optFns ...func(*InstanceTerminatedWaiterOptions)) *InstanceTerminatedWaiter {
+ options := InstanceTerminatedWaiterOptions{}
+ options.MinDelay = 15 * time.Second
+ options.MaxDelay = 120 * time.Second
+ options.Retryable = instanceTerminatedStateRetryable
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+ return &InstanceTerminatedWaiter{
+ client: client,
+ options: options,
+ }
+}
+
+// Wait calls the waiter function for InstanceTerminated waiter. The maxWaitDur is
+// the maximum wait duration the waiter will wait. The maxWaitDur is required and
+// must be greater than zero.
+func (w *InstanceTerminatedWaiter) Wait(ctx context.Context, params *DescribeInstancesInput, maxWaitDur time.Duration, optFns ...func(*InstanceTerminatedWaiterOptions)) error {
+ if maxWaitDur <= 0 {
+ return 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 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.DescribeInstances(ctx, params, func(o *Options) {
+ o.APIOptions = append(o.APIOptions, apiOptions...)
+ })
+
+ retryable, err := options.Retryable(ctx, params, out, err)
+ if err != nil {
+ return err
+ }
+ if !retryable {
+ return 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 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 fmt.Errorf("request cancelled while waiting, %w", err)
+ }
+ }
+ return fmt.Errorf("exceeded max wait time for InstanceTerminated waiter")
+}
+
+func instanceTerminatedStateRetryable(ctx context.Context, input *DescribeInstancesInput, output *DescribeInstancesOutput, err error) (bool, error) {
+
+ if err == nil {
+ pathValue, err := jmespath.Search("Reservations[].Instances[].State.Name", output)
+ if err != nil {
+ return false, fmt.Errorf("error evaluating waiter state: %w", err)
+ }
+
+ expectedValue := "terminated"
+ var match = true
+ listOfValues, ok := pathValue.([]interface{})
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected list got %T", pathValue)
+ }
+
+ if len(listOfValues) == 0 {
+ match = false
+ }
+ for _, v := range listOfValues {
+ value, ok := v.(types.InstanceStateName)
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected types.InstanceStateName value, got %T", pathValue)
+ }
+
+ if string(value) != expectedValue {
+ match = false
+ }
+ }
+
+ if match {
+ return false, nil
+ }
+ }
+
+ if err == nil {
+ pathValue, err := jmespath.Search("Reservations[].Instances[].State.Name", output)
+ if err != nil {
+ return false, fmt.Errorf("error evaluating waiter state: %w", err)
+ }
+
+ expectedValue := "pending"
+ listOfValues, ok := pathValue.([]interface{})
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected list got %T", pathValue)
+ }
+
+ for _, v := range listOfValues {
+ value, ok := v.(types.InstanceStateName)
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected types.InstanceStateName value, got %T", pathValue)
+ }
+
+ if string(value) == expectedValue {
+ return false, fmt.Errorf("waiter state transitioned to Failure")
+ }
+ }
+ }
+
+ if err == nil {
+ pathValue, err := jmespath.Search("Reservations[].Instances[].State.Name", output)
+ if err != nil {
+ return false, fmt.Errorf("error evaluating waiter state: %w", err)
+ }
+
+ expectedValue := "stopping"
+ listOfValues, ok := pathValue.([]interface{})
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected list got %T", pathValue)
+ }
+
+ for _, v := range listOfValues {
+ value, ok := v.(types.InstanceStateName)
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected types.InstanceStateName value, got %T", pathValue)
+ }
+
+ if string(value) == expectedValue {
+ return false, fmt.Errorf("waiter state transitioned to Failure")
+ }
+ }
+ }
+
+ return true, nil
+}
+
+func newServiceMetadataMiddleware_opDescribeInstances(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeInstances",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeInternetGateways.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeInternetGateways.go
new file mode 100644
index 00000000..5309e65a
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeInternetGateways.go
@@ -0,0 +1,248 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes one or more of your internet gateways.
+func (c *Client) DescribeInternetGateways(ctx context.Context, params *DescribeInternetGatewaysInput, optFns ...func(*Options)) (*DescribeInternetGatewaysOutput, error) {
+ if params == nil {
+ params = &DescribeInternetGatewaysInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeInternetGateways", params, optFns, c.addOperationDescribeInternetGatewaysMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeInternetGatewaysOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeInternetGatewaysInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // One or more filters.
+ //
+ // * attachment.state - The current state of the attachment
+ // between the gateway and the VPC (available). Present only if a VPC is
+ // attached.
+ //
+ // * attachment.vpc-id - The ID of an attached VPC.
+ //
+ // *
+ // internet-gateway-id - The ID of the Internet gateway.
+ //
+ // * owner-id - The ID of
+ // the Amazon Web Services account that owns the internet gateway.
+ //
+ // * tag: - The
+ // key/value combination of a tag assigned to the resource. Use the tag key in the
+ // filter name and the tag value as the filter value. For example, to find all
+ // resources that have a tag with the key Owner and the value TeamA, specify
+ // tag:Owner for the filter name and TeamA for the filter value.
+ //
+ // * tag-key - The
+ // key of a tag assigned to the resource. Use this filter to find all resources
+ // assigned a tag with a specific key, regardless of the tag value.
+ Filters []types.Filter
+
+ // One or more internet gateway IDs. Default: Describes all your internet gateways.
+ InternetGatewayIds []string
+
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ MaxResults *int32
+
+ // The token for the next page of results.
+ NextToken *string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeInternetGatewaysOutput struct {
+
+ // Information about one or more internet gateways.
+ InternetGateways []types.InternetGateway
+
+ // The token to use to retrieve the next page of results. This value is null when
+ // there are no more results to return.
+ NextToken *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeInternetGatewaysMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeInternetGateways{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeInternetGateways{}, 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_opDescribeInternetGateways(options.Region), middleware.Before); 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
+}
+
+// DescribeInternetGatewaysAPIClient is a client that implements the
+// DescribeInternetGateways operation.
+type DescribeInternetGatewaysAPIClient interface {
+ DescribeInternetGateways(context.Context, *DescribeInternetGatewaysInput, ...func(*Options)) (*DescribeInternetGatewaysOutput, error)
+}
+
+var _ DescribeInternetGatewaysAPIClient = (*Client)(nil)
+
+// DescribeInternetGatewaysPaginatorOptions is the paginator options for
+// DescribeInternetGateways
+type DescribeInternetGatewaysPaginatorOptions struct {
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ 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
+}
+
+// DescribeInternetGatewaysPaginator is a paginator for DescribeInternetGateways
+type DescribeInternetGatewaysPaginator struct {
+ options DescribeInternetGatewaysPaginatorOptions
+ client DescribeInternetGatewaysAPIClient
+ params *DescribeInternetGatewaysInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribeInternetGatewaysPaginator returns a new
+// DescribeInternetGatewaysPaginator
+func NewDescribeInternetGatewaysPaginator(client DescribeInternetGatewaysAPIClient, params *DescribeInternetGatewaysInput, optFns ...func(*DescribeInternetGatewaysPaginatorOptions)) *DescribeInternetGatewaysPaginator {
+ if params == nil {
+ params = &DescribeInternetGatewaysInput{}
+ }
+
+ options := DescribeInternetGatewaysPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribeInternetGatewaysPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribeInternetGatewaysPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribeInternetGateways page.
+func (p *DescribeInternetGatewaysPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeInternetGatewaysOutput, 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.DescribeInternetGateways(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_opDescribeInternetGateways(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeInternetGateways",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeIpv6Pools.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeIpv6Pools.go
new file mode 100644
index 00000000..e3e714f1
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeIpv6Pools.go
@@ -0,0 +1,234 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes your IPv6 address pools.
+func (c *Client) DescribeIpv6Pools(ctx context.Context, params *DescribeIpv6PoolsInput, optFns ...func(*Options)) (*DescribeIpv6PoolsOutput, error) {
+ if params == nil {
+ params = &DescribeIpv6PoolsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeIpv6Pools", params, optFns, c.addOperationDescribeIpv6PoolsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeIpv6PoolsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeIpv6PoolsInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // One or more filters.
+ //
+ // * tag: - The key/value combination of a tag assigned to
+ // the resource. Use the tag key in the filter name and the tag value as the filter
+ // value. For example, to find all resources that have a tag with the key Owner and
+ // the value TeamA, specify tag:Owner for the filter name and TeamA for the filter
+ // value.
+ //
+ // * tag-key - The key of a tag assigned to the resource. Use this filter
+ // to find all resources assigned a tag with a specific key, regardless of the tag
+ // value.
+ Filters []types.Filter
+
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ MaxResults *int32
+
+ // The token for the next page of results.
+ NextToken *string
+
+ // The IDs of the IPv6 address pools.
+ PoolIds []string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeIpv6PoolsOutput struct {
+
+ // Information about the IPv6 address pools.
+ Ipv6Pools []types.Ipv6Pool
+
+ // The token to use to retrieve the next page of results. This value is null when
+ // there are no more results to return.
+ NextToken *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeIpv6PoolsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeIpv6Pools{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeIpv6Pools{}, 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_opDescribeIpv6Pools(options.Region), middleware.Before); 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
+}
+
+// DescribeIpv6PoolsAPIClient is a client that implements the DescribeIpv6Pools
+// operation.
+type DescribeIpv6PoolsAPIClient interface {
+ DescribeIpv6Pools(context.Context, *DescribeIpv6PoolsInput, ...func(*Options)) (*DescribeIpv6PoolsOutput, error)
+}
+
+var _ DescribeIpv6PoolsAPIClient = (*Client)(nil)
+
+// DescribeIpv6PoolsPaginatorOptions is the paginator options for DescribeIpv6Pools
+type DescribeIpv6PoolsPaginatorOptions struct {
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ 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
+}
+
+// DescribeIpv6PoolsPaginator is a paginator for DescribeIpv6Pools
+type DescribeIpv6PoolsPaginator struct {
+ options DescribeIpv6PoolsPaginatorOptions
+ client DescribeIpv6PoolsAPIClient
+ params *DescribeIpv6PoolsInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribeIpv6PoolsPaginator returns a new DescribeIpv6PoolsPaginator
+func NewDescribeIpv6PoolsPaginator(client DescribeIpv6PoolsAPIClient, params *DescribeIpv6PoolsInput, optFns ...func(*DescribeIpv6PoolsPaginatorOptions)) *DescribeIpv6PoolsPaginator {
+ if params == nil {
+ params = &DescribeIpv6PoolsInput{}
+ }
+
+ options := DescribeIpv6PoolsPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribeIpv6PoolsPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribeIpv6PoolsPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribeIpv6Pools page.
+func (p *DescribeIpv6PoolsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeIpv6PoolsOutput, 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.DescribeIpv6Pools(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_opDescribeIpv6Pools(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeIpv6Pools",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeKeyPairs.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeKeyPairs.go
new file mode 100644
index 00000000..73c2f381
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeKeyPairs.go
@@ -0,0 +1,331 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+import (
+ "context"
+ "errors"
+ "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/ec2/types"
+ smithy "github.com/aws/smithy-go"
+ "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"
+ "strconv"
+ "time"
+)
+
+// Describes the specified key pairs or all of your key pairs. For more information
+// about key pairs, see Amazon EC2 key pairs
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html) in the
+// Amazon Elastic Compute Cloud User Guide.
+func (c *Client) DescribeKeyPairs(ctx context.Context, params *DescribeKeyPairsInput, optFns ...func(*Options)) (*DescribeKeyPairsOutput, error) {
+ if params == nil {
+ params = &DescribeKeyPairsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeKeyPairs", params, optFns, c.addOperationDescribeKeyPairsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeKeyPairsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeKeyPairsInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The filters.
+ //
+ // * key-pair-id - The ID of the key pair.
+ //
+ // * fingerprint - The
+ // fingerprint of the key pair.
+ //
+ // * key-name - The name of the key pair.
+ //
+ // * tag-key
+ // - The key of a tag assigned to the resource. Use this filter to find all
+ // resources assigned a tag with a specific key, regardless of the tag value.
+ //
+ // *
+ // tag: - The key/value combination of a tag assigned to the resource. Use the tag
+ // key in the filter name and the tag value as the filter value. For example, to
+ // find all resources that have a tag with the key Owner and the value TeamA,
+ // specify tag:Owner for the filter name and TeamA for the filter value.
+ Filters []types.Filter
+
+ // The key pair names. Default: Describes all of your key pairs.
+ KeyNames []string
+
+ // The IDs of the key pairs.
+ KeyPairIds []string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeKeyPairsOutput struct {
+
+ // Information about the key pairs.
+ KeyPairs []types.KeyPairInfo
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeKeyPairsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeKeyPairs{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeKeyPairs{}, 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_opDescribeKeyPairs(options.Region), middleware.Before); 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
+}
+
+// DescribeKeyPairsAPIClient is a client that implements the DescribeKeyPairs
+// operation.
+type DescribeKeyPairsAPIClient interface {
+ DescribeKeyPairs(context.Context, *DescribeKeyPairsInput, ...func(*Options)) (*DescribeKeyPairsOutput, error)
+}
+
+var _ DescribeKeyPairsAPIClient = (*Client)(nil)
+
+// KeyPairExistsWaiterOptions are waiter options for KeyPairExistsWaiter
+type KeyPairExistsWaiterOptions 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,
+ // KeyPairExistsWaiter will use default minimum delay of 5 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, KeyPairExistsWaiter 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, *DescribeKeyPairsInput, *DescribeKeyPairsOutput, error) (bool, error)
+}
+
+// KeyPairExistsWaiter defines the waiters for KeyPairExists
+type KeyPairExistsWaiter struct {
+ client DescribeKeyPairsAPIClient
+
+ options KeyPairExistsWaiterOptions
+}
+
+// NewKeyPairExistsWaiter constructs a KeyPairExistsWaiter.
+func NewKeyPairExistsWaiter(client DescribeKeyPairsAPIClient, optFns ...func(*KeyPairExistsWaiterOptions)) *KeyPairExistsWaiter {
+ options := KeyPairExistsWaiterOptions{}
+ options.MinDelay = 5 * time.Second
+ options.MaxDelay = 120 * time.Second
+ options.Retryable = keyPairExistsStateRetryable
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+ return &KeyPairExistsWaiter{
+ client: client,
+ options: options,
+ }
+}
+
+// Wait calls the waiter function for KeyPairExists waiter. The maxWaitDur is the
+// maximum wait duration the waiter will wait. The maxWaitDur is required and must
+// be greater than zero.
+func (w *KeyPairExistsWaiter) Wait(ctx context.Context, params *DescribeKeyPairsInput, maxWaitDur time.Duration, optFns ...func(*KeyPairExistsWaiterOptions)) error {
+ if maxWaitDur <= 0 {
+ return 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 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.DescribeKeyPairs(ctx, params, func(o *Options) {
+ o.APIOptions = append(o.APIOptions, apiOptions...)
+ })
+
+ retryable, err := options.Retryable(ctx, params, out, err)
+ if err != nil {
+ return err
+ }
+ if !retryable {
+ return 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 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 fmt.Errorf("request cancelled while waiting, %w", err)
+ }
+ }
+ return fmt.Errorf("exceeded max wait time for KeyPairExists waiter")
+}
+
+func keyPairExistsStateRetryable(ctx context.Context, input *DescribeKeyPairsInput, output *DescribeKeyPairsOutput, err error) (bool, error) {
+
+ if err == nil {
+ pathValue, err := jmespath.Search("length(KeyPairs[].KeyName) > `0`", output)
+ if err != nil {
+ return false, fmt.Errorf("error evaluating waiter state: %w", err)
+ }
+
+ expectedValue := "true"
+ bv, err := strconv.ParseBool(expectedValue)
+ if err != nil {
+ return false, fmt.Errorf("error parsing boolean from string %w", err)
+ }
+ value, ok := pathValue.(bool)
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected bool value got %T", pathValue)
+ }
+
+ if value == bv {
+ return false, nil
+ }
+ }
+
+ if err != nil {
+ var apiErr smithy.APIError
+ ok := errors.As(err, &apiErr)
+ if !ok {
+ return false, fmt.Errorf("expected err to be of type smithy.APIError, got %w", err)
+ }
+
+ if "InvalidKeyPair.NotFound" == apiErr.ErrorCode() {
+ return true, nil
+ }
+ }
+
+ return true, nil
+}
+
+func newServiceMetadataMiddleware_opDescribeKeyPairs(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeKeyPairs",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeLaunchTemplateVersions.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeLaunchTemplateVersions.go
new file mode 100644
index 00000000..e1023be4
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeLaunchTemplateVersions.go
@@ -0,0 +1,279 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes one or more versions of a specified launch template. You can describe
+// all versions, individual versions, or a range of versions. You can also describe
+// all the latest versions or all the default versions of all the launch templates
+// in your account.
+func (c *Client) DescribeLaunchTemplateVersions(ctx context.Context, params *DescribeLaunchTemplateVersionsInput, optFns ...func(*Options)) (*DescribeLaunchTemplateVersionsOutput, error) {
+ if params == nil {
+ params = &DescribeLaunchTemplateVersionsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeLaunchTemplateVersions", params, optFns, c.addOperationDescribeLaunchTemplateVersionsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeLaunchTemplateVersionsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeLaunchTemplateVersionsInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // One or more filters.
+ //
+ // * create-time - The time the launch template version was
+ // created.
+ //
+ // * ebs-optimized - A boolean that indicates whether the instance is
+ // optimized for Amazon EBS I/O.
+ //
+ // * iam-instance-profile - The ARN of the IAM
+ // instance profile.
+ //
+ // * image-id - The ID of the AMI.
+ //
+ // * instance-type - The
+ // instance type.
+ //
+ // * is-default-version - A boolean that indicates whether the
+ // launch template version is the default version.
+ //
+ // * kernel-id - The kernel ID.
+ //
+ // *
+ // ram-disk-id - The RAM disk ID.
+ Filters []types.Filter
+
+ // The ID of the launch template. To describe one or more versions of a specified
+ // launch template, you must specify either the launch template ID or the launch
+ // template name in the request. To describe all the latest or default launch
+ // template versions in your account, you must omit this parameter.
+ LaunchTemplateId *string
+
+ // The name of the launch template. To describe one or more versions of a specified
+ // launch template, you must specify either the launch template ID or the launch
+ // template name in the request. To describe all the latest or default launch
+ // template versions in your account, you must omit this parameter.
+ LaunchTemplateName *string
+
+ // The maximum number of results to return in a single call. To retrieve the
+ // remaining results, make another call with the returned NextToken value. This
+ // value can be between 1 and 200.
+ MaxResults *int32
+
+ // The version number up to which to describe launch template versions.
+ MaxVersion *string
+
+ // The version number after which to describe launch template versions.
+ MinVersion *string
+
+ // The token to request the next page of results.
+ NextToken *string
+
+ // One or more versions of the launch template. Valid values depend on whether you
+ // are describing a specified launch template (by ID or name) or all launch
+ // templates in your account. To describe one or more versions of a specified
+ // launch template, valid values are $Latest, $Default, and numbers. To describe
+ // all launch templates in your account that are defined as the latest version, the
+ // valid value is $Latest. To describe all launch templates in your account that
+ // are defined as the default version, the valid value is $Default. You can specify
+ // $Latest and $Default in the same call. You cannot specify numbers.
+ Versions []string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeLaunchTemplateVersionsOutput struct {
+
+ // Information about the launch template versions.
+ LaunchTemplateVersions []types.LaunchTemplateVersion
+
+ // The token to use to retrieve the next page of results. This value is null when
+ // there are no more results to return.
+ NextToken *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeLaunchTemplateVersionsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeLaunchTemplateVersions{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeLaunchTemplateVersions{}, 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_opDescribeLaunchTemplateVersions(options.Region), middleware.Before); 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
+}
+
+// DescribeLaunchTemplateVersionsAPIClient is a client that implements the
+// DescribeLaunchTemplateVersions operation.
+type DescribeLaunchTemplateVersionsAPIClient interface {
+ DescribeLaunchTemplateVersions(context.Context, *DescribeLaunchTemplateVersionsInput, ...func(*Options)) (*DescribeLaunchTemplateVersionsOutput, error)
+}
+
+var _ DescribeLaunchTemplateVersionsAPIClient = (*Client)(nil)
+
+// DescribeLaunchTemplateVersionsPaginatorOptions is the paginator options for
+// DescribeLaunchTemplateVersions
+type DescribeLaunchTemplateVersionsPaginatorOptions struct {
+ // The maximum number of results to return in a single call. To retrieve the
+ // remaining results, make another call with the returned NextToken value. This
+ // value can be between 1 and 200.
+ 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
+}
+
+// DescribeLaunchTemplateVersionsPaginator is a paginator for
+// DescribeLaunchTemplateVersions
+type DescribeLaunchTemplateVersionsPaginator struct {
+ options DescribeLaunchTemplateVersionsPaginatorOptions
+ client DescribeLaunchTemplateVersionsAPIClient
+ params *DescribeLaunchTemplateVersionsInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribeLaunchTemplateVersionsPaginator returns a new
+// DescribeLaunchTemplateVersionsPaginator
+func NewDescribeLaunchTemplateVersionsPaginator(client DescribeLaunchTemplateVersionsAPIClient, params *DescribeLaunchTemplateVersionsInput, optFns ...func(*DescribeLaunchTemplateVersionsPaginatorOptions)) *DescribeLaunchTemplateVersionsPaginator {
+ if params == nil {
+ params = &DescribeLaunchTemplateVersionsInput{}
+ }
+
+ options := DescribeLaunchTemplateVersionsPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribeLaunchTemplateVersionsPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribeLaunchTemplateVersionsPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribeLaunchTemplateVersions page.
+func (p *DescribeLaunchTemplateVersionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeLaunchTemplateVersionsOutput, 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.DescribeLaunchTemplateVersions(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_opDescribeLaunchTemplateVersions(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeLaunchTemplateVersions",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeLaunchTemplates.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeLaunchTemplates.go
new file mode 100644
index 00000000..33e32470
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeLaunchTemplates.go
@@ -0,0 +1,246 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes one or more launch templates.
+func (c *Client) DescribeLaunchTemplates(ctx context.Context, params *DescribeLaunchTemplatesInput, optFns ...func(*Options)) (*DescribeLaunchTemplatesOutput, error) {
+ if params == nil {
+ params = &DescribeLaunchTemplatesInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeLaunchTemplates", params, optFns, c.addOperationDescribeLaunchTemplatesMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeLaunchTemplatesOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeLaunchTemplatesInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // One or more filters.
+ //
+ // * create-time - The time the launch template was
+ // created.
+ //
+ // * launch-template-name - The name of the launch template.
+ //
+ // * tag: -
+ // The key/value combination of a tag assigned to the resource. Use the tag key in
+ // the filter name and the tag value as the filter value. For example, to find all
+ // resources that have a tag with the key Owner and the value TeamA, specify
+ // tag:Owner for the filter name and TeamA for the filter value.
+ //
+ // * tag-key - The
+ // key of a tag assigned to the resource. Use this filter to find all resources
+ // assigned a tag with a specific key, regardless of the tag value.
+ Filters []types.Filter
+
+ // One or more launch template IDs.
+ LaunchTemplateIds []string
+
+ // One or more launch template names.
+ LaunchTemplateNames []string
+
+ // The maximum number of results to return in a single call. To retrieve the
+ // remaining results, make another call with the returned NextToken value. This
+ // value can be between 1 and 200.
+ MaxResults *int32
+
+ // The token to request the next page of results.
+ NextToken *string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeLaunchTemplatesOutput struct {
+
+ // Information about the launch templates.
+ LaunchTemplates []types.LaunchTemplate
+
+ // The token to use to retrieve the next page of results. This value is null when
+ // there are no more results to return.
+ NextToken *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeLaunchTemplatesMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeLaunchTemplates{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeLaunchTemplates{}, 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_opDescribeLaunchTemplates(options.Region), middleware.Before); 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
+}
+
+// DescribeLaunchTemplatesAPIClient is a client that implements the
+// DescribeLaunchTemplates operation.
+type DescribeLaunchTemplatesAPIClient interface {
+ DescribeLaunchTemplates(context.Context, *DescribeLaunchTemplatesInput, ...func(*Options)) (*DescribeLaunchTemplatesOutput, error)
+}
+
+var _ DescribeLaunchTemplatesAPIClient = (*Client)(nil)
+
+// DescribeLaunchTemplatesPaginatorOptions is the paginator options for
+// DescribeLaunchTemplates
+type DescribeLaunchTemplatesPaginatorOptions struct {
+ // The maximum number of results to return in a single call. To retrieve the
+ // remaining results, make another call with the returned NextToken value. This
+ // value can be between 1 and 200.
+ 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
+}
+
+// DescribeLaunchTemplatesPaginator is a paginator for DescribeLaunchTemplates
+type DescribeLaunchTemplatesPaginator struct {
+ options DescribeLaunchTemplatesPaginatorOptions
+ client DescribeLaunchTemplatesAPIClient
+ params *DescribeLaunchTemplatesInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribeLaunchTemplatesPaginator returns a new
+// DescribeLaunchTemplatesPaginator
+func NewDescribeLaunchTemplatesPaginator(client DescribeLaunchTemplatesAPIClient, params *DescribeLaunchTemplatesInput, optFns ...func(*DescribeLaunchTemplatesPaginatorOptions)) *DescribeLaunchTemplatesPaginator {
+ if params == nil {
+ params = &DescribeLaunchTemplatesInput{}
+ }
+
+ options := DescribeLaunchTemplatesPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribeLaunchTemplatesPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribeLaunchTemplatesPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribeLaunchTemplates page.
+func (p *DescribeLaunchTemplatesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeLaunchTemplatesOutput, 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.DescribeLaunchTemplates(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_opDescribeLaunchTemplates(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeLaunchTemplates",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociations.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociations.go
new file mode 100644
index 00000000..6d0ba025
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociations.go
@@ -0,0 +1,246 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes the associations between virtual interface groups and local gateway
+// route tables.
+func (c *Client) DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociations(ctx context.Context, params *DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsInput, optFns ...func(*Options)) (*DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsOutput, error) {
+ if params == nil {
+ params = &DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociations", params, optFns, c.addOperationDescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // One or more filters.
+ //
+ // * local-gateway-id - The ID of a local gateway.
+ //
+ // *
+ // local-gateway-route-table-id - The ID of the local gateway route table.
+ //
+ // *
+ // local-gateway-route-table-virtual-interface-group-association-id - The ID of the
+ // association.
+ //
+ // * local-gateway-route-table-virtual-interface-group-id - The ID of
+ // the virtual interface group.
+ //
+ // * state - The state of the association.
+ Filters []types.Filter
+
+ // The IDs of the associations.
+ LocalGatewayRouteTableVirtualInterfaceGroupAssociationIds []string
+
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ MaxResults *int32
+
+ // The token for the next page of results.
+ NextToken *string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsOutput struct {
+
+ // Information about the associations.
+ LocalGatewayRouteTableVirtualInterfaceGroupAssociations []types.LocalGatewayRouteTableVirtualInterfaceGroupAssociation
+
+ // The token to use to retrieve the next page of results. This value is null when
+ // there are no more results to return.
+ NextToken *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociations{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociations{}, 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_opDescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociations(options.Region), middleware.Before); 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
+}
+
+// DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsAPIClient is a
+// client that implements the
+// DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociations operation.
+type DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsAPIClient interface {
+ DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociations(context.Context, *DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsInput, ...func(*Options)) (*DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsOutput, error)
+}
+
+var _ DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsAPIClient = (*Client)(nil)
+
+// DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsPaginatorOptions
+// is the paginator options for
+// DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociations
+type DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsPaginatorOptions struct {
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ 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
+}
+
+// DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsPaginator is a
+// paginator for DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociations
+type DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsPaginator struct {
+ options DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsPaginatorOptions
+ client DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsAPIClient
+ params *DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsPaginator
+// returns a new
+// DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsPaginator
+func NewDescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsPaginator(client DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsAPIClient, params *DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsInput, optFns ...func(*DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsPaginatorOptions)) *DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsPaginator {
+ if params == nil {
+ params = &DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsInput{}
+ }
+
+ options := DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next
+// DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociations page.
+func (p *DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsOutput, 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.DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociations(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_opDescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociations(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociations",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeLocalGatewayRouteTableVpcAssociations.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeLocalGatewayRouteTableVpcAssociations.go
new file mode 100644
index 00000000..e5e22f48
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeLocalGatewayRouteTableVpcAssociations.go
@@ -0,0 +1,241 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes the specified associations between VPCs and local gateway route
+// tables.
+func (c *Client) DescribeLocalGatewayRouteTableVpcAssociations(ctx context.Context, params *DescribeLocalGatewayRouteTableVpcAssociationsInput, optFns ...func(*Options)) (*DescribeLocalGatewayRouteTableVpcAssociationsOutput, error) {
+ if params == nil {
+ params = &DescribeLocalGatewayRouteTableVpcAssociationsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeLocalGatewayRouteTableVpcAssociations", params, optFns, c.addOperationDescribeLocalGatewayRouteTableVpcAssociationsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeLocalGatewayRouteTableVpcAssociationsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeLocalGatewayRouteTableVpcAssociationsInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // One or more filters.
+ //
+ // * local-gateway-id - The ID of a local gateway.
+ //
+ // *
+ // local-gateway-route-table-id - The ID of the local gateway route table.
+ //
+ // *
+ // local-gateway-route-table-vpc-association-id - The ID of the association.
+ //
+ // *
+ // state - The state of the association.
+ //
+ // * vpc-id - The ID of the VPC.
+ Filters []types.Filter
+
+ // The IDs of the associations.
+ LocalGatewayRouteTableVpcAssociationIds []string
+
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ MaxResults *int32
+
+ // The token for the next page of results.
+ NextToken *string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeLocalGatewayRouteTableVpcAssociationsOutput struct {
+
+ // Information about the associations.
+ LocalGatewayRouteTableVpcAssociations []types.LocalGatewayRouteTableVpcAssociation
+
+ // The token to use to retrieve the next page of results. This value is null when
+ // there are no more results to return.
+ NextToken *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeLocalGatewayRouteTableVpcAssociationsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeLocalGatewayRouteTableVpcAssociations{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeLocalGatewayRouteTableVpcAssociations{}, 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_opDescribeLocalGatewayRouteTableVpcAssociations(options.Region), middleware.Before); 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
+}
+
+// DescribeLocalGatewayRouteTableVpcAssociationsAPIClient is a client that
+// implements the DescribeLocalGatewayRouteTableVpcAssociations operation.
+type DescribeLocalGatewayRouteTableVpcAssociationsAPIClient interface {
+ DescribeLocalGatewayRouteTableVpcAssociations(context.Context, *DescribeLocalGatewayRouteTableVpcAssociationsInput, ...func(*Options)) (*DescribeLocalGatewayRouteTableVpcAssociationsOutput, error)
+}
+
+var _ DescribeLocalGatewayRouteTableVpcAssociationsAPIClient = (*Client)(nil)
+
+// DescribeLocalGatewayRouteTableVpcAssociationsPaginatorOptions is the paginator
+// options for DescribeLocalGatewayRouteTableVpcAssociations
+type DescribeLocalGatewayRouteTableVpcAssociationsPaginatorOptions struct {
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ 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
+}
+
+// DescribeLocalGatewayRouteTableVpcAssociationsPaginator is a paginator for
+// DescribeLocalGatewayRouteTableVpcAssociations
+type DescribeLocalGatewayRouteTableVpcAssociationsPaginator struct {
+ options DescribeLocalGatewayRouteTableVpcAssociationsPaginatorOptions
+ client DescribeLocalGatewayRouteTableVpcAssociationsAPIClient
+ params *DescribeLocalGatewayRouteTableVpcAssociationsInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribeLocalGatewayRouteTableVpcAssociationsPaginator returns a new
+// DescribeLocalGatewayRouteTableVpcAssociationsPaginator
+func NewDescribeLocalGatewayRouteTableVpcAssociationsPaginator(client DescribeLocalGatewayRouteTableVpcAssociationsAPIClient, params *DescribeLocalGatewayRouteTableVpcAssociationsInput, optFns ...func(*DescribeLocalGatewayRouteTableVpcAssociationsPaginatorOptions)) *DescribeLocalGatewayRouteTableVpcAssociationsPaginator {
+ if params == nil {
+ params = &DescribeLocalGatewayRouteTableVpcAssociationsInput{}
+ }
+
+ options := DescribeLocalGatewayRouteTableVpcAssociationsPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribeLocalGatewayRouteTableVpcAssociationsPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribeLocalGatewayRouteTableVpcAssociationsPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribeLocalGatewayRouteTableVpcAssociations page.
+func (p *DescribeLocalGatewayRouteTableVpcAssociationsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeLocalGatewayRouteTableVpcAssociationsOutput, 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.DescribeLocalGatewayRouteTableVpcAssociations(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_opDescribeLocalGatewayRouteTableVpcAssociations(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeLocalGatewayRouteTableVpcAssociations",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeLocalGatewayRouteTables.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeLocalGatewayRouteTables.go
new file mode 100644
index 00000000..84fc2d94
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeLocalGatewayRouteTables.go
@@ -0,0 +1,239 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes one or more local gateway route tables. By default, all local gateway
+// route tables are described. Alternatively, you can filter the results.
+func (c *Client) DescribeLocalGatewayRouteTables(ctx context.Context, params *DescribeLocalGatewayRouteTablesInput, optFns ...func(*Options)) (*DescribeLocalGatewayRouteTablesOutput, error) {
+ if params == nil {
+ params = &DescribeLocalGatewayRouteTablesInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeLocalGatewayRouteTables", params, optFns, c.addOperationDescribeLocalGatewayRouteTablesMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeLocalGatewayRouteTablesOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeLocalGatewayRouteTablesInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // One or more filters.
+ //
+ // * local-gateway-id - The ID of a local gateway.
+ //
+ // *
+ // local-gateway-route-table-id - The ID of a local gateway route table.
+ //
+ // *
+ // outpost-arn - The Amazon Resource Name (ARN) of the Outpost.
+ //
+ // * state - The
+ // state of the local gateway route table.
+ Filters []types.Filter
+
+ // The IDs of the local gateway route tables.
+ LocalGatewayRouteTableIds []string
+
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ MaxResults *int32
+
+ // The token for the next page of results.
+ NextToken *string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeLocalGatewayRouteTablesOutput struct {
+
+ // Information about the local gateway route tables.
+ LocalGatewayRouteTables []types.LocalGatewayRouteTable
+
+ // The token to use to retrieve the next page of results. This value is null when
+ // there are no more results to return.
+ NextToken *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeLocalGatewayRouteTablesMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeLocalGatewayRouteTables{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeLocalGatewayRouteTables{}, 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_opDescribeLocalGatewayRouteTables(options.Region), middleware.Before); 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
+}
+
+// DescribeLocalGatewayRouteTablesAPIClient is a client that implements the
+// DescribeLocalGatewayRouteTables operation.
+type DescribeLocalGatewayRouteTablesAPIClient interface {
+ DescribeLocalGatewayRouteTables(context.Context, *DescribeLocalGatewayRouteTablesInput, ...func(*Options)) (*DescribeLocalGatewayRouteTablesOutput, error)
+}
+
+var _ DescribeLocalGatewayRouteTablesAPIClient = (*Client)(nil)
+
+// DescribeLocalGatewayRouteTablesPaginatorOptions is the paginator options for
+// DescribeLocalGatewayRouteTables
+type DescribeLocalGatewayRouteTablesPaginatorOptions struct {
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ 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
+}
+
+// DescribeLocalGatewayRouteTablesPaginator is a paginator for
+// DescribeLocalGatewayRouteTables
+type DescribeLocalGatewayRouteTablesPaginator struct {
+ options DescribeLocalGatewayRouteTablesPaginatorOptions
+ client DescribeLocalGatewayRouteTablesAPIClient
+ params *DescribeLocalGatewayRouteTablesInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribeLocalGatewayRouteTablesPaginator returns a new
+// DescribeLocalGatewayRouteTablesPaginator
+func NewDescribeLocalGatewayRouteTablesPaginator(client DescribeLocalGatewayRouteTablesAPIClient, params *DescribeLocalGatewayRouteTablesInput, optFns ...func(*DescribeLocalGatewayRouteTablesPaginatorOptions)) *DescribeLocalGatewayRouteTablesPaginator {
+ if params == nil {
+ params = &DescribeLocalGatewayRouteTablesInput{}
+ }
+
+ options := DescribeLocalGatewayRouteTablesPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribeLocalGatewayRouteTablesPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribeLocalGatewayRouteTablesPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribeLocalGatewayRouteTables page.
+func (p *DescribeLocalGatewayRouteTablesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeLocalGatewayRouteTablesOutput, 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.DescribeLocalGatewayRouteTables(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_opDescribeLocalGatewayRouteTables(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeLocalGatewayRouteTables",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeLocalGatewayVirtualInterfaceGroups.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeLocalGatewayVirtualInterfaceGroups.go
new file mode 100644
index 00000000..e6c7551f
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeLocalGatewayVirtualInterfaceGroups.go
@@ -0,0 +1,236 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes the specified local gateway virtual interface groups.
+func (c *Client) DescribeLocalGatewayVirtualInterfaceGroups(ctx context.Context, params *DescribeLocalGatewayVirtualInterfaceGroupsInput, optFns ...func(*Options)) (*DescribeLocalGatewayVirtualInterfaceGroupsOutput, error) {
+ if params == nil {
+ params = &DescribeLocalGatewayVirtualInterfaceGroupsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeLocalGatewayVirtualInterfaceGroups", params, optFns, c.addOperationDescribeLocalGatewayVirtualInterfaceGroupsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeLocalGatewayVirtualInterfaceGroupsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeLocalGatewayVirtualInterfaceGroupsInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // One or more filters.
+ //
+ // * local-gateway-id - The ID of a local gateway.
+ //
+ // *
+ // local-gateway-virtual-interface-id - The ID of the virtual interface.
+ //
+ // *
+ // local-gateway-virtual-interface-group-id - The ID of the virtual interface
+ // group.
+ Filters []types.Filter
+
+ // The IDs of the virtual interface groups.
+ LocalGatewayVirtualInterfaceGroupIds []string
+
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ MaxResults *int32
+
+ // The token for the next page of results.
+ NextToken *string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeLocalGatewayVirtualInterfaceGroupsOutput struct {
+
+ // The virtual interface groups.
+ LocalGatewayVirtualInterfaceGroups []types.LocalGatewayVirtualInterfaceGroup
+
+ // The token to use to retrieve the next page of results. This value is null when
+ // there are no more results to return.
+ NextToken *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeLocalGatewayVirtualInterfaceGroupsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeLocalGatewayVirtualInterfaceGroups{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeLocalGatewayVirtualInterfaceGroups{}, 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_opDescribeLocalGatewayVirtualInterfaceGroups(options.Region), middleware.Before); 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
+}
+
+// DescribeLocalGatewayVirtualInterfaceGroupsAPIClient is a client that implements
+// the DescribeLocalGatewayVirtualInterfaceGroups operation.
+type DescribeLocalGatewayVirtualInterfaceGroupsAPIClient interface {
+ DescribeLocalGatewayVirtualInterfaceGroups(context.Context, *DescribeLocalGatewayVirtualInterfaceGroupsInput, ...func(*Options)) (*DescribeLocalGatewayVirtualInterfaceGroupsOutput, error)
+}
+
+var _ DescribeLocalGatewayVirtualInterfaceGroupsAPIClient = (*Client)(nil)
+
+// DescribeLocalGatewayVirtualInterfaceGroupsPaginatorOptions is the paginator
+// options for DescribeLocalGatewayVirtualInterfaceGroups
+type DescribeLocalGatewayVirtualInterfaceGroupsPaginatorOptions struct {
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ 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
+}
+
+// DescribeLocalGatewayVirtualInterfaceGroupsPaginator is a paginator for
+// DescribeLocalGatewayVirtualInterfaceGroups
+type DescribeLocalGatewayVirtualInterfaceGroupsPaginator struct {
+ options DescribeLocalGatewayVirtualInterfaceGroupsPaginatorOptions
+ client DescribeLocalGatewayVirtualInterfaceGroupsAPIClient
+ params *DescribeLocalGatewayVirtualInterfaceGroupsInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribeLocalGatewayVirtualInterfaceGroupsPaginator returns a new
+// DescribeLocalGatewayVirtualInterfaceGroupsPaginator
+func NewDescribeLocalGatewayVirtualInterfaceGroupsPaginator(client DescribeLocalGatewayVirtualInterfaceGroupsAPIClient, params *DescribeLocalGatewayVirtualInterfaceGroupsInput, optFns ...func(*DescribeLocalGatewayVirtualInterfaceGroupsPaginatorOptions)) *DescribeLocalGatewayVirtualInterfaceGroupsPaginator {
+ if params == nil {
+ params = &DescribeLocalGatewayVirtualInterfaceGroupsInput{}
+ }
+
+ options := DescribeLocalGatewayVirtualInterfaceGroupsPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribeLocalGatewayVirtualInterfaceGroupsPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribeLocalGatewayVirtualInterfaceGroupsPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribeLocalGatewayVirtualInterfaceGroups page.
+func (p *DescribeLocalGatewayVirtualInterfaceGroupsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeLocalGatewayVirtualInterfaceGroupsOutput, 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.DescribeLocalGatewayVirtualInterfaceGroups(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_opDescribeLocalGatewayVirtualInterfaceGroups(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeLocalGatewayVirtualInterfaceGroups",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeLocalGatewayVirtualInterfaces.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeLocalGatewayVirtualInterfaces.go
new file mode 100644
index 00000000..43884477
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeLocalGatewayVirtualInterfaces.go
@@ -0,0 +1,227 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes the specified local gateway virtual interfaces.
+func (c *Client) DescribeLocalGatewayVirtualInterfaces(ctx context.Context, params *DescribeLocalGatewayVirtualInterfacesInput, optFns ...func(*Options)) (*DescribeLocalGatewayVirtualInterfacesOutput, error) {
+ if params == nil {
+ params = &DescribeLocalGatewayVirtualInterfacesInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeLocalGatewayVirtualInterfaces", params, optFns, c.addOperationDescribeLocalGatewayVirtualInterfacesMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeLocalGatewayVirtualInterfacesOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeLocalGatewayVirtualInterfacesInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // One or more filters.
+ Filters []types.Filter
+
+ // The IDs of the virtual interfaces.
+ LocalGatewayVirtualInterfaceIds []string
+
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ MaxResults *int32
+
+ // The token for the next page of results.
+ NextToken *string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeLocalGatewayVirtualInterfacesOutput struct {
+
+ // Information about the virtual interfaces.
+ LocalGatewayVirtualInterfaces []types.LocalGatewayVirtualInterface
+
+ // The token to use to retrieve the next page of results. This value is null when
+ // there are no more results to return.
+ NextToken *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeLocalGatewayVirtualInterfacesMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeLocalGatewayVirtualInterfaces{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeLocalGatewayVirtualInterfaces{}, 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_opDescribeLocalGatewayVirtualInterfaces(options.Region), middleware.Before); 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
+}
+
+// DescribeLocalGatewayVirtualInterfacesAPIClient is a client that implements the
+// DescribeLocalGatewayVirtualInterfaces operation.
+type DescribeLocalGatewayVirtualInterfacesAPIClient interface {
+ DescribeLocalGatewayVirtualInterfaces(context.Context, *DescribeLocalGatewayVirtualInterfacesInput, ...func(*Options)) (*DescribeLocalGatewayVirtualInterfacesOutput, error)
+}
+
+var _ DescribeLocalGatewayVirtualInterfacesAPIClient = (*Client)(nil)
+
+// DescribeLocalGatewayVirtualInterfacesPaginatorOptions is the paginator options
+// for DescribeLocalGatewayVirtualInterfaces
+type DescribeLocalGatewayVirtualInterfacesPaginatorOptions struct {
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ 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
+}
+
+// DescribeLocalGatewayVirtualInterfacesPaginator is a paginator for
+// DescribeLocalGatewayVirtualInterfaces
+type DescribeLocalGatewayVirtualInterfacesPaginator struct {
+ options DescribeLocalGatewayVirtualInterfacesPaginatorOptions
+ client DescribeLocalGatewayVirtualInterfacesAPIClient
+ params *DescribeLocalGatewayVirtualInterfacesInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribeLocalGatewayVirtualInterfacesPaginator returns a new
+// DescribeLocalGatewayVirtualInterfacesPaginator
+func NewDescribeLocalGatewayVirtualInterfacesPaginator(client DescribeLocalGatewayVirtualInterfacesAPIClient, params *DescribeLocalGatewayVirtualInterfacesInput, optFns ...func(*DescribeLocalGatewayVirtualInterfacesPaginatorOptions)) *DescribeLocalGatewayVirtualInterfacesPaginator {
+ if params == nil {
+ params = &DescribeLocalGatewayVirtualInterfacesInput{}
+ }
+
+ options := DescribeLocalGatewayVirtualInterfacesPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribeLocalGatewayVirtualInterfacesPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribeLocalGatewayVirtualInterfacesPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribeLocalGatewayVirtualInterfaces page.
+func (p *DescribeLocalGatewayVirtualInterfacesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeLocalGatewayVirtualInterfacesOutput, 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.DescribeLocalGatewayVirtualInterfaces(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_opDescribeLocalGatewayVirtualInterfaces(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeLocalGatewayVirtualInterfaces",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeLocalGateways.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeLocalGateways.go
new file mode 100644
index 00000000..8b7dd3d0
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeLocalGateways.go
@@ -0,0 +1,243 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes one or more local gateways. By default, all local gateways are
+// described. Alternatively, you can filter the results.
+func (c *Client) DescribeLocalGateways(ctx context.Context, params *DescribeLocalGatewaysInput, optFns ...func(*Options)) (*DescribeLocalGatewaysOutput, error) {
+ if params == nil {
+ params = &DescribeLocalGatewaysInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeLocalGateways", params, optFns, c.addOperationDescribeLocalGatewaysMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeLocalGatewaysOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeLocalGatewaysInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // One or more filters.
+ Filters []types.Filter
+
+ // One or more filters.
+ //
+ // * local-gateway-id - The ID of a local gateway.
+ //
+ // *
+ // local-gateway-route-table-id - The ID of the local gateway route table.
+ //
+ // *
+ // local-gateway-route-table-virtual-interface-group-association-id - The ID of the
+ // association.
+ //
+ // * local-gateway-route-table-virtual-interface-group-id - The ID of
+ // the virtual interface group.
+ //
+ // * outpost-arn - The Amazon Resource Name (ARN) of
+ // the Outpost.
+ //
+ // * state - The state of the association.
+ LocalGatewayIds []string
+
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ MaxResults *int32
+
+ // The token for the next page of results.
+ NextToken *string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeLocalGatewaysOutput struct {
+
+ // Information about the local gateways.
+ LocalGateways []types.LocalGateway
+
+ // The token to use to retrieve the next page of results. This value is null when
+ // there are no more results to return.
+ NextToken *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeLocalGatewaysMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeLocalGateways{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeLocalGateways{}, 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_opDescribeLocalGateways(options.Region), middleware.Before); 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
+}
+
+// DescribeLocalGatewaysAPIClient is a client that implements the
+// DescribeLocalGateways operation.
+type DescribeLocalGatewaysAPIClient interface {
+ DescribeLocalGateways(context.Context, *DescribeLocalGatewaysInput, ...func(*Options)) (*DescribeLocalGatewaysOutput, error)
+}
+
+var _ DescribeLocalGatewaysAPIClient = (*Client)(nil)
+
+// DescribeLocalGatewaysPaginatorOptions is the paginator options for
+// DescribeLocalGateways
+type DescribeLocalGatewaysPaginatorOptions struct {
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ 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
+}
+
+// DescribeLocalGatewaysPaginator is a paginator for DescribeLocalGateways
+type DescribeLocalGatewaysPaginator struct {
+ options DescribeLocalGatewaysPaginatorOptions
+ client DescribeLocalGatewaysAPIClient
+ params *DescribeLocalGatewaysInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribeLocalGatewaysPaginator returns a new DescribeLocalGatewaysPaginator
+func NewDescribeLocalGatewaysPaginator(client DescribeLocalGatewaysAPIClient, params *DescribeLocalGatewaysInput, optFns ...func(*DescribeLocalGatewaysPaginatorOptions)) *DescribeLocalGatewaysPaginator {
+ if params == nil {
+ params = &DescribeLocalGatewaysInput{}
+ }
+
+ options := DescribeLocalGatewaysPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribeLocalGatewaysPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribeLocalGatewaysPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribeLocalGateways page.
+func (p *DescribeLocalGatewaysPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeLocalGatewaysOutput, 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.DescribeLocalGateways(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_opDescribeLocalGateways(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeLocalGateways",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeManagedPrefixLists.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeManagedPrefixLists.go
new file mode 100644
index 00000000..02aab84a
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeManagedPrefixLists.go
@@ -0,0 +1,237 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes your managed prefix lists and any Amazon Web Services-managed prefix
+// lists. To view the entries for your prefix list, use
+// GetManagedPrefixListEntries.
+func (c *Client) DescribeManagedPrefixLists(ctx context.Context, params *DescribeManagedPrefixListsInput, optFns ...func(*Options)) (*DescribeManagedPrefixListsOutput, error) {
+ if params == nil {
+ params = &DescribeManagedPrefixListsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeManagedPrefixLists", params, optFns, c.addOperationDescribeManagedPrefixListsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeManagedPrefixListsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeManagedPrefixListsInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // One or more filters.
+ //
+ // * owner-id - The ID of the prefix list owner.
+ //
+ // *
+ // prefix-list-id - The ID of the prefix list.
+ //
+ // * prefix-list-name - The name of
+ // the prefix list.
+ Filters []types.Filter
+
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ MaxResults *int32
+
+ // The token for the next page of results.
+ NextToken *string
+
+ // One or more prefix list IDs.
+ PrefixListIds []string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeManagedPrefixListsOutput struct {
+
+ // The token to use to retrieve the next page of results. This value is null when
+ // there are no more results to return.
+ NextToken *string
+
+ // Information about the prefix lists.
+ PrefixLists []types.ManagedPrefixList
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeManagedPrefixListsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeManagedPrefixLists{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeManagedPrefixLists{}, 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_opDescribeManagedPrefixLists(options.Region), middleware.Before); 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
+}
+
+// DescribeManagedPrefixListsAPIClient is a client that implements the
+// DescribeManagedPrefixLists operation.
+type DescribeManagedPrefixListsAPIClient interface {
+ DescribeManagedPrefixLists(context.Context, *DescribeManagedPrefixListsInput, ...func(*Options)) (*DescribeManagedPrefixListsOutput, error)
+}
+
+var _ DescribeManagedPrefixListsAPIClient = (*Client)(nil)
+
+// DescribeManagedPrefixListsPaginatorOptions is the paginator options for
+// DescribeManagedPrefixLists
+type DescribeManagedPrefixListsPaginatorOptions struct {
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ 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
+}
+
+// DescribeManagedPrefixListsPaginator is a paginator for
+// DescribeManagedPrefixLists
+type DescribeManagedPrefixListsPaginator struct {
+ options DescribeManagedPrefixListsPaginatorOptions
+ client DescribeManagedPrefixListsAPIClient
+ params *DescribeManagedPrefixListsInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribeManagedPrefixListsPaginator returns a new
+// DescribeManagedPrefixListsPaginator
+func NewDescribeManagedPrefixListsPaginator(client DescribeManagedPrefixListsAPIClient, params *DescribeManagedPrefixListsInput, optFns ...func(*DescribeManagedPrefixListsPaginatorOptions)) *DescribeManagedPrefixListsPaginator {
+ if params == nil {
+ params = &DescribeManagedPrefixListsInput{}
+ }
+
+ options := DescribeManagedPrefixListsPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribeManagedPrefixListsPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribeManagedPrefixListsPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribeManagedPrefixLists page.
+func (p *DescribeManagedPrefixListsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeManagedPrefixListsOutput, 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.DescribeManagedPrefixLists(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_opDescribeManagedPrefixLists(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeManagedPrefixLists",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeMovingAddresses.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeMovingAddresses.go
new file mode 100644
index 00000000..9aae75c8
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeMovingAddresses.go
@@ -0,0 +1,238 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes your Elastic IP addresses that are being moved to the EC2-VPC
+// platform, or that are being restored to the EC2-Classic platform. This request
+// does not return information about any other Elastic IP addresses in your
+// account.
+func (c *Client) DescribeMovingAddresses(ctx context.Context, params *DescribeMovingAddressesInput, optFns ...func(*Options)) (*DescribeMovingAddressesOutput, error) {
+ if params == nil {
+ params = &DescribeMovingAddressesInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeMovingAddresses", params, optFns, c.addOperationDescribeMovingAddressesMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeMovingAddressesOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeMovingAddressesInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // One or more filters.
+ //
+ // * moving-status - The status of the Elastic IP address
+ // (MovingToVpc | RestoringToClassic).
+ Filters []types.Filter
+
+ // The maximum number of results to return for the request in a single page. The
+ // remaining results of the initial request can be seen by sending another request
+ // with the returned NextToken value. This value can be between 5 and 1000; if
+ // MaxResults is given a value outside of this range, an error is returned.
+ // Default: If no value is provided, the default is 1000.
+ MaxResults *int32
+
+ // The token for the next page of results.
+ NextToken *string
+
+ // One or more Elastic IP addresses.
+ PublicIps []string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeMovingAddressesOutput struct {
+
+ // The status for each Elastic IP address.
+ MovingAddressStatuses []types.MovingAddressStatus
+
+ // The token to use to retrieve the next page of results. This value is null when
+ // there are no more results to return.
+ NextToken *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeMovingAddressesMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeMovingAddresses{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeMovingAddresses{}, 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_opDescribeMovingAddresses(options.Region), middleware.Before); 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
+}
+
+// DescribeMovingAddressesAPIClient is a client that implements the
+// DescribeMovingAddresses operation.
+type DescribeMovingAddressesAPIClient interface {
+ DescribeMovingAddresses(context.Context, *DescribeMovingAddressesInput, ...func(*Options)) (*DescribeMovingAddressesOutput, error)
+}
+
+var _ DescribeMovingAddressesAPIClient = (*Client)(nil)
+
+// DescribeMovingAddressesPaginatorOptions is the paginator options for
+// DescribeMovingAddresses
+type DescribeMovingAddressesPaginatorOptions struct {
+ // The maximum number of results to return for the request in a single page. The
+ // remaining results of the initial request can be seen by sending another request
+ // with the returned NextToken value. This value can be between 5 and 1000; if
+ // MaxResults is given a value outside of this range, an error is returned.
+ // Default: If no value is provided, the default is 1000.
+ 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
+}
+
+// DescribeMovingAddressesPaginator is a paginator for DescribeMovingAddresses
+type DescribeMovingAddressesPaginator struct {
+ options DescribeMovingAddressesPaginatorOptions
+ client DescribeMovingAddressesAPIClient
+ params *DescribeMovingAddressesInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribeMovingAddressesPaginator returns a new
+// DescribeMovingAddressesPaginator
+func NewDescribeMovingAddressesPaginator(client DescribeMovingAddressesAPIClient, params *DescribeMovingAddressesInput, optFns ...func(*DescribeMovingAddressesPaginatorOptions)) *DescribeMovingAddressesPaginator {
+ if params == nil {
+ params = &DescribeMovingAddressesInput{}
+ }
+
+ options := DescribeMovingAddressesPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribeMovingAddressesPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribeMovingAddressesPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribeMovingAddresses page.
+func (p *DescribeMovingAddressesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeMovingAddressesOutput, 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.DescribeMovingAddresses(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_opDescribeMovingAddresses(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeMovingAddresses",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeNatGateways.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeNatGateways.go
new file mode 100644
index 00000000..b2561a2a
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeNatGateways.go
@@ -0,0 +1,503 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+import (
+ "context"
+ "errors"
+ "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/ec2/types"
+ smithy "github.com/aws/smithy-go"
+ "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"
+)
+
+// Describes one or more of your NAT gateways.
+func (c *Client) DescribeNatGateways(ctx context.Context, params *DescribeNatGatewaysInput, optFns ...func(*Options)) (*DescribeNatGatewaysOutput, error) {
+ if params == nil {
+ params = &DescribeNatGatewaysInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeNatGateways", params, optFns, c.addOperationDescribeNatGatewaysMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeNatGatewaysOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeNatGatewaysInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // One or more filters.
+ //
+ // * nat-gateway-id - The ID of the NAT gateway.
+ //
+ // * state -
+ // The state of the NAT gateway (pending | failed | available | deleting |
+ // deleted).
+ //
+ // * subnet-id - The ID of the subnet in which the NAT gateway
+ // resides.
+ //
+ // * tag: - The key/value combination of a tag assigned to the resource.
+ // Use the tag key in the filter name and the tag value as the filter value. For
+ // example, to find all resources that have a tag with the key Owner and the value
+ // TeamA, specify tag:Owner for the filter name and TeamA for the filter value.
+ //
+ // *
+ // tag-key - The key of a tag assigned to the resource. Use this filter to find all
+ // resources assigned a tag with a specific key, regardless of the tag value.
+ //
+ // *
+ // vpc-id - The ID of the VPC in which the NAT gateway resides.
+ Filter []types.Filter
+
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ MaxResults *int32
+
+ // One or more NAT gateway IDs.
+ NatGatewayIds []string
+
+ // The token for the next page of results.
+ NextToken *string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeNatGatewaysOutput struct {
+
+ // Information about the NAT gateways.
+ NatGateways []types.NatGateway
+
+ // The token to use to retrieve the next page of results. This value is null when
+ // there are no more results to return.
+ NextToken *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeNatGatewaysMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeNatGateways{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeNatGateways{}, 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_opDescribeNatGateways(options.Region), middleware.Before); 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
+}
+
+// DescribeNatGatewaysAPIClient is a client that implements the DescribeNatGateways
+// operation.
+type DescribeNatGatewaysAPIClient interface {
+ DescribeNatGateways(context.Context, *DescribeNatGatewaysInput, ...func(*Options)) (*DescribeNatGatewaysOutput, error)
+}
+
+var _ DescribeNatGatewaysAPIClient = (*Client)(nil)
+
+// DescribeNatGatewaysPaginatorOptions is the paginator options for
+// DescribeNatGateways
+type DescribeNatGatewaysPaginatorOptions struct {
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ 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
+}
+
+// DescribeNatGatewaysPaginator is a paginator for DescribeNatGateways
+type DescribeNatGatewaysPaginator struct {
+ options DescribeNatGatewaysPaginatorOptions
+ client DescribeNatGatewaysAPIClient
+ params *DescribeNatGatewaysInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribeNatGatewaysPaginator returns a new DescribeNatGatewaysPaginator
+func NewDescribeNatGatewaysPaginator(client DescribeNatGatewaysAPIClient, params *DescribeNatGatewaysInput, optFns ...func(*DescribeNatGatewaysPaginatorOptions)) *DescribeNatGatewaysPaginator {
+ if params == nil {
+ params = &DescribeNatGatewaysInput{}
+ }
+
+ options := DescribeNatGatewaysPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribeNatGatewaysPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribeNatGatewaysPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribeNatGateways page.
+func (p *DescribeNatGatewaysPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeNatGatewaysOutput, 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.DescribeNatGateways(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
+}
+
+// NatGatewayAvailableWaiterOptions are waiter options for
+// NatGatewayAvailableWaiter
+type NatGatewayAvailableWaiterOptions 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,
+ // NatGatewayAvailableWaiter will use default minimum delay of 15 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, NatGatewayAvailableWaiter 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, *DescribeNatGatewaysInput, *DescribeNatGatewaysOutput, error) (bool, error)
+}
+
+// NatGatewayAvailableWaiter defines the waiters for NatGatewayAvailable
+type NatGatewayAvailableWaiter struct {
+ client DescribeNatGatewaysAPIClient
+
+ options NatGatewayAvailableWaiterOptions
+}
+
+// NewNatGatewayAvailableWaiter constructs a NatGatewayAvailableWaiter.
+func NewNatGatewayAvailableWaiter(client DescribeNatGatewaysAPIClient, optFns ...func(*NatGatewayAvailableWaiterOptions)) *NatGatewayAvailableWaiter {
+ options := NatGatewayAvailableWaiterOptions{}
+ options.MinDelay = 15 * time.Second
+ options.MaxDelay = 120 * time.Second
+ options.Retryable = natGatewayAvailableStateRetryable
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+ return &NatGatewayAvailableWaiter{
+ client: client,
+ options: options,
+ }
+}
+
+// Wait calls the waiter function for NatGatewayAvailable waiter. The maxWaitDur is
+// the maximum wait duration the waiter will wait. The maxWaitDur is required and
+// must be greater than zero.
+func (w *NatGatewayAvailableWaiter) Wait(ctx context.Context, params *DescribeNatGatewaysInput, maxWaitDur time.Duration, optFns ...func(*NatGatewayAvailableWaiterOptions)) error {
+ if maxWaitDur <= 0 {
+ return 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 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.DescribeNatGateways(ctx, params, func(o *Options) {
+ o.APIOptions = append(o.APIOptions, apiOptions...)
+ })
+
+ retryable, err := options.Retryable(ctx, params, out, err)
+ if err != nil {
+ return err
+ }
+ if !retryable {
+ return 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 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 fmt.Errorf("request cancelled while waiting, %w", err)
+ }
+ }
+ return fmt.Errorf("exceeded max wait time for NatGatewayAvailable waiter")
+}
+
+func natGatewayAvailableStateRetryable(ctx context.Context, input *DescribeNatGatewaysInput, output *DescribeNatGatewaysOutput, err error) (bool, error) {
+
+ if err == nil {
+ pathValue, err := jmespath.Search("NatGateways[].State", output)
+ if err != nil {
+ return false, fmt.Errorf("error evaluating waiter state: %w", err)
+ }
+
+ expectedValue := "available"
+ var match = true
+ listOfValues, ok := pathValue.([]interface{})
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected list got %T", pathValue)
+ }
+
+ if len(listOfValues) == 0 {
+ match = false
+ }
+ for _, v := range listOfValues {
+ value, ok := v.(types.NatGatewayState)
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected types.NatGatewayState value, got %T", pathValue)
+ }
+
+ if string(value) != expectedValue {
+ match = false
+ }
+ }
+
+ if match {
+ return false, nil
+ }
+ }
+
+ if err == nil {
+ pathValue, err := jmespath.Search("NatGateways[].State", output)
+ if err != nil {
+ return false, fmt.Errorf("error evaluating waiter state: %w", err)
+ }
+
+ expectedValue := "failed"
+ listOfValues, ok := pathValue.([]interface{})
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected list got %T", pathValue)
+ }
+
+ for _, v := range listOfValues {
+ value, ok := v.(types.NatGatewayState)
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected types.NatGatewayState value, got %T", pathValue)
+ }
+
+ if string(value) == expectedValue {
+ return false, fmt.Errorf("waiter state transitioned to Failure")
+ }
+ }
+ }
+
+ if err == nil {
+ pathValue, err := jmespath.Search("NatGateways[].State", output)
+ if err != nil {
+ return false, fmt.Errorf("error evaluating waiter state: %w", err)
+ }
+
+ expectedValue := "deleting"
+ listOfValues, ok := pathValue.([]interface{})
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected list got %T", pathValue)
+ }
+
+ for _, v := range listOfValues {
+ value, ok := v.(types.NatGatewayState)
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected types.NatGatewayState value, got %T", pathValue)
+ }
+
+ if string(value) == expectedValue {
+ return false, fmt.Errorf("waiter state transitioned to Failure")
+ }
+ }
+ }
+
+ if err == nil {
+ pathValue, err := jmespath.Search("NatGateways[].State", output)
+ if err != nil {
+ return false, fmt.Errorf("error evaluating waiter state: %w", err)
+ }
+
+ expectedValue := "deleted"
+ listOfValues, ok := pathValue.([]interface{})
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected list got %T", pathValue)
+ }
+
+ for _, v := range listOfValues {
+ value, ok := v.(types.NatGatewayState)
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected types.NatGatewayState value, got %T", pathValue)
+ }
+
+ if string(value) == expectedValue {
+ return false, fmt.Errorf("waiter state transitioned to Failure")
+ }
+ }
+ }
+
+ if err != nil {
+ var apiErr smithy.APIError
+ ok := errors.As(err, &apiErr)
+ if !ok {
+ return false, fmt.Errorf("expected err to be of type smithy.APIError, got %w", err)
+ }
+
+ if "NatGatewayNotFound" == apiErr.ErrorCode() {
+ return true, nil
+ }
+ }
+
+ return true, nil
+}
+
+func newServiceMetadataMiddleware_opDescribeNatGateways(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeNatGateways",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeNetworkAcls.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeNetworkAcls.go
new file mode 100644
index 00000000..b825cc5b
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeNetworkAcls.go
@@ -0,0 +1,284 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes one or more of your network ACLs. For more information, see Network
+// ACLs (https://docs.aws.amazon.com/vpc/latest/userguide/VPC_ACLs.html) in the
+// Amazon Virtual Private Cloud User Guide.
+func (c *Client) DescribeNetworkAcls(ctx context.Context, params *DescribeNetworkAclsInput, optFns ...func(*Options)) (*DescribeNetworkAclsOutput, error) {
+ if params == nil {
+ params = &DescribeNetworkAclsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeNetworkAcls", params, optFns, c.addOperationDescribeNetworkAclsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeNetworkAclsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeNetworkAclsInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // One or more filters.
+ //
+ // * association.association-id - The ID of an association ID
+ // for the ACL.
+ //
+ // * association.network-acl-id - The ID of the network ACL involved
+ // in the association.
+ //
+ // * association.subnet-id - The ID of the subnet involved in
+ // the association.
+ //
+ // * default - Indicates whether the ACL is the default network
+ // ACL for the VPC.
+ //
+ // * entry.cidr - The IPv4 CIDR range specified in the entry.
+ //
+ // *
+ // entry.icmp.code - The ICMP code specified in the entry, if any.
+ //
+ // *
+ // entry.icmp.type - The ICMP type specified in the entry, if any.
+ //
+ // *
+ // entry.ipv6-cidr - The IPv6 CIDR range specified in the entry.
+ //
+ // *
+ // entry.port-range.from - The start of the port range specified in the entry.
+ //
+ // *
+ // entry.port-range.to - The end of the port range specified in the entry.
+ //
+ // *
+ // entry.protocol - The protocol specified in the entry (tcp | udp | icmp or a
+ // protocol number).
+ //
+ // * entry.rule-action - Allows or denies the matching traffic
+ // (allow | deny).
+ //
+ // * entry.rule-number - The number of an entry (in other words,
+ // rule) in the set of ACL entries.
+ //
+ // * network-acl-id - The ID of the network
+ // ACL.
+ //
+ // * owner-id - The ID of the Amazon Web Services account that owns the
+ // network ACL.
+ //
+ // * tag: - The key/value combination of a tag assigned to the
+ // resource. Use the tag key in the filter name and the tag value as the filter
+ // value. For example, to find all resources that have a tag with the key Owner and
+ // the value TeamA, specify tag:Owner for the filter name and TeamA for the filter
+ // value.
+ //
+ // * tag-key - The key of a tag assigned to the resource. Use this filter
+ // to find all resources assigned a tag with a specific key, regardless of the tag
+ // value.
+ //
+ // * vpc-id - The ID of the VPC for the network ACL.
+ Filters []types.Filter
+
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ MaxResults *int32
+
+ // One or more network ACL IDs. Default: Describes all your network ACLs.
+ NetworkAclIds []string
+
+ // The token for the next page of results.
+ NextToken *string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeNetworkAclsOutput struct {
+
+ // Information about one or more network ACLs.
+ NetworkAcls []types.NetworkAcl
+
+ // The token to use to retrieve the next page of results. This value is null when
+ // there are no more results to return.
+ NextToken *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeNetworkAclsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeNetworkAcls{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeNetworkAcls{}, 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_opDescribeNetworkAcls(options.Region), middleware.Before); 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
+}
+
+// DescribeNetworkAclsAPIClient is a client that implements the DescribeNetworkAcls
+// operation.
+type DescribeNetworkAclsAPIClient interface {
+ DescribeNetworkAcls(context.Context, *DescribeNetworkAclsInput, ...func(*Options)) (*DescribeNetworkAclsOutput, error)
+}
+
+var _ DescribeNetworkAclsAPIClient = (*Client)(nil)
+
+// DescribeNetworkAclsPaginatorOptions is the paginator options for
+// DescribeNetworkAcls
+type DescribeNetworkAclsPaginatorOptions struct {
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ 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
+}
+
+// DescribeNetworkAclsPaginator is a paginator for DescribeNetworkAcls
+type DescribeNetworkAclsPaginator struct {
+ options DescribeNetworkAclsPaginatorOptions
+ client DescribeNetworkAclsAPIClient
+ params *DescribeNetworkAclsInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribeNetworkAclsPaginator returns a new DescribeNetworkAclsPaginator
+func NewDescribeNetworkAclsPaginator(client DescribeNetworkAclsAPIClient, params *DescribeNetworkAclsInput, optFns ...func(*DescribeNetworkAclsPaginatorOptions)) *DescribeNetworkAclsPaginator {
+ if params == nil {
+ params = &DescribeNetworkAclsInput{}
+ }
+
+ options := DescribeNetworkAclsPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribeNetworkAclsPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribeNetworkAclsPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribeNetworkAcls page.
+func (p *DescribeNetworkAclsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeNetworkAclsOutput, 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.DescribeNetworkAcls(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_opDescribeNetworkAcls(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeNetworkAcls",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeNetworkInsightsAnalyses.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeNetworkInsightsAnalyses.go
new file mode 100644
index 00000000..d7fa1f9d
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeNetworkInsightsAnalyses.go
@@ -0,0 +1,244 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "time"
+)
+
+// Describes one or more of your network insights analyses.
+func (c *Client) DescribeNetworkInsightsAnalyses(ctx context.Context, params *DescribeNetworkInsightsAnalysesInput, optFns ...func(*Options)) (*DescribeNetworkInsightsAnalysesOutput, error) {
+ if params == nil {
+ params = &DescribeNetworkInsightsAnalysesInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeNetworkInsightsAnalyses", params, optFns, c.addOperationDescribeNetworkInsightsAnalysesMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeNetworkInsightsAnalysesOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeNetworkInsightsAnalysesInput struct {
+
+ // The time when the network insights analyses ended.
+ AnalysisEndTime *time.Time
+
+ // The time when the network insights analyses started.
+ AnalysisStartTime *time.Time
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The filters. The following are possible values:
+ //
+ // * PathFound - A Boolean value
+ // that indicates whether a feasible path is found.
+ //
+ // * Status - The status of the
+ // analysis (running | succeeded | failed).
+ Filters []types.Filter
+
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ MaxResults *int32
+
+ // The ID of the network insights analyses. You must specify either analysis IDs or
+ // a path ID.
+ NetworkInsightsAnalysisIds []string
+
+ // The ID of the path. You must specify either a path ID or analysis IDs.
+ NetworkInsightsPathId *string
+
+ // The token for the next page of results.
+ NextToken *string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeNetworkInsightsAnalysesOutput struct {
+
+ // Information about the network insights analyses.
+ NetworkInsightsAnalyses []types.NetworkInsightsAnalysis
+
+ // The token to use to retrieve the next page of results. This value is null when
+ // there are no more results to return.
+ NextToken *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeNetworkInsightsAnalysesMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeNetworkInsightsAnalyses{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeNetworkInsightsAnalyses{}, 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_opDescribeNetworkInsightsAnalyses(options.Region), middleware.Before); 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
+}
+
+// DescribeNetworkInsightsAnalysesAPIClient is a client that implements the
+// DescribeNetworkInsightsAnalyses operation.
+type DescribeNetworkInsightsAnalysesAPIClient interface {
+ DescribeNetworkInsightsAnalyses(context.Context, *DescribeNetworkInsightsAnalysesInput, ...func(*Options)) (*DescribeNetworkInsightsAnalysesOutput, error)
+}
+
+var _ DescribeNetworkInsightsAnalysesAPIClient = (*Client)(nil)
+
+// DescribeNetworkInsightsAnalysesPaginatorOptions is the paginator options for
+// DescribeNetworkInsightsAnalyses
+type DescribeNetworkInsightsAnalysesPaginatorOptions struct {
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ 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
+}
+
+// DescribeNetworkInsightsAnalysesPaginator is a paginator for
+// DescribeNetworkInsightsAnalyses
+type DescribeNetworkInsightsAnalysesPaginator struct {
+ options DescribeNetworkInsightsAnalysesPaginatorOptions
+ client DescribeNetworkInsightsAnalysesAPIClient
+ params *DescribeNetworkInsightsAnalysesInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribeNetworkInsightsAnalysesPaginator returns a new
+// DescribeNetworkInsightsAnalysesPaginator
+func NewDescribeNetworkInsightsAnalysesPaginator(client DescribeNetworkInsightsAnalysesAPIClient, params *DescribeNetworkInsightsAnalysesInput, optFns ...func(*DescribeNetworkInsightsAnalysesPaginatorOptions)) *DescribeNetworkInsightsAnalysesPaginator {
+ if params == nil {
+ params = &DescribeNetworkInsightsAnalysesInput{}
+ }
+
+ options := DescribeNetworkInsightsAnalysesPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribeNetworkInsightsAnalysesPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribeNetworkInsightsAnalysesPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribeNetworkInsightsAnalyses page.
+func (p *DescribeNetworkInsightsAnalysesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeNetworkInsightsAnalysesOutput, 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.DescribeNetworkInsightsAnalyses(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_opDescribeNetworkInsightsAnalyses(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeNetworkInsightsAnalyses",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeNetworkInsightsPaths.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeNetworkInsightsPaths.go
new file mode 100644
index 00000000..cadfed0c
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeNetworkInsightsPaths.go
@@ -0,0 +1,239 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes one or more of your paths.
+func (c *Client) DescribeNetworkInsightsPaths(ctx context.Context, params *DescribeNetworkInsightsPathsInput, optFns ...func(*Options)) (*DescribeNetworkInsightsPathsOutput, error) {
+ if params == nil {
+ params = &DescribeNetworkInsightsPathsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeNetworkInsightsPaths", params, optFns, c.addOperationDescribeNetworkInsightsPathsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeNetworkInsightsPathsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeNetworkInsightsPathsInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The filters. The following are possible values:
+ //
+ // * Destination - The ID of the
+ // resource.
+ //
+ // * DestinationPort - The destination port.
+ //
+ // * Name - The path name.
+ //
+ // *
+ // Protocol - The protocol.
+ //
+ // * Source - The ID of the resource.
+ Filters []types.Filter
+
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ MaxResults *int32
+
+ // The IDs of the paths.
+ NetworkInsightsPathIds []string
+
+ // The token for the next page of results.
+ NextToken *string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeNetworkInsightsPathsOutput struct {
+
+ // Information about the paths.
+ NetworkInsightsPaths []types.NetworkInsightsPath
+
+ // The token to use to retrieve the next page of results. This value is null when
+ // there are no more results to return.
+ NextToken *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeNetworkInsightsPathsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeNetworkInsightsPaths{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeNetworkInsightsPaths{}, 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_opDescribeNetworkInsightsPaths(options.Region), middleware.Before); 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
+}
+
+// DescribeNetworkInsightsPathsAPIClient is a client that implements the
+// DescribeNetworkInsightsPaths operation.
+type DescribeNetworkInsightsPathsAPIClient interface {
+ DescribeNetworkInsightsPaths(context.Context, *DescribeNetworkInsightsPathsInput, ...func(*Options)) (*DescribeNetworkInsightsPathsOutput, error)
+}
+
+var _ DescribeNetworkInsightsPathsAPIClient = (*Client)(nil)
+
+// DescribeNetworkInsightsPathsPaginatorOptions is the paginator options for
+// DescribeNetworkInsightsPaths
+type DescribeNetworkInsightsPathsPaginatorOptions struct {
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ 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
+}
+
+// DescribeNetworkInsightsPathsPaginator is a paginator for
+// DescribeNetworkInsightsPaths
+type DescribeNetworkInsightsPathsPaginator struct {
+ options DescribeNetworkInsightsPathsPaginatorOptions
+ client DescribeNetworkInsightsPathsAPIClient
+ params *DescribeNetworkInsightsPathsInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribeNetworkInsightsPathsPaginator returns a new
+// DescribeNetworkInsightsPathsPaginator
+func NewDescribeNetworkInsightsPathsPaginator(client DescribeNetworkInsightsPathsAPIClient, params *DescribeNetworkInsightsPathsInput, optFns ...func(*DescribeNetworkInsightsPathsPaginatorOptions)) *DescribeNetworkInsightsPathsPaginator {
+ if params == nil {
+ params = &DescribeNetworkInsightsPathsInput{}
+ }
+
+ options := DescribeNetworkInsightsPathsPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribeNetworkInsightsPathsPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribeNetworkInsightsPathsPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribeNetworkInsightsPaths page.
+func (p *DescribeNetworkInsightsPathsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeNetworkInsightsPathsOutput, 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.DescribeNetworkInsightsPaths(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_opDescribeNetworkInsightsPaths(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeNetworkInsightsPaths",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeNetworkInterfaceAttribute.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeNetworkInterfaceAttribute.go
new file mode 100644
index 00000000..e14e845e
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeNetworkInterfaceAttribute.go
@@ -0,0 +1,145 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes a network interface attribute. You can specify only one attribute at a
+// time.
+func (c *Client) DescribeNetworkInterfaceAttribute(ctx context.Context, params *DescribeNetworkInterfaceAttributeInput, optFns ...func(*Options)) (*DescribeNetworkInterfaceAttributeOutput, error) {
+ if params == nil {
+ params = &DescribeNetworkInterfaceAttributeInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeNetworkInterfaceAttribute", params, optFns, c.addOperationDescribeNetworkInterfaceAttributeMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeNetworkInterfaceAttributeOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+// Contains the parameters for DescribeNetworkInterfaceAttribute.
+type DescribeNetworkInterfaceAttributeInput struct {
+
+ // The ID of the network interface.
+ //
+ // This member is required.
+ NetworkInterfaceId *string
+
+ // The attribute of the network interface. This parameter is required.
+ Attribute types.NetworkInterfaceAttribute
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+// Contains the output of DescribeNetworkInterfaceAttribute.
+type DescribeNetworkInterfaceAttributeOutput struct {
+
+ // The attachment (if any) of the network interface.
+ Attachment *types.NetworkInterfaceAttachment
+
+ // The description of the network interface.
+ Description *types.AttributeValue
+
+ // The security groups associated with the network interface.
+ Groups []types.GroupIdentifier
+
+ // The ID of the network interface.
+ NetworkInterfaceId *string
+
+ // Indicates whether source/destination checking is enabled.
+ SourceDestCheck *types.AttributeBooleanValue
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeNetworkInterfaceAttributeMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeNetworkInterfaceAttribute{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeNetworkInterfaceAttribute{}, 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 = addOpDescribeNetworkInterfaceAttributeValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeNetworkInterfaceAttribute(options.Region), middleware.Before); 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_opDescribeNetworkInterfaceAttribute(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeNetworkInterfaceAttribute",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeNetworkInterfacePermissions.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeNetworkInterfacePermissions.go
new file mode 100644
index 00000000..da06300b
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeNetworkInterfacePermissions.go
@@ -0,0 +1,240 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes the permissions for your network interfaces.
+func (c *Client) DescribeNetworkInterfacePermissions(ctx context.Context, params *DescribeNetworkInterfacePermissionsInput, optFns ...func(*Options)) (*DescribeNetworkInterfacePermissionsOutput, error) {
+ if params == nil {
+ params = &DescribeNetworkInterfacePermissionsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeNetworkInterfacePermissions", params, optFns, c.addOperationDescribeNetworkInterfacePermissionsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeNetworkInterfacePermissionsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+// Contains the parameters for DescribeNetworkInterfacePermissions.
+type DescribeNetworkInterfacePermissionsInput struct {
+
+ // One or more filters.
+ //
+ // *
+ // network-interface-permission.network-interface-permission-id - The ID of the
+ // permission.
+ //
+ // * network-interface-permission.network-interface-id - The ID of the
+ // network interface.
+ //
+ // * network-interface-permission.aws-account-id - The Amazon
+ // Web Services account ID.
+ //
+ // * network-interface-permission.aws-service - The
+ // Amazon Web Service.
+ //
+ // * network-interface-permission.permission - The type of
+ // permission (INSTANCE-ATTACH | EIP-ASSOCIATE).
+ Filters []types.Filter
+
+ // The maximum number of results to return in a single call. To retrieve the
+ // remaining results, make another call with the returned NextToken value. If this
+ // parameter is not specified, up to 50 results are returned by default.
+ MaxResults *int32
+
+ // One or more network interface permission IDs.
+ NetworkInterfacePermissionIds []string
+
+ // The token to request the next page of results.
+ NextToken *string
+
+ noSmithyDocumentSerde
+}
+
+// Contains the output for DescribeNetworkInterfacePermissions.
+type DescribeNetworkInterfacePermissionsOutput struct {
+
+ // The network interface permissions.
+ NetworkInterfacePermissions []types.NetworkInterfacePermission
+
+ // The token to use to retrieve the next page of results.
+ NextToken *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeNetworkInterfacePermissionsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeNetworkInterfacePermissions{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeNetworkInterfacePermissions{}, 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_opDescribeNetworkInterfacePermissions(options.Region), middleware.Before); 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
+}
+
+// DescribeNetworkInterfacePermissionsAPIClient is a client that implements the
+// DescribeNetworkInterfacePermissions operation.
+type DescribeNetworkInterfacePermissionsAPIClient interface {
+ DescribeNetworkInterfacePermissions(context.Context, *DescribeNetworkInterfacePermissionsInput, ...func(*Options)) (*DescribeNetworkInterfacePermissionsOutput, error)
+}
+
+var _ DescribeNetworkInterfacePermissionsAPIClient = (*Client)(nil)
+
+// DescribeNetworkInterfacePermissionsPaginatorOptions is the paginator options for
+// DescribeNetworkInterfacePermissions
+type DescribeNetworkInterfacePermissionsPaginatorOptions struct {
+ // The maximum number of results to return in a single call. To retrieve the
+ // remaining results, make another call with the returned NextToken value. If this
+ // parameter is not specified, up to 50 results are returned by default.
+ 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
+}
+
+// DescribeNetworkInterfacePermissionsPaginator is a paginator for
+// DescribeNetworkInterfacePermissions
+type DescribeNetworkInterfacePermissionsPaginator struct {
+ options DescribeNetworkInterfacePermissionsPaginatorOptions
+ client DescribeNetworkInterfacePermissionsAPIClient
+ params *DescribeNetworkInterfacePermissionsInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribeNetworkInterfacePermissionsPaginator returns a new
+// DescribeNetworkInterfacePermissionsPaginator
+func NewDescribeNetworkInterfacePermissionsPaginator(client DescribeNetworkInterfacePermissionsAPIClient, params *DescribeNetworkInterfacePermissionsInput, optFns ...func(*DescribeNetworkInterfacePermissionsPaginatorOptions)) *DescribeNetworkInterfacePermissionsPaginator {
+ if params == nil {
+ params = &DescribeNetworkInterfacePermissionsInput{}
+ }
+
+ options := DescribeNetworkInterfacePermissionsPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribeNetworkInterfacePermissionsPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribeNetworkInterfacePermissionsPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribeNetworkInterfacePermissions page.
+func (p *DescribeNetworkInterfacePermissionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeNetworkInterfacePermissionsOutput, 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.DescribeNetworkInterfacePermissions(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_opDescribeNetworkInterfacePermissions(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeNetworkInterfacePermissions",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeNetworkInterfaces.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeNetworkInterfaces.go
new file mode 100644
index 00000000..59fc1ac9
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeNetworkInterfaces.go
@@ -0,0 +1,537 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+import (
+ "context"
+ "errors"
+ "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/ec2/types"
+ smithy "github.com/aws/smithy-go"
+ "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"
+)
+
+// Describes one or more of your network interfaces.
+func (c *Client) DescribeNetworkInterfaces(ctx context.Context, params *DescribeNetworkInterfacesInput, optFns ...func(*Options)) (*DescribeNetworkInterfacesOutput, error) {
+ if params == nil {
+ params = &DescribeNetworkInterfacesInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeNetworkInterfaces", params, optFns, c.addOperationDescribeNetworkInterfacesMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeNetworkInterfacesOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+// Contains the parameters for DescribeNetworkInterfaces.
+type DescribeNetworkInterfacesInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // One or more filters.
+ //
+ // * addresses.private-ip-address - The private IPv4
+ // addresses associated with the network interface.
+ //
+ // * addresses.primary - Whether
+ // the private IPv4 address is the primary IP address associated with the network
+ // interface.
+ //
+ // * addresses.association.public-ip - The association ID returned when
+ // the network interface was associated with the Elastic IP address (IPv4).
+ //
+ // *
+ // addresses.association.owner-id - The owner ID of the addresses associated with
+ // the network interface.
+ //
+ // * association.association-id - The association ID
+ // returned when the network interface was associated with an IPv4 address.
+ //
+ // *
+ // association.allocation-id - The allocation ID returned when you allocated the
+ // Elastic IP address (IPv4) for your network interface.
+ //
+ // * association.ip-owner-id
+ // - The owner of the Elastic IP address (IPv4) associated with the network
+ // interface.
+ //
+ // * association.public-ip - The address of the Elastic IP address
+ // (IPv4) bound to the network interface.
+ //
+ // * association.public-dns-name - The
+ // public DNS name for the network interface (IPv4).
+ //
+ // * attachment.attachment-id -
+ // The ID of the interface attachment.
+ //
+ // * attachment.attach-time - The time that
+ // the network interface was attached to an instance.
+ //
+ // *
+ // attachment.delete-on-termination - Indicates whether the attachment is deleted
+ // when an instance is terminated.
+ //
+ // * attachment.device-index - The device index to
+ // which the network interface is attached.
+ //
+ // * attachment.instance-id - The ID of
+ // the instance to which the network interface is attached.
+ //
+ // *
+ // attachment.instance-owner-id - The owner ID of the instance to which the network
+ // interface is attached.
+ //
+ // * attachment.status - The status of the attachment
+ // (attaching | attached | detaching | detached).
+ //
+ // * availability-zone - The
+ // Availability Zone of the network interface.
+ //
+ // * description - The description of
+ // the network interface.
+ //
+ // * group-id - The ID of a security group associated with
+ // the network interface.
+ //
+ // * group-name - The name of a security group associated
+ // with the network interface.
+ //
+ // * ipv6-addresses.ipv6-address - An IPv6 address
+ // associated with the network interface.
+ //
+ // * mac-address - The MAC address of the
+ // network interface.
+ //
+ // * network-interface-id - The ID of the network interface.
+ //
+ // *
+ // owner-id - The Amazon Web Services account ID of the network interface owner.
+ //
+ // *
+ // private-ip-address - The private IPv4 address or addresses of the network
+ // interface.
+ //
+ // * private-dns-name - The private DNS name of the network interface
+ // (IPv4).
+ //
+ // * requester-id - The alias or Amazon Web Services account ID of the
+ // principal or service that created the network interface.
+ //
+ // * requester-managed -
+ // Indicates whether the network interface is being managed by an Amazon Web
+ // Service (for example, Amazon Web Services Management Console, Auto Scaling, and
+ // so on).
+ //
+ // * source-dest-check - Indicates whether the network interface performs
+ // source/destination checking. A value of true means checking is enabled, and
+ // false means checking is disabled. The value must be false for the network
+ // interface to perform network address translation (NAT) in your VPC.
+ //
+ // * status -
+ // The status of the network interface. If the network interface is not attached to
+ // an instance, the status is available; if a network interface is attached to an
+ // instance the status is in-use.
+ //
+ // * subnet-id - The ID of the subnet for the
+ // network interface.
+ //
+ // * tag: - The key/value combination of a tag assigned to the
+ // resource. Use the tag key in the filter name and the tag value as the filter
+ // value. For example, to find all resources that have a tag with the key Owner and
+ // the value TeamA, specify tag:Owner for the filter name and TeamA for the filter
+ // value.
+ //
+ // * tag-key - The key of a tag assigned to the resource. Use this filter
+ // to find all resources assigned a tag with a specific key, regardless of the tag
+ // value.
+ //
+ // * vpc-id - The ID of the VPC for the network interface.
+ Filters []types.Filter
+
+ // The maximum number of items to return for this request. The request returns a
+ // token that you can specify in a subsequent call to get the next set of results.
+ // You cannot specify this parameter and the network interface IDs parameter in the
+ // same request.
+ MaxResults *int32
+
+ // One or more network interface IDs. Default: Describes all your network
+ // interfaces.
+ NetworkInterfaceIds []string
+
+ // The token to retrieve the next page of results.
+ NextToken *string
+
+ noSmithyDocumentSerde
+}
+
+// Contains the output of DescribeNetworkInterfaces.
+type DescribeNetworkInterfacesOutput struct {
+
+ // Information about one or more network interfaces.
+ NetworkInterfaces []types.NetworkInterface
+
+ // The token to use to retrieve the next page of results. This value is null when
+ // there are no more results to return.
+ NextToken *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeNetworkInterfacesMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeNetworkInterfaces{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeNetworkInterfaces{}, 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_opDescribeNetworkInterfaces(options.Region), middleware.Before); 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
+}
+
+// DescribeNetworkInterfacesAPIClient is a client that implements the
+// DescribeNetworkInterfaces operation.
+type DescribeNetworkInterfacesAPIClient interface {
+ DescribeNetworkInterfaces(context.Context, *DescribeNetworkInterfacesInput, ...func(*Options)) (*DescribeNetworkInterfacesOutput, error)
+}
+
+var _ DescribeNetworkInterfacesAPIClient = (*Client)(nil)
+
+// DescribeNetworkInterfacesPaginatorOptions is the paginator options for
+// DescribeNetworkInterfaces
+type DescribeNetworkInterfacesPaginatorOptions struct {
+ // The maximum number of items to return for this request. The request returns a
+ // token that you can specify in a subsequent call to get the next set of results.
+ // You cannot specify this parameter and the network interface IDs parameter in the
+ // same 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
+}
+
+// DescribeNetworkInterfacesPaginator is a paginator for DescribeNetworkInterfaces
+type DescribeNetworkInterfacesPaginator struct {
+ options DescribeNetworkInterfacesPaginatorOptions
+ client DescribeNetworkInterfacesAPIClient
+ params *DescribeNetworkInterfacesInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribeNetworkInterfacesPaginator returns a new
+// DescribeNetworkInterfacesPaginator
+func NewDescribeNetworkInterfacesPaginator(client DescribeNetworkInterfacesAPIClient, params *DescribeNetworkInterfacesInput, optFns ...func(*DescribeNetworkInterfacesPaginatorOptions)) *DescribeNetworkInterfacesPaginator {
+ if params == nil {
+ params = &DescribeNetworkInterfacesInput{}
+ }
+
+ options := DescribeNetworkInterfacesPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribeNetworkInterfacesPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribeNetworkInterfacesPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribeNetworkInterfaces page.
+func (p *DescribeNetworkInterfacesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeNetworkInterfacesOutput, 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.DescribeNetworkInterfaces(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
+}
+
+// NetworkInterfaceAvailableWaiterOptions are waiter options for
+// NetworkInterfaceAvailableWaiter
+type NetworkInterfaceAvailableWaiterOptions 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,
+ // NetworkInterfaceAvailableWaiter will use default minimum delay of 20 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, NetworkInterfaceAvailableWaiter 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, *DescribeNetworkInterfacesInput, *DescribeNetworkInterfacesOutput, error) (bool, error)
+}
+
+// NetworkInterfaceAvailableWaiter defines the waiters for
+// NetworkInterfaceAvailable
+type NetworkInterfaceAvailableWaiter struct {
+ client DescribeNetworkInterfacesAPIClient
+
+ options NetworkInterfaceAvailableWaiterOptions
+}
+
+// NewNetworkInterfaceAvailableWaiter constructs a NetworkInterfaceAvailableWaiter.
+func NewNetworkInterfaceAvailableWaiter(client DescribeNetworkInterfacesAPIClient, optFns ...func(*NetworkInterfaceAvailableWaiterOptions)) *NetworkInterfaceAvailableWaiter {
+ options := NetworkInterfaceAvailableWaiterOptions{}
+ options.MinDelay = 20 * time.Second
+ options.MaxDelay = 120 * time.Second
+ options.Retryable = networkInterfaceAvailableStateRetryable
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+ return &NetworkInterfaceAvailableWaiter{
+ client: client,
+ options: options,
+ }
+}
+
+// Wait calls the waiter function for NetworkInterfaceAvailable waiter. The
+// maxWaitDur is the maximum wait duration the waiter will wait. The maxWaitDur is
+// required and must be greater than zero.
+func (w *NetworkInterfaceAvailableWaiter) Wait(ctx context.Context, params *DescribeNetworkInterfacesInput, maxWaitDur time.Duration, optFns ...func(*NetworkInterfaceAvailableWaiterOptions)) error {
+ if maxWaitDur <= 0 {
+ return 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 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.DescribeNetworkInterfaces(ctx, params, func(o *Options) {
+ o.APIOptions = append(o.APIOptions, apiOptions...)
+ })
+
+ retryable, err := options.Retryable(ctx, params, out, err)
+ if err != nil {
+ return err
+ }
+ if !retryable {
+ return 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 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 fmt.Errorf("request cancelled while waiting, %w", err)
+ }
+ }
+ return fmt.Errorf("exceeded max wait time for NetworkInterfaceAvailable waiter")
+}
+
+func networkInterfaceAvailableStateRetryable(ctx context.Context, input *DescribeNetworkInterfacesInput, output *DescribeNetworkInterfacesOutput, err error) (bool, error) {
+
+ if err == nil {
+ pathValue, err := jmespath.Search("NetworkInterfaces[].Status", output)
+ if err != nil {
+ return false, fmt.Errorf("error evaluating waiter state: %w", err)
+ }
+
+ expectedValue := "available"
+ var match = true
+ listOfValues, ok := pathValue.([]interface{})
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected list got %T", pathValue)
+ }
+
+ if len(listOfValues) == 0 {
+ match = false
+ }
+ for _, v := range listOfValues {
+ value, ok := v.(types.NetworkInterfaceStatus)
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected types.NetworkInterfaceStatus value, got %T", pathValue)
+ }
+
+ if string(value) != expectedValue {
+ match = false
+ }
+ }
+
+ if match {
+ return false, nil
+ }
+ }
+
+ if err != nil {
+ var apiErr smithy.APIError
+ ok := errors.As(err, &apiErr)
+ if !ok {
+ return false, fmt.Errorf("expected err to be of type smithy.APIError, got %w", err)
+ }
+
+ if "InvalidNetworkInterfaceID.NotFound" == apiErr.ErrorCode() {
+ return false, fmt.Errorf("waiter state transitioned to Failure")
+ }
+ }
+
+ return true, nil
+}
+
+func newServiceMetadataMiddleware_opDescribeNetworkInterfaces(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeNetworkInterfaces",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribePlacementGroups.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribePlacementGroups.go
new file mode 100644
index 00000000..4ab51ca0
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribePlacementGroups.go
@@ -0,0 +1,151 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes the specified placement groups or all of your placement groups. For
+// more information, see Placement groups
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/placement-groups.html) in
+// the Amazon EC2 User Guide.
+func (c *Client) DescribePlacementGroups(ctx context.Context, params *DescribePlacementGroupsInput, optFns ...func(*Options)) (*DescribePlacementGroupsOutput, error) {
+ if params == nil {
+ params = &DescribePlacementGroupsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribePlacementGroups", params, optFns, c.addOperationDescribePlacementGroupsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribePlacementGroupsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribePlacementGroupsInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The filters.
+ //
+ // * group-name - The name of the placement group.
+ //
+ // * state - The
+ // state of the placement group (pending | available | deleting | deleted).
+ //
+ // *
+ // strategy - The strategy of the placement group (cluster | spread |
+ // partition).
+ //
+ // * tag: - The key/value combination of a tag assigned to the
+ // resource. Use the tag key in the filter name and the tag value as the filter
+ // value. For example, to find all resources that have a tag with the key Owner and
+ // the value TeamA, specify tag:Owner for the filter name and TeamA for the filter
+ // value.
+ //
+ // * tag-key - The key of a tag assigned to the resource. Use this filter
+ // to find all resources that have a tag with a specific key, regardless of the tag
+ // value.
+ Filters []types.Filter
+
+ // The IDs of the placement groups.
+ GroupIds []string
+
+ // The names of the placement groups. Default: Describes all your placement groups,
+ // or only those otherwise specified.
+ GroupNames []string
+
+ noSmithyDocumentSerde
+}
+
+type DescribePlacementGroupsOutput struct {
+
+ // Information about the placement groups.
+ PlacementGroups []types.PlacementGroup
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribePlacementGroupsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribePlacementGroups{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribePlacementGroups{}, 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_opDescribePlacementGroups(options.Region), middleware.Before); 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_opDescribePlacementGroups(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribePlacementGroups",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribePrefixLists.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribePrefixLists.go
new file mode 100644
index 00000000..6f03fdc5
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribePrefixLists.go
@@ -0,0 +1,233 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes available Amazon Web Services services in a prefix list format, which
+// includes the prefix list name and prefix list ID of the service and the IP
+// address range for the service. We recommend that you use
+// DescribeManagedPrefixLists instead.
+func (c *Client) DescribePrefixLists(ctx context.Context, params *DescribePrefixListsInput, optFns ...func(*Options)) (*DescribePrefixListsOutput, error) {
+ if params == nil {
+ params = &DescribePrefixListsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribePrefixLists", params, optFns, c.addOperationDescribePrefixListsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribePrefixListsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribePrefixListsInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // One or more filters.
+ //
+ // * prefix-list-id: The ID of a prefix list.
+ //
+ // *
+ // prefix-list-name: The name of a prefix list.
+ Filters []types.Filter
+
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ MaxResults *int32
+
+ // The token for the next page of results.
+ NextToken *string
+
+ // One or more prefix list IDs.
+ PrefixListIds []string
+
+ noSmithyDocumentSerde
+}
+
+type DescribePrefixListsOutput struct {
+
+ // The token to use to retrieve the next page of results. This value is null when
+ // there are no more results to return.
+ NextToken *string
+
+ // All available prefix lists.
+ PrefixLists []types.PrefixList
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribePrefixListsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribePrefixLists{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribePrefixLists{}, 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_opDescribePrefixLists(options.Region), middleware.Before); 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
+}
+
+// DescribePrefixListsAPIClient is a client that implements the DescribePrefixLists
+// operation.
+type DescribePrefixListsAPIClient interface {
+ DescribePrefixLists(context.Context, *DescribePrefixListsInput, ...func(*Options)) (*DescribePrefixListsOutput, error)
+}
+
+var _ DescribePrefixListsAPIClient = (*Client)(nil)
+
+// DescribePrefixListsPaginatorOptions is the paginator options for
+// DescribePrefixLists
+type DescribePrefixListsPaginatorOptions struct {
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ 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
+}
+
+// DescribePrefixListsPaginator is a paginator for DescribePrefixLists
+type DescribePrefixListsPaginator struct {
+ options DescribePrefixListsPaginatorOptions
+ client DescribePrefixListsAPIClient
+ params *DescribePrefixListsInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribePrefixListsPaginator returns a new DescribePrefixListsPaginator
+func NewDescribePrefixListsPaginator(client DescribePrefixListsAPIClient, params *DescribePrefixListsInput, optFns ...func(*DescribePrefixListsPaginatorOptions)) *DescribePrefixListsPaginator {
+ if params == nil {
+ params = &DescribePrefixListsInput{}
+ }
+
+ options := DescribePrefixListsPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribePrefixListsPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribePrefixListsPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribePrefixLists page.
+func (p *DescribePrefixListsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribePrefixListsOutput, 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.DescribePrefixLists(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_opDescribePrefixLists(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribePrefixLists",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribePrincipalIdFormat.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribePrincipalIdFormat.go
new file mode 100644
index 00000000..efebc3a6
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribePrincipalIdFormat.go
@@ -0,0 +1,242 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes the ID format settings for the root user and all IAM roles and IAM
+// users that have explicitly specified a longer ID (17-character ID) preference.
+// By default, all IAM roles and IAM users default to the same ID settings as the
+// root user, unless they explicitly override the settings. This request is useful
+// for identifying those IAM users and IAM roles that have overridden the default
+// ID settings. The following resource types support longer IDs: bundle |
+// conversion-task | customer-gateway | dhcp-options | elastic-ip-allocation |
+// elastic-ip-association | export-task | flow-log | image | import-task | instance
+// | internet-gateway | network-acl | network-acl-association | network-interface |
+// network-interface-attachment | prefix-list | reservation | route-table |
+// route-table-association | security-group | snapshot | subnet |
+// subnet-cidr-block-association | volume | vpc | vpc-cidr-block-association |
+// vpc-endpoint | vpc-peering-connection | vpn-connection | vpn-gateway.
+func (c *Client) DescribePrincipalIdFormat(ctx context.Context, params *DescribePrincipalIdFormatInput, optFns ...func(*Options)) (*DescribePrincipalIdFormatOutput, error) {
+ if params == nil {
+ params = &DescribePrincipalIdFormatInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribePrincipalIdFormat", params, optFns, c.addOperationDescribePrincipalIdFormatMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribePrincipalIdFormatOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribePrincipalIdFormatInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The maximum number of results to return in a single call. To retrieve the
+ // remaining results, make another call with the returned NextToken value.
+ MaxResults *int32
+
+ // The token to request the next page of results.
+ NextToken *string
+
+ // The type of resource: bundle | conversion-task | customer-gateway | dhcp-options
+ // | elastic-ip-allocation | elastic-ip-association | export-task | flow-log |
+ // image | import-task | instance | internet-gateway | network-acl |
+ // network-acl-association | network-interface | network-interface-attachment |
+ // prefix-list | reservation | route-table | route-table-association |
+ // security-group | snapshot | subnet | subnet-cidr-block-association | volume |
+ // vpc | vpc-cidr-block-association | vpc-endpoint | vpc-peering-connection |
+ // vpn-connection | vpn-gateway
+ Resources []string
+
+ noSmithyDocumentSerde
+}
+
+type DescribePrincipalIdFormatOutput struct {
+
+ // The token to use to retrieve the next page of results. This value is null when
+ // there are no more results to return.
+ NextToken *string
+
+ // Information about the ID format settings for the ARN.
+ Principals []types.PrincipalIdFormat
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribePrincipalIdFormatMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribePrincipalIdFormat{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribePrincipalIdFormat{}, 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_opDescribePrincipalIdFormat(options.Region), middleware.Before); 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
+}
+
+// DescribePrincipalIdFormatAPIClient is a client that implements the
+// DescribePrincipalIdFormat operation.
+type DescribePrincipalIdFormatAPIClient interface {
+ DescribePrincipalIdFormat(context.Context, *DescribePrincipalIdFormatInput, ...func(*Options)) (*DescribePrincipalIdFormatOutput, error)
+}
+
+var _ DescribePrincipalIdFormatAPIClient = (*Client)(nil)
+
+// DescribePrincipalIdFormatPaginatorOptions is the paginator options for
+// DescribePrincipalIdFormat
+type DescribePrincipalIdFormatPaginatorOptions struct {
+ // The maximum number of results to return in a single call. To retrieve the
+ // remaining results, make another call with the returned NextToken value.
+ 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
+}
+
+// DescribePrincipalIdFormatPaginator is a paginator for DescribePrincipalIdFormat
+type DescribePrincipalIdFormatPaginator struct {
+ options DescribePrincipalIdFormatPaginatorOptions
+ client DescribePrincipalIdFormatAPIClient
+ params *DescribePrincipalIdFormatInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribePrincipalIdFormatPaginator returns a new
+// DescribePrincipalIdFormatPaginator
+func NewDescribePrincipalIdFormatPaginator(client DescribePrincipalIdFormatAPIClient, params *DescribePrincipalIdFormatInput, optFns ...func(*DescribePrincipalIdFormatPaginatorOptions)) *DescribePrincipalIdFormatPaginator {
+ if params == nil {
+ params = &DescribePrincipalIdFormatInput{}
+ }
+
+ options := DescribePrincipalIdFormatPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribePrincipalIdFormatPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribePrincipalIdFormatPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribePrincipalIdFormat page.
+func (p *DescribePrincipalIdFormatPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribePrincipalIdFormatOutput, 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.DescribePrincipalIdFormat(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_opDescribePrincipalIdFormat(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribePrincipalIdFormat",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribePublicIpv4Pools.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribePublicIpv4Pools.go
new file mode 100644
index 00000000..a6c5f7c0
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribePublicIpv4Pools.go
@@ -0,0 +1,230 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes the specified IPv4 address pools.
+func (c *Client) DescribePublicIpv4Pools(ctx context.Context, params *DescribePublicIpv4PoolsInput, optFns ...func(*Options)) (*DescribePublicIpv4PoolsOutput, error) {
+ if params == nil {
+ params = &DescribePublicIpv4PoolsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribePublicIpv4Pools", params, optFns, c.addOperationDescribePublicIpv4PoolsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribePublicIpv4PoolsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribePublicIpv4PoolsInput struct {
+
+ // One or more filters.
+ //
+ // * tag: - The key/value combination of a tag assigned to
+ // the resource. Use the tag key in the filter name and the tag value as the filter
+ // value. For example, to find all resources that have a tag with the key Owner and
+ // the value TeamA, specify tag:Owner for the filter name and TeamA for the filter
+ // value.
+ //
+ // * tag-key - The key of a tag assigned to the resource. Use this filter
+ // to find all resources assigned a tag with a specific key, regardless of the tag
+ // value.
+ Filters []types.Filter
+
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ MaxResults *int32
+
+ // The token for the next page of results.
+ NextToken *string
+
+ // The IDs of the address pools.
+ PoolIds []string
+
+ noSmithyDocumentSerde
+}
+
+type DescribePublicIpv4PoolsOutput struct {
+
+ // The token to use to retrieve the next page of results. This value is null when
+ // there are no more results to return.
+ NextToken *string
+
+ // Information about the address pools.
+ PublicIpv4Pools []types.PublicIpv4Pool
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribePublicIpv4PoolsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribePublicIpv4Pools{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribePublicIpv4Pools{}, 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_opDescribePublicIpv4Pools(options.Region), middleware.Before); 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
+}
+
+// DescribePublicIpv4PoolsAPIClient is a client that implements the
+// DescribePublicIpv4Pools operation.
+type DescribePublicIpv4PoolsAPIClient interface {
+ DescribePublicIpv4Pools(context.Context, *DescribePublicIpv4PoolsInput, ...func(*Options)) (*DescribePublicIpv4PoolsOutput, error)
+}
+
+var _ DescribePublicIpv4PoolsAPIClient = (*Client)(nil)
+
+// DescribePublicIpv4PoolsPaginatorOptions is the paginator options for
+// DescribePublicIpv4Pools
+type DescribePublicIpv4PoolsPaginatorOptions struct {
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ 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
+}
+
+// DescribePublicIpv4PoolsPaginator is a paginator for DescribePublicIpv4Pools
+type DescribePublicIpv4PoolsPaginator struct {
+ options DescribePublicIpv4PoolsPaginatorOptions
+ client DescribePublicIpv4PoolsAPIClient
+ params *DescribePublicIpv4PoolsInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribePublicIpv4PoolsPaginator returns a new
+// DescribePublicIpv4PoolsPaginator
+func NewDescribePublicIpv4PoolsPaginator(client DescribePublicIpv4PoolsAPIClient, params *DescribePublicIpv4PoolsInput, optFns ...func(*DescribePublicIpv4PoolsPaginatorOptions)) *DescribePublicIpv4PoolsPaginator {
+ if params == nil {
+ params = &DescribePublicIpv4PoolsInput{}
+ }
+
+ options := DescribePublicIpv4PoolsPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribePublicIpv4PoolsPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribePublicIpv4PoolsPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribePublicIpv4Pools page.
+func (p *DescribePublicIpv4PoolsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribePublicIpv4PoolsOutput, 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.DescribePublicIpv4Pools(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_opDescribePublicIpv4Pools(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribePublicIpv4Pools",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeRegions.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeRegions.go
new file mode 100644
index 00000000..d33ee758
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeRegions.go
@@ -0,0 +1,144 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes the Regions that are enabled for your account, or all Regions. For a
+// list of the Regions supported by Amazon EC2, see Regions and Endpoints
+// (https://docs.aws.amazon.com/general/latest/gr/rande.html#ec2_region). For
+// information about enabling and disabling Regions for your account, see Managing
+// AWS Regions (https://docs.aws.amazon.com/general/latest/gr/rande-manage.html) in
+// the AWS General Reference.
+func (c *Client) DescribeRegions(ctx context.Context, params *DescribeRegionsInput, optFns ...func(*Options)) (*DescribeRegionsOutput, error) {
+ if params == nil {
+ params = &DescribeRegionsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeRegions", params, optFns, c.addOperationDescribeRegionsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeRegionsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeRegionsInput struct {
+
+ // Indicates whether to display all Regions, including Regions that are disabled
+ // for your account.
+ AllRegions *bool
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The filters.
+ //
+ // * endpoint - The endpoint of the Region (for example,
+ // ec2.us-east-1.amazonaws.com).
+ //
+ // * opt-in-status - The opt-in status of the Region
+ // (opt-in-not-required | opted-in | not-opted-in).
+ //
+ // * region-name - The name of
+ // the Region (for example, us-east-1).
+ Filters []types.Filter
+
+ // The names of the Regions. You can specify any Regions, whether they are enabled
+ // and disabled for your account.
+ RegionNames []string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeRegionsOutput struct {
+
+ // Information about the Regions.
+ Regions []types.Region
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeRegionsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeRegions{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeRegions{}, 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_opDescribeRegions(options.Region), middleware.Before); 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_opDescribeRegions(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeRegions",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeReplaceRootVolumeTasks.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeReplaceRootVolumeTasks.go
new file mode 100644
index 00000000..a966c86e
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeReplaceRootVolumeTasks.go
@@ -0,0 +1,233 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes a root volume replacement task. For more information, see Replace a
+// root volume
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-restoring-volume.html#replace-root)
+// in the Amazon Elastic Compute Cloud User Guide.
+func (c *Client) DescribeReplaceRootVolumeTasks(ctx context.Context, params *DescribeReplaceRootVolumeTasksInput, optFns ...func(*Options)) (*DescribeReplaceRootVolumeTasksOutput, error) {
+ if params == nil {
+ params = &DescribeReplaceRootVolumeTasksInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeReplaceRootVolumeTasks", params, optFns, c.addOperationDescribeReplaceRootVolumeTasksMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeReplaceRootVolumeTasksOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeReplaceRootVolumeTasksInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // Filter to use:
+ //
+ // * instance-id - The ID of the instance for which the root volume
+ // replacement task was created.
+ Filters []types.Filter
+
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ MaxResults *int32
+
+ // The token for the next page of results.
+ NextToken *string
+
+ // The ID of the root volume replacement task to view.
+ ReplaceRootVolumeTaskIds []string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeReplaceRootVolumeTasksOutput struct {
+
+ // The token to use to retrieve the next page of results. This value is null when
+ // there are no more results to return.
+ NextToken *string
+
+ // Information about the root volume replacement task.
+ ReplaceRootVolumeTasks []types.ReplaceRootVolumeTask
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeReplaceRootVolumeTasksMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeReplaceRootVolumeTasks{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeReplaceRootVolumeTasks{}, 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_opDescribeReplaceRootVolumeTasks(options.Region), middleware.Before); 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
+}
+
+// DescribeReplaceRootVolumeTasksAPIClient is a client that implements the
+// DescribeReplaceRootVolumeTasks operation.
+type DescribeReplaceRootVolumeTasksAPIClient interface {
+ DescribeReplaceRootVolumeTasks(context.Context, *DescribeReplaceRootVolumeTasksInput, ...func(*Options)) (*DescribeReplaceRootVolumeTasksOutput, error)
+}
+
+var _ DescribeReplaceRootVolumeTasksAPIClient = (*Client)(nil)
+
+// DescribeReplaceRootVolumeTasksPaginatorOptions is the paginator options for
+// DescribeReplaceRootVolumeTasks
+type DescribeReplaceRootVolumeTasksPaginatorOptions struct {
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ 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
+}
+
+// DescribeReplaceRootVolumeTasksPaginator is a paginator for
+// DescribeReplaceRootVolumeTasks
+type DescribeReplaceRootVolumeTasksPaginator struct {
+ options DescribeReplaceRootVolumeTasksPaginatorOptions
+ client DescribeReplaceRootVolumeTasksAPIClient
+ params *DescribeReplaceRootVolumeTasksInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribeReplaceRootVolumeTasksPaginator returns a new
+// DescribeReplaceRootVolumeTasksPaginator
+func NewDescribeReplaceRootVolumeTasksPaginator(client DescribeReplaceRootVolumeTasksAPIClient, params *DescribeReplaceRootVolumeTasksInput, optFns ...func(*DescribeReplaceRootVolumeTasksPaginatorOptions)) *DescribeReplaceRootVolumeTasksPaginator {
+ if params == nil {
+ params = &DescribeReplaceRootVolumeTasksInput{}
+ }
+
+ options := DescribeReplaceRootVolumeTasksPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribeReplaceRootVolumeTasksPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribeReplaceRootVolumeTasksPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribeReplaceRootVolumeTasks page.
+func (p *DescribeReplaceRootVolumeTasksPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeReplaceRootVolumeTasksOutput, 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.DescribeReplaceRootVolumeTasks(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_opDescribeReplaceRootVolumeTasks(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeReplaceRootVolumeTasks",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeReservedInstances.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeReservedInstances.go
new file mode 100644
index 00000000..3506743c
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeReservedInstances.go
@@ -0,0 +1,191 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes one or more of the Reserved Instances that you purchased. For more
+// information about Reserved Instances, see Reserved Instances
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/concepts-on-demand-reserved-instances.html)
+// in the Amazon EC2 User Guide.
+func (c *Client) DescribeReservedInstances(ctx context.Context, params *DescribeReservedInstancesInput, optFns ...func(*Options)) (*DescribeReservedInstancesOutput, error) {
+ if params == nil {
+ params = &DescribeReservedInstancesInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeReservedInstances", params, optFns, c.addOperationDescribeReservedInstancesMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeReservedInstancesOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+// Contains the parameters for DescribeReservedInstances.
+type DescribeReservedInstancesInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // One or more filters.
+ //
+ // * availability-zone - The Availability Zone where the
+ // Reserved Instance can be used.
+ //
+ // * duration - The duration of the Reserved
+ // Instance (one year or three years), in seconds (31536000 | 94608000).
+ //
+ // * end -
+ // The time when the Reserved Instance expires (for example,
+ // 2015-08-07T11:54:42.000Z).
+ //
+ // * fixed-price - The purchase price of the Reserved
+ // Instance (for example, 9800.0).
+ //
+ // * instance-type - The instance type that is
+ // covered by the reservation.
+ //
+ // * scope - The scope of the Reserved Instance
+ // (Region or Availability Zone).
+ //
+ // * product-description - The Reserved Instance
+ // product platform description. Instances that include (Amazon VPC) in the product
+ // platform description will only be displayed to EC2-Classic account holders and
+ // are for use with Amazon VPC (Linux/UNIX | Linux/UNIX (Amazon VPC) | SUSE Linux |
+ // SUSE Linux (Amazon VPC) | Red Hat Enterprise Linux | Red Hat Enterprise Linux
+ // (Amazon VPC) | Red Hat Enterprise Linux with HA (Amazon VPC) | Windows | Windows
+ // (Amazon VPC) | Windows with SQL Server Standard | Windows with SQL Server
+ // Standard (Amazon VPC) | Windows with SQL Server Web | Windows with SQL Server
+ // Web (Amazon VPC) | Windows with SQL Server Enterprise | Windows with SQL Server
+ // Enterprise (Amazon VPC)).
+ //
+ // * reserved-instances-id - The ID of the Reserved
+ // Instance.
+ //
+ // * start - The time at which the Reserved Instance purchase request
+ // was placed (for example, 2014-08-07T11:54:42.000Z).
+ //
+ // * state - The state of the
+ // Reserved Instance (payment-pending | active | payment-failed | retired).
+ //
+ // * tag:
+ // - The key/value combination of a tag assigned to the resource. Use the tag key
+ // in the filter name and the tag value as the filter value. For example, to find
+ // all resources that have a tag with the key Owner and the value TeamA, specify
+ // tag:Owner for the filter name and TeamA for the filter value.
+ //
+ // * tag-key - The
+ // key of a tag assigned to the resource. Use this filter to find all resources
+ // assigned a tag with a specific key, regardless of the tag value.
+ //
+ // * usage-price
+ // - The usage price of the Reserved Instance, per hour (for example, 0.84).
+ Filters []types.Filter
+
+ // Describes whether the Reserved Instance is Standard or Convertible.
+ OfferingClass types.OfferingClassType
+
+ // The Reserved Instance offering type. If you are using tools that predate the
+ // 2011-11-01 API version, you only have access to the Medium Utilization Reserved
+ // Instance offering type.
+ OfferingType types.OfferingTypeValues
+
+ // One or more Reserved Instance IDs. Default: Describes all your Reserved
+ // Instances, or only those otherwise specified.
+ ReservedInstancesIds []string
+
+ noSmithyDocumentSerde
+}
+
+// Contains the output for DescribeReservedInstances.
+type DescribeReservedInstancesOutput struct {
+
+ // A list of Reserved Instances.
+ ReservedInstances []types.ReservedInstances
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeReservedInstancesMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeReservedInstances{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeReservedInstances{}, 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_opDescribeReservedInstances(options.Region), middleware.Before); 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_opDescribeReservedInstances(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeReservedInstances",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeReservedInstancesListings.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeReservedInstancesListings.go
new file mode 100644
index 00000000..050a25da
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeReservedInstancesListings.go
@@ -0,0 +1,150 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes your account's Reserved Instance listings in the Reserved Instance
+// Marketplace. The Reserved Instance Marketplace matches sellers who want to
+// resell Reserved Instance capacity that they no longer need with buyers who want
+// to purchase additional capacity. Reserved Instances bought and sold through the
+// Reserved Instance Marketplace work like any other Reserved Instances. As a
+// seller, you choose to list some or all of your Reserved Instances, and you
+// specify the upfront price to receive for them. Your Reserved Instances are then
+// listed in the Reserved Instance Marketplace and are available for purchase. As a
+// buyer, you specify the configuration of the Reserved Instance to purchase, and
+// the Marketplace matches what you're searching for with what's available. The
+// Marketplace first sells the lowest priced Reserved Instances to you, and
+// continues to sell available Reserved Instance listings to you until your demand
+// is met. You are charged based on the total price of all of the listings that you
+// purchase. For more information, see Reserved Instance Marketplace
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-market-general.html) in
+// the Amazon EC2 User Guide.
+func (c *Client) DescribeReservedInstancesListings(ctx context.Context, params *DescribeReservedInstancesListingsInput, optFns ...func(*Options)) (*DescribeReservedInstancesListingsOutput, error) {
+ if params == nil {
+ params = &DescribeReservedInstancesListingsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeReservedInstancesListings", params, optFns, c.addOperationDescribeReservedInstancesListingsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeReservedInstancesListingsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+// Contains the parameters for DescribeReservedInstancesListings.
+type DescribeReservedInstancesListingsInput struct {
+
+ // One or more filters.
+ //
+ // * reserved-instances-id - The ID of the Reserved
+ // Instances.
+ //
+ // * reserved-instances-listing-id - The ID of the Reserved Instances
+ // listing.
+ //
+ // * status - The status of the Reserved Instance listing (pending |
+ // active | cancelled | closed).
+ //
+ // * status-message - The reason for the status.
+ Filters []types.Filter
+
+ // One or more Reserved Instance IDs.
+ ReservedInstancesId *string
+
+ // One or more Reserved Instance listing IDs.
+ ReservedInstancesListingId *string
+
+ noSmithyDocumentSerde
+}
+
+// Contains the output of DescribeReservedInstancesListings.
+type DescribeReservedInstancesListingsOutput struct {
+
+ // Information about the Reserved Instance listing.
+ ReservedInstancesListings []types.ReservedInstancesListing
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeReservedInstancesListingsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeReservedInstancesListings{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeReservedInstancesListings{}, 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_opDescribeReservedInstancesListings(options.Region), middleware.Before); 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_opDescribeReservedInstancesListings(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeReservedInstancesListings",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeReservedInstancesModifications.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeReservedInstancesModifications.go
new file mode 100644
index 00000000..c81f7267
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeReservedInstancesModifications.go
@@ -0,0 +1,255 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes the modifications made to your Reserved Instances. If no parameter is
+// specified, information about all your Reserved Instances modification requests
+// is returned. If a modification ID is specified, only information about the
+// specific modification is returned. For more information, see Modifying Reserved
+// Instances
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-modifying.html) in the
+// Amazon EC2 User Guide.
+func (c *Client) DescribeReservedInstancesModifications(ctx context.Context, params *DescribeReservedInstancesModificationsInput, optFns ...func(*Options)) (*DescribeReservedInstancesModificationsOutput, error) {
+ if params == nil {
+ params = &DescribeReservedInstancesModificationsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeReservedInstancesModifications", params, optFns, c.addOperationDescribeReservedInstancesModificationsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeReservedInstancesModificationsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+// Contains the parameters for DescribeReservedInstancesModifications.
+type DescribeReservedInstancesModificationsInput struct {
+
+ // One or more filters.
+ //
+ // * client-token - The idempotency token for the
+ // modification request.
+ //
+ // * create-date - The time when the modification request
+ // was created.
+ //
+ // * effective-date - The time when the modification becomes
+ // effective.
+ //
+ // * modification-result.reserved-instances-id - The ID for the
+ // Reserved Instances created as part of the modification request. This ID is only
+ // available when the status of the modification is fulfilled.
+ //
+ // *
+ // modification-result.target-configuration.availability-zone - The Availability
+ // Zone for the new Reserved Instances.
+ //
+ // *
+ // modification-result.target-configuration.instance-count - The number of new
+ // Reserved Instances.
+ //
+ // * modification-result.target-configuration.instance-type -
+ // The instance type of the new Reserved Instances.
+ //
+ // *
+ // modification-result.target-configuration.platform - The network platform of the
+ // new Reserved Instances (EC2-Classic | EC2-VPC).
+ //
+ // * reserved-instances-id - The
+ // ID of the Reserved Instances modified.
+ //
+ // * reserved-instances-modification-id -
+ // The ID of the modification request.
+ //
+ // * status - The status of the Reserved
+ // Instances modification request (processing | fulfilled | failed).
+ //
+ // *
+ // status-message - The reason for the status.
+ //
+ // * update-date - The time when the
+ // modification request was last updated.
+ Filters []types.Filter
+
+ // The token to retrieve the next page of results.
+ NextToken *string
+
+ // IDs for the submitted modification request.
+ ReservedInstancesModificationIds []string
+
+ noSmithyDocumentSerde
+}
+
+// Contains the output of DescribeReservedInstancesModifications.
+type DescribeReservedInstancesModificationsOutput struct {
+
+ // The token to use to retrieve the next page of results. This value is null when
+ // there are no more results to return.
+ NextToken *string
+
+ // The Reserved Instance modification information.
+ ReservedInstancesModifications []types.ReservedInstancesModification
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeReservedInstancesModificationsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeReservedInstancesModifications{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeReservedInstancesModifications{}, 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_opDescribeReservedInstancesModifications(options.Region), middleware.Before); 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
+}
+
+// DescribeReservedInstancesModificationsAPIClient is a client that implements the
+// DescribeReservedInstancesModifications operation.
+type DescribeReservedInstancesModificationsAPIClient interface {
+ DescribeReservedInstancesModifications(context.Context, *DescribeReservedInstancesModificationsInput, ...func(*Options)) (*DescribeReservedInstancesModificationsOutput, error)
+}
+
+var _ DescribeReservedInstancesModificationsAPIClient = (*Client)(nil)
+
+// DescribeReservedInstancesModificationsPaginatorOptions is the paginator options
+// for DescribeReservedInstancesModifications
+type DescribeReservedInstancesModificationsPaginatorOptions struct {
+ // 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
+}
+
+// DescribeReservedInstancesModificationsPaginator is a paginator for
+// DescribeReservedInstancesModifications
+type DescribeReservedInstancesModificationsPaginator struct {
+ options DescribeReservedInstancesModificationsPaginatorOptions
+ client DescribeReservedInstancesModificationsAPIClient
+ params *DescribeReservedInstancesModificationsInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribeReservedInstancesModificationsPaginator returns a new
+// DescribeReservedInstancesModificationsPaginator
+func NewDescribeReservedInstancesModificationsPaginator(client DescribeReservedInstancesModificationsAPIClient, params *DescribeReservedInstancesModificationsInput, optFns ...func(*DescribeReservedInstancesModificationsPaginatorOptions)) *DescribeReservedInstancesModificationsPaginator {
+ if params == nil {
+ params = &DescribeReservedInstancesModificationsInput{}
+ }
+
+ options := DescribeReservedInstancesModificationsPaginatorOptions{}
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribeReservedInstancesModificationsPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribeReservedInstancesModificationsPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribeReservedInstancesModifications page.
+func (p *DescribeReservedInstancesModificationsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeReservedInstancesModificationsOutput, error) {
+ if !p.HasMorePages() {
+ return nil, fmt.Errorf("no more pages available")
+ }
+
+ params := *p.params
+ params.NextToken = p.nextToken
+
+ result, err := p.client.DescribeReservedInstancesModifications(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_opDescribeReservedInstancesModifications(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeReservedInstancesModifications",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeReservedInstancesOfferings.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeReservedInstancesOfferings.go
new file mode 100644
index 00000000..e9e19322
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeReservedInstancesOfferings.go
@@ -0,0 +1,321 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes Reserved Instance offerings that are available for purchase. With
+// Reserved Instances, you purchase the right to launch instances for a period of
+// time. During that time period, you do not receive insufficient capacity errors,
+// and you pay a lower usage rate than the rate charged for On-Demand instances for
+// the actual time used. If you have listed your own Reserved Instances for sale in
+// the Reserved Instance Marketplace, they will be excluded from these results.
+// This is to ensure that you do not purchase your own Reserved Instances. For more
+// information, see Reserved Instance Marketplace
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-market-general.html) in
+// the Amazon EC2 User Guide.
+func (c *Client) DescribeReservedInstancesOfferings(ctx context.Context, params *DescribeReservedInstancesOfferingsInput, optFns ...func(*Options)) (*DescribeReservedInstancesOfferingsOutput, error) {
+ if params == nil {
+ params = &DescribeReservedInstancesOfferingsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeReservedInstancesOfferings", params, optFns, c.addOperationDescribeReservedInstancesOfferingsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeReservedInstancesOfferingsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+// Contains the parameters for DescribeReservedInstancesOfferings.
+type DescribeReservedInstancesOfferingsInput struct {
+
+ // The Availability Zone in which the Reserved Instance can be used.
+ AvailabilityZone *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // One or more filters.
+ //
+ // * availability-zone - The Availability Zone where the
+ // Reserved Instance can be used.
+ //
+ // * duration - The duration of the Reserved
+ // Instance (for example, one year or three years), in seconds (31536000 |
+ // 94608000).
+ //
+ // * fixed-price - The purchase price of the Reserved Instance (for
+ // example, 9800.0).
+ //
+ // * instance-type - The instance type that is covered by the
+ // reservation.
+ //
+ // * marketplace - Set to true to show only Reserved Instance
+ // Marketplace offerings. When this filter is not used, which is the default
+ // behavior, all offerings from both Amazon Web Services and the Reserved Instance
+ // Marketplace are listed.
+ //
+ // * product-description - The Reserved Instance product
+ // platform description. Instances that include (Amazon VPC) in the product
+ // platform description will only be displayed to EC2-Classic account holders and
+ // are for use with Amazon VPC. (Linux/UNIX | Linux/UNIX (Amazon VPC) | SUSE Linux
+ // | SUSE Linux (Amazon VPC) | Red Hat Enterprise Linux | Red Hat Enterprise Linux
+ // (Amazon VPC) | Red Hat Enterprise Linux with HA (Amazon VPC) | Windows | Windows
+ // (Amazon VPC) | Windows with SQL Server Standard | Windows with SQL Server
+ // Standard (Amazon VPC) | Windows with SQL Server Web | Windows with SQL Server
+ // Web (Amazon VPC) | Windows with SQL Server Enterprise | Windows with SQL Server
+ // Enterprise (Amazon VPC))
+ //
+ // * reserved-instances-offering-id - The Reserved
+ // Instances offering ID.
+ //
+ // * scope - The scope of the Reserved Instance
+ // (Availability Zone or Region).
+ //
+ // * usage-price - The usage price of the Reserved
+ // Instance, per hour (for example, 0.84).
+ Filters []types.Filter
+
+ // Include Reserved Instance Marketplace offerings in the response.
+ IncludeMarketplace *bool
+
+ // The tenancy of the instances covered by the reservation. A Reserved Instance
+ // with a tenancy of dedicated is applied to instances that run in a VPC on
+ // single-tenant hardware (i.e., Dedicated Instances). Important: The host value
+ // cannot be used with this parameter. Use the default or dedicated values only.
+ // Default: default
+ InstanceTenancy types.Tenancy
+
+ // The instance type that the reservation will cover (for example, m1.small). For
+ // more information, see Instance types
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html) in the
+ // Amazon EC2 User Guide.
+ InstanceType types.InstanceType
+
+ // The maximum duration (in seconds) to filter when searching for offerings.
+ // Default: 94608000 (3 years)
+ MaxDuration *int64
+
+ // The maximum number of instances to filter when searching for offerings. Default:
+ // 20
+ MaxInstanceCount *int32
+
+ // The maximum number of results to return for the request in a single page. The
+ // remaining results of the initial request can be seen by sending another request
+ // with the returned NextToken value. The maximum is 100. Default: 100
+ MaxResults *int32
+
+ // The minimum duration (in seconds) to filter when searching for offerings.
+ // Default: 2592000 (1 month)
+ MinDuration *int64
+
+ // The token to retrieve the next page of results.
+ NextToken *string
+
+ // The offering class of the Reserved Instance. Can be standard or convertible.
+ OfferingClass types.OfferingClassType
+
+ // The Reserved Instance offering type. If you are using tools that predate the
+ // 2011-11-01 API version, you only have access to the Medium Utilization Reserved
+ // Instance offering type.
+ OfferingType types.OfferingTypeValues
+
+ // The Reserved Instance product platform description. Instances that include
+ // (Amazon VPC) in the description are for use with Amazon VPC.
+ ProductDescription types.RIProductDescription
+
+ // One or more Reserved Instances offering IDs.
+ ReservedInstancesOfferingIds []string
+
+ noSmithyDocumentSerde
+}
+
+// Contains the output of DescribeReservedInstancesOfferings.
+type DescribeReservedInstancesOfferingsOutput struct {
+
+ // The token to use to retrieve the next page of results. This value is null when
+ // there are no more results to return.
+ NextToken *string
+
+ // A list of Reserved Instances offerings.
+ ReservedInstancesOfferings []types.ReservedInstancesOffering
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeReservedInstancesOfferingsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeReservedInstancesOfferings{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeReservedInstancesOfferings{}, 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_opDescribeReservedInstancesOfferings(options.Region), middleware.Before); 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
+}
+
+// DescribeReservedInstancesOfferingsAPIClient is a client that implements the
+// DescribeReservedInstancesOfferings operation.
+type DescribeReservedInstancesOfferingsAPIClient interface {
+ DescribeReservedInstancesOfferings(context.Context, *DescribeReservedInstancesOfferingsInput, ...func(*Options)) (*DescribeReservedInstancesOfferingsOutput, error)
+}
+
+var _ DescribeReservedInstancesOfferingsAPIClient = (*Client)(nil)
+
+// DescribeReservedInstancesOfferingsPaginatorOptions is the paginator options for
+// DescribeReservedInstancesOfferings
+type DescribeReservedInstancesOfferingsPaginatorOptions struct {
+ // The maximum number of results to return for the request in a single page. The
+ // remaining results of the initial request can be seen by sending another request
+ // with the returned NextToken value. The maximum is 100. Default: 100
+ 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
+}
+
+// DescribeReservedInstancesOfferingsPaginator is a paginator for
+// DescribeReservedInstancesOfferings
+type DescribeReservedInstancesOfferingsPaginator struct {
+ options DescribeReservedInstancesOfferingsPaginatorOptions
+ client DescribeReservedInstancesOfferingsAPIClient
+ params *DescribeReservedInstancesOfferingsInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribeReservedInstancesOfferingsPaginator returns a new
+// DescribeReservedInstancesOfferingsPaginator
+func NewDescribeReservedInstancesOfferingsPaginator(client DescribeReservedInstancesOfferingsAPIClient, params *DescribeReservedInstancesOfferingsInput, optFns ...func(*DescribeReservedInstancesOfferingsPaginatorOptions)) *DescribeReservedInstancesOfferingsPaginator {
+ if params == nil {
+ params = &DescribeReservedInstancesOfferingsInput{}
+ }
+
+ options := DescribeReservedInstancesOfferingsPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribeReservedInstancesOfferingsPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribeReservedInstancesOfferingsPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribeReservedInstancesOfferings page.
+func (p *DescribeReservedInstancesOfferingsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeReservedInstancesOfferingsOutput, 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.DescribeReservedInstancesOfferings(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_opDescribeReservedInstancesOfferings(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeReservedInstancesOfferings",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeRouteTables.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeRouteTables.go
new file mode 100644
index 00000000..dff2a430
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeRouteTables.go
@@ -0,0 +1,304 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes one or more of your route tables. Each subnet in your VPC must be
+// associated with a route table. If a subnet is not explicitly associated with any
+// route table, it is implicitly associated with the main route table. This command
+// does not return the subnet ID for implicit associations. For more information,
+// see Route tables
+// (https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Route_Tables.html) in the
+// Amazon Virtual Private Cloud User Guide.
+func (c *Client) DescribeRouteTables(ctx context.Context, params *DescribeRouteTablesInput, optFns ...func(*Options)) (*DescribeRouteTablesOutput, error) {
+ if params == nil {
+ params = &DescribeRouteTablesInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeRouteTables", params, optFns, c.addOperationDescribeRouteTablesMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeRouteTablesOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeRouteTablesInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // One or more filters.
+ //
+ // * association.route-table-association-id - The ID of an
+ // association ID for the route table.
+ //
+ // * association.route-table-id - The ID of
+ // the route table involved in the association.
+ //
+ // * association.subnet-id - The ID
+ // of the subnet involved in the association.
+ //
+ // * association.main - Indicates
+ // whether the route table is the main route table for the VPC (true | false).
+ // Route tables that do not have an association ID are not returned in the
+ // response.
+ //
+ // * owner-id - The ID of the Amazon Web Services account that owns the
+ // route table.
+ //
+ // * route-table-id - The ID of the route table.
+ //
+ // *
+ // route.destination-cidr-block - The IPv4 CIDR range specified in a route in the
+ // table.
+ //
+ // * route.destination-ipv6-cidr-block - The IPv6 CIDR range specified in a
+ // route in the route table.
+ //
+ // * route.destination-prefix-list-id - The ID (prefix)
+ // of the Amazon Web Service specified in a route in the table.
+ //
+ // *
+ // route.egress-only-internet-gateway-id - The ID of an egress-only Internet
+ // gateway specified in a route in the route table.
+ //
+ // * route.gateway-id - The ID of
+ // a gateway specified in a route in the table.
+ //
+ // * route.instance-id - The ID of an
+ // instance specified in a route in the table.
+ //
+ // * route.nat-gateway-id - The ID of
+ // a NAT gateway.
+ //
+ // * route.transit-gateway-id - The ID of a transit gateway.
+ //
+ // *
+ // route.origin - Describes how the route was created. CreateRouteTable indicates
+ // that the route was automatically created when the route table was created;
+ // CreateRoute indicates that the route was manually added to the route table;
+ // EnableVgwRoutePropagation indicates that the route was propagated by route
+ // propagation.
+ //
+ // * route.state - The state of a route in the route table (active |
+ // blackhole). The blackhole state indicates that the route's target isn't
+ // available (for example, the specified gateway isn't attached to the VPC, the
+ // specified NAT instance has been terminated, and so on).
+ //
+ // *
+ // route.vpc-peering-connection-id - The ID of a VPC peering connection specified
+ // in a route in the table.
+ //
+ // * tag: - The key/value combination of a tag assigned
+ // to the resource. Use the tag key in the filter name and the tag value as the
+ // filter value. For example, to find all resources that have a tag with the key
+ // Owner and the value TeamA, specify tag:Owner for the filter name and TeamA for
+ // the filter value.
+ //
+ // * tag-key - The key of a tag assigned to the resource. Use
+ // this filter to find all resources assigned a tag with a specific key, regardless
+ // of the tag value.
+ //
+ // * vpc-id - The ID of the VPC for the route table.
+ Filters []types.Filter
+
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ MaxResults *int32
+
+ // The token for the next page of results.
+ NextToken *string
+
+ // One or more route table IDs. Default: Describes all your route tables.
+ RouteTableIds []string
+
+ noSmithyDocumentSerde
+}
+
+// Contains the output of DescribeRouteTables.
+type DescribeRouteTablesOutput struct {
+
+ // The token to use to retrieve the next page of results. This value is null when
+ // there are no more results to return.
+ NextToken *string
+
+ // Information about one or more route tables.
+ RouteTables []types.RouteTable
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeRouteTablesMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeRouteTables{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeRouteTables{}, 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_opDescribeRouteTables(options.Region), middleware.Before); 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
+}
+
+// DescribeRouteTablesAPIClient is a client that implements the DescribeRouteTables
+// operation.
+type DescribeRouteTablesAPIClient interface {
+ DescribeRouteTables(context.Context, *DescribeRouteTablesInput, ...func(*Options)) (*DescribeRouteTablesOutput, error)
+}
+
+var _ DescribeRouteTablesAPIClient = (*Client)(nil)
+
+// DescribeRouteTablesPaginatorOptions is the paginator options for
+// DescribeRouteTables
+type DescribeRouteTablesPaginatorOptions struct {
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ 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
+}
+
+// DescribeRouteTablesPaginator is a paginator for DescribeRouteTables
+type DescribeRouteTablesPaginator struct {
+ options DescribeRouteTablesPaginatorOptions
+ client DescribeRouteTablesAPIClient
+ params *DescribeRouteTablesInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribeRouteTablesPaginator returns a new DescribeRouteTablesPaginator
+func NewDescribeRouteTablesPaginator(client DescribeRouteTablesAPIClient, params *DescribeRouteTablesInput, optFns ...func(*DescribeRouteTablesPaginatorOptions)) *DescribeRouteTablesPaginator {
+ if params == nil {
+ params = &DescribeRouteTablesInput{}
+ }
+
+ options := DescribeRouteTablesPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribeRouteTablesPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribeRouteTablesPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribeRouteTables page.
+func (p *DescribeRouteTablesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeRouteTablesOutput, 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.DescribeRouteTables(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_opDescribeRouteTables(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeRouteTables",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeScheduledInstanceAvailability.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeScheduledInstanceAvailability.go
new file mode 100644
index 00000000..df41c64a
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeScheduledInstanceAvailability.go
@@ -0,0 +1,267 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Finds available schedules that meet the specified criteria. You can search for
+// an available schedule no more than 3 months in advance. You must meet the
+// minimum required duration of 1,200 hours per year. For example, the minimum
+// daily schedule is 4 hours, the minimum weekly schedule is 24 hours, and the
+// minimum monthly schedule is 100 hours. After you find a schedule that meets your
+// needs, call PurchaseScheduledInstances to purchase Scheduled Instances with that
+// schedule.
+func (c *Client) DescribeScheduledInstanceAvailability(ctx context.Context, params *DescribeScheduledInstanceAvailabilityInput, optFns ...func(*Options)) (*DescribeScheduledInstanceAvailabilityOutput, error) {
+ if params == nil {
+ params = &DescribeScheduledInstanceAvailabilityInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeScheduledInstanceAvailability", params, optFns, c.addOperationDescribeScheduledInstanceAvailabilityMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeScheduledInstanceAvailabilityOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+// Contains the parameters for DescribeScheduledInstanceAvailability.
+type DescribeScheduledInstanceAvailabilityInput struct {
+
+ // The time period for the first schedule to start.
+ //
+ // This member is required.
+ FirstSlotStartTimeRange *types.SlotDateTimeRangeRequest
+
+ // The schedule recurrence.
+ //
+ // This member is required.
+ Recurrence *types.ScheduledInstanceRecurrenceRequest
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The filters.
+ //
+ // * availability-zone - The Availability Zone (for example,
+ // us-west-2a).
+ //
+ // * instance-type - The instance type (for example, c4.large).
+ //
+ // *
+ // network-platform - The network platform (EC2-Classic or EC2-VPC).
+ //
+ // * platform -
+ // The platform (Linux/UNIX or Windows).
+ Filters []types.Filter
+
+ // The maximum number of results to return in a single call. This value can be
+ // between 5 and 300. The default value is 300. To retrieve the remaining results,
+ // make another call with the returned NextToken value.
+ MaxResults *int32
+
+ // The maximum available duration, in hours. This value must be greater than
+ // MinSlotDurationInHours and less than 1,720.
+ MaxSlotDurationInHours *int32
+
+ // The minimum available duration, in hours. The minimum required duration is 1,200
+ // hours per year. For example, the minimum daily schedule is 4 hours, the minimum
+ // weekly schedule is 24 hours, and the minimum monthly schedule is 100 hours.
+ MinSlotDurationInHours *int32
+
+ // The token for the next set of results.
+ NextToken *string
+
+ noSmithyDocumentSerde
+}
+
+// Contains the output of DescribeScheduledInstanceAvailability.
+type DescribeScheduledInstanceAvailabilityOutput struct {
+
+ // The token required to retrieve the next set of results. This value is null when
+ // there are no more results to return.
+ NextToken *string
+
+ // Information about the available Scheduled Instances.
+ ScheduledInstanceAvailabilitySet []types.ScheduledInstanceAvailability
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeScheduledInstanceAvailabilityMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeScheduledInstanceAvailability{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeScheduledInstanceAvailability{}, 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 = addOpDescribeScheduledInstanceAvailabilityValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeScheduledInstanceAvailability(options.Region), middleware.Before); 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
+}
+
+// DescribeScheduledInstanceAvailabilityAPIClient is a client that implements the
+// DescribeScheduledInstanceAvailability operation.
+type DescribeScheduledInstanceAvailabilityAPIClient interface {
+ DescribeScheduledInstanceAvailability(context.Context, *DescribeScheduledInstanceAvailabilityInput, ...func(*Options)) (*DescribeScheduledInstanceAvailabilityOutput, error)
+}
+
+var _ DescribeScheduledInstanceAvailabilityAPIClient = (*Client)(nil)
+
+// DescribeScheduledInstanceAvailabilityPaginatorOptions is the paginator options
+// for DescribeScheduledInstanceAvailability
+type DescribeScheduledInstanceAvailabilityPaginatorOptions struct {
+ // The maximum number of results to return in a single call. This value can be
+ // between 5 and 300. The default value is 300. To retrieve the remaining results,
+ // make another call with the returned NextToken value.
+ 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
+}
+
+// DescribeScheduledInstanceAvailabilityPaginator is a paginator for
+// DescribeScheduledInstanceAvailability
+type DescribeScheduledInstanceAvailabilityPaginator struct {
+ options DescribeScheduledInstanceAvailabilityPaginatorOptions
+ client DescribeScheduledInstanceAvailabilityAPIClient
+ params *DescribeScheduledInstanceAvailabilityInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribeScheduledInstanceAvailabilityPaginator returns a new
+// DescribeScheduledInstanceAvailabilityPaginator
+func NewDescribeScheduledInstanceAvailabilityPaginator(client DescribeScheduledInstanceAvailabilityAPIClient, params *DescribeScheduledInstanceAvailabilityInput, optFns ...func(*DescribeScheduledInstanceAvailabilityPaginatorOptions)) *DescribeScheduledInstanceAvailabilityPaginator {
+ if params == nil {
+ params = &DescribeScheduledInstanceAvailabilityInput{}
+ }
+
+ options := DescribeScheduledInstanceAvailabilityPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribeScheduledInstanceAvailabilityPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribeScheduledInstanceAvailabilityPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribeScheduledInstanceAvailability page.
+func (p *DescribeScheduledInstanceAvailabilityPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeScheduledInstanceAvailabilityOutput, 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.DescribeScheduledInstanceAvailability(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_opDescribeScheduledInstanceAvailability(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeScheduledInstanceAvailability",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeScheduledInstances.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeScheduledInstances.go
new file mode 100644
index 00000000..a6fa1a8d
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeScheduledInstances.go
@@ -0,0 +1,245 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes the specified Scheduled Instances or all your Scheduled Instances.
+func (c *Client) DescribeScheduledInstances(ctx context.Context, params *DescribeScheduledInstancesInput, optFns ...func(*Options)) (*DescribeScheduledInstancesOutput, error) {
+ if params == nil {
+ params = &DescribeScheduledInstancesInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeScheduledInstances", params, optFns, c.addOperationDescribeScheduledInstancesMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeScheduledInstancesOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+// Contains the parameters for DescribeScheduledInstances.
+type DescribeScheduledInstancesInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The filters.
+ //
+ // * availability-zone - The Availability Zone (for example,
+ // us-west-2a).
+ //
+ // * instance-type - The instance type (for example, c4.large).
+ //
+ // *
+ // network-platform - The network platform (EC2-Classic or EC2-VPC).
+ //
+ // * platform -
+ // The platform (Linux/UNIX or Windows).
+ Filters []types.Filter
+
+ // The maximum number of results to return in a single call. This value can be
+ // between 5 and 300. The default value is 100. To retrieve the remaining results,
+ // make another call with the returned NextToken value.
+ MaxResults *int32
+
+ // The token for the next set of results.
+ NextToken *string
+
+ // The Scheduled Instance IDs.
+ ScheduledInstanceIds []string
+
+ // The time period for the first schedule to start.
+ SlotStartTimeRange *types.SlotStartTimeRangeRequest
+
+ noSmithyDocumentSerde
+}
+
+// Contains the output of DescribeScheduledInstances.
+type DescribeScheduledInstancesOutput struct {
+
+ // The token required to retrieve the next set of results. This value is null when
+ // there are no more results to return.
+ NextToken *string
+
+ // Information about the Scheduled Instances.
+ ScheduledInstanceSet []types.ScheduledInstance
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeScheduledInstancesMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeScheduledInstances{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeScheduledInstances{}, 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_opDescribeScheduledInstances(options.Region), middleware.Before); 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
+}
+
+// DescribeScheduledInstancesAPIClient is a client that implements the
+// DescribeScheduledInstances operation.
+type DescribeScheduledInstancesAPIClient interface {
+ DescribeScheduledInstances(context.Context, *DescribeScheduledInstancesInput, ...func(*Options)) (*DescribeScheduledInstancesOutput, error)
+}
+
+var _ DescribeScheduledInstancesAPIClient = (*Client)(nil)
+
+// DescribeScheduledInstancesPaginatorOptions is the paginator options for
+// DescribeScheduledInstances
+type DescribeScheduledInstancesPaginatorOptions struct {
+ // The maximum number of results to return in a single call. This value can be
+ // between 5 and 300. The default value is 100. To retrieve the remaining results,
+ // make another call with the returned NextToken value.
+ 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
+}
+
+// DescribeScheduledInstancesPaginator is a paginator for
+// DescribeScheduledInstances
+type DescribeScheduledInstancesPaginator struct {
+ options DescribeScheduledInstancesPaginatorOptions
+ client DescribeScheduledInstancesAPIClient
+ params *DescribeScheduledInstancesInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribeScheduledInstancesPaginator returns a new
+// DescribeScheduledInstancesPaginator
+func NewDescribeScheduledInstancesPaginator(client DescribeScheduledInstancesAPIClient, params *DescribeScheduledInstancesInput, optFns ...func(*DescribeScheduledInstancesPaginatorOptions)) *DescribeScheduledInstancesPaginator {
+ if params == nil {
+ params = &DescribeScheduledInstancesInput{}
+ }
+
+ options := DescribeScheduledInstancesPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribeScheduledInstancesPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribeScheduledInstancesPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribeScheduledInstances page.
+func (p *DescribeScheduledInstancesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeScheduledInstancesOutput, 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.DescribeScheduledInstances(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_opDescribeScheduledInstances(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeScheduledInstances",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeSecurityGroupReferences.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeSecurityGroupReferences.go
new file mode 100644
index 00000000..87431e7b
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeSecurityGroupReferences.go
@@ -0,0 +1,128 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// [VPC only] Describes the VPCs on the other side of a VPC peering connection that
+// are referencing the security groups you've specified in this request.
+func (c *Client) DescribeSecurityGroupReferences(ctx context.Context, params *DescribeSecurityGroupReferencesInput, optFns ...func(*Options)) (*DescribeSecurityGroupReferencesOutput, error) {
+ if params == nil {
+ params = &DescribeSecurityGroupReferencesInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeSecurityGroupReferences", params, optFns, c.addOperationDescribeSecurityGroupReferencesMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeSecurityGroupReferencesOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeSecurityGroupReferencesInput struct {
+
+ // The IDs of the security groups in your account.
+ //
+ // This member is required.
+ GroupId []string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type DescribeSecurityGroupReferencesOutput struct {
+
+ // Information about the VPCs with the referencing security groups.
+ SecurityGroupReferenceSet []types.SecurityGroupReference
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeSecurityGroupReferencesMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeSecurityGroupReferences{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeSecurityGroupReferences{}, 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 = addOpDescribeSecurityGroupReferencesValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeSecurityGroupReferences(options.Region), middleware.Before); 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_opDescribeSecurityGroupReferences(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeSecurityGroupReferences",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeSecurityGroupRules.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeSecurityGroupRules.go
new file mode 100644
index 00000000..6c245aeb
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeSecurityGroupRules.go
@@ -0,0 +1,242 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes one or more of your security group rules.
+func (c *Client) DescribeSecurityGroupRules(ctx context.Context, params *DescribeSecurityGroupRulesInput, optFns ...func(*Options)) (*DescribeSecurityGroupRulesOutput, error) {
+ if params == nil {
+ params = &DescribeSecurityGroupRulesInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeSecurityGroupRules", params, optFns, c.addOperationDescribeSecurityGroupRulesMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeSecurityGroupRulesOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeSecurityGroupRulesInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // One or more filters.
+ //
+ // * group-id - The ID of the security group.
+ //
+ // *
+ // security-group-rule-id - The ID of the security group rule.
+ //
+ // * tag: - The
+ // key/value combination of a tag assigned to the resource. Use the tag key in the
+ // filter name and the tag value as the filter value. For example, to find all
+ // resources that have a tag with the key Owner and the value TeamA, specify
+ // tag:Owner for the filter name and TeamA for the filter value.
+ Filters []types.Filter
+
+ // The maximum number of results to return in a single call. To retrieve the
+ // remaining results, make another request with the returned NextToken value. This
+ // value can be between 5 and 1000. If this parameter is not specified, then all
+ // results are returned.
+ MaxResults *int32
+
+ // The token for the next page of results.
+ NextToken *string
+
+ // The IDs of the security group rules.
+ SecurityGroupRuleIds []string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeSecurityGroupRulesOutput struct {
+
+ // The token to use to retrieve the next page of results. This value is null when
+ // there are no more results to return.
+ NextToken *string
+
+ // Information about security group rules.
+ SecurityGroupRules []types.SecurityGroupRule
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeSecurityGroupRulesMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeSecurityGroupRules{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeSecurityGroupRules{}, 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_opDescribeSecurityGroupRules(options.Region), middleware.Before); 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
+}
+
+// DescribeSecurityGroupRulesAPIClient is a client that implements the
+// DescribeSecurityGroupRules operation.
+type DescribeSecurityGroupRulesAPIClient interface {
+ DescribeSecurityGroupRules(context.Context, *DescribeSecurityGroupRulesInput, ...func(*Options)) (*DescribeSecurityGroupRulesOutput, error)
+}
+
+var _ DescribeSecurityGroupRulesAPIClient = (*Client)(nil)
+
+// DescribeSecurityGroupRulesPaginatorOptions is the paginator options for
+// DescribeSecurityGroupRules
+type DescribeSecurityGroupRulesPaginatorOptions struct {
+ // The maximum number of results to return in a single call. To retrieve the
+ // remaining results, make another request with the returned NextToken value. This
+ // value can be between 5 and 1000. If this parameter is not specified, then all
+ // results are 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
+}
+
+// DescribeSecurityGroupRulesPaginator is a paginator for
+// DescribeSecurityGroupRules
+type DescribeSecurityGroupRulesPaginator struct {
+ options DescribeSecurityGroupRulesPaginatorOptions
+ client DescribeSecurityGroupRulesAPIClient
+ params *DescribeSecurityGroupRulesInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribeSecurityGroupRulesPaginator returns a new
+// DescribeSecurityGroupRulesPaginator
+func NewDescribeSecurityGroupRulesPaginator(client DescribeSecurityGroupRulesAPIClient, params *DescribeSecurityGroupRulesInput, optFns ...func(*DescribeSecurityGroupRulesPaginatorOptions)) *DescribeSecurityGroupRulesPaginator {
+ if params == nil {
+ params = &DescribeSecurityGroupRulesInput{}
+ }
+
+ options := DescribeSecurityGroupRulesPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribeSecurityGroupRulesPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribeSecurityGroupRulesPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribeSecurityGroupRules page.
+func (p *DescribeSecurityGroupRulesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeSecurityGroupRulesOutput, 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.DescribeSecurityGroupRules(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_opDescribeSecurityGroupRules(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeSecurityGroupRules",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeSecurityGroups.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeSecurityGroups.go
new file mode 100644
index 00000000..1071b8f0
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeSecurityGroups.go
@@ -0,0 +1,507 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+import (
+ "context"
+ "errors"
+ "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/ec2/types"
+ smithy "github.com/aws/smithy-go"
+ "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"
+ "strconv"
+ "time"
+)
+
+// Describes the specified security groups or all of your security groups. A
+// security group is for use with instances either in the EC2-Classic platform or
+// in a specific VPC. For more information, see Amazon EC2 security groups
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-network-security.html)
+// in the Amazon Elastic Compute Cloud User Guide and Security groups for your VPC
+// (https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_SecurityGroups.html)
+// in the Amazon Virtual Private Cloud User Guide.
+func (c *Client) DescribeSecurityGroups(ctx context.Context, params *DescribeSecurityGroupsInput, optFns ...func(*Options)) (*DescribeSecurityGroupsOutput, error) {
+ if params == nil {
+ params = &DescribeSecurityGroupsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeSecurityGroups", params, optFns, c.addOperationDescribeSecurityGroupsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeSecurityGroupsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeSecurityGroupsInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The filters. If using multiple filters for rules, the results include security
+ // groups for which any combination of rules - not necessarily a single rule -
+ // match all filters.
+ //
+ // * description - The description of the security group.
+ //
+ // *
+ // egress.ip-permission.cidr - An IPv4 CIDR block for an outbound security group
+ // rule.
+ //
+ // * egress.ip-permission.from-port - For an outbound rule, the start of
+ // port range for the TCP and UDP protocols, or an ICMP type number.
+ //
+ // *
+ // egress.ip-permission.group-id - The ID of a security group that has been
+ // referenced in an outbound security group rule.
+ //
+ // *
+ // egress.ip-permission.group-name - The name of a security group that is
+ // referenced in an outbound security group rule.
+ //
+ // * egress.ip-permission.ipv6-cidr
+ // - An IPv6 CIDR block for an outbound security group rule.
+ //
+ // *
+ // egress.ip-permission.prefix-list-id - The ID of a prefix list to which a
+ // security group rule allows outbound access.
+ //
+ // * egress.ip-permission.protocol -
+ // The IP protocol for an outbound security group rule (tcp | udp | icmp, a
+ // protocol number, or -1 for all protocols).
+ //
+ // * egress.ip-permission.to-port - For
+ // an outbound rule, the end of port range for the TCP and UDP protocols, or an
+ // ICMP code.
+ //
+ // * egress.ip-permission.user-id - The ID of an Amazon Web Services
+ // account that has been referenced in an outbound security group rule.
+ //
+ // * group-id
+ // - The ID of the security group.
+ //
+ // * group-name - The name of the security
+ // group.
+ //
+ // * ip-permission.cidr - An IPv4 CIDR block for an inbound security group
+ // rule.
+ //
+ // * ip-permission.from-port - For an inbound rule, the start of port range
+ // for the TCP and UDP protocols, or an ICMP type number.
+ //
+ // * ip-permission.group-id
+ // - The ID of a security group that has been referenced in an inbound security
+ // group rule.
+ //
+ // * ip-permission.group-name - The name of a security group that is
+ // referenced in an inbound security group rule.
+ //
+ // * ip-permission.ipv6-cidr - An
+ // IPv6 CIDR block for an inbound security group rule.
+ //
+ // *
+ // ip-permission.prefix-list-id - The ID of a prefix list from which a security
+ // group rule allows inbound access.
+ //
+ // * ip-permission.protocol - The IP protocol
+ // for an inbound security group rule (tcp | udp | icmp, a protocol number, or -1
+ // for all protocols).
+ //
+ // * ip-permission.to-port - For an inbound rule, the end of
+ // port range for the TCP and UDP protocols, or an ICMP code.
+ //
+ // *
+ // ip-permission.user-id - The ID of an Amazon Web Services account that has been
+ // referenced in an inbound security group rule.
+ //
+ // * owner-id - The Amazon Web
+ // Services account ID of the owner of the security group.
+ //
+ // * tag: - The key/value
+ // combination of a tag assigned to the resource. Use the tag key in the filter
+ // name and the tag value as the filter value. For example, to find all resources
+ // that have a tag with the key Owner and the value TeamA, specify tag:Owner for
+ // the filter name and TeamA for the filter value.
+ //
+ // * tag-key - The key of a tag
+ // assigned to the resource. Use this filter to find all resources assigned a tag
+ // with a specific key, regardless of the tag value.
+ //
+ // * vpc-id - The ID of the VPC
+ // specified when the security group was created.
+ Filters []types.Filter
+
+ // The IDs of the security groups. Required for security groups in a nondefault
+ // VPC. Default: Describes all of your security groups.
+ GroupIds []string
+
+ // [EC2-Classic and default VPC only] The names of the security groups. You can
+ // specify either the security group name or the security group ID. For security
+ // groups in a nondefault VPC, use the group-name filter to describe security
+ // groups by name. Default: Describes all of your security groups.
+ GroupNames []string
+
+ // The maximum number of results to return in a single call. To retrieve the
+ // remaining results, make another request with the returned NextToken value. This
+ // value can be between 5 and 1000. If this parameter is not specified, then all
+ // results are returned.
+ MaxResults *int32
+
+ // The token to request the next page of results.
+ NextToken *string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeSecurityGroupsOutput struct {
+
+ // The token to use to retrieve the next page of results. This value is null when
+ // there are no more results to return.
+ NextToken *string
+
+ // Information about the security groups.
+ SecurityGroups []types.SecurityGroup
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeSecurityGroupsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeSecurityGroups{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeSecurityGroups{}, 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_opDescribeSecurityGroups(options.Region), middleware.Before); 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
+}
+
+// DescribeSecurityGroupsAPIClient is a client that implements the
+// DescribeSecurityGroups operation.
+type DescribeSecurityGroupsAPIClient interface {
+ DescribeSecurityGroups(context.Context, *DescribeSecurityGroupsInput, ...func(*Options)) (*DescribeSecurityGroupsOutput, error)
+}
+
+var _ DescribeSecurityGroupsAPIClient = (*Client)(nil)
+
+// DescribeSecurityGroupsPaginatorOptions is the paginator options for
+// DescribeSecurityGroups
+type DescribeSecurityGroupsPaginatorOptions struct {
+ // The maximum number of results to return in a single call. To retrieve the
+ // remaining results, make another request with the returned NextToken value. This
+ // value can be between 5 and 1000. If this parameter is not specified, then all
+ // results are 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
+}
+
+// DescribeSecurityGroupsPaginator is a paginator for DescribeSecurityGroups
+type DescribeSecurityGroupsPaginator struct {
+ options DescribeSecurityGroupsPaginatorOptions
+ client DescribeSecurityGroupsAPIClient
+ params *DescribeSecurityGroupsInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribeSecurityGroupsPaginator returns a new DescribeSecurityGroupsPaginator
+func NewDescribeSecurityGroupsPaginator(client DescribeSecurityGroupsAPIClient, params *DescribeSecurityGroupsInput, optFns ...func(*DescribeSecurityGroupsPaginatorOptions)) *DescribeSecurityGroupsPaginator {
+ if params == nil {
+ params = &DescribeSecurityGroupsInput{}
+ }
+
+ options := DescribeSecurityGroupsPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribeSecurityGroupsPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribeSecurityGroupsPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribeSecurityGroups page.
+func (p *DescribeSecurityGroupsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeSecurityGroupsOutput, 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.DescribeSecurityGroups(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
+}
+
+// SecurityGroupExistsWaiterOptions are waiter options for
+// SecurityGroupExistsWaiter
+type SecurityGroupExistsWaiterOptions 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,
+ // SecurityGroupExistsWaiter will use default minimum delay of 5 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, SecurityGroupExistsWaiter 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, *DescribeSecurityGroupsInput, *DescribeSecurityGroupsOutput, error) (bool, error)
+}
+
+// SecurityGroupExistsWaiter defines the waiters for SecurityGroupExists
+type SecurityGroupExistsWaiter struct {
+ client DescribeSecurityGroupsAPIClient
+
+ options SecurityGroupExistsWaiterOptions
+}
+
+// NewSecurityGroupExistsWaiter constructs a SecurityGroupExistsWaiter.
+func NewSecurityGroupExistsWaiter(client DescribeSecurityGroupsAPIClient, optFns ...func(*SecurityGroupExistsWaiterOptions)) *SecurityGroupExistsWaiter {
+ options := SecurityGroupExistsWaiterOptions{}
+ options.MinDelay = 5 * time.Second
+ options.MaxDelay = 120 * time.Second
+ options.Retryable = securityGroupExistsStateRetryable
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+ return &SecurityGroupExistsWaiter{
+ client: client,
+ options: options,
+ }
+}
+
+// Wait calls the waiter function for SecurityGroupExists waiter. The maxWaitDur is
+// the maximum wait duration the waiter will wait. The maxWaitDur is required and
+// must be greater than zero.
+func (w *SecurityGroupExistsWaiter) Wait(ctx context.Context, params *DescribeSecurityGroupsInput, maxWaitDur time.Duration, optFns ...func(*SecurityGroupExistsWaiterOptions)) error {
+ if maxWaitDur <= 0 {
+ return 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 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.DescribeSecurityGroups(ctx, params, func(o *Options) {
+ o.APIOptions = append(o.APIOptions, apiOptions...)
+ })
+
+ retryable, err := options.Retryable(ctx, params, out, err)
+ if err != nil {
+ return err
+ }
+ if !retryable {
+ return 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 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 fmt.Errorf("request cancelled while waiting, %w", err)
+ }
+ }
+ return fmt.Errorf("exceeded max wait time for SecurityGroupExists waiter")
+}
+
+func securityGroupExistsStateRetryable(ctx context.Context, input *DescribeSecurityGroupsInput, output *DescribeSecurityGroupsOutput, err error) (bool, error) {
+
+ if err == nil {
+ pathValue, err := jmespath.Search("length(SecurityGroups[].GroupId) > `0`", output)
+ if err != nil {
+ return false, fmt.Errorf("error evaluating waiter state: %w", err)
+ }
+
+ expectedValue := "true"
+ bv, err := strconv.ParseBool(expectedValue)
+ if err != nil {
+ return false, fmt.Errorf("error parsing boolean from string %w", err)
+ }
+ value, ok := pathValue.(bool)
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected bool value got %T", pathValue)
+ }
+
+ if value == bv {
+ return false, nil
+ }
+ }
+
+ if err != nil {
+ var apiErr smithy.APIError
+ ok := errors.As(err, &apiErr)
+ if !ok {
+ return false, fmt.Errorf("expected err to be of type smithy.APIError, got %w", err)
+ }
+
+ if "InvalidGroup.NotFound" == apiErr.ErrorCode() {
+ return true, nil
+ }
+ }
+
+ return true, nil
+}
+
+func newServiceMetadataMiddleware_opDescribeSecurityGroups(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeSecurityGroups",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeSnapshotAttribute.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeSnapshotAttribute.go
new file mode 100644
index 00000000..26a78815
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeSnapshotAttribute.go
@@ -0,0 +1,143 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes the specified attribute of the specified snapshot. You can specify
+// only one attribute at a time. For more information about EBS snapshots, see
+// Amazon EBS snapshots
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSSnapshots.html) in the
+// Amazon Elastic Compute Cloud User Guide.
+func (c *Client) DescribeSnapshotAttribute(ctx context.Context, params *DescribeSnapshotAttributeInput, optFns ...func(*Options)) (*DescribeSnapshotAttributeOutput, error) {
+ if params == nil {
+ params = &DescribeSnapshotAttributeInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeSnapshotAttribute", params, optFns, c.addOperationDescribeSnapshotAttributeMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeSnapshotAttributeOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeSnapshotAttributeInput struct {
+
+ // The snapshot attribute you would like to view.
+ //
+ // This member is required.
+ Attribute types.SnapshotAttributeName
+
+ // The ID of the EBS snapshot.
+ //
+ // This member is required.
+ SnapshotId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type DescribeSnapshotAttributeOutput struct {
+
+ // The users and groups that have the permissions for creating volumes from the
+ // snapshot.
+ CreateVolumePermissions []types.CreateVolumePermission
+
+ // The product codes.
+ ProductCodes []types.ProductCode
+
+ // The ID of the EBS snapshot.
+ SnapshotId *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeSnapshotAttributeMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeSnapshotAttribute{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeSnapshotAttribute{}, 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 = addOpDescribeSnapshotAttributeValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeSnapshotAttribute(options.Region), middleware.Before); 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_opDescribeSnapshotAttribute(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeSnapshotAttribute",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeSnapshots.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeSnapshots.go
new file mode 100644
index 00000000..ed3fa491
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeSnapshots.go
@@ -0,0 +1,505 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/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"
+)
+
+// Describes the specified EBS snapshots available to you or all of the EBS
+// snapshots available to you. The snapshots available to you include public
+// snapshots, private snapshots that you own, and private snapshots owned by other
+// Amazon Web Services accounts for which you have explicit create volume
+// permissions. The create volume permissions fall into the following
+// categories:
+//
+// * public: The owner of the snapshot granted create volume
+// permissions for the snapshot to the all group. All Amazon Web Services accounts
+// have create volume permissions for these snapshots.
+//
+// * explicit: The owner of
+// the snapshot granted create volume permissions to a specific Amazon Web Services
+// account.
+//
+// * implicit: An Amazon Web Services account has implicit create volume
+// permissions for all snapshots it owns.
+//
+// The list of snapshots returned can be
+// filtered by specifying snapshot IDs, snapshot owners, or Amazon Web Services
+// accounts with create volume permissions. If no options are specified, Amazon EC2
+// returns all snapshots for which you have create volume permissions. If you
+// specify one or more snapshot IDs, only snapshots that have the specified IDs are
+// returned. If you specify an invalid snapshot ID, an error is returned. If you
+// specify a snapshot ID for which you do not have access, it is not included in
+// the returned results. If you specify one or more snapshot owners using the
+// OwnerIds option, only snapshots from the specified owners and for which you have
+// access are returned. The results can include the Amazon Web Services account IDs
+// of the specified owners, amazon for snapshots owned by Amazon, or self for
+// snapshots that you own. If you specify a list of restorable users, only
+// snapshots with create snapshot permissions for those users are returned. You can
+// specify Amazon Web Services account IDs (if you own the snapshots), self for
+// snapshots for which you own or have explicit permissions, or all for public
+// snapshots. If you are describing a long list of snapshots, we recommend that you
+// paginate the output to make the list more manageable. The MaxResults parameter
+// sets the maximum number of results returned in a single page. If the list of
+// results exceeds your MaxResults value, then that number of results is returned
+// along with a NextToken value that can be passed to a subsequent
+// DescribeSnapshots request to retrieve the remaining results. To get the state of
+// fast snapshot restores for a snapshot, use DescribeFastSnapshotRestores. For
+// more information about EBS snapshots, see Amazon EBS snapshots
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSSnapshots.html) in the
+// Amazon Elastic Compute Cloud User Guide.
+func (c *Client) DescribeSnapshots(ctx context.Context, params *DescribeSnapshotsInput, optFns ...func(*Options)) (*DescribeSnapshotsOutput, error) {
+ if params == nil {
+ params = &DescribeSnapshotsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeSnapshots", params, optFns, c.addOperationDescribeSnapshotsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeSnapshotsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeSnapshotsInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The filters.
+ //
+ // * description - A description of the snapshot.
+ //
+ // * encrypted -
+ // Indicates whether the snapshot is encrypted (true | false)
+ //
+ // * owner-alias - The
+ // owner alias, from an Amazon-maintained list (amazon). This is not the
+ // user-configured Amazon Web Services account alias set using the IAM console. We
+ // recommend that you use the related parameter instead of this filter.
+ //
+ // * owner-id
+ // - The Amazon Web Services account ID of the owner. We recommend that you use the
+ // related parameter instead of this filter.
+ //
+ // * progress - The progress of the
+ // snapshot, as a percentage (for example, 80%).
+ //
+ // * snapshot-id - The snapshot
+ // ID.
+ //
+ // * start-time - The time stamp when the snapshot was initiated.
+ //
+ // * status -
+ // The status of the snapshot (pending | completed | error).
+ //
+ // * tag: - The
+ // key/value combination of a tag assigned to the resource. Use the tag key in the
+ // filter name and the tag value as the filter value. For example, to find all
+ // resources that have a tag with the key Owner and the value TeamA, specify
+ // tag:Owner for the filter name and TeamA for the filter value.
+ //
+ // * tag-key - The
+ // key of a tag assigned to the resource. Use this filter to find all resources
+ // assigned a tag with a specific key, regardless of the tag value.
+ //
+ // * volume-id -
+ // The ID of the volume the snapshot is for.
+ //
+ // * volume-size - The size of the
+ // volume, in GiB.
+ Filters []types.Filter
+
+ // The maximum number of snapshot results returned by DescribeSnapshots in
+ // paginated output. When this parameter is used, DescribeSnapshots only returns
+ // MaxResults results in a single page along with a NextToken response element. The
+ // remaining results of the initial request can be seen by sending another
+ // DescribeSnapshots request with the returned NextToken value. This value can be
+ // between 5 and 1,000; if MaxResults is given a value larger than 1,000, only
+ // 1,000 results are returned. If this parameter is not used, then
+ // DescribeSnapshots returns all results. You cannot specify this parameter and the
+ // snapshot IDs parameter in the same request.
+ MaxResults *int32
+
+ // The NextToken value returned from a previous paginated DescribeSnapshots request
+ // where MaxResults was used and the results exceeded the value of that parameter.
+ // Pagination continues from the end of the previous results that returned the
+ // NextToken value. This value is null when there are no more results to return.
+ NextToken *string
+
+ // Scopes the results to snapshots with the specified owners. You can specify a
+ // combination of Amazon Web Services account IDs, self, and amazon.
+ OwnerIds []string
+
+ // The IDs of the Amazon Web Services accounts that can create volumes from the
+ // snapshot.
+ RestorableByUserIds []string
+
+ // The snapshot IDs. Default: Describes the snapshots for which you have create
+ // volume permissions.
+ SnapshotIds []string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeSnapshotsOutput struct {
+
+ // The NextToken value to include in a future DescribeSnapshots request. When the
+ // results of a DescribeSnapshots request exceed MaxResults, this value can be used
+ // to retrieve the next page of results. This value is null when there are no more
+ // results to return.
+ NextToken *string
+
+ // Information about the snapshots.
+ Snapshots []types.Snapshot
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeSnapshotsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeSnapshots{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeSnapshots{}, 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_opDescribeSnapshots(options.Region), middleware.Before); 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
+}
+
+// DescribeSnapshotsAPIClient is a client that implements the DescribeSnapshots
+// operation.
+type DescribeSnapshotsAPIClient interface {
+ DescribeSnapshots(context.Context, *DescribeSnapshotsInput, ...func(*Options)) (*DescribeSnapshotsOutput, error)
+}
+
+var _ DescribeSnapshotsAPIClient = (*Client)(nil)
+
+// DescribeSnapshotsPaginatorOptions is the paginator options for DescribeSnapshots
+type DescribeSnapshotsPaginatorOptions struct {
+ // The maximum number of snapshot results returned by DescribeSnapshots in
+ // paginated output. When this parameter is used, DescribeSnapshots only returns
+ // MaxResults results in a single page along with a NextToken response element. The
+ // remaining results of the initial request can be seen by sending another
+ // DescribeSnapshots request with the returned NextToken value. This value can be
+ // between 5 and 1,000; if MaxResults is given a value larger than 1,000, only
+ // 1,000 results are returned. If this parameter is not used, then
+ // DescribeSnapshots returns all results. You cannot specify this parameter and the
+ // snapshot IDs parameter in the same 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
+}
+
+// DescribeSnapshotsPaginator is a paginator for DescribeSnapshots
+type DescribeSnapshotsPaginator struct {
+ options DescribeSnapshotsPaginatorOptions
+ client DescribeSnapshotsAPIClient
+ params *DescribeSnapshotsInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribeSnapshotsPaginator returns a new DescribeSnapshotsPaginator
+func NewDescribeSnapshotsPaginator(client DescribeSnapshotsAPIClient, params *DescribeSnapshotsInput, optFns ...func(*DescribeSnapshotsPaginatorOptions)) *DescribeSnapshotsPaginator {
+ if params == nil {
+ params = &DescribeSnapshotsInput{}
+ }
+
+ options := DescribeSnapshotsPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribeSnapshotsPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribeSnapshotsPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribeSnapshots page.
+func (p *DescribeSnapshotsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeSnapshotsOutput, 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.DescribeSnapshots(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
+}
+
+// SnapshotCompletedWaiterOptions are waiter options for SnapshotCompletedWaiter
+type SnapshotCompletedWaiterOptions 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,
+ // SnapshotCompletedWaiter will use default minimum delay of 15 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, SnapshotCompletedWaiter 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, *DescribeSnapshotsInput, *DescribeSnapshotsOutput, error) (bool, error)
+}
+
+// SnapshotCompletedWaiter defines the waiters for SnapshotCompleted
+type SnapshotCompletedWaiter struct {
+ client DescribeSnapshotsAPIClient
+
+ options SnapshotCompletedWaiterOptions
+}
+
+// NewSnapshotCompletedWaiter constructs a SnapshotCompletedWaiter.
+func NewSnapshotCompletedWaiter(client DescribeSnapshotsAPIClient, optFns ...func(*SnapshotCompletedWaiterOptions)) *SnapshotCompletedWaiter {
+ options := SnapshotCompletedWaiterOptions{}
+ options.MinDelay = 15 * time.Second
+ options.MaxDelay = 120 * time.Second
+ options.Retryable = snapshotCompletedStateRetryable
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+ return &SnapshotCompletedWaiter{
+ client: client,
+ options: options,
+ }
+}
+
+// Wait calls the waiter function for SnapshotCompleted waiter. The maxWaitDur is
+// the maximum wait duration the waiter will wait. The maxWaitDur is required and
+// must be greater than zero.
+func (w *SnapshotCompletedWaiter) Wait(ctx context.Context, params *DescribeSnapshotsInput, maxWaitDur time.Duration, optFns ...func(*SnapshotCompletedWaiterOptions)) error {
+ if maxWaitDur <= 0 {
+ return 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 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.DescribeSnapshots(ctx, params, func(o *Options) {
+ o.APIOptions = append(o.APIOptions, apiOptions...)
+ })
+
+ retryable, err := options.Retryable(ctx, params, out, err)
+ if err != nil {
+ return err
+ }
+ if !retryable {
+ return 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 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 fmt.Errorf("request cancelled while waiting, %w", err)
+ }
+ }
+ return fmt.Errorf("exceeded max wait time for SnapshotCompleted waiter")
+}
+
+func snapshotCompletedStateRetryable(ctx context.Context, input *DescribeSnapshotsInput, output *DescribeSnapshotsOutput, err error) (bool, error) {
+
+ if err == nil {
+ pathValue, err := jmespath.Search("Snapshots[].State", output)
+ if err != nil {
+ return false, fmt.Errorf("error evaluating waiter state: %w", err)
+ }
+
+ expectedValue := "completed"
+ var match = true
+ listOfValues, ok := pathValue.([]interface{})
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected list got %T", pathValue)
+ }
+
+ if len(listOfValues) == 0 {
+ match = false
+ }
+ for _, v := range listOfValues {
+ value, ok := v.(types.SnapshotState)
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected types.SnapshotState value, got %T", pathValue)
+ }
+
+ if string(value) != expectedValue {
+ match = false
+ }
+ }
+
+ if match {
+ return false, nil
+ }
+ }
+
+ return true, nil
+}
+
+func newServiceMetadataMiddleware_opDescribeSnapshots(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeSnapshots",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeSpotDatafeedSubscription.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeSpotDatafeedSubscription.go
new file mode 100644
index 00000000..ba0c5f85
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeSpotDatafeedSubscription.go
@@ -0,0 +1,124 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes the data feed for Spot Instances. For more information, see Spot
+// Instance data feed
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-data-feeds.html) in
+// the Amazon EC2 User Guide for Linux Instances.
+func (c *Client) DescribeSpotDatafeedSubscription(ctx context.Context, params *DescribeSpotDatafeedSubscriptionInput, optFns ...func(*Options)) (*DescribeSpotDatafeedSubscriptionOutput, error) {
+ if params == nil {
+ params = &DescribeSpotDatafeedSubscriptionInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeSpotDatafeedSubscription", params, optFns, c.addOperationDescribeSpotDatafeedSubscriptionMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeSpotDatafeedSubscriptionOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+// Contains the parameters for DescribeSpotDatafeedSubscription.
+type DescribeSpotDatafeedSubscriptionInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+// Contains the output of DescribeSpotDatafeedSubscription.
+type DescribeSpotDatafeedSubscriptionOutput struct {
+
+ // The Spot Instance data feed subscription.
+ SpotDatafeedSubscription *types.SpotDatafeedSubscription
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeSpotDatafeedSubscriptionMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeSpotDatafeedSubscription{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeSpotDatafeedSubscription{}, 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_opDescribeSpotDatafeedSubscription(options.Region), middleware.Before); 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_opDescribeSpotDatafeedSubscription(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeSpotDatafeedSubscription",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeSpotFleetInstances.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeSpotFleetInstances.go
new file mode 100644
index 00000000..9d26ed2c
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeSpotFleetInstances.go
@@ -0,0 +1,145 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes the running instances for the specified Spot Fleet.
+func (c *Client) DescribeSpotFleetInstances(ctx context.Context, params *DescribeSpotFleetInstancesInput, optFns ...func(*Options)) (*DescribeSpotFleetInstancesOutput, error) {
+ if params == nil {
+ params = &DescribeSpotFleetInstancesInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeSpotFleetInstances", params, optFns, c.addOperationDescribeSpotFleetInstancesMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeSpotFleetInstancesOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+// Contains the parameters for DescribeSpotFleetInstances.
+type DescribeSpotFleetInstancesInput struct {
+
+ // The ID of the Spot Fleet request.
+ //
+ // This member is required.
+ SpotFleetRequestId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The maximum number of results to return in a single call. Specify a value
+ // between 1 and 1000. The default value is 1000. To retrieve the remaining
+ // results, make another call with the returned NextToken value.
+ MaxResults *int32
+
+ // The token for the next set of results.
+ NextToken *string
+
+ noSmithyDocumentSerde
+}
+
+// Contains the output of DescribeSpotFleetInstances.
+type DescribeSpotFleetInstancesOutput struct {
+
+ // The running instances. This list is refreshed periodically and might be out of
+ // date.
+ ActiveInstances []types.ActiveInstance
+
+ // The token required to retrieve the next set of results. This value is null when
+ // there are no more results to return.
+ NextToken *string
+
+ // The ID of the Spot Fleet request.
+ SpotFleetRequestId *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeSpotFleetInstancesMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeSpotFleetInstances{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeSpotFleetInstances{}, 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 = addOpDescribeSpotFleetInstancesValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeSpotFleetInstances(options.Region), middleware.Before); 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_opDescribeSpotFleetInstances(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeSpotFleetInstances",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeSpotFleetRequestHistory.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeSpotFleetRequestHistory.go
new file mode 100644
index 00000000..4f3401b5
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeSpotFleetRequestHistory.go
@@ -0,0 +1,166 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "time"
+)
+
+// Describes the events for the specified Spot Fleet request during the specified
+// time. Spot Fleet events are delayed by up to 30 seconds before they can be
+// described. This ensures that you can query by the last evaluated time and not
+// miss a recorded event. Spot Fleet events are available for 48 hours.
+func (c *Client) DescribeSpotFleetRequestHistory(ctx context.Context, params *DescribeSpotFleetRequestHistoryInput, optFns ...func(*Options)) (*DescribeSpotFleetRequestHistoryOutput, error) {
+ if params == nil {
+ params = &DescribeSpotFleetRequestHistoryInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeSpotFleetRequestHistory", params, optFns, c.addOperationDescribeSpotFleetRequestHistoryMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeSpotFleetRequestHistoryOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+// Contains the parameters for DescribeSpotFleetRequestHistory.
+type DescribeSpotFleetRequestHistoryInput struct {
+
+ // The ID of the Spot Fleet request.
+ //
+ // This member is required.
+ SpotFleetRequestId *string
+
+ // The starting date and time for the events, in UTC format (for example,
+ // YYYY-MM-DDTHH:MM:SSZ).
+ //
+ // This member is required.
+ StartTime *time.Time
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The type of events to describe. By default, all events are described.
+ EventType types.EventType
+
+ // The maximum number of results to return in a single call. Specify a value
+ // between 1 and 1000. The default value is 1000. To retrieve the remaining
+ // results, make another call with the returned NextToken value.
+ MaxResults *int32
+
+ // The token for the next set of results.
+ NextToken *string
+
+ noSmithyDocumentSerde
+}
+
+// Contains the output of DescribeSpotFleetRequestHistory.
+type DescribeSpotFleetRequestHistoryOutput struct {
+
+ // Information about the events in the history of the Spot Fleet request.
+ HistoryRecords []types.HistoryRecord
+
+ // The last date and time for the events, in UTC format (for example,
+ // YYYY-MM-DDTHH:MM:SSZ). All records up to this time were retrieved. If nextToken
+ // indicates that there are more results, this value is not present.
+ LastEvaluatedTime *time.Time
+
+ // The token required to retrieve the next set of results. This value is null when
+ // there are no more results to return.
+ NextToken *string
+
+ // The ID of the Spot Fleet request.
+ SpotFleetRequestId *string
+
+ // The starting date and time for the events, in UTC format (for example,
+ // YYYY-MM-DDTHH:MM:SSZ).
+ StartTime *time.Time
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeSpotFleetRequestHistoryMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeSpotFleetRequestHistory{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeSpotFleetRequestHistory{}, 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 = addOpDescribeSpotFleetRequestHistoryValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeSpotFleetRequestHistory(options.Region), middleware.Before); 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_opDescribeSpotFleetRequestHistory(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeSpotFleetRequestHistory",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeSpotFleetRequests.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeSpotFleetRequests.go
new file mode 100644
index 00000000..27ec0cc1
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeSpotFleetRequests.go
@@ -0,0 +1,228 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes your Spot Fleet requests. Spot Fleet requests are deleted 48 hours
+// after they are canceled and their instances are terminated.
+func (c *Client) DescribeSpotFleetRequests(ctx context.Context, params *DescribeSpotFleetRequestsInput, optFns ...func(*Options)) (*DescribeSpotFleetRequestsOutput, error) {
+ if params == nil {
+ params = &DescribeSpotFleetRequestsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeSpotFleetRequests", params, optFns, c.addOperationDescribeSpotFleetRequestsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeSpotFleetRequestsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+// Contains the parameters for DescribeSpotFleetRequests.
+type DescribeSpotFleetRequestsInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The maximum number of results to return in a single call. Specify a value
+ // between 1 and 1000. The default value is 1000. To retrieve the remaining
+ // results, make another call with the returned NextToken value.
+ MaxResults *int32
+
+ // The token for the next set of results.
+ NextToken *string
+
+ // The IDs of the Spot Fleet requests.
+ SpotFleetRequestIds []string
+
+ noSmithyDocumentSerde
+}
+
+// Contains the output of DescribeSpotFleetRequests.
+type DescribeSpotFleetRequestsOutput struct {
+
+ // The token required to retrieve the next set of results. This value is null when
+ // there are no more results to return.
+ NextToken *string
+
+ // Information about the configuration of your Spot Fleet.
+ SpotFleetRequestConfigs []types.SpotFleetRequestConfig
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeSpotFleetRequestsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeSpotFleetRequests{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeSpotFleetRequests{}, 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_opDescribeSpotFleetRequests(options.Region), middleware.Before); 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
+}
+
+// DescribeSpotFleetRequestsAPIClient is a client that implements the
+// DescribeSpotFleetRequests operation.
+type DescribeSpotFleetRequestsAPIClient interface {
+ DescribeSpotFleetRequests(context.Context, *DescribeSpotFleetRequestsInput, ...func(*Options)) (*DescribeSpotFleetRequestsOutput, error)
+}
+
+var _ DescribeSpotFleetRequestsAPIClient = (*Client)(nil)
+
+// DescribeSpotFleetRequestsPaginatorOptions is the paginator options for
+// DescribeSpotFleetRequests
+type DescribeSpotFleetRequestsPaginatorOptions struct {
+ // The maximum number of results to return in a single call. Specify a value
+ // between 1 and 1000. The default value is 1000. To retrieve the remaining
+ // results, make another call with the returned NextToken value.
+ 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
+}
+
+// DescribeSpotFleetRequestsPaginator is a paginator for DescribeSpotFleetRequests
+type DescribeSpotFleetRequestsPaginator struct {
+ options DescribeSpotFleetRequestsPaginatorOptions
+ client DescribeSpotFleetRequestsAPIClient
+ params *DescribeSpotFleetRequestsInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribeSpotFleetRequestsPaginator returns a new
+// DescribeSpotFleetRequestsPaginator
+func NewDescribeSpotFleetRequestsPaginator(client DescribeSpotFleetRequestsAPIClient, params *DescribeSpotFleetRequestsInput, optFns ...func(*DescribeSpotFleetRequestsPaginatorOptions)) *DescribeSpotFleetRequestsPaginator {
+ if params == nil {
+ params = &DescribeSpotFleetRequestsInput{}
+ }
+
+ options := DescribeSpotFleetRequestsPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribeSpotFleetRequestsPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribeSpotFleetRequestsPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribeSpotFleetRequests page.
+func (p *DescribeSpotFleetRequestsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeSpotFleetRequestsOutput, 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.DescribeSpotFleetRequests(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_opDescribeSpotFleetRequests(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeSpotFleetRequests",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeSpotInstanceRequests.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeSpotInstanceRequests.go
new file mode 100644
index 00000000..9720cd59
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeSpotInstanceRequests.go
@@ -0,0 +1,689 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+import (
+ "context"
+ "errors"
+ "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/ec2/types"
+ smithy "github.com/aws/smithy-go"
+ "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"
+)
+
+// Describes the specified Spot Instance requests. You can use
+// DescribeSpotInstanceRequests to find a running Spot Instance by examining the
+// response. If the status of the Spot Instance is fulfilled, the instance ID
+// appears in the response and contains the identifier of the instance.
+// Alternatively, you can use DescribeInstances
+// (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeInstances)
+// with a filter to look for instances where the instance lifecycle is spot. We
+// recommend that you set MaxResults to a value between 5 and 1000 to limit the
+// number of results returned. This paginates the output, which makes the list more
+// manageable and returns the results faster. If the list of results exceeds your
+// MaxResults value, then that number of results is returned along with a NextToken
+// value that can be passed to a subsequent DescribeSpotInstanceRequests request to
+// retrieve the remaining results. Spot Instance requests are deleted four hours
+// after they are canceled and their instances are terminated.
+func (c *Client) DescribeSpotInstanceRequests(ctx context.Context, params *DescribeSpotInstanceRequestsInput, optFns ...func(*Options)) (*DescribeSpotInstanceRequestsOutput, error) {
+ if params == nil {
+ params = &DescribeSpotInstanceRequestsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeSpotInstanceRequests", params, optFns, c.addOperationDescribeSpotInstanceRequestsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeSpotInstanceRequestsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+// Contains the parameters for DescribeSpotInstanceRequests.
+type DescribeSpotInstanceRequestsInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // One or more filters.
+ //
+ // * availability-zone-group - The Availability Zone
+ // group.
+ //
+ // * create-time - The time stamp when the Spot Instance request was
+ // created.
+ //
+ // * fault-code - The fault code related to the request.
+ //
+ // * fault-message
+ // - The fault message related to the request.
+ //
+ // * instance-id - The ID of the
+ // instance that fulfilled the request.
+ //
+ // * launch-group - The Spot Instance launch
+ // group.
+ //
+ // * launch.block-device-mapping.delete-on-termination - Indicates whether
+ // the EBS volume is deleted on instance termination.
+ //
+ // *
+ // launch.block-device-mapping.device-name - The device name for the volume in the
+ // block device mapping (for example, /dev/sdh or xvdh).
+ //
+ // *
+ // launch.block-device-mapping.snapshot-id - The ID of the snapshot for the EBS
+ // volume.
+ //
+ // * launch.block-device-mapping.volume-size - The size of the EBS volume,
+ // in GiB.
+ //
+ // * launch.block-device-mapping.volume-type - The type of EBS volume: gp2
+ // for General Purpose SSD, io1 or io2 for Provisioned IOPS SSD, st1 for Throughput
+ // Optimized HDD, sc1for Cold HDD, or standard for Magnetic.
+ //
+ // * launch.group-id -
+ // The ID of the security group for the instance.
+ //
+ // * launch.group-name - The name
+ // of the security group for the instance.
+ //
+ // * launch.image-id - The ID of the
+ // AMI.
+ //
+ // * launch.instance-type - The type of instance (for example, m3.medium).
+ //
+ // *
+ // launch.kernel-id - The kernel ID.
+ //
+ // * launch.key-name - The name of the key pair
+ // the instance launched with.
+ //
+ // * launch.monitoring-enabled - Whether detailed
+ // monitoring is enabled for the Spot Instance.
+ //
+ // * launch.ramdisk-id - The RAM disk
+ // ID.
+ //
+ // * launched-availability-zone - The Availability Zone in which the request
+ // is launched.
+ //
+ // * network-interface.addresses.primary - Indicates whether the IP
+ // address is the primary private IP address.
+ //
+ // *
+ // network-interface.delete-on-termination - Indicates whether the network
+ // interface is deleted when the instance is terminated.
+ //
+ // *
+ // network-interface.description - A description of the network interface.
+ //
+ // *
+ // network-interface.device-index - The index of the device for the network
+ // interface attachment on the instance.
+ //
+ // * network-interface.group-id - The ID of
+ // the security group associated with the network interface.
+ //
+ // *
+ // network-interface.network-interface-id - The ID of the network interface.
+ //
+ // *
+ // network-interface.private-ip-address - The primary private IP address of the
+ // network interface.
+ //
+ // * network-interface.subnet-id - The ID of the subnet for the
+ // instance.
+ //
+ // * product-description - The product description associated with the
+ // instance (Linux/UNIX | Windows).
+ //
+ // * spot-instance-request-id - The Spot Instance
+ // request ID.
+ //
+ // * spot-price - The maximum hourly price for any Spot Instance
+ // launched to fulfill the request.
+ //
+ // * state - The state of the Spot Instance
+ // request (open | active | closed | cancelled | failed). Spot request status
+ // information can help you track your Amazon EC2 Spot Instance requests. For more
+ // information, see Spot request status
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-bid-status.html) in
+ // the Amazon EC2 User Guide for Linux Instances.
+ //
+ // * status-code - The short code
+ // describing the most recent evaluation of your Spot Instance request.
+ //
+ // *
+ // status-message - The message explaining the status of the Spot Instance
+ // request.
+ //
+ // * tag: - The key/value combination of a tag assigned to the resource.
+ // Use the tag key in the filter name and the tag value as the filter value. For
+ // example, to find all resources that have a tag with the key Owner and the value
+ // TeamA, specify tag:Owner for the filter name and TeamA for the filter value.
+ //
+ // *
+ // tag-key - The key of a tag assigned to the resource. Use this filter to find all
+ // resources assigned a tag with a specific key, regardless of the tag value.
+ //
+ // *
+ // type - The type of Spot Instance request (one-time | persistent).
+ //
+ // * valid-from
+ // - The start date of the request.
+ //
+ // * valid-until - The end date of the request.
+ Filters []types.Filter
+
+ // The maximum number of results to return in a single call. Specify a value
+ // between 5 and 1000. To retrieve the remaining results, make another call with
+ // the returned NextToken value.
+ MaxResults *int32
+
+ // The token to request the next set of results. This value is null when there are
+ // no more results to return.
+ NextToken *string
+
+ // One or more Spot Instance request IDs.
+ SpotInstanceRequestIds []string
+
+ noSmithyDocumentSerde
+}
+
+// Contains the output of DescribeSpotInstanceRequests.
+type DescribeSpotInstanceRequestsOutput struct {
+
+ // The token to use to retrieve the next set of results. This value is null when
+ // there are no more results to return.
+ NextToken *string
+
+ // One or more Spot Instance requests.
+ SpotInstanceRequests []types.SpotInstanceRequest
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeSpotInstanceRequestsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeSpotInstanceRequests{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeSpotInstanceRequests{}, 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_opDescribeSpotInstanceRequests(options.Region), middleware.Before); 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
+}
+
+// DescribeSpotInstanceRequestsAPIClient is a client that implements the
+// DescribeSpotInstanceRequests operation.
+type DescribeSpotInstanceRequestsAPIClient interface {
+ DescribeSpotInstanceRequests(context.Context, *DescribeSpotInstanceRequestsInput, ...func(*Options)) (*DescribeSpotInstanceRequestsOutput, error)
+}
+
+var _ DescribeSpotInstanceRequestsAPIClient = (*Client)(nil)
+
+// DescribeSpotInstanceRequestsPaginatorOptions is the paginator options for
+// DescribeSpotInstanceRequests
+type DescribeSpotInstanceRequestsPaginatorOptions struct {
+ // The maximum number of results to return in a single call. Specify a value
+ // between 5 and 1000. To retrieve the remaining results, make another call with
+ // the returned NextToken value.
+ 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
+}
+
+// DescribeSpotInstanceRequestsPaginator is a paginator for
+// DescribeSpotInstanceRequests
+type DescribeSpotInstanceRequestsPaginator struct {
+ options DescribeSpotInstanceRequestsPaginatorOptions
+ client DescribeSpotInstanceRequestsAPIClient
+ params *DescribeSpotInstanceRequestsInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribeSpotInstanceRequestsPaginator returns a new
+// DescribeSpotInstanceRequestsPaginator
+func NewDescribeSpotInstanceRequestsPaginator(client DescribeSpotInstanceRequestsAPIClient, params *DescribeSpotInstanceRequestsInput, optFns ...func(*DescribeSpotInstanceRequestsPaginatorOptions)) *DescribeSpotInstanceRequestsPaginator {
+ if params == nil {
+ params = &DescribeSpotInstanceRequestsInput{}
+ }
+
+ options := DescribeSpotInstanceRequestsPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribeSpotInstanceRequestsPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribeSpotInstanceRequestsPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribeSpotInstanceRequests page.
+func (p *DescribeSpotInstanceRequestsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeSpotInstanceRequestsOutput, 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.DescribeSpotInstanceRequests(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
+}
+
+// SpotInstanceRequestFulfilledWaiterOptions are waiter options for
+// SpotInstanceRequestFulfilledWaiter
+type SpotInstanceRequestFulfilledWaiterOptions 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,
+ // SpotInstanceRequestFulfilledWaiter will use default minimum delay of 15 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, SpotInstanceRequestFulfilledWaiter 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, *DescribeSpotInstanceRequestsInput, *DescribeSpotInstanceRequestsOutput, error) (bool, error)
+}
+
+// SpotInstanceRequestFulfilledWaiter defines the waiters for
+// SpotInstanceRequestFulfilled
+type SpotInstanceRequestFulfilledWaiter struct {
+ client DescribeSpotInstanceRequestsAPIClient
+
+ options SpotInstanceRequestFulfilledWaiterOptions
+}
+
+// NewSpotInstanceRequestFulfilledWaiter constructs a
+// SpotInstanceRequestFulfilledWaiter.
+func NewSpotInstanceRequestFulfilledWaiter(client DescribeSpotInstanceRequestsAPIClient, optFns ...func(*SpotInstanceRequestFulfilledWaiterOptions)) *SpotInstanceRequestFulfilledWaiter {
+ options := SpotInstanceRequestFulfilledWaiterOptions{}
+ options.MinDelay = 15 * time.Second
+ options.MaxDelay = 120 * time.Second
+ options.Retryable = spotInstanceRequestFulfilledStateRetryable
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+ return &SpotInstanceRequestFulfilledWaiter{
+ client: client,
+ options: options,
+ }
+}
+
+// Wait calls the waiter function for SpotInstanceRequestFulfilled waiter. The
+// maxWaitDur is the maximum wait duration the waiter will wait. The maxWaitDur is
+// required and must be greater than zero.
+func (w *SpotInstanceRequestFulfilledWaiter) Wait(ctx context.Context, params *DescribeSpotInstanceRequestsInput, maxWaitDur time.Duration, optFns ...func(*SpotInstanceRequestFulfilledWaiterOptions)) error {
+ if maxWaitDur <= 0 {
+ return 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 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.DescribeSpotInstanceRequests(ctx, params, func(o *Options) {
+ o.APIOptions = append(o.APIOptions, apiOptions...)
+ })
+
+ retryable, err := options.Retryable(ctx, params, out, err)
+ if err != nil {
+ return err
+ }
+ if !retryable {
+ return 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 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 fmt.Errorf("request cancelled while waiting, %w", err)
+ }
+ }
+ return fmt.Errorf("exceeded max wait time for SpotInstanceRequestFulfilled waiter")
+}
+
+func spotInstanceRequestFulfilledStateRetryable(ctx context.Context, input *DescribeSpotInstanceRequestsInput, output *DescribeSpotInstanceRequestsOutput, err error) (bool, error) {
+
+ if err == nil {
+ pathValue, err := jmespath.Search("SpotInstanceRequests[].Status.Code", output)
+ if err != nil {
+ return false, fmt.Errorf("error evaluating waiter state: %w", err)
+ }
+
+ expectedValue := "fulfilled"
+ var match = true
+ listOfValues, ok := pathValue.([]interface{})
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected list got %T", pathValue)
+ }
+
+ if len(listOfValues) == 0 {
+ match = false
+ }
+ for _, v := range listOfValues {
+ value, ok := v.(*string)
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected *string value, got %T", pathValue)
+ }
+
+ if string(*value) != expectedValue {
+ match = false
+ }
+ }
+
+ if match {
+ return false, nil
+ }
+ }
+
+ if err == nil {
+ pathValue, err := jmespath.Search("SpotInstanceRequests[].Status.Code", output)
+ if err != nil {
+ return false, fmt.Errorf("error evaluating waiter state: %w", err)
+ }
+
+ expectedValue := "request-canceled-and-instance-running"
+ var match = true
+ listOfValues, ok := pathValue.([]interface{})
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected list got %T", pathValue)
+ }
+
+ if len(listOfValues) == 0 {
+ match = false
+ }
+ for _, v := range listOfValues {
+ value, ok := v.(*string)
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected *string value, got %T", pathValue)
+ }
+
+ if string(*value) != expectedValue {
+ match = false
+ }
+ }
+
+ if match {
+ return false, nil
+ }
+ }
+
+ if err == nil {
+ pathValue, err := jmespath.Search("SpotInstanceRequests[].Status.Code", output)
+ if err != nil {
+ return false, fmt.Errorf("error evaluating waiter state: %w", err)
+ }
+
+ expectedValue := "schedule-expired"
+ listOfValues, ok := pathValue.([]interface{})
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected list got %T", pathValue)
+ }
+
+ for _, v := range listOfValues {
+ value, ok := v.(*string)
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected *string value, got %T", pathValue)
+ }
+
+ if string(*value) == expectedValue {
+ return false, fmt.Errorf("waiter state transitioned to Failure")
+ }
+ }
+ }
+
+ if err == nil {
+ pathValue, err := jmespath.Search("SpotInstanceRequests[].Status.Code", output)
+ if err != nil {
+ return false, fmt.Errorf("error evaluating waiter state: %w", err)
+ }
+
+ expectedValue := "canceled-before-fulfillment"
+ listOfValues, ok := pathValue.([]interface{})
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected list got %T", pathValue)
+ }
+
+ for _, v := range listOfValues {
+ value, ok := v.(*string)
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected *string value, got %T", pathValue)
+ }
+
+ if string(*value) == expectedValue {
+ return false, fmt.Errorf("waiter state transitioned to Failure")
+ }
+ }
+ }
+
+ if err == nil {
+ pathValue, err := jmespath.Search("SpotInstanceRequests[].Status.Code", output)
+ if err != nil {
+ return false, fmt.Errorf("error evaluating waiter state: %w", err)
+ }
+
+ expectedValue := "bad-parameters"
+ listOfValues, ok := pathValue.([]interface{})
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected list got %T", pathValue)
+ }
+
+ for _, v := range listOfValues {
+ value, ok := v.(*string)
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected *string value, got %T", pathValue)
+ }
+
+ if string(*value) == expectedValue {
+ return false, fmt.Errorf("waiter state transitioned to Failure")
+ }
+ }
+ }
+
+ if err == nil {
+ pathValue, err := jmespath.Search("SpotInstanceRequests[].Status.Code", output)
+ if err != nil {
+ return false, fmt.Errorf("error evaluating waiter state: %w", err)
+ }
+
+ expectedValue := "system-error"
+ listOfValues, ok := pathValue.([]interface{})
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected list got %T", pathValue)
+ }
+
+ for _, v := range listOfValues {
+ value, ok := v.(*string)
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected *string value, got %T", pathValue)
+ }
+
+ if string(*value) == expectedValue {
+ return false, fmt.Errorf("waiter state transitioned to Failure")
+ }
+ }
+ }
+
+ if err != nil {
+ var apiErr smithy.APIError
+ ok := errors.As(err, &apiErr)
+ if !ok {
+ return false, fmt.Errorf("expected err to be of type smithy.APIError, got %w", err)
+ }
+
+ if "InvalidSpotInstanceRequestID.NotFound" == apiErr.ErrorCode() {
+ return true, nil
+ }
+ }
+
+ return true, nil
+}
+
+func newServiceMetadataMiddleware_opDescribeSpotInstanceRequests(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeSpotInstanceRequests",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeSpotPriceHistory.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeSpotPriceHistory.go
new file mode 100644
index 00000000..a644f621
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeSpotPriceHistory.go
@@ -0,0 +1,270 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "time"
+)
+
+// Describes the Spot price history. For more information, see Spot Instance
+// pricing history
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-spot-instances-history.html)
+// in the Amazon EC2 User Guide for Linux Instances. When you specify a start and
+// end time, the operation returns the prices of the instance types within that
+// time range. It also returns the last price change before the start time, which
+// is the effective price as of the start time.
+func (c *Client) DescribeSpotPriceHistory(ctx context.Context, params *DescribeSpotPriceHistoryInput, optFns ...func(*Options)) (*DescribeSpotPriceHistoryOutput, error) {
+ if params == nil {
+ params = &DescribeSpotPriceHistoryInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeSpotPriceHistory", params, optFns, c.addOperationDescribeSpotPriceHistoryMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeSpotPriceHistoryOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+// Contains the parameters for DescribeSpotPriceHistory.
+type DescribeSpotPriceHistoryInput struct {
+
+ // Filters the results by the specified Availability Zone.
+ AvailabilityZone *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The date and time, up to the current date, from which to stop retrieving the
+ // price history data, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).
+ EndTime *time.Time
+
+ // One or more filters.
+ //
+ // * availability-zone - The Availability Zone for which
+ // prices should be returned.
+ //
+ // * instance-type - The type of instance (for example,
+ // m3.medium).
+ //
+ // * product-description - The product description for the Spot price
+ // (Linux/UNIX | Red Hat Enterprise Linux | SUSE Linux | Windows | Linux/UNIX
+ // (Amazon VPC) | Red Hat Enterprise Linux (Amazon VPC) | SUSE Linux (Amazon VPC) |
+ // Windows (Amazon VPC)).
+ //
+ // * spot-price - The Spot price. The value must match
+ // exactly (or use wildcards; greater than or less than comparison is not
+ // supported).
+ //
+ // * timestamp - The time stamp of the Spot price history, in UTC
+ // format (for example, YYYY-MM-DDTHH:MM:SSZ). You can use wildcards (* and ?).
+ // Greater than or less than comparison is not supported.
+ Filters []types.Filter
+
+ // Filters the results by the specified instance types.
+ InstanceTypes []types.InstanceType
+
+ // The maximum number of results to return in a single call. Specify a value
+ // between 1 and 1000. The default value is 1000. To retrieve the remaining
+ // results, make another call with the returned NextToken value.
+ MaxResults *int32
+
+ // The token for the next set of results.
+ NextToken *string
+
+ // Filters the results by the specified basic product descriptions.
+ ProductDescriptions []string
+
+ // The date and time, up to the past 90 days, from which to start retrieving the
+ // price history data, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).
+ StartTime *time.Time
+
+ noSmithyDocumentSerde
+}
+
+// Contains the output of DescribeSpotPriceHistory.
+type DescribeSpotPriceHistoryOutput struct {
+
+ // The token required to retrieve the next set of results. This value is null or an
+ // empty string when there are no more results to return.
+ NextToken *string
+
+ // The historical Spot prices.
+ SpotPriceHistory []types.SpotPrice
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeSpotPriceHistoryMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeSpotPriceHistory{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeSpotPriceHistory{}, 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_opDescribeSpotPriceHistory(options.Region), middleware.Before); 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
+}
+
+// DescribeSpotPriceHistoryAPIClient is a client that implements the
+// DescribeSpotPriceHistory operation.
+type DescribeSpotPriceHistoryAPIClient interface {
+ DescribeSpotPriceHistory(context.Context, *DescribeSpotPriceHistoryInput, ...func(*Options)) (*DescribeSpotPriceHistoryOutput, error)
+}
+
+var _ DescribeSpotPriceHistoryAPIClient = (*Client)(nil)
+
+// DescribeSpotPriceHistoryPaginatorOptions is the paginator options for
+// DescribeSpotPriceHistory
+type DescribeSpotPriceHistoryPaginatorOptions struct {
+ // The maximum number of results to return in a single call. Specify a value
+ // between 1 and 1000. The default value is 1000. To retrieve the remaining
+ // results, make another call with the returned NextToken value.
+ 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
+}
+
+// DescribeSpotPriceHistoryPaginator is a paginator for DescribeSpotPriceHistory
+type DescribeSpotPriceHistoryPaginator struct {
+ options DescribeSpotPriceHistoryPaginatorOptions
+ client DescribeSpotPriceHistoryAPIClient
+ params *DescribeSpotPriceHistoryInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribeSpotPriceHistoryPaginator returns a new
+// DescribeSpotPriceHistoryPaginator
+func NewDescribeSpotPriceHistoryPaginator(client DescribeSpotPriceHistoryAPIClient, params *DescribeSpotPriceHistoryInput, optFns ...func(*DescribeSpotPriceHistoryPaginatorOptions)) *DescribeSpotPriceHistoryPaginator {
+ if params == nil {
+ params = &DescribeSpotPriceHistoryInput{}
+ }
+
+ options := DescribeSpotPriceHistoryPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribeSpotPriceHistoryPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribeSpotPriceHistoryPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribeSpotPriceHistory page.
+func (p *DescribeSpotPriceHistoryPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeSpotPriceHistoryOutput, 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.DescribeSpotPriceHistory(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_opDescribeSpotPriceHistory(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeSpotPriceHistory",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeStaleSecurityGroups.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeStaleSecurityGroups.go
new file mode 100644
index 00000000..5e3be054
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeStaleSecurityGroups.go
@@ -0,0 +1,233 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// [VPC only] Describes the stale security group rules for security groups in a
+// specified VPC. Rules are stale when they reference a deleted security group in a
+// peer VPC, or a security group in a peer VPC for which the VPC peering connection
+// has been deleted.
+func (c *Client) DescribeStaleSecurityGroups(ctx context.Context, params *DescribeStaleSecurityGroupsInput, optFns ...func(*Options)) (*DescribeStaleSecurityGroupsOutput, error) {
+ if params == nil {
+ params = &DescribeStaleSecurityGroupsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeStaleSecurityGroups", params, optFns, c.addOperationDescribeStaleSecurityGroupsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeStaleSecurityGroupsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeStaleSecurityGroupsInput struct {
+
+ // The ID of the VPC.
+ //
+ // This member is required.
+ VpcId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The maximum number of items to return for this request. The request returns a
+ // token that you can specify in a subsequent call to get the next set of results.
+ MaxResults *int32
+
+ // The token for the next set of items to return. (You received this token from a
+ // prior call.)
+ NextToken *string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeStaleSecurityGroupsOutput struct {
+
+ // The token to use when requesting the next set of items. If there are no
+ // additional items to return, the string is empty.
+ NextToken *string
+
+ // Information about the stale security groups.
+ StaleSecurityGroupSet []types.StaleSecurityGroup
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeStaleSecurityGroupsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeStaleSecurityGroups{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeStaleSecurityGroups{}, 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 = addOpDescribeStaleSecurityGroupsValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeStaleSecurityGroups(options.Region), middleware.Before); 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
+}
+
+// DescribeStaleSecurityGroupsAPIClient is a client that implements the
+// DescribeStaleSecurityGroups operation.
+type DescribeStaleSecurityGroupsAPIClient interface {
+ DescribeStaleSecurityGroups(context.Context, *DescribeStaleSecurityGroupsInput, ...func(*Options)) (*DescribeStaleSecurityGroupsOutput, error)
+}
+
+var _ DescribeStaleSecurityGroupsAPIClient = (*Client)(nil)
+
+// DescribeStaleSecurityGroupsPaginatorOptions is the paginator options for
+// DescribeStaleSecurityGroups
+type DescribeStaleSecurityGroupsPaginatorOptions struct {
+ // The maximum number of items to return for this request. The request returns a
+ // token that you can specify in a subsequent call to get the next set of results.
+ 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
+}
+
+// DescribeStaleSecurityGroupsPaginator is a paginator for
+// DescribeStaleSecurityGroups
+type DescribeStaleSecurityGroupsPaginator struct {
+ options DescribeStaleSecurityGroupsPaginatorOptions
+ client DescribeStaleSecurityGroupsAPIClient
+ params *DescribeStaleSecurityGroupsInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribeStaleSecurityGroupsPaginator returns a new
+// DescribeStaleSecurityGroupsPaginator
+func NewDescribeStaleSecurityGroupsPaginator(client DescribeStaleSecurityGroupsAPIClient, params *DescribeStaleSecurityGroupsInput, optFns ...func(*DescribeStaleSecurityGroupsPaginatorOptions)) *DescribeStaleSecurityGroupsPaginator {
+ if params == nil {
+ params = &DescribeStaleSecurityGroupsInput{}
+ }
+
+ options := DescribeStaleSecurityGroupsPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribeStaleSecurityGroupsPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribeStaleSecurityGroupsPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribeStaleSecurityGroups page.
+func (p *DescribeStaleSecurityGroupsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeStaleSecurityGroupsOutput, 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.DescribeStaleSecurityGroups(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_opDescribeStaleSecurityGroups(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeStaleSecurityGroups",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeStoreImageTasks.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeStoreImageTasks.go
new file mode 100644
index 00000000..650c3004
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeStoreImageTasks.go
@@ -0,0 +1,249 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes the progress of the AMI store tasks. You can describe the store tasks
+// for specified AMIs. If you don't specify the AMIs, you get a paginated list of
+// store tasks from the last 31 days. For each AMI task, the response indicates if
+// the task is InProgress, Completed, or Failed. For tasks InProgress, the response
+// shows the estimated progress as a percentage. Tasks are listed in reverse
+// chronological order. Currently, only tasks from the past 31 days can be viewed.
+// To use this API, you must have the required permissions. For more information,
+// see Permissions for storing and restoring AMIs using Amazon S3
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-store-restore.html#ami-s3-permissions)
+// in the Amazon Elastic Compute Cloud User Guide. For more information, see Store
+// and restore an AMI using Amazon S3
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-store-restore.html) in
+// the Amazon Elastic Compute Cloud User Guide.
+func (c *Client) DescribeStoreImageTasks(ctx context.Context, params *DescribeStoreImageTasksInput, optFns ...func(*Options)) (*DescribeStoreImageTasksOutput, error) {
+ if params == nil {
+ params = &DescribeStoreImageTasksInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeStoreImageTasks", params, optFns, c.addOperationDescribeStoreImageTasksMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeStoreImageTasksOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeStoreImageTasksInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The filters.
+ //
+ // * task-state - Returns tasks in a certain state (InProgress |
+ // Completed | Failed)
+ //
+ // * bucket - Returns task information for tasks that targeted
+ // a specific bucket. For the filter value, specify the bucket name.
+ Filters []types.Filter
+
+ // The AMI IDs for which to show progress. Up to 20 AMI IDs can be included in a
+ // request.
+ ImageIds []string
+
+ // The maximum number of results to return in a single call. To retrieve the
+ // remaining results, make another call with the returned NextToken value. This
+ // value can be between 1 and 200. You cannot specify this parameter and the
+ // ImageIDs parameter in the same call.
+ MaxResults *int32
+
+ // The token for the next page of results.
+ NextToken *string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeStoreImageTasksOutput struct {
+
+ // The token to use to retrieve the next page of results. This value is null when
+ // there are no more results to return.
+ NextToken *string
+
+ // The information about the AMI store tasks.
+ StoreImageTaskResults []types.StoreImageTaskResult
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeStoreImageTasksMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeStoreImageTasks{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeStoreImageTasks{}, 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_opDescribeStoreImageTasks(options.Region), middleware.Before); 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
+}
+
+// DescribeStoreImageTasksAPIClient is a client that implements the
+// DescribeStoreImageTasks operation.
+type DescribeStoreImageTasksAPIClient interface {
+ DescribeStoreImageTasks(context.Context, *DescribeStoreImageTasksInput, ...func(*Options)) (*DescribeStoreImageTasksOutput, error)
+}
+
+var _ DescribeStoreImageTasksAPIClient = (*Client)(nil)
+
+// DescribeStoreImageTasksPaginatorOptions is the paginator options for
+// DescribeStoreImageTasks
+type DescribeStoreImageTasksPaginatorOptions struct {
+ // The maximum number of results to return in a single call. To retrieve the
+ // remaining results, make another call with the returned NextToken value. This
+ // value can be between 1 and 200. You cannot specify this parameter and the
+ // ImageIDs parameter in the same call.
+ 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
+}
+
+// DescribeStoreImageTasksPaginator is a paginator for DescribeStoreImageTasks
+type DescribeStoreImageTasksPaginator struct {
+ options DescribeStoreImageTasksPaginatorOptions
+ client DescribeStoreImageTasksAPIClient
+ params *DescribeStoreImageTasksInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribeStoreImageTasksPaginator returns a new
+// DescribeStoreImageTasksPaginator
+func NewDescribeStoreImageTasksPaginator(client DescribeStoreImageTasksAPIClient, params *DescribeStoreImageTasksInput, optFns ...func(*DescribeStoreImageTasksPaginatorOptions)) *DescribeStoreImageTasksPaginator {
+ if params == nil {
+ params = &DescribeStoreImageTasksInput{}
+ }
+
+ options := DescribeStoreImageTasksPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribeStoreImageTasksPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribeStoreImageTasksPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribeStoreImageTasks page.
+func (p *DescribeStoreImageTasksPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeStoreImageTasksOutput, 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.DescribeStoreImageTasks(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_opDescribeStoreImageTasks(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeStoreImageTasks",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeSubnets.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeSubnets.go
new file mode 100644
index 00000000..70ad4610
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeSubnets.go
@@ -0,0 +1,452 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/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"
+)
+
+// Describes one or more of your subnets. For more information, see Your VPC and
+// subnets (https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Subnets.html) in
+// the Amazon Virtual Private Cloud User Guide.
+func (c *Client) DescribeSubnets(ctx context.Context, params *DescribeSubnetsInput, optFns ...func(*Options)) (*DescribeSubnetsOutput, error) {
+ if params == nil {
+ params = &DescribeSubnetsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeSubnets", params, optFns, c.addOperationDescribeSubnetsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeSubnetsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeSubnetsInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // One or more filters.
+ //
+ // * availability-zone - The Availability Zone for the
+ // subnet. You can also use availabilityZone as the filter name.
+ //
+ // *
+ // availability-zone-id - The ID of the Availability Zone for the subnet. You can
+ // also use availabilityZoneId as the filter name.
+ //
+ // * available-ip-address-count -
+ // The number of IPv4 addresses in the subnet that are available.
+ //
+ // * cidr-block -
+ // The IPv4 CIDR block of the subnet. The CIDR block you specify must exactly match
+ // the subnet's CIDR block for information to be returned for the subnet. You can
+ // also use cidr or cidrBlock as the filter names.
+ //
+ // * default-for-az - Indicates
+ // whether this is the default subnet for the Availability Zone. You can also use
+ // defaultForAz as the filter name.
+ //
+ // * ipv6-cidr-block-association.ipv6-cidr-block
+ // - An IPv6 CIDR block associated with the subnet.
+ //
+ // *
+ // ipv6-cidr-block-association.association-id - An association ID for an IPv6 CIDR
+ // block associated with the subnet.
+ //
+ // * ipv6-cidr-block-association.state - The
+ // state of an IPv6 CIDR block associated with the subnet.
+ //
+ // * outpost-arn - The
+ // Amazon Resource Name (ARN) of the Outpost.
+ //
+ // * owner-id - The ID of the Amazon
+ // Web Services account that owns the subnet.
+ //
+ // * state - The state of the subnet
+ // (pending | available).
+ //
+ // * subnet-arn - The Amazon Resource Name (ARN) of the
+ // subnet.
+ //
+ // * subnet-id - The ID of the subnet.
+ //
+ // * tag: - The key/value combination
+ // of a tag assigned to the resource. Use the tag key in the filter name and the
+ // tag value as the filter value. For example, to find all resources that have a
+ // tag with the key Owner and the value TeamA, specify tag:Owner for the filter
+ // name and TeamA for the filter value.
+ //
+ // * tag-key - The key of a tag assigned to
+ // the resource. Use this filter to find all resources assigned a tag with a
+ // specific key, regardless of the tag value.
+ //
+ // * vpc-id - The ID of the VPC for the
+ // subnet.
+ Filters []types.Filter
+
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ MaxResults *int32
+
+ // The token for the next page of results.
+ NextToken *string
+
+ // One or more subnet IDs. Default: Describes all your subnets.
+ SubnetIds []string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeSubnetsOutput struct {
+
+ // The token to use to retrieve the next page of results. This value is null when
+ // there are no more results to return.
+ NextToken *string
+
+ // Information about one or more subnets.
+ Subnets []types.Subnet
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeSubnetsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeSubnets{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeSubnets{}, 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_opDescribeSubnets(options.Region), middleware.Before); 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
+}
+
+// DescribeSubnetsAPIClient is a client that implements the DescribeSubnets
+// operation.
+type DescribeSubnetsAPIClient interface {
+ DescribeSubnets(context.Context, *DescribeSubnetsInput, ...func(*Options)) (*DescribeSubnetsOutput, error)
+}
+
+var _ DescribeSubnetsAPIClient = (*Client)(nil)
+
+// DescribeSubnetsPaginatorOptions is the paginator options for DescribeSubnets
+type DescribeSubnetsPaginatorOptions struct {
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ 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
+}
+
+// DescribeSubnetsPaginator is a paginator for DescribeSubnets
+type DescribeSubnetsPaginator struct {
+ options DescribeSubnetsPaginatorOptions
+ client DescribeSubnetsAPIClient
+ params *DescribeSubnetsInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribeSubnetsPaginator returns a new DescribeSubnetsPaginator
+func NewDescribeSubnetsPaginator(client DescribeSubnetsAPIClient, params *DescribeSubnetsInput, optFns ...func(*DescribeSubnetsPaginatorOptions)) *DescribeSubnetsPaginator {
+ if params == nil {
+ params = &DescribeSubnetsInput{}
+ }
+
+ options := DescribeSubnetsPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribeSubnetsPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribeSubnetsPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribeSubnets page.
+func (p *DescribeSubnetsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeSubnetsOutput, 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.DescribeSubnets(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
+}
+
+// SubnetAvailableWaiterOptions are waiter options for SubnetAvailableWaiter
+type SubnetAvailableWaiterOptions 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,
+ // SubnetAvailableWaiter will use default minimum delay of 15 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, SubnetAvailableWaiter 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, *DescribeSubnetsInput, *DescribeSubnetsOutput, error) (bool, error)
+}
+
+// SubnetAvailableWaiter defines the waiters for SubnetAvailable
+type SubnetAvailableWaiter struct {
+ client DescribeSubnetsAPIClient
+
+ options SubnetAvailableWaiterOptions
+}
+
+// NewSubnetAvailableWaiter constructs a SubnetAvailableWaiter.
+func NewSubnetAvailableWaiter(client DescribeSubnetsAPIClient, optFns ...func(*SubnetAvailableWaiterOptions)) *SubnetAvailableWaiter {
+ options := SubnetAvailableWaiterOptions{}
+ options.MinDelay = 15 * time.Second
+ options.MaxDelay = 120 * time.Second
+ options.Retryable = subnetAvailableStateRetryable
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+ return &SubnetAvailableWaiter{
+ client: client,
+ options: options,
+ }
+}
+
+// Wait calls the waiter function for SubnetAvailable waiter. The maxWaitDur is the
+// maximum wait duration the waiter will wait. The maxWaitDur is required and must
+// be greater than zero.
+func (w *SubnetAvailableWaiter) Wait(ctx context.Context, params *DescribeSubnetsInput, maxWaitDur time.Duration, optFns ...func(*SubnetAvailableWaiterOptions)) error {
+ if maxWaitDur <= 0 {
+ return 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 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.DescribeSubnets(ctx, params, func(o *Options) {
+ o.APIOptions = append(o.APIOptions, apiOptions...)
+ })
+
+ retryable, err := options.Retryable(ctx, params, out, err)
+ if err != nil {
+ return err
+ }
+ if !retryable {
+ return 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 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 fmt.Errorf("request cancelled while waiting, %w", err)
+ }
+ }
+ return fmt.Errorf("exceeded max wait time for SubnetAvailable waiter")
+}
+
+func subnetAvailableStateRetryable(ctx context.Context, input *DescribeSubnetsInput, output *DescribeSubnetsOutput, err error) (bool, error) {
+
+ if err == nil {
+ pathValue, err := jmespath.Search("Subnets[].State", output)
+ if err != nil {
+ return false, fmt.Errorf("error evaluating waiter state: %w", err)
+ }
+
+ expectedValue := "available"
+ var match = true
+ listOfValues, ok := pathValue.([]interface{})
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected list got %T", pathValue)
+ }
+
+ if len(listOfValues) == 0 {
+ match = false
+ }
+ for _, v := range listOfValues {
+ value, ok := v.(types.SubnetState)
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected types.SubnetState value, got %T", pathValue)
+ }
+
+ if string(value) != expectedValue {
+ match = false
+ }
+ }
+
+ if match {
+ return false, nil
+ }
+ }
+
+ return true, nil
+}
+
+func newServiceMetadataMiddleware_opDescribeSubnets(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeSubnets",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeTags.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeTags.go
new file mode 100644
index 00000000..3fd2a85a
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeTags.go
@@ -0,0 +1,244 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes the specified tags for your EC2 resources. For more information about
+// tags, see Tagging Your Resources
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html) in the
+// Amazon Elastic Compute Cloud User Guide.
+func (c *Client) DescribeTags(ctx context.Context, params *DescribeTagsInput, optFns ...func(*Options)) (*DescribeTagsOutput, error) {
+ if params == nil {
+ params = &DescribeTagsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeTags", params, optFns, c.addOperationDescribeTagsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeTagsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeTagsInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The filters.
+ //
+ // * key - The tag key.
+ //
+ // * resource-id - The ID of the resource.
+ //
+ // *
+ // resource-type - The resource type (customer-gateway | dedicated-host |
+ // dhcp-options | elastic-ip | fleet | fpga-image | host-reservation | image |
+ // instance | internet-gateway | key-pair | launch-template | natgateway |
+ // network-acl | network-interface | placement-group | reserved-instances |
+ // route-table | security-group | snapshot | spot-instances-request | subnet |
+ // volume | vpc | vpc-endpoint | vpc-endpoint-service | vpc-peering-connection |
+ // vpn-connection | vpn-gateway).
+ //
+ // * tag: - The key/value combination of the tag.
+ // For example, specify "tag:Owner" for the filter name and "TeamA" for the filter
+ // value to find resources with the tag "Owner=TeamA".
+ //
+ // * value - The tag value.
+ Filters []types.Filter
+
+ // The maximum number of results to return in a single call. This value can be
+ // between 5 and 1000. To retrieve the remaining results, make another call with
+ // the returned NextToken value.
+ MaxResults *int32
+
+ // The token to retrieve the next page of results.
+ NextToken *string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeTagsOutput struct {
+
+ // The token to use to retrieve the next page of results. This value is null when
+ // there are no more results to return.
+ NextToken *string
+
+ // The tags.
+ Tags []types.TagDescription
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeTagsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeTags{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeTags{}, 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_opDescribeTags(options.Region), middleware.Before); 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
+}
+
+// DescribeTagsAPIClient is a client that implements the DescribeTags operation.
+type DescribeTagsAPIClient interface {
+ DescribeTags(context.Context, *DescribeTagsInput, ...func(*Options)) (*DescribeTagsOutput, error)
+}
+
+var _ DescribeTagsAPIClient = (*Client)(nil)
+
+// DescribeTagsPaginatorOptions is the paginator options for DescribeTags
+type DescribeTagsPaginatorOptions struct {
+ // The maximum number of results to return in a single call. This value can be
+ // between 5 and 1000. To retrieve the remaining results, make another call with
+ // the returned NextToken value.
+ 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
+}
+
+// DescribeTagsPaginator is a paginator for DescribeTags
+type DescribeTagsPaginator struct {
+ options DescribeTagsPaginatorOptions
+ client DescribeTagsAPIClient
+ params *DescribeTagsInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribeTagsPaginator returns a new DescribeTagsPaginator
+func NewDescribeTagsPaginator(client DescribeTagsAPIClient, params *DescribeTagsInput, optFns ...func(*DescribeTagsPaginatorOptions)) *DescribeTagsPaginator {
+ if params == nil {
+ params = &DescribeTagsInput{}
+ }
+
+ options := DescribeTagsPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribeTagsPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribeTagsPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribeTags page.
+func (p *DescribeTagsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeTagsOutput, 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.DescribeTags(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_opDescribeTags(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeTags",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeTrafficMirrorFilters.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeTrafficMirrorFilters.go
new file mode 100644
index 00000000..04750e4b
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeTrafficMirrorFilters.go
@@ -0,0 +1,233 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes one or more Traffic Mirror filters.
+func (c *Client) DescribeTrafficMirrorFilters(ctx context.Context, params *DescribeTrafficMirrorFiltersInput, optFns ...func(*Options)) (*DescribeTrafficMirrorFiltersOutput, error) {
+ if params == nil {
+ params = &DescribeTrafficMirrorFiltersInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeTrafficMirrorFilters", params, optFns, c.addOperationDescribeTrafficMirrorFiltersMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeTrafficMirrorFiltersOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeTrafficMirrorFiltersInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // One or more filters. The possible values are:
+ //
+ // * description: The Traffic Mirror
+ // filter description.
+ //
+ // * traffic-mirror-filter-id: The ID of the Traffic Mirror
+ // filter.
+ Filters []types.Filter
+
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ MaxResults *int32
+
+ // The token for the next page of results.
+ NextToken *string
+
+ // The ID of the Traffic Mirror filter.
+ TrafficMirrorFilterIds []string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeTrafficMirrorFiltersOutput struct {
+
+ // The token to use to retrieve the next page of results. The value is null when
+ // there are no more results to return.
+ NextToken *string
+
+ // Information about one or more Traffic Mirror filters.
+ TrafficMirrorFilters []types.TrafficMirrorFilter
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeTrafficMirrorFiltersMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeTrafficMirrorFilters{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeTrafficMirrorFilters{}, 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_opDescribeTrafficMirrorFilters(options.Region), middleware.Before); 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
+}
+
+// DescribeTrafficMirrorFiltersAPIClient is a client that implements the
+// DescribeTrafficMirrorFilters operation.
+type DescribeTrafficMirrorFiltersAPIClient interface {
+ DescribeTrafficMirrorFilters(context.Context, *DescribeTrafficMirrorFiltersInput, ...func(*Options)) (*DescribeTrafficMirrorFiltersOutput, error)
+}
+
+var _ DescribeTrafficMirrorFiltersAPIClient = (*Client)(nil)
+
+// DescribeTrafficMirrorFiltersPaginatorOptions is the paginator options for
+// DescribeTrafficMirrorFilters
+type DescribeTrafficMirrorFiltersPaginatorOptions struct {
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ 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
+}
+
+// DescribeTrafficMirrorFiltersPaginator is a paginator for
+// DescribeTrafficMirrorFilters
+type DescribeTrafficMirrorFiltersPaginator struct {
+ options DescribeTrafficMirrorFiltersPaginatorOptions
+ client DescribeTrafficMirrorFiltersAPIClient
+ params *DescribeTrafficMirrorFiltersInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribeTrafficMirrorFiltersPaginator returns a new
+// DescribeTrafficMirrorFiltersPaginator
+func NewDescribeTrafficMirrorFiltersPaginator(client DescribeTrafficMirrorFiltersAPIClient, params *DescribeTrafficMirrorFiltersInput, optFns ...func(*DescribeTrafficMirrorFiltersPaginatorOptions)) *DescribeTrafficMirrorFiltersPaginator {
+ if params == nil {
+ params = &DescribeTrafficMirrorFiltersInput{}
+ }
+
+ options := DescribeTrafficMirrorFiltersPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribeTrafficMirrorFiltersPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribeTrafficMirrorFiltersPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribeTrafficMirrorFilters page.
+func (p *DescribeTrafficMirrorFiltersPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeTrafficMirrorFiltersOutput, 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.DescribeTrafficMirrorFilters(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_opDescribeTrafficMirrorFilters(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeTrafficMirrorFilters",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeTrafficMirrorSessions.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeTrafficMirrorSessions.go
new file mode 100644
index 00000000..e1beb14b
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeTrafficMirrorSessions.go
@@ -0,0 +1,255 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes one or more Traffic Mirror sessions. By default, all Traffic Mirror
+// sessions are described. Alternatively, you can filter the results.
+func (c *Client) DescribeTrafficMirrorSessions(ctx context.Context, params *DescribeTrafficMirrorSessionsInput, optFns ...func(*Options)) (*DescribeTrafficMirrorSessionsOutput, error) {
+ if params == nil {
+ params = &DescribeTrafficMirrorSessionsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeTrafficMirrorSessions", params, optFns, c.addOperationDescribeTrafficMirrorSessionsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeTrafficMirrorSessionsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeTrafficMirrorSessionsInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // One or more filters. The possible values are:
+ //
+ // * description: The Traffic Mirror
+ // session description.
+ //
+ // * network-interface-id: The ID of the Traffic Mirror
+ // session network interface.
+ //
+ // * owner-id: The ID of the account that owns the
+ // Traffic Mirror session.
+ //
+ // * packet-length: The assigned number of packets to
+ // mirror.
+ //
+ // * session-number: The assigned session number.
+ //
+ // *
+ // traffic-mirror-filter-id: The ID of the Traffic Mirror filter.
+ //
+ // *
+ // traffic-mirror-session-id: The ID of the Traffic Mirror session.
+ //
+ // *
+ // traffic-mirror-target-id: The ID of the Traffic Mirror target.
+ //
+ // *
+ // virtual-network-id: The virtual network ID of the Traffic Mirror session.
+ Filters []types.Filter
+
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ MaxResults *int32
+
+ // The token for the next page of results.
+ NextToken *string
+
+ // The ID of the Traffic Mirror session.
+ TrafficMirrorSessionIds []string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeTrafficMirrorSessionsOutput struct {
+
+ // The token to use to retrieve the next page of results. The value is null when
+ // there are no more results to return.
+ NextToken *string
+
+ // Describes one or more Traffic Mirror sessions. By default, all Traffic Mirror
+ // sessions are described. Alternatively, you can filter the results.
+ TrafficMirrorSessions []types.TrafficMirrorSession
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeTrafficMirrorSessionsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeTrafficMirrorSessions{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeTrafficMirrorSessions{}, 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_opDescribeTrafficMirrorSessions(options.Region), middleware.Before); 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
+}
+
+// DescribeTrafficMirrorSessionsAPIClient is a client that implements the
+// DescribeTrafficMirrorSessions operation.
+type DescribeTrafficMirrorSessionsAPIClient interface {
+ DescribeTrafficMirrorSessions(context.Context, *DescribeTrafficMirrorSessionsInput, ...func(*Options)) (*DescribeTrafficMirrorSessionsOutput, error)
+}
+
+var _ DescribeTrafficMirrorSessionsAPIClient = (*Client)(nil)
+
+// DescribeTrafficMirrorSessionsPaginatorOptions is the paginator options for
+// DescribeTrafficMirrorSessions
+type DescribeTrafficMirrorSessionsPaginatorOptions struct {
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ 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
+}
+
+// DescribeTrafficMirrorSessionsPaginator is a paginator for
+// DescribeTrafficMirrorSessions
+type DescribeTrafficMirrorSessionsPaginator struct {
+ options DescribeTrafficMirrorSessionsPaginatorOptions
+ client DescribeTrafficMirrorSessionsAPIClient
+ params *DescribeTrafficMirrorSessionsInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribeTrafficMirrorSessionsPaginator returns a new
+// DescribeTrafficMirrorSessionsPaginator
+func NewDescribeTrafficMirrorSessionsPaginator(client DescribeTrafficMirrorSessionsAPIClient, params *DescribeTrafficMirrorSessionsInput, optFns ...func(*DescribeTrafficMirrorSessionsPaginatorOptions)) *DescribeTrafficMirrorSessionsPaginator {
+ if params == nil {
+ params = &DescribeTrafficMirrorSessionsInput{}
+ }
+
+ options := DescribeTrafficMirrorSessionsPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribeTrafficMirrorSessionsPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribeTrafficMirrorSessionsPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribeTrafficMirrorSessions page.
+func (p *DescribeTrafficMirrorSessionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeTrafficMirrorSessionsOutput, 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.DescribeTrafficMirrorSessions(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_opDescribeTrafficMirrorSessions(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeTrafficMirrorSessions",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeTrafficMirrorTargets.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeTrafficMirrorTargets.go
new file mode 100644
index 00000000..6e9a15e3
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeTrafficMirrorTargets.go
@@ -0,0 +1,242 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Information about one or more Traffic Mirror targets.
+func (c *Client) DescribeTrafficMirrorTargets(ctx context.Context, params *DescribeTrafficMirrorTargetsInput, optFns ...func(*Options)) (*DescribeTrafficMirrorTargetsOutput, error) {
+ if params == nil {
+ params = &DescribeTrafficMirrorTargetsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeTrafficMirrorTargets", params, optFns, c.addOperationDescribeTrafficMirrorTargetsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeTrafficMirrorTargetsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeTrafficMirrorTargetsInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // One or more filters. The possible values are:
+ //
+ // * description: The Traffic Mirror
+ // target description.
+ //
+ // * network-interface-id: The ID of the Traffic Mirror
+ // session network interface.
+ //
+ // * network-load-balancer-arn: The Amazon Resource
+ // Name (ARN) of the Network Load Balancer that is associated with the session.
+ //
+ // *
+ // owner-id: The ID of the account that owns the Traffic Mirror session.
+ //
+ // *
+ // traffic-mirror-target-id: The ID of the Traffic Mirror target.
+ Filters []types.Filter
+
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ MaxResults *int32
+
+ // The token for the next page of results.
+ NextToken *string
+
+ // The ID of the Traffic Mirror targets.
+ TrafficMirrorTargetIds []string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeTrafficMirrorTargetsOutput struct {
+
+ // The token to use to retrieve the next page of results. The value is null when
+ // there are no more results to return.
+ NextToken *string
+
+ // Information about one or more Traffic Mirror targets.
+ TrafficMirrorTargets []types.TrafficMirrorTarget
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeTrafficMirrorTargetsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeTrafficMirrorTargets{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeTrafficMirrorTargets{}, 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_opDescribeTrafficMirrorTargets(options.Region), middleware.Before); 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
+}
+
+// DescribeTrafficMirrorTargetsAPIClient is a client that implements the
+// DescribeTrafficMirrorTargets operation.
+type DescribeTrafficMirrorTargetsAPIClient interface {
+ DescribeTrafficMirrorTargets(context.Context, *DescribeTrafficMirrorTargetsInput, ...func(*Options)) (*DescribeTrafficMirrorTargetsOutput, error)
+}
+
+var _ DescribeTrafficMirrorTargetsAPIClient = (*Client)(nil)
+
+// DescribeTrafficMirrorTargetsPaginatorOptions is the paginator options for
+// DescribeTrafficMirrorTargets
+type DescribeTrafficMirrorTargetsPaginatorOptions struct {
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ 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
+}
+
+// DescribeTrafficMirrorTargetsPaginator is a paginator for
+// DescribeTrafficMirrorTargets
+type DescribeTrafficMirrorTargetsPaginator struct {
+ options DescribeTrafficMirrorTargetsPaginatorOptions
+ client DescribeTrafficMirrorTargetsAPIClient
+ params *DescribeTrafficMirrorTargetsInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribeTrafficMirrorTargetsPaginator returns a new
+// DescribeTrafficMirrorTargetsPaginator
+func NewDescribeTrafficMirrorTargetsPaginator(client DescribeTrafficMirrorTargetsAPIClient, params *DescribeTrafficMirrorTargetsInput, optFns ...func(*DescribeTrafficMirrorTargetsPaginatorOptions)) *DescribeTrafficMirrorTargetsPaginator {
+ if params == nil {
+ params = &DescribeTrafficMirrorTargetsInput{}
+ }
+
+ options := DescribeTrafficMirrorTargetsPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribeTrafficMirrorTargetsPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribeTrafficMirrorTargetsPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribeTrafficMirrorTargets page.
+func (p *DescribeTrafficMirrorTargetsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeTrafficMirrorTargetsOutput, 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.DescribeTrafficMirrorTargets(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_opDescribeTrafficMirrorTargets(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeTrafficMirrorTargets",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeTransitGatewayAttachments.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeTransitGatewayAttachments.go
new file mode 100644
index 00000000..a80be189
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeTransitGatewayAttachments.go
@@ -0,0 +1,259 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes one or more attachments between resources and transit gateways. By
+// default, all attachments are described. Alternatively, you can filter the
+// results by attachment ID, attachment state, resource ID, or resource owner.
+func (c *Client) DescribeTransitGatewayAttachments(ctx context.Context, params *DescribeTransitGatewayAttachmentsInput, optFns ...func(*Options)) (*DescribeTransitGatewayAttachmentsOutput, error) {
+ if params == nil {
+ params = &DescribeTransitGatewayAttachmentsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeTransitGatewayAttachments", params, optFns, c.addOperationDescribeTransitGatewayAttachmentsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeTransitGatewayAttachmentsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeTransitGatewayAttachmentsInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // One or more filters. The possible values are:
+ //
+ // * association.state - The state
+ // of the association (associating | associated | disassociating).
+ //
+ // *
+ // association.transit-gateway-route-table-id - The ID of the route table for the
+ // transit gateway.
+ //
+ // * resource-id - The ID of the resource.
+ //
+ // * resource-owner-id -
+ // The ID of the Amazon Web Services account that owns the resource.
+ //
+ // *
+ // resource-type - The resource type. Valid values are vpc | vpn |
+ // direct-connect-gateway | peering | connect.
+ //
+ // * state - The state of the
+ // attachment. Valid values are available | deleted | deleting | failed | failing |
+ // initiatingRequest | modifying | pendingAcceptance | pending | rollingBack |
+ // rejected | rejecting.
+ //
+ // * transit-gateway-attachment-id - The ID of the
+ // attachment.
+ //
+ // * transit-gateway-id - The ID of the transit gateway.
+ //
+ // *
+ // transit-gateway-owner-id - The ID of the Amazon Web Services account that owns
+ // the transit gateway.
+ Filters []types.Filter
+
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ MaxResults *int32
+
+ // The token for the next page of results.
+ NextToken *string
+
+ // The IDs of the attachments.
+ TransitGatewayAttachmentIds []string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeTransitGatewayAttachmentsOutput struct {
+
+ // The token to use to retrieve the next page of results. This value is null when
+ // there are no more results to return.
+ NextToken *string
+
+ // Information about the attachments.
+ TransitGatewayAttachments []types.TransitGatewayAttachment
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeTransitGatewayAttachmentsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeTransitGatewayAttachments{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeTransitGatewayAttachments{}, 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_opDescribeTransitGatewayAttachments(options.Region), middleware.Before); 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
+}
+
+// DescribeTransitGatewayAttachmentsAPIClient is a client that implements the
+// DescribeTransitGatewayAttachments operation.
+type DescribeTransitGatewayAttachmentsAPIClient interface {
+ DescribeTransitGatewayAttachments(context.Context, *DescribeTransitGatewayAttachmentsInput, ...func(*Options)) (*DescribeTransitGatewayAttachmentsOutput, error)
+}
+
+var _ DescribeTransitGatewayAttachmentsAPIClient = (*Client)(nil)
+
+// DescribeTransitGatewayAttachmentsPaginatorOptions is the paginator options for
+// DescribeTransitGatewayAttachments
+type DescribeTransitGatewayAttachmentsPaginatorOptions struct {
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ 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
+}
+
+// DescribeTransitGatewayAttachmentsPaginator is a paginator for
+// DescribeTransitGatewayAttachments
+type DescribeTransitGatewayAttachmentsPaginator struct {
+ options DescribeTransitGatewayAttachmentsPaginatorOptions
+ client DescribeTransitGatewayAttachmentsAPIClient
+ params *DescribeTransitGatewayAttachmentsInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribeTransitGatewayAttachmentsPaginator returns a new
+// DescribeTransitGatewayAttachmentsPaginator
+func NewDescribeTransitGatewayAttachmentsPaginator(client DescribeTransitGatewayAttachmentsAPIClient, params *DescribeTransitGatewayAttachmentsInput, optFns ...func(*DescribeTransitGatewayAttachmentsPaginatorOptions)) *DescribeTransitGatewayAttachmentsPaginator {
+ if params == nil {
+ params = &DescribeTransitGatewayAttachmentsInput{}
+ }
+
+ options := DescribeTransitGatewayAttachmentsPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribeTransitGatewayAttachmentsPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribeTransitGatewayAttachmentsPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribeTransitGatewayAttachments page.
+func (p *DescribeTransitGatewayAttachmentsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeTransitGatewayAttachmentsOutput, 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.DescribeTransitGatewayAttachments(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_opDescribeTransitGatewayAttachments(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeTransitGatewayAttachments",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeTransitGatewayConnectPeers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeTransitGatewayConnectPeers.go
new file mode 100644
index 00000000..85a55c9b
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeTransitGatewayConnectPeers.go
@@ -0,0 +1,236 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes one or more Connect peers.
+func (c *Client) DescribeTransitGatewayConnectPeers(ctx context.Context, params *DescribeTransitGatewayConnectPeersInput, optFns ...func(*Options)) (*DescribeTransitGatewayConnectPeersOutput, error) {
+ if params == nil {
+ params = &DescribeTransitGatewayConnectPeersInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeTransitGatewayConnectPeers", params, optFns, c.addOperationDescribeTransitGatewayConnectPeersMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeTransitGatewayConnectPeersOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeTransitGatewayConnectPeersInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // One or more filters. The possible values are:
+ //
+ // * state - The state of the
+ // Connect peer (pending | available | deleting | deleted).
+ //
+ // *
+ // transit-gateway-attachment-id - The ID of the attachment.
+ //
+ // *
+ // transit-gateway-connect-peer-id - The ID of the Connect peer.
+ Filters []types.Filter
+
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ MaxResults *int32
+
+ // The token for the next page of results.
+ NextToken *string
+
+ // The IDs of the Connect peers.
+ TransitGatewayConnectPeerIds []string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeTransitGatewayConnectPeersOutput struct {
+
+ // The token to use to retrieve the next page of results. This value is null when
+ // there are no more results to return.
+ NextToken *string
+
+ // Information about the Connect peers.
+ TransitGatewayConnectPeers []types.TransitGatewayConnectPeer
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeTransitGatewayConnectPeersMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeTransitGatewayConnectPeers{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeTransitGatewayConnectPeers{}, 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_opDescribeTransitGatewayConnectPeers(options.Region), middleware.Before); 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
+}
+
+// DescribeTransitGatewayConnectPeersAPIClient is a client that implements the
+// DescribeTransitGatewayConnectPeers operation.
+type DescribeTransitGatewayConnectPeersAPIClient interface {
+ DescribeTransitGatewayConnectPeers(context.Context, *DescribeTransitGatewayConnectPeersInput, ...func(*Options)) (*DescribeTransitGatewayConnectPeersOutput, error)
+}
+
+var _ DescribeTransitGatewayConnectPeersAPIClient = (*Client)(nil)
+
+// DescribeTransitGatewayConnectPeersPaginatorOptions is the paginator options for
+// DescribeTransitGatewayConnectPeers
+type DescribeTransitGatewayConnectPeersPaginatorOptions struct {
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ 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
+}
+
+// DescribeTransitGatewayConnectPeersPaginator is a paginator for
+// DescribeTransitGatewayConnectPeers
+type DescribeTransitGatewayConnectPeersPaginator struct {
+ options DescribeTransitGatewayConnectPeersPaginatorOptions
+ client DescribeTransitGatewayConnectPeersAPIClient
+ params *DescribeTransitGatewayConnectPeersInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribeTransitGatewayConnectPeersPaginator returns a new
+// DescribeTransitGatewayConnectPeersPaginator
+func NewDescribeTransitGatewayConnectPeersPaginator(client DescribeTransitGatewayConnectPeersAPIClient, params *DescribeTransitGatewayConnectPeersInput, optFns ...func(*DescribeTransitGatewayConnectPeersPaginatorOptions)) *DescribeTransitGatewayConnectPeersPaginator {
+ if params == nil {
+ params = &DescribeTransitGatewayConnectPeersInput{}
+ }
+
+ options := DescribeTransitGatewayConnectPeersPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribeTransitGatewayConnectPeersPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribeTransitGatewayConnectPeersPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribeTransitGatewayConnectPeers page.
+func (p *DescribeTransitGatewayConnectPeersPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeTransitGatewayConnectPeersOutput, 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.DescribeTransitGatewayConnectPeers(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_opDescribeTransitGatewayConnectPeers(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeTransitGatewayConnectPeers",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeTransitGatewayConnects.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeTransitGatewayConnects.go
new file mode 100644
index 00000000..c5fd8d3a
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeTransitGatewayConnects.go
@@ -0,0 +1,244 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes one or more Connect attachments.
+func (c *Client) DescribeTransitGatewayConnects(ctx context.Context, params *DescribeTransitGatewayConnectsInput, optFns ...func(*Options)) (*DescribeTransitGatewayConnectsOutput, error) {
+ if params == nil {
+ params = &DescribeTransitGatewayConnectsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeTransitGatewayConnects", params, optFns, c.addOperationDescribeTransitGatewayConnectsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeTransitGatewayConnectsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeTransitGatewayConnectsInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // One or more filters. The possible values are:
+ //
+ // * options.protocol - The tunnel
+ // protocol (gre).
+ //
+ // * state - The state of the attachment (initiating |
+ // initiatingRequest | pendingAcceptance | rollingBack | pending | available |
+ // modifying | deleting | deleted | failed | rejected | rejecting | failing).
+ //
+ // *
+ // transit-gateway-attachment-id - The ID of the Connect attachment.
+ //
+ // *
+ // transit-gateway-id - The ID of the transit gateway.
+ //
+ // *
+ // transport-transit-gateway-attachment-id - The ID of the transit gateway
+ // attachment from which the Connect attachment was created.
+ Filters []types.Filter
+
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ MaxResults *int32
+
+ // The token for the next page of results.
+ NextToken *string
+
+ // The IDs of the attachments.
+ TransitGatewayAttachmentIds []string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeTransitGatewayConnectsOutput struct {
+
+ // The token to use to retrieve the next page of results. This value is null when
+ // there are no more results to return.
+ NextToken *string
+
+ // Information about the Connect attachments.
+ TransitGatewayConnects []types.TransitGatewayConnect
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeTransitGatewayConnectsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeTransitGatewayConnects{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeTransitGatewayConnects{}, 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_opDescribeTransitGatewayConnects(options.Region), middleware.Before); 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
+}
+
+// DescribeTransitGatewayConnectsAPIClient is a client that implements the
+// DescribeTransitGatewayConnects operation.
+type DescribeTransitGatewayConnectsAPIClient interface {
+ DescribeTransitGatewayConnects(context.Context, *DescribeTransitGatewayConnectsInput, ...func(*Options)) (*DescribeTransitGatewayConnectsOutput, error)
+}
+
+var _ DescribeTransitGatewayConnectsAPIClient = (*Client)(nil)
+
+// DescribeTransitGatewayConnectsPaginatorOptions is the paginator options for
+// DescribeTransitGatewayConnects
+type DescribeTransitGatewayConnectsPaginatorOptions struct {
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ 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
+}
+
+// DescribeTransitGatewayConnectsPaginator is a paginator for
+// DescribeTransitGatewayConnects
+type DescribeTransitGatewayConnectsPaginator struct {
+ options DescribeTransitGatewayConnectsPaginatorOptions
+ client DescribeTransitGatewayConnectsAPIClient
+ params *DescribeTransitGatewayConnectsInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribeTransitGatewayConnectsPaginator returns a new
+// DescribeTransitGatewayConnectsPaginator
+func NewDescribeTransitGatewayConnectsPaginator(client DescribeTransitGatewayConnectsAPIClient, params *DescribeTransitGatewayConnectsInput, optFns ...func(*DescribeTransitGatewayConnectsPaginatorOptions)) *DescribeTransitGatewayConnectsPaginator {
+ if params == nil {
+ params = &DescribeTransitGatewayConnectsInput{}
+ }
+
+ options := DescribeTransitGatewayConnectsPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribeTransitGatewayConnectsPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribeTransitGatewayConnectsPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribeTransitGatewayConnects page.
+func (p *DescribeTransitGatewayConnectsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeTransitGatewayConnectsOutput, 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.DescribeTransitGatewayConnects(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_opDescribeTransitGatewayConnects(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeTransitGatewayConnects",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeTransitGatewayMulticastDomains.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeTransitGatewayMulticastDomains.go
new file mode 100644
index 00000000..7dc53b6f
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeTransitGatewayMulticastDomains.go
@@ -0,0 +1,237 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes one or more transit gateway multicast domains.
+func (c *Client) DescribeTransitGatewayMulticastDomains(ctx context.Context, params *DescribeTransitGatewayMulticastDomainsInput, optFns ...func(*Options)) (*DescribeTransitGatewayMulticastDomainsOutput, error) {
+ if params == nil {
+ params = &DescribeTransitGatewayMulticastDomainsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeTransitGatewayMulticastDomains", params, optFns, c.addOperationDescribeTransitGatewayMulticastDomainsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeTransitGatewayMulticastDomainsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeTransitGatewayMulticastDomainsInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // One or more filters. The possible values are:
+ //
+ // * state - The state of the
+ // transit gateway multicast domain. Valid values are pending | available |
+ // deleting | deleted.
+ //
+ // * transit-gateway-id - The ID of the transit gateway.
+ //
+ // *
+ // transit-gateway-multicast-domain-id - The ID of the transit gateway multicast
+ // domain.
+ Filters []types.Filter
+
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ MaxResults *int32
+
+ // The token for the next page of results.
+ NextToken *string
+
+ // The ID of the transit gateway multicast domain.
+ TransitGatewayMulticastDomainIds []string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeTransitGatewayMulticastDomainsOutput struct {
+
+ // The token to use to retrieve the next page of results. This value is null when
+ // there are no more results to return.
+ NextToken *string
+
+ // Information about the transit gateway multicast domains.
+ TransitGatewayMulticastDomains []types.TransitGatewayMulticastDomain
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeTransitGatewayMulticastDomainsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeTransitGatewayMulticastDomains{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeTransitGatewayMulticastDomains{}, 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_opDescribeTransitGatewayMulticastDomains(options.Region), middleware.Before); 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
+}
+
+// DescribeTransitGatewayMulticastDomainsAPIClient is a client that implements the
+// DescribeTransitGatewayMulticastDomains operation.
+type DescribeTransitGatewayMulticastDomainsAPIClient interface {
+ DescribeTransitGatewayMulticastDomains(context.Context, *DescribeTransitGatewayMulticastDomainsInput, ...func(*Options)) (*DescribeTransitGatewayMulticastDomainsOutput, error)
+}
+
+var _ DescribeTransitGatewayMulticastDomainsAPIClient = (*Client)(nil)
+
+// DescribeTransitGatewayMulticastDomainsPaginatorOptions is the paginator options
+// for DescribeTransitGatewayMulticastDomains
+type DescribeTransitGatewayMulticastDomainsPaginatorOptions struct {
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ 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
+}
+
+// DescribeTransitGatewayMulticastDomainsPaginator is a paginator for
+// DescribeTransitGatewayMulticastDomains
+type DescribeTransitGatewayMulticastDomainsPaginator struct {
+ options DescribeTransitGatewayMulticastDomainsPaginatorOptions
+ client DescribeTransitGatewayMulticastDomainsAPIClient
+ params *DescribeTransitGatewayMulticastDomainsInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribeTransitGatewayMulticastDomainsPaginator returns a new
+// DescribeTransitGatewayMulticastDomainsPaginator
+func NewDescribeTransitGatewayMulticastDomainsPaginator(client DescribeTransitGatewayMulticastDomainsAPIClient, params *DescribeTransitGatewayMulticastDomainsInput, optFns ...func(*DescribeTransitGatewayMulticastDomainsPaginatorOptions)) *DescribeTransitGatewayMulticastDomainsPaginator {
+ if params == nil {
+ params = &DescribeTransitGatewayMulticastDomainsInput{}
+ }
+
+ options := DescribeTransitGatewayMulticastDomainsPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribeTransitGatewayMulticastDomainsPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribeTransitGatewayMulticastDomainsPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribeTransitGatewayMulticastDomains page.
+func (p *DescribeTransitGatewayMulticastDomainsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeTransitGatewayMulticastDomainsOutput, 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.DescribeTransitGatewayMulticastDomains(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_opDescribeTransitGatewayMulticastDomains(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeTransitGatewayMulticastDomains",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeTransitGatewayPeeringAttachments.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeTransitGatewayPeeringAttachments.go
new file mode 100644
index 00000000..09a17fc7
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeTransitGatewayPeeringAttachments.go
@@ -0,0 +1,254 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes your transit gateway peering attachments.
+func (c *Client) DescribeTransitGatewayPeeringAttachments(ctx context.Context, params *DescribeTransitGatewayPeeringAttachmentsInput, optFns ...func(*Options)) (*DescribeTransitGatewayPeeringAttachmentsOutput, error) {
+ if params == nil {
+ params = &DescribeTransitGatewayPeeringAttachmentsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeTransitGatewayPeeringAttachments", params, optFns, c.addOperationDescribeTransitGatewayPeeringAttachmentsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeTransitGatewayPeeringAttachmentsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeTransitGatewayPeeringAttachmentsInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // One or more filters. The possible values are:
+ //
+ // * transit-gateway-attachment-id -
+ // The ID of the transit gateway attachment.
+ //
+ // * local-owner-id - The ID of your
+ // Amazon Web Services account.
+ //
+ // * remote-owner-id - The ID of the Amazon Web
+ // Services account in the remote Region that owns the transit gateway.
+ //
+ // * state -
+ // The state of the peering attachment. Valid values are available | deleted |
+ // deleting | failed | failing | initiatingRequest | modifying | pendingAcceptance
+ // | pending | rollingBack | rejected | rejecting).
+ //
+ // * tag: - The key/value
+ // combination of a tag assigned to the resource. Use the tag key in the filter
+ // name and the tag value as the filter value. For example, to find all resources
+ // that have a tag with the key Owner and the value TeamA, specify tag:Owner for
+ // the filter name and TeamA for the filter value.
+ //
+ // * tag-key - The key of a tag
+ // assigned to the resource. Use this filter to find all resources that have a tag
+ // with a specific key, regardless of the tag value.
+ //
+ // * transit-gateway-id - The ID
+ // of the transit gateway.
+ Filters []types.Filter
+
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ MaxResults *int32
+
+ // The token for the next page of results.
+ NextToken *string
+
+ // One or more IDs of the transit gateway peering attachments.
+ TransitGatewayAttachmentIds []string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeTransitGatewayPeeringAttachmentsOutput struct {
+
+ // The token to use to retrieve the next page of results. This value is null when
+ // there are no more results to return.
+ NextToken *string
+
+ // The transit gateway peering attachments.
+ TransitGatewayPeeringAttachments []types.TransitGatewayPeeringAttachment
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeTransitGatewayPeeringAttachmentsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeTransitGatewayPeeringAttachments{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeTransitGatewayPeeringAttachments{}, 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_opDescribeTransitGatewayPeeringAttachments(options.Region), middleware.Before); 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
+}
+
+// DescribeTransitGatewayPeeringAttachmentsAPIClient is a client that implements
+// the DescribeTransitGatewayPeeringAttachments operation.
+type DescribeTransitGatewayPeeringAttachmentsAPIClient interface {
+ DescribeTransitGatewayPeeringAttachments(context.Context, *DescribeTransitGatewayPeeringAttachmentsInput, ...func(*Options)) (*DescribeTransitGatewayPeeringAttachmentsOutput, error)
+}
+
+var _ DescribeTransitGatewayPeeringAttachmentsAPIClient = (*Client)(nil)
+
+// DescribeTransitGatewayPeeringAttachmentsPaginatorOptions is the paginator
+// options for DescribeTransitGatewayPeeringAttachments
+type DescribeTransitGatewayPeeringAttachmentsPaginatorOptions struct {
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ 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
+}
+
+// DescribeTransitGatewayPeeringAttachmentsPaginator is a paginator for
+// DescribeTransitGatewayPeeringAttachments
+type DescribeTransitGatewayPeeringAttachmentsPaginator struct {
+ options DescribeTransitGatewayPeeringAttachmentsPaginatorOptions
+ client DescribeTransitGatewayPeeringAttachmentsAPIClient
+ params *DescribeTransitGatewayPeeringAttachmentsInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribeTransitGatewayPeeringAttachmentsPaginator returns a new
+// DescribeTransitGatewayPeeringAttachmentsPaginator
+func NewDescribeTransitGatewayPeeringAttachmentsPaginator(client DescribeTransitGatewayPeeringAttachmentsAPIClient, params *DescribeTransitGatewayPeeringAttachmentsInput, optFns ...func(*DescribeTransitGatewayPeeringAttachmentsPaginatorOptions)) *DescribeTransitGatewayPeeringAttachmentsPaginator {
+ if params == nil {
+ params = &DescribeTransitGatewayPeeringAttachmentsInput{}
+ }
+
+ options := DescribeTransitGatewayPeeringAttachmentsPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribeTransitGatewayPeeringAttachmentsPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribeTransitGatewayPeeringAttachmentsPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribeTransitGatewayPeeringAttachments page.
+func (p *DescribeTransitGatewayPeeringAttachmentsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeTransitGatewayPeeringAttachmentsOutput, 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.DescribeTransitGatewayPeeringAttachments(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_opDescribeTransitGatewayPeeringAttachments(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeTransitGatewayPeeringAttachments",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeTransitGatewayRouteTables.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeTransitGatewayRouteTables.go
new file mode 100644
index 00000000..1b547a23
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeTransitGatewayRouteTables.go
@@ -0,0 +1,244 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes one or more transit gateway route tables. By default, all transit
+// gateway route tables are described. Alternatively, you can filter the results.
+func (c *Client) DescribeTransitGatewayRouteTables(ctx context.Context, params *DescribeTransitGatewayRouteTablesInput, optFns ...func(*Options)) (*DescribeTransitGatewayRouteTablesOutput, error) {
+ if params == nil {
+ params = &DescribeTransitGatewayRouteTablesInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeTransitGatewayRouteTables", params, optFns, c.addOperationDescribeTransitGatewayRouteTablesMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeTransitGatewayRouteTablesOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeTransitGatewayRouteTablesInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // One or more filters. The possible values are:
+ //
+ // * default-association-route-table
+ // - Indicates whether this is the default association route table for the transit
+ // gateway (true | false).
+ //
+ // * default-propagation-route-table - Indicates whether
+ // this is the default propagation route table for the transit gateway (true |
+ // false).
+ //
+ // * state - The state of the route table (available | deleting | deleted
+ // | pending).
+ //
+ // * transit-gateway-id - The ID of the transit gateway.
+ //
+ // *
+ // transit-gateway-route-table-id - The ID of the transit gateway route table.
+ Filters []types.Filter
+
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ MaxResults *int32
+
+ // The token for the next page of results.
+ NextToken *string
+
+ // The IDs of the transit gateway route tables.
+ TransitGatewayRouteTableIds []string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeTransitGatewayRouteTablesOutput struct {
+
+ // The token to use to retrieve the next page of results. This value is null when
+ // there are no more results to return.
+ NextToken *string
+
+ // Information about the transit gateway route tables.
+ TransitGatewayRouteTables []types.TransitGatewayRouteTable
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeTransitGatewayRouteTablesMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeTransitGatewayRouteTables{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeTransitGatewayRouteTables{}, 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_opDescribeTransitGatewayRouteTables(options.Region), middleware.Before); 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
+}
+
+// DescribeTransitGatewayRouteTablesAPIClient is a client that implements the
+// DescribeTransitGatewayRouteTables operation.
+type DescribeTransitGatewayRouteTablesAPIClient interface {
+ DescribeTransitGatewayRouteTables(context.Context, *DescribeTransitGatewayRouteTablesInput, ...func(*Options)) (*DescribeTransitGatewayRouteTablesOutput, error)
+}
+
+var _ DescribeTransitGatewayRouteTablesAPIClient = (*Client)(nil)
+
+// DescribeTransitGatewayRouteTablesPaginatorOptions is the paginator options for
+// DescribeTransitGatewayRouteTables
+type DescribeTransitGatewayRouteTablesPaginatorOptions struct {
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ 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
+}
+
+// DescribeTransitGatewayRouteTablesPaginator is a paginator for
+// DescribeTransitGatewayRouteTables
+type DescribeTransitGatewayRouteTablesPaginator struct {
+ options DescribeTransitGatewayRouteTablesPaginatorOptions
+ client DescribeTransitGatewayRouteTablesAPIClient
+ params *DescribeTransitGatewayRouteTablesInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribeTransitGatewayRouteTablesPaginator returns a new
+// DescribeTransitGatewayRouteTablesPaginator
+func NewDescribeTransitGatewayRouteTablesPaginator(client DescribeTransitGatewayRouteTablesAPIClient, params *DescribeTransitGatewayRouteTablesInput, optFns ...func(*DescribeTransitGatewayRouteTablesPaginatorOptions)) *DescribeTransitGatewayRouteTablesPaginator {
+ if params == nil {
+ params = &DescribeTransitGatewayRouteTablesInput{}
+ }
+
+ options := DescribeTransitGatewayRouteTablesPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribeTransitGatewayRouteTablesPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribeTransitGatewayRouteTablesPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribeTransitGatewayRouteTables page.
+func (p *DescribeTransitGatewayRouteTablesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeTransitGatewayRouteTablesOutput, 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.DescribeTransitGatewayRouteTables(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_opDescribeTransitGatewayRouteTables(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeTransitGatewayRouteTables",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeTransitGatewayVpcAttachments.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeTransitGatewayVpcAttachments.go
new file mode 100644
index 00000000..8f56cc65
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeTransitGatewayVpcAttachments.go
@@ -0,0 +1,241 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes one or more VPC attachments. By default, all VPC attachments are
+// described. Alternatively, you can filter the results.
+func (c *Client) DescribeTransitGatewayVpcAttachments(ctx context.Context, params *DescribeTransitGatewayVpcAttachmentsInput, optFns ...func(*Options)) (*DescribeTransitGatewayVpcAttachmentsOutput, error) {
+ if params == nil {
+ params = &DescribeTransitGatewayVpcAttachmentsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeTransitGatewayVpcAttachments", params, optFns, c.addOperationDescribeTransitGatewayVpcAttachmentsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeTransitGatewayVpcAttachmentsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeTransitGatewayVpcAttachmentsInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // One or more filters. The possible values are:
+ //
+ // * state - The state of the
+ // attachment. Valid values are available | deleted | deleting | failed | failing |
+ // initiatingRequest | modifying | pendingAcceptance | pending | rollingBack |
+ // rejected | rejecting.
+ //
+ // * transit-gateway-attachment-id - The ID of the
+ // attachment.
+ //
+ // * transit-gateway-id - The ID of the transit gateway.
+ //
+ // * vpc-id -
+ // The ID of the VPC.
+ Filters []types.Filter
+
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ MaxResults *int32
+
+ // The token for the next page of results.
+ NextToken *string
+
+ // The IDs of the attachments.
+ TransitGatewayAttachmentIds []string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeTransitGatewayVpcAttachmentsOutput struct {
+
+ // The token to use to retrieve the next page of results. This value is null when
+ // there are no more results to return.
+ NextToken *string
+
+ // Information about the VPC attachments.
+ TransitGatewayVpcAttachments []types.TransitGatewayVpcAttachment
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeTransitGatewayVpcAttachmentsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeTransitGatewayVpcAttachments{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeTransitGatewayVpcAttachments{}, 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_opDescribeTransitGatewayVpcAttachments(options.Region), middleware.Before); 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
+}
+
+// DescribeTransitGatewayVpcAttachmentsAPIClient is a client that implements the
+// DescribeTransitGatewayVpcAttachments operation.
+type DescribeTransitGatewayVpcAttachmentsAPIClient interface {
+ DescribeTransitGatewayVpcAttachments(context.Context, *DescribeTransitGatewayVpcAttachmentsInput, ...func(*Options)) (*DescribeTransitGatewayVpcAttachmentsOutput, error)
+}
+
+var _ DescribeTransitGatewayVpcAttachmentsAPIClient = (*Client)(nil)
+
+// DescribeTransitGatewayVpcAttachmentsPaginatorOptions is the paginator options
+// for DescribeTransitGatewayVpcAttachments
+type DescribeTransitGatewayVpcAttachmentsPaginatorOptions struct {
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ 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
+}
+
+// DescribeTransitGatewayVpcAttachmentsPaginator is a paginator for
+// DescribeTransitGatewayVpcAttachments
+type DescribeTransitGatewayVpcAttachmentsPaginator struct {
+ options DescribeTransitGatewayVpcAttachmentsPaginatorOptions
+ client DescribeTransitGatewayVpcAttachmentsAPIClient
+ params *DescribeTransitGatewayVpcAttachmentsInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribeTransitGatewayVpcAttachmentsPaginator returns a new
+// DescribeTransitGatewayVpcAttachmentsPaginator
+func NewDescribeTransitGatewayVpcAttachmentsPaginator(client DescribeTransitGatewayVpcAttachmentsAPIClient, params *DescribeTransitGatewayVpcAttachmentsInput, optFns ...func(*DescribeTransitGatewayVpcAttachmentsPaginatorOptions)) *DescribeTransitGatewayVpcAttachmentsPaginator {
+ if params == nil {
+ params = &DescribeTransitGatewayVpcAttachmentsInput{}
+ }
+
+ options := DescribeTransitGatewayVpcAttachmentsPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribeTransitGatewayVpcAttachmentsPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribeTransitGatewayVpcAttachmentsPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribeTransitGatewayVpcAttachments page.
+func (p *DescribeTransitGatewayVpcAttachmentsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeTransitGatewayVpcAttachmentsOutput, 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.DescribeTransitGatewayVpcAttachments(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_opDescribeTransitGatewayVpcAttachments(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeTransitGatewayVpcAttachments",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeTransitGateways.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeTransitGateways.go
new file mode 100644
index 00000000..37b2d183
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeTransitGateways.go
@@ -0,0 +1,265 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes one or more transit gateways. By default, all transit gateways are
+// described. Alternatively, you can filter the results.
+func (c *Client) DescribeTransitGateways(ctx context.Context, params *DescribeTransitGatewaysInput, optFns ...func(*Options)) (*DescribeTransitGatewaysOutput, error) {
+ if params == nil {
+ params = &DescribeTransitGatewaysInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeTransitGateways", params, optFns, c.addOperationDescribeTransitGatewaysMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeTransitGatewaysOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeTransitGatewaysInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // One or more filters. The possible values are:
+ //
+ // *
+ // options.propagation-default-route-table-id - The ID of the default propagation
+ // route table.
+ //
+ // * options.amazon-side-asn - The private ASN for the Amazon side of
+ // a BGP session.
+ //
+ // * options.association-default-route-table-id - The ID of the
+ // default association route table.
+ //
+ // * options.auto-accept-shared-attachments -
+ // Indicates whether there is automatic acceptance of attachment requests (enable |
+ // disable).
+ //
+ // * options.default-route-table-association - Indicates whether
+ // resource attachments are automatically associated with the default association
+ // route table (enable | disable).
+ //
+ // * options.default-route-table-propagation -
+ // Indicates whether resource attachments automatically propagate routes to the
+ // default propagation route table (enable | disable).
+ //
+ // * options.dns-support -
+ // Indicates whether DNS support is enabled (enable | disable).
+ //
+ // *
+ // options.vpn-ecmp-support - Indicates whether Equal Cost Multipath Protocol
+ // support is enabled (enable | disable).
+ //
+ // * owner-id - The ID of the Amazon Web
+ // Services account that owns the transit gateway.
+ //
+ // * state - The state of the
+ // transit gateway (available | deleted | deleting | modifying | pending).
+ //
+ // *
+ // transit-gateway-id - The ID of the transit gateway.
+ Filters []types.Filter
+
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ MaxResults *int32
+
+ // The token for the next page of results.
+ NextToken *string
+
+ // The IDs of the transit gateways.
+ TransitGatewayIds []string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeTransitGatewaysOutput struct {
+
+ // The token to use to retrieve the next page of results. This value is null when
+ // there are no more results to return.
+ NextToken *string
+
+ // Information about the transit gateways.
+ TransitGateways []types.TransitGateway
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeTransitGatewaysMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeTransitGateways{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeTransitGateways{}, 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_opDescribeTransitGateways(options.Region), middleware.Before); 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
+}
+
+// DescribeTransitGatewaysAPIClient is a client that implements the
+// DescribeTransitGateways operation.
+type DescribeTransitGatewaysAPIClient interface {
+ DescribeTransitGateways(context.Context, *DescribeTransitGatewaysInput, ...func(*Options)) (*DescribeTransitGatewaysOutput, error)
+}
+
+var _ DescribeTransitGatewaysAPIClient = (*Client)(nil)
+
+// DescribeTransitGatewaysPaginatorOptions is the paginator options for
+// DescribeTransitGateways
+type DescribeTransitGatewaysPaginatorOptions struct {
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ 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
+}
+
+// DescribeTransitGatewaysPaginator is a paginator for DescribeTransitGateways
+type DescribeTransitGatewaysPaginator struct {
+ options DescribeTransitGatewaysPaginatorOptions
+ client DescribeTransitGatewaysAPIClient
+ params *DescribeTransitGatewaysInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribeTransitGatewaysPaginator returns a new
+// DescribeTransitGatewaysPaginator
+func NewDescribeTransitGatewaysPaginator(client DescribeTransitGatewaysAPIClient, params *DescribeTransitGatewaysInput, optFns ...func(*DescribeTransitGatewaysPaginatorOptions)) *DescribeTransitGatewaysPaginator {
+ if params == nil {
+ params = &DescribeTransitGatewaysInput{}
+ }
+
+ options := DescribeTransitGatewaysPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribeTransitGatewaysPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribeTransitGatewaysPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribeTransitGateways page.
+func (p *DescribeTransitGatewaysPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeTransitGatewaysOutput, 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.DescribeTransitGateways(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_opDescribeTransitGateways(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeTransitGateways",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeTrunkInterfaceAssociations.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeTrunkInterfaceAssociations.go
new file mode 100644
index 00000000..ac56ad8d
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeTrunkInterfaceAssociations.go
@@ -0,0 +1,234 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// This API action is currently in limited preview only. If you are interested in
+// using this feature, contact your account manager. Describes one or more network
+// interface trunk associations.
+func (c *Client) DescribeTrunkInterfaceAssociations(ctx context.Context, params *DescribeTrunkInterfaceAssociationsInput, optFns ...func(*Options)) (*DescribeTrunkInterfaceAssociationsOutput, error) {
+ if params == nil {
+ params = &DescribeTrunkInterfaceAssociationsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeTrunkInterfaceAssociations", params, optFns, c.addOperationDescribeTrunkInterfaceAssociationsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeTrunkInterfaceAssociationsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeTrunkInterfaceAssociationsInput struct {
+
+ // The IDs of the associations.
+ AssociationIds []string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // One or more filters.
+ //
+ // * gre-key - The ID of a trunk interface association.
+ //
+ // *
+ // interface-protocol - The interface protocol. Valid values are VLAN and GRE.
+ Filters []types.Filter
+
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ MaxResults *int32
+
+ // The token for the next page of results.
+ NextToken *string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeTrunkInterfaceAssociationsOutput struct {
+
+ // Information about the trunk associations.
+ InterfaceAssociations []types.TrunkInterfaceAssociation
+
+ // The token to use to retrieve the next page of results. This value is null when
+ // there are no more results to return.
+ NextToken *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeTrunkInterfaceAssociationsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeTrunkInterfaceAssociations{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeTrunkInterfaceAssociations{}, 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_opDescribeTrunkInterfaceAssociations(options.Region), middleware.Before); 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
+}
+
+// DescribeTrunkInterfaceAssociationsAPIClient is a client that implements the
+// DescribeTrunkInterfaceAssociations operation.
+type DescribeTrunkInterfaceAssociationsAPIClient interface {
+ DescribeTrunkInterfaceAssociations(context.Context, *DescribeTrunkInterfaceAssociationsInput, ...func(*Options)) (*DescribeTrunkInterfaceAssociationsOutput, error)
+}
+
+var _ DescribeTrunkInterfaceAssociationsAPIClient = (*Client)(nil)
+
+// DescribeTrunkInterfaceAssociationsPaginatorOptions is the paginator options for
+// DescribeTrunkInterfaceAssociations
+type DescribeTrunkInterfaceAssociationsPaginatorOptions struct {
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ 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
+}
+
+// DescribeTrunkInterfaceAssociationsPaginator is a paginator for
+// DescribeTrunkInterfaceAssociations
+type DescribeTrunkInterfaceAssociationsPaginator struct {
+ options DescribeTrunkInterfaceAssociationsPaginatorOptions
+ client DescribeTrunkInterfaceAssociationsAPIClient
+ params *DescribeTrunkInterfaceAssociationsInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribeTrunkInterfaceAssociationsPaginator returns a new
+// DescribeTrunkInterfaceAssociationsPaginator
+func NewDescribeTrunkInterfaceAssociationsPaginator(client DescribeTrunkInterfaceAssociationsAPIClient, params *DescribeTrunkInterfaceAssociationsInput, optFns ...func(*DescribeTrunkInterfaceAssociationsPaginatorOptions)) *DescribeTrunkInterfaceAssociationsPaginator {
+ if params == nil {
+ params = &DescribeTrunkInterfaceAssociationsInput{}
+ }
+
+ options := DescribeTrunkInterfaceAssociationsPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribeTrunkInterfaceAssociationsPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribeTrunkInterfaceAssociationsPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribeTrunkInterfaceAssociations page.
+func (p *DescribeTrunkInterfaceAssociationsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeTrunkInterfaceAssociationsOutput, 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.DescribeTrunkInterfaceAssociations(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_opDescribeTrunkInterfaceAssociations(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeTrunkInterfaceAssociations",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVolumeAttribute.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVolumeAttribute.go
new file mode 100644
index 00000000..92c796b8
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVolumeAttribute.go
@@ -0,0 +1,141 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes the specified attribute of the specified volume. You can specify only
+// one attribute at a time. For more information about EBS volumes, see Amazon EBS
+// volumes (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumes.html) in
+// the Amazon Elastic Compute Cloud User Guide.
+func (c *Client) DescribeVolumeAttribute(ctx context.Context, params *DescribeVolumeAttributeInput, optFns ...func(*Options)) (*DescribeVolumeAttributeOutput, error) {
+ if params == nil {
+ params = &DescribeVolumeAttributeInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeVolumeAttribute", params, optFns, c.addOperationDescribeVolumeAttributeMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeVolumeAttributeOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeVolumeAttributeInput struct {
+
+ // The attribute of the volume. This parameter is required.
+ //
+ // This member is required.
+ Attribute types.VolumeAttributeName
+
+ // The ID of the volume.
+ //
+ // This member is required.
+ VolumeId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type DescribeVolumeAttributeOutput struct {
+
+ // The state of autoEnableIO attribute.
+ AutoEnableIO *types.AttributeBooleanValue
+
+ // A list of product codes.
+ ProductCodes []types.ProductCode
+
+ // The ID of the volume.
+ VolumeId *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeVolumeAttributeMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeVolumeAttribute{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeVolumeAttribute{}, 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 = addOpDescribeVolumeAttributeValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeVolumeAttribute(options.Region), middleware.Before); 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_opDescribeVolumeAttribute(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeVolumeAttribute",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVolumeStatus.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVolumeStatus.go
new file mode 100644
index 00000000..5e4ee0f6
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVolumeStatus.go
@@ -0,0 +1,307 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes the status of the specified volumes. Volume status provides the result
+// of the checks performed on your volumes to determine events that can impair the
+// performance of your volumes. The performance of a volume can be affected if an
+// issue occurs on the volume's underlying host. If the volume's underlying host
+// experiences a power outage or system issue, after the system is restored, there
+// could be data inconsistencies on the volume. Volume events notify you if this
+// occurs. Volume actions notify you if any action needs to be taken in response to
+// the event. The DescribeVolumeStatus operation provides the following information
+// about the specified volumes: Status: Reflects the current status of the volume.
+// The possible values are ok, impaired , warning, or insufficient-data. If all
+// checks pass, the overall status of the volume is ok. If the check fails, the
+// overall status is impaired. If the status is insufficient-data, then the checks
+// might still be taking place on your volume at the time. We recommend that you
+// retry the request. For more information about volume status, see Monitor the
+// status of your volumes
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/monitoring-volume-status.html)
+// in the Amazon Elastic Compute Cloud User Guide. Events: Reflect the cause of a
+// volume status and might require you to take action. For example, if your volume
+// returns an impaired status, then the volume event might be
+// potential-data-inconsistency. This means that your volume has been affected by
+// an issue with the underlying host, has all I/O operations disabled, and might
+// have inconsistent data. Actions: Reflect the actions you might have to take in
+// response to an event. For example, if the status of the volume is impaired and
+// the volume event shows potential-data-inconsistency, then the action shows
+// enable-volume-io. This means that you may want to enable the I/O operations for
+// the volume by calling the EnableVolumeIO action and then check the volume for
+// data consistency. Volume status is based on the volume status checks, and does
+// not reflect the volume state. Therefore, volume status does not indicate volumes
+// in the error state (for example, when a volume is incapable of accepting I/O.)
+func (c *Client) DescribeVolumeStatus(ctx context.Context, params *DescribeVolumeStatusInput, optFns ...func(*Options)) (*DescribeVolumeStatusOutput, error) {
+ if params == nil {
+ params = &DescribeVolumeStatusInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeVolumeStatus", params, optFns, c.addOperationDescribeVolumeStatusMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeVolumeStatusOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeVolumeStatusInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The filters.
+ //
+ // * action.code - The action code for the event (for example,
+ // enable-volume-io).
+ //
+ // * action.description - A description of the action.
+ //
+ // *
+ // action.event-id - The event ID associated with the action.
+ //
+ // * availability-zone
+ // - The Availability Zone of the instance.
+ //
+ // * event.description - A description of
+ // the event.
+ //
+ // * event.event-id - The event ID.
+ //
+ // * event.event-type - The event
+ // type (for io-enabled: passed | failed; for io-performance:
+ // io-performance:degraded | io-performance:severely-degraded |
+ // io-performance:stalled).
+ //
+ // * event.not-after - The latest end time for the
+ // event.
+ //
+ // * event.not-before - The earliest start time for the event.
+ //
+ // *
+ // volume-status.details-name - The cause for volume-status.status (io-enabled |
+ // io-performance).
+ //
+ // * volume-status.details-status - The status of
+ // volume-status.details-name (for io-enabled: passed | failed; for io-performance:
+ // normal | degraded | severely-degraded | stalled).
+ //
+ // * volume-status.status - The
+ // status of the volume (ok | impaired | warning | insufficient-data).
+ Filters []types.Filter
+
+ // The maximum number of volume results returned by DescribeVolumeStatus in
+ // paginated output. When this parameter is used, the request only returns
+ // MaxResults results in a single page along with a NextToken response element. The
+ // remaining results of the initial request can be seen by sending another request
+ // with the returned NextToken value. This value can be between 5 and 1,000; if
+ // MaxResults is given a value larger than 1,000, only 1,000 results are returned.
+ // If this parameter is not used, then DescribeVolumeStatus returns all results.
+ // You cannot specify this parameter and the volume IDs parameter in the same
+ // request.
+ MaxResults *int32
+
+ // The NextToken value to include in a future DescribeVolumeStatus request. When
+ // the results of the request exceed MaxResults, this value can be used to retrieve
+ // the next page of results. This value is null when there are no more results to
+ // return.
+ NextToken *string
+
+ // The IDs of the volumes. Default: Describes all your volumes.
+ VolumeIds []string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeVolumeStatusOutput struct {
+
+ // The token to use to retrieve the next page of results. This value is null when
+ // there are no more results to return.
+ NextToken *string
+
+ // Information about the status of the volumes.
+ VolumeStatuses []types.VolumeStatusItem
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeVolumeStatusMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeVolumeStatus{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeVolumeStatus{}, 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_opDescribeVolumeStatus(options.Region), middleware.Before); 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
+}
+
+// DescribeVolumeStatusAPIClient is a client that implements the
+// DescribeVolumeStatus operation.
+type DescribeVolumeStatusAPIClient interface {
+ DescribeVolumeStatus(context.Context, *DescribeVolumeStatusInput, ...func(*Options)) (*DescribeVolumeStatusOutput, error)
+}
+
+var _ DescribeVolumeStatusAPIClient = (*Client)(nil)
+
+// DescribeVolumeStatusPaginatorOptions is the paginator options for
+// DescribeVolumeStatus
+type DescribeVolumeStatusPaginatorOptions struct {
+ // The maximum number of volume results returned by DescribeVolumeStatus in
+ // paginated output. When this parameter is used, the request only returns
+ // MaxResults results in a single page along with a NextToken response element. The
+ // remaining results of the initial request can be seen by sending another request
+ // with the returned NextToken value. This value can be between 5 and 1,000; if
+ // MaxResults is given a value larger than 1,000, only 1,000 results are returned.
+ // If this parameter is not used, then DescribeVolumeStatus returns all results.
+ // You cannot specify this parameter and the volume IDs parameter in the same
+ // 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
+}
+
+// DescribeVolumeStatusPaginator is a paginator for DescribeVolumeStatus
+type DescribeVolumeStatusPaginator struct {
+ options DescribeVolumeStatusPaginatorOptions
+ client DescribeVolumeStatusAPIClient
+ params *DescribeVolumeStatusInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribeVolumeStatusPaginator returns a new DescribeVolumeStatusPaginator
+func NewDescribeVolumeStatusPaginator(client DescribeVolumeStatusAPIClient, params *DescribeVolumeStatusInput, optFns ...func(*DescribeVolumeStatusPaginatorOptions)) *DescribeVolumeStatusPaginator {
+ if params == nil {
+ params = &DescribeVolumeStatusInput{}
+ }
+
+ options := DescribeVolumeStatusPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribeVolumeStatusPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribeVolumeStatusPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribeVolumeStatus page.
+func (p *DescribeVolumeStatusPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeVolumeStatusOutput, 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.DescribeVolumeStatus(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_opDescribeVolumeStatus(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeVolumeStatus",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVolumes.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVolumes.go
new file mode 100644
index 00000000..3631339f
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVolumes.go
@@ -0,0 +1,868 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+import (
+ "context"
+ "errors"
+ "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/ec2/types"
+ smithy "github.com/aws/smithy-go"
+ "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"
+)
+
+// Describes the specified EBS volumes or all of your EBS volumes. If you are
+// describing a long list of volumes, we recommend that you paginate the output to
+// make the list more manageable. The MaxResults parameter sets the maximum number
+// of results returned in a single page. If the list of results exceeds your
+// MaxResults value, then that number of results is returned along with a NextToken
+// value that can be passed to a subsequent DescribeVolumes request to retrieve the
+// remaining results. For more information about EBS volumes, see Amazon EBS
+// volumes (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumes.html) in
+// the Amazon Elastic Compute Cloud User Guide.
+func (c *Client) DescribeVolumes(ctx context.Context, params *DescribeVolumesInput, optFns ...func(*Options)) (*DescribeVolumesOutput, error) {
+ if params == nil {
+ params = &DescribeVolumesInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeVolumes", params, optFns, c.addOperationDescribeVolumesMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeVolumesOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeVolumesInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The filters.
+ //
+ // * attachment.attach-time - The time stamp when the attachment
+ // initiated.
+ //
+ // * attachment.delete-on-termination - Whether the volume is deleted
+ // on instance termination.
+ //
+ // * attachment.device - The device name specified in the
+ // block device mapping (for example, /dev/sda1).
+ //
+ // * attachment.instance-id - The
+ // ID of the instance the volume is attached to.
+ //
+ // * attachment.status - The
+ // attachment state (attaching | attached | detaching).
+ //
+ // * availability-zone - The
+ // Availability Zone in which the volume was created.
+ //
+ // * create-time - The time
+ // stamp when the volume was created.
+ //
+ // * encrypted - Indicates whether the volume
+ // is encrypted (true | false)
+ //
+ // * multi-attach-enabled - Indicates whether the
+ // volume is enabled for Multi-Attach (true | false)
+ //
+ // * fast-restored - Indicates
+ // whether the volume was created from a snapshot that is enabled for fast snapshot
+ // restore (true | false).
+ //
+ // * size - The size of the volume, in GiB.
+ //
+ // * snapshot-id
+ // - The snapshot from which the volume was created.
+ //
+ // * status - The state of the
+ // volume (creating | available | in-use | deleting | deleted | error).
+ //
+ // * tag: -
+ // The key/value combination of a tag assigned to the resource. Use the tag key in
+ // the filter name and the tag value as the filter value. For example, to find all
+ // resources that have a tag with the key Owner and the value TeamA, specify
+ // tag:Owner for the filter name and TeamA for the filter value.
+ //
+ // * tag-key - The
+ // key of a tag assigned to the resource. Use this filter to find all resources
+ // assigned a tag with a specific key, regardless of the tag value.
+ //
+ // * volume-id -
+ // The volume ID.
+ //
+ // * volume-type - The Amazon EBS volume type (gp2 | gp3 | io1 |
+ // io2 | st1 | sc1| standard)
+ Filters []types.Filter
+
+ // The maximum number of volume results returned by DescribeVolumes in paginated
+ // output. When this parameter is used, DescribeVolumes only returns MaxResults
+ // results in a single page along with a NextToken response element. The remaining
+ // results of the initial request can be seen by sending another DescribeVolumes
+ // request with the returned NextToken value. This value can be between 5 and 500;
+ // if MaxResults is given a value larger than 500, only 500 results are returned.
+ // If this parameter is not used, then DescribeVolumes returns all results. You
+ // cannot specify this parameter and the volume IDs parameter in the same request.
+ MaxResults *int32
+
+ // The NextToken value returned from a previous paginated DescribeVolumes request
+ // where MaxResults was used and the results exceeded the value of that parameter.
+ // Pagination continues from the end of the previous results that returned the
+ // NextToken value. This value is null when there are no more results to return.
+ NextToken *string
+
+ // The volume IDs.
+ VolumeIds []string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeVolumesOutput struct {
+
+ // The NextToken value to include in a future DescribeVolumes request. When the
+ // results of a DescribeVolumes request exceed MaxResults, this value can be used
+ // to retrieve the next page of results. This value is null when there are no more
+ // results to return.
+ NextToken *string
+
+ // Information about the volumes.
+ Volumes []types.Volume
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeVolumesMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeVolumes{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeVolumes{}, 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_opDescribeVolumes(options.Region), middleware.Before); 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
+}
+
+// DescribeVolumesAPIClient is a client that implements the DescribeVolumes
+// operation.
+type DescribeVolumesAPIClient interface {
+ DescribeVolumes(context.Context, *DescribeVolumesInput, ...func(*Options)) (*DescribeVolumesOutput, error)
+}
+
+var _ DescribeVolumesAPIClient = (*Client)(nil)
+
+// DescribeVolumesPaginatorOptions is the paginator options for DescribeVolumes
+type DescribeVolumesPaginatorOptions struct {
+ // The maximum number of volume results returned by DescribeVolumes in paginated
+ // output. When this parameter is used, DescribeVolumes only returns MaxResults
+ // results in a single page along with a NextToken response element. The remaining
+ // results of the initial request can be seen by sending another DescribeVolumes
+ // request with the returned NextToken value. This value can be between 5 and 500;
+ // if MaxResults is given a value larger than 500, only 500 results are returned.
+ // If this parameter is not used, then DescribeVolumes returns all results. You
+ // cannot specify this parameter and the volume IDs parameter in the same 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
+}
+
+// DescribeVolumesPaginator is a paginator for DescribeVolumes
+type DescribeVolumesPaginator struct {
+ options DescribeVolumesPaginatorOptions
+ client DescribeVolumesAPIClient
+ params *DescribeVolumesInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribeVolumesPaginator returns a new DescribeVolumesPaginator
+func NewDescribeVolumesPaginator(client DescribeVolumesAPIClient, params *DescribeVolumesInput, optFns ...func(*DescribeVolumesPaginatorOptions)) *DescribeVolumesPaginator {
+ if params == nil {
+ params = &DescribeVolumesInput{}
+ }
+
+ options := DescribeVolumesPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribeVolumesPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribeVolumesPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribeVolumes page.
+func (p *DescribeVolumesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeVolumesOutput, 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.DescribeVolumes(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
+}
+
+// VolumeAvailableWaiterOptions are waiter options for VolumeAvailableWaiter
+type VolumeAvailableWaiterOptions 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,
+ // VolumeAvailableWaiter will use default minimum delay of 15 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, VolumeAvailableWaiter 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, *DescribeVolumesInput, *DescribeVolumesOutput, error) (bool, error)
+}
+
+// VolumeAvailableWaiter defines the waiters for VolumeAvailable
+type VolumeAvailableWaiter struct {
+ client DescribeVolumesAPIClient
+
+ options VolumeAvailableWaiterOptions
+}
+
+// NewVolumeAvailableWaiter constructs a VolumeAvailableWaiter.
+func NewVolumeAvailableWaiter(client DescribeVolumesAPIClient, optFns ...func(*VolumeAvailableWaiterOptions)) *VolumeAvailableWaiter {
+ options := VolumeAvailableWaiterOptions{}
+ options.MinDelay = 15 * time.Second
+ options.MaxDelay = 120 * time.Second
+ options.Retryable = volumeAvailableStateRetryable
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+ return &VolumeAvailableWaiter{
+ client: client,
+ options: options,
+ }
+}
+
+// Wait calls the waiter function for VolumeAvailable waiter. The maxWaitDur is the
+// maximum wait duration the waiter will wait. The maxWaitDur is required and must
+// be greater than zero.
+func (w *VolumeAvailableWaiter) Wait(ctx context.Context, params *DescribeVolumesInput, maxWaitDur time.Duration, optFns ...func(*VolumeAvailableWaiterOptions)) error {
+ if maxWaitDur <= 0 {
+ return 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 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.DescribeVolumes(ctx, params, func(o *Options) {
+ o.APIOptions = append(o.APIOptions, apiOptions...)
+ })
+
+ retryable, err := options.Retryable(ctx, params, out, err)
+ if err != nil {
+ return err
+ }
+ if !retryable {
+ return 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 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 fmt.Errorf("request cancelled while waiting, %w", err)
+ }
+ }
+ return fmt.Errorf("exceeded max wait time for VolumeAvailable waiter")
+}
+
+func volumeAvailableStateRetryable(ctx context.Context, input *DescribeVolumesInput, output *DescribeVolumesOutput, err error) (bool, error) {
+
+ if err == nil {
+ pathValue, err := jmespath.Search("Volumes[].State", output)
+ if err != nil {
+ return false, fmt.Errorf("error evaluating waiter state: %w", err)
+ }
+
+ expectedValue := "available"
+ var match = true
+ listOfValues, ok := pathValue.([]interface{})
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected list got %T", pathValue)
+ }
+
+ if len(listOfValues) == 0 {
+ match = false
+ }
+ for _, v := range listOfValues {
+ value, ok := v.(types.VolumeState)
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected types.VolumeState value, got %T", pathValue)
+ }
+
+ if string(value) != expectedValue {
+ match = false
+ }
+ }
+
+ if match {
+ return false, nil
+ }
+ }
+
+ if err == nil {
+ pathValue, err := jmespath.Search("Volumes[].State", output)
+ if err != nil {
+ return false, fmt.Errorf("error evaluating waiter state: %w", err)
+ }
+
+ expectedValue := "deleted"
+ listOfValues, ok := pathValue.([]interface{})
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected list got %T", pathValue)
+ }
+
+ for _, v := range listOfValues {
+ value, ok := v.(types.VolumeState)
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected types.VolumeState value, got %T", pathValue)
+ }
+
+ if string(value) == expectedValue {
+ return false, fmt.Errorf("waiter state transitioned to Failure")
+ }
+ }
+ }
+
+ return true, nil
+}
+
+// VolumeDeletedWaiterOptions are waiter options for VolumeDeletedWaiter
+type VolumeDeletedWaiterOptions 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,
+ // VolumeDeletedWaiter will use default minimum delay of 15 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, VolumeDeletedWaiter 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, *DescribeVolumesInput, *DescribeVolumesOutput, error) (bool, error)
+}
+
+// VolumeDeletedWaiter defines the waiters for VolumeDeleted
+type VolumeDeletedWaiter struct {
+ client DescribeVolumesAPIClient
+
+ options VolumeDeletedWaiterOptions
+}
+
+// NewVolumeDeletedWaiter constructs a VolumeDeletedWaiter.
+func NewVolumeDeletedWaiter(client DescribeVolumesAPIClient, optFns ...func(*VolumeDeletedWaiterOptions)) *VolumeDeletedWaiter {
+ options := VolumeDeletedWaiterOptions{}
+ options.MinDelay = 15 * time.Second
+ options.MaxDelay = 120 * time.Second
+ options.Retryable = volumeDeletedStateRetryable
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+ return &VolumeDeletedWaiter{
+ client: client,
+ options: options,
+ }
+}
+
+// Wait calls the waiter function for VolumeDeleted waiter. The maxWaitDur is the
+// maximum wait duration the waiter will wait. The maxWaitDur is required and must
+// be greater than zero.
+func (w *VolumeDeletedWaiter) Wait(ctx context.Context, params *DescribeVolumesInput, maxWaitDur time.Duration, optFns ...func(*VolumeDeletedWaiterOptions)) error {
+ if maxWaitDur <= 0 {
+ return 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 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.DescribeVolumes(ctx, params, func(o *Options) {
+ o.APIOptions = append(o.APIOptions, apiOptions...)
+ })
+
+ retryable, err := options.Retryable(ctx, params, out, err)
+ if err != nil {
+ return err
+ }
+ if !retryable {
+ return 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 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 fmt.Errorf("request cancelled while waiting, %w", err)
+ }
+ }
+ return fmt.Errorf("exceeded max wait time for VolumeDeleted waiter")
+}
+
+func volumeDeletedStateRetryable(ctx context.Context, input *DescribeVolumesInput, output *DescribeVolumesOutput, err error) (bool, error) {
+
+ if err == nil {
+ pathValue, err := jmespath.Search("Volumes[].State", output)
+ if err != nil {
+ return false, fmt.Errorf("error evaluating waiter state: %w", err)
+ }
+
+ expectedValue := "deleted"
+ var match = true
+ listOfValues, ok := pathValue.([]interface{})
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected list got %T", pathValue)
+ }
+
+ if len(listOfValues) == 0 {
+ match = false
+ }
+ for _, v := range listOfValues {
+ value, ok := v.(types.VolumeState)
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected types.VolumeState value, got %T", pathValue)
+ }
+
+ if string(value) != expectedValue {
+ match = false
+ }
+ }
+
+ if match {
+ return false, nil
+ }
+ }
+
+ if err != nil {
+ var apiErr smithy.APIError
+ ok := errors.As(err, &apiErr)
+ if !ok {
+ return false, fmt.Errorf("expected err to be of type smithy.APIError, got %w", err)
+ }
+
+ if "InvalidVolume.NotFound" == apiErr.ErrorCode() {
+ return false, nil
+ }
+ }
+
+ return true, nil
+}
+
+// VolumeInUseWaiterOptions are waiter options for VolumeInUseWaiter
+type VolumeInUseWaiterOptions 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,
+ // VolumeInUseWaiter will use default minimum delay of 15 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, VolumeInUseWaiter 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, *DescribeVolumesInput, *DescribeVolumesOutput, error) (bool, error)
+}
+
+// VolumeInUseWaiter defines the waiters for VolumeInUse
+type VolumeInUseWaiter struct {
+ client DescribeVolumesAPIClient
+
+ options VolumeInUseWaiterOptions
+}
+
+// NewVolumeInUseWaiter constructs a VolumeInUseWaiter.
+func NewVolumeInUseWaiter(client DescribeVolumesAPIClient, optFns ...func(*VolumeInUseWaiterOptions)) *VolumeInUseWaiter {
+ options := VolumeInUseWaiterOptions{}
+ options.MinDelay = 15 * time.Second
+ options.MaxDelay = 120 * time.Second
+ options.Retryable = volumeInUseStateRetryable
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+ return &VolumeInUseWaiter{
+ client: client,
+ options: options,
+ }
+}
+
+// Wait calls the waiter function for VolumeInUse waiter. The maxWaitDur is the
+// maximum wait duration the waiter will wait. The maxWaitDur is required and must
+// be greater than zero.
+func (w *VolumeInUseWaiter) Wait(ctx context.Context, params *DescribeVolumesInput, maxWaitDur time.Duration, optFns ...func(*VolumeInUseWaiterOptions)) error {
+ if maxWaitDur <= 0 {
+ return 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 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.DescribeVolumes(ctx, params, func(o *Options) {
+ o.APIOptions = append(o.APIOptions, apiOptions...)
+ })
+
+ retryable, err := options.Retryable(ctx, params, out, err)
+ if err != nil {
+ return err
+ }
+ if !retryable {
+ return 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 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 fmt.Errorf("request cancelled while waiting, %w", err)
+ }
+ }
+ return fmt.Errorf("exceeded max wait time for VolumeInUse waiter")
+}
+
+func volumeInUseStateRetryable(ctx context.Context, input *DescribeVolumesInput, output *DescribeVolumesOutput, err error) (bool, error) {
+
+ if err == nil {
+ pathValue, err := jmespath.Search("Volumes[].State", output)
+ if err != nil {
+ return false, fmt.Errorf("error evaluating waiter state: %w", err)
+ }
+
+ expectedValue := "in-use"
+ var match = true
+ listOfValues, ok := pathValue.([]interface{})
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected list got %T", pathValue)
+ }
+
+ if len(listOfValues) == 0 {
+ match = false
+ }
+ for _, v := range listOfValues {
+ value, ok := v.(types.VolumeState)
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected types.VolumeState value, got %T", pathValue)
+ }
+
+ if string(value) != expectedValue {
+ match = false
+ }
+ }
+
+ if match {
+ return false, nil
+ }
+ }
+
+ if err == nil {
+ pathValue, err := jmespath.Search("Volumes[].State", output)
+ if err != nil {
+ return false, fmt.Errorf("error evaluating waiter state: %w", err)
+ }
+
+ expectedValue := "deleted"
+ listOfValues, ok := pathValue.([]interface{})
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected list got %T", pathValue)
+ }
+
+ for _, v := range listOfValues {
+ value, ok := v.(types.VolumeState)
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected types.VolumeState value, got %T", pathValue)
+ }
+
+ if string(value) == expectedValue {
+ return false, fmt.Errorf("waiter state transitioned to Failure")
+ }
+ }
+ }
+
+ return true, nil
+}
+
+func newServiceMetadataMiddleware_opDescribeVolumes(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeVolumes",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVolumesModifications.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVolumesModifications.go
new file mode 100644
index 00000000..afc77da9
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVolumesModifications.go
@@ -0,0 +1,267 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes the most recent volume modification request for the specified EBS
+// volumes. If a volume has never been modified, some information in the output
+// will be null. If a volume has been modified more than once, the output includes
+// only the most recent modification request. You can also use CloudWatch Events to
+// check the status of a modification to an EBS volume. For information about
+// CloudWatch Events, see the Amazon CloudWatch Events User Guide
+// (https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/). For more
+// information, see Monitor the progress of volume modifications
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/monitoring-volume-modifications.html)
+// in the Amazon Elastic Compute Cloud User Guide.
+func (c *Client) DescribeVolumesModifications(ctx context.Context, params *DescribeVolumesModificationsInput, optFns ...func(*Options)) (*DescribeVolumesModificationsOutput, error) {
+ if params == nil {
+ params = &DescribeVolumesModificationsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeVolumesModifications", params, optFns, c.addOperationDescribeVolumesModificationsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeVolumesModificationsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeVolumesModificationsInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The filters.
+ //
+ // * modification-state - The current modification state (modifying |
+ // optimizing | completed | failed).
+ //
+ // * original-iops - The original IOPS rate of
+ // the volume.
+ //
+ // * original-size - The original size of the volume, in GiB.
+ //
+ // *
+ // original-volume-type - The original volume type of the volume (standard | io1 |
+ // io2 | gp2 | sc1 | st1).
+ //
+ // * originalMultiAttachEnabled - Indicates whether
+ // Multi-Attach support was enabled (true | false).
+ //
+ // * start-time - The
+ // modification start time.
+ //
+ // * target-iops - The target IOPS rate of the volume.
+ //
+ // *
+ // target-size - The target size of the volume, in GiB.
+ //
+ // * target-volume-type - The
+ // target volume type of the volume (standard | io1 | io2 | gp2 | sc1 | st1).
+ //
+ // *
+ // targetMultiAttachEnabled - Indicates whether Multi-Attach support is to be
+ // enabled (true | false).
+ //
+ // * volume-id - The ID of the volume.
+ Filters []types.Filter
+
+ // The maximum number of results (up to a limit of 500) to be returned in a
+ // paginated request.
+ MaxResults *int32
+
+ // The nextToken value returned by a previous paginated request.
+ NextToken *string
+
+ // The IDs of the volumes.
+ VolumeIds []string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeVolumesModificationsOutput struct {
+
+ // Token for pagination, null if there are no more results
+ NextToken *string
+
+ // Information about the volume modifications.
+ VolumesModifications []types.VolumeModification
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeVolumesModificationsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeVolumesModifications{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeVolumesModifications{}, 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_opDescribeVolumesModifications(options.Region), middleware.Before); 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
+}
+
+// DescribeVolumesModificationsAPIClient is a client that implements the
+// DescribeVolumesModifications operation.
+type DescribeVolumesModificationsAPIClient interface {
+ DescribeVolumesModifications(context.Context, *DescribeVolumesModificationsInput, ...func(*Options)) (*DescribeVolumesModificationsOutput, error)
+}
+
+var _ DescribeVolumesModificationsAPIClient = (*Client)(nil)
+
+// DescribeVolumesModificationsPaginatorOptions is the paginator options for
+// DescribeVolumesModifications
+type DescribeVolumesModificationsPaginatorOptions struct {
+ // The maximum number of results (up to a limit of 500) to be returned in a
+ // paginated 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
+}
+
+// DescribeVolumesModificationsPaginator is a paginator for
+// DescribeVolumesModifications
+type DescribeVolumesModificationsPaginator struct {
+ options DescribeVolumesModificationsPaginatorOptions
+ client DescribeVolumesModificationsAPIClient
+ params *DescribeVolumesModificationsInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribeVolumesModificationsPaginator returns a new
+// DescribeVolumesModificationsPaginator
+func NewDescribeVolumesModificationsPaginator(client DescribeVolumesModificationsAPIClient, params *DescribeVolumesModificationsInput, optFns ...func(*DescribeVolumesModificationsPaginatorOptions)) *DescribeVolumesModificationsPaginator {
+ if params == nil {
+ params = &DescribeVolumesModificationsInput{}
+ }
+
+ options := DescribeVolumesModificationsPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribeVolumesModificationsPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribeVolumesModificationsPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribeVolumesModifications page.
+func (p *DescribeVolumesModificationsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeVolumesModificationsOutput, 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.DescribeVolumesModifications(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_opDescribeVolumesModifications(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeVolumesModifications",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVpcAttribute.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVpcAttribute.go
new file mode 100644
index 00000000..5366700d
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVpcAttribute.go
@@ -0,0 +1,143 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes the specified attribute of the specified VPC. You can specify only one
+// attribute at a time.
+func (c *Client) DescribeVpcAttribute(ctx context.Context, params *DescribeVpcAttributeInput, optFns ...func(*Options)) (*DescribeVpcAttributeOutput, error) {
+ if params == nil {
+ params = &DescribeVpcAttributeInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeVpcAttribute", params, optFns, c.addOperationDescribeVpcAttributeMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeVpcAttributeOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeVpcAttributeInput struct {
+
+ // The VPC attribute.
+ //
+ // This member is required.
+ Attribute types.VpcAttributeName
+
+ // The ID of the VPC.
+ //
+ // This member is required.
+ VpcId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type DescribeVpcAttributeOutput struct {
+
+ // Indicates whether the instances launched in the VPC get DNS hostnames. If this
+ // attribute is true, instances in the VPC get DNS hostnames; otherwise, they do
+ // not.
+ EnableDnsHostnames *types.AttributeBooleanValue
+
+ // Indicates whether DNS resolution is enabled for the VPC. If this attribute is
+ // true, the Amazon DNS server resolves DNS hostnames for your instances to their
+ // corresponding IP addresses; otherwise, it does not.
+ EnableDnsSupport *types.AttributeBooleanValue
+
+ // The ID of the VPC.
+ VpcId *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeVpcAttributeMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeVpcAttribute{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeVpcAttribute{}, 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 = addOpDescribeVpcAttributeValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeVpcAttribute(options.Region), middleware.Before); 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_opDescribeVpcAttribute(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeVpcAttribute",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVpcClassicLink.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVpcClassicLink.go
new file mode 100644
index 00000000..aca7bbda
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVpcClassicLink.go
@@ -0,0 +1,138 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes the ClassicLink status of one or more VPCs.
+func (c *Client) DescribeVpcClassicLink(ctx context.Context, params *DescribeVpcClassicLinkInput, optFns ...func(*Options)) (*DescribeVpcClassicLinkOutput, error) {
+ if params == nil {
+ params = &DescribeVpcClassicLinkInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeVpcClassicLink", params, optFns, c.addOperationDescribeVpcClassicLinkMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeVpcClassicLinkOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeVpcClassicLinkInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // One or more filters.
+ //
+ // * is-classic-link-enabled - Whether the VPC is enabled for
+ // ClassicLink (true | false).
+ //
+ // * tag: - The key/value combination of a tag
+ // assigned to the resource. Use the tag key in the filter name and the tag value
+ // as the filter value. For example, to find all resources that have a tag with the
+ // key Owner and the value TeamA, specify tag:Owner for the filter name and TeamA
+ // for the filter value.
+ //
+ // * tag-key - The key of a tag assigned to the resource.
+ // Use this filter to find all resources assigned a tag with a specific key,
+ // regardless of the tag value.
+ Filters []types.Filter
+
+ // One or more VPCs for which you want to describe the ClassicLink status.
+ VpcIds []string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeVpcClassicLinkOutput struct {
+
+ // The ClassicLink status of one or more VPCs.
+ Vpcs []types.VpcClassicLink
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeVpcClassicLinkMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeVpcClassicLink{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeVpcClassicLink{}, 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_opDescribeVpcClassicLink(options.Region), middleware.Before); 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_opDescribeVpcClassicLink(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeVpcClassicLink",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVpcClassicLinkDnsSupport.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVpcClassicLinkDnsSupport.go
new file mode 100644
index 00000000..fde5fb8c
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVpcClassicLinkDnsSupport.go
@@ -0,0 +1,225 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes the ClassicLink DNS support status of one or more VPCs. If enabled,
+// the DNS hostname of a linked EC2-Classic instance resolves to its private IP
+// address when addressed from an instance in the VPC to which it's linked.
+// Similarly, the DNS hostname of an instance in a VPC resolves to its private IP
+// address when addressed from a linked EC2-Classic instance. For more information,
+// see ClassicLink
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html) in
+// the Amazon Elastic Compute Cloud User Guide.
+func (c *Client) DescribeVpcClassicLinkDnsSupport(ctx context.Context, params *DescribeVpcClassicLinkDnsSupportInput, optFns ...func(*Options)) (*DescribeVpcClassicLinkDnsSupportOutput, error) {
+ if params == nil {
+ params = &DescribeVpcClassicLinkDnsSupportInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeVpcClassicLinkDnsSupport", params, optFns, c.addOperationDescribeVpcClassicLinkDnsSupportMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeVpcClassicLinkDnsSupportOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeVpcClassicLinkDnsSupportInput struct {
+
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ MaxResults *int32
+
+ // The token for the next page of results.
+ NextToken *string
+
+ // One or more VPC IDs.
+ VpcIds []string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeVpcClassicLinkDnsSupportOutput struct {
+
+ // The token to use to retrieve the next page of results. This value is null when
+ // there are no more results to return.
+ NextToken *string
+
+ // Information about the ClassicLink DNS support status of the VPCs.
+ Vpcs []types.ClassicLinkDnsSupport
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeVpcClassicLinkDnsSupportMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeVpcClassicLinkDnsSupport{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeVpcClassicLinkDnsSupport{}, 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_opDescribeVpcClassicLinkDnsSupport(options.Region), middleware.Before); 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
+}
+
+// DescribeVpcClassicLinkDnsSupportAPIClient is a client that implements the
+// DescribeVpcClassicLinkDnsSupport operation.
+type DescribeVpcClassicLinkDnsSupportAPIClient interface {
+ DescribeVpcClassicLinkDnsSupport(context.Context, *DescribeVpcClassicLinkDnsSupportInput, ...func(*Options)) (*DescribeVpcClassicLinkDnsSupportOutput, error)
+}
+
+var _ DescribeVpcClassicLinkDnsSupportAPIClient = (*Client)(nil)
+
+// DescribeVpcClassicLinkDnsSupportPaginatorOptions is the paginator options for
+// DescribeVpcClassicLinkDnsSupport
+type DescribeVpcClassicLinkDnsSupportPaginatorOptions struct {
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ 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
+}
+
+// DescribeVpcClassicLinkDnsSupportPaginator is a paginator for
+// DescribeVpcClassicLinkDnsSupport
+type DescribeVpcClassicLinkDnsSupportPaginator struct {
+ options DescribeVpcClassicLinkDnsSupportPaginatorOptions
+ client DescribeVpcClassicLinkDnsSupportAPIClient
+ params *DescribeVpcClassicLinkDnsSupportInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribeVpcClassicLinkDnsSupportPaginator returns a new
+// DescribeVpcClassicLinkDnsSupportPaginator
+func NewDescribeVpcClassicLinkDnsSupportPaginator(client DescribeVpcClassicLinkDnsSupportAPIClient, params *DescribeVpcClassicLinkDnsSupportInput, optFns ...func(*DescribeVpcClassicLinkDnsSupportPaginatorOptions)) *DescribeVpcClassicLinkDnsSupportPaginator {
+ if params == nil {
+ params = &DescribeVpcClassicLinkDnsSupportInput{}
+ }
+
+ options := DescribeVpcClassicLinkDnsSupportPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribeVpcClassicLinkDnsSupportPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribeVpcClassicLinkDnsSupportPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribeVpcClassicLinkDnsSupport page.
+func (p *DescribeVpcClassicLinkDnsSupportPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeVpcClassicLinkDnsSupportOutput, 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.DescribeVpcClassicLinkDnsSupport(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_opDescribeVpcClassicLinkDnsSupport(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeVpcClassicLinkDnsSupport",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVpcEndpointConnectionNotifications.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVpcEndpointConnectionNotifications.go
new file mode 100644
index 00000000..471f8d66
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVpcEndpointConnectionNotifications.go
@@ -0,0 +1,245 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes the connection notifications for VPC endpoints and VPC endpoint
+// services.
+func (c *Client) DescribeVpcEndpointConnectionNotifications(ctx context.Context, params *DescribeVpcEndpointConnectionNotificationsInput, optFns ...func(*Options)) (*DescribeVpcEndpointConnectionNotificationsOutput, error) {
+ if params == nil {
+ params = &DescribeVpcEndpointConnectionNotificationsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeVpcEndpointConnectionNotifications", params, optFns, c.addOperationDescribeVpcEndpointConnectionNotificationsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeVpcEndpointConnectionNotificationsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeVpcEndpointConnectionNotificationsInput struct {
+
+ // The ID of the notification.
+ ConnectionNotificationId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // One or more filters.
+ //
+ // * connection-notification-arn - The ARN of the SNS topic
+ // for the notification.
+ //
+ // * connection-notification-id - The ID of the
+ // notification.
+ //
+ // * connection-notification-state - The state of the notification
+ // (Enabled | Disabled).
+ //
+ // * connection-notification-type - The type of notification
+ // (Topic).
+ //
+ // * service-id - The ID of the endpoint service.
+ //
+ // * vpc-endpoint-id -
+ // The ID of the VPC endpoint.
+ Filters []types.Filter
+
+ // The maximum number of results to return in a single call. To retrieve the
+ // remaining results, make another request with the returned NextToken value.
+ MaxResults *int32
+
+ // The token to request the next page of results.
+ NextToken *string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeVpcEndpointConnectionNotificationsOutput struct {
+
+ // One or more notifications.
+ ConnectionNotificationSet []types.ConnectionNotification
+
+ // The token to use to retrieve the next page of results. This value is null when
+ // there are no more results to return.
+ NextToken *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeVpcEndpointConnectionNotificationsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeVpcEndpointConnectionNotifications{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeVpcEndpointConnectionNotifications{}, 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_opDescribeVpcEndpointConnectionNotifications(options.Region), middleware.Before); 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
+}
+
+// DescribeVpcEndpointConnectionNotificationsAPIClient is a client that implements
+// the DescribeVpcEndpointConnectionNotifications operation.
+type DescribeVpcEndpointConnectionNotificationsAPIClient interface {
+ DescribeVpcEndpointConnectionNotifications(context.Context, *DescribeVpcEndpointConnectionNotificationsInput, ...func(*Options)) (*DescribeVpcEndpointConnectionNotificationsOutput, error)
+}
+
+var _ DescribeVpcEndpointConnectionNotificationsAPIClient = (*Client)(nil)
+
+// DescribeVpcEndpointConnectionNotificationsPaginatorOptions is the paginator
+// options for DescribeVpcEndpointConnectionNotifications
+type DescribeVpcEndpointConnectionNotificationsPaginatorOptions struct {
+ // The maximum number of results to return in a single call. To retrieve the
+ // remaining results, make another request with the returned NextToken value.
+ 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
+}
+
+// DescribeVpcEndpointConnectionNotificationsPaginator is a paginator for
+// DescribeVpcEndpointConnectionNotifications
+type DescribeVpcEndpointConnectionNotificationsPaginator struct {
+ options DescribeVpcEndpointConnectionNotificationsPaginatorOptions
+ client DescribeVpcEndpointConnectionNotificationsAPIClient
+ params *DescribeVpcEndpointConnectionNotificationsInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribeVpcEndpointConnectionNotificationsPaginator returns a new
+// DescribeVpcEndpointConnectionNotificationsPaginator
+func NewDescribeVpcEndpointConnectionNotificationsPaginator(client DescribeVpcEndpointConnectionNotificationsAPIClient, params *DescribeVpcEndpointConnectionNotificationsInput, optFns ...func(*DescribeVpcEndpointConnectionNotificationsPaginatorOptions)) *DescribeVpcEndpointConnectionNotificationsPaginator {
+ if params == nil {
+ params = &DescribeVpcEndpointConnectionNotificationsInput{}
+ }
+
+ options := DescribeVpcEndpointConnectionNotificationsPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribeVpcEndpointConnectionNotificationsPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribeVpcEndpointConnectionNotificationsPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribeVpcEndpointConnectionNotifications page.
+func (p *DescribeVpcEndpointConnectionNotificationsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeVpcEndpointConnectionNotificationsOutput, 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.DescribeVpcEndpointConnectionNotifications(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_opDescribeVpcEndpointConnectionNotifications(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeVpcEndpointConnectionNotifications",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVpcEndpointConnections.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVpcEndpointConnections.go
new file mode 100644
index 00000000..50153290
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVpcEndpointConnections.go
@@ -0,0 +1,241 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes the VPC endpoint connections to your VPC endpoint services, including
+// any endpoints that are pending your acceptance.
+func (c *Client) DescribeVpcEndpointConnections(ctx context.Context, params *DescribeVpcEndpointConnectionsInput, optFns ...func(*Options)) (*DescribeVpcEndpointConnectionsOutput, error) {
+ if params == nil {
+ params = &DescribeVpcEndpointConnectionsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeVpcEndpointConnections", params, optFns, c.addOperationDescribeVpcEndpointConnectionsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeVpcEndpointConnectionsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeVpcEndpointConnectionsInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // One or more filters.
+ //
+ // * service-id - The ID of the service.
+ //
+ // *
+ // vpc-endpoint-owner - The AWS account number of the owner of the endpoint.
+ //
+ // *
+ // vpc-endpoint-state - The state of the endpoint (pendingAcceptance | pending |
+ // available | deleting | deleted | rejected | failed).
+ //
+ // * vpc-endpoint-id - The ID
+ // of the endpoint.
+ Filters []types.Filter
+
+ // The maximum number of results to return for the request in a single page. The
+ // remaining results of the initial request can be seen by sending another request
+ // with the returned NextToken value. This value can be between 5 and 1,000; if
+ // MaxResults is given a value larger than 1,000, only 1,000 results are returned.
+ MaxResults *int32
+
+ // The token to retrieve the next page of results.
+ NextToken *string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeVpcEndpointConnectionsOutput struct {
+
+ // The token to use to retrieve the next page of results. This value is null when
+ // there are no more results to return.
+ NextToken *string
+
+ // Information about one or more VPC endpoint connections.
+ VpcEndpointConnections []types.VpcEndpointConnection
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeVpcEndpointConnectionsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeVpcEndpointConnections{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeVpcEndpointConnections{}, 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_opDescribeVpcEndpointConnections(options.Region), middleware.Before); 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
+}
+
+// DescribeVpcEndpointConnectionsAPIClient is a client that implements the
+// DescribeVpcEndpointConnections operation.
+type DescribeVpcEndpointConnectionsAPIClient interface {
+ DescribeVpcEndpointConnections(context.Context, *DescribeVpcEndpointConnectionsInput, ...func(*Options)) (*DescribeVpcEndpointConnectionsOutput, error)
+}
+
+var _ DescribeVpcEndpointConnectionsAPIClient = (*Client)(nil)
+
+// DescribeVpcEndpointConnectionsPaginatorOptions is the paginator options for
+// DescribeVpcEndpointConnections
+type DescribeVpcEndpointConnectionsPaginatorOptions struct {
+ // The maximum number of results to return for the request in a single page. The
+ // remaining results of the initial request can be seen by sending another request
+ // with the returned NextToken value. This value can be between 5 and 1,000; if
+ // MaxResults is given a value larger than 1,000, only 1,000 results are 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
+}
+
+// DescribeVpcEndpointConnectionsPaginator is a paginator for
+// DescribeVpcEndpointConnections
+type DescribeVpcEndpointConnectionsPaginator struct {
+ options DescribeVpcEndpointConnectionsPaginatorOptions
+ client DescribeVpcEndpointConnectionsAPIClient
+ params *DescribeVpcEndpointConnectionsInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribeVpcEndpointConnectionsPaginator returns a new
+// DescribeVpcEndpointConnectionsPaginator
+func NewDescribeVpcEndpointConnectionsPaginator(client DescribeVpcEndpointConnectionsAPIClient, params *DescribeVpcEndpointConnectionsInput, optFns ...func(*DescribeVpcEndpointConnectionsPaginatorOptions)) *DescribeVpcEndpointConnectionsPaginator {
+ if params == nil {
+ params = &DescribeVpcEndpointConnectionsInput{}
+ }
+
+ options := DescribeVpcEndpointConnectionsPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribeVpcEndpointConnectionsPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribeVpcEndpointConnectionsPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribeVpcEndpointConnections page.
+func (p *DescribeVpcEndpointConnectionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeVpcEndpointConnectionsOutput, 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.DescribeVpcEndpointConnections(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_opDescribeVpcEndpointConnections(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeVpcEndpointConnections",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVpcEndpointServiceConfigurations.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVpcEndpointServiceConfigurations.go
new file mode 100644
index 00000000..0ed4335e
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVpcEndpointServiceConfigurations.go
@@ -0,0 +1,250 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes the VPC endpoint service configurations in your account (your
+// services).
+func (c *Client) DescribeVpcEndpointServiceConfigurations(ctx context.Context, params *DescribeVpcEndpointServiceConfigurationsInput, optFns ...func(*Options)) (*DescribeVpcEndpointServiceConfigurationsOutput, error) {
+ if params == nil {
+ params = &DescribeVpcEndpointServiceConfigurationsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeVpcEndpointServiceConfigurations", params, optFns, c.addOperationDescribeVpcEndpointServiceConfigurationsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeVpcEndpointServiceConfigurationsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeVpcEndpointServiceConfigurationsInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // One or more filters.
+ //
+ // * service-name - The name of the service.
+ //
+ // * service-id -
+ // The ID of the service.
+ //
+ // * service-state - The state of the service (Pending |
+ // Available | Deleting | Deleted | Failed).
+ //
+ // * tag: - The key/value combination of
+ // a tag assigned to the resource. Use the tag key in the filter name and the tag
+ // value as the filter value. For example, to find all resources that have a tag
+ // with the key Owner and the value TeamA, specify tag:Owner for the filter name
+ // and TeamA for the filter value.
+ //
+ // * tag-key - The key of a tag assigned to the
+ // resource. Use this filter to find all resources assigned a tag with a specific
+ // key, regardless of the tag value.
+ Filters []types.Filter
+
+ // The maximum number of results to return for the request in a single page. The
+ // remaining results of the initial request can be seen by sending another request
+ // with the returned NextToken value. This value can be between 5 and 1,000; if
+ // MaxResults is given a value larger than 1,000, only 1,000 results are returned.
+ MaxResults *int32
+
+ // The token to retrieve the next page of results.
+ NextToken *string
+
+ // The IDs of one or more services.
+ ServiceIds []string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeVpcEndpointServiceConfigurationsOutput struct {
+
+ // The token to use to retrieve the next page of results. This value is null when
+ // there are no more results to return.
+ NextToken *string
+
+ // Information about one or more services.
+ ServiceConfigurations []types.ServiceConfiguration
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeVpcEndpointServiceConfigurationsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeVpcEndpointServiceConfigurations{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeVpcEndpointServiceConfigurations{}, 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_opDescribeVpcEndpointServiceConfigurations(options.Region), middleware.Before); 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
+}
+
+// DescribeVpcEndpointServiceConfigurationsAPIClient is a client that implements
+// the DescribeVpcEndpointServiceConfigurations operation.
+type DescribeVpcEndpointServiceConfigurationsAPIClient interface {
+ DescribeVpcEndpointServiceConfigurations(context.Context, *DescribeVpcEndpointServiceConfigurationsInput, ...func(*Options)) (*DescribeVpcEndpointServiceConfigurationsOutput, error)
+}
+
+var _ DescribeVpcEndpointServiceConfigurationsAPIClient = (*Client)(nil)
+
+// DescribeVpcEndpointServiceConfigurationsPaginatorOptions is the paginator
+// options for DescribeVpcEndpointServiceConfigurations
+type DescribeVpcEndpointServiceConfigurationsPaginatorOptions struct {
+ // The maximum number of results to return for the request in a single page. The
+ // remaining results of the initial request can be seen by sending another request
+ // with the returned NextToken value. This value can be between 5 and 1,000; if
+ // MaxResults is given a value larger than 1,000, only 1,000 results are 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
+}
+
+// DescribeVpcEndpointServiceConfigurationsPaginator is a paginator for
+// DescribeVpcEndpointServiceConfigurations
+type DescribeVpcEndpointServiceConfigurationsPaginator struct {
+ options DescribeVpcEndpointServiceConfigurationsPaginatorOptions
+ client DescribeVpcEndpointServiceConfigurationsAPIClient
+ params *DescribeVpcEndpointServiceConfigurationsInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribeVpcEndpointServiceConfigurationsPaginator returns a new
+// DescribeVpcEndpointServiceConfigurationsPaginator
+func NewDescribeVpcEndpointServiceConfigurationsPaginator(client DescribeVpcEndpointServiceConfigurationsAPIClient, params *DescribeVpcEndpointServiceConfigurationsInput, optFns ...func(*DescribeVpcEndpointServiceConfigurationsPaginatorOptions)) *DescribeVpcEndpointServiceConfigurationsPaginator {
+ if params == nil {
+ params = &DescribeVpcEndpointServiceConfigurationsInput{}
+ }
+
+ options := DescribeVpcEndpointServiceConfigurationsPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribeVpcEndpointServiceConfigurationsPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribeVpcEndpointServiceConfigurationsPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribeVpcEndpointServiceConfigurations page.
+func (p *DescribeVpcEndpointServiceConfigurationsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeVpcEndpointServiceConfigurationsOutput, 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.DescribeVpcEndpointServiceConfigurations(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_opDescribeVpcEndpointServiceConfigurations(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeVpcEndpointServiceConfigurations",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVpcEndpointServicePermissions.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVpcEndpointServicePermissions.go
new file mode 100644
index 00000000..44961956
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVpcEndpointServicePermissions.go
@@ -0,0 +1,242 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes the principals (service consumers) that are permitted to discover your
+// VPC endpoint service.
+func (c *Client) DescribeVpcEndpointServicePermissions(ctx context.Context, params *DescribeVpcEndpointServicePermissionsInput, optFns ...func(*Options)) (*DescribeVpcEndpointServicePermissionsOutput, error) {
+ if params == nil {
+ params = &DescribeVpcEndpointServicePermissionsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeVpcEndpointServicePermissions", params, optFns, c.addOperationDescribeVpcEndpointServicePermissionsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeVpcEndpointServicePermissionsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeVpcEndpointServicePermissionsInput struct {
+
+ // The ID of the service.
+ //
+ // This member is required.
+ ServiceId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // One or more filters.
+ //
+ // * principal - The ARN of the principal.
+ //
+ // * principal-type
+ // - The principal type (All | Service | OrganizationUnit | Account | User | Role).
+ Filters []types.Filter
+
+ // The maximum number of results to return for the request in a single page. The
+ // remaining results of the initial request can be seen by sending another request
+ // with the returned NextToken value. This value can be between 5 and 1,000; if
+ // MaxResults is given a value larger than 1,000, only 1,000 results are returned.
+ MaxResults *int32
+
+ // The token to retrieve the next page of results.
+ NextToken *string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeVpcEndpointServicePermissionsOutput struct {
+
+ // Information about one or more allowed principals.
+ AllowedPrincipals []types.AllowedPrincipal
+
+ // The token to use to retrieve the next page of results. This value is null when
+ // there are no more results to return.
+ NextToken *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeVpcEndpointServicePermissionsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeVpcEndpointServicePermissions{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeVpcEndpointServicePermissions{}, 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 = addOpDescribeVpcEndpointServicePermissionsValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeVpcEndpointServicePermissions(options.Region), middleware.Before); 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
+}
+
+// DescribeVpcEndpointServicePermissionsAPIClient is a client that implements the
+// DescribeVpcEndpointServicePermissions operation.
+type DescribeVpcEndpointServicePermissionsAPIClient interface {
+ DescribeVpcEndpointServicePermissions(context.Context, *DescribeVpcEndpointServicePermissionsInput, ...func(*Options)) (*DescribeVpcEndpointServicePermissionsOutput, error)
+}
+
+var _ DescribeVpcEndpointServicePermissionsAPIClient = (*Client)(nil)
+
+// DescribeVpcEndpointServicePermissionsPaginatorOptions is the paginator options
+// for DescribeVpcEndpointServicePermissions
+type DescribeVpcEndpointServicePermissionsPaginatorOptions struct {
+ // The maximum number of results to return for the request in a single page. The
+ // remaining results of the initial request can be seen by sending another request
+ // with the returned NextToken value. This value can be between 5 and 1,000; if
+ // MaxResults is given a value larger than 1,000, only 1,000 results are 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
+}
+
+// DescribeVpcEndpointServicePermissionsPaginator is a paginator for
+// DescribeVpcEndpointServicePermissions
+type DescribeVpcEndpointServicePermissionsPaginator struct {
+ options DescribeVpcEndpointServicePermissionsPaginatorOptions
+ client DescribeVpcEndpointServicePermissionsAPIClient
+ params *DescribeVpcEndpointServicePermissionsInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribeVpcEndpointServicePermissionsPaginator returns a new
+// DescribeVpcEndpointServicePermissionsPaginator
+func NewDescribeVpcEndpointServicePermissionsPaginator(client DescribeVpcEndpointServicePermissionsAPIClient, params *DescribeVpcEndpointServicePermissionsInput, optFns ...func(*DescribeVpcEndpointServicePermissionsPaginatorOptions)) *DescribeVpcEndpointServicePermissionsPaginator {
+ if params == nil {
+ params = &DescribeVpcEndpointServicePermissionsInput{}
+ }
+
+ options := DescribeVpcEndpointServicePermissionsPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribeVpcEndpointServicePermissionsPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribeVpcEndpointServicePermissionsPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribeVpcEndpointServicePermissions page.
+func (p *DescribeVpcEndpointServicePermissionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeVpcEndpointServicePermissionsOutput, 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.DescribeVpcEndpointServicePermissions(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_opDescribeVpcEndpointServicePermissions(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeVpcEndpointServicePermissions",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVpcEndpointServices.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVpcEndpointServices.go
new file mode 100644
index 00000000..f60f297b
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVpcEndpointServices.go
@@ -0,0 +1,164 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes available services to which you can create a VPC endpoint. When the
+// service provider and the consumer have different accounts in multiple
+// Availability Zones, and the consumer views the VPC endpoint service information,
+// the response only includes the common Availability Zones. For example, when the
+// service provider account uses us-east-1a and us-east-1c and the consumer uses
+// us-east-1a and us-east-1b, the response includes the VPC endpoint services in
+// the common Availability Zone, us-east-1a.
+func (c *Client) DescribeVpcEndpointServices(ctx context.Context, params *DescribeVpcEndpointServicesInput, optFns ...func(*Options)) (*DescribeVpcEndpointServicesOutput, error) {
+ if params == nil {
+ params = &DescribeVpcEndpointServicesInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeVpcEndpointServices", params, optFns, c.addOperationDescribeVpcEndpointServicesMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeVpcEndpointServicesOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+// Contains the parameters for DescribeVpcEndpointServices.
+type DescribeVpcEndpointServicesInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // One or more filters.
+ //
+ // * service-name - The name of the service.
+ //
+ // * service-type
+ // - The type of service (Interface | Gateway).
+ //
+ // * tag: - The key/value combination
+ // of a tag assigned to the resource. Use the tag key in the filter name and the
+ // tag value as the filter value. For example, to find all resources that have a
+ // tag with the key Owner and the value TeamA, specify tag:Owner for the filter
+ // name and TeamA for the filter value.
+ //
+ // * tag-key - The key of a tag assigned to
+ // the resource. Use this filter to find all resources assigned a tag with a
+ // specific key, regardless of the tag value.
+ Filters []types.Filter
+
+ // The maximum number of items to return for this request. The request returns a
+ // token that you can specify in a subsequent call to get the next set of results.
+ // Constraint: If the value is greater than 1,000, we return only 1,000 items.
+ MaxResults *int32
+
+ // The token for the next set of items to return. (You received this token from a
+ // prior call.)
+ NextToken *string
+
+ // One or more service names.
+ ServiceNames []string
+
+ noSmithyDocumentSerde
+}
+
+// Contains the output of DescribeVpcEndpointServices.
+type DescribeVpcEndpointServicesOutput struct {
+
+ // The token to use when requesting the next set of items. If there are no
+ // additional items to return, the string is empty.
+ NextToken *string
+
+ // Information about the service.
+ ServiceDetails []types.ServiceDetail
+
+ // A list of supported services.
+ ServiceNames []string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeVpcEndpointServicesMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeVpcEndpointServices{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeVpcEndpointServices{}, 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_opDescribeVpcEndpointServices(options.Region), middleware.Before); 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_opDescribeVpcEndpointServices(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeVpcEndpointServices",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVpcEndpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVpcEndpoints.go
new file mode 100644
index 00000000..456b1811
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVpcEndpoints.go
@@ -0,0 +1,255 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes one or more of your VPC endpoints.
+func (c *Client) DescribeVpcEndpoints(ctx context.Context, params *DescribeVpcEndpointsInput, optFns ...func(*Options)) (*DescribeVpcEndpointsOutput, error) {
+ if params == nil {
+ params = &DescribeVpcEndpointsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeVpcEndpoints", params, optFns, c.addOperationDescribeVpcEndpointsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeVpcEndpointsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+// Contains the parameters for DescribeVpcEndpoints.
+type DescribeVpcEndpointsInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // One or more filters.
+ //
+ // * service-name - The name of the service.
+ //
+ // * vpc-id - The
+ // ID of the VPC in which the endpoint resides.
+ //
+ // * vpc-endpoint-id - The ID of the
+ // endpoint.
+ //
+ // * vpc-endpoint-state - The state of the endpoint (pendingAcceptance |
+ // pending | available | deleting | deleted | rejected | failed).
+ //
+ // *
+ // vpc-endpoint-type - The type of VPC endpoint (Interface | Gateway |
+ // GatewayLoadBalancer).
+ //
+ // * tag: - The key/value combination of a tag assigned to
+ // the resource. Use the tag key in the filter name and the tag value as the filter
+ // value. For example, to find all resources that have a tag with the key Owner and
+ // the value TeamA, specify tag:Owner for the filter name and TeamA for the filter
+ // value.
+ //
+ // * tag-key - The key of a tag assigned to the resource. Use this filter
+ // to find all resources assigned a tag with a specific key, regardless of the tag
+ // value.
+ Filters []types.Filter
+
+ // The maximum number of items to return for this request. The request returns a
+ // token that you can specify in a subsequent call to get the next set of results.
+ // Constraint: If the value is greater than 1,000, we return only 1,000 items.
+ MaxResults *int32
+
+ // The token for the next set of items to return. (You received this token from a
+ // prior call.)
+ NextToken *string
+
+ // One or more endpoint IDs.
+ VpcEndpointIds []string
+
+ noSmithyDocumentSerde
+}
+
+// Contains the output of DescribeVpcEndpoints.
+type DescribeVpcEndpointsOutput struct {
+
+ // The token to use when requesting the next set of items. If there are no
+ // additional items to return, the string is empty.
+ NextToken *string
+
+ // Information about the endpoints.
+ VpcEndpoints []types.VpcEndpoint
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeVpcEndpointsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeVpcEndpoints{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeVpcEndpoints{}, 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_opDescribeVpcEndpoints(options.Region), middleware.Before); 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
+}
+
+// DescribeVpcEndpointsAPIClient is a client that implements the
+// DescribeVpcEndpoints operation.
+type DescribeVpcEndpointsAPIClient interface {
+ DescribeVpcEndpoints(context.Context, *DescribeVpcEndpointsInput, ...func(*Options)) (*DescribeVpcEndpointsOutput, error)
+}
+
+var _ DescribeVpcEndpointsAPIClient = (*Client)(nil)
+
+// DescribeVpcEndpointsPaginatorOptions is the paginator options for
+// DescribeVpcEndpoints
+type DescribeVpcEndpointsPaginatorOptions struct {
+ // The maximum number of items to return for this request. The request returns a
+ // token that you can specify in a subsequent call to get the next set of results.
+ // Constraint: If the value is greater than 1,000, we return only 1,000 items.
+ 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
+}
+
+// DescribeVpcEndpointsPaginator is a paginator for DescribeVpcEndpoints
+type DescribeVpcEndpointsPaginator struct {
+ options DescribeVpcEndpointsPaginatorOptions
+ client DescribeVpcEndpointsAPIClient
+ params *DescribeVpcEndpointsInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribeVpcEndpointsPaginator returns a new DescribeVpcEndpointsPaginator
+func NewDescribeVpcEndpointsPaginator(client DescribeVpcEndpointsAPIClient, params *DescribeVpcEndpointsInput, optFns ...func(*DescribeVpcEndpointsPaginatorOptions)) *DescribeVpcEndpointsPaginator {
+ if params == nil {
+ params = &DescribeVpcEndpointsInput{}
+ }
+
+ options := DescribeVpcEndpointsPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribeVpcEndpointsPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribeVpcEndpointsPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribeVpcEndpoints page.
+func (p *DescribeVpcEndpointsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeVpcEndpointsOutput, 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.DescribeVpcEndpoints(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_opDescribeVpcEndpoints(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeVpcEndpoints",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVpcPeeringConnections.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVpcPeeringConnections.go
new file mode 100644
index 00000000..1b436e83
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVpcPeeringConnections.go
@@ -0,0 +1,612 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+import (
+ "context"
+ "errors"
+ "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/ec2/types"
+ smithy "github.com/aws/smithy-go"
+ "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"
+)
+
+// Describes one or more of your VPC peering connections.
+func (c *Client) DescribeVpcPeeringConnections(ctx context.Context, params *DescribeVpcPeeringConnectionsInput, optFns ...func(*Options)) (*DescribeVpcPeeringConnectionsOutput, error) {
+ if params == nil {
+ params = &DescribeVpcPeeringConnectionsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeVpcPeeringConnections", params, optFns, c.addOperationDescribeVpcPeeringConnectionsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeVpcPeeringConnectionsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeVpcPeeringConnectionsInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // One or more filters.
+ //
+ // * accepter-vpc-info.cidr-block - The IPv4 CIDR block of
+ // the accepter VPC.
+ //
+ // * accepter-vpc-info.owner-id - The ID of the Amazon Web
+ // Services account that owns the accepter VPC.
+ //
+ // * accepter-vpc-info.vpc-id - The
+ // ID of the accepter VPC.
+ //
+ // * expiration-time - The expiration date and time for
+ // the VPC peering connection.
+ //
+ // * requester-vpc-info.cidr-block - The IPv4 CIDR
+ // block of the requester's VPC.
+ //
+ // * requester-vpc-info.owner-id - The ID of the
+ // Amazon Web Services account that owns the requester VPC.
+ //
+ // *
+ // requester-vpc-info.vpc-id - The ID of the requester VPC.
+ //
+ // * status-code - The
+ // status of the VPC peering connection (pending-acceptance | failed | expired |
+ // provisioning | active | deleting | deleted | rejected).
+ //
+ // * status-message - A
+ // message that provides more information about the status of the VPC peering
+ // connection, if applicable.
+ //
+ // * tag: - The key/value combination of a tag assigned
+ // to the resource. Use the tag key in the filter name and the tag value as the
+ // filter value. For example, to find all resources that have a tag with the key
+ // Owner and the value TeamA, specify tag:Owner for the filter name and TeamA for
+ // the filter value.
+ //
+ // * tag-key - The key of a tag assigned to the resource. Use
+ // this filter to find all resources assigned a tag with a specific key, regardless
+ // of the tag value.
+ //
+ // * vpc-peering-connection-id - The ID of the VPC peering
+ // connection.
+ Filters []types.Filter
+
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ MaxResults *int32
+
+ // The token for the next page of results.
+ NextToken *string
+
+ // One or more VPC peering connection IDs. Default: Describes all your VPC peering
+ // connections.
+ VpcPeeringConnectionIds []string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeVpcPeeringConnectionsOutput struct {
+
+ // The token to use to retrieve the next page of results. This value is null when
+ // there are no more results to return.
+ NextToken *string
+
+ // Information about the VPC peering connections.
+ VpcPeeringConnections []types.VpcPeeringConnection
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeVpcPeeringConnectionsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeVpcPeeringConnections{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeVpcPeeringConnections{}, 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_opDescribeVpcPeeringConnections(options.Region), middleware.Before); 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
+}
+
+// DescribeVpcPeeringConnectionsAPIClient is a client that implements the
+// DescribeVpcPeeringConnections operation.
+type DescribeVpcPeeringConnectionsAPIClient interface {
+ DescribeVpcPeeringConnections(context.Context, *DescribeVpcPeeringConnectionsInput, ...func(*Options)) (*DescribeVpcPeeringConnectionsOutput, error)
+}
+
+var _ DescribeVpcPeeringConnectionsAPIClient = (*Client)(nil)
+
+// DescribeVpcPeeringConnectionsPaginatorOptions is the paginator options for
+// DescribeVpcPeeringConnections
+type DescribeVpcPeeringConnectionsPaginatorOptions struct {
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ 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
+}
+
+// DescribeVpcPeeringConnectionsPaginator is a paginator for
+// DescribeVpcPeeringConnections
+type DescribeVpcPeeringConnectionsPaginator struct {
+ options DescribeVpcPeeringConnectionsPaginatorOptions
+ client DescribeVpcPeeringConnectionsAPIClient
+ params *DescribeVpcPeeringConnectionsInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribeVpcPeeringConnectionsPaginator returns a new
+// DescribeVpcPeeringConnectionsPaginator
+func NewDescribeVpcPeeringConnectionsPaginator(client DescribeVpcPeeringConnectionsAPIClient, params *DescribeVpcPeeringConnectionsInput, optFns ...func(*DescribeVpcPeeringConnectionsPaginatorOptions)) *DescribeVpcPeeringConnectionsPaginator {
+ if params == nil {
+ params = &DescribeVpcPeeringConnectionsInput{}
+ }
+
+ options := DescribeVpcPeeringConnectionsPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribeVpcPeeringConnectionsPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribeVpcPeeringConnectionsPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribeVpcPeeringConnections page.
+func (p *DescribeVpcPeeringConnectionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeVpcPeeringConnectionsOutput, 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.DescribeVpcPeeringConnections(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
+}
+
+// VpcPeeringConnectionDeletedWaiterOptions are waiter options for
+// VpcPeeringConnectionDeletedWaiter
+type VpcPeeringConnectionDeletedWaiterOptions 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,
+ // VpcPeeringConnectionDeletedWaiter will use default minimum delay of 15 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, VpcPeeringConnectionDeletedWaiter 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, *DescribeVpcPeeringConnectionsInput, *DescribeVpcPeeringConnectionsOutput, error) (bool, error)
+}
+
+// VpcPeeringConnectionDeletedWaiter defines the waiters for
+// VpcPeeringConnectionDeleted
+type VpcPeeringConnectionDeletedWaiter struct {
+ client DescribeVpcPeeringConnectionsAPIClient
+
+ options VpcPeeringConnectionDeletedWaiterOptions
+}
+
+// NewVpcPeeringConnectionDeletedWaiter constructs a
+// VpcPeeringConnectionDeletedWaiter.
+func NewVpcPeeringConnectionDeletedWaiter(client DescribeVpcPeeringConnectionsAPIClient, optFns ...func(*VpcPeeringConnectionDeletedWaiterOptions)) *VpcPeeringConnectionDeletedWaiter {
+ options := VpcPeeringConnectionDeletedWaiterOptions{}
+ options.MinDelay = 15 * time.Second
+ options.MaxDelay = 120 * time.Second
+ options.Retryable = vpcPeeringConnectionDeletedStateRetryable
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+ return &VpcPeeringConnectionDeletedWaiter{
+ client: client,
+ options: options,
+ }
+}
+
+// Wait calls the waiter function for VpcPeeringConnectionDeleted waiter. The
+// maxWaitDur is the maximum wait duration the waiter will wait. The maxWaitDur is
+// required and must be greater than zero.
+func (w *VpcPeeringConnectionDeletedWaiter) Wait(ctx context.Context, params *DescribeVpcPeeringConnectionsInput, maxWaitDur time.Duration, optFns ...func(*VpcPeeringConnectionDeletedWaiterOptions)) error {
+ if maxWaitDur <= 0 {
+ return 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 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.DescribeVpcPeeringConnections(ctx, params, func(o *Options) {
+ o.APIOptions = append(o.APIOptions, apiOptions...)
+ })
+
+ retryable, err := options.Retryable(ctx, params, out, err)
+ if err != nil {
+ return err
+ }
+ if !retryable {
+ return 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 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 fmt.Errorf("request cancelled while waiting, %w", err)
+ }
+ }
+ return fmt.Errorf("exceeded max wait time for VpcPeeringConnectionDeleted waiter")
+}
+
+func vpcPeeringConnectionDeletedStateRetryable(ctx context.Context, input *DescribeVpcPeeringConnectionsInput, output *DescribeVpcPeeringConnectionsOutput, err error) (bool, error) {
+
+ if err == nil {
+ pathValue, err := jmespath.Search("VpcPeeringConnections[].Status.Code", output)
+ if err != nil {
+ return false, fmt.Errorf("error evaluating waiter state: %w", err)
+ }
+
+ expectedValue := "deleted"
+ var match = true
+ listOfValues, ok := pathValue.([]interface{})
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected list got %T", pathValue)
+ }
+
+ if len(listOfValues) == 0 {
+ match = false
+ }
+ for _, v := range listOfValues {
+ value, ok := v.(types.VpcPeeringConnectionStateReasonCode)
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected types.VpcPeeringConnectionStateReasonCode value, got %T", pathValue)
+ }
+
+ if string(value) != expectedValue {
+ match = false
+ }
+ }
+
+ if match {
+ return false, nil
+ }
+ }
+
+ if err != nil {
+ var apiErr smithy.APIError
+ ok := errors.As(err, &apiErr)
+ if !ok {
+ return false, fmt.Errorf("expected err to be of type smithy.APIError, got %w", err)
+ }
+
+ if "InvalidVpcPeeringConnectionID.NotFound" == apiErr.ErrorCode() {
+ return false, nil
+ }
+ }
+
+ return true, nil
+}
+
+// VpcPeeringConnectionExistsWaiterOptions are waiter options for
+// VpcPeeringConnectionExistsWaiter
+type VpcPeeringConnectionExistsWaiterOptions 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,
+ // VpcPeeringConnectionExistsWaiter will use default minimum delay of 15 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, VpcPeeringConnectionExistsWaiter 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, *DescribeVpcPeeringConnectionsInput, *DescribeVpcPeeringConnectionsOutput, error) (bool, error)
+}
+
+// VpcPeeringConnectionExistsWaiter defines the waiters for
+// VpcPeeringConnectionExists
+type VpcPeeringConnectionExistsWaiter struct {
+ client DescribeVpcPeeringConnectionsAPIClient
+
+ options VpcPeeringConnectionExistsWaiterOptions
+}
+
+// NewVpcPeeringConnectionExistsWaiter constructs a
+// VpcPeeringConnectionExistsWaiter.
+func NewVpcPeeringConnectionExistsWaiter(client DescribeVpcPeeringConnectionsAPIClient, optFns ...func(*VpcPeeringConnectionExistsWaiterOptions)) *VpcPeeringConnectionExistsWaiter {
+ options := VpcPeeringConnectionExistsWaiterOptions{}
+ options.MinDelay = 15 * time.Second
+ options.MaxDelay = 120 * time.Second
+ options.Retryable = vpcPeeringConnectionExistsStateRetryable
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+ return &VpcPeeringConnectionExistsWaiter{
+ client: client,
+ options: options,
+ }
+}
+
+// Wait calls the waiter function for VpcPeeringConnectionExists waiter. The
+// maxWaitDur is the maximum wait duration the waiter will wait. The maxWaitDur is
+// required and must be greater than zero.
+func (w *VpcPeeringConnectionExistsWaiter) Wait(ctx context.Context, params *DescribeVpcPeeringConnectionsInput, maxWaitDur time.Duration, optFns ...func(*VpcPeeringConnectionExistsWaiterOptions)) error {
+ if maxWaitDur <= 0 {
+ return 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 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.DescribeVpcPeeringConnections(ctx, params, func(o *Options) {
+ o.APIOptions = append(o.APIOptions, apiOptions...)
+ })
+
+ retryable, err := options.Retryable(ctx, params, out, err)
+ if err != nil {
+ return err
+ }
+ if !retryable {
+ return 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 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 fmt.Errorf("request cancelled while waiting, %w", err)
+ }
+ }
+ return fmt.Errorf("exceeded max wait time for VpcPeeringConnectionExists waiter")
+}
+
+func vpcPeeringConnectionExistsStateRetryable(ctx context.Context, input *DescribeVpcPeeringConnectionsInput, output *DescribeVpcPeeringConnectionsOutput, err error) (bool, error) {
+
+ if err == nil {
+ return false, nil
+ }
+
+ if err != nil {
+ var apiErr smithy.APIError
+ ok := errors.As(err, &apiErr)
+ if !ok {
+ return false, fmt.Errorf("expected err to be of type smithy.APIError, got %w", err)
+ }
+
+ if "InvalidVpcPeeringConnectionID.NotFound" == apiErr.ErrorCode() {
+ return true, nil
+ }
+ }
+
+ return true, nil
+}
+
+func newServiceMetadataMiddleware_opDescribeVpcPeeringConnections(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeVpcPeeringConnections",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVpcs.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVpcs.go
new file mode 100644
index 00000000..9f177fd1
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVpcs.go
@@ -0,0 +1,597 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+import (
+ "context"
+ "errors"
+ "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/ec2/types"
+ smithy "github.com/aws/smithy-go"
+ "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"
+)
+
+// Describes one or more of your VPCs.
+func (c *Client) DescribeVpcs(ctx context.Context, params *DescribeVpcsInput, optFns ...func(*Options)) (*DescribeVpcsOutput, error) {
+ if params == nil {
+ params = &DescribeVpcsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeVpcs", params, optFns, c.addOperationDescribeVpcsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeVpcsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeVpcsInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // One or more filters.
+ //
+ // * cidr - The primary IPv4 CIDR block of the VPC. The CIDR
+ // block you specify must exactly match the VPC's CIDR block for information to be
+ // returned for the VPC. Must contain the slash followed by one or two digits (for
+ // example, /28).
+ //
+ // * cidr-block-association.cidr-block - An IPv4 CIDR block
+ // associated with the VPC.
+ //
+ // * cidr-block-association.association-id - The
+ // association ID for an IPv4 CIDR block associated with the VPC.
+ //
+ // *
+ // cidr-block-association.state - The state of an IPv4 CIDR block associated with
+ // the VPC.
+ //
+ // * dhcp-options-id - The ID of a set of DHCP options.
+ //
+ // *
+ // ipv6-cidr-block-association.ipv6-cidr-block - An IPv6 CIDR block associated with
+ // the VPC.
+ //
+ // * ipv6-cidr-block-association.ipv6-pool - The ID of the IPv6 address
+ // pool from which the IPv6 CIDR block is allocated.
+ //
+ // *
+ // ipv6-cidr-block-association.association-id - The association ID for an IPv6 CIDR
+ // block associated with the VPC.
+ //
+ // * ipv6-cidr-block-association.state - The state
+ // of an IPv6 CIDR block associated with the VPC.
+ //
+ // * is-default - Indicates whether
+ // the VPC is the default VPC.
+ //
+ // * owner-id - The ID of the Amazon Web Services
+ // account that owns the VPC.
+ //
+ // * state - The state of the VPC (pending |
+ // available).
+ //
+ // * tag: - The key/value combination of a tag assigned to the
+ // resource. Use the tag key in the filter name and the tag value as the filter
+ // value. For example, to find all resources that have a tag with the key Owner and
+ // the value TeamA, specify tag:Owner for the filter name and TeamA for the filter
+ // value.
+ //
+ // * tag-key - The key of a tag assigned to the resource. Use this filter
+ // to find all resources assigned a tag with a specific key, regardless of the tag
+ // value.
+ //
+ // * vpc-id - The ID of the VPC.
+ Filters []types.Filter
+
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ MaxResults *int32
+
+ // The token for the next page of results.
+ NextToken *string
+
+ // One or more VPC IDs. Default: Describes all your VPCs.
+ VpcIds []string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeVpcsOutput struct {
+
+ // The token to use to retrieve the next page of results. This value is null when
+ // there are no more results to return.
+ NextToken *string
+
+ // Information about one or more VPCs.
+ Vpcs []types.Vpc
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeVpcsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeVpcs{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeVpcs{}, 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_opDescribeVpcs(options.Region), middleware.Before); 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
+}
+
+// DescribeVpcsAPIClient is a client that implements the DescribeVpcs operation.
+type DescribeVpcsAPIClient interface {
+ DescribeVpcs(context.Context, *DescribeVpcsInput, ...func(*Options)) (*DescribeVpcsOutput, error)
+}
+
+var _ DescribeVpcsAPIClient = (*Client)(nil)
+
+// DescribeVpcsPaginatorOptions is the paginator options for DescribeVpcs
+type DescribeVpcsPaginatorOptions struct {
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ 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
+}
+
+// DescribeVpcsPaginator is a paginator for DescribeVpcs
+type DescribeVpcsPaginator struct {
+ options DescribeVpcsPaginatorOptions
+ client DescribeVpcsAPIClient
+ params *DescribeVpcsInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribeVpcsPaginator returns a new DescribeVpcsPaginator
+func NewDescribeVpcsPaginator(client DescribeVpcsAPIClient, params *DescribeVpcsInput, optFns ...func(*DescribeVpcsPaginatorOptions)) *DescribeVpcsPaginator {
+ if params == nil {
+ params = &DescribeVpcsInput{}
+ }
+
+ options := DescribeVpcsPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribeVpcsPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribeVpcsPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next DescribeVpcs page.
+func (p *DescribeVpcsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeVpcsOutput, 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.DescribeVpcs(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
+}
+
+// VpcAvailableWaiterOptions are waiter options for VpcAvailableWaiter
+type VpcAvailableWaiterOptions 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,
+ // VpcAvailableWaiter will use default minimum delay of 15 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, VpcAvailableWaiter 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, *DescribeVpcsInput, *DescribeVpcsOutput, error) (bool, error)
+}
+
+// VpcAvailableWaiter defines the waiters for VpcAvailable
+type VpcAvailableWaiter struct {
+ client DescribeVpcsAPIClient
+
+ options VpcAvailableWaiterOptions
+}
+
+// NewVpcAvailableWaiter constructs a VpcAvailableWaiter.
+func NewVpcAvailableWaiter(client DescribeVpcsAPIClient, optFns ...func(*VpcAvailableWaiterOptions)) *VpcAvailableWaiter {
+ options := VpcAvailableWaiterOptions{}
+ options.MinDelay = 15 * time.Second
+ options.MaxDelay = 120 * time.Second
+ options.Retryable = vpcAvailableStateRetryable
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+ return &VpcAvailableWaiter{
+ client: client,
+ options: options,
+ }
+}
+
+// Wait calls the waiter function for VpcAvailable waiter. The maxWaitDur is the
+// maximum wait duration the waiter will wait. The maxWaitDur is required and must
+// be greater than zero.
+func (w *VpcAvailableWaiter) Wait(ctx context.Context, params *DescribeVpcsInput, maxWaitDur time.Duration, optFns ...func(*VpcAvailableWaiterOptions)) error {
+ if maxWaitDur <= 0 {
+ return 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 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.DescribeVpcs(ctx, params, func(o *Options) {
+ o.APIOptions = append(o.APIOptions, apiOptions...)
+ })
+
+ retryable, err := options.Retryable(ctx, params, out, err)
+ if err != nil {
+ return err
+ }
+ if !retryable {
+ return 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 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 fmt.Errorf("request cancelled while waiting, %w", err)
+ }
+ }
+ return fmt.Errorf("exceeded max wait time for VpcAvailable waiter")
+}
+
+func vpcAvailableStateRetryable(ctx context.Context, input *DescribeVpcsInput, output *DescribeVpcsOutput, err error) (bool, error) {
+
+ if err == nil {
+ pathValue, err := jmespath.Search("Vpcs[].State", output)
+ if err != nil {
+ return false, fmt.Errorf("error evaluating waiter state: %w", err)
+ }
+
+ expectedValue := "available"
+ var match = true
+ listOfValues, ok := pathValue.([]interface{})
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected list got %T", pathValue)
+ }
+
+ if len(listOfValues) == 0 {
+ match = false
+ }
+ for _, v := range listOfValues {
+ value, ok := v.(types.VpcState)
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected types.VpcState value, got %T", pathValue)
+ }
+
+ if string(value) != expectedValue {
+ match = false
+ }
+ }
+
+ if match {
+ return false, nil
+ }
+ }
+
+ return true, nil
+}
+
+// VpcExistsWaiterOptions are waiter options for VpcExistsWaiter
+type VpcExistsWaiterOptions 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,
+ // VpcExistsWaiter will use default minimum delay of 1 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, VpcExistsWaiter 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, *DescribeVpcsInput, *DescribeVpcsOutput, error) (bool, error)
+}
+
+// VpcExistsWaiter defines the waiters for VpcExists
+type VpcExistsWaiter struct {
+ client DescribeVpcsAPIClient
+
+ options VpcExistsWaiterOptions
+}
+
+// NewVpcExistsWaiter constructs a VpcExistsWaiter.
+func NewVpcExistsWaiter(client DescribeVpcsAPIClient, optFns ...func(*VpcExistsWaiterOptions)) *VpcExistsWaiter {
+ options := VpcExistsWaiterOptions{}
+ options.MinDelay = 1 * time.Second
+ options.MaxDelay = 120 * time.Second
+ options.Retryable = vpcExistsStateRetryable
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+ return &VpcExistsWaiter{
+ client: client,
+ options: options,
+ }
+}
+
+// Wait calls the waiter function for VpcExists waiter. The maxWaitDur is the
+// maximum wait duration the waiter will wait. The maxWaitDur is required and must
+// be greater than zero.
+func (w *VpcExistsWaiter) Wait(ctx context.Context, params *DescribeVpcsInput, maxWaitDur time.Duration, optFns ...func(*VpcExistsWaiterOptions)) error {
+ if maxWaitDur <= 0 {
+ return 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 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.DescribeVpcs(ctx, params, func(o *Options) {
+ o.APIOptions = append(o.APIOptions, apiOptions...)
+ })
+
+ retryable, err := options.Retryable(ctx, params, out, err)
+ if err != nil {
+ return err
+ }
+ if !retryable {
+ return 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 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 fmt.Errorf("request cancelled while waiting, %w", err)
+ }
+ }
+ return fmt.Errorf("exceeded max wait time for VpcExists waiter")
+}
+
+func vpcExistsStateRetryable(ctx context.Context, input *DescribeVpcsInput, output *DescribeVpcsOutput, err error) (bool, error) {
+
+ if err == nil {
+ return false, nil
+ }
+
+ if err != nil {
+ var apiErr smithy.APIError
+ ok := errors.As(err, &apiErr)
+ if !ok {
+ return false, fmt.Errorf("expected err to be of type smithy.APIError, got %w", err)
+ }
+
+ if "InvalidVpcID.NotFound" == apiErr.ErrorCode() {
+ return true, nil
+ }
+ }
+
+ return true, nil
+}
+
+func newServiceMetadataMiddleware_opDescribeVpcs(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeVpcs",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVpnConnections.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVpnConnections.go
new file mode 100644
index 00000000..0411e7ab
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVpnConnections.go
@@ -0,0 +1,591 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/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"
+)
+
+// Describes one or more of your VPN connections. For more information, see Amazon
+// Web Services Site-to-Site VPN
+// (https://docs.aws.amazon.com/vpn/latest/s2svpn/VPC_VPN.html) in the Amazon Web
+// Services Site-to-Site VPN User Guide.
+func (c *Client) DescribeVpnConnections(ctx context.Context, params *DescribeVpnConnectionsInput, optFns ...func(*Options)) (*DescribeVpnConnectionsOutput, error) {
+ if params == nil {
+ params = &DescribeVpnConnectionsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeVpnConnections", params, optFns, c.addOperationDescribeVpnConnectionsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeVpnConnectionsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+// Contains the parameters for DescribeVpnConnections.
+type DescribeVpnConnectionsInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // One or more filters.
+ //
+ // * customer-gateway-configuration - The configuration
+ // information for the customer gateway.
+ //
+ // * customer-gateway-id - The ID of a
+ // customer gateway associated with the VPN connection.
+ //
+ // * state - The state of the
+ // VPN connection (pending | available | deleting | deleted).
+ //
+ // *
+ // option.static-routes-only - Indicates whether the connection has static routes
+ // only. Used for devices that do not support Border Gateway Protocol (BGP).
+ //
+ // *
+ // route.destination-cidr-block - The destination CIDR block. This corresponds to
+ // the subnet used in a customer data center.
+ //
+ // * bgp-asn - The BGP Autonomous
+ // System Number (ASN) associated with a BGP device.
+ //
+ // * tag: - The key/value
+ // combination of a tag assigned to the resource. Use the tag key in the filter
+ // name and the tag value as the filter value. For example, to find all resources
+ // that have a tag with the key Owner and the value TeamA, specify tag:Owner for
+ // the filter name and TeamA for the filter value.
+ //
+ // * tag-key - The key of a tag
+ // assigned to the resource. Use this filter to find all resources assigned a tag
+ // with a specific key, regardless of the tag value.
+ //
+ // * type - The type of VPN
+ // connection. Currently the only supported type is ipsec.1.
+ //
+ // * vpn-connection-id -
+ // The ID of the VPN connection.
+ //
+ // * vpn-gateway-id - The ID of a virtual private
+ // gateway associated with the VPN connection.
+ //
+ // * transit-gateway-id - The ID of a
+ // transit gateway associated with the VPN connection.
+ Filters []types.Filter
+
+ // One or more VPN connection IDs. Default: Describes your VPN connections.
+ VpnConnectionIds []string
+
+ noSmithyDocumentSerde
+}
+
+// Contains the output of DescribeVpnConnections.
+type DescribeVpnConnectionsOutput struct {
+
+ // Information about one or more VPN connections.
+ VpnConnections []types.VpnConnection
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeVpnConnectionsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeVpnConnections{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeVpnConnections{}, 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_opDescribeVpnConnections(options.Region), middleware.Before); 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
+}
+
+// DescribeVpnConnectionsAPIClient is a client that implements the
+// DescribeVpnConnections operation.
+type DescribeVpnConnectionsAPIClient interface {
+ DescribeVpnConnections(context.Context, *DescribeVpnConnectionsInput, ...func(*Options)) (*DescribeVpnConnectionsOutput, error)
+}
+
+var _ DescribeVpnConnectionsAPIClient = (*Client)(nil)
+
+// VpnConnectionAvailableWaiterOptions are waiter options for
+// VpnConnectionAvailableWaiter
+type VpnConnectionAvailableWaiterOptions 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,
+ // VpnConnectionAvailableWaiter will use default minimum delay of 15 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, VpnConnectionAvailableWaiter 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, *DescribeVpnConnectionsInput, *DescribeVpnConnectionsOutput, error) (bool, error)
+}
+
+// VpnConnectionAvailableWaiter defines the waiters for VpnConnectionAvailable
+type VpnConnectionAvailableWaiter struct {
+ client DescribeVpnConnectionsAPIClient
+
+ options VpnConnectionAvailableWaiterOptions
+}
+
+// NewVpnConnectionAvailableWaiter constructs a VpnConnectionAvailableWaiter.
+func NewVpnConnectionAvailableWaiter(client DescribeVpnConnectionsAPIClient, optFns ...func(*VpnConnectionAvailableWaiterOptions)) *VpnConnectionAvailableWaiter {
+ options := VpnConnectionAvailableWaiterOptions{}
+ options.MinDelay = 15 * time.Second
+ options.MaxDelay = 120 * time.Second
+ options.Retryable = vpnConnectionAvailableStateRetryable
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+ return &VpnConnectionAvailableWaiter{
+ client: client,
+ options: options,
+ }
+}
+
+// Wait calls the waiter function for VpnConnectionAvailable waiter. The maxWaitDur
+// is the maximum wait duration the waiter will wait. The maxWaitDur is required
+// and must be greater than zero.
+func (w *VpnConnectionAvailableWaiter) Wait(ctx context.Context, params *DescribeVpnConnectionsInput, maxWaitDur time.Duration, optFns ...func(*VpnConnectionAvailableWaiterOptions)) error {
+ if maxWaitDur <= 0 {
+ return 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 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.DescribeVpnConnections(ctx, params, func(o *Options) {
+ o.APIOptions = append(o.APIOptions, apiOptions...)
+ })
+
+ retryable, err := options.Retryable(ctx, params, out, err)
+ if err != nil {
+ return err
+ }
+ if !retryable {
+ return 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 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 fmt.Errorf("request cancelled while waiting, %w", err)
+ }
+ }
+ return fmt.Errorf("exceeded max wait time for VpnConnectionAvailable waiter")
+}
+
+func vpnConnectionAvailableStateRetryable(ctx context.Context, input *DescribeVpnConnectionsInput, output *DescribeVpnConnectionsOutput, err error) (bool, error) {
+
+ if err == nil {
+ pathValue, err := jmespath.Search("VpnConnections[].State", output)
+ if err != nil {
+ return false, fmt.Errorf("error evaluating waiter state: %w", err)
+ }
+
+ expectedValue := "available"
+ var match = true
+ listOfValues, ok := pathValue.([]interface{})
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected list got %T", pathValue)
+ }
+
+ if len(listOfValues) == 0 {
+ match = false
+ }
+ for _, v := range listOfValues {
+ value, ok := v.(types.VpnState)
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected types.VpnState value, got %T", pathValue)
+ }
+
+ if string(value) != expectedValue {
+ match = false
+ }
+ }
+
+ if match {
+ return false, nil
+ }
+ }
+
+ if err == nil {
+ pathValue, err := jmespath.Search("VpnConnections[].State", output)
+ if err != nil {
+ return false, fmt.Errorf("error evaluating waiter state: %w", err)
+ }
+
+ expectedValue := "deleting"
+ listOfValues, ok := pathValue.([]interface{})
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected list got %T", pathValue)
+ }
+
+ for _, v := range listOfValues {
+ value, ok := v.(types.VpnState)
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected types.VpnState value, got %T", pathValue)
+ }
+
+ if string(value) == expectedValue {
+ return false, fmt.Errorf("waiter state transitioned to Failure")
+ }
+ }
+ }
+
+ if err == nil {
+ pathValue, err := jmespath.Search("VpnConnections[].State", output)
+ if err != nil {
+ return false, fmt.Errorf("error evaluating waiter state: %w", err)
+ }
+
+ expectedValue := "deleted"
+ listOfValues, ok := pathValue.([]interface{})
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected list got %T", pathValue)
+ }
+
+ for _, v := range listOfValues {
+ value, ok := v.(types.VpnState)
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected types.VpnState value, got %T", pathValue)
+ }
+
+ if string(value) == expectedValue {
+ return false, fmt.Errorf("waiter state transitioned to Failure")
+ }
+ }
+ }
+
+ return true, nil
+}
+
+// VpnConnectionDeletedWaiterOptions are waiter options for
+// VpnConnectionDeletedWaiter
+type VpnConnectionDeletedWaiterOptions 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,
+ // VpnConnectionDeletedWaiter will use default minimum delay of 15 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, VpnConnectionDeletedWaiter 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, *DescribeVpnConnectionsInput, *DescribeVpnConnectionsOutput, error) (bool, error)
+}
+
+// VpnConnectionDeletedWaiter defines the waiters for VpnConnectionDeleted
+type VpnConnectionDeletedWaiter struct {
+ client DescribeVpnConnectionsAPIClient
+
+ options VpnConnectionDeletedWaiterOptions
+}
+
+// NewVpnConnectionDeletedWaiter constructs a VpnConnectionDeletedWaiter.
+func NewVpnConnectionDeletedWaiter(client DescribeVpnConnectionsAPIClient, optFns ...func(*VpnConnectionDeletedWaiterOptions)) *VpnConnectionDeletedWaiter {
+ options := VpnConnectionDeletedWaiterOptions{}
+ options.MinDelay = 15 * time.Second
+ options.MaxDelay = 120 * time.Second
+ options.Retryable = vpnConnectionDeletedStateRetryable
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+ return &VpnConnectionDeletedWaiter{
+ client: client,
+ options: options,
+ }
+}
+
+// Wait calls the waiter function for VpnConnectionDeleted waiter. The maxWaitDur
+// is the maximum wait duration the waiter will wait. The maxWaitDur is required
+// and must be greater than zero.
+func (w *VpnConnectionDeletedWaiter) Wait(ctx context.Context, params *DescribeVpnConnectionsInput, maxWaitDur time.Duration, optFns ...func(*VpnConnectionDeletedWaiterOptions)) error {
+ if maxWaitDur <= 0 {
+ return 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 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.DescribeVpnConnections(ctx, params, func(o *Options) {
+ o.APIOptions = append(o.APIOptions, apiOptions...)
+ })
+
+ retryable, err := options.Retryable(ctx, params, out, err)
+ if err != nil {
+ return err
+ }
+ if !retryable {
+ return 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 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 fmt.Errorf("request cancelled while waiting, %w", err)
+ }
+ }
+ return fmt.Errorf("exceeded max wait time for VpnConnectionDeleted waiter")
+}
+
+func vpnConnectionDeletedStateRetryable(ctx context.Context, input *DescribeVpnConnectionsInput, output *DescribeVpnConnectionsOutput, err error) (bool, error) {
+
+ if err == nil {
+ pathValue, err := jmespath.Search("VpnConnections[].State", output)
+ if err != nil {
+ return false, fmt.Errorf("error evaluating waiter state: %w", err)
+ }
+
+ expectedValue := "deleted"
+ var match = true
+ listOfValues, ok := pathValue.([]interface{})
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected list got %T", pathValue)
+ }
+
+ if len(listOfValues) == 0 {
+ match = false
+ }
+ for _, v := range listOfValues {
+ value, ok := v.(types.VpnState)
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected types.VpnState value, got %T", pathValue)
+ }
+
+ if string(value) != expectedValue {
+ match = false
+ }
+ }
+
+ if match {
+ return false, nil
+ }
+ }
+
+ if err == nil {
+ pathValue, err := jmespath.Search("VpnConnections[].State", output)
+ if err != nil {
+ return false, fmt.Errorf("error evaluating waiter state: %w", err)
+ }
+
+ expectedValue := "pending"
+ listOfValues, ok := pathValue.([]interface{})
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected list got %T", pathValue)
+ }
+
+ for _, v := range listOfValues {
+ value, ok := v.(types.VpnState)
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected types.VpnState value, got %T", pathValue)
+ }
+
+ if string(value) == expectedValue {
+ return false, fmt.Errorf("waiter state transitioned to Failure")
+ }
+ }
+ }
+
+ return true, nil
+}
+
+func newServiceMetadataMiddleware_opDescribeVpnConnections(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeVpnConnections",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVpnGateways.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVpnGateways.go
new file mode 100644
index 00000000..e284a641
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVpnGateways.go
@@ -0,0 +1,163 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes one or more of your virtual private gateways. For more information,
+// see Amazon Web Services Site-to-Site VPN
+// (https://docs.aws.amazon.com/vpn/latest/s2svpn/VPC_VPN.html) in the Amazon Web
+// Services Site-to-Site VPN User Guide.
+func (c *Client) DescribeVpnGateways(ctx context.Context, params *DescribeVpnGatewaysInput, optFns ...func(*Options)) (*DescribeVpnGatewaysOutput, error) {
+ if params == nil {
+ params = &DescribeVpnGatewaysInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeVpnGateways", params, optFns, c.addOperationDescribeVpnGatewaysMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeVpnGatewaysOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+// Contains the parameters for DescribeVpnGateways.
+type DescribeVpnGatewaysInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // One or more filters.
+ //
+ // * amazon-side-asn - The Autonomous System Number (ASN) for
+ // the Amazon side of the gateway.
+ //
+ // * attachment.state - The current state of the
+ // attachment between the gateway and the VPC (attaching | attached | detaching |
+ // detached).
+ //
+ // * attachment.vpc-id - The ID of an attached VPC.
+ //
+ // *
+ // availability-zone - The Availability Zone for the virtual private gateway (if
+ // applicable).
+ //
+ // * state - The state of the virtual private gateway (pending |
+ // available | deleting | deleted).
+ //
+ // * tag: - The key/value combination of a tag
+ // assigned to the resource. Use the tag key in the filter name and the tag value
+ // as the filter value. For example, to find all resources that have a tag with the
+ // key Owner and the value TeamA, specify tag:Owner for the filter name and TeamA
+ // for the filter value.
+ //
+ // * tag-key - The key of a tag assigned to the resource.
+ // Use this filter to find all resources assigned a tag with a specific key,
+ // regardless of the tag value.
+ //
+ // * type - The type of virtual private gateway.
+ // Currently the only supported type is ipsec.1.
+ //
+ // * vpn-gateway-id - The ID of the
+ // virtual private gateway.
+ Filters []types.Filter
+
+ // One or more virtual private gateway IDs. Default: Describes all your virtual
+ // private gateways.
+ VpnGatewayIds []string
+
+ noSmithyDocumentSerde
+}
+
+// Contains the output of DescribeVpnGateways.
+type DescribeVpnGatewaysOutput struct {
+
+ // Information about one or more virtual private gateways.
+ VpnGateways []types.VpnGateway
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeVpnGatewaysMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeVpnGateways{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeVpnGateways{}, 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_opDescribeVpnGateways(options.Region), middleware.Before); 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_opDescribeVpnGateways(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DescribeVpnGateways",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DetachClassicLinkVpc.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DetachClassicLinkVpc.go
new file mode 100644
index 00000000..5dcdbd99
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DetachClassicLinkVpc.go
@@ -0,0 +1,133 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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"
+)
+
+// Unlinks (detaches) a linked EC2-Classic instance from a VPC. After the instance
+// has been unlinked, the VPC security groups are no longer associated with it. An
+// instance is automatically unlinked from a VPC when it's stopped.
+func (c *Client) DetachClassicLinkVpc(ctx context.Context, params *DetachClassicLinkVpcInput, optFns ...func(*Options)) (*DetachClassicLinkVpcOutput, error) {
+ if params == nil {
+ params = &DetachClassicLinkVpcInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DetachClassicLinkVpc", params, optFns, c.addOperationDetachClassicLinkVpcMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DetachClassicLinkVpcOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DetachClassicLinkVpcInput struct {
+
+ // The ID of the instance to unlink from the VPC.
+ //
+ // This member is required.
+ InstanceId *string
+
+ // The ID of the VPC to which the instance is linked.
+ //
+ // This member is required.
+ VpcId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type DetachClassicLinkVpcOutput struct {
+
+ // Returns true if the request succeeds; otherwise, it returns an error.
+ Return *bool
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDetachClassicLinkVpcMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDetachClassicLinkVpc{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDetachClassicLinkVpc{}, 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 = addOpDetachClassicLinkVpcValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDetachClassicLinkVpc(options.Region), middleware.Before); 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_opDetachClassicLinkVpc(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DetachClassicLinkVpc",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DetachInternetGateway.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DetachInternetGateway.go
new file mode 100644
index 00000000..1b297d66
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DetachInternetGateway.go
@@ -0,0 +1,129 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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"
+)
+
+// Detaches an internet gateway from a VPC, disabling connectivity between the
+// internet and the VPC. The VPC must not contain any running instances with
+// Elastic IP addresses or public IPv4 addresses.
+func (c *Client) DetachInternetGateway(ctx context.Context, params *DetachInternetGatewayInput, optFns ...func(*Options)) (*DetachInternetGatewayOutput, error) {
+ if params == nil {
+ params = &DetachInternetGatewayInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DetachInternetGateway", params, optFns, c.addOperationDetachInternetGatewayMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DetachInternetGatewayOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DetachInternetGatewayInput struct {
+
+ // The ID of the internet gateway.
+ //
+ // This member is required.
+ InternetGatewayId *string
+
+ // The ID of the VPC.
+ //
+ // This member is required.
+ VpcId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type DetachInternetGatewayOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDetachInternetGatewayMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDetachInternetGateway{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDetachInternetGateway{}, 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 = addOpDetachInternetGatewayValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDetachInternetGateway(options.Region), middleware.Before); 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_opDetachInternetGateway(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DetachInternetGateway",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DetachNetworkInterface.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DetachNetworkInterface.go
new file mode 100644
index 00000000..227e93d4
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DetachNetworkInterface.go
@@ -0,0 +1,141 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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"
+)
+
+// Detaches a network interface from an instance.
+func (c *Client) DetachNetworkInterface(ctx context.Context, params *DetachNetworkInterfaceInput, optFns ...func(*Options)) (*DetachNetworkInterfaceOutput, error) {
+ if params == nil {
+ params = &DetachNetworkInterfaceInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DetachNetworkInterface", params, optFns, c.addOperationDetachNetworkInterfaceMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DetachNetworkInterfaceOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+// Contains the parameters for DetachNetworkInterface.
+type DetachNetworkInterfaceInput struct {
+
+ // The ID of the attachment.
+ //
+ // This member is required.
+ AttachmentId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // Specifies whether to force a detachment.
+ //
+ // * Use the Force parameter only as a
+ // last resort to detach a network interface from a failed instance.
+ //
+ // * If you use
+ // the Force parameter to detach a network interface, you might not be able to
+ // attach a different network interface to the same index on the instance without
+ // first stopping and starting the instance.
+ //
+ // * If you force the detachment of a
+ // network interface, the instance metadata
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html)
+ // might not get updated. This means that the attributes associated with the
+ // detached network interface might still be visible. The instance metadata will
+ // get updated when you stop and start the instance.
+ Force *bool
+
+ noSmithyDocumentSerde
+}
+
+type DetachNetworkInterfaceOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDetachNetworkInterfaceMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDetachNetworkInterface{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDetachNetworkInterface{}, 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 = addOpDetachNetworkInterfaceValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDetachNetworkInterface(options.Region), middleware.Before); 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_opDetachNetworkInterface(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DetachNetworkInterface",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DetachVolume.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DetachVolume.go
new file mode 100644
index 00000000..997a20e8
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DetachVolume.go
@@ -0,0 +1,171 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "time"
+)
+
+// Detaches an EBS volume from an instance. Make sure to unmount any file systems
+// on the device within your operating system before detaching the volume. Failure
+// to do so can result in the volume becoming stuck in the busy state while
+// detaching. If this happens, detachment can be delayed indefinitely until you
+// unmount the volume, force detachment, reboot the instance, or all three. If an
+// EBS volume is the root device of an instance, it can't be detached while the
+// instance is running. To detach the root volume, stop the instance first. When a
+// volume with an Amazon Web Services Marketplace product code is detached from an
+// instance, the product code is no longer associated with the instance. For more
+// information, see Detach an Amazon EBS volume
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-detaching-volume.html)
+// in the Amazon Elastic Compute Cloud User Guide.
+func (c *Client) DetachVolume(ctx context.Context, params *DetachVolumeInput, optFns ...func(*Options)) (*DetachVolumeOutput, error) {
+ if params == nil {
+ params = &DetachVolumeInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DetachVolume", params, optFns, c.addOperationDetachVolumeMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DetachVolumeOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DetachVolumeInput struct {
+
+ // The ID of the volume.
+ //
+ // This member is required.
+ VolumeId *string
+
+ // The device name.
+ Device *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // Forces detachment if the previous detachment attempt did not occur cleanly (for
+ // example, logging into an instance, unmounting the volume, and detaching
+ // normally). This option can lead to data loss or a corrupted file system. Use
+ // this option only as a last resort to detach a volume from a failed instance. The
+ // instance won't have an opportunity to flush file system caches or file system
+ // metadata. If you use this option, you must perform file system check and repair
+ // procedures.
+ Force *bool
+
+ // The ID of the instance. If you are detaching a Multi-Attach enabled volume, you
+ // must specify an instance ID.
+ InstanceId *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes volume attachment details.
+type DetachVolumeOutput struct {
+
+ // The time stamp when the attachment initiated.
+ AttachTime *time.Time
+
+ // Indicates whether the EBS volume is deleted on instance termination.
+ DeleteOnTermination *bool
+
+ // The device name.
+ Device *string
+
+ // The ID of the instance.
+ InstanceId *string
+
+ // The attachment state of the volume.
+ State types.VolumeAttachmentState
+
+ // The ID of the volume.
+ VolumeId *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDetachVolumeMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDetachVolume{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDetachVolume{}, 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 = addOpDetachVolumeValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDetachVolume(options.Region), middleware.Before); 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_opDetachVolume(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DetachVolume",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DetachVpnGateway.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DetachVpnGateway.go
new file mode 100644
index 00000000..79732464
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DetachVpnGateway.go
@@ -0,0 +1,134 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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"
+)
+
+// Detaches a virtual private gateway from a VPC. You do this if you're planning to
+// turn off the VPC and not use it anymore. You can confirm a virtual private
+// gateway has been completely detached from a VPC by describing the virtual
+// private gateway (any attachments to the virtual private gateway are also
+// described). You must wait for the attachment's state to switch to detached
+// before you can delete the VPC or attach a different VPC to the virtual private
+// gateway.
+func (c *Client) DetachVpnGateway(ctx context.Context, params *DetachVpnGatewayInput, optFns ...func(*Options)) (*DetachVpnGatewayOutput, error) {
+ if params == nil {
+ params = &DetachVpnGatewayInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DetachVpnGateway", params, optFns, c.addOperationDetachVpnGatewayMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DetachVpnGatewayOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+// Contains the parameters for DetachVpnGateway.
+type DetachVpnGatewayInput struct {
+
+ // The ID of the VPC.
+ //
+ // This member is required.
+ VpcId *string
+
+ // The ID of the virtual private gateway.
+ //
+ // This member is required.
+ VpnGatewayId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type DetachVpnGatewayOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDetachVpnGatewayMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDetachVpnGateway{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDetachVpnGateway{}, 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 = addOpDetachVpnGatewayValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDetachVpnGateway(options.Region), middleware.Before); 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_opDetachVpnGateway(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DetachVpnGateway",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisableEbsEncryptionByDefault.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisableEbsEncryptionByDefault.go
new file mode 100644
index 00000000..4cfb2dbf
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisableEbsEncryptionByDefault.go
@@ -0,0 +1,124 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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"
+)
+
+// Disables EBS encryption by default for your account in the current Region. After
+// you disable encryption by default, you can still create encrypted volumes by
+// enabling encryption when you create each volume. Disabling encryption by default
+// does not change the encryption status of your existing volumes. For more
+// information, see Amazon EBS encryption
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html) in the
+// Amazon Elastic Compute Cloud User Guide.
+func (c *Client) DisableEbsEncryptionByDefault(ctx context.Context, params *DisableEbsEncryptionByDefaultInput, optFns ...func(*Options)) (*DisableEbsEncryptionByDefaultOutput, error) {
+ if params == nil {
+ params = &DisableEbsEncryptionByDefaultInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DisableEbsEncryptionByDefault", params, optFns, c.addOperationDisableEbsEncryptionByDefaultMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DisableEbsEncryptionByDefaultOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DisableEbsEncryptionByDefaultInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type DisableEbsEncryptionByDefaultOutput struct {
+
+ // The updated status of encryption by default.
+ EbsEncryptionByDefault *bool
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDisableEbsEncryptionByDefaultMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDisableEbsEncryptionByDefault{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDisableEbsEncryptionByDefault{}, 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_opDisableEbsEncryptionByDefault(options.Region), middleware.Before); 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_opDisableEbsEncryptionByDefault(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DisableEbsEncryptionByDefault",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisableFastSnapshotRestores.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisableFastSnapshotRestores.go
new file mode 100644
index 00000000..bdd6faaf
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisableFastSnapshotRestores.go
@@ -0,0 +1,138 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Disables fast snapshot restores for the specified snapshots in the specified
+// Availability Zones.
+func (c *Client) DisableFastSnapshotRestores(ctx context.Context, params *DisableFastSnapshotRestoresInput, optFns ...func(*Options)) (*DisableFastSnapshotRestoresOutput, error) {
+ if params == nil {
+ params = &DisableFastSnapshotRestoresInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DisableFastSnapshotRestores", params, optFns, c.addOperationDisableFastSnapshotRestoresMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DisableFastSnapshotRestoresOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DisableFastSnapshotRestoresInput struct {
+
+ // One or more Availability Zones. For example, us-east-2a.
+ //
+ // This member is required.
+ AvailabilityZones []string
+
+ // The IDs of one or more snapshots. For example, snap-1234567890abcdef0.
+ //
+ // This member is required.
+ SourceSnapshotIds []string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type DisableFastSnapshotRestoresOutput struct {
+
+ // Information about the snapshots for which fast snapshot restores were
+ // successfully disabled.
+ Successful []types.DisableFastSnapshotRestoreSuccessItem
+
+ // Information about the snapshots for which fast snapshot restores could not be
+ // disabled.
+ Unsuccessful []types.DisableFastSnapshotRestoreErrorItem
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDisableFastSnapshotRestoresMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDisableFastSnapshotRestores{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDisableFastSnapshotRestores{}, 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 = addOpDisableFastSnapshotRestoresValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisableFastSnapshotRestores(options.Region), middleware.Before); 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_opDisableFastSnapshotRestores(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DisableFastSnapshotRestores",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisableImageDeprecation.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisableImageDeprecation.go
new file mode 100644
index 00000000..465a606e
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisableImageDeprecation.go
@@ -0,0 +1,129 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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"
+)
+
+// Cancels the deprecation of the specified AMI. For more information, see
+// Deprecate an AMI
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-deprecate.html) in the
+// Amazon Elastic Compute Cloud User Guide.
+func (c *Client) DisableImageDeprecation(ctx context.Context, params *DisableImageDeprecationInput, optFns ...func(*Options)) (*DisableImageDeprecationOutput, error) {
+ if params == nil {
+ params = &DisableImageDeprecationInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DisableImageDeprecation", params, optFns, c.addOperationDisableImageDeprecationMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DisableImageDeprecationOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DisableImageDeprecationInput struct {
+
+ // The ID of the AMI.
+ //
+ // This member is required.
+ ImageId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type DisableImageDeprecationOutput struct {
+
+ // Returns true if the request succeeds; otherwise, it returns an error.
+ Return *bool
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDisableImageDeprecationMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDisableImageDeprecation{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDisableImageDeprecation{}, 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 = addOpDisableImageDeprecationValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisableImageDeprecation(options.Region), middleware.Before); 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_opDisableImageDeprecation(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DisableImageDeprecation",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisableSerialConsoleAccess.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisableSerialConsoleAccess.go
new file mode 100644
index 00000000..648d98b8
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisableSerialConsoleAccess.go
@@ -0,0 +1,124 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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"
+)
+
+// Disables access to the EC2 serial console of all instances for your account. By
+// default, access to the EC2 serial console is disabled for your account. For more
+// information, see Manage account access to the EC2 serial console
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configure-access-to-serial-console.html#serial-console-account-access)
+// in the Amazon EC2 User Guide.
+func (c *Client) DisableSerialConsoleAccess(ctx context.Context, params *DisableSerialConsoleAccessInput, optFns ...func(*Options)) (*DisableSerialConsoleAccessOutput, error) {
+ if params == nil {
+ params = &DisableSerialConsoleAccessInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DisableSerialConsoleAccess", params, optFns, c.addOperationDisableSerialConsoleAccessMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DisableSerialConsoleAccessOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DisableSerialConsoleAccessInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type DisableSerialConsoleAccessOutput struct {
+
+ // If true, access to the EC2 serial console of all instances is enabled for your
+ // account. If false, access to the EC2 serial console of all instances is disabled
+ // for your account.
+ SerialConsoleAccessEnabled *bool
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDisableSerialConsoleAccessMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDisableSerialConsoleAccess{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDisableSerialConsoleAccess{}, 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_opDisableSerialConsoleAccess(options.Region), middleware.Before); 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_opDisableSerialConsoleAccess(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DisableSerialConsoleAccess",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisableTransitGatewayRouteTablePropagation.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisableTransitGatewayRouteTablePropagation.go
new file mode 100644
index 00000000..83b0eac2
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisableTransitGatewayRouteTablePropagation.go
@@ -0,0 +1,133 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Disables the specified resource attachment from propagating routes to the
+// specified propagation route table.
+func (c *Client) DisableTransitGatewayRouteTablePropagation(ctx context.Context, params *DisableTransitGatewayRouteTablePropagationInput, optFns ...func(*Options)) (*DisableTransitGatewayRouteTablePropagationOutput, error) {
+ if params == nil {
+ params = &DisableTransitGatewayRouteTablePropagationInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DisableTransitGatewayRouteTablePropagation", params, optFns, c.addOperationDisableTransitGatewayRouteTablePropagationMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DisableTransitGatewayRouteTablePropagationOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DisableTransitGatewayRouteTablePropagationInput struct {
+
+ // The ID of the attachment.
+ //
+ // This member is required.
+ TransitGatewayAttachmentId *string
+
+ // The ID of the propagation route table.
+ //
+ // This member is required.
+ TransitGatewayRouteTableId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type DisableTransitGatewayRouteTablePropagationOutput struct {
+
+ // Information about route propagation.
+ Propagation *types.TransitGatewayPropagation
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDisableTransitGatewayRouteTablePropagationMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDisableTransitGatewayRouteTablePropagation{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDisableTransitGatewayRouteTablePropagation{}, 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 = addOpDisableTransitGatewayRouteTablePropagationValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisableTransitGatewayRouteTablePropagation(options.Region), middleware.Before); 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_opDisableTransitGatewayRouteTablePropagation(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DisableTransitGatewayRouteTablePropagation",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisableVgwRoutePropagation.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisableVgwRoutePropagation.go
new file mode 100644
index 00000000..8c3720bd
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisableVgwRoutePropagation.go
@@ -0,0 +1,129 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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"
+)
+
+// Disables a virtual private gateway (VGW) from propagating routes to a specified
+// route table of a VPC.
+func (c *Client) DisableVgwRoutePropagation(ctx context.Context, params *DisableVgwRoutePropagationInput, optFns ...func(*Options)) (*DisableVgwRoutePropagationOutput, error) {
+ if params == nil {
+ params = &DisableVgwRoutePropagationInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DisableVgwRoutePropagation", params, optFns, c.addOperationDisableVgwRoutePropagationMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DisableVgwRoutePropagationOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+// Contains the parameters for DisableVgwRoutePropagation.
+type DisableVgwRoutePropagationInput struct {
+
+ // The ID of the virtual private gateway.
+ //
+ // This member is required.
+ GatewayId *string
+
+ // The ID of the route table.
+ //
+ // This member is required.
+ RouteTableId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type DisableVgwRoutePropagationOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDisableVgwRoutePropagationMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDisableVgwRoutePropagation{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDisableVgwRoutePropagation{}, 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 = addOpDisableVgwRoutePropagationValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisableVgwRoutePropagation(options.Region), middleware.Before); 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_opDisableVgwRoutePropagation(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DisableVgwRoutePropagation",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisableVpcClassicLink.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisableVpcClassicLink.go
new file mode 100644
index 00000000..ff13f9d3
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisableVpcClassicLink.go
@@ -0,0 +1,127 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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"
+)
+
+// Disables ClassicLink for a VPC. You cannot disable ClassicLink for a VPC that
+// has EC2-Classic instances linked to it.
+func (c *Client) DisableVpcClassicLink(ctx context.Context, params *DisableVpcClassicLinkInput, optFns ...func(*Options)) (*DisableVpcClassicLinkOutput, error) {
+ if params == nil {
+ params = &DisableVpcClassicLinkInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DisableVpcClassicLink", params, optFns, c.addOperationDisableVpcClassicLinkMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DisableVpcClassicLinkOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DisableVpcClassicLinkInput struct {
+
+ // The ID of the VPC.
+ //
+ // This member is required.
+ VpcId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type DisableVpcClassicLinkOutput struct {
+
+ // Returns true if the request succeeds; otherwise, it returns an error.
+ Return *bool
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDisableVpcClassicLinkMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDisableVpcClassicLink{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDisableVpcClassicLink{}, 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 = addOpDisableVpcClassicLinkValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisableVpcClassicLink(options.Region), middleware.Before); 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_opDisableVpcClassicLink(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DisableVpcClassicLink",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisableVpcClassicLinkDnsSupport.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisableVpcClassicLinkDnsSupport.go
new file mode 100644
index 00000000..74fe7c57
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisableVpcClassicLinkDnsSupport.go
@@ -0,0 +1,120 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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"
+)
+
+// Disables ClassicLink DNS support for a VPC. If disabled, DNS hostnames resolve
+// to public IP addresses when addressed between a linked EC2-Classic instance and
+// instances in the VPC to which it's linked. For more information, see ClassicLink
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html) in
+// the Amazon Elastic Compute Cloud User Guide. You must specify a VPC ID in the
+// request.
+func (c *Client) DisableVpcClassicLinkDnsSupport(ctx context.Context, params *DisableVpcClassicLinkDnsSupportInput, optFns ...func(*Options)) (*DisableVpcClassicLinkDnsSupportOutput, error) {
+ if params == nil {
+ params = &DisableVpcClassicLinkDnsSupportInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DisableVpcClassicLinkDnsSupport", params, optFns, c.addOperationDisableVpcClassicLinkDnsSupportMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DisableVpcClassicLinkDnsSupportOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DisableVpcClassicLinkDnsSupportInput struct {
+
+ // The ID of the VPC.
+ VpcId *string
+
+ noSmithyDocumentSerde
+}
+
+type DisableVpcClassicLinkDnsSupportOutput struct {
+
+ // Returns true if the request succeeds; otherwise, it returns an error.
+ Return *bool
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDisableVpcClassicLinkDnsSupportMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDisableVpcClassicLinkDnsSupport{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDisableVpcClassicLinkDnsSupport{}, 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_opDisableVpcClassicLinkDnsSupport(options.Region), middleware.Before); 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_opDisableVpcClassicLinkDnsSupport(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DisableVpcClassicLinkDnsSupport",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisassociateAddress.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisassociateAddress.go
new file mode 100644
index 00000000..b089d89b
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisassociateAddress.go
@@ -0,0 +1,125 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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"
+)
+
+// Disassociates an Elastic IP address from the instance or network interface it's
+// associated with. An Elastic IP address is for use in either the EC2-Classic
+// platform or in a VPC. For more information, see Elastic IP Addresses
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html)
+// in the Amazon Elastic Compute Cloud User Guide. This is an idempotent operation.
+// If you perform the operation more than once, Amazon EC2 doesn't return an error.
+func (c *Client) DisassociateAddress(ctx context.Context, params *DisassociateAddressInput, optFns ...func(*Options)) (*DisassociateAddressOutput, error) {
+ if params == nil {
+ params = &DisassociateAddressInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DisassociateAddress", params, optFns, c.addOperationDisassociateAddressMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DisassociateAddressOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DisassociateAddressInput struct {
+
+ // [EC2-VPC] The association ID. Required for EC2-VPC.
+ AssociationId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // [EC2-Classic] The Elastic IP address. Required for EC2-Classic.
+ PublicIp *string
+
+ noSmithyDocumentSerde
+}
+
+type DisassociateAddressOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDisassociateAddressMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDisassociateAddress{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDisassociateAddress{}, 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_opDisassociateAddress(options.Region), middleware.Before); 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_opDisassociateAddress(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DisassociateAddress",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisassociateClientVpnTargetNetwork.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisassociateClientVpnTargetNetwork.go
new file mode 100644
index 00000000..1a6c5a17
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisassociateClientVpnTargetNetwork.go
@@ -0,0 +1,147 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Disassociates a target network from the specified Client VPN endpoint. When you
+// disassociate the last target network from a Client VPN, the following
+// happens:
+//
+// * The route that was automatically added for the VPC is deleted
+//
+// * All
+// active client connections are terminated
+//
+// * New client connections are
+// disallowed
+//
+// * The Client VPN endpoint's status changes to pending-associate
+func (c *Client) DisassociateClientVpnTargetNetwork(ctx context.Context, params *DisassociateClientVpnTargetNetworkInput, optFns ...func(*Options)) (*DisassociateClientVpnTargetNetworkOutput, error) {
+ if params == nil {
+ params = &DisassociateClientVpnTargetNetworkInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DisassociateClientVpnTargetNetwork", params, optFns, c.addOperationDisassociateClientVpnTargetNetworkMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DisassociateClientVpnTargetNetworkOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DisassociateClientVpnTargetNetworkInput struct {
+
+ // The ID of the target network association.
+ //
+ // This member is required.
+ AssociationId *string
+
+ // The ID of the Client VPN endpoint from which to disassociate the target network.
+ //
+ // This member is required.
+ ClientVpnEndpointId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type DisassociateClientVpnTargetNetworkOutput struct {
+
+ // The ID of the target network association.
+ AssociationId *string
+
+ // The current state of the target network association.
+ Status *types.AssociationStatus
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDisassociateClientVpnTargetNetworkMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDisassociateClientVpnTargetNetwork{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDisassociateClientVpnTargetNetwork{}, 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 = addOpDisassociateClientVpnTargetNetworkValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisassociateClientVpnTargetNetwork(options.Region), middleware.Before); 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_opDisassociateClientVpnTargetNetwork(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DisassociateClientVpnTargetNetwork",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisassociateEnclaveCertificateIamRole.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisassociateEnclaveCertificateIamRole.go
new file mode 100644
index 00000000..fc69cbe3
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisassociateEnclaveCertificateIamRole.go
@@ -0,0 +1,129 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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"
+)
+
+// Disassociates an IAM role from an Certificate Manager (ACM) certificate.
+// Disassociating an IAM role from an ACM certificate removes the Amazon S3 object
+// that contains the certificate, certificate chain, and encrypted private key from
+// the Amazon S3 bucket. It also revokes the IAM role's permission to use the KMS
+// key used to encrypt the private key. This effectively revokes the role's
+// permission to use the certificate.
+func (c *Client) DisassociateEnclaveCertificateIamRole(ctx context.Context, params *DisassociateEnclaveCertificateIamRoleInput, optFns ...func(*Options)) (*DisassociateEnclaveCertificateIamRoleOutput, error) {
+ if params == nil {
+ params = &DisassociateEnclaveCertificateIamRoleInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DisassociateEnclaveCertificateIamRole", params, optFns, c.addOperationDisassociateEnclaveCertificateIamRoleMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DisassociateEnclaveCertificateIamRoleOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DisassociateEnclaveCertificateIamRoleInput struct {
+
+ // The ARN of the ACM certificate from which to disassociate the IAM role.
+ CertificateArn *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The ARN of the IAM role to disassociate.
+ RoleArn *string
+
+ noSmithyDocumentSerde
+}
+
+type DisassociateEnclaveCertificateIamRoleOutput struct {
+
+ // Returns true if the request succeeds; otherwise, it returns an error.
+ Return *bool
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDisassociateEnclaveCertificateIamRoleMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDisassociateEnclaveCertificateIamRole{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDisassociateEnclaveCertificateIamRole{}, 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_opDisassociateEnclaveCertificateIamRole(options.Region), middleware.Before); 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_opDisassociateEnclaveCertificateIamRole(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DisassociateEnclaveCertificateIamRole",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisassociateIamInstanceProfile.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisassociateIamInstanceProfile.go
new file mode 100644
index 00000000..0503b383
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisassociateIamInstanceProfile.go
@@ -0,0 +1,122 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Disassociates an IAM instance profile from a running or stopped instance. Use
+// DescribeIamInstanceProfileAssociations to get the association ID.
+func (c *Client) DisassociateIamInstanceProfile(ctx context.Context, params *DisassociateIamInstanceProfileInput, optFns ...func(*Options)) (*DisassociateIamInstanceProfileOutput, error) {
+ if params == nil {
+ params = &DisassociateIamInstanceProfileInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DisassociateIamInstanceProfile", params, optFns, c.addOperationDisassociateIamInstanceProfileMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DisassociateIamInstanceProfileOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DisassociateIamInstanceProfileInput struct {
+
+ // The ID of the IAM instance profile association.
+ //
+ // This member is required.
+ AssociationId *string
+
+ noSmithyDocumentSerde
+}
+
+type DisassociateIamInstanceProfileOutput struct {
+
+ // Information about the IAM instance profile association.
+ IamInstanceProfileAssociation *types.IamInstanceProfileAssociation
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDisassociateIamInstanceProfileMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDisassociateIamInstanceProfile{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDisassociateIamInstanceProfile{}, 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 = addOpDisassociateIamInstanceProfileValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisassociateIamInstanceProfile(options.Region), middleware.Before); 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_opDisassociateIamInstanceProfile(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DisassociateIamInstanceProfile",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisassociateInstanceEventWindow.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisassociateInstanceEventWindow.go
new file mode 100644
index 00000000..6399d7fb
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisassociateInstanceEventWindow.go
@@ -0,0 +1,135 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Disassociates one or more targets from an event window. For more information,
+// see Define event windows for scheduled events
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/event-windows.html) in the
+// Amazon EC2 User Guide.
+func (c *Client) DisassociateInstanceEventWindow(ctx context.Context, params *DisassociateInstanceEventWindowInput, optFns ...func(*Options)) (*DisassociateInstanceEventWindowOutput, error) {
+ if params == nil {
+ params = &DisassociateInstanceEventWindowInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DisassociateInstanceEventWindow", params, optFns, c.addOperationDisassociateInstanceEventWindowMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DisassociateInstanceEventWindowOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DisassociateInstanceEventWindowInput struct {
+
+ // One or more targets to disassociate from the specified event window.
+ //
+ // This member is required.
+ AssociationTarget *types.InstanceEventWindowDisassociationRequest
+
+ // The ID of the event window.
+ //
+ // This member is required.
+ InstanceEventWindowId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type DisassociateInstanceEventWindowOutput struct {
+
+ // Information about the event window.
+ InstanceEventWindow *types.InstanceEventWindow
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDisassociateInstanceEventWindowMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDisassociateInstanceEventWindow{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDisassociateInstanceEventWindow{}, 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 = addOpDisassociateInstanceEventWindowValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisassociateInstanceEventWindow(options.Region), middleware.Before); 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_opDisassociateInstanceEventWindow(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DisassociateInstanceEventWindow",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisassociateRouteTable.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisassociateRouteTable.go
new file mode 100644
index 00000000..06739ce3
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisassociateRouteTable.go
@@ -0,0 +1,128 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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"
+)
+
+// Disassociates a subnet or gateway from a route table. After you perform this
+// action, the subnet no longer uses the routes in the route table. Instead, it
+// uses the routes in the VPC's main route table. For more information about route
+// tables, see Route tables
+// (https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Route_Tables.html) in the
+// Amazon Virtual Private Cloud User Guide.
+func (c *Client) DisassociateRouteTable(ctx context.Context, params *DisassociateRouteTableInput, optFns ...func(*Options)) (*DisassociateRouteTableOutput, error) {
+ if params == nil {
+ params = &DisassociateRouteTableInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DisassociateRouteTable", params, optFns, c.addOperationDisassociateRouteTableMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DisassociateRouteTableOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DisassociateRouteTableInput struct {
+
+ // The association ID representing the current association between the route table
+ // and subnet or gateway.
+ //
+ // This member is required.
+ AssociationId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type DisassociateRouteTableOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDisassociateRouteTableMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDisassociateRouteTable{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDisassociateRouteTable{}, 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 = addOpDisassociateRouteTableValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisassociateRouteTable(options.Region), middleware.Before); 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_opDisassociateRouteTable(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DisassociateRouteTable",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisassociateSubnetCidrBlock.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisassociateSubnetCidrBlock.go
new file mode 100644
index 00000000..17cc834c
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisassociateSubnetCidrBlock.go
@@ -0,0 +1,126 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Disassociates a CIDR block from a subnet. Currently, you can disassociate an
+// IPv6 CIDR block only. You must detach or delete all gateways and resources that
+// are associated with the CIDR block before you can disassociate it.
+func (c *Client) DisassociateSubnetCidrBlock(ctx context.Context, params *DisassociateSubnetCidrBlockInput, optFns ...func(*Options)) (*DisassociateSubnetCidrBlockOutput, error) {
+ if params == nil {
+ params = &DisassociateSubnetCidrBlockInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DisassociateSubnetCidrBlock", params, optFns, c.addOperationDisassociateSubnetCidrBlockMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DisassociateSubnetCidrBlockOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DisassociateSubnetCidrBlockInput struct {
+
+ // The association ID for the CIDR block.
+ //
+ // This member is required.
+ AssociationId *string
+
+ noSmithyDocumentSerde
+}
+
+type DisassociateSubnetCidrBlockOutput struct {
+
+ // Information about the IPv6 CIDR block association.
+ Ipv6CidrBlockAssociation *types.SubnetIpv6CidrBlockAssociation
+
+ // The ID of the subnet.
+ SubnetId *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDisassociateSubnetCidrBlockMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDisassociateSubnetCidrBlock{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDisassociateSubnetCidrBlock{}, 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 = addOpDisassociateSubnetCidrBlockValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisassociateSubnetCidrBlock(options.Region), middleware.Before); 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_opDisassociateSubnetCidrBlock(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DisassociateSubnetCidrBlock",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisassociateTransitGatewayMulticastDomain.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisassociateTransitGatewayMulticastDomain.go
new file mode 100644
index 00000000..bc2ccb58
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisassociateTransitGatewayMulticastDomain.go
@@ -0,0 +1,128 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Disassociates the specified subnets from the transit gateway multicast domain.
+func (c *Client) DisassociateTransitGatewayMulticastDomain(ctx context.Context, params *DisassociateTransitGatewayMulticastDomainInput, optFns ...func(*Options)) (*DisassociateTransitGatewayMulticastDomainOutput, error) {
+ if params == nil {
+ params = &DisassociateTransitGatewayMulticastDomainInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DisassociateTransitGatewayMulticastDomain", params, optFns, c.addOperationDisassociateTransitGatewayMulticastDomainMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DisassociateTransitGatewayMulticastDomainOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DisassociateTransitGatewayMulticastDomainInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The IDs of the subnets;
+ SubnetIds []string
+
+ // The ID of the attachment.
+ TransitGatewayAttachmentId *string
+
+ // The ID of the transit gateway multicast domain.
+ TransitGatewayMulticastDomainId *string
+
+ noSmithyDocumentSerde
+}
+
+type DisassociateTransitGatewayMulticastDomainOutput struct {
+
+ // Information about the association.
+ Associations *types.TransitGatewayMulticastDomainAssociations
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDisassociateTransitGatewayMulticastDomainMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDisassociateTransitGatewayMulticastDomain{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDisassociateTransitGatewayMulticastDomain{}, 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_opDisassociateTransitGatewayMulticastDomain(options.Region), middleware.Before); 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_opDisassociateTransitGatewayMulticastDomain(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DisassociateTransitGatewayMulticastDomain",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisassociateTransitGatewayRouteTable.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisassociateTransitGatewayRouteTable.go
new file mode 100644
index 00000000..77a2b08d
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisassociateTransitGatewayRouteTable.go
@@ -0,0 +1,132 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Disassociates a resource attachment from a transit gateway route table.
+func (c *Client) DisassociateTransitGatewayRouteTable(ctx context.Context, params *DisassociateTransitGatewayRouteTableInput, optFns ...func(*Options)) (*DisassociateTransitGatewayRouteTableOutput, error) {
+ if params == nil {
+ params = &DisassociateTransitGatewayRouteTableInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DisassociateTransitGatewayRouteTable", params, optFns, c.addOperationDisassociateTransitGatewayRouteTableMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DisassociateTransitGatewayRouteTableOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DisassociateTransitGatewayRouteTableInput struct {
+
+ // The ID of the attachment.
+ //
+ // This member is required.
+ TransitGatewayAttachmentId *string
+
+ // The ID of the transit gateway route table.
+ //
+ // This member is required.
+ TransitGatewayRouteTableId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type DisassociateTransitGatewayRouteTableOutput struct {
+
+ // Information about the association.
+ Association *types.TransitGatewayAssociation
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDisassociateTransitGatewayRouteTableMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDisassociateTransitGatewayRouteTable{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDisassociateTransitGatewayRouteTable{}, 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 = addOpDisassociateTransitGatewayRouteTableValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisassociateTransitGatewayRouteTable(options.Region), middleware.Before); 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_opDisassociateTransitGatewayRouteTable(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DisassociateTransitGatewayRouteTable",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisassociateTrunkInterface.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisassociateTrunkInterface.go
new file mode 100644
index 00000000..199cce8b
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisassociateTrunkInterface.go
@@ -0,0 +1,175 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// This API action is currently in limited preview only. If you are interested in
+// using this feature, contact your account manager. Removes an association between
+// a branch network interface with a trunk network interface.
+func (c *Client) DisassociateTrunkInterface(ctx context.Context, params *DisassociateTrunkInterfaceInput, optFns ...func(*Options)) (*DisassociateTrunkInterfaceOutput, error) {
+ if params == nil {
+ params = &DisassociateTrunkInterfaceInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DisassociateTrunkInterface", params, optFns, c.addOperationDisassociateTrunkInterfaceMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DisassociateTrunkInterfaceOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DisassociateTrunkInterfaceInput struct {
+
+ // The ID of the association
+ //
+ // This member is required.
+ AssociationId *string
+
+ // Unique, case-sensitive identifier that you provide to ensure the idempotency of
+ // the request. For more information, see How to Ensure Idempotency
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html).
+ ClientToken *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type DisassociateTrunkInterfaceOutput struct {
+
+ // Unique, case-sensitive identifier that you provide to ensure the idempotency of
+ // the request. For more information, see How to Ensure Idempotency
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html).
+ ClientToken *string
+
+ // Returns true if the request succeeds; otherwise, it returns an error.
+ Return *bool
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDisassociateTrunkInterfaceMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDisassociateTrunkInterface{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDisassociateTrunkInterface{}, 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 = addIdempotencyToken_opDisassociateTrunkInterfaceMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpDisassociateTrunkInterfaceValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisassociateTrunkInterface(options.Region), middleware.Before); 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
+}
+
+type idempotencyToken_initializeOpDisassociateTrunkInterface struct {
+ tokenProvider IdempotencyTokenProvider
+}
+
+func (*idempotencyToken_initializeOpDisassociateTrunkInterface) ID() string {
+ return "OperationIdempotencyTokenAutoFill"
+}
+
+func (m *idempotencyToken_initializeOpDisassociateTrunkInterface) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ if m.tokenProvider == nil {
+ return next.HandleInitialize(ctx, in)
+ }
+
+ input, ok := in.Parameters.(*DisassociateTrunkInterfaceInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("expected middleware input to be of type *DisassociateTrunkInterfaceInput ")
+ }
+
+ if input.ClientToken == nil {
+ t, err := m.tokenProvider.GetIdempotencyToken()
+ if err != nil {
+ return out, metadata, err
+ }
+ input.ClientToken = &t
+ }
+ return next.HandleInitialize(ctx, in)
+}
+func addIdempotencyToken_opDisassociateTrunkInterfaceMiddleware(stack *middleware.Stack, cfg Options) error {
+ return stack.Initialize.Add(&idempotencyToken_initializeOpDisassociateTrunkInterface{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before)
+}
+
+func newServiceMetadataMiddleware_opDisassociateTrunkInterface(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DisassociateTrunkInterface",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisassociateVpcCidrBlock.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisassociateVpcCidrBlock.go
new file mode 100644
index 00000000..581a48d8
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisassociateVpcCidrBlock.go
@@ -0,0 +1,132 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Disassociates a CIDR block from a VPC. To disassociate the CIDR block, you must
+// specify its association ID. You can get the association ID by using
+// DescribeVpcs. You must detach or delete all gateways and resources that are
+// associated with the CIDR block before you can disassociate it. You cannot
+// disassociate the CIDR block with which you originally created the VPC (the
+// primary CIDR block).
+func (c *Client) DisassociateVpcCidrBlock(ctx context.Context, params *DisassociateVpcCidrBlockInput, optFns ...func(*Options)) (*DisassociateVpcCidrBlockOutput, error) {
+ if params == nil {
+ params = &DisassociateVpcCidrBlockInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DisassociateVpcCidrBlock", params, optFns, c.addOperationDisassociateVpcCidrBlockMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DisassociateVpcCidrBlockOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DisassociateVpcCidrBlockInput struct {
+
+ // The association ID for the CIDR block.
+ //
+ // This member is required.
+ AssociationId *string
+
+ noSmithyDocumentSerde
+}
+
+type DisassociateVpcCidrBlockOutput struct {
+
+ // Information about the IPv4 CIDR block association.
+ CidrBlockAssociation *types.VpcCidrBlockAssociation
+
+ // Information about the IPv6 CIDR block association.
+ Ipv6CidrBlockAssociation *types.VpcIpv6CidrBlockAssociation
+
+ // The ID of the VPC.
+ VpcId *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDisassociateVpcCidrBlockMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpDisassociateVpcCidrBlock{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpDisassociateVpcCidrBlock{}, 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 = addOpDisassociateVpcCidrBlockValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisassociateVpcCidrBlock(options.Region), middleware.Before); 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_opDisassociateVpcCidrBlock(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "DisassociateVpcCidrBlock",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_EnableEbsEncryptionByDefault.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_EnableEbsEncryptionByDefault.go
new file mode 100644
index 00000000..0edf76bf
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_EnableEbsEncryptionByDefault.go
@@ -0,0 +1,129 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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"
+)
+
+// Enables EBS encryption by default for your account in the current Region. After
+// you enable encryption by default, the EBS volumes that you create are always
+// encrypted, either using the default KMS key or the KMS key that you specified
+// when you created each volume. For more information, see Amazon EBS encryption
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html) in the
+// Amazon Elastic Compute Cloud User Guide. You can specify the default KMS key for
+// encryption by default using ModifyEbsDefaultKmsKeyId or ResetEbsDefaultKmsKeyId.
+// Enabling encryption by default has no effect on the encryption status of your
+// existing volumes. After you enable encryption by default, you can no longer
+// launch instances using instance types that do not support encryption. For more
+// information, see Supported instance types
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html#EBSEncryption_supported_instances).
+func (c *Client) EnableEbsEncryptionByDefault(ctx context.Context, params *EnableEbsEncryptionByDefaultInput, optFns ...func(*Options)) (*EnableEbsEncryptionByDefaultOutput, error) {
+ if params == nil {
+ params = &EnableEbsEncryptionByDefaultInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "EnableEbsEncryptionByDefault", params, optFns, c.addOperationEnableEbsEncryptionByDefaultMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*EnableEbsEncryptionByDefaultOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type EnableEbsEncryptionByDefaultInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type EnableEbsEncryptionByDefaultOutput struct {
+
+ // The updated status of encryption by default.
+ EbsEncryptionByDefault *bool
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationEnableEbsEncryptionByDefaultMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpEnableEbsEncryptionByDefault{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpEnableEbsEncryptionByDefault{}, 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_opEnableEbsEncryptionByDefault(options.Region), middleware.Before); 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_opEnableEbsEncryptionByDefault(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "EnableEbsEncryptionByDefault",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_EnableFastSnapshotRestores.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_EnableFastSnapshotRestores.go
new file mode 100644
index 00000000..b1bd03a7
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_EnableFastSnapshotRestores.go
@@ -0,0 +1,146 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Enables fast snapshot restores for the specified snapshots in the specified
+// Availability Zones. You get the full benefit of fast snapshot restores after
+// they enter the enabled state. To get the current state of fast snapshot
+// restores, use DescribeFastSnapshotRestores. To disable fast snapshot restores,
+// use DisableFastSnapshotRestores. For more information, see Amazon EBS fast
+// snapshot restore
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-fast-snapshot-restore.html)
+// in the Amazon Elastic Compute Cloud User Guide.
+func (c *Client) EnableFastSnapshotRestores(ctx context.Context, params *EnableFastSnapshotRestoresInput, optFns ...func(*Options)) (*EnableFastSnapshotRestoresOutput, error) {
+ if params == nil {
+ params = &EnableFastSnapshotRestoresInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "EnableFastSnapshotRestores", params, optFns, c.addOperationEnableFastSnapshotRestoresMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*EnableFastSnapshotRestoresOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type EnableFastSnapshotRestoresInput struct {
+
+ // One or more Availability Zones. For example, us-east-2a.
+ //
+ // This member is required.
+ AvailabilityZones []string
+
+ // The IDs of one or more snapshots. For example, snap-1234567890abcdef0. You can
+ // specify a snapshot that was shared with you from another Amazon Web Services
+ // account.
+ //
+ // This member is required.
+ SourceSnapshotIds []string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type EnableFastSnapshotRestoresOutput struct {
+
+ // Information about the snapshots for which fast snapshot restores were
+ // successfully enabled.
+ Successful []types.EnableFastSnapshotRestoreSuccessItem
+
+ // Information about the snapshots for which fast snapshot restores could not be
+ // enabled.
+ Unsuccessful []types.EnableFastSnapshotRestoreErrorItem
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationEnableFastSnapshotRestoresMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpEnableFastSnapshotRestores{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpEnableFastSnapshotRestores{}, 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 = addOpEnableFastSnapshotRestoresValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opEnableFastSnapshotRestores(options.Region), middleware.Before); 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_opEnableFastSnapshotRestores(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "EnableFastSnapshotRestores",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_EnableImageDeprecation.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_EnableImageDeprecation.go
new file mode 100644
index 00000000..c39c82d8
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_EnableImageDeprecation.go
@@ -0,0 +1,138 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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"
+ "time"
+)
+
+// Enables deprecation of the specified AMI at the specified date and time. For
+// more information, see Deprecate an AMI
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-deprecate.html) in the
+// Amazon Elastic Compute Cloud User Guide.
+func (c *Client) EnableImageDeprecation(ctx context.Context, params *EnableImageDeprecationInput, optFns ...func(*Options)) (*EnableImageDeprecationOutput, error) {
+ if params == nil {
+ params = &EnableImageDeprecationInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "EnableImageDeprecation", params, optFns, c.addOperationEnableImageDeprecationMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*EnableImageDeprecationOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type EnableImageDeprecationInput struct {
+
+ // The date and time to deprecate the AMI, in UTC, in the following format:
+ // YYYY-MM-DDTHH:MM:SSZ. If you specify a value for seconds, Amazon EC2 rounds the
+ // seconds to the nearest minute. You can’t specify a date in the past. The upper
+ // limit for DeprecateAt is 10 years from now.
+ //
+ // This member is required.
+ DeprecateAt *time.Time
+
+ // The ID of the AMI.
+ //
+ // This member is required.
+ ImageId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type EnableImageDeprecationOutput struct {
+
+ // Returns true if the request succeeds; otherwise, it returns an error.
+ Return *bool
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationEnableImageDeprecationMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpEnableImageDeprecation{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpEnableImageDeprecation{}, 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 = addOpEnableImageDeprecationValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opEnableImageDeprecation(options.Region), middleware.Before); 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_opEnableImageDeprecation(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "EnableImageDeprecation",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_EnableSerialConsoleAccess.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_EnableSerialConsoleAccess.go
new file mode 100644
index 00000000..7079ad3a
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_EnableSerialConsoleAccess.go
@@ -0,0 +1,124 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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"
+)
+
+// Enables access to the EC2 serial console of all instances for your account. By
+// default, access to the EC2 serial console is disabled for your account. For more
+// information, see Manage account access to the EC2 serial console
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configure-access-to-serial-console.html#serial-console-account-access)
+// in the Amazon EC2 User Guide.
+func (c *Client) EnableSerialConsoleAccess(ctx context.Context, params *EnableSerialConsoleAccessInput, optFns ...func(*Options)) (*EnableSerialConsoleAccessOutput, error) {
+ if params == nil {
+ params = &EnableSerialConsoleAccessInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "EnableSerialConsoleAccess", params, optFns, c.addOperationEnableSerialConsoleAccessMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*EnableSerialConsoleAccessOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type EnableSerialConsoleAccessInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type EnableSerialConsoleAccessOutput struct {
+
+ // If true, access to the EC2 serial console of all instances is enabled for your
+ // account. If false, access to the EC2 serial console of all instances is disabled
+ // for your account.
+ SerialConsoleAccessEnabled *bool
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationEnableSerialConsoleAccessMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpEnableSerialConsoleAccess{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpEnableSerialConsoleAccess{}, 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_opEnableSerialConsoleAccess(options.Region), middleware.Before); 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_opEnableSerialConsoleAccess(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "EnableSerialConsoleAccess",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_EnableTransitGatewayRouteTablePropagation.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_EnableTransitGatewayRouteTablePropagation.go
new file mode 100644
index 00000000..9fa1542a
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_EnableTransitGatewayRouteTablePropagation.go
@@ -0,0 +1,133 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Enables the specified attachment to propagate routes to the specified
+// propagation route table.
+func (c *Client) EnableTransitGatewayRouteTablePropagation(ctx context.Context, params *EnableTransitGatewayRouteTablePropagationInput, optFns ...func(*Options)) (*EnableTransitGatewayRouteTablePropagationOutput, error) {
+ if params == nil {
+ params = &EnableTransitGatewayRouteTablePropagationInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "EnableTransitGatewayRouteTablePropagation", params, optFns, c.addOperationEnableTransitGatewayRouteTablePropagationMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*EnableTransitGatewayRouteTablePropagationOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type EnableTransitGatewayRouteTablePropagationInput struct {
+
+ // The ID of the attachment.
+ //
+ // This member is required.
+ TransitGatewayAttachmentId *string
+
+ // The ID of the propagation route table.
+ //
+ // This member is required.
+ TransitGatewayRouteTableId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type EnableTransitGatewayRouteTablePropagationOutput struct {
+
+ // Information about route propagation.
+ Propagation *types.TransitGatewayPropagation
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationEnableTransitGatewayRouteTablePropagationMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpEnableTransitGatewayRouteTablePropagation{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpEnableTransitGatewayRouteTablePropagation{}, 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 = addOpEnableTransitGatewayRouteTablePropagationValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opEnableTransitGatewayRouteTablePropagation(options.Region), middleware.Before); 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_opEnableTransitGatewayRouteTablePropagation(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "EnableTransitGatewayRouteTablePropagation",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_EnableVgwRoutePropagation.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_EnableVgwRoutePropagation.go
new file mode 100644
index 00000000..94112843
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_EnableVgwRoutePropagation.go
@@ -0,0 +1,132 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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"
+)
+
+// Enables a virtual private gateway (VGW) to propagate routes to the specified
+// route table of a VPC.
+func (c *Client) EnableVgwRoutePropagation(ctx context.Context, params *EnableVgwRoutePropagationInput, optFns ...func(*Options)) (*EnableVgwRoutePropagationOutput, error) {
+ if params == nil {
+ params = &EnableVgwRoutePropagationInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "EnableVgwRoutePropagation", params, optFns, c.addOperationEnableVgwRoutePropagationMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*EnableVgwRoutePropagationOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+// Contains the parameters for EnableVgwRoutePropagation.
+type EnableVgwRoutePropagationInput struct {
+
+ // The ID of the virtual private gateway that is attached to a VPC. The virtual
+ // private gateway must be attached to the same VPC that the routing tables are
+ // associated with.
+ //
+ // This member is required.
+ GatewayId *string
+
+ // The ID of the route table. The routing table must be associated with the same
+ // VPC that the virtual private gateway is attached to.
+ //
+ // This member is required.
+ RouteTableId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type EnableVgwRoutePropagationOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationEnableVgwRoutePropagationMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpEnableVgwRoutePropagation{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpEnableVgwRoutePropagation{}, 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 = addOpEnableVgwRoutePropagationValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opEnableVgwRoutePropagation(options.Region), middleware.Before); 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_opEnableVgwRoutePropagation(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "EnableVgwRoutePropagation",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_EnableVolumeIO.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_EnableVolumeIO.go
new file mode 100644
index 00000000..9c752b9d
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_EnableVolumeIO.go
@@ -0,0 +1,123 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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"
+)
+
+// Enables I/O operations for a volume that had I/O operations disabled because the
+// data on the volume was potentially inconsistent.
+func (c *Client) EnableVolumeIO(ctx context.Context, params *EnableVolumeIOInput, optFns ...func(*Options)) (*EnableVolumeIOOutput, error) {
+ if params == nil {
+ params = &EnableVolumeIOInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "EnableVolumeIO", params, optFns, c.addOperationEnableVolumeIOMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*EnableVolumeIOOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type EnableVolumeIOInput struct {
+
+ // The ID of the volume.
+ //
+ // This member is required.
+ VolumeId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type EnableVolumeIOOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationEnableVolumeIOMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpEnableVolumeIO{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpEnableVolumeIO{}, 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 = addOpEnableVolumeIOValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opEnableVolumeIO(options.Region), middleware.Before); 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_opEnableVolumeIO(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "EnableVolumeIO",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_EnableVpcClassicLink.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_EnableVpcClassicLink.go
new file mode 100644
index 00000000..1b07ac40
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_EnableVpcClassicLink.go
@@ -0,0 +1,133 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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"
+)
+
+// Enables a VPC for ClassicLink. You can then link EC2-Classic instances to your
+// ClassicLink-enabled VPC to allow communication over private IP addresses. You
+// cannot enable your VPC for ClassicLink if any of your VPC route tables have
+// existing routes for address ranges within the 10.0.0.0/8 IP address range,
+// excluding local routes for VPCs in the 10.0.0.0/16 and 10.1.0.0/16 IP address
+// ranges. For more information, see ClassicLink
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html) in
+// the Amazon Elastic Compute Cloud User Guide.
+func (c *Client) EnableVpcClassicLink(ctx context.Context, params *EnableVpcClassicLinkInput, optFns ...func(*Options)) (*EnableVpcClassicLinkOutput, error) {
+ if params == nil {
+ params = &EnableVpcClassicLinkInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "EnableVpcClassicLink", params, optFns, c.addOperationEnableVpcClassicLinkMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*EnableVpcClassicLinkOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type EnableVpcClassicLinkInput struct {
+
+ // The ID of the VPC.
+ //
+ // This member is required.
+ VpcId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type EnableVpcClassicLinkOutput struct {
+
+ // Returns true if the request succeeds; otherwise, it returns an error.
+ Return *bool
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationEnableVpcClassicLinkMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpEnableVpcClassicLink{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpEnableVpcClassicLink{}, 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 = addOpEnableVpcClassicLinkValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opEnableVpcClassicLink(options.Region), middleware.Before); 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_opEnableVpcClassicLink(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "EnableVpcClassicLink",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_EnableVpcClassicLinkDnsSupport.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_EnableVpcClassicLinkDnsSupport.go
new file mode 100644
index 00000000..922caf3f
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_EnableVpcClassicLinkDnsSupport.go
@@ -0,0 +1,123 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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"
+)
+
+// Enables a VPC to support DNS hostname resolution for ClassicLink. If enabled,
+// the DNS hostname of a linked EC2-Classic instance resolves to its private IP
+// address when addressed from an instance in the VPC to which it's linked.
+// Similarly, the DNS hostname of an instance in a VPC resolves to its private IP
+// address when addressed from a linked EC2-Classic instance. For more information,
+// see ClassicLink
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html) in
+// the Amazon Elastic Compute Cloud User Guide. You must specify a VPC ID in the
+// request.
+func (c *Client) EnableVpcClassicLinkDnsSupport(ctx context.Context, params *EnableVpcClassicLinkDnsSupportInput, optFns ...func(*Options)) (*EnableVpcClassicLinkDnsSupportOutput, error) {
+ if params == nil {
+ params = &EnableVpcClassicLinkDnsSupportInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "EnableVpcClassicLinkDnsSupport", params, optFns, c.addOperationEnableVpcClassicLinkDnsSupportMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*EnableVpcClassicLinkDnsSupportOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type EnableVpcClassicLinkDnsSupportInput struct {
+
+ // The ID of the VPC.
+ VpcId *string
+
+ noSmithyDocumentSerde
+}
+
+type EnableVpcClassicLinkDnsSupportOutput struct {
+
+ // Returns true if the request succeeds; otherwise, it returns an error.
+ Return *bool
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationEnableVpcClassicLinkDnsSupportMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpEnableVpcClassicLinkDnsSupport{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpEnableVpcClassicLinkDnsSupport{}, 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_opEnableVpcClassicLinkDnsSupport(options.Region), middleware.Before); 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_opEnableVpcClassicLinkDnsSupport(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "EnableVpcClassicLinkDnsSupport",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ExportClientVpnClientCertificateRevocationList.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ExportClientVpnClientCertificateRevocationList.go
new file mode 100644
index 00000000..e86f765f
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ExportClientVpnClientCertificateRevocationList.go
@@ -0,0 +1,131 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Downloads the client certificate revocation list for the specified Client VPN
+// endpoint.
+func (c *Client) ExportClientVpnClientCertificateRevocationList(ctx context.Context, params *ExportClientVpnClientCertificateRevocationListInput, optFns ...func(*Options)) (*ExportClientVpnClientCertificateRevocationListOutput, error) {
+ if params == nil {
+ params = &ExportClientVpnClientCertificateRevocationListInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ExportClientVpnClientCertificateRevocationList", params, optFns, c.addOperationExportClientVpnClientCertificateRevocationListMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ExportClientVpnClientCertificateRevocationListOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ExportClientVpnClientCertificateRevocationListInput struct {
+
+ // The ID of the Client VPN endpoint.
+ //
+ // This member is required.
+ ClientVpnEndpointId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type ExportClientVpnClientCertificateRevocationListOutput struct {
+
+ // Information about the client certificate revocation list.
+ CertificateRevocationList *string
+
+ // The current state of the client certificate revocation list.
+ Status *types.ClientCertificateRevocationListStatus
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationExportClientVpnClientCertificateRevocationListMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpExportClientVpnClientCertificateRevocationList{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpExportClientVpnClientCertificateRevocationList{}, 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 = addOpExportClientVpnClientCertificateRevocationListValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opExportClientVpnClientCertificateRevocationList(options.Region), middleware.Before); 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_opExportClientVpnClientCertificateRevocationList(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "ExportClientVpnClientCertificateRevocationList",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ExportClientVpnClientConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ExportClientVpnClientConfiguration.go
new file mode 100644
index 00000000..061ab32c
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ExportClientVpnClientConfiguration.go
@@ -0,0 +1,129 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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"
+)
+
+// Downloads the contents of the Client VPN endpoint configuration file for the
+// specified Client VPN endpoint. The Client VPN endpoint configuration file
+// includes the Client VPN endpoint and certificate information clients need to
+// establish a connection with the Client VPN endpoint.
+func (c *Client) ExportClientVpnClientConfiguration(ctx context.Context, params *ExportClientVpnClientConfigurationInput, optFns ...func(*Options)) (*ExportClientVpnClientConfigurationOutput, error) {
+ if params == nil {
+ params = &ExportClientVpnClientConfigurationInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ExportClientVpnClientConfiguration", params, optFns, c.addOperationExportClientVpnClientConfigurationMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ExportClientVpnClientConfigurationOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ExportClientVpnClientConfigurationInput struct {
+
+ // The ID of the Client VPN endpoint.
+ //
+ // This member is required.
+ ClientVpnEndpointId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type ExportClientVpnClientConfigurationOutput struct {
+
+ // The contents of the Client VPN endpoint configuration file.
+ ClientConfiguration *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationExportClientVpnClientConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpExportClientVpnClientConfiguration{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpExportClientVpnClientConfiguration{}, 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 = addOpExportClientVpnClientConfigurationValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opExportClientVpnClientConfiguration(options.Region), middleware.Before); 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_opExportClientVpnClientConfiguration(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "ExportClientVpnClientConfiguration",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ExportImage.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ExportImage.go
new file mode 100644
index 00000000..b4742cce
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ExportImage.go
@@ -0,0 +1,222 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Exports an Amazon Machine Image (AMI) to a VM file. For more information, see
+// Exporting a VM directly from an Amazon Machine Image (AMI)
+// (https://docs.aws.amazon.com/vm-import/latest/userguide/vmexport_image.html) in
+// the VM Import/Export User Guide.
+func (c *Client) ExportImage(ctx context.Context, params *ExportImageInput, optFns ...func(*Options)) (*ExportImageOutput, error) {
+ if params == nil {
+ params = &ExportImageInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ExportImage", params, optFns, c.addOperationExportImageMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ExportImageOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ExportImageInput struct {
+
+ // The disk image format.
+ //
+ // This member is required.
+ DiskImageFormat types.DiskImageFormat
+
+ // The ID of the image.
+ //
+ // This member is required.
+ ImageId *string
+
+ // Information about the destination Amazon S3 bucket. The bucket must exist and
+ // grant WRITE and READ_ACP permissions to the Amazon Web Services account
+ // vm-import-export@amazon.com.
+ //
+ // This member is required.
+ S3ExportLocation *types.ExportTaskS3LocationRequest
+
+ // Token to enable idempotency for export image requests.
+ ClientToken *string
+
+ // A description of the image being exported. The maximum length is 255 characters.
+ Description *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The name of the role that grants VM Import/Export permission to export images to
+ // your Amazon S3 bucket. If this parameter is not specified, the default role is
+ // named 'vmimport'.
+ RoleName *string
+
+ // The tags to apply to the export image task during creation.
+ TagSpecifications []types.TagSpecification
+
+ noSmithyDocumentSerde
+}
+
+type ExportImageOutput struct {
+
+ // A description of the image being exported.
+ Description *string
+
+ // The disk image format for the exported image.
+ DiskImageFormat types.DiskImageFormat
+
+ // The ID of the export image task.
+ ExportImageTaskId *string
+
+ // The ID of the image.
+ ImageId *string
+
+ // The percent complete of the export image task.
+ Progress *string
+
+ // The name of the role that grants VM Import/Export permission to export images to
+ // your Amazon S3 bucket.
+ RoleName *string
+
+ // Information about the destination Amazon S3 bucket.
+ S3ExportLocation *types.ExportTaskS3Location
+
+ // The status of the export image task. The possible values are active, completed,
+ // deleting, and deleted.
+ Status *string
+
+ // The status message for the export image task.
+ StatusMessage *string
+
+ // Any tags assigned to the export image task.
+ Tags []types.Tag
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationExportImageMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpExportImage{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpExportImage{}, 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 = addIdempotencyToken_opExportImageMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpExportImageValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opExportImage(options.Region), middleware.Before); 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
+}
+
+type idempotencyToken_initializeOpExportImage struct {
+ tokenProvider IdempotencyTokenProvider
+}
+
+func (*idempotencyToken_initializeOpExportImage) ID() string {
+ return "OperationIdempotencyTokenAutoFill"
+}
+
+func (m *idempotencyToken_initializeOpExportImage) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ if m.tokenProvider == nil {
+ return next.HandleInitialize(ctx, in)
+ }
+
+ input, ok := in.Parameters.(*ExportImageInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("expected middleware input to be of type *ExportImageInput ")
+ }
+
+ if input.ClientToken == nil {
+ t, err := m.tokenProvider.GetIdempotencyToken()
+ if err != nil {
+ return out, metadata, err
+ }
+ input.ClientToken = &t
+ }
+ return next.HandleInitialize(ctx, in)
+}
+func addIdempotencyToken_opExportImageMiddleware(stack *middleware.Stack, cfg Options) error {
+ return stack.Initialize.Add(&idempotencyToken_initializeOpExportImage{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before)
+}
+
+func newServiceMetadataMiddleware_opExportImage(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "ExportImage",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ExportTransitGatewayRoutes.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ExportTransitGatewayRoutes.go
new file mode 100644
index 00000000..b411b593
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ExportTransitGatewayRoutes.go
@@ -0,0 +1,170 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Exports routes from the specified transit gateway route table to the specified
+// S3 bucket. By default, all routes are exported. Alternatively, you can filter by
+// CIDR range. The routes are saved to the specified bucket in a JSON file. For
+// more information, see Export Route Tables to Amazon S3
+// (https://docs.aws.amazon.com/vpc/latest/tgw/tgw-route-tables.html#tgw-export-route-tables)
+// in Transit Gateways.
+func (c *Client) ExportTransitGatewayRoutes(ctx context.Context, params *ExportTransitGatewayRoutesInput, optFns ...func(*Options)) (*ExportTransitGatewayRoutesOutput, error) {
+ if params == nil {
+ params = &ExportTransitGatewayRoutesInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ExportTransitGatewayRoutes", params, optFns, c.addOperationExportTransitGatewayRoutesMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ExportTransitGatewayRoutesOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ExportTransitGatewayRoutesInput struct {
+
+ // The name of the S3 bucket.
+ //
+ // This member is required.
+ S3Bucket *string
+
+ // The ID of the route table.
+ //
+ // This member is required.
+ TransitGatewayRouteTableId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // One or more filters. The possible values are:
+ //
+ // *
+ // attachment.transit-gateway-attachment-id - The id of the transit gateway
+ // attachment.
+ //
+ // * attachment.resource-id - The resource id of the transit gateway
+ // attachment.
+ //
+ // * route-search.exact-match - The exact match of the specified
+ // filter.
+ //
+ // * route-search.longest-prefix-match - The longest prefix that matches
+ // the route.
+ //
+ // * route-search.subnet-of-match - The routes with a subnet that match
+ // the specified CIDR filter.
+ //
+ // * route-search.supernet-of-match - The routes with a
+ // CIDR that encompass the CIDR filter. For example, if you have 10.0.1.0/29 and
+ // 10.0.1.0/31 routes in your route table and you specify supernet-of-match as
+ // 10.0.1.0/30, then the result returns 10.0.1.0/29.
+ //
+ // * state - The state of the
+ // route (active | blackhole).
+ //
+ // * transit-gateway-route-destination-cidr-block -
+ // The CIDR range.
+ //
+ // * type - The type of route (propagated | static).
+ Filters []types.Filter
+
+ noSmithyDocumentSerde
+}
+
+type ExportTransitGatewayRoutesOutput struct {
+
+ // The URL of the exported file in Amazon S3. For example,
+ // s3://bucket_name/VPCTransitGateway/TransitGatewayRouteTables/file_name.
+ S3Location *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationExportTransitGatewayRoutesMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpExportTransitGatewayRoutes{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpExportTransitGatewayRoutes{}, 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 = addOpExportTransitGatewayRoutesValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opExportTransitGatewayRoutes(options.Region), middleware.Before); 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_opExportTransitGatewayRoutes(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "ExportTransitGatewayRoutes",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetAssociatedEnclaveCertificateIamRoles.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetAssociatedEnclaveCertificateIamRoles.go
new file mode 100644
index 00000000..c4e79077
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetAssociatedEnclaveCertificateIamRoles.go
@@ -0,0 +1,127 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Returns the IAM roles that are associated with the specified ACM (ACM)
+// certificate. It also returns the name of the Amazon S3 bucket and the Amazon S3
+// object key where the certificate, certificate chain, and encrypted private key
+// bundle are stored, and the ARN of the KMS key that's used to encrypt the private
+// key.
+func (c *Client) GetAssociatedEnclaveCertificateIamRoles(ctx context.Context, params *GetAssociatedEnclaveCertificateIamRolesInput, optFns ...func(*Options)) (*GetAssociatedEnclaveCertificateIamRolesOutput, error) {
+ if params == nil {
+ params = &GetAssociatedEnclaveCertificateIamRolesInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetAssociatedEnclaveCertificateIamRoles", params, optFns, c.addOperationGetAssociatedEnclaveCertificateIamRolesMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetAssociatedEnclaveCertificateIamRolesOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type GetAssociatedEnclaveCertificateIamRolesInput struct {
+
+ // The ARN of the ACM certificate for which to view the associated IAM roles,
+ // encryption keys, and Amazon S3 object information.
+ CertificateArn *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type GetAssociatedEnclaveCertificateIamRolesOutput struct {
+
+ // Information about the associated IAM roles.
+ AssociatedRoles []types.AssociatedRole
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationGetAssociatedEnclaveCertificateIamRolesMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpGetAssociatedEnclaveCertificateIamRoles{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpGetAssociatedEnclaveCertificateIamRoles{}, 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_opGetAssociatedEnclaveCertificateIamRoles(options.Region), middleware.Before); 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_opGetAssociatedEnclaveCertificateIamRoles(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "GetAssociatedEnclaveCertificateIamRoles",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetAssociatedIpv6PoolCidrs.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetAssociatedIpv6PoolCidrs.go
new file mode 100644
index 00000000..34ee9985
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetAssociatedIpv6PoolCidrs.go
@@ -0,0 +1,230 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Gets information about the IPv6 CIDR block associations for a specified IPv6
+// address pool.
+func (c *Client) GetAssociatedIpv6PoolCidrs(ctx context.Context, params *GetAssociatedIpv6PoolCidrsInput, optFns ...func(*Options)) (*GetAssociatedIpv6PoolCidrsOutput, error) {
+ if params == nil {
+ params = &GetAssociatedIpv6PoolCidrsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetAssociatedIpv6PoolCidrs", params, optFns, c.addOperationGetAssociatedIpv6PoolCidrsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetAssociatedIpv6PoolCidrsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type GetAssociatedIpv6PoolCidrsInput struct {
+
+ // The ID of the IPv6 address pool.
+ //
+ // This member is required.
+ PoolId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ MaxResults *int32
+
+ // The token for the next page of results.
+ NextToken *string
+
+ noSmithyDocumentSerde
+}
+
+type GetAssociatedIpv6PoolCidrsOutput struct {
+
+ // Information about the IPv6 CIDR block associations.
+ Ipv6CidrAssociations []types.Ipv6CidrAssociation
+
+ // The token to use to retrieve the next page of results. This value is null when
+ // there are no more results to return.
+ NextToken *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationGetAssociatedIpv6PoolCidrsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpGetAssociatedIpv6PoolCidrs{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpGetAssociatedIpv6PoolCidrs{}, 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 = addOpGetAssociatedIpv6PoolCidrsValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetAssociatedIpv6PoolCidrs(options.Region), middleware.Before); 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
+}
+
+// GetAssociatedIpv6PoolCidrsAPIClient is a client that implements the
+// GetAssociatedIpv6PoolCidrs operation.
+type GetAssociatedIpv6PoolCidrsAPIClient interface {
+ GetAssociatedIpv6PoolCidrs(context.Context, *GetAssociatedIpv6PoolCidrsInput, ...func(*Options)) (*GetAssociatedIpv6PoolCidrsOutput, error)
+}
+
+var _ GetAssociatedIpv6PoolCidrsAPIClient = (*Client)(nil)
+
+// GetAssociatedIpv6PoolCidrsPaginatorOptions is the paginator options for
+// GetAssociatedIpv6PoolCidrs
+type GetAssociatedIpv6PoolCidrsPaginatorOptions struct {
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ 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
+}
+
+// GetAssociatedIpv6PoolCidrsPaginator is a paginator for
+// GetAssociatedIpv6PoolCidrs
+type GetAssociatedIpv6PoolCidrsPaginator struct {
+ options GetAssociatedIpv6PoolCidrsPaginatorOptions
+ client GetAssociatedIpv6PoolCidrsAPIClient
+ params *GetAssociatedIpv6PoolCidrsInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewGetAssociatedIpv6PoolCidrsPaginator returns a new
+// GetAssociatedIpv6PoolCidrsPaginator
+func NewGetAssociatedIpv6PoolCidrsPaginator(client GetAssociatedIpv6PoolCidrsAPIClient, params *GetAssociatedIpv6PoolCidrsInput, optFns ...func(*GetAssociatedIpv6PoolCidrsPaginatorOptions)) *GetAssociatedIpv6PoolCidrsPaginator {
+ if params == nil {
+ params = &GetAssociatedIpv6PoolCidrsInput{}
+ }
+
+ options := GetAssociatedIpv6PoolCidrsPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &GetAssociatedIpv6PoolCidrsPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *GetAssociatedIpv6PoolCidrsPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next GetAssociatedIpv6PoolCidrs page.
+func (p *GetAssociatedIpv6PoolCidrsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*GetAssociatedIpv6PoolCidrsOutput, 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.GetAssociatedIpv6PoolCidrs(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_opGetAssociatedIpv6PoolCidrs(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "GetAssociatedIpv6PoolCidrs",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetCapacityReservationUsage.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetCapacityReservationUsage.go
new file mode 100644
index 00000000..0b2105ab
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetCapacityReservationUsage.go
@@ -0,0 +1,181 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Gets usage information about a Capacity Reservation. If the Capacity Reservation
+// is shared, it shows usage information for the Capacity Reservation owner and
+// each Amazon Web Services account that is currently using the shared capacity. If
+// the Capacity Reservation is not shared, it shows only the Capacity Reservation
+// owner's usage.
+func (c *Client) GetCapacityReservationUsage(ctx context.Context, params *GetCapacityReservationUsageInput, optFns ...func(*Options)) (*GetCapacityReservationUsageOutput, error) {
+ if params == nil {
+ params = &GetCapacityReservationUsageInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetCapacityReservationUsage", params, optFns, c.addOperationGetCapacityReservationUsageMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetCapacityReservationUsageOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type GetCapacityReservationUsageInput struct {
+
+ // The ID of the Capacity Reservation.
+ //
+ // This member is required.
+ CapacityReservationId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The maximum number of results to return for the request in a single page. The
+ // remaining results can be seen by sending another request with the returned
+ // nextToken value. This value can be between 5 and 500. If maxResults is given a
+ // larger value than 500, you receive an error. Valid range: Minimum value of 1.
+ // Maximum value of 1000.
+ MaxResults *int32
+
+ // The token to use to retrieve the next page of results.
+ NextToken *string
+
+ noSmithyDocumentSerde
+}
+
+type GetCapacityReservationUsageOutput struct {
+
+ // The remaining capacity. Indicates the number of instances that can be launched
+ // in the Capacity Reservation.
+ AvailableInstanceCount *int32
+
+ // The ID of the Capacity Reservation.
+ CapacityReservationId *string
+
+ // The type of instance for which the Capacity Reservation reserves capacity.
+ InstanceType *string
+
+ // Information about the Capacity Reservation usage.
+ InstanceUsages []types.InstanceUsage
+
+ // The token to use to retrieve the next page of results. This value is null when
+ // there are no more results to return.
+ NextToken *string
+
+ // The current state of the Capacity Reservation. A Capacity Reservation can be in
+ // one of the following states:
+ //
+ // * active - The Capacity Reservation is active and
+ // the capacity is available for your use.
+ //
+ // * expired - The Capacity Reservation
+ // expired automatically at the date and time specified in your request. The
+ // reserved capacity is no longer available for your use.
+ //
+ // * cancelled - The
+ // Capacity Reservation was cancelled. The reserved capacity is no longer available
+ // for your use.
+ //
+ // * pending - The Capacity Reservation request was successful but
+ // the capacity provisioning is still pending.
+ //
+ // * failed - The Capacity Reservation
+ // request has failed. A request might fail due to invalid request parameters,
+ // capacity constraints, or instance limit constraints. Failed requests are
+ // retained for 60 minutes.
+ State types.CapacityReservationState
+
+ // The number of instances for which the Capacity Reservation reserves capacity.
+ TotalInstanceCount *int32
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationGetCapacityReservationUsageMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpGetCapacityReservationUsage{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpGetCapacityReservationUsage{}, 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 = addOpGetCapacityReservationUsageValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetCapacityReservationUsage(options.Region), middleware.Before); 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_opGetCapacityReservationUsage(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "GetCapacityReservationUsage",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetCoipPoolUsage.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetCoipPoolUsage.go
new file mode 100644
index 00000000..3c383a46
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetCoipPoolUsage.go
@@ -0,0 +1,153 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes the allocations from the specified customer-owned address pool.
+func (c *Client) GetCoipPoolUsage(ctx context.Context, params *GetCoipPoolUsageInput, optFns ...func(*Options)) (*GetCoipPoolUsageOutput, error) {
+ if params == nil {
+ params = &GetCoipPoolUsageInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetCoipPoolUsage", params, optFns, c.addOperationGetCoipPoolUsageMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetCoipPoolUsageOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type GetCoipPoolUsageInput struct {
+
+ // The ID of the address pool.
+ //
+ // This member is required.
+ PoolId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The filters. The following are the possible values:
+ //
+ // *
+ // coip-address-usage.allocation-id
+ //
+ // * coip-address-usage.aws-account-id
+ //
+ // *
+ // coip-address-usage.aws-service
+ //
+ // * coip-address-usage.co-ip
+ Filters []types.Filter
+
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ MaxResults *int32
+
+ // The token for the next page of results.
+ NextToken *string
+
+ noSmithyDocumentSerde
+}
+
+type GetCoipPoolUsageOutput struct {
+
+ // Information about the address usage.
+ CoipAddressUsages []types.CoipAddressUsage
+
+ // The ID of the customer-owned address pool.
+ CoipPoolId *string
+
+ // The ID of the local gateway route table.
+ LocalGatewayRouteTableId *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationGetCoipPoolUsageMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpGetCoipPoolUsage{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpGetCoipPoolUsage{}, 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 = addOpGetCoipPoolUsageValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetCoipPoolUsage(options.Region), middleware.Before); 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_opGetCoipPoolUsage(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "GetCoipPoolUsage",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetConsoleOutput.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetConsoleOutput.go
new file mode 100644
index 00000000..de234a68
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetConsoleOutput.go
@@ -0,0 +1,150 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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"
+ "time"
+)
+
+// Gets the console output for the specified instance. For Linux instances, the
+// instance console output displays the exact console output that would normally be
+// displayed on a physical monitor attached to a computer. For Windows instances,
+// the instance console output includes the last three system event log errors. By
+// default, the console output returns buffered information that was posted shortly
+// after an instance transition state (start, stop, reboot, or terminate). This
+// information is available for at least one hour after the most recent post. Only
+// the most recent 64 KB of console output is available. You can optionally
+// retrieve the latest serial console output at any time during the instance
+// lifecycle. This option is supported on instance types that use the Nitro
+// hypervisor. For more information, see Instance console output
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-console.html#instance-console-console-output)
+// in the Amazon EC2 User Guide.
+func (c *Client) GetConsoleOutput(ctx context.Context, params *GetConsoleOutputInput, optFns ...func(*Options)) (*GetConsoleOutputOutput, error) {
+ if params == nil {
+ params = &GetConsoleOutputInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetConsoleOutput", params, optFns, c.addOperationGetConsoleOutputMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetConsoleOutputOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type GetConsoleOutputInput struct {
+
+ // The ID of the instance.
+ //
+ // This member is required.
+ InstanceId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // When enabled, retrieves the latest console output for the instance. Default:
+ // disabled (false)
+ Latest *bool
+
+ noSmithyDocumentSerde
+}
+
+type GetConsoleOutputOutput struct {
+
+ // The ID of the instance.
+ InstanceId *string
+
+ // The console output, base64-encoded. If you are using a command line tool, the
+ // tool decodes the output for you.
+ Output *string
+
+ // The time at which the output was last updated.
+ Timestamp *time.Time
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationGetConsoleOutputMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpGetConsoleOutput{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpGetConsoleOutput{}, 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 = addOpGetConsoleOutputValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetConsoleOutput(options.Region), middleware.Before); 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_opGetConsoleOutput(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "GetConsoleOutput",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetConsoleScreenshot.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetConsoleScreenshot.go
new file mode 100644
index 00000000..8dda68ee
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetConsoleScreenshot.go
@@ -0,0 +1,134 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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"
+)
+
+// Retrieve a JPG-format screenshot of a running instance to help with
+// troubleshooting. The returned content is Base64-encoded.
+func (c *Client) GetConsoleScreenshot(ctx context.Context, params *GetConsoleScreenshotInput, optFns ...func(*Options)) (*GetConsoleScreenshotOutput, error) {
+ if params == nil {
+ params = &GetConsoleScreenshotInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetConsoleScreenshot", params, optFns, c.addOperationGetConsoleScreenshotMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetConsoleScreenshotOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type GetConsoleScreenshotInput struct {
+
+ // The ID of the instance.
+ //
+ // This member is required.
+ InstanceId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // When set to true, acts as keystroke input and wakes up an instance that's in
+ // standby or "sleep" mode.
+ WakeUp *bool
+
+ noSmithyDocumentSerde
+}
+
+type GetConsoleScreenshotOutput struct {
+
+ // The data that comprises the image.
+ ImageData *string
+
+ // The ID of the instance.
+ InstanceId *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationGetConsoleScreenshotMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpGetConsoleScreenshot{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpGetConsoleScreenshot{}, 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 = addOpGetConsoleScreenshotValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetConsoleScreenshot(options.Region), middleware.Before); 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_opGetConsoleScreenshot(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "GetConsoleScreenshot",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetDefaultCreditSpecification.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetDefaultCreditSpecification.go
new file mode 100644
index 00000000..438d7d01
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetDefaultCreditSpecification.go
@@ -0,0 +1,130 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Describes the default credit option for CPU usage of a burstable performance
+// instance family. For more information, see Burstable performance instances
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-performance-instances.html)
+// in the Amazon EC2 User Guide.
+func (c *Client) GetDefaultCreditSpecification(ctx context.Context, params *GetDefaultCreditSpecificationInput, optFns ...func(*Options)) (*GetDefaultCreditSpecificationOutput, error) {
+ if params == nil {
+ params = &GetDefaultCreditSpecificationInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetDefaultCreditSpecification", params, optFns, c.addOperationGetDefaultCreditSpecificationMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetDefaultCreditSpecificationOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type GetDefaultCreditSpecificationInput struct {
+
+ // The instance family.
+ //
+ // This member is required.
+ InstanceFamily types.UnlimitedSupportedInstanceFamily
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type GetDefaultCreditSpecificationOutput struct {
+
+ // The default credit option for CPU usage of the instance family.
+ InstanceFamilyCreditSpecification *types.InstanceFamilyCreditSpecification
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationGetDefaultCreditSpecificationMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpGetDefaultCreditSpecification{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpGetDefaultCreditSpecification{}, 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 = addOpGetDefaultCreditSpecificationValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetDefaultCreditSpecification(options.Region), middleware.Before); 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_opGetDefaultCreditSpecification(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "GetDefaultCreditSpecification",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetEbsDefaultKmsKeyId.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetEbsDefaultKmsKeyId.go
new file mode 100644
index 00000000..775ea24a
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetEbsDefaultKmsKeyId.go
@@ -0,0 +1,123 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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"
+)
+
+// Describes the default KMS key for EBS encryption by default for your account in
+// this Region. You can change the default KMS key for encryption by default using
+// ModifyEbsDefaultKmsKeyId or ResetEbsDefaultKmsKeyId. For more information, see
+// Amazon EBS encryption
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html) in the
+// Amazon Elastic Compute Cloud User Guide.
+func (c *Client) GetEbsDefaultKmsKeyId(ctx context.Context, params *GetEbsDefaultKmsKeyIdInput, optFns ...func(*Options)) (*GetEbsDefaultKmsKeyIdOutput, error) {
+ if params == nil {
+ params = &GetEbsDefaultKmsKeyIdInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetEbsDefaultKmsKeyId", params, optFns, c.addOperationGetEbsDefaultKmsKeyIdMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetEbsDefaultKmsKeyIdOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type GetEbsDefaultKmsKeyIdInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type GetEbsDefaultKmsKeyIdOutput struct {
+
+ // The Amazon Resource Name (ARN) of the default KMS key for encryption by default.
+ KmsKeyId *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationGetEbsDefaultKmsKeyIdMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpGetEbsDefaultKmsKeyId{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpGetEbsDefaultKmsKeyId{}, 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_opGetEbsDefaultKmsKeyId(options.Region), middleware.Before); 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_opGetEbsDefaultKmsKeyId(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "GetEbsDefaultKmsKeyId",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetEbsEncryptionByDefault.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetEbsEncryptionByDefault.go
new file mode 100644
index 00000000..6e4499eb
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetEbsEncryptionByDefault.go
@@ -0,0 +1,121 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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"
+)
+
+// Describes whether EBS encryption by default is enabled for your account in the
+// current Region. For more information, see Amazon EBS encryption
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html) in the
+// Amazon Elastic Compute Cloud User Guide.
+func (c *Client) GetEbsEncryptionByDefault(ctx context.Context, params *GetEbsEncryptionByDefaultInput, optFns ...func(*Options)) (*GetEbsEncryptionByDefaultOutput, error) {
+ if params == nil {
+ params = &GetEbsEncryptionByDefaultInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetEbsEncryptionByDefault", params, optFns, c.addOperationGetEbsEncryptionByDefaultMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetEbsEncryptionByDefaultOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type GetEbsEncryptionByDefaultInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type GetEbsEncryptionByDefaultOutput struct {
+
+ // Indicates whether encryption by default is enabled.
+ EbsEncryptionByDefault *bool
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationGetEbsEncryptionByDefaultMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpGetEbsEncryptionByDefault{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpGetEbsEncryptionByDefault{}, 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_opGetEbsEncryptionByDefault(options.Region), middleware.Before); 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_opGetEbsEncryptionByDefault(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "GetEbsEncryptionByDefault",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetFlowLogsIntegrationTemplate.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetFlowLogsIntegrationTemplate.go
new file mode 100644
index 00000000..19c6225f
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetFlowLogsIntegrationTemplate.go
@@ -0,0 +1,154 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Generates a CloudFormation template that streamlines and automates the
+// integration of VPC flow logs with Amazon Athena. This make it easier for you to
+// query and gain insights from VPC flow logs data. Based on the information that
+// you provide, we configure resources in the template to do the following:
+//
+// *
+// Create a table in Athena that maps fields to a custom log format
+//
+// * Create a
+// Lambda function that updates the table with new partitions on a daily, weekly,
+// or monthly basis
+//
+// * Create a table partitioned between two timestamps in the
+// past
+//
+// * Create a set of named queries in Athena that you can use to get started
+// quickly
+func (c *Client) GetFlowLogsIntegrationTemplate(ctx context.Context, params *GetFlowLogsIntegrationTemplateInput, optFns ...func(*Options)) (*GetFlowLogsIntegrationTemplateOutput, error) {
+ if params == nil {
+ params = &GetFlowLogsIntegrationTemplateInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetFlowLogsIntegrationTemplate", params, optFns, c.addOperationGetFlowLogsIntegrationTemplateMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetFlowLogsIntegrationTemplateOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type GetFlowLogsIntegrationTemplateInput struct {
+
+ // To store the CloudFormation template in Amazon S3, specify the location in
+ // Amazon S3.
+ //
+ // This member is required.
+ ConfigDeliveryS3DestinationArn *string
+
+ // The ID of the flow log.
+ //
+ // This member is required.
+ FlowLogId *string
+
+ // Information about the service integration.
+ //
+ // This member is required.
+ IntegrateServices *types.IntegrateServices
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type GetFlowLogsIntegrationTemplateOutput struct {
+
+ // The generated CloudFormation template.
+ Result *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationGetFlowLogsIntegrationTemplateMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpGetFlowLogsIntegrationTemplate{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpGetFlowLogsIntegrationTemplate{}, 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 = addOpGetFlowLogsIntegrationTemplateValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetFlowLogsIntegrationTemplate(options.Region), middleware.Before); 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_opGetFlowLogsIntegrationTemplate(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "GetFlowLogsIntegrationTemplate",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetGroupsForCapacityReservation.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetGroupsForCapacityReservation.go
new file mode 100644
index 00000000..098844db
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetGroupsForCapacityReservation.go
@@ -0,0 +1,234 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Lists the resource groups to which a Capacity Reservation has been added.
+func (c *Client) GetGroupsForCapacityReservation(ctx context.Context, params *GetGroupsForCapacityReservationInput, optFns ...func(*Options)) (*GetGroupsForCapacityReservationOutput, error) {
+ if params == nil {
+ params = &GetGroupsForCapacityReservationInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetGroupsForCapacityReservation", params, optFns, c.addOperationGetGroupsForCapacityReservationMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetGroupsForCapacityReservationOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type GetGroupsForCapacityReservationInput struct {
+
+ // The ID of the Capacity Reservation.
+ //
+ // This member is required.
+ CapacityReservationId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The maximum number of results to return for the request in a single page. The
+ // remaining results can be seen by sending another request with the returned
+ // nextToken value. This value can be between 5 and 500. If maxResults is given a
+ // larger value than 500, you receive an error.
+ MaxResults *int32
+
+ // The token to use to retrieve the next page of results.
+ NextToken *string
+
+ noSmithyDocumentSerde
+}
+
+type GetGroupsForCapacityReservationOutput struct {
+
+ // Information about the resource groups to which the Capacity Reservation has been
+ // added.
+ CapacityReservationGroups []types.CapacityReservationGroup
+
+ // The token to use to retrieve the next page of results. This value is null when
+ // there are no more results to return.
+ NextToken *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationGetGroupsForCapacityReservationMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpGetGroupsForCapacityReservation{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpGetGroupsForCapacityReservation{}, 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 = addOpGetGroupsForCapacityReservationValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetGroupsForCapacityReservation(options.Region), middleware.Before); 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
+}
+
+// GetGroupsForCapacityReservationAPIClient is a client that implements the
+// GetGroupsForCapacityReservation operation.
+type GetGroupsForCapacityReservationAPIClient interface {
+ GetGroupsForCapacityReservation(context.Context, *GetGroupsForCapacityReservationInput, ...func(*Options)) (*GetGroupsForCapacityReservationOutput, error)
+}
+
+var _ GetGroupsForCapacityReservationAPIClient = (*Client)(nil)
+
+// GetGroupsForCapacityReservationPaginatorOptions is the paginator options for
+// GetGroupsForCapacityReservation
+type GetGroupsForCapacityReservationPaginatorOptions struct {
+ // The maximum number of results to return for the request in a single page. The
+ // remaining results can be seen by sending another request with the returned
+ // nextToken value. This value can be between 5 and 500. If maxResults is given a
+ // larger value than 500, you receive an error.
+ 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
+}
+
+// GetGroupsForCapacityReservationPaginator is a paginator for
+// GetGroupsForCapacityReservation
+type GetGroupsForCapacityReservationPaginator struct {
+ options GetGroupsForCapacityReservationPaginatorOptions
+ client GetGroupsForCapacityReservationAPIClient
+ params *GetGroupsForCapacityReservationInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewGetGroupsForCapacityReservationPaginator returns a new
+// GetGroupsForCapacityReservationPaginator
+func NewGetGroupsForCapacityReservationPaginator(client GetGroupsForCapacityReservationAPIClient, params *GetGroupsForCapacityReservationInput, optFns ...func(*GetGroupsForCapacityReservationPaginatorOptions)) *GetGroupsForCapacityReservationPaginator {
+ if params == nil {
+ params = &GetGroupsForCapacityReservationInput{}
+ }
+
+ options := GetGroupsForCapacityReservationPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &GetGroupsForCapacityReservationPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *GetGroupsForCapacityReservationPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next GetGroupsForCapacityReservation page.
+func (p *GetGroupsForCapacityReservationPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*GetGroupsForCapacityReservationOutput, 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.GetGroupsForCapacityReservation(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_opGetGroupsForCapacityReservation(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "GetGroupsForCapacityReservation",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetHostReservationPurchasePreview.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetHostReservationPurchasePreview.go
new file mode 100644
index 00000000..2914c0f9
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetHostReservationPurchasePreview.go
@@ -0,0 +1,140 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Preview a reservation purchase with configurations that match those of your
+// Dedicated Host. You must have active Dedicated Hosts in your account before you
+// purchase a reservation. This is a preview of the PurchaseHostReservation action
+// and does not result in the offering being purchased.
+func (c *Client) GetHostReservationPurchasePreview(ctx context.Context, params *GetHostReservationPurchasePreviewInput, optFns ...func(*Options)) (*GetHostReservationPurchasePreviewOutput, error) {
+ if params == nil {
+ params = &GetHostReservationPurchasePreviewInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetHostReservationPurchasePreview", params, optFns, c.addOperationGetHostReservationPurchasePreviewMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetHostReservationPurchasePreviewOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type GetHostReservationPurchasePreviewInput struct {
+
+ // The IDs of the Dedicated Hosts with which the reservation is associated.
+ //
+ // This member is required.
+ HostIdSet []string
+
+ // The offering ID of the reservation.
+ //
+ // This member is required.
+ OfferingId *string
+
+ noSmithyDocumentSerde
+}
+
+type GetHostReservationPurchasePreviewOutput struct {
+
+ // The currency in which the totalUpfrontPrice and totalHourlyPrice amounts are
+ // specified. At this time, the only supported currency is USD.
+ CurrencyCode types.CurrencyCodeValues
+
+ // The purchase information of the Dedicated Host reservation and the Dedicated
+ // Hosts associated with it.
+ Purchase []types.Purchase
+
+ // The potential total hourly price of the reservation per hour.
+ TotalHourlyPrice *string
+
+ // The potential total upfront price. This is billed immediately.
+ TotalUpfrontPrice *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationGetHostReservationPurchasePreviewMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpGetHostReservationPurchasePreview{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpGetHostReservationPurchasePreview{}, 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 = addOpGetHostReservationPurchasePreviewValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetHostReservationPurchasePreview(options.Region), middleware.Before); 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_opGetHostReservationPurchasePreview(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "GetHostReservationPurchasePreview",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetLaunchTemplateData.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetLaunchTemplateData.go
new file mode 100644
index 00000000..27b14d44
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetLaunchTemplateData.go
@@ -0,0 +1,133 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Retrieves the configuration data of the specified instance. You can use this
+// data to create a launch template. This action calls on other describe actions to
+// get instance information. Depending on your instance configuration, you may need
+// to allow the following actions in your IAM policy: DescribeSpotInstanceRequests,
+// DescribeInstanceCreditSpecifications, DescribeVolumes,
+// DescribeInstanceAttribute, and DescribeElasticGpus. Or, you can allow describe*
+// depending on your instance requirements.
+func (c *Client) GetLaunchTemplateData(ctx context.Context, params *GetLaunchTemplateDataInput, optFns ...func(*Options)) (*GetLaunchTemplateDataOutput, error) {
+ if params == nil {
+ params = &GetLaunchTemplateDataInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetLaunchTemplateData", params, optFns, c.addOperationGetLaunchTemplateDataMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetLaunchTemplateDataOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type GetLaunchTemplateDataInput struct {
+
+ // The ID of the instance.
+ //
+ // This member is required.
+ InstanceId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type GetLaunchTemplateDataOutput struct {
+
+ // The instance data.
+ LaunchTemplateData *types.ResponseLaunchTemplateData
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationGetLaunchTemplateDataMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpGetLaunchTemplateData{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpGetLaunchTemplateData{}, 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 = addOpGetLaunchTemplateDataValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetLaunchTemplateData(options.Region), middleware.Before); 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_opGetLaunchTemplateData(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "GetLaunchTemplateData",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetManagedPrefixListAssociations.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetManagedPrefixListAssociations.go
new file mode 100644
index 00000000..52e19317
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetManagedPrefixListAssociations.go
@@ -0,0 +1,230 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Gets information about the resources that are associated with the specified
+// managed prefix list.
+func (c *Client) GetManagedPrefixListAssociations(ctx context.Context, params *GetManagedPrefixListAssociationsInput, optFns ...func(*Options)) (*GetManagedPrefixListAssociationsOutput, error) {
+ if params == nil {
+ params = &GetManagedPrefixListAssociationsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetManagedPrefixListAssociations", params, optFns, c.addOperationGetManagedPrefixListAssociationsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetManagedPrefixListAssociationsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type GetManagedPrefixListAssociationsInput struct {
+
+ // The ID of the prefix list.
+ //
+ // This member is required.
+ PrefixListId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ MaxResults *int32
+
+ // The token for the next page of results.
+ NextToken *string
+
+ noSmithyDocumentSerde
+}
+
+type GetManagedPrefixListAssociationsOutput struct {
+
+ // The token to use to retrieve the next page of results. This value is null when
+ // there are no more results to return.
+ NextToken *string
+
+ // Information about the associations.
+ PrefixListAssociations []types.PrefixListAssociation
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationGetManagedPrefixListAssociationsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpGetManagedPrefixListAssociations{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpGetManagedPrefixListAssociations{}, 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 = addOpGetManagedPrefixListAssociationsValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetManagedPrefixListAssociations(options.Region), middleware.Before); 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
+}
+
+// GetManagedPrefixListAssociationsAPIClient is a client that implements the
+// GetManagedPrefixListAssociations operation.
+type GetManagedPrefixListAssociationsAPIClient interface {
+ GetManagedPrefixListAssociations(context.Context, *GetManagedPrefixListAssociationsInput, ...func(*Options)) (*GetManagedPrefixListAssociationsOutput, error)
+}
+
+var _ GetManagedPrefixListAssociationsAPIClient = (*Client)(nil)
+
+// GetManagedPrefixListAssociationsPaginatorOptions is the paginator options for
+// GetManagedPrefixListAssociations
+type GetManagedPrefixListAssociationsPaginatorOptions struct {
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ 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
+}
+
+// GetManagedPrefixListAssociationsPaginator is a paginator for
+// GetManagedPrefixListAssociations
+type GetManagedPrefixListAssociationsPaginator struct {
+ options GetManagedPrefixListAssociationsPaginatorOptions
+ client GetManagedPrefixListAssociationsAPIClient
+ params *GetManagedPrefixListAssociationsInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewGetManagedPrefixListAssociationsPaginator returns a new
+// GetManagedPrefixListAssociationsPaginator
+func NewGetManagedPrefixListAssociationsPaginator(client GetManagedPrefixListAssociationsAPIClient, params *GetManagedPrefixListAssociationsInput, optFns ...func(*GetManagedPrefixListAssociationsPaginatorOptions)) *GetManagedPrefixListAssociationsPaginator {
+ if params == nil {
+ params = &GetManagedPrefixListAssociationsInput{}
+ }
+
+ options := GetManagedPrefixListAssociationsPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &GetManagedPrefixListAssociationsPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *GetManagedPrefixListAssociationsPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next GetManagedPrefixListAssociations page.
+func (p *GetManagedPrefixListAssociationsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*GetManagedPrefixListAssociationsOutput, 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.GetManagedPrefixListAssociations(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_opGetManagedPrefixListAssociations(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "GetManagedPrefixListAssociations",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetManagedPrefixListEntries.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetManagedPrefixListEntries.go
new file mode 100644
index 00000000..8b357d6d
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetManagedPrefixListEntries.go
@@ -0,0 +1,233 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Gets information about the entries for a specified managed prefix list.
+func (c *Client) GetManagedPrefixListEntries(ctx context.Context, params *GetManagedPrefixListEntriesInput, optFns ...func(*Options)) (*GetManagedPrefixListEntriesOutput, error) {
+ if params == nil {
+ params = &GetManagedPrefixListEntriesInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetManagedPrefixListEntries", params, optFns, c.addOperationGetManagedPrefixListEntriesMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetManagedPrefixListEntriesOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type GetManagedPrefixListEntriesInput struct {
+
+ // The ID of the prefix list.
+ //
+ // This member is required.
+ PrefixListId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ MaxResults *int32
+
+ // The token for the next page of results.
+ NextToken *string
+
+ // The version of the prefix list for which to return the entries. The default is
+ // the current version.
+ TargetVersion *int64
+
+ noSmithyDocumentSerde
+}
+
+type GetManagedPrefixListEntriesOutput struct {
+
+ // Information about the prefix list entries.
+ Entries []types.PrefixListEntry
+
+ // The token to use to retrieve the next page of results. This value is null when
+ // there are no more results to return.
+ NextToken *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationGetManagedPrefixListEntriesMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpGetManagedPrefixListEntries{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpGetManagedPrefixListEntries{}, 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 = addOpGetManagedPrefixListEntriesValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetManagedPrefixListEntries(options.Region), middleware.Before); 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
+}
+
+// GetManagedPrefixListEntriesAPIClient is a client that implements the
+// GetManagedPrefixListEntries operation.
+type GetManagedPrefixListEntriesAPIClient interface {
+ GetManagedPrefixListEntries(context.Context, *GetManagedPrefixListEntriesInput, ...func(*Options)) (*GetManagedPrefixListEntriesOutput, error)
+}
+
+var _ GetManagedPrefixListEntriesAPIClient = (*Client)(nil)
+
+// GetManagedPrefixListEntriesPaginatorOptions is the paginator options for
+// GetManagedPrefixListEntries
+type GetManagedPrefixListEntriesPaginatorOptions struct {
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ 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
+}
+
+// GetManagedPrefixListEntriesPaginator is a paginator for
+// GetManagedPrefixListEntries
+type GetManagedPrefixListEntriesPaginator struct {
+ options GetManagedPrefixListEntriesPaginatorOptions
+ client GetManagedPrefixListEntriesAPIClient
+ params *GetManagedPrefixListEntriesInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewGetManagedPrefixListEntriesPaginator returns a new
+// GetManagedPrefixListEntriesPaginator
+func NewGetManagedPrefixListEntriesPaginator(client GetManagedPrefixListEntriesAPIClient, params *GetManagedPrefixListEntriesInput, optFns ...func(*GetManagedPrefixListEntriesPaginatorOptions)) *GetManagedPrefixListEntriesPaginator {
+ if params == nil {
+ params = &GetManagedPrefixListEntriesInput{}
+ }
+
+ options := GetManagedPrefixListEntriesPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &GetManagedPrefixListEntriesPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *GetManagedPrefixListEntriesPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next GetManagedPrefixListEntries page.
+func (p *GetManagedPrefixListEntriesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*GetManagedPrefixListEntriesOutput, 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.GetManagedPrefixListEntries(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_opGetManagedPrefixListEntries(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "GetManagedPrefixListEntries",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetPasswordData.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetPasswordData.go
new file mode 100644
index 00000000..44dc8074
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetPasswordData.go
@@ -0,0 +1,317 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/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"
+ "strconv"
+ "time"
+)
+
+// Retrieves the encrypted administrator password for a running Windows instance.
+// The Windows password is generated at boot by the EC2Config service or EC2Launch
+// scripts (Windows Server 2016 and later). This usually only happens the first
+// time an instance is launched. For more information, see EC2Config
+// (https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/UsingConfig_WinAMI.html)
+// and EC2Launch
+// (https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ec2launch.html) in the
+// Amazon EC2 User Guide. For the EC2Config service, the password is not generated
+// for rebundled AMIs unless Ec2SetPassword is enabled before bundling. The
+// password is encrypted using the key pair that you specified when you launched
+// the instance. You must provide the corresponding key pair file. When you launch
+// an instance, password generation and encryption may take a few minutes. If you
+// try to retrieve the password before it's available, the output returns an empty
+// string. We recommend that you wait up to 15 minutes after launching an instance
+// before trying to retrieve the generated password.
+func (c *Client) GetPasswordData(ctx context.Context, params *GetPasswordDataInput, optFns ...func(*Options)) (*GetPasswordDataOutput, error) {
+ if params == nil {
+ params = &GetPasswordDataInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetPasswordData", params, optFns, c.addOperationGetPasswordDataMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetPasswordDataOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type GetPasswordDataInput struct {
+
+ // The ID of the Windows instance.
+ //
+ // This member is required.
+ InstanceId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type GetPasswordDataOutput struct {
+
+ // The ID of the Windows instance.
+ InstanceId *string
+
+ // The password of the instance. Returns an empty string if the password is not
+ // available.
+ PasswordData *string
+
+ // The time the data was last updated.
+ Timestamp *time.Time
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationGetPasswordDataMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpGetPasswordData{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpGetPasswordData{}, 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 = addOpGetPasswordDataValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetPasswordData(options.Region), middleware.Before); 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
+}
+
+// GetPasswordDataAPIClient is a client that implements the GetPasswordData
+// operation.
+type GetPasswordDataAPIClient interface {
+ GetPasswordData(context.Context, *GetPasswordDataInput, ...func(*Options)) (*GetPasswordDataOutput, error)
+}
+
+var _ GetPasswordDataAPIClient = (*Client)(nil)
+
+// PasswordDataAvailableWaiterOptions are waiter options for
+// PasswordDataAvailableWaiter
+type PasswordDataAvailableWaiterOptions 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,
+ // PasswordDataAvailableWaiter will use default minimum delay of 15 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, PasswordDataAvailableWaiter 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, *GetPasswordDataInput, *GetPasswordDataOutput, error) (bool, error)
+}
+
+// PasswordDataAvailableWaiter defines the waiters for PasswordDataAvailable
+type PasswordDataAvailableWaiter struct {
+ client GetPasswordDataAPIClient
+
+ options PasswordDataAvailableWaiterOptions
+}
+
+// NewPasswordDataAvailableWaiter constructs a PasswordDataAvailableWaiter.
+func NewPasswordDataAvailableWaiter(client GetPasswordDataAPIClient, optFns ...func(*PasswordDataAvailableWaiterOptions)) *PasswordDataAvailableWaiter {
+ options := PasswordDataAvailableWaiterOptions{}
+ options.MinDelay = 15 * time.Second
+ options.MaxDelay = 120 * time.Second
+ options.Retryable = passwordDataAvailableStateRetryable
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+ return &PasswordDataAvailableWaiter{
+ client: client,
+ options: options,
+ }
+}
+
+// Wait calls the waiter function for PasswordDataAvailable waiter. The maxWaitDur
+// is the maximum wait duration the waiter will wait. The maxWaitDur is required
+// and must be greater than zero.
+func (w *PasswordDataAvailableWaiter) Wait(ctx context.Context, params *GetPasswordDataInput, maxWaitDur time.Duration, optFns ...func(*PasswordDataAvailableWaiterOptions)) error {
+ if maxWaitDur <= 0 {
+ return 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 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.GetPasswordData(ctx, params, func(o *Options) {
+ o.APIOptions = append(o.APIOptions, apiOptions...)
+ })
+
+ retryable, err := options.Retryable(ctx, params, out, err)
+ if err != nil {
+ return err
+ }
+ if !retryable {
+ return 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 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 fmt.Errorf("request cancelled while waiting, %w", err)
+ }
+ }
+ return fmt.Errorf("exceeded max wait time for PasswordDataAvailable waiter")
+}
+
+func passwordDataAvailableStateRetryable(ctx context.Context, input *GetPasswordDataInput, output *GetPasswordDataOutput, err error) (bool, error) {
+
+ if err == nil {
+ pathValue, err := jmespath.Search("length(PasswordData) > `0`", output)
+ if err != nil {
+ return false, fmt.Errorf("error evaluating waiter state: %w", err)
+ }
+
+ expectedValue := "true"
+ bv, err := strconv.ParseBool(expectedValue)
+ if err != nil {
+ return false, fmt.Errorf("error parsing boolean from string %w", err)
+ }
+ value, ok := pathValue.(bool)
+ if !ok {
+ return false, fmt.Errorf("waiter comparator expected bool value got %T", pathValue)
+ }
+
+ if value == bv {
+ return false, nil
+ }
+ }
+
+ return true, nil
+}
+
+func newServiceMetadataMiddleware_opGetPasswordData(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "GetPasswordData",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetReservedInstancesExchangeQuote.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetReservedInstancesExchangeQuote.go
new file mode 100644
index 00000000..fb066980
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetReservedInstancesExchangeQuote.go
@@ -0,0 +1,161 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "time"
+)
+
+// Returns a quote and exchange information for exchanging one or more specified
+// Convertible Reserved Instances for a new Convertible Reserved Instance. If the
+// exchange cannot be performed, the reason is returned in the response. Use
+// AcceptReservedInstancesExchangeQuote to perform the exchange.
+func (c *Client) GetReservedInstancesExchangeQuote(ctx context.Context, params *GetReservedInstancesExchangeQuoteInput, optFns ...func(*Options)) (*GetReservedInstancesExchangeQuoteOutput, error) {
+ if params == nil {
+ params = &GetReservedInstancesExchangeQuoteInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetReservedInstancesExchangeQuote", params, optFns, c.addOperationGetReservedInstancesExchangeQuoteMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetReservedInstancesExchangeQuoteOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+// Contains the parameters for GetReservedInstanceExchangeQuote.
+type GetReservedInstancesExchangeQuoteInput struct {
+
+ // The IDs of the Convertible Reserved Instances to exchange.
+ //
+ // This member is required.
+ ReservedInstanceIds []string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The configuration of the target Convertible Reserved Instance to exchange for
+ // your current Convertible Reserved Instances.
+ TargetConfigurations []types.TargetConfigurationRequest
+
+ noSmithyDocumentSerde
+}
+
+// Contains the output of GetReservedInstancesExchangeQuote.
+type GetReservedInstancesExchangeQuoteOutput struct {
+
+ // The currency of the transaction.
+ CurrencyCode *string
+
+ // If true, the exchange is valid. If false, the exchange cannot be completed.
+ IsValidExchange *bool
+
+ // The new end date of the reservation term.
+ OutputReservedInstancesWillExpireAt *time.Time
+
+ // The total true upfront charge for the exchange.
+ PaymentDue *string
+
+ // The cost associated with the Reserved Instance.
+ ReservedInstanceValueRollup *types.ReservationValue
+
+ // The configuration of your Convertible Reserved Instances.
+ ReservedInstanceValueSet []types.ReservedInstanceReservationValue
+
+ // The cost associated with the Reserved Instance.
+ TargetConfigurationValueRollup *types.ReservationValue
+
+ // The values of the target Convertible Reserved Instances.
+ TargetConfigurationValueSet []types.TargetReservationValue
+
+ // Describes the reason why the exchange cannot be completed.
+ ValidationFailureReason *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationGetReservedInstancesExchangeQuoteMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpGetReservedInstancesExchangeQuote{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpGetReservedInstancesExchangeQuote{}, 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 = addOpGetReservedInstancesExchangeQuoteValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetReservedInstancesExchangeQuote(options.Region), middleware.Before); 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_opGetReservedInstancesExchangeQuote(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "GetReservedInstancesExchangeQuote",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetSerialConsoleAccessStatus.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetSerialConsoleAccessStatus.go
new file mode 100644
index 00000000..d1860034
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetSerialConsoleAccessStatus.go
@@ -0,0 +1,125 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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 access status of your account to the EC2 serial console of all
+// instances. By default, access to the EC2 serial console is disabled for your
+// account. For more information, see Manage account access to the EC2 serial
+// console
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configure-access-to-serial-console.html#serial-console-account-access)
+// in the Amazon EC2 User Guide.
+func (c *Client) GetSerialConsoleAccessStatus(ctx context.Context, params *GetSerialConsoleAccessStatusInput, optFns ...func(*Options)) (*GetSerialConsoleAccessStatusOutput, error) {
+ if params == nil {
+ params = &GetSerialConsoleAccessStatusInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetSerialConsoleAccessStatus", params, optFns, c.addOperationGetSerialConsoleAccessStatusMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetSerialConsoleAccessStatusOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type GetSerialConsoleAccessStatusInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type GetSerialConsoleAccessStatusOutput struct {
+
+ // If true, access to the EC2 serial console of all instances is enabled for your
+ // account. If false, access to the EC2 serial console of all instances is disabled
+ // for your account.
+ SerialConsoleAccessEnabled *bool
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationGetSerialConsoleAccessStatusMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpGetSerialConsoleAccessStatus{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpGetSerialConsoleAccessStatus{}, 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_opGetSerialConsoleAccessStatus(options.Region), middleware.Before); 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_opGetSerialConsoleAccessStatus(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "GetSerialConsoleAccessStatus",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetSubnetCidrReservations.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetSubnetCidrReservations.go
new file mode 100644
index 00000000..f1da5b1b
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetSubnetCidrReservations.go
@@ -0,0 +1,159 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Gets information about the subnet CIDR reservations.
+func (c *Client) GetSubnetCidrReservations(ctx context.Context, params *GetSubnetCidrReservationsInput, optFns ...func(*Options)) (*GetSubnetCidrReservationsOutput, error) {
+ if params == nil {
+ params = &GetSubnetCidrReservationsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetSubnetCidrReservations", params, optFns, c.addOperationGetSubnetCidrReservationsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetSubnetCidrReservationsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type GetSubnetCidrReservationsInput struct {
+
+ // The ID of the subnet.
+ //
+ // This member is required.
+ SubnetId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // One or more filters.
+ //
+ // * reservationType - The type of reservation (prefix |
+ // explicit).
+ //
+ // * subnet-id - The ID of the subnet.
+ //
+ // * tag: - The key/value
+ // combination of a tag assigned to the resource. Use the tag key in the filter
+ // name and the tag value as the filter value. For example, to find all resources
+ // that have a tag with the key Owner and the value TeamA, specify tag:Owner for
+ // the filter name and TeamA for the filter value.
+ //
+ // * tag-key - The key of a tag
+ // assigned to the resource. Use this filter to find all resources assigned a tag
+ // with a specific key, regardless of the tag value.
+ Filters []types.Filter
+
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ MaxResults *int32
+
+ // The token for the next page of results.
+ NextToken *string
+
+ noSmithyDocumentSerde
+}
+
+type GetSubnetCidrReservationsOutput struct {
+
+ // The token to use to retrieve the next page of results. This value is null when
+ // there are no more results to return.
+ NextToken *string
+
+ // Information about the IPv4 subnet CIDR reservations.
+ SubnetIpv4CidrReservations []types.SubnetCidrReservation
+
+ // Information about the IPv6 subnet CIDR reservations.
+ SubnetIpv6CidrReservations []types.SubnetCidrReservation
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationGetSubnetCidrReservationsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpGetSubnetCidrReservations{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpGetSubnetCidrReservations{}, 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 = addOpGetSubnetCidrReservationsValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetSubnetCidrReservations(options.Region), middleware.Before); 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_opGetSubnetCidrReservations(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "GetSubnetCidrReservations",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetTransitGatewayAttachmentPropagations.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetTransitGatewayAttachmentPropagations.go
new file mode 100644
index 00000000..69e25dee
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetTransitGatewayAttachmentPropagations.go
@@ -0,0 +1,236 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Lists the route tables to which the specified resource attachment propagates
+// routes.
+func (c *Client) GetTransitGatewayAttachmentPropagations(ctx context.Context, params *GetTransitGatewayAttachmentPropagationsInput, optFns ...func(*Options)) (*GetTransitGatewayAttachmentPropagationsOutput, error) {
+ if params == nil {
+ params = &GetTransitGatewayAttachmentPropagationsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetTransitGatewayAttachmentPropagations", params, optFns, c.addOperationGetTransitGatewayAttachmentPropagationsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetTransitGatewayAttachmentPropagationsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type GetTransitGatewayAttachmentPropagationsInput struct {
+
+ // The ID of the attachment.
+ //
+ // This member is required.
+ TransitGatewayAttachmentId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // One or more filters. The possible values are:
+ //
+ // * transit-gateway-route-table-id
+ // - The ID of the transit gateway route table.
+ Filters []types.Filter
+
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ MaxResults *int32
+
+ // The token for the next page of results.
+ NextToken *string
+
+ noSmithyDocumentSerde
+}
+
+type GetTransitGatewayAttachmentPropagationsOutput struct {
+
+ // The token to use to retrieve the next page of results. This value is null when
+ // there are no more results to return.
+ NextToken *string
+
+ // Information about the propagation route tables.
+ TransitGatewayAttachmentPropagations []types.TransitGatewayAttachmentPropagation
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationGetTransitGatewayAttachmentPropagationsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpGetTransitGatewayAttachmentPropagations{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpGetTransitGatewayAttachmentPropagations{}, 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 = addOpGetTransitGatewayAttachmentPropagationsValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetTransitGatewayAttachmentPropagations(options.Region), middleware.Before); 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
+}
+
+// GetTransitGatewayAttachmentPropagationsAPIClient is a client that implements the
+// GetTransitGatewayAttachmentPropagations operation.
+type GetTransitGatewayAttachmentPropagationsAPIClient interface {
+ GetTransitGatewayAttachmentPropagations(context.Context, *GetTransitGatewayAttachmentPropagationsInput, ...func(*Options)) (*GetTransitGatewayAttachmentPropagationsOutput, error)
+}
+
+var _ GetTransitGatewayAttachmentPropagationsAPIClient = (*Client)(nil)
+
+// GetTransitGatewayAttachmentPropagationsPaginatorOptions is the paginator options
+// for GetTransitGatewayAttachmentPropagations
+type GetTransitGatewayAttachmentPropagationsPaginatorOptions struct {
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ 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
+}
+
+// GetTransitGatewayAttachmentPropagationsPaginator is a paginator for
+// GetTransitGatewayAttachmentPropagations
+type GetTransitGatewayAttachmentPropagationsPaginator struct {
+ options GetTransitGatewayAttachmentPropagationsPaginatorOptions
+ client GetTransitGatewayAttachmentPropagationsAPIClient
+ params *GetTransitGatewayAttachmentPropagationsInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewGetTransitGatewayAttachmentPropagationsPaginator returns a new
+// GetTransitGatewayAttachmentPropagationsPaginator
+func NewGetTransitGatewayAttachmentPropagationsPaginator(client GetTransitGatewayAttachmentPropagationsAPIClient, params *GetTransitGatewayAttachmentPropagationsInput, optFns ...func(*GetTransitGatewayAttachmentPropagationsPaginatorOptions)) *GetTransitGatewayAttachmentPropagationsPaginator {
+ if params == nil {
+ params = &GetTransitGatewayAttachmentPropagationsInput{}
+ }
+
+ options := GetTransitGatewayAttachmentPropagationsPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &GetTransitGatewayAttachmentPropagationsPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *GetTransitGatewayAttachmentPropagationsPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next GetTransitGatewayAttachmentPropagations page.
+func (p *GetTransitGatewayAttachmentPropagationsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*GetTransitGatewayAttachmentPropagationsOutput, 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.GetTransitGatewayAttachmentPropagations(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_opGetTransitGatewayAttachmentPropagations(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "GetTransitGatewayAttachmentPropagations",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetTransitGatewayMulticastDomainAssociations.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetTransitGatewayMulticastDomainAssociations.go
new file mode 100644
index 00000000..92115d50
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetTransitGatewayMulticastDomainAssociations.go
@@ -0,0 +1,243 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Gets information about the associations for the transit gateway multicast
+// domain.
+func (c *Client) GetTransitGatewayMulticastDomainAssociations(ctx context.Context, params *GetTransitGatewayMulticastDomainAssociationsInput, optFns ...func(*Options)) (*GetTransitGatewayMulticastDomainAssociationsOutput, error) {
+ if params == nil {
+ params = &GetTransitGatewayMulticastDomainAssociationsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetTransitGatewayMulticastDomainAssociations", params, optFns, c.addOperationGetTransitGatewayMulticastDomainAssociationsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetTransitGatewayMulticastDomainAssociationsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type GetTransitGatewayMulticastDomainAssociationsInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // One or more filters. The possible values are:
+ //
+ // * resource-id - The ID of the
+ // resource.
+ //
+ // * resource-type - The type of resource. The valid value is: vpc.
+ //
+ // *
+ // state - The state of the subnet association. Valid values are associated |
+ // associating | disassociated | disassociating.
+ //
+ // * subnet-id - The ID of the
+ // subnet.
+ //
+ // * transit-gateway-attachment-id - The id of the transit gateway
+ // attachment.
+ Filters []types.Filter
+
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ MaxResults *int32
+
+ // The token for the next page of results.
+ NextToken *string
+
+ // The ID of the transit gateway multicast domain.
+ TransitGatewayMulticastDomainId *string
+
+ noSmithyDocumentSerde
+}
+
+type GetTransitGatewayMulticastDomainAssociationsOutput struct {
+
+ // Information about the multicast domain associations.
+ MulticastDomainAssociations []types.TransitGatewayMulticastDomainAssociation
+
+ // The token to use to retrieve the next page of results. This value is null when
+ // there are no more results to return.
+ NextToken *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationGetTransitGatewayMulticastDomainAssociationsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpGetTransitGatewayMulticastDomainAssociations{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpGetTransitGatewayMulticastDomainAssociations{}, 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_opGetTransitGatewayMulticastDomainAssociations(options.Region), middleware.Before); 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
+}
+
+// GetTransitGatewayMulticastDomainAssociationsAPIClient is a client that
+// implements the GetTransitGatewayMulticastDomainAssociations operation.
+type GetTransitGatewayMulticastDomainAssociationsAPIClient interface {
+ GetTransitGatewayMulticastDomainAssociations(context.Context, *GetTransitGatewayMulticastDomainAssociationsInput, ...func(*Options)) (*GetTransitGatewayMulticastDomainAssociationsOutput, error)
+}
+
+var _ GetTransitGatewayMulticastDomainAssociationsAPIClient = (*Client)(nil)
+
+// GetTransitGatewayMulticastDomainAssociationsPaginatorOptions is the paginator
+// options for GetTransitGatewayMulticastDomainAssociations
+type GetTransitGatewayMulticastDomainAssociationsPaginatorOptions struct {
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ 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
+}
+
+// GetTransitGatewayMulticastDomainAssociationsPaginator is a paginator for
+// GetTransitGatewayMulticastDomainAssociations
+type GetTransitGatewayMulticastDomainAssociationsPaginator struct {
+ options GetTransitGatewayMulticastDomainAssociationsPaginatorOptions
+ client GetTransitGatewayMulticastDomainAssociationsAPIClient
+ params *GetTransitGatewayMulticastDomainAssociationsInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewGetTransitGatewayMulticastDomainAssociationsPaginator returns a new
+// GetTransitGatewayMulticastDomainAssociationsPaginator
+func NewGetTransitGatewayMulticastDomainAssociationsPaginator(client GetTransitGatewayMulticastDomainAssociationsAPIClient, params *GetTransitGatewayMulticastDomainAssociationsInput, optFns ...func(*GetTransitGatewayMulticastDomainAssociationsPaginatorOptions)) *GetTransitGatewayMulticastDomainAssociationsPaginator {
+ if params == nil {
+ params = &GetTransitGatewayMulticastDomainAssociationsInput{}
+ }
+
+ options := GetTransitGatewayMulticastDomainAssociationsPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &GetTransitGatewayMulticastDomainAssociationsPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *GetTransitGatewayMulticastDomainAssociationsPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next GetTransitGatewayMulticastDomainAssociations page.
+func (p *GetTransitGatewayMulticastDomainAssociationsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*GetTransitGatewayMulticastDomainAssociationsOutput, 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.GetTransitGatewayMulticastDomainAssociations(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_opGetTransitGatewayMulticastDomainAssociations(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "GetTransitGatewayMulticastDomainAssociations",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetTransitGatewayPrefixListReferences.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetTransitGatewayPrefixListReferences.go
new file mode 100644
index 00000000..f26df298
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetTransitGatewayPrefixListReferences.go
@@ -0,0 +1,254 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Gets information about the prefix list references in a specified transit gateway
+// route table.
+func (c *Client) GetTransitGatewayPrefixListReferences(ctx context.Context, params *GetTransitGatewayPrefixListReferencesInput, optFns ...func(*Options)) (*GetTransitGatewayPrefixListReferencesOutput, error) {
+ if params == nil {
+ params = &GetTransitGatewayPrefixListReferencesInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetTransitGatewayPrefixListReferences", params, optFns, c.addOperationGetTransitGatewayPrefixListReferencesMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetTransitGatewayPrefixListReferencesOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type GetTransitGatewayPrefixListReferencesInput struct {
+
+ // The ID of the transit gateway route table.
+ //
+ // This member is required.
+ TransitGatewayRouteTableId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // One or more filters. The possible values are:
+ //
+ // * attachment.resource-id - The ID
+ // of the resource for the attachment.
+ //
+ // * attachment.resource-type - The type of
+ // resource for the attachment. Valid values are vpc | vpn | direct-connect-gateway
+ // | peering.
+ //
+ // * attachment.transit-gateway-attachment-id - The ID of the
+ // attachment.
+ //
+ // * is-blackhole - Whether traffic matching the route is blocked
+ // (true | false).
+ //
+ // * prefix-list-id - The ID of the prefix list.
+ //
+ // *
+ // prefix-list-owner-id - The ID of the owner of the prefix list.
+ //
+ // * state - The
+ // state of the prefix list reference (pending | available | modifying | deleting).
+ Filters []types.Filter
+
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ MaxResults *int32
+
+ // The token for the next page of results.
+ NextToken *string
+
+ noSmithyDocumentSerde
+}
+
+type GetTransitGatewayPrefixListReferencesOutput struct {
+
+ // The token to use to retrieve the next page of results. This value is null when
+ // there are no more results to return.
+ NextToken *string
+
+ // Information about the prefix list references.
+ TransitGatewayPrefixListReferences []types.TransitGatewayPrefixListReference
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationGetTransitGatewayPrefixListReferencesMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpGetTransitGatewayPrefixListReferences{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpGetTransitGatewayPrefixListReferences{}, 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 = addOpGetTransitGatewayPrefixListReferencesValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetTransitGatewayPrefixListReferences(options.Region), middleware.Before); 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
+}
+
+// GetTransitGatewayPrefixListReferencesAPIClient is a client that implements the
+// GetTransitGatewayPrefixListReferences operation.
+type GetTransitGatewayPrefixListReferencesAPIClient interface {
+ GetTransitGatewayPrefixListReferences(context.Context, *GetTransitGatewayPrefixListReferencesInput, ...func(*Options)) (*GetTransitGatewayPrefixListReferencesOutput, error)
+}
+
+var _ GetTransitGatewayPrefixListReferencesAPIClient = (*Client)(nil)
+
+// GetTransitGatewayPrefixListReferencesPaginatorOptions is the paginator options
+// for GetTransitGatewayPrefixListReferences
+type GetTransitGatewayPrefixListReferencesPaginatorOptions struct {
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ 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
+}
+
+// GetTransitGatewayPrefixListReferencesPaginator is a paginator for
+// GetTransitGatewayPrefixListReferences
+type GetTransitGatewayPrefixListReferencesPaginator struct {
+ options GetTransitGatewayPrefixListReferencesPaginatorOptions
+ client GetTransitGatewayPrefixListReferencesAPIClient
+ params *GetTransitGatewayPrefixListReferencesInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewGetTransitGatewayPrefixListReferencesPaginator returns a new
+// GetTransitGatewayPrefixListReferencesPaginator
+func NewGetTransitGatewayPrefixListReferencesPaginator(client GetTransitGatewayPrefixListReferencesAPIClient, params *GetTransitGatewayPrefixListReferencesInput, optFns ...func(*GetTransitGatewayPrefixListReferencesPaginatorOptions)) *GetTransitGatewayPrefixListReferencesPaginator {
+ if params == nil {
+ params = &GetTransitGatewayPrefixListReferencesInput{}
+ }
+
+ options := GetTransitGatewayPrefixListReferencesPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &GetTransitGatewayPrefixListReferencesPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *GetTransitGatewayPrefixListReferencesPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next GetTransitGatewayPrefixListReferences page.
+func (p *GetTransitGatewayPrefixListReferencesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*GetTransitGatewayPrefixListReferencesOutput, 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.GetTransitGatewayPrefixListReferences(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_opGetTransitGatewayPrefixListReferences(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "GetTransitGatewayPrefixListReferences",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetTransitGatewayRouteTableAssociations.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetTransitGatewayRouteTableAssociations.go
new file mode 100644
index 00000000..057f9923
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetTransitGatewayRouteTableAssociations.go
@@ -0,0 +1,242 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Gets information about the associations for the specified transit gateway route
+// table.
+func (c *Client) GetTransitGatewayRouteTableAssociations(ctx context.Context, params *GetTransitGatewayRouteTableAssociationsInput, optFns ...func(*Options)) (*GetTransitGatewayRouteTableAssociationsOutput, error) {
+ if params == nil {
+ params = &GetTransitGatewayRouteTableAssociationsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetTransitGatewayRouteTableAssociations", params, optFns, c.addOperationGetTransitGatewayRouteTableAssociationsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetTransitGatewayRouteTableAssociationsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type GetTransitGatewayRouteTableAssociationsInput struct {
+
+ // The ID of the transit gateway route table.
+ //
+ // This member is required.
+ TransitGatewayRouteTableId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // One or more filters. The possible values are:
+ //
+ // * resource-id - The ID of the
+ // resource.
+ //
+ // * resource-type - The resource type. Valid values are vpc | vpn |
+ // direct-connect-gateway | peering | connect.
+ //
+ // * transit-gateway-attachment-id -
+ // The ID of the attachment.
+ Filters []types.Filter
+
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ MaxResults *int32
+
+ // The token for the next page of results.
+ NextToken *string
+
+ noSmithyDocumentSerde
+}
+
+type GetTransitGatewayRouteTableAssociationsOutput struct {
+
+ // Information about the associations.
+ Associations []types.TransitGatewayRouteTableAssociation
+
+ // The token to use to retrieve the next page of results. This value is null when
+ // there are no more results to return.
+ NextToken *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationGetTransitGatewayRouteTableAssociationsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpGetTransitGatewayRouteTableAssociations{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpGetTransitGatewayRouteTableAssociations{}, 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 = addOpGetTransitGatewayRouteTableAssociationsValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetTransitGatewayRouteTableAssociations(options.Region), middleware.Before); 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
+}
+
+// GetTransitGatewayRouteTableAssociationsAPIClient is a client that implements the
+// GetTransitGatewayRouteTableAssociations operation.
+type GetTransitGatewayRouteTableAssociationsAPIClient interface {
+ GetTransitGatewayRouteTableAssociations(context.Context, *GetTransitGatewayRouteTableAssociationsInput, ...func(*Options)) (*GetTransitGatewayRouteTableAssociationsOutput, error)
+}
+
+var _ GetTransitGatewayRouteTableAssociationsAPIClient = (*Client)(nil)
+
+// GetTransitGatewayRouteTableAssociationsPaginatorOptions is the paginator options
+// for GetTransitGatewayRouteTableAssociations
+type GetTransitGatewayRouteTableAssociationsPaginatorOptions struct {
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ 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
+}
+
+// GetTransitGatewayRouteTableAssociationsPaginator is a paginator for
+// GetTransitGatewayRouteTableAssociations
+type GetTransitGatewayRouteTableAssociationsPaginator struct {
+ options GetTransitGatewayRouteTableAssociationsPaginatorOptions
+ client GetTransitGatewayRouteTableAssociationsAPIClient
+ params *GetTransitGatewayRouteTableAssociationsInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewGetTransitGatewayRouteTableAssociationsPaginator returns a new
+// GetTransitGatewayRouteTableAssociationsPaginator
+func NewGetTransitGatewayRouteTableAssociationsPaginator(client GetTransitGatewayRouteTableAssociationsAPIClient, params *GetTransitGatewayRouteTableAssociationsInput, optFns ...func(*GetTransitGatewayRouteTableAssociationsPaginatorOptions)) *GetTransitGatewayRouteTableAssociationsPaginator {
+ if params == nil {
+ params = &GetTransitGatewayRouteTableAssociationsInput{}
+ }
+
+ options := GetTransitGatewayRouteTableAssociationsPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &GetTransitGatewayRouteTableAssociationsPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *GetTransitGatewayRouteTableAssociationsPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next GetTransitGatewayRouteTableAssociations page.
+func (p *GetTransitGatewayRouteTableAssociationsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*GetTransitGatewayRouteTableAssociationsOutput, 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.GetTransitGatewayRouteTableAssociations(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_opGetTransitGatewayRouteTableAssociations(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "GetTransitGatewayRouteTableAssociations",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetTransitGatewayRouteTablePropagations.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetTransitGatewayRouteTablePropagations.go
new file mode 100644
index 00000000..0b2de5e0
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetTransitGatewayRouteTablePropagations.go
@@ -0,0 +1,242 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Gets information about the route table propagations for the specified transit
+// gateway route table.
+func (c *Client) GetTransitGatewayRouteTablePropagations(ctx context.Context, params *GetTransitGatewayRouteTablePropagationsInput, optFns ...func(*Options)) (*GetTransitGatewayRouteTablePropagationsOutput, error) {
+ if params == nil {
+ params = &GetTransitGatewayRouteTablePropagationsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetTransitGatewayRouteTablePropagations", params, optFns, c.addOperationGetTransitGatewayRouteTablePropagationsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetTransitGatewayRouteTablePropagationsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type GetTransitGatewayRouteTablePropagationsInput struct {
+
+ // The ID of the transit gateway route table.
+ //
+ // This member is required.
+ TransitGatewayRouteTableId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // One or more filters. The possible values are:
+ //
+ // * resource-id - The ID of the
+ // resource.
+ //
+ // * resource-type - The resource type. Valid values are vpc | vpn |
+ // direct-connect-gateway | peering | connect.
+ //
+ // * transit-gateway-attachment-id -
+ // The ID of the attachment.
+ Filters []types.Filter
+
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ MaxResults *int32
+
+ // The token for the next page of results.
+ NextToken *string
+
+ noSmithyDocumentSerde
+}
+
+type GetTransitGatewayRouteTablePropagationsOutput struct {
+
+ // The token to use to retrieve the next page of results. This value is null when
+ // there are no more results to return.
+ NextToken *string
+
+ // Information about the route table propagations.
+ TransitGatewayRouteTablePropagations []types.TransitGatewayRouteTablePropagation
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationGetTransitGatewayRouteTablePropagationsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpGetTransitGatewayRouteTablePropagations{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpGetTransitGatewayRouteTablePropagations{}, 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 = addOpGetTransitGatewayRouteTablePropagationsValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetTransitGatewayRouteTablePropagations(options.Region), middleware.Before); 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
+}
+
+// GetTransitGatewayRouteTablePropagationsAPIClient is a client that implements the
+// GetTransitGatewayRouteTablePropagations operation.
+type GetTransitGatewayRouteTablePropagationsAPIClient interface {
+ GetTransitGatewayRouteTablePropagations(context.Context, *GetTransitGatewayRouteTablePropagationsInput, ...func(*Options)) (*GetTransitGatewayRouteTablePropagationsOutput, error)
+}
+
+var _ GetTransitGatewayRouteTablePropagationsAPIClient = (*Client)(nil)
+
+// GetTransitGatewayRouteTablePropagationsPaginatorOptions is the paginator options
+// for GetTransitGatewayRouteTablePropagations
+type GetTransitGatewayRouteTablePropagationsPaginatorOptions struct {
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ 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
+}
+
+// GetTransitGatewayRouteTablePropagationsPaginator is a paginator for
+// GetTransitGatewayRouteTablePropagations
+type GetTransitGatewayRouteTablePropagationsPaginator struct {
+ options GetTransitGatewayRouteTablePropagationsPaginatorOptions
+ client GetTransitGatewayRouteTablePropagationsAPIClient
+ params *GetTransitGatewayRouteTablePropagationsInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewGetTransitGatewayRouteTablePropagationsPaginator returns a new
+// GetTransitGatewayRouteTablePropagationsPaginator
+func NewGetTransitGatewayRouteTablePropagationsPaginator(client GetTransitGatewayRouteTablePropagationsAPIClient, params *GetTransitGatewayRouteTablePropagationsInput, optFns ...func(*GetTransitGatewayRouteTablePropagationsPaginatorOptions)) *GetTransitGatewayRouteTablePropagationsPaginator {
+ if params == nil {
+ params = &GetTransitGatewayRouteTablePropagationsInput{}
+ }
+
+ options := GetTransitGatewayRouteTablePropagationsPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &GetTransitGatewayRouteTablePropagationsPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *GetTransitGatewayRouteTablePropagationsPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next GetTransitGatewayRouteTablePropagations page.
+func (p *GetTransitGatewayRouteTablePropagationsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*GetTransitGatewayRouteTablePropagationsOutput, 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.GetTransitGatewayRouteTablePropagations(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_opGetTransitGatewayRouteTablePropagations(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "GetTransitGatewayRouteTablePropagations",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetVpnConnectionDeviceSampleConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetVpnConnectionDeviceSampleConfiguration.go
new file mode 100644
index 00000000..863d6882
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetVpnConnectionDeviceSampleConfiguration.go
@@ -0,0 +1,137 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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"
+)
+
+// Download an AWS-provided sample configuration file to be used with the customer
+// gateway device specified for your Site-to-Site VPN connection.
+func (c *Client) GetVpnConnectionDeviceSampleConfiguration(ctx context.Context, params *GetVpnConnectionDeviceSampleConfigurationInput, optFns ...func(*Options)) (*GetVpnConnectionDeviceSampleConfigurationOutput, error) {
+ if params == nil {
+ params = &GetVpnConnectionDeviceSampleConfigurationInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetVpnConnectionDeviceSampleConfiguration", params, optFns, c.addOperationGetVpnConnectionDeviceSampleConfigurationMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetVpnConnectionDeviceSampleConfigurationOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type GetVpnConnectionDeviceSampleConfigurationInput struct {
+
+ // Device identifier provided by the GetVpnConnectionDeviceTypes API.
+ //
+ // This member is required.
+ VpnConnectionDeviceTypeId *string
+
+ // The VpnConnectionId specifies the Site-to-Site VPN connection used for the
+ // sample configuration.
+ //
+ // This member is required.
+ VpnConnectionId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The IKE version to be used in the sample configuration file for your customer
+ // gateway device. You can specify one of the following versions: ikev1 or ikev2.
+ InternetKeyExchangeVersion *string
+
+ noSmithyDocumentSerde
+}
+
+type GetVpnConnectionDeviceSampleConfigurationOutput struct {
+
+ // Sample configuration file for the specified customer gateway device.
+ VpnConnectionDeviceSampleConfiguration *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationGetVpnConnectionDeviceSampleConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpGetVpnConnectionDeviceSampleConfiguration{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpGetVpnConnectionDeviceSampleConfiguration{}, 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 = addOpGetVpnConnectionDeviceSampleConfigurationValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetVpnConnectionDeviceSampleConfiguration(options.Region), middleware.Before); 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_opGetVpnConnectionDeviceSampleConfiguration(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "GetVpnConnectionDeviceSampleConfiguration",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetVpnConnectionDeviceTypes.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetVpnConnectionDeviceTypes.go
new file mode 100644
index 00000000..0bb501b8
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetVpnConnectionDeviceTypes.go
@@ -0,0 +1,243 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Obtain a list of customer gateway devices for which sample configuration files
+// can be provided. The request has no additional parameters. You can also see the
+// list of device types with sample configuration files available under Your
+// customer gateway device
+// (https://docs.aws.amazon.com/vpn/latest/s2svpn/your-cgw.html) in the Amazon Web
+// Services Site-to-Site VPN User Guide.
+func (c *Client) GetVpnConnectionDeviceTypes(ctx context.Context, params *GetVpnConnectionDeviceTypesInput, optFns ...func(*Options)) (*GetVpnConnectionDeviceTypesOutput, error) {
+ if params == nil {
+ params = &GetVpnConnectionDeviceTypesInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetVpnConnectionDeviceTypes", params, optFns, c.addOperationGetVpnConnectionDeviceTypesMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetVpnConnectionDeviceTypesOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type GetVpnConnectionDeviceTypesInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The maximum number of results returned by GetVpnConnectionDeviceTypes in
+ // paginated output. When this parameter is used, GetVpnConnectionDeviceTypes only
+ // returns MaxResults results in a single page along with a NextToken response
+ // element. The remaining results of the initial request can be seen by sending
+ // another GetVpnConnectionDeviceTypes request with the returned NextToken value.
+ // This value can be between 200 and 1000. If this parameter is not used, then
+ // GetVpnConnectionDeviceTypes returns all results.
+ MaxResults *int32
+
+ // The NextToken value returned from a previous paginated
+ // GetVpnConnectionDeviceTypes request where MaxResults was used and the results
+ // exceeded the value of that parameter. Pagination continues from the end of the
+ // previous results that returned the NextToken value. This value is null when
+ // there are no more results to return.
+ NextToken *string
+
+ noSmithyDocumentSerde
+}
+
+type GetVpnConnectionDeviceTypesOutput struct {
+
+ // The NextToken value to include in a future GetVpnConnectionDeviceTypes request.
+ // When the results of a GetVpnConnectionDeviceTypes request exceed MaxResults,
+ // this value can be used to retrieve the next page of results. This value is null
+ // when there are no more results to return.
+ NextToken *string
+
+ // List of customer gateway devices that have a sample configuration file available
+ // for use.
+ VpnConnectionDeviceTypes []types.VpnConnectionDeviceType
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationGetVpnConnectionDeviceTypesMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpGetVpnConnectionDeviceTypes{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpGetVpnConnectionDeviceTypes{}, 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_opGetVpnConnectionDeviceTypes(options.Region), middleware.Before); 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
+}
+
+// GetVpnConnectionDeviceTypesAPIClient is a client that implements the
+// GetVpnConnectionDeviceTypes operation.
+type GetVpnConnectionDeviceTypesAPIClient interface {
+ GetVpnConnectionDeviceTypes(context.Context, *GetVpnConnectionDeviceTypesInput, ...func(*Options)) (*GetVpnConnectionDeviceTypesOutput, error)
+}
+
+var _ GetVpnConnectionDeviceTypesAPIClient = (*Client)(nil)
+
+// GetVpnConnectionDeviceTypesPaginatorOptions is the paginator options for
+// GetVpnConnectionDeviceTypes
+type GetVpnConnectionDeviceTypesPaginatorOptions struct {
+ // The maximum number of results returned by GetVpnConnectionDeviceTypes in
+ // paginated output. When this parameter is used, GetVpnConnectionDeviceTypes only
+ // returns MaxResults results in a single page along with a NextToken response
+ // element. The remaining results of the initial request can be seen by sending
+ // another GetVpnConnectionDeviceTypes request with the returned NextToken value.
+ // This value can be between 200 and 1000. If this parameter is not used, then
+ // GetVpnConnectionDeviceTypes returns all results.
+ 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
+}
+
+// GetVpnConnectionDeviceTypesPaginator is a paginator for
+// GetVpnConnectionDeviceTypes
+type GetVpnConnectionDeviceTypesPaginator struct {
+ options GetVpnConnectionDeviceTypesPaginatorOptions
+ client GetVpnConnectionDeviceTypesAPIClient
+ params *GetVpnConnectionDeviceTypesInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewGetVpnConnectionDeviceTypesPaginator returns a new
+// GetVpnConnectionDeviceTypesPaginator
+func NewGetVpnConnectionDeviceTypesPaginator(client GetVpnConnectionDeviceTypesAPIClient, params *GetVpnConnectionDeviceTypesInput, optFns ...func(*GetVpnConnectionDeviceTypesPaginatorOptions)) *GetVpnConnectionDeviceTypesPaginator {
+ if params == nil {
+ params = &GetVpnConnectionDeviceTypesInput{}
+ }
+
+ options := GetVpnConnectionDeviceTypesPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &GetVpnConnectionDeviceTypesPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *GetVpnConnectionDeviceTypesPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next GetVpnConnectionDeviceTypes page.
+func (p *GetVpnConnectionDeviceTypesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*GetVpnConnectionDeviceTypesOutput, 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.GetVpnConnectionDeviceTypes(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_opGetVpnConnectionDeviceTypes(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "GetVpnConnectionDeviceTypes",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ImportClientVpnClientCertificateRevocationList.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ImportClientVpnClientCertificateRevocationList.go
new file mode 100644
index 00000000..547f5b45
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ImportClientVpnClientCertificateRevocationList.go
@@ -0,0 +1,138 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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"
+)
+
+// Uploads a client certificate revocation list to the specified Client VPN
+// endpoint. Uploading a client certificate revocation list overwrites the existing
+// client certificate revocation list. Uploading a client certificate revocation
+// list resets existing client connections.
+func (c *Client) ImportClientVpnClientCertificateRevocationList(ctx context.Context, params *ImportClientVpnClientCertificateRevocationListInput, optFns ...func(*Options)) (*ImportClientVpnClientCertificateRevocationListOutput, error) {
+ if params == nil {
+ params = &ImportClientVpnClientCertificateRevocationListInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ImportClientVpnClientCertificateRevocationList", params, optFns, c.addOperationImportClientVpnClientCertificateRevocationListMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ImportClientVpnClientCertificateRevocationListOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ImportClientVpnClientCertificateRevocationListInput struct {
+
+ // The client certificate revocation list file. For more information, see Generate
+ // a Client Certificate Revocation List
+ // (https://docs.aws.amazon.com/vpn/latest/clientvpn-admin/cvpn-working-certificates.html#cvpn-working-certificates-generate)
+ // in the Client VPN Administrator Guide.
+ //
+ // This member is required.
+ CertificateRevocationList *string
+
+ // The ID of the Client VPN endpoint to which the client certificate revocation
+ // list applies.
+ //
+ // This member is required.
+ ClientVpnEndpointId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type ImportClientVpnClientCertificateRevocationListOutput struct {
+
+ // Returns true if the request succeeds; otherwise, it returns an error.
+ Return *bool
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationImportClientVpnClientCertificateRevocationListMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpImportClientVpnClientCertificateRevocationList{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpImportClientVpnClientCertificateRevocationList{}, 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 = addOpImportClientVpnClientCertificateRevocationListValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opImportClientVpnClientCertificateRevocationList(options.Region), middleware.Before); 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_opImportClientVpnClientCertificateRevocationList(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "ImportClientVpnClientCertificateRevocationList",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ImportImage.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ImportImage.go
new file mode 100644
index 00000000..9f7c614f
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ImportImage.go
@@ -0,0 +1,259 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Import single or multi-volume disk images or EBS snapshots into an Amazon
+// Machine Image (AMI). For more information, see Importing a VM as an image using
+// VM Import/Export
+// (https://docs.aws.amazon.com/vm-import/latest/userguide/vmimport-image-import.html)
+// in the VM Import/Export User Guide.
+func (c *Client) ImportImage(ctx context.Context, params *ImportImageInput, optFns ...func(*Options)) (*ImportImageOutput, error) {
+ if params == nil {
+ params = &ImportImageInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ImportImage", params, optFns, c.addOperationImportImageMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ImportImageOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ImportImageInput struct {
+
+ // The architecture of the virtual machine. Valid values: i386 | x86_64 | arm64
+ Architecture *string
+
+ // The boot mode of the virtual machine.
+ BootMode types.BootModeValues
+
+ // The client-specific data.
+ ClientData *types.ClientData
+
+ // The token to enable idempotency for VM import requests.
+ ClientToken *string
+
+ // A description string for the import image task.
+ Description *string
+
+ // Information about the disk containers.
+ DiskContainers []types.ImageDiskContainer
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // Specifies whether the destination AMI of the imported image should be encrypted.
+ // The default KMS key for EBS is used unless you specify a non-default KMS key
+ // using KmsKeyId. For more information, see Amazon EBS Encryption
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html) in the
+ // Amazon Elastic Compute Cloud User Guide.
+ Encrypted *bool
+
+ // The target hypervisor platform. Valid values: xen
+ Hypervisor *string
+
+ // An identifier for the symmetric KMS key to use when creating the encrypted AMI.
+ // This parameter is only required if you want to use a non-default KMS key; if
+ // this parameter is not specified, the default KMS key for EBS is used. If a
+ // KmsKeyId is specified, the Encrypted flag must also be set. The KMS key
+ // identifier may be provided in any of the following formats:
+ //
+ // * Key ID
+ //
+ // * Key
+ // alias. The alias ARN contains the arn:aws:kms namespace, followed by the Region
+ // of the key, the Amazon Web Services account ID of the key owner, the alias
+ // namespace, and then the key alias. For example,
+ // arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias.
+ //
+ // * ARN using key ID. The
+ // ID ARN contains the arn:aws:kms namespace, followed by the Region of the key,
+ // the Amazon Web Services account ID of the key owner, the key namespace, and then
+ // the key ID. For example,
+ // arn:aws:kms:us-east-1:012345678910:key/abcd1234-a123-456a-a12b-a123b4cd56ef.
+ //
+ // *
+ // ARN using key alias. The alias ARN contains the arn:aws:kms namespace, followed
+ // by the Region of the key, the Amazon Web Services account ID of the key owner,
+ // the alias namespace, and then the key alias. For example,
+ // arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias.
+ //
+ // Amazon Web Services
+ // parses KmsKeyId asynchronously, meaning that the action you call may appear to
+ // complete even though you provided an invalid identifier. This action will
+ // eventually report failure. The specified KMS key must exist in the Region that
+ // the AMI is being copied to. Amazon EBS does not support asymmetric KMS keys.
+ KmsKeyId *string
+
+ // The ARNs of the license configurations.
+ LicenseSpecifications []types.ImportImageLicenseConfigurationRequest
+
+ // The license type to be used for the Amazon Machine Image (AMI) after importing.
+ // By default, we detect the source-system operating system (OS) and apply the
+ // appropriate license. Specify AWS to replace the source-system license with an
+ // Amazon Web Services license, if appropriate. Specify BYOL to retain the
+ // source-system license, if appropriate. To use BYOL, you must have existing
+ // licenses with rights to use these licenses in a third party cloud, such as
+ // Amazon Web Services. For more information, see Prerequisites
+ // (https://docs.aws.amazon.com/vm-import/latest/userguide/vmimport-image-import.html#prerequisites-image)
+ // in the VM Import/Export User Guide.
+ LicenseType *string
+
+ // The operating system of the virtual machine. Valid values: Windows | Linux
+ Platform *string
+
+ // The name of the role to use when not using the default role, 'vmimport'.
+ RoleName *string
+
+ // The tags to apply to the import image task during creation.
+ TagSpecifications []types.TagSpecification
+
+ // The usage operation value. For more information, see AMI billing information
+ // fields
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/billing-info-fields.html)
+ // in the Amazon Elastic Compute Cloud User Guide.
+ UsageOperation *string
+
+ noSmithyDocumentSerde
+}
+
+type ImportImageOutput struct {
+
+ // The architecture of the virtual machine.
+ Architecture *string
+
+ // A description of the import task.
+ Description *string
+
+ // Indicates whether the AMI is encrypted.
+ Encrypted *bool
+
+ // The target hypervisor of the import task.
+ Hypervisor *string
+
+ // The ID of the Amazon Machine Image (AMI) created by the import task.
+ ImageId *string
+
+ // The task ID of the import image task.
+ ImportTaskId *string
+
+ // The identifier for the symmetric KMS key that was used to create the encrypted
+ // AMI.
+ KmsKeyId *string
+
+ // The ARNs of the license configurations.
+ LicenseSpecifications []types.ImportImageLicenseConfigurationResponse
+
+ // The license type of the virtual machine.
+ LicenseType *string
+
+ // The operating system of the virtual machine.
+ Platform *string
+
+ // The progress of the task.
+ Progress *string
+
+ // Information about the snapshots.
+ SnapshotDetails []types.SnapshotDetail
+
+ // A brief status of the task.
+ Status *string
+
+ // A detailed status message of the import task.
+ StatusMessage *string
+
+ // Any tags assigned to the import image task.
+ Tags []types.Tag
+
+ // The usage operation value.
+ UsageOperation *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationImportImageMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpImportImage{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpImportImage{}, 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_opImportImage(options.Region), middleware.Before); 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_opImportImage(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "ImportImage",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ImportInstance.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ImportInstance.go
new file mode 100644
index 00000000..b167eeea
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ImportInstance.go
@@ -0,0 +1,144 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Creates an import instance task using metadata from the specified disk image.
+// This API action supports only single-volume VMs. To import multi-volume VMs, use
+// ImportImage instead. This API action is not supported by the Command Line
+// Interface (CLI). For information about using the Amazon EC2 CLI, which is
+// deprecated, see Importing a VM to Amazon EC2
+// (https://awsdocs.s3.amazonaws.com/EC2/ec2-clt.pdf#UsingVirtualMachinesinAmazonEC2)
+// in the Amazon EC2 CLI Reference PDF file. For information about the import
+// manifest referenced by this API action, see VM Import Manifest
+// (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/manifest.html).
+func (c *Client) ImportInstance(ctx context.Context, params *ImportInstanceInput, optFns ...func(*Options)) (*ImportInstanceOutput, error) {
+ if params == nil {
+ params = &ImportInstanceInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ImportInstance", params, optFns, c.addOperationImportInstanceMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ImportInstanceOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ImportInstanceInput struct {
+
+ // The instance operating system.
+ //
+ // This member is required.
+ Platform types.PlatformValues
+
+ // A description for the instance being imported.
+ Description *string
+
+ // The disk image.
+ DiskImages []types.DiskImage
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The launch specification.
+ LaunchSpecification *types.ImportInstanceLaunchSpecification
+
+ noSmithyDocumentSerde
+}
+
+type ImportInstanceOutput struct {
+
+ // Information about the conversion task.
+ ConversionTask *types.ConversionTask
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationImportInstanceMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpImportInstance{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpImportInstance{}, 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 = addOpImportInstanceValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opImportInstance(options.Region), middleware.Before); 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_opImportInstance(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "ImportInstance",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ImportKeyPair.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ImportKeyPair.go
new file mode 100644
index 00000000..1f062b9b
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ImportKeyPair.go
@@ -0,0 +1,153 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Imports the public key from an RSA or ED25519 key pair that you created with a
+// third-party tool. Compare this with CreateKeyPair, in which Amazon Web Services
+// creates the key pair and gives the keys to you (Amazon Web Services keeps a copy
+// of the public key). With ImportKeyPair, you create the key pair and give Amazon
+// Web Services just the public key. The private key is never transferred between
+// you and Amazon Web Services. For more information about key pairs, see Amazon
+// EC2 key pairs
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html) in the
+// Amazon Elastic Compute Cloud User Guide.
+func (c *Client) ImportKeyPair(ctx context.Context, params *ImportKeyPairInput, optFns ...func(*Options)) (*ImportKeyPairOutput, error) {
+ if params == nil {
+ params = &ImportKeyPairInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ImportKeyPair", params, optFns, c.addOperationImportKeyPairMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ImportKeyPairOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ImportKeyPairInput struct {
+
+ // A unique name for the key pair.
+ //
+ // This member is required.
+ KeyName *string
+
+ // The public key. For API calls, the text must be base64-encoded. For command line
+ // tools, base64 encoding is performed for you.
+ //
+ // This member is required.
+ PublicKeyMaterial []byte
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The tags to apply to the imported key pair.
+ TagSpecifications []types.TagSpecification
+
+ noSmithyDocumentSerde
+}
+
+type ImportKeyPairOutput struct {
+
+ // The MD5 public key fingerprint as specified in section 4 of RFC 4716.
+ KeyFingerprint *string
+
+ // The key pair name that you provided.
+ KeyName *string
+
+ // The ID of the resulting key pair.
+ KeyPairId *string
+
+ // The tags applied to the imported key pair.
+ Tags []types.Tag
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationImportKeyPairMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpImportKeyPair{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpImportKeyPair{}, 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 = addOpImportKeyPairValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opImportKeyPair(options.Region), middleware.Before); 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_opImportKeyPair(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "ImportKeyPair",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ImportSnapshot.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ImportSnapshot.go
new file mode 100644
index 00000000..22925d9c
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ImportSnapshot.go
@@ -0,0 +1,190 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Imports a disk into an EBS snapshot. For more information, see Importing a disk
+// as a snapshot using VM Import/Export
+// (https://docs.aws.amazon.com/vm-import/latest/userguide/vmimport-import-snapshot.html)
+// in the VM Import/Export User Guide.
+func (c *Client) ImportSnapshot(ctx context.Context, params *ImportSnapshotInput, optFns ...func(*Options)) (*ImportSnapshotOutput, error) {
+ if params == nil {
+ params = &ImportSnapshotInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ImportSnapshot", params, optFns, c.addOperationImportSnapshotMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ImportSnapshotOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ImportSnapshotInput struct {
+
+ // The client-specific data.
+ ClientData *types.ClientData
+
+ // Token to enable idempotency for VM import requests.
+ ClientToken *string
+
+ // The description string for the import snapshot task.
+ Description *string
+
+ // Information about the disk container.
+ DiskContainer *types.SnapshotDiskContainer
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // Specifies whether the destination snapshot of the imported image should be
+ // encrypted. The default KMS key for EBS is used unless you specify a non-default
+ // KMS key using KmsKeyId. For more information, see Amazon EBS Encryption
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html) in the
+ // Amazon Elastic Compute Cloud User Guide.
+ Encrypted *bool
+
+ // An identifier for the symmetric KMS key to use when creating the encrypted
+ // snapshot. This parameter is only required if you want to use a non-default KMS
+ // key; if this parameter is not specified, the default KMS key for EBS is used. If
+ // a KmsKeyId is specified, the Encrypted flag must also be set. The KMS key
+ // identifier may be provided in any of the following formats:
+ //
+ // * Key ID
+ //
+ // * Key
+ // alias. The alias ARN contains the arn:aws:kms namespace, followed by the Region
+ // of the key, the Amazon Web Services account ID of the key owner, the alias
+ // namespace, and then the key alias. For example,
+ // arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias.
+ //
+ // * ARN using key ID. The
+ // ID ARN contains the arn:aws:kms namespace, followed by the Region of the key,
+ // the Amazon Web Services account ID of the key owner, the key namespace, and then
+ // the key ID. For example,
+ // arn:aws:kms:us-east-1:012345678910:key/abcd1234-a123-456a-a12b-a123b4cd56ef.
+ //
+ // *
+ // ARN using key alias. The alias ARN contains the arn:aws:kms namespace, followed
+ // by the Region of the key, the Amazon Web Services account ID of the key owner,
+ // the alias namespace, and then the key alias. For example,
+ // arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias.
+ //
+ // Amazon Web Services
+ // parses KmsKeyId asynchronously, meaning that the action you call may appear to
+ // complete even though you provided an invalid identifier. This action will
+ // eventually report failure. The specified KMS key must exist in the Region that
+ // the snapshot is being copied to. Amazon EBS does not support asymmetric KMS
+ // keys.
+ KmsKeyId *string
+
+ // The name of the role to use when not using the default role, 'vmimport'.
+ RoleName *string
+
+ // The tags to apply to the import snapshot task during creation.
+ TagSpecifications []types.TagSpecification
+
+ noSmithyDocumentSerde
+}
+
+type ImportSnapshotOutput struct {
+
+ // A description of the import snapshot task.
+ Description *string
+
+ // The ID of the import snapshot task.
+ ImportTaskId *string
+
+ // Information about the import snapshot task.
+ SnapshotTaskDetail *types.SnapshotTaskDetail
+
+ // Any tags assigned to the import snapshot task.
+ Tags []types.Tag
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationImportSnapshotMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpImportSnapshot{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpImportSnapshot{}, 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_opImportSnapshot(options.Region), middleware.Before); 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_opImportSnapshot(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "ImportSnapshot",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ImportVolume.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ImportVolume.go
new file mode 100644
index 00000000..f92267df
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ImportVolume.go
@@ -0,0 +1,149 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Creates an import volume task using metadata from the specified disk image. This
+// API action supports only single-volume VMs. To import multi-volume VMs, use
+// ImportImage instead. To import a disk to a snapshot, use ImportSnapshot instead.
+// This API action is not supported by the Command Line Interface (CLI). For
+// information about using the Amazon EC2 CLI, which is deprecated, see Importing
+// Disks to Amazon EBS
+// (https://awsdocs.s3.amazonaws.com/EC2/ec2-clt.pdf#importing-your-volumes-into-amazon-ebs)
+// in the Amazon EC2 CLI Reference PDF file. For information about the import
+// manifest referenced by this API action, see VM Import Manifest
+// (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/manifest.html).
+func (c *Client) ImportVolume(ctx context.Context, params *ImportVolumeInput, optFns ...func(*Options)) (*ImportVolumeOutput, error) {
+ if params == nil {
+ params = &ImportVolumeInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ImportVolume", params, optFns, c.addOperationImportVolumeMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ImportVolumeOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ImportVolumeInput struct {
+
+ // The Availability Zone for the resulting EBS volume.
+ //
+ // This member is required.
+ AvailabilityZone *string
+
+ // The disk image.
+ //
+ // This member is required.
+ Image *types.DiskImageDetail
+
+ // The volume size.
+ //
+ // This member is required.
+ Volume *types.VolumeDetail
+
+ // A description of the volume.
+ Description *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type ImportVolumeOutput struct {
+
+ // Information about the conversion task.
+ ConversionTask *types.ConversionTask
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationImportVolumeMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpImportVolume{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpImportVolume{}, 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 = addOpImportVolumeValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opImportVolume(options.Region), middleware.Before); 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_opImportVolume(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "ImportVolume",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyAddressAttribute.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyAddressAttribute.go
new file mode 100644
index 00000000..bdbf7bbc
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyAddressAttribute.go
@@ -0,0 +1,132 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Modifies an attribute of the specified Elastic IP address. For requirements, see
+// Using reverse DNS for email applications
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html#Using_Elastic_Addressing_Reverse_DNS).
+func (c *Client) ModifyAddressAttribute(ctx context.Context, params *ModifyAddressAttributeInput, optFns ...func(*Options)) (*ModifyAddressAttributeOutput, error) {
+ if params == nil {
+ params = &ModifyAddressAttributeInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ModifyAddressAttribute", params, optFns, c.addOperationModifyAddressAttributeMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ModifyAddressAttributeOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ModifyAddressAttributeInput struct {
+
+ // [EC2-VPC] The allocation ID.
+ //
+ // This member is required.
+ AllocationId *string
+
+ // The domain name to modify for the IP address.
+ DomainName *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type ModifyAddressAttributeOutput struct {
+
+ // Information about the Elastic IP address.
+ Address *types.AddressAttribute
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationModifyAddressAttributeMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpModifyAddressAttribute{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyAddressAttribute{}, 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 = addOpModifyAddressAttributeValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyAddressAttribute(options.Region), middleware.Before); 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_opModifyAddressAttribute(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "ModifyAddressAttribute",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyAvailabilityZoneGroup.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyAvailabilityZoneGroup.go
new file mode 100644
index 00000000..eef51bf0
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyAvailabilityZoneGroup.go
@@ -0,0 +1,139 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Changes the opt-in status of the Local Zone and Wavelength Zone group for your
+// account. Use DescribeAvailabilityZones
+// (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeAvailabilityZones.html)
+// to view the value for GroupName.
+func (c *Client) ModifyAvailabilityZoneGroup(ctx context.Context, params *ModifyAvailabilityZoneGroupInput, optFns ...func(*Options)) (*ModifyAvailabilityZoneGroupOutput, error) {
+ if params == nil {
+ params = &ModifyAvailabilityZoneGroupInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ModifyAvailabilityZoneGroup", params, optFns, c.addOperationModifyAvailabilityZoneGroupMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ModifyAvailabilityZoneGroupOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ModifyAvailabilityZoneGroupInput struct {
+
+ // The name of the Availability Zone group, Local Zone group, or Wavelength Zone
+ // group.
+ //
+ // This member is required.
+ GroupName *string
+
+ // Indicates whether you are opted in to the Local Zone group or Wavelength Zone
+ // group. The only valid value is opted-in. You must contact AWS Support
+ // (https://console.aws.amazon.com/support/home#/case/create%3FissueType=customer-service%26serviceCode=general-info%26getting-started%26categoryCode=using-aws%26services)
+ // to opt out of a Local Zone group, or Wavelength Zone group.
+ //
+ // This member is required.
+ OptInStatus types.ModifyAvailabilityZoneOptInStatus
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type ModifyAvailabilityZoneGroupOutput struct {
+
+ // Is true if the request succeeds, and an error otherwise.
+ Return *bool
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationModifyAvailabilityZoneGroupMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpModifyAvailabilityZoneGroup{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyAvailabilityZoneGroup{}, 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 = addOpModifyAvailabilityZoneGroupValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyAvailabilityZoneGroup(options.Region), middleware.Before); 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_opModifyAvailabilityZoneGroup(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "ModifyAvailabilityZoneGroup",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyCapacityReservation.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyCapacityReservation.go
new file mode 100644
index 00000000..5be4f26b
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyCapacityReservation.go
@@ -0,0 +1,162 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "time"
+)
+
+// Modifies a Capacity Reservation's capacity and the conditions under which it is
+// to be released. You cannot change a Capacity Reservation's instance type, EBS
+// optimization, instance store settings, platform, Availability Zone, or instance
+// eligibility. If you need to modify any of these attributes, we recommend that
+// you cancel the Capacity Reservation, and then create a new one with the required
+// attributes.
+func (c *Client) ModifyCapacityReservation(ctx context.Context, params *ModifyCapacityReservationInput, optFns ...func(*Options)) (*ModifyCapacityReservationOutput, error) {
+ if params == nil {
+ params = &ModifyCapacityReservationInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ModifyCapacityReservation", params, optFns, c.addOperationModifyCapacityReservationMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ModifyCapacityReservationOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ModifyCapacityReservationInput struct {
+
+ // The ID of the Capacity Reservation.
+ //
+ // This member is required.
+ CapacityReservationId *string
+
+ // Reserved. Capacity Reservations you have created are accepted by default.
+ Accept *bool
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The date and time at which the Capacity Reservation expires. When a Capacity
+ // Reservation expires, the reserved capacity is released and you can no longer
+ // launch instances into it. The Capacity Reservation's state changes to expired
+ // when it reaches its end date and time. The Capacity Reservation is cancelled
+ // within an hour from the specified time. For example, if you specify 5/31/2019,
+ // 13:30:55, the Capacity Reservation is guaranteed to end between 13:30:55 and
+ // 14:30:55 on 5/31/2019. You must provide an EndDate value if EndDateType is
+ // limited. Omit EndDate if EndDateType is unlimited.
+ EndDate *time.Time
+
+ // Indicates the way in which the Capacity Reservation ends. A Capacity Reservation
+ // can have one of the following end types:
+ //
+ // * unlimited - The Capacity Reservation
+ // remains active until you explicitly cancel it. Do not provide an EndDate value
+ // if EndDateType is unlimited.
+ //
+ // * limited - The Capacity Reservation expires
+ // automatically at a specified date and time. You must provide an EndDate value if
+ // EndDateType is limited.
+ EndDateType types.EndDateType
+
+ // The number of instances for which to reserve capacity. The number of instances
+ // can't be increased or decreased by more than 1000 in a single request.
+ InstanceCount *int32
+
+ noSmithyDocumentSerde
+}
+
+type ModifyCapacityReservationOutput struct {
+
+ // Returns true if the request succeeds; otherwise, it returns an error.
+ Return *bool
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationModifyCapacityReservationMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpModifyCapacityReservation{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyCapacityReservation{}, 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 = addOpModifyCapacityReservationValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyCapacityReservation(options.Region), middleware.Before); 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_opModifyCapacityReservation(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "ModifyCapacityReservation",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyClientVpnEndpoint.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyClientVpnEndpoint.go
new file mode 100644
index 00000000..ab71ef2e
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyClientVpnEndpoint.go
@@ -0,0 +1,177 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Modifies the specified Client VPN endpoint. Modifying the DNS server resets
+// existing client connections.
+func (c *Client) ModifyClientVpnEndpoint(ctx context.Context, params *ModifyClientVpnEndpointInput, optFns ...func(*Options)) (*ModifyClientVpnEndpointOutput, error) {
+ if params == nil {
+ params = &ModifyClientVpnEndpointInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ModifyClientVpnEndpoint", params, optFns, c.addOperationModifyClientVpnEndpointMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ModifyClientVpnEndpointOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ModifyClientVpnEndpointInput struct {
+
+ // The ID of the Client VPN endpoint to modify.
+ //
+ // This member is required.
+ ClientVpnEndpointId *string
+
+ // The options for managing connection authorization for new client connections.
+ ClientConnectOptions *types.ClientConnectOptions
+
+ // Information about the client connection logging options. If you enable client
+ // connection logging, data about client connections is sent to a Cloudwatch Logs
+ // log stream. The following information is logged:
+ //
+ // * Client connection
+ // requests
+ //
+ // * Client connection results (successful and unsuccessful)
+ //
+ // * Reasons
+ // for unsuccessful client connection requests
+ //
+ // * Client connection termination
+ // time
+ ConnectionLogOptions *types.ConnectionLogOptions
+
+ // A brief description of the Client VPN endpoint.
+ Description *string
+
+ // Information about the DNS servers to be used by Client VPN connections. A Client
+ // VPN endpoint can have up to two DNS servers.
+ DnsServers *types.DnsServersOptionsModifyStructure
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The IDs of one or more security groups to apply to the target network.
+ SecurityGroupIds []string
+
+ // Specify whether to enable the self-service portal for the Client VPN endpoint.
+ SelfServicePortal types.SelfServicePortal
+
+ // The ARN of the server certificate to be used. The server certificate must be
+ // provisioned in Certificate Manager (ACM).
+ ServerCertificateArn *string
+
+ // Indicates whether the VPN is split-tunnel. For information about split-tunnel
+ // VPN endpoints, see Split-tunnel Client VPN endpoint
+ // (https://docs.aws.amazon.com/vpn/latest/clientvpn-admin/split-tunnel-vpn.html)
+ // in the Client VPN Administrator Guide.
+ SplitTunnel *bool
+
+ // The ID of the VPC to associate with the Client VPN endpoint.
+ VpcId *string
+
+ // The port number to assign to the Client VPN endpoint for TCP and UDP traffic.
+ // Valid Values: 443 | 1194 Default Value: 443
+ VpnPort *int32
+
+ noSmithyDocumentSerde
+}
+
+type ModifyClientVpnEndpointOutput struct {
+
+ // Returns true if the request succeeds; otherwise, it returns an error.
+ Return *bool
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationModifyClientVpnEndpointMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpModifyClientVpnEndpoint{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyClientVpnEndpoint{}, 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 = addOpModifyClientVpnEndpointValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyClientVpnEndpoint(options.Region), middleware.Before); 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_opModifyClientVpnEndpoint(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "ModifyClientVpnEndpoint",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyDefaultCreditSpecification.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyDefaultCreditSpecification.go
new file mode 100644
index 00000000..aafc7d5e
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyDefaultCreditSpecification.go
@@ -0,0 +1,145 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Modifies the default credit option for CPU usage of burstable performance
+// instances. The default credit option is set at the account level per Amazon Web
+// Services Region, and is specified per instance family. All new burstable
+// performance instances in the account launch using the default credit option.
+// ModifyDefaultCreditSpecification is an asynchronous operation, which works at an
+// Amazon Web Services Region level and modifies the credit option for each
+// Availability Zone. All zones in a Region are updated within five minutes. But if
+// instances are launched during this operation, they might not get the new credit
+// option until the zone is updated. To verify whether the update has occurred, you
+// can call GetDefaultCreditSpecification and check DefaultCreditSpecification for
+// updates. For more information, see Burstable performance instances
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-performance-instances.html)
+// in the Amazon EC2 User Guide.
+func (c *Client) ModifyDefaultCreditSpecification(ctx context.Context, params *ModifyDefaultCreditSpecificationInput, optFns ...func(*Options)) (*ModifyDefaultCreditSpecificationOutput, error) {
+ if params == nil {
+ params = &ModifyDefaultCreditSpecificationInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ModifyDefaultCreditSpecification", params, optFns, c.addOperationModifyDefaultCreditSpecificationMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ModifyDefaultCreditSpecificationOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ModifyDefaultCreditSpecificationInput struct {
+
+ // The credit option for CPU usage of the instance family. Valid Values: standard |
+ // unlimited
+ //
+ // This member is required.
+ CpuCredits *string
+
+ // The instance family.
+ //
+ // This member is required.
+ InstanceFamily types.UnlimitedSupportedInstanceFamily
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type ModifyDefaultCreditSpecificationOutput struct {
+
+ // The default credit option for CPU usage of the instance family.
+ InstanceFamilyCreditSpecification *types.InstanceFamilyCreditSpecification
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationModifyDefaultCreditSpecificationMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpModifyDefaultCreditSpecification{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyDefaultCreditSpecification{}, 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 = addOpModifyDefaultCreditSpecificationValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyDefaultCreditSpecification(options.Region), middleware.Before); 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_opModifyDefaultCreditSpecification(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "ModifyDefaultCreditSpecification",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyEbsDefaultKmsKeyId.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyEbsDefaultKmsKeyId.go
new file mode 100644
index 00000000..c740a110
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyEbsDefaultKmsKeyId.go
@@ -0,0 +1,157 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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"
+)
+
+// Changes the default KMS key for EBS encryption by default for your account in
+// this Region. Amazon Web Services creates a unique Amazon Web Services managed
+// KMS key in each Region for use with encryption by default. If you change the
+// default KMS key to a symmetric customer managed KMS key, it is used instead of
+// the Amazon Web Services managed KMS key. To reset the default KMS key to the
+// Amazon Web Services managed KMS key for EBS, use ResetEbsDefaultKmsKeyId. Amazon
+// EBS does not support asymmetric KMS keys. If you delete or disable the customer
+// managed KMS key that you specified for use with encryption by default, your
+// instances will fail to launch. For more information, see Amazon EBS encryption
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html) in the
+// Amazon Elastic Compute Cloud User Guide.
+func (c *Client) ModifyEbsDefaultKmsKeyId(ctx context.Context, params *ModifyEbsDefaultKmsKeyIdInput, optFns ...func(*Options)) (*ModifyEbsDefaultKmsKeyIdOutput, error) {
+ if params == nil {
+ params = &ModifyEbsDefaultKmsKeyIdInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ModifyEbsDefaultKmsKeyId", params, optFns, c.addOperationModifyEbsDefaultKmsKeyIdMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ModifyEbsDefaultKmsKeyIdOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ModifyEbsDefaultKmsKeyIdInput struct {
+
+ // The identifier of the Key Management Service (KMS) KMS key to use for Amazon EBS
+ // encryption. If this parameter is not specified, your KMS key for Amazon EBS is
+ // used. If KmsKeyId is specified, the encrypted state must be true. You can
+ // specify the KMS key using any of the following:
+ //
+ // * Key ID. For example,
+ // 1234abcd-12ab-34cd-56ef-1234567890ab.
+ //
+ // * Key alias. For example,
+ // alias/ExampleAlias.
+ //
+ // * Key ARN. For example,
+ // arn:aws:kms:us-east-1:012345678910:key/1234abcd-12ab-34cd-56ef-1234567890ab.
+ //
+ // *
+ // Alias ARN. For example,
+ // arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias.
+ //
+ // Amazon Web Services
+ // authenticates the KMS key asynchronously. Therefore, if you specify an ID,
+ // alias, or ARN that is not valid, the action can appear to complete, but
+ // eventually fails. Amazon EBS does not support asymmetric KMS keys.
+ //
+ // This member is required.
+ KmsKeyId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type ModifyEbsDefaultKmsKeyIdOutput struct {
+
+ // The Amazon Resource Name (ARN) of the default KMS key for encryption by default.
+ KmsKeyId *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationModifyEbsDefaultKmsKeyIdMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpModifyEbsDefaultKmsKeyId{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyEbsDefaultKmsKeyId{}, 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 = addOpModifyEbsDefaultKmsKeyIdValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyEbsDefaultKmsKeyId(options.Region), middleware.Before); 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_opModifyEbsDefaultKmsKeyId(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "ModifyEbsDefaultKmsKeyId",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyFleet.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyFleet.go
new file mode 100644
index 00000000..e25f8db2
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyFleet.go
@@ -0,0 +1,162 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Modifies the specified EC2 Fleet. You can only modify an EC2 Fleet request of
+// type maintain. While the EC2 Fleet is being modified, it is in the modifying
+// state. To scale up your EC2 Fleet, increase its target capacity. The EC2 Fleet
+// launches the additional Spot Instances according to the allocation strategy for
+// the EC2 Fleet request. If the allocation strategy is lowest-price, the EC2 Fleet
+// launches instances using the Spot Instance pool with the lowest price. If the
+// allocation strategy is diversified, the EC2 Fleet distributes the instances
+// across the Spot Instance pools. If the allocation strategy is
+// capacity-optimized, EC2 Fleet launches instances from Spot Instance pools with
+// optimal capacity for the number of instances that are launching. To scale down
+// your EC2 Fleet, decrease its target capacity. First, the EC2 Fleet cancels any
+// open requests that exceed the new target capacity. You can request that the EC2
+// Fleet terminate Spot Instances until the size of the fleet no longer exceeds the
+// new target capacity. If the allocation strategy is lowest-price, the EC2 Fleet
+// terminates the instances with the highest price per unit. If the allocation
+// strategy is capacity-optimized, the EC2 Fleet terminates the instances in the
+// Spot Instance pools that have the least available Spot Instance capacity. If the
+// allocation strategy is diversified, the EC2 Fleet terminates instances across
+// the Spot Instance pools. Alternatively, you can request that the EC2 Fleet keep
+// the fleet at its current size, but not replace any Spot Instances that are
+// interrupted or that you terminate manually. If you are finished with your EC2
+// Fleet for now, but will use it again later, you can set the target capacity to
+// 0.
+func (c *Client) ModifyFleet(ctx context.Context, params *ModifyFleetInput, optFns ...func(*Options)) (*ModifyFleetOutput, error) {
+ if params == nil {
+ params = &ModifyFleetInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ModifyFleet", params, optFns, c.addOperationModifyFleetMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ModifyFleetOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ModifyFleetInput struct {
+
+ // The ID of the EC2 Fleet.
+ //
+ // This member is required.
+ FleetId *string
+
+ // Reserved.
+ Context *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // Indicates whether running instances should be terminated if the total target
+ // capacity of the EC2 Fleet is decreased below the current size of the EC2 Fleet.
+ ExcessCapacityTerminationPolicy types.FleetExcessCapacityTerminationPolicy
+
+ // The launch template and overrides.
+ LaunchTemplateConfigs []types.FleetLaunchTemplateConfigRequest
+
+ // The size of the EC2 Fleet.
+ TargetCapacitySpecification *types.TargetCapacitySpecificationRequest
+
+ noSmithyDocumentSerde
+}
+
+type ModifyFleetOutput struct {
+
+ // Is true if the request succeeds, and an error otherwise.
+ Return *bool
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationModifyFleetMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpModifyFleet{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyFleet{}, 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 = addOpModifyFleetValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyFleet(options.Region), middleware.Before); 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_opModifyFleet(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "ModifyFleet",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyFpgaImageAttribute.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyFpgaImageAttribute.go
new file mode 100644
index 00000000..20dd5552
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyFpgaImageAttribute.go
@@ -0,0 +1,154 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Modifies the specified attribute of the specified Amazon FPGA Image (AFI).
+func (c *Client) ModifyFpgaImageAttribute(ctx context.Context, params *ModifyFpgaImageAttributeInput, optFns ...func(*Options)) (*ModifyFpgaImageAttributeOutput, error) {
+ if params == nil {
+ params = &ModifyFpgaImageAttributeInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ModifyFpgaImageAttribute", params, optFns, c.addOperationModifyFpgaImageAttributeMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ModifyFpgaImageAttributeOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ModifyFpgaImageAttributeInput struct {
+
+ // The ID of the AFI.
+ //
+ // This member is required.
+ FpgaImageId *string
+
+ // The name of the attribute.
+ Attribute types.FpgaImageAttributeName
+
+ // A description for the AFI.
+ Description *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The load permission for the AFI.
+ LoadPermission *types.LoadPermissionModifications
+
+ // A name for the AFI.
+ Name *string
+
+ // The operation type.
+ OperationType types.OperationType
+
+ // The product codes. After you add a product code to an AFI, it can't be removed.
+ // This parameter is valid only when modifying the productCodes attribute.
+ ProductCodes []string
+
+ // The user groups. This parameter is valid only when modifying the loadPermission
+ // attribute.
+ UserGroups []string
+
+ // The AWS account IDs. This parameter is valid only when modifying the
+ // loadPermission attribute.
+ UserIds []string
+
+ noSmithyDocumentSerde
+}
+
+type ModifyFpgaImageAttributeOutput struct {
+
+ // Information about the attribute.
+ FpgaImageAttribute *types.FpgaImageAttribute
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationModifyFpgaImageAttributeMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpModifyFpgaImageAttribute{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyFpgaImageAttribute{}, 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 = addOpModifyFpgaImageAttributeValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyFpgaImageAttribute(options.Region), middleware.Before); 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_opModifyFpgaImageAttribute(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "ModifyFpgaImageAttribute",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyHosts.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyHosts.go
new file mode 100644
index 00000000..8f374231
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyHosts.go
@@ -0,0 +1,157 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Modify the auto-placement setting of a Dedicated Host. When auto-placement is
+// enabled, any instances that you launch with a tenancy of host but without a
+// specific host ID are placed onto any available Dedicated Host in your account
+// that has auto-placement enabled. When auto-placement is disabled, you need to
+// provide a host ID to have the instance launch onto a specific host. If no host
+// ID is provided, the instance is launched onto a suitable host with
+// auto-placement enabled. You can also use this API action to modify a Dedicated
+// Host to support either multiple instance types in an instance family, or to
+// support a specific instance type only.
+func (c *Client) ModifyHosts(ctx context.Context, params *ModifyHostsInput, optFns ...func(*Options)) (*ModifyHostsOutput, error) {
+ if params == nil {
+ params = &ModifyHostsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ModifyHosts", params, optFns, c.addOperationModifyHostsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ModifyHostsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ModifyHostsInput struct {
+
+ // The IDs of the Dedicated Hosts to modify.
+ //
+ // This member is required.
+ HostIds []string
+
+ // Specify whether to enable or disable auto-placement.
+ AutoPlacement types.AutoPlacement
+
+ // Indicates whether to enable or disable host recovery for the Dedicated Host. For
+ // more information, see Host recovery
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/dedicated-hosts-recovery.html)
+ // in the Amazon EC2 User Guide.
+ HostRecovery types.HostRecovery
+
+ // Specifies the instance family to be supported by the Dedicated Host. Specify
+ // this parameter to modify a Dedicated Host to support multiple instance types
+ // within its current instance family. If you want to modify a Dedicated Host to
+ // support a specific instance type only, omit this parameter and specify
+ // InstanceType instead. You cannot specify InstanceFamily and InstanceType in the
+ // same request.
+ InstanceFamily *string
+
+ // Specifies the instance type to be supported by the Dedicated Host. Specify this
+ // parameter to modify a Dedicated Host to support only a specific instance type.
+ // If you want to modify a Dedicated Host to support multiple instance types in its
+ // current instance family, omit this parameter and specify InstanceFamily instead.
+ // You cannot specify InstanceType and InstanceFamily in the same request.
+ InstanceType *string
+
+ noSmithyDocumentSerde
+}
+
+type ModifyHostsOutput struct {
+
+ // The IDs of the Dedicated Hosts that were successfully modified.
+ Successful []string
+
+ // The IDs of the Dedicated Hosts that could not be modified. Check whether the
+ // setting you requested can be used.
+ Unsuccessful []types.UnsuccessfulItem
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationModifyHostsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpModifyHosts{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyHosts{}, 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 = addOpModifyHostsValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyHosts(options.Region), middleware.Before); 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_opModifyHosts(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "ModifyHosts",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyIdFormat.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyIdFormat.go
new file mode 100644
index 00000000..eaf0d73b
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyIdFormat.go
@@ -0,0 +1,149 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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"
+)
+
+// Modifies the ID format for the specified resource on a per-Region basis. You can
+// specify that resources should receive longer IDs (17-character IDs) when they
+// are created. This request can only be used to modify longer ID settings for
+// resource types that are within the opt-in period. Resources currently in their
+// opt-in period include: bundle | conversion-task | customer-gateway |
+// dhcp-options | elastic-ip-allocation | elastic-ip-association | export-task |
+// flow-log | image | import-task | internet-gateway | network-acl |
+// network-acl-association | network-interface | network-interface-attachment |
+// prefix-list | route-table | route-table-association | security-group | subnet |
+// subnet-cidr-block-association | vpc | vpc-cidr-block-association | vpc-endpoint
+// | vpc-peering-connection | vpn-connection | vpn-gateway. This setting applies to
+// the IAM user who makes the request; it does not apply to the entire AWS account.
+// By default, an IAM user defaults to the same settings as the root user. If
+// you're using this action as the root user, then these settings apply to the
+// entire account, unless an IAM user explicitly overrides these settings for
+// themselves. For more information, see Resource IDs
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/resource-ids.html) in the
+// Amazon Elastic Compute Cloud User Guide. Resources created with longer IDs are
+// visible to all IAM roles and users, regardless of these settings and provided
+// that they have permission to use the relevant Describe command for the resource
+// type.
+func (c *Client) ModifyIdFormat(ctx context.Context, params *ModifyIdFormatInput, optFns ...func(*Options)) (*ModifyIdFormatOutput, error) {
+ if params == nil {
+ params = &ModifyIdFormatInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ModifyIdFormat", params, optFns, c.addOperationModifyIdFormatMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ModifyIdFormatOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ModifyIdFormatInput struct {
+
+ // The type of resource: bundle | conversion-task | customer-gateway | dhcp-options
+ // | elastic-ip-allocation | elastic-ip-association | export-task | flow-log |
+ // image | import-task | internet-gateway | network-acl | network-acl-association |
+ // network-interface | network-interface-attachment | prefix-list | route-table |
+ // route-table-association | security-group | subnet |
+ // subnet-cidr-block-association | vpc | vpc-cidr-block-association | vpc-endpoint
+ // | vpc-peering-connection | vpn-connection | vpn-gateway. Alternatively, use the
+ // all-current option to include all resource types that are currently within their
+ // opt-in period for longer IDs.
+ //
+ // This member is required.
+ Resource *string
+
+ // Indicate whether the resource should use longer IDs (17-character IDs).
+ //
+ // This member is required.
+ UseLongIds *bool
+
+ noSmithyDocumentSerde
+}
+
+type ModifyIdFormatOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationModifyIdFormatMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpModifyIdFormat{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyIdFormat{}, 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 = addOpModifyIdFormatValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyIdFormat(options.Region), middleware.Before); 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_opModifyIdFormat(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "ModifyIdFormat",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyIdentityIdFormat.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyIdentityIdFormat.go
new file mode 100644
index 00000000..f18a19e8
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyIdentityIdFormat.go
@@ -0,0 +1,154 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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"
+)
+
+// Modifies the ID format of a resource for a specified IAM user, IAM role, or the
+// root user for an account; or all IAM users, IAM roles, and the root user for an
+// account. You can specify that resources should receive longer IDs (17-character
+// IDs) when they are created. This request can only be used to modify longer ID
+// settings for resource types that are within the opt-in period. Resources
+// currently in their opt-in period include: bundle | conversion-task |
+// customer-gateway | dhcp-options | elastic-ip-allocation | elastic-ip-association
+// | export-task | flow-log | image | import-task | internet-gateway | network-acl
+// | network-acl-association | network-interface | network-interface-attachment |
+// prefix-list | route-table | route-table-association | security-group | subnet |
+// subnet-cidr-block-association | vpc | vpc-cidr-block-association | vpc-endpoint
+// | vpc-peering-connection | vpn-connection | vpn-gateway. For more information,
+// see Resource IDs
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/resource-ids.html) in the
+// Amazon Elastic Compute Cloud User Guide. This setting applies to the principal
+// specified in the request; it does not apply to the principal that makes the
+// request. Resources created with longer IDs are visible to all IAM roles and
+// users, regardless of these settings and provided that they have permission to
+// use the relevant Describe command for the resource type.
+func (c *Client) ModifyIdentityIdFormat(ctx context.Context, params *ModifyIdentityIdFormatInput, optFns ...func(*Options)) (*ModifyIdentityIdFormatOutput, error) {
+ if params == nil {
+ params = &ModifyIdentityIdFormatInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ModifyIdentityIdFormat", params, optFns, c.addOperationModifyIdentityIdFormatMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ModifyIdentityIdFormatOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ModifyIdentityIdFormatInput struct {
+
+ // The ARN of the principal, which can be an IAM user, IAM role, or the root user.
+ // Specify all to modify the ID format for all IAM users, IAM roles, and the root
+ // user of the account.
+ //
+ // This member is required.
+ PrincipalArn *string
+
+ // The type of resource: bundle | conversion-task | customer-gateway | dhcp-options
+ // | elastic-ip-allocation | elastic-ip-association | export-task | flow-log |
+ // image | import-task | internet-gateway | network-acl | network-acl-association |
+ // network-interface | network-interface-attachment | prefix-list | route-table |
+ // route-table-association | security-group | subnet |
+ // subnet-cidr-block-association | vpc | vpc-cidr-block-association | vpc-endpoint
+ // | vpc-peering-connection | vpn-connection | vpn-gateway. Alternatively, use the
+ // all-current option to include all resource types that are currently within their
+ // opt-in period for longer IDs.
+ //
+ // This member is required.
+ Resource *string
+
+ // Indicates whether the resource should use longer IDs (17-character IDs)
+ //
+ // This member is required.
+ UseLongIds *bool
+
+ noSmithyDocumentSerde
+}
+
+type ModifyIdentityIdFormatOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationModifyIdentityIdFormatMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpModifyIdentityIdFormat{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyIdentityIdFormat{}, 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 = addOpModifyIdentityIdFormatValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyIdentityIdFormat(options.Region), middleware.Before); 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_opModifyIdentityIdFormat(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "ModifyIdentityIdFormat",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyImageAttribute.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyImageAttribute.go
new file mode 100644
index 00000000..c0c84d79
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyImageAttribute.go
@@ -0,0 +1,158 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Modifies the specified attribute of the specified AMI. You can specify only one
+// attribute at a time. You can use the Attribute parameter to specify the
+// attribute or one of the following parameters: Description or LaunchPermission.
+// Images with an Amazon Web Services Marketplace product code cannot be made
+// public. To enable the SriovNetSupport enhanced networking attribute of an image,
+// enable SriovNetSupport on an instance and create an AMI from the instance.
+func (c *Client) ModifyImageAttribute(ctx context.Context, params *ModifyImageAttributeInput, optFns ...func(*Options)) (*ModifyImageAttributeOutput, error) {
+ if params == nil {
+ params = &ModifyImageAttributeInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ModifyImageAttribute", params, optFns, c.addOperationModifyImageAttributeMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ModifyImageAttributeOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+// Contains the parameters for ModifyImageAttribute.
+type ModifyImageAttributeInput struct {
+
+ // The ID of the AMI.
+ //
+ // This member is required.
+ ImageId *string
+
+ // The name of the attribute to modify. The valid values are description and
+ // launchPermission.
+ Attribute *string
+
+ // A new description for the AMI.
+ Description *types.AttributeValue
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // A new launch permission for the AMI.
+ LaunchPermission *types.LaunchPermissionModifications
+
+ // The operation type. This parameter can be used only when the Attribute parameter
+ // is launchPermission.
+ OperationType types.OperationType
+
+ // Not supported.
+ ProductCodes []string
+
+ // The user groups. This parameter can be used only when the Attribute parameter is
+ // launchPermission.
+ UserGroups []string
+
+ // The Amazon Web Services account IDs. This parameter can be used only when the
+ // Attribute parameter is launchPermission.
+ UserIds []string
+
+ // The value of the attribute being modified. This parameter can be used only when
+ // the Attribute parameter is description.
+ Value *string
+
+ noSmithyDocumentSerde
+}
+
+type ModifyImageAttributeOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationModifyImageAttributeMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpModifyImageAttribute{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyImageAttribute{}, 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 = addOpModifyImageAttributeValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyImageAttribute(options.Region), middleware.Before); 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_opModifyImageAttribute(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "ModifyImageAttribute",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyInstanceAttribute.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyInstanceAttribute.go
new file mode 100644
index 00000000..52071523
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyInstanceAttribute.go
@@ -0,0 +1,214 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Modifies the specified attribute of the specified instance. You can specify only
+// one attribute at a time. Note: Using this action to change the security groups
+// associated with an elastic network interface (ENI) attached to an instance in a
+// VPC can result in an error if the instance has more than one ENI. To change the
+// security groups associated with an ENI attached to an instance that has multiple
+// ENIs, we recommend that you use the ModifyNetworkInterfaceAttribute action. To
+// modify some attributes, the instance must be stopped. For more information, see
+// Modifying attributes of a stopped instance
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_ChangingAttributesWhileInstanceStopped.html)
+// in the Amazon EC2 User Guide.
+func (c *Client) ModifyInstanceAttribute(ctx context.Context, params *ModifyInstanceAttributeInput, optFns ...func(*Options)) (*ModifyInstanceAttributeOutput, error) {
+ if params == nil {
+ params = &ModifyInstanceAttributeInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ModifyInstanceAttribute", params, optFns, c.addOperationModifyInstanceAttributeMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ModifyInstanceAttributeOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ModifyInstanceAttributeInput struct {
+
+ // The ID of the instance.
+ //
+ // This member is required.
+ InstanceId *string
+
+ // The name of the attribute.
+ Attribute types.InstanceAttributeName
+
+ // Modifies the DeleteOnTermination attribute for volumes that are currently
+ // attached. The volume must be owned by the caller. If no value is specified for
+ // DeleteOnTermination, the default is true and the volume is deleted when the
+ // instance is terminated. To add instance store volumes to an Amazon EBS-backed
+ // instance, you must add them when you launch the instance. For more information,
+ // see Updating the block device mapping when launching an instance
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html#Using_OverridingAMIBDM)
+ // in the Amazon EC2 User Guide.
+ BlockDeviceMappings []types.InstanceBlockDeviceMappingSpecification
+
+ // If the value is true, you can't terminate the instance using the Amazon EC2
+ // console, CLI, or API; otherwise, you can. You cannot use this parameter for Spot
+ // Instances.
+ DisableApiTermination *types.AttributeBooleanValue
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // Specifies whether the instance is optimized for Amazon EBS I/O. This
+ // optimization provides dedicated throughput to Amazon EBS and an optimized
+ // configuration stack to provide optimal EBS I/O performance. This optimization
+ // isn't available with all instance types. Additional usage charges apply when
+ // using an EBS Optimized instance.
+ EbsOptimized *types.AttributeBooleanValue
+
+ // Set to true to enable enhanced networking with ENA for the instance. This option
+ // is supported only for HVM instances. Specifying this option with a PV instance
+ // can make it unreachable.
+ EnaSupport *types.AttributeBooleanValue
+
+ // [EC2-VPC] Replaces the security groups of the instance with the specified
+ // security groups. You must specify at least one security group, even if it's just
+ // the default security group for the VPC. You must specify the security group ID,
+ // not the security group name.
+ Groups []string
+
+ // Specifies whether an instance stops or terminates when you initiate shutdown
+ // from the instance (using the operating system command for system shutdown).
+ InstanceInitiatedShutdownBehavior *types.AttributeValue
+
+ // Changes the instance type to the specified value. For more information, see
+ // Instance types
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html) in the
+ // Amazon EC2 User Guide. If the instance type is not valid, the error returned is
+ // InvalidInstanceAttributeValue.
+ InstanceType *types.AttributeValue
+
+ // Changes the instance's kernel to the specified value. We recommend that you use
+ // PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedKernels.html).
+ Kernel *types.AttributeValue
+
+ // Changes the instance's RAM disk to the specified value. We recommend that you
+ // use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedKernels.html).
+ Ramdisk *types.AttributeValue
+
+ // Enable or disable source/destination checks, which ensure that the instance is
+ // either the source or the destination of any traffic that it receives. If the
+ // value is true, source/destination checks are enabled; otherwise, they are
+ // disabled. The default value is true. You must disable source/destination checks
+ // if the instance runs services such as network address translation, routing, or
+ // firewalls.
+ SourceDestCheck *types.AttributeBooleanValue
+
+ // Set to simple to enable enhanced networking with the Intel 82599 Virtual
+ // Function interface for the instance. There is no way to disable enhanced
+ // networking with the Intel 82599 Virtual Function interface at this time. This
+ // option is supported only for HVM instances. Specifying this option with a PV
+ // instance can make it unreachable.
+ SriovNetSupport *types.AttributeValue
+
+ // Changes the instance's user data to the specified value. If you are using an
+ // Amazon Web Services SDK or command line tool, base64-encoding is performed for
+ // you, and you can load the text from a file. Otherwise, you must provide
+ // base64-encoded text.
+ UserData *types.BlobAttributeValue
+
+ // A new value for the attribute. Use only with the kernel, ramdisk, userData,
+ // disableApiTermination, or instanceInitiatedShutdownBehavior attribute.
+ Value *string
+
+ noSmithyDocumentSerde
+}
+
+type ModifyInstanceAttributeOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationModifyInstanceAttributeMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpModifyInstanceAttribute{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyInstanceAttribute{}, 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 = addOpModifyInstanceAttributeValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyInstanceAttribute(options.Region), middleware.Before); 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_opModifyInstanceAttribute(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "ModifyInstanceAttribute",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyInstanceCapacityReservationAttributes.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyInstanceCapacityReservationAttributes.go
new file mode 100644
index 00000000..29e292d3
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyInstanceCapacityReservationAttributes.go
@@ -0,0 +1,135 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Modifies the Capacity Reservation settings for a stopped instance. Use this
+// action to configure an instance to target a specific Capacity Reservation, run
+// in any open Capacity Reservation with matching attributes, or run On-Demand
+// Instance capacity.
+func (c *Client) ModifyInstanceCapacityReservationAttributes(ctx context.Context, params *ModifyInstanceCapacityReservationAttributesInput, optFns ...func(*Options)) (*ModifyInstanceCapacityReservationAttributesOutput, error) {
+ if params == nil {
+ params = &ModifyInstanceCapacityReservationAttributesInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ModifyInstanceCapacityReservationAttributes", params, optFns, c.addOperationModifyInstanceCapacityReservationAttributesMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ModifyInstanceCapacityReservationAttributesOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ModifyInstanceCapacityReservationAttributesInput struct {
+
+ // Information about the Capacity Reservation targeting option.
+ //
+ // This member is required.
+ CapacityReservationSpecification *types.CapacityReservationSpecification
+
+ // The ID of the instance to be modified.
+ //
+ // This member is required.
+ InstanceId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type ModifyInstanceCapacityReservationAttributesOutput struct {
+
+ // Returns true if the request succeeds; otherwise, it returns an error.
+ Return *bool
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationModifyInstanceCapacityReservationAttributesMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpModifyInstanceCapacityReservationAttributes{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyInstanceCapacityReservationAttributes{}, 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 = addOpModifyInstanceCapacityReservationAttributesValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyInstanceCapacityReservationAttributes(options.Region), middleware.Before); 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_opModifyInstanceCapacityReservationAttributes(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "ModifyInstanceCapacityReservationAttributes",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyInstanceCreditSpecification.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyInstanceCreditSpecification.go
new file mode 100644
index 00000000..6922844a
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyInstanceCreditSpecification.go
@@ -0,0 +1,141 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Modifies the credit option for CPU usage on a running or stopped burstable
+// performance instance. The credit options are standard and unlimited. For more
+// information, see Burstable performance instances
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-performance-instances.html)
+// in the Amazon EC2 User Guide.
+func (c *Client) ModifyInstanceCreditSpecification(ctx context.Context, params *ModifyInstanceCreditSpecificationInput, optFns ...func(*Options)) (*ModifyInstanceCreditSpecificationOutput, error) {
+ if params == nil {
+ params = &ModifyInstanceCreditSpecificationInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ModifyInstanceCreditSpecification", params, optFns, c.addOperationModifyInstanceCreditSpecificationMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ModifyInstanceCreditSpecificationOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ModifyInstanceCreditSpecificationInput struct {
+
+ // Information about the credit option for CPU usage.
+ //
+ // This member is required.
+ InstanceCreditSpecifications []types.InstanceCreditSpecificationRequest
+
+ // A unique, case-sensitive token that you provide to ensure idempotency of your
+ // modification request. For more information, see Ensuring Idempotency
+ // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html).
+ ClientToken *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type ModifyInstanceCreditSpecificationOutput struct {
+
+ // Information about the instances whose credit option for CPU usage was
+ // successfully modified.
+ SuccessfulInstanceCreditSpecifications []types.SuccessfulInstanceCreditSpecificationItem
+
+ // Information about the instances whose credit option for CPU usage was not
+ // modified.
+ UnsuccessfulInstanceCreditSpecifications []types.UnsuccessfulInstanceCreditSpecificationItem
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationModifyInstanceCreditSpecificationMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpModifyInstanceCreditSpecification{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyInstanceCreditSpecification{}, 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 = addOpModifyInstanceCreditSpecificationValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyInstanceCreditSpecification(options.Region), middleware.Before); 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_opModifyInstanceCreditSpecification(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "ModifyInstanceCreditSpecification",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyInstanceEventStartTime.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyInstanceEventStartTime.go
new file mode 100644
index 00000000..664bdddc
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyInstanceEventStartTime.go
@@ -0,0 +1,138 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "time"
+)
+
+// Modifies the start time for a scheduled Amazon EC2 instance event.
+func (c *Client) ModifyInstanceEventStartTime(ctx context.Context, params *ModifyInstanceEventStartTimeInput, optFns ...func(*Options)) (*ModifyInstanceEventStartTimeOutput, error) {
+ if params == nil {
+ params = &ModifyInstanceEventStartTimeInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ModifyInstanceEventStartTime", params, optFns, c.addOperationModifyInstanceEventStartTimeMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ModifyInstanceEventStartTimeOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ModifyInstanceEventStartTimeInput struct {
+
+ // The ID of the event whose date and time you are modifying.
+ //
+ // This member is required.
+ InstanceEventId *string
+
+ // The ID of the instance with the scheduled event.
+ //
+ // This member is required.
+ InstanceId *string
+
+ // The new date and time when the event will take place.
+ //
+ // This member is required.
+ NotBefore *time.Time
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type ModifyInstanceEventStartTimeOutput struct {
+
+ // Describes a scheduled event for an instance.
+ Event *types.InstanceStatusEvent
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationModifyInstanceEventStartTimeMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpModifyInstanceEventStartTime{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyInstanceEventStartTime{}, 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 = addOpModifyInstanceEventStartTimeValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyInstanceEventStartTime(options.Region), middleware.Before); 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_opModifyInstanceEventStartTime(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "ModifyInstanceEventStartTime",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyInstanceEventWindow.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyInstanceEventWindow.go
new file mode 100644
index 00000000..9e55ec8a
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyInstanceEventWindow.go
@@ -0,0 +1,166 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Modifies the specified event window. You can define either a set of time ranges
+// or a cron expression when modifying the event window, but not both. To modify
+// the targets associated with the event window, use the
+// AssociateInstanceEventWindow and DisassociateInstanceEventWindow API. If Amazon
+// Web Services has already scheduled an event, modifying an event window won't
+// change the time of the scheduled event. For more information, see Define event
+// windows for scheduled events
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/event-windows.html) in the
+// Amazon EC2 User Guide.
+func (c *Client) ModifyInstanceEventWindow(ctx context.Context, params *ModifyInstanceEventWindowInput, optFns ...func(*Options)) (*ModifyInstanceEventWindowOutput, error) {
+ if params == nil {
+ params = &ModifyInstanceEventWindowInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ModifyInstanceEventWindow", params, optFns, c.addOperationModifyInstanceEventWindowMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ModifyInstanceEventWindowOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ModifyInstanceEventWindowInput struct {
+
+ // The ID of the event window.
+ //
+ // This member is required.
+ InstanceEventWindowId *string
+
+ // The cron expression of the event window, for example, * 0-4,20-23 * * 1,5.
+ // Constraints:
+ //
+ // * Only hour and day of the week values are supported.
+ //
+ // * For day
+ // of the week values, you can specify either integers 0 through 6, or alternative
+ // single values SUN through SAT.
+ //
+ // * The minute, month, and year must be specified
+ // by *.
+ //
+ // * The hour value must be one or a multiple range, for example, 0-4 or
+ // 0-4,20-23.
+ //
+ // * Each hour range must be >= 2 hours, for example, 0-2 or 20-23.
+ //
+ // *
+ // The event window must be >= 4 hours. The combined total time ranges in the event
+ // window must be >= 4 hours.
+ //
+ // For more information about cron expressions, see
+ // cron (https://en.wikipedia.org/wiki/Cron) on the Wikipedia website.
+ CronExpression *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The name of the event window.
+ Name *string
+
+ // The time ranges of the event window.
+ TimeRanges []types.InstanceEventWindowTimeRangeRequest
+
+ noSmithyDocumentSerde
+}
+
+type ModifyInstanceEventWindowOutput struct {
+
+ // Information about the event window.
+ InstanceEventWindow *types.InstanceEventWindow
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationModifyInstanceEventWindowMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpModifyInstanceEventWindow{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyInstanceEventWindow{}, 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 = addOpModifyInstanceEventWindowValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyInstanceEventWindow(options.Region), middleware.Before); 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_opModifyInstanceEventWindow(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "ModifyInstanceEventWindow",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyInstanceMetadataOptions.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyInstanceMetadataOptions.go
new file mode 100644
index 00000000..7026b995
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyInstanceMetadataOptions.go
@@ -0,0 +1,165 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Modify the instance metadata parameters on a running or stopped instance. When
+// you modify the parameters on a stopped instance, they are applied when the
+// instance is started. When you modify the parameters on a running instance, the
+// API responds with a state of “pending”. After the parameter modifications are
+// successfully applied to the instance, the state of the modifications changes
+// from “pending” to “applied” in subsequent describe-instances API calls. For more
+// information, see Instance metadata and user data
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html)
+// in the Amazon EC2 User Guide.
+func (c *Client) ModifyInstanceMetadataOptions(ctx context.Context, params *ModifyInstanceMetadataOptionsInput, optFns ...func(*Options)) (*ModifyInstanceMetadataOptionsOutput, error) {
+ if params == nil {
+ params = &ModifyInstanceMetadataOptionsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ModifyInstanceMetadataOptions", params, optFns, c.addOperationModifyInstanceMetadataOptionsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ModifyInstanceMetadataOptionsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ModifyInstanceMetadataOptionsInput struct {
+
+ // The ID of the instance.
+ //
+ // This member is required.
+ InstanceId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // This parameter enables or disables the HTTP metadata endpoint on your instances.
+ // If the parameter is not specified, the existing state is maintained. If you
+ // specify a value of disabled, you will not be able to access your instance
+ // metadata.
+ HttpEndpoint types.InstanceMetadataEndpointState
+
+ // Enables or disables the IPv6 endpoint for the instance metadata service.
+ HttpProtocolIpv6 types.InstanceMetadataProtocolState
+
+ // The desired HTTP PUT response hop limit for instance metadata requests. The
+ // larger the number, the further instance metadata requests can travel. If no
+ // parameter is specified, the existing state is maintained. Possible values:
+ // Integers from 1 to 64
+ HttpPutResponseHopLimit *int32
+
+ // The state of token usage for your instance metadata requests. If the parameter
+ // is not specified in the request, the default state is optional. If the state is
+ // optional, you can choose to retrieve instance metadata with or without a signed
+ // token header on your request. If you retrieve the IAM role credentials without a
+ // token, the version 1.0 role credentials are returned. If you retrieve the IAM
+ // role credentials using a valid signed token, the version 2.0 role credentials
+ // are returned. If the state is required, you must send a signed token header with
+ // any instance metadata retrieval requests. In this state, retrieving the IAM role
+ // credential always returns the version 2.0 credentials; the version 1.0
+ // credentials are not available.
+ HttpTokens types.HttpTokensState
+
+ noSmithyDocumentSerde
+}
+
+type ModifyInstanceMetadataOptionsOutput struct {
+
+ // The ID of the instance.
+ InstanceId *string
+
+ // The metadata options for the instance.
+ InstanceMetadataOptions *types.InstanceMetadataOptionsResponse
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationModifyInstanceMetadataOptionsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpModifyInstanceMetadataOptions{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyInstanceMetadataOptions{}, 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 = addOpModifyInstanceMetadataOptionsValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyInstanceMetadataOptions(options.Region), middleware.Before); 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_opModifyInstanceMetadataOptions(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "ModifyInstanceMetadataOptions",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyInstancePlacement.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyInstancePlacement.go
new file mode 100644
index 00000000..00dcc200
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyInstancePlacement.go
@@ -0,0 +1,168 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Modifies the placement attributes for a specified instance. You can do the
+// following:
+//
+// * Modify the affinity between an instance and a Dedicated Host
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/dedicated-hosts-overview.html).
+// When affinity is set to host and the instance is not associated with a specific
+// Dedicated Host, the next time the instance is launched, it is automatically
+// associated with the host on which it lands. If the instance is restarted or
+// rebooted, this relationship persists.
+//
+// * Change the Dedicated Host with which an
+// instance is associated.
+//
+// * Change the instance tenancy of an instance.
+//
+// * Move
+// an instance to or from a placement group
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/placement-groups.html).
+//
+// At
+// least one attribute for affinity, host ID, tenancy, or placement group name must
+// be specified in the request. Affinity and tenancy can be modified in the same
+// request. To modify the host ID, tenancy, placement group, or partition for an
+// instance, the instance must be in the stopped state.
+func (c *Client) ModifyInstancePlacement(ctx context.Context, params *ModifyInstancePlacementInput, optFns ...func(*Options)) (*ModifyInstancePlacementOutput, error) {
+ if params == nil {
+ params = &ModifyInstancePlacementInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ModifyInstancePlacement", params, optFns, c.addOperationModifyInstancePlacementMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ModifyInstancePlacementOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ModifyInstancePlacementInput struct {
+
+ // The ID of the instance that you are modifying.
+ //
+ // This member is required.
+ InstanceId *string
+
+ // The affinity setting for the instance.
+ Affinity types.Affinity
+
+ // The name of the placement group in which to place the instance. For spread
+ // placement groups, the instance must have a tenancy of default. For cluster and
+ // partition placement groups, the instance must have a tenancy of default or
+ // dedicated. To remove an instance from a placement group, specify an empty string
+ // ("").
+ GroupName *string
+
+ // The ID of the Dedicated Host with which to associate the instance.
+ HostId *string
+
+ // The ARN of the host resource group in which to place the instance.
+ HostResourceGroupArn *string
+
+ // Reserved for future use.
+ PartitionNumber *int32
+
+ // The tenancy for the instance. For T3 instances, you can't change the tenancy
+ // from dedicated to host, or from host to dedicated. Attempting to make one of
+ // these unsupported tenancy changes results in the InvalidTenancy error code.
+ Tenancy types.HostTenancy
+
+ noSmithyDocumentSerde
+}
+
+type ModifyInstancePlacementOutput struct {
+
+ // Is true if the request succeeds, and an error otherwise.
+ Return *bool
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationModifyInstancePlacementMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpModifyInstancePlacement{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyInstancePlacement{}, 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 = addOpModifyInstancePlacementValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyInstancePlacement(options.Region), middleware.Before); 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_opModifyInstancePlacement(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "ModifyInstancePlacement",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyLaunchTemplate.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyLaunchTemplate.go
new file mode 100644
index 00000000..10ef0fe1
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyLaunchTemplate.go
@@ -0,0 +1,138 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Modifies a launch template. You can specify which version of the launch template
+// to set as the default version. When launching an instance, the default version
+// applies when a launch template version is not specified.
+func (c *Client) ModifyLaunchTemplate(ctx context.Context, params *ModifyLaunchTemplateInput, optFns ...func(*Options)) (*ModifyLaunchTemplateOutput, error) {
+ if params == nil {
+ params = &ModifyLaunchTemplateInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ModifyLaunchTemplate", params, optFns, c.addOperationModifyLaunchTemplateMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ModifyLaunchTemplateOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ModifyLaunchTemplateInput struct {
+
+ // Unique, case-sensitive identifier you provide to ensure the idempotency of the
+ // request. For more information, see Ensuring Idempotency
+ // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html).
+ // Constraint: Maximum 128 ASCII characters.
+ ClientToken *string
+
+ // The version number of the launch template to set as the default version.
+ DefaultVersion *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The ID of the launch template. You must specify either the launch template ID or
+ // launch template name in the request.
+ LaunchTemplateId *string
+
+ // The name of the launch template. You must specify either the launch template ID
+ // or launch template name in the request.
+ LaunchTemplateName *string
+
+ noSmithyDocumentSerde
+}
+
+type ModifyLaunchTemplateOutput struct {
+
+ // Information about the launch template.
+ LaunchTemplate *types.LaunchTemplate
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationModifyLaunchTemplateMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpModifyLaunchTemplate{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyLaunchTemplate{}, 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_opModifyLaunchTemplate(options.Region), middleware.Before); 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_opModifyLaunchTemplate(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "ModifyLaunchTemplate",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyManagedPrefixList.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyManagedPrefixList.go
new file mode 100644
index 00000000..bc0e7311
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyManagedPrefixList.go
@@ -0,0 +1,149 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Modifies the specified managed prefix list. Adding or removing entries in a
+// prefix list creates a new version of the prefix list. Changing the name of the
+// prefix list does not affect the version. If you specify a current version number
+// that does not match the true current version number, the request fails.
+func (c *Client) ModifyManagedPrefixList(ctx context.Context, params *ModifyManagedPrefixListInput, optFns ...func(*Options)) (*ModifyManagedPrefixListOutput, error) {
+ if params == nil {
+ params = &ModifyManagedPrefixListInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ModifyManagedPrefixList", params, optFns, c.addOperationModifyManagedPrefixListMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ModifyManagedPrefixListOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ModifyManagedPrefixListInput struct {
+
+ // The ID of the prefix list.
+ //
+ // This member is required.
+ PrefixListId *string
+
+ // One or more entries to add to the prefix list.
+ AddEntries []types.AddPrefixListEntry
+
+ // The current version of the prefix list.
+ CurrentVersion *int64
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The maximum number of entries for the prefix list. You cannot modify the entries
+ // of a prefix list and modify the size of a prefix list at the same time. If any
+ // of the resources that reference the prefix list cannot support the new maximum
+ // size, the modify operation fails. Check the state message for the IDs of the
+ // first ten resources that do not support the new maximum size.
+ MaxEntries *int32
+
+ // A name for the prefix list.
+ PrefixListName *string
+
+ // One or more entries to remove from the prefix list.
+ RemoveEntries []types.RemovePrefixListEntry
+
+ noSmithyDocumentSerde
+}
+
+type ModifyManagedPrefixListOutput struct {
+
+ // Information about the prefix list.
+ PrefixList *types.ManagedPrefixList
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationModifyManagedPrefixListMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpModifyManagedPrefixList{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyManagedPrefixList{}, 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 = addOpModifyManagedPrefixListValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyManagedPrefixList(options.Region), middleware.Before); 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_opModifyManagedPrefixList(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "ModifyManagedPrefixList",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyNetworkInterfaceAttribute.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyNetworkInterfaceAttribute.go
new file mode 100644
index 00000000..e9da0e51
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyNetworkInterfaceAttribute.go
@@ -0,0 +1,147 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Modifies the specified network interface attribute. You can specify only one
+// attribute at a time. You can use this action to attach and detach security
+// groups from an existing EC2 instance.
+func (c *Client) ModifyNetworkInterfaceAttribute(ctx context.Context, params *ModifyNetworkInterfaceAttributeInput, optFns ...func(*Options)) (*ModifyNetworkInterfaceAttributeOutput, error) {
+ if params == nil {
+ params = &ModifyNetworkInterfaceAttributeInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ModifyNetworkInterfaceAttribute", params, optFns, c.addOperationModifyNetworkInterfaceAttributeMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ModifyNetworkInterfaceAttributeOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+// Contains the parameters for ModifyNetworkInterfaceAttribute.
+type ModifyNetworkInterfaceAttributeInput struct {
+
+ // The ID of the network interface.
+ //
+ // This member is required.
+ NetworkInterfaceId *string
+
+ // Information about the interface attachment. If modifying the 'delete on
+ // termination' attribute, you must specify the ID of the interface attachment.
+ Attachment *types.NetworkInterfaceAttachmentChanges
+
+ // A description for the network interface.
+ Description *types.AttributeValue
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // Changes the security groups for the network interface. The new set of groups you
+ // specify replaces the current set. You must specify at least one group, even if
+ // it's just the default security group in the VPC. You must specify the ID of the
+ // security group, not the name.
+ Groups []string
+
+ // Enable or disable source/destination checks, which ensure that the instance is
+ // either the source or the destination of any traffic that it receives. If the
+ // value is true, source/destination checks are enabled; otherwise, they are
+ // disabled. The default value is true. You must disable source/destination checks
+ // if the instance runs services such as network address translation, routing, or
+ // firewalls.
+ SourceDestCheck *types.AttributeBooleanValue
+
+ noSmithyDocumentSerde
+}
+
+type ModifyNetworkInterfaceAttributeOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationModifyNetworkInterfaceAttributeMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpModifyNetworkInterfaceAttribute{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyNetworkInterfaceAttribute{}, 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 = addOpModifyNetworkInterfaceAttributeValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyNetworkInterfaceAttribute(options.Region), middleware.Before); 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_opModifyNetworkInterfaceAttribute(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "ModifyNetworkInterfaceAttribute",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyReservedInstances.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyReservedInstances.go
new file mode 100644
index 00000000..b8f4e95c
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyReservedInstances.go
@@ -0,0 +1,139 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Modifies the Availability Zone, instance count, instance type, or network
+// platform (EC2-Classic or EC2-VPC) of your Reserved Instances. The Reserved
+// Instances to be modified must be identical, except for Availability Zone,
+// network platform, and instance type. For more information, see Modifying
+// Reserved Instances
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-modifying.html) in the
+// Amazon EC2 User Guide.
+func (c *Client) ModifyReservedInstances(ctx context.Context, params *ModifyReservedInstancesInput, optFns ...func(*Options)) (*ModifyReservedInstancesOutput, error) {
+ if params == nil {
+ params = &ModifyReservedInstancesInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ModifyReservedInstances", params, optFns, c.addOperationModifyReservedInstancesMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ModifyReservedInstancesOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+// Contains the parameters for ModifyReservedInstances.
+type ModifyReservedInstancesInput struct {
+
+ // The IDs of the Reserved Instances to modify.
+ //
+ // This member is required.
+ ReservedInstancesIds []string
+
+ // The configuration settings for the Reserved Instances to modify.
+ //
+ // This member is required.
+ TargetConfigurations []types.ReservedInstancesConfiguration
+
+ // A unique, case-sensitive token you provide to ensure idempotency of your
+ // modification request. For more information, see Ensuring Idempotency
+ // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html).
+ ClientToken *string
+
+ noSmithyDocumentSerde
+}
+
+// Contains the output of ModifyReservedInstances.
+type ModifyReservedInstancesOutput struct {
+
+ // The ID for the modification.
+ ReservedInstancesModificationId *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationModifyReservedInstancesMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpModifyReservedInstances{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyReservedInstances{}, 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 = addOpModifyReservedInstancesValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyReservedInstances(options.Region), middleware.Before); 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_opModifyReservedInstances(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "ModifyReservedInstances",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifySecurityGroupRules.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifySecurityGroupRules.go
new file mode 100644
index 00000000..e7650f87
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifySecurityGroupRules.go
@@ -0,0 +1,132 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Modifies the rules of a security group.
+func (c *Client) ModifySecurityGroupRules(ctx context.Context, params *ModifySecurityGroupRulesInput, optFns ...func(*Options)) (*ModifySecurityGroupRulesOutput, error) {
+ if params == nil {
+ params = &ModifySecurityGroupRulesInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ModifySecurityGroupRules", params, optFns, c.addOperationModifySecurityGroupRulesMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ModifySecurityGroupRulesOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ModifySecurityGroupRulesInput struct {
+
+ // The ID of the security group.
+ //
+ // This member is required.
+ GroupId *string
+
+ // Information about the security group properties to update.
+ //
+ // This member is required.
+ SecurityGroupRules []types.SecurityGroupRuleUpdate
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type ModifySecurityGroupRulesOutput struct {
+
+ // Returns true if the request succeeds; otherwise, returns an error.
+ Return *bool
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationModifySecurityGroupRulesMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpModifySecurityGroupRules{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifySecurityGroupRules{}, 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 = addOpModifySecurityGroupRulesValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifySecurityGroupRules(options.Region), middleware.Before); 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_opModifySecurityGroupRules(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "ModifySecurityGroupRules",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifySnapshotAttribute.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifySnapshotAttribute.go
new file mode 100644
index 00000000..990a359d
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifySnapshotAttribute.go
@@ -0,0 +1,149 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Adds or removes permission settings for the specified snapshot. You may add or
+// remove specified Amazon Web Services account IDs from a snapshot's list of
+// create volume permissions, but you cannot do both in a single operation. If you
+// need to both add and remove account IDs for a snapshot, you must use multiple
+// operations. You can make up to 500 modifications to a snapshot in a single
+// operation. Encrypted snapshots and snapshots with Amazon Web Services
+// Marketplace product codes cannot be made public. Snapshots encrypted with your
+// default KMS key cannot be shared with other accounts. For more information about
+// modifying snapshot permissions, see Share a snapshot
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-modifying-snapshot-permissions.html)
+// in the Amazon Elastic Compute Cloud User Guide.
+func (c *Client) ModifySnapshotAttribute(ctx context.Context, params *ModifySnapshotAttributeInput, optFns ...func(*Options)) (*ModifySnapshotAttributeOutput, error) {
+ if params == nil {
+ params = &ModifySnapshotAttributeInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ModifySnapshotAttribute", params, optFns, c.addOperationModifySnapshotAttributeMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ModifySnapshotAttributeOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ModifySnapshotAttributeInput struct {
+
+ // The ID of the snapshot.
+ //
+ // This member is required.
+ SnapshotId *string
+
+ // The snapshot attribute to modify. Only volume creation permissions can be
+ // modified.
+ Attribute types.SnapshotAttributeName
+
+ // A JSON representation of the snapshot attribute modification.
+ CreateVolumePermission *types.CreateVolumePermissionModifications
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The group to modify for the snapshot.
+ GroupNames []string
+
+ // The type of operation to perform to the attribute.
+ OperationType types.OperationType
+
+ // The account ID to modify for the snapshot.
+ UserIds []string
+
+ noSmithyDocumentSerde
+}
+
+type ModifySnapshotAttributeOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationModifySnapshotAttributeMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpModifySnapshotAttribute{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifySnapshotAttribute{}, 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 = addOpModifySnapshotAttributeValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifySnapshotAttribute(options.Region), middleware.Before); 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_opModifySnapshotAttribute(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "ModifySnapshotAttribute",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifySpotFleetRequest.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifySpotFleetRequest.go
new file mode 100644
index 00000000..9c1f1e5e
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifySpotFleetRequest.go
@@ -0,0 +1,165 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Modifies the specified Spot Fleet request. You can only modify a Spot Fleet
+// request of type maintain. While the Spot Fleet request is being modified, it is
+// in the modifying state. To scale up your Spot Fleet, increase its target
+// capacity. The Spot Fleet launches the additional Spot Instances according to the
+// allocation strategy for the Spot Fleet request. If the allocation strategy is
+// lowestPrice, the Spot Fleet launches instances using the Spot Instance pool with
+// the lowest price. If the allocation strategy is diversified, the Spot Fleet
+// distributes the instances across the Spot Instance pools. If the allocation
+// strategy is capacityOptimized, Spot Fleet launches instances from Spot Instance
+// pools with optimal capacity for the number of instances that are launching. To
+// scale down your Spot Fleet, decrease its target capacity. First, the Spot Fleet
+// cancels any open requests that exceed the new target capacity. You can request
+// that the Spot Fleet terminate Spot Instances until the size of the fleet no
+// longer exceeds the new target capacity. If the allocation strategy is
+// lowestPrice, the Spot Fleet terminates the instances with the highest price per
+// unit. If the allocation strategy is capacityOptimized, the Spot Fleet terminates
+// the instances in the Spot Instance pools that have the least available Spot
+// Instance capacity. If the allocation strategy is diversified, the Spot Fleet
+// terminates instances across the Spot Instance pools. Alternatively, you can
+// request that the Spot Fleet keep the fleet at its current size, but not replace
+// any Spot Instances that are interrupted or that you terminate manually. If you
+// are finished with your Spot Fleet for now, but will use it again later, you can
+// set the target capacity to 0.
+func (c *Client) ModifySpotFleetRequest(ctx context.Context, params *ModifySpotFleetRequestInput, optFns ...func(*Options)) (*ModifySpotFleetRequestOutput, error) {
+ if params == nil {
+ params = &ModifySpotFleetRequestInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ModifySpotFleetRequest", params, optFns, c.addOperationModifySpotFleetRequestMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ModifySpotFleetRequestOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+// Contains the parameters for ModifySpotFleetRequest.
+type ModifySpotFleetRequestInput struct {
+
+ // The ID of the Spot Fleet request.
+ //
+ // This member is required.
+ SpotFleetRequestId *string
+
+ // Reserved.
+ Context *string
+
+ // Indicates whether running Spot Instances should be terminated if the target
+ // capacity of the Spot Fleet request is decreased below the current size of the
+ // Spot Fleet.
+ ExcessCapacityTerminationPolicy types.ExcessCapacityTerminationPolicy
+
+ // The launch template and overrides. You can only use this parameter if you
+ // specified a launch template (LaunchTemplateConfigs) in your Spot Fleet request.
+ // If you specified LaunchSpecifications in your Spot Fleet request, then omit this
+ // parameter.
+ LaunchTemplateConfigs []types.LaunchTemplateConfig
+
+ // The number of On-Demand Instances in the fleet.
+ OnDemandTargetCapacity *int32
+
+ // The size of the fleet.
+ TargetCapacity *int32
+
+ noSmithyDocumentSerde
+}
+
+// Contains the output of ModifySpotFleetRequest.
+type ModifySpotFleetRequestOutput struct {
+
+ // Is true if the request succeeds, and an error otherwise.
+ Return *bool
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationModifySpotFleetRequestMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpModifySpotFleetRequest{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifySpotFleetRequest{}, 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 = addOpModifySpotFleetRequestValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifySpotFleetRequest(options.Region), middleware.Before); 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_opModifySpotFleetRequest(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "ModifySpotFleetRequest",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifySubnetAttribute.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifySubnetAttribute.go
new file mode 100644
index 00000000..46be1fb7
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifySubnetAttribute.go
@@ -0,0 +1,139 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Modifies a subnet attribute. You can only modify one attribute at a time.
+func (c *Client) ModifySubnetAttribute(ctx context.Context, params *ModifySubnetAttributeInput, optFns ...func(*Options)) (*ModifySubnetAttributeOutput, error) {
+ if params == nil {
+ params = &ModifySubnetAttributeInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ModifySubnetAttribute", params, optFns, c.addOperationModifySubnetAttributeMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ModifySubnetAttributeOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ModifySubnetAttributeInput struct {
+
+ // The ID of the subnet.
+ //
+ // This member is required.
+ SubnetId *string
+
+ // Specify true to indicate that network interfaces created in the specified subnet
+ // should be assigned an IPv6 address. This includes a network interface that's
+ // created when launching an instance into the subnet (the instance therefore
+ // receives an IPv6 address). If you enable the IPv6 addressing feature for your
+ // subnet, your network interface or instance only receives an IPv6 address if it's
+ // created using version 2016-11-15 or later of the Amazon EC2 API.
+ AssignIpv6AddressOnCreation *types.AttributeBooleanValue
+
+ // The customer-owned IPv4 address pool associated with the subnet. You must set
+ // this value when you specify true for MapCustomerOwnedIpOnLaunch.
+ CustomerOwnedIpv4Pool *string
+
+ // Specify true to indicate that network interfaces attached to instances created
+ // in the specified subnet should be assigned a customer-owned IPv4 address. When
+ // this value is true, you must specify the customer-owned IP pool using
+ // CustomerOwnedIpv4Pool.
+ MapCustomerOwnedIpOnLaunch *types.AttributeBooleanValue
+
+ // Specify true to indicate that network interfaces attached to instances created
+ // in the specified subnet should be assigned a public IPv4 address.
+ MapPublicIpOnLaunch *types.AttributeBooleanValue
+
+ noSmithyDocumentSerde
+}
+
+type ModifySubnetAttributeOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationModifySubnetAttributeMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpModifySubnetAttribute{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifySubnetAttribute{}, 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 = addOpModifySubnetAttributeValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifySubnetAttribute(options.Region), middleware.Before); 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_opModifySubnetAttribute(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "ModifySubnetAttribute",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyTrafficMirrorFilterNetworkServices.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyTrafficMirrorFilterNetworkServices.go
new file mode 100644
index 00000000..3527fba9
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyTrafficMirrorFilterNetworkServices.go
@@ -0,0 +1,141 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Allows or restricts mirroring network services. By default, Amazon DNS network
+// services are not eligible for Traffic Mirror. Use AddNetworkServices to add
+// network services to a Traffic Mirror filter. When a network service is added to
+// the Traffic Mirror filter, all traffic related to that network service will be
+// mirrored. When you no longer want to mirror network services, use
+// RemoveNetworkServices to remove the network services from the Traffic Mirror
+// filter. For information about filter rule properties, see Network Services
+// (https://docs.aws.amazon.com/vpc/latest/mirroring/traffic-mirroring-considerations.html)
+// in the Traffic Mirroring User Guide .
+func (c *Client) ModifyTrafficMirrorFilterNetworkServices(ctx context.Context, params *ModifyTrafficMirrorFilterNetworkServicesInput, optFns ...func(*Options)) (*ModifyTrafficMirrorFilterNetworkServicesOutput, error) {
+ if params == nil {
+ params = &ModifyTrafficMirrorFilterNetworkServicesInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ModifyTrafficMirrorFilterNetworkServices", params, optFns, c.addOperationModifyTrafficMirrorFilterNetworkServicesMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ModifyTrafficMirrorFilterNetworkServicesOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ModifyTrafficMirrorFilterNetworkServicesInput struct {
+
+ // The ID of the Traffic Mirror filter.
+ //
+ // This member is required.
+ TrafficMirrorFilterId *string
+
+ // The network service, for example Amazon DNS, that you want to mirror.
+ AddNetworkServices []types.TrafficMirrorNetworkService
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The network service, for example Amazon DNS, that you no longer want to mirror.
+ RemoveNetworkServices []types.TrafficMirrorNetworkService
+
+ noSmithyDocumentSerde
+}
+
+type ModifyTrafficMirrorFilterNetworkServicesOutput struct {
+
+ // The Traffic Mirror filter that the network service is associated with.
+ TrafficMirrorFilter *types.TrafficMirrorFilter
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationModifyTrafficMirrorFilterNetworkServicesMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpModifyTrafficMirrorFilterNetworkServices{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyTrafficMirrorFilterNetworkServices{}, 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 = addOpModifyTrafficMirrorFilterNetworkServicesValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyTrafficMirrorFilterNetworkServices(options.Region), middleware.Before); 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_opModifyTrafficMirrorFilterNetworkServices(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "ModifyTrafficMirrorFilterNetworkServices",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyTrafficMirrorFilterRule.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyTrafficMirrorFilterRule.go
new file mode 100644
index 00000000..9e0c79b4
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyTrafficMirrorFilterRule.go
@@ -0,0 +1,162 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Modifies the specified Traffic Mirror rule. DestinationCidrBlock and
+// SourceCidrBlock must both be an IPv4 range or an IPv6 range.
+func (c *Client) ModifyTrafficMirrorFilterRule(ctx context.Context, params *ModifyTrafficMirrorFilterRuleInput, optFns ...func(*Options)) (*ModifyTrafficMirrorFilterRuleOutput, error) {
+ if params == nil {
+ params = &ModifyTrafficMirrorFilterRuleInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ModifyTrafficMirrorFilterRule", params, optFns, c.addOperationModifyTrafficMirrorFilterRuleMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ModifyTrafficMirrorFilterRuleOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ModifyTrafficMirrorFilterRuleInput struct {
+
+ // The ID of the Traffic Mirror rule.
+ //
+ // This member is required.
+ TrafficMirrorFilterRuleId *string
+
+ // The description to assign to the Traffic Mirror rule.
+ Description *string
+
+ // The destination CIDR block to assign to the Traffic Mirror rule.
+ DestinationCidrBlock *string
+
+ // The destination ports that are associated with the Traffic Mirror rule.
+ DestinationPortRange *types.TrafficMirrorPortRangeRequest
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The protocol, for example TCP, to assign to the Traffic Mirror rule.
+ Protocol *int32
+
+ // The properties that you want to remove from the Traffic Mirror filter rule. When
+ // you remove a property from a Traffic Mirror filter rule, the property is set to
+ // the default.
+ RemoveFields []types.TrafficMirrorFilterRuleField
+
+ // The action to assign to the rule.
+ RuleAction types.TrafficMirrorRuleAction
+
+ // The number of the Traffic Mirror rule. This number must be unique for each
+ // Traffic Mirror rule in a given direction. The rules are processed in ascending
+ // order by rule number.
+ RuleNumber *int32
+
+ // The source CIDR block to assign to the Traffic Mirror rule.
+ SourceCidrBlock *string
+
+ // The port range to assign to the Traffic Mirror rule.
+ SourcePortRange *types.TrafficMirrorPortRangeRequest
+
+ // The type of traffic (ingress | egress) to assign to the rule.
+ TrafficDirection types.TrafficDirection
+
+ noSmithyDocumentSerde
+}
+
+type ModifyTrafficMirrorFilterRuleOutput struct {
+
+ // Modifies a Traffic Mirror rule.
+ TrafficMirrorFilterRule *types.TrafficMirrorFilterRule
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationModifyTrafficMirrorFilterRuleMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpModifyTrafficMirrorFilterRule{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyTrafficMirrorFilterRule{}, 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 = addOpModifyTrafficMirrorFilterRuleValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyTrafficMirrorFilterRule(options.Region), middleware.Before); 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_opModifyTrafficMirrorFilterRule(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "ModifyTrafficMirrorFilterRule",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyTrafficMirrorSession.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyTrafficMirrorSession.go
new file mode 100644
index 00000000..105f8821
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyTrafficMirrorSession.go
@@ -0,0 +1,157 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Modifies a Traffic Mirror session.
+func (c *Client) ModifyTrafficMirrorSession(ctx context.Context, params *ModifyTrafficMirrorSessionInput, optFns ...func(*Options)) (*ModifyTrafficMirrorSessionOutput, error) {
+ if params == nil {
+ params = &ModifyTrafficMirrorSessionInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ModifyTrafficMirrorSession", params, optFns, c.addOperationModifyTrafficMirrorSessionMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ModifyTrafficMirrorSessionOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ModifyTrafficMirrorSessionInput struct {
+
+ // The ID of the Traffic Mirror session.
+ //
+ // This member is required.
+ TrafficMirrorSessionId *string
+
+ // The description to assign to the Traffic Mirror session.
+ Description *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The number of bytes in each packet to mirror. These are bytes after the VXLAN
+ // header. To mirror a subset, set this to the length (in bytes) to mirror. For
+ // example, if you set this value to 100, then the first 100 bytes that meet the
+ // filter criteria are copied to the target. Do not specify this parameter when you
+ // want to mirror the entire packet.
+ PacketLength *int32
+
+ // The properties that you want to remove from the Traffic Mirror session. When you
+ // remove a property from a Traffic Mirror session, the property is set to the
+ // default.
+ RemoveFields []types.TrafficMirrorSessionField
+
+ // The session number determines the order in which sessions are evaluated when an
+ // interface is used by multiple sessions. The first session with a matching filter
+ // is the one that mirrors the packets. Valid values are 1-32766.
+ SessionNumber *int32
+
+ // The ID of the Traffic Mirror filter.
+ TrafficMirrorFilterId *string
+
+ // The Traffic Mirror target. The target must be in the same VPC as the source, or
+ // have a VPC peering connection with the source.
+ TrafficMirrorTargetId *string
+
+ // The virtual network ID of the Traffic Mirror session.
+ VirtualNetworkId *int32
+
+ noSmithyDocumentSerde
+}
+
+type ModifyTrafficMirrorSessionOutput struct {
+
+ // Information about the Traffic Mirror session.
+ TrafficMirrorSession *types.TrafficMirrorSession
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationModifyTrafficMirrorSessionMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpModifyTrafficMirrorSession{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyTrafficMirrorSession{}, 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 = addOpModifyTrafficMirrorSessionValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyTrafficMirrorSession(options.Region), middleware.Before); 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_opModifyTrafficMirrorSession(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "ModifyTrafficMirrorSession",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyTransitGateway.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyTransitGateway.go
new file mode 100644
index 00000000..acff7f21
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyTransitGateway.go
@@ -0,0 +1,135 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Modifies the specified transit gateway. When you modify a transit gateway, the
+// modified options are applied to new transit gateway attachments only. Your
+// existing transit gateway attachments are not modified.
+func (c *Client) ModifyTransitGateway(ctx context.Context, params *ModifyTransitGatewayInput, optFns ...func(*Options)) (*ModifyTransitGatewayOutput, error) {
+ if params == nil {
+ params = &ModifyTransitGatewayInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ModifyTransitGateway", params, optFns, c.addOperationModifyTransitGatewayMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ModifyTransitGatewayOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ModifyTransitGatewayInput struct {
+
+ // The ID of the transit gateway.
+ //
+ // This member is required.
+ TransitGatewayId *string
+
+ // The description for the transit gateway.
+ Description *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The options to modify.
+ Options *types.ModifyTransitGatewayOptions
+
+ noSmithyDocumentSerde
+}
+
+type ModifyTransitGatewayOutput struct {
+
+ // Describes a transit gateway.
+ TransitGateway *types.TransitGateway
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationModifyTransitGatewayMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpModifyTransitGateway{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyTransitGateway{}, 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 = addOpModifyTransitGatewayValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyTransitGateway(options.Region), middleware.Before); 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_opModifyTransitGateway(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "ModifyTransitGateway",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyTransitGatewayPrefixListReference.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyTransitGatewayPrefixListReference.go
new file mode 100644
index 00000000..b204cd10
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyTransitGatewayPrefixListReference.go
@@ -0,0 +1,139 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Modifies a reference (route) to a prefix list in a specified transit gateway
+// route table.
+func (c *Client) ModifyTransitGatewayPrefixListReference(ctx context.Context, params *ModifyTransitGatewayPrefixListReferenceInput, optFns ...func(*Options)) (*ModifyTransitGatewayPrefixListReferenceOutput, error) {
+ if params == nil {
+ params = &ModifyTransitGatewayPrefixListReferenceInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ModifyTransitGatewayPrefixListReference", params, optFns, c.addOperationModifyTransitGatewayPrefixListReferenceMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ModifyTransitGatewayPrefixListReferenceOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ModifyTransitGatewayPrefixListReferenceInput struct {
+
+ // The ID of the prefix list.
+ //
+ // This member is required.
+ PrefixListId *string
+
+ // The ID of the transit gateway route table.
+ //
+ // This member is required.
+ TransitGatewayRouteTableId *string
+
+ // Indicates whether to drop traffic that matches this route.
+ Blackhole *bool
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The ID of the attachment to which traffic is routed.
+ TransitGatewayAttachmentId *string
+
+ noSmithyDocumentSerde
+}
+
+type ModifyTransitGatewayPrefixListReferenceOutput struct {
+
+ // Information about the prefix list reference.
+ TransitGatewayPrefixListReference *types.TransitGatewayPrefixListReference
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationModifyTransitGatewayPrefixListReferenceMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpModifyTransitGatewayPrefixListReference{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyTransitGatewayPrefixListReference{}, 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 = addOpModifyTransitGatewayPrefixListReferenceValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyTransitGatewayPrefixListReference(options.Region), middleware.Before); 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_opModifyTransitGatewayPrefixListReference(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "ModifyTransitGatewayPrefixListReference",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyTransitGatewayVpcAttachment.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyTransitGatewayVpcAttachment.go
new file mode 100644
index 00000000..ac00860e
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyTransitGatewayVpcAttachment.go
@@ -0,0 +1,137 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Modifies the specified VPC attachment.
+func (c *Client) ModifyTransitGatewayVpcAttachment(ctx context.Context, params *ModifyTransitGatewayVpcAttachmentInput, optFns ...func(*Options)) (*ModifyTransitGatewayVpcAttachmentOutput, error) {
+ if params == nil {
+ params = &ModifyTransitGatewayVpcAttachmentInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ModifyTransitGatewayVpcAttachment", params, optFns, c.addOperationModifyTransitGatewayVpcAttachmentMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ModifyTransitGatewayVpcAttachmentOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ModifyTransitGatewayVpcAttachmentInput struct {
+
+ // The ID of the attachment.
+ //
+ // This member is required.
+ TransitGatewayAttachmentId *string
+
+ // The IDs of one or more subnets to add. You can specify at most one subnet per
+ // Availability Zone.
+ AddSubnetIds []string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The new VPC attachment options.
+ Options *types.ModifyTransitGatewayVpcAttachmentRequestOptions
+
+ // The IDs of one or more subnets to remove.
+ RemoveSubnetIds []string
+
+ noSmithyDocumentSerde
+}
+
+type ModifyTransitGatewayVpcAttachmentOutput struct {
+
+ // Information about the modified attachment.
+ TransitGatewayVpcAttachment *types.TransitGatewayVpcAttachment
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationModifyTransitGatewayVpcAttachmentMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpModifyTransitGatewayVpcAttachment{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyTransitGatewayVpcAttachment{}, 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 = addOpModifyTransitGatewayVpcAttachmentValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyTransitGatewayVpcAttachment(options.Region), middleware.Before); 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_opModifyTransitGatewayVpcAttachment(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "ModifyTransitGatewayVpcAttachment",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVolume.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVolume.go
new file mode 100644
index 00000000..6dc54ef2
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVolume.go
@@ -0,0 +1,205 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// You can modify several parameters of an existing EBS volume, including volume
+// size, volume type, and IOPS capacity. If your EBS volume is attached to a
+// current-generation EC2 instance type, you might be able to apply these changes
+// without stopping the instance or detaching the volume from it. For more
+// information about modifying EBS volumes, see Amazon EBS Elastic Volumes
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-modify-volume.html)
+// (Linux instances) or Amazon EBS Elastic Volumes
+// (https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ebs-modify-volume.html)
+// (Windows instances). When you complete a resize operation on your volume, you
+// need to extend the volume's file-system size to take advantage of the new
+// storage capacity. For more information, see Extend a Linux file system
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-expand-volume.html#recognize-expanded-volume-linux)
+// or Extend a Windows file system
+// (https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ebs-expand-volume.html#recognize-expanded-volume-windows).
+// You can use CloudWatch Events to check the status of a modification to an EBS
+// volume. For information about CloudWatch Events, see the Amazon CloudWatch
+// Events User Guide (https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/).
+// You can also track the status of a modification using
+// DescribeVolumesModifications. For information about tracking status changes
+// using either method, see Monitor the progress of volume modifications
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/monitoring-volume-modifications.html).
+// With previous-generation instance types, resizing an EBS volume might require
+// detaching and reattaching the volume or stopping and restarting the instance. If
+// you reach the maximum volume modification rate per volume limit, you must wait
+// at least six hours before applying further modifications to the affected EBS
+// volume.
+func (c *Client) ModifyVolume(ctx context.Context, params *ModifyVolumeInput, optFns ...func(*Options)) (*ModifyVolumeOutput, error) {
+ if params == nil {
+ params = &ModifyVolumeInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ModifyVolume", params, optFns, c.addOperationModifyVolumeMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ModifyVolumeOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ModifyVolumeInput struct {
+
+ // The ID of the volume.
+ //
+ // This member is required.
+ VolumeId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The target IOPS rate of the volume. This parameter is valid only for gp3, io1,
+ // and io2 volumes. The following are the supported values for each volume type:
+ //
+ // *
+ // gp3: 3,000-16,000 IOPS
+ //
+ // * io1: 100-64,000 IOPS
+ //
+ // * io2: 100-64,000 IOPS
+ //
+ // Default:
+ // The existing value is retained if you keep the same volume type. If you change
+ // the volume type to io1, io2, or gp3, the default is 3,000.
+ Iops *int32
+
+ // Specifies whether to enable Amazon EBS Multi-Attach. If you enable Multi-Attach,
+ // you can attach the volume to up to 16 Nitro-based instances
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#ec2-nitro-instances)
+ // in the same Availability Zone. This parameter is supported with io1 and io2
+ // volumes only. For more information, see Amazon EBS Multi-Attach
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-volumes-multi.html) in
+ // the Amazon Elastic Compute Cloud User Guide.
+ MultiAttachEnabled *bool
+
+ // The target size of the volume, in GiB. The target volume size must be greater
+ // than or equal to the existing size of the volume. The following are the
+ // supported volumes sizes for each volume type:
+ //
+ // * gp2 and gp3: 1-16,384
+ //
+ // * io1
+ // and io2: 4-16,384
+ //
+ // * st1 and sc1: 125-16,384
+ //
+ // * standard: 1-1,024
+ //
+ // Default: The
+ // existing size is retained.
+ Size *int32
+
+ // The target throughput of the volume, in MiB/s. This parameter is valid only for
+ // gp3 volumes. The maximum value is 1,000. Default: The existing value is retained
+ // if the source and target volume type is gp3. Otherwise, the default value is
+ // 125. Valid Range: Minimum value of 125. Maximum value of 1000.
+ Throughput *int32
+
+ // The target EBS volume type of the volume. For more information, see Amazon EBS
+ // volume types
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html) in the
+ // Amazon Elastic Compute Cloud User Guide. Default: The existing type is retained.
+ VolumeType types.VolumeType
+
+ noSmithyDocumentSerde
+}
+
+type ModifyVolumeOutput struct {
+
+ // Information about the volume modification.
+ VolumeModification *types.VolumeModification
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationModifyVolumeMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpModifyVolume{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyVolume{}, 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 = addOpModifyVolumeValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyVolume(options.Region), middleware.Before); 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_opModifyVolume(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "ModifyVolume",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVolumeAttribute.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVolumeAttribute.go
new file mode 100644
index 00000000..df855e7a
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVolumeAttribute.go
@@ -0,0 +1,132 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Modifies a volume attribute. By default, all I/O operations for the volume are
+// suspended when the data on the volume is determined to be potentially
+// inconsistent, to prevent undetectable, latent data corruption. The I/O access to
+// the volume can be resumed by first enabling I/O access and then checking the
+// data consistency on your volume. You can change the default behavior to resume
+// I/O operations. We recommend that you change this only for boot volumes or for
+// volumes that are stateless or disposable.
+func (c *Client) ModifyVolumeAttribute(ctx context.Context, params *ModifyVolumeAttributeInput, optFns ...func(*Options)) (*ModifyVolumeAttributeOutput, error) {
+ if params == nil {
+ params = &ModifyVolumeAttributeInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ModifyVolumeAttribute", params, optFns, c.addOperationModifyVolumeAttributeMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ModifyVolumeAttributeOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ModifyVolumeAttributeInput struct {
+
+ // The ID of the volume.
+ //
+ // This member is required.
+ VolumeId *string
+
+ // Indicates whether the volume should be auto-enabled for I/O operations.
+ AutoEnableIO *types.AttributeBooleanValue
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type ModifyVolumeAttributeOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationModifyVolumeAttributeMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpModifyVolumeAttribute{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyVolumeAttribute{}, 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 = addOpModifyVolumeAttributeValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyVolumeAttribute(options.Region), middleware.Before); 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_opModifyVolumeAttribute(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "ModifyVolumeAttribute",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVpcAttribute.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVpcAttribute.go
new file mode 100644
index 00000000..7213abe9
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVpcAttribute.go
@@ -0,0 +1,133 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Modifies the specified attribute of the specified VPC.
+func (c *Client) ModifyVpcAttribute(ctx context.Context, params *ModifyVpcAttributeInput, optFns ...func(*Options)) (*ModifyVpcAttributeOutput, error) {
+ if params == nil {
+ params = &ModifyVpcAttributeInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ModifyVpcAttribute", params, optFns, c.addOperationModifyVpcAttributeMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ModifyVpcAttributeOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ModifyVpcAttributeInput struct {
+
+ // The ID of the VPC.
+ //
+ // This member is required.
+ VpcId *string
+
+ // Indicates whether the instances launched in the VPC get DNS hostnames. If
+ // enabled, instances in the VPC get DNS hostnames; otherwise, they do not. You
+ // cannot modify the DNS resolution and DNS hostnames attributes in the same
+ // request. Use separate requests for each attribute. You can only enable DNS
+ // hostnames if you've enabled DNS support.
+ EnableDnsHostnames *types.AttributeBooleanValue
+
+ // Indicates whether the DNS resolution is supported for the VPC. If enabled,
+ // queries to the Amazon provided DNS server at the 169.254.169.253 IP address, or
+ // the reserved IP address at the base of the VPC network range "plus two" succeed.
+ // If disabled, the Amazon provided DNS service in the VPC that resolves public DNS
+ // hostnames to IP addresses is not enabled. You cannot modify the DNS resolution
+ // and DNS hostnames attributes in the same request. Use separate requests for each
+ // attribute.
+ EnableDnsSupport *types.AttributeBooleanValue
+
+ noSmithyDocumentSerde
+}
+
+type ModifyVpcAttributeOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationModifyVpcAttributeMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpModifyVpcAttribute{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyVpcAttribute{}, 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 = addOpModifyVpcAttributeValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyVpcAttribute(options.Region), middleware.Before); 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_opModifyVpcAttribute(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "ModifyVpcAttribute",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVpcEndpoint.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVpcEndpoint.go
new file mode 100644
index 00000000..433a9756
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVpcEndpoint.go
@@ -0,0 +1,166 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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"
+)
+
+// Modifies attributes of a specified VPC endpoint. The attributes that you can
+// modify depend on the type of VPC endpoint (interface, gateway, or Gateway Load
+// Balancer). For more information, see VPC Endpoints
+// (https://docs.aws.amazon.com/vpc/latest/userguide/vpc-endpoints.html) in the
+// Amazon Virtual Private Cloud User Guide.
+func (c *Client) ModifyVpcEndpoint(ctx context.Context, params *ModifyVpcEndpointInput, optFns ...func(*Options)) (*ModifyVpcEndpointOutput, error) {
+ if params == nil {
+ params = &ModifyVpcEndpointInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ModifyVpcEndpoint", params, optFns, c.addOperationModifyVpcEndpointMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ModifyVpcEndpointOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+// Contains the parameters for ModifyVpcEndpoint.
+type ModifyVpcEndpointInput struct {
+
+ // The ID of the endpoint.
+ //
+ // This member is required.
+ VpcEndpointId *string
+
+ // (Gateway endpoint) One or more route tables IDs to associate with the endpoint.
+ AddRouteTableIds []string
+
+ // (Interface endpoint) One or more security group IDs to associate with the
+ // network interface.
+ AddSecurityGroupIds []string
+
+ // (Interface and Gateway Load Balancer endpoints) One or more subnet IDs in which
+ // to serve the endpoint. For a Gateway Load Balancer endpoint, you can specify
+ // only one subnet.
+ AddSubnetIds []string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // (Interface and gateway endpoints) A policy to attach to the endpoint that
+ // controls access to the service. The policy must be in valid JSON format.
+ PolicyDocument *string
+
+ // (Interface endpoint) Indicates whether a private hosted zone is associated with
+ // the VPC.
+ PrivateDnsEnabled *bool
+
+ // (Gateway endpoint) One or more route table IDs to disassociate from the
+ // endpoint.
+ RemoveRouteTableIds []string
+
+ // (Interface endpoint) One or more security group IDs to disassociate from the
+ // network interface.
+ RemoveSecurityGroupIds []string
+
+ // (Interface endpoint) One or more subnets IDs in which to remove the endpoint.
+ RemoveSubnetIds []string
+
+ // (Gateway endpoint) Specify true to reset the policy document to the default
+ // policy. The default policy allows full access to the service.
+ ResetPolicy *bool
+
+ noSmithyDocumentSerde
+}
+
+type ModifyVpcEndpointOutput struct {
+
+ // Returns true if the request succeeds; otherwise, it returns an error.
+ Return *bool
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationModifyVpcEndpointMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpModifyVpcEndpoint{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyVpcEndpoint{}, 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 = addOpModifyVpcEndpointValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyVpcEndpoint(options.Region), middleware.Before); 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_opModifyVpcEndpoint(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "ModifyVpcEndpoint",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVpcEndpointConnectionNotification.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVpcEndpointConnectionNotification.go
new file mode 100644
index 00000000..22a0d5cf
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVpcEndpointConnectionNotification.go
@@ -0,0 +1,135 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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"
+)
+
+// Modifies a connection notification for VPC endpoint or VPC endpoint service. You
+// can change the SNS topic for the notification, or the events for which to be
+// notified.
+func (c *Client) ModifyVpcEndpointConnectionNotification(ctx context.Context, params *ModifyVpcEndpointConnectionNotificationInput, optFns ...func(*Options)) (*ModifyVpcEndpointConnectionNotificationOutput, error) {
+ if params == nil {
+ params = &ModifyVpcEndpointConnectionNotificationInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ModifyVpcEndpointConnectionNotification", params, optFns, c.addOperationModifyVpcEndpointConnectionNotificationMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ModifyVpcEndpointConnectionNotificationOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ModifyVpcEndpointConnectionNotificationInput struct {
+
+ // The ID of the notification.
+ //
+ // This member is required.
+ ConnectionNotificationId *string
+
+ // One or more events for the endpoint. Valid values are Accept, Connect, Delete,
+ // and Reject.
+ ConnectionEvents []string
+
+ // The ARN for the SNS topic for the notification.
+ ConnectionNotificationArn *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type ModifyVpcEndpointConnectionNotificationOutput struct {
+
+ // Returns true if the request succeeds; otherwise, it returns an error.
+ ReturnValue *bool
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationModifyVpcEndpointConnectionNotificationMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpModifyVpcEndpointConnectionNotification{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyVpcEndpointConnectionNotification{}, 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 = addOpModifyVpcEndpointConnectionNotificationValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyVpcEndpointConnectionNotification(options.Region), middleware.Before); 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_opModifyVpcEndpointConnectionNotification(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "ModifyVpcEndpointConnectionNotification",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVpcEndpointServiceConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVpcEndpointServiceConfiguration.go
new file mode 100644
index 00000000..0ecc3f87
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVpcEndpointServiceConfiguration.go
@@ -0,0 +1,161 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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"
+)
+
+// Modifies the attributes of your VPC endpoint service configuration. You can
+// change the Network Load Balancers or Gateway Load Balancers for your service,
+// and you can specify whether acceptance is required for requests to connect to
+// your endpoint service through an interface VPC endpoint. If you set or modify
+// the private DNS name, you must prove that you own the private DNS domain name.
+// For more information, see VPC Endpoint Service Private DNS Name Verification
+// (https://docs.aws.amazon.com/vpc/latest/userguide/endpoint-services-dns-validation.html)
+// in the Amazon Virtual Private Cloud User Guide.
+func (c *Client) ModifyVpcEndpointServiceConfiguration(ctx context.Context, params *ModifyVpcEndpointServiceConfigurationInput, optFns ...func(*Options)) (*ModifyVpcEndpointServiceConfigurationOutput, error) {
+ if params == nil {
+ params = &ModifyVpcEndpointServiceConfigurationInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ModifyVpcEndpointServiceConfiguration", params, optFns, c.addOperationModifyVpcEndpointServiceConfigurationMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ModifyVpcEndpointServiceConfigurationOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ModifyVpcEndpointServiceConfigurationInput struct {
+
+ // The ID of the service.
+ //
+ // This member is required.
+ ServiceId *string
+
+ // Indicates whether requests to create an endpoint to your service must be
+ // accepted.
+ AcceptanceRequired *bool
+
+ // The Amazon Resource Names (ARNs) of Gateway Load Balancers to add to your
+ // service configuration.
+ AddGatewayLoadBalancerArns []string
+
+ // The Amazon Resource Names (ARNs) of Network Load Balancers to add to your
+ // service configuration.
+ AddNetworkLoadBalancerArns []string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // (Interface endpoint configuration) The private DNS name to assign to the
+ // endpoint service.
+ PrivateDnsName *string
+
+ // The Amazon Resource Names (ARNs) of Gateway Load Balancers to remove from your
+ // service configuration.
+ RemoveGatewayLoadBalancerArns []string
+
+ // The Amazon Resource Names (ARNs) of Network Load Balancers to remove from your
+ // service configuration.
+ RemoveNetworkLoadBalancerArns []string
+
+ // (Interface endpoint configuration) Removes the private DNS name of the endpoint
+ // service.
+ RemovePrivateDnsName *bool
+
+ noSmithyDocumentSerde
+}
+
+type ModifyVpcEndpointServiceConfigurationOutput struct {
+
+ // Returns true if the request succeeds; otherwise, it returns an error.
+ Return *bool
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationModifyVpcEndpointServiceConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpModifyVpcEndpointServiceConfiguration{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyVpcEndpointServiceConfiguration{}, 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 = addOpModifyVpcEndpointServiceConfigurationValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyVpcEndpointServiceConfiguration(options.Region), middleware.Before); 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_opModifyVpcEndpointServiceConfiguration(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "ModifyVpcEndpointServiceConfiguration",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVpcEndpointServicePermissions.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVpcEndpointServicePermissions.go
new file mode 100644
index 00000000..8eacd42a
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVpcEndpointServicePermissions.go
@@ -0,0 +1,141 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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"
+)
+
+// Modifies the permissions for your VPC endpoint service
+// (https://docs.aws.amazon.com/vpc/latest/userguide/endpoint-service.html). You
+// can add or remove permissions for service consumers (IAM users, IAM roles, and
+// AWS accounts) to connect to your endpoint service. If you grant permissions to
+// all principals, the service is public. Any users who know the name of a public
+// service can send a request to attach an endpoint. If the service does not
+// require manual approval, attachments are automatically approved.
+func (c *Client) ModifyVpcEndpointServicePermissions(ctx context.Context, params *ModifyVpcEndpointServicePermissionsInput, optFns ...func(*Options)) (*ModifyVpcEndpointServicePermissionsOutput, error) {
+ if params == nil {
+ params = &ModifyVpcEndpointServicePermissionsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ModifyVpcEndpointServicePermissions", params, optFns, c.addOperationModifyVpcEndpointServicePermissionsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ModifyVpcEndpointServicePermissionsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ModifyVpcEndpointServicePermissionsInput struct {
+
+ // The ID of the service.
+ //
+ // This member is required.
+ ServiceId *string
+
+ // The Amazon Resource Names (ARN) of one or more principals. Permissions are
+ // granted to the principals in this list. To grant permissions to all principals,
+ // specify an asterisk (*).
+ AddAllowedPrincipals []string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The Amazon Resource Names (ARN) of one or more principals. Permissions are
+ // revoked for principals in this list.
+ RemoveAllowedPrincipals []string
+
+ noSmithyDocumentSerde
+}
+
+type ModifyVpcEndpointServicePermissionsOutput struct {
+
+ // Returns true if the request succeeds; otherwise, it returns an error.
+ ReturnValue *bool
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationModifyVpcEndpointServicePermissionsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpModifyVpcEndpointServicePermissions{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyVpcEndpointServicePermissions{}, 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 = addOpModifyVpcEndpointServicePermissionsValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyVpcEndpointServicePermissions(options.Region), middleware.Before); 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_opModifyVpcEndpointServicePermissions(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "ModifyVpcEndpointServicePermissions",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVpcPeeringConnectionOptions.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVpcPeeringConnectionOptions.go
new file mode 100644
index 00000000..65977efb
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVpcPeeringConnectionOptions.go
@@ -0,0 +1,162 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Modifies the VPC peering connection options on one side of a VPC peering
+// connection. You can do the following:
+//
+// * Enable/disable communication over the
+// peering connection between an EC2-Classic instance that's linked to your VPC
+// (using ClassicLink) and instances in the peer VPC.
+//
+// * Enable/disable
+// communication over the peering connection between instances in your VPC and an
+// EC2-Classic instance that's linked to the peer VPC.
+//
+// * Enable/disable the
+// ability to resolve public DNS hostnames to private IP addresses when queried
+// from instances in the peer VPC.
+//
+// If the peered VPCs are in the same Amazon Web
+// Services account, you can enable DNS resolution for queries from the local VPC.
+// This ensures that queries from the local VPC resolve to private IP addresses in
+// the peer VPC. This option is not available if the peered VPCs are in different
+// different Amazon Web Services accounts or different Regions. For peered VPCs in
+// different Amazon Web Services accounts, each Amazon Web Services account owner
+// must initiate a separate request to modify the peering connection options. For
+// inter-region peering connections, you must use the Region for the requester VPC
+// to modify the requester VPC peering options and the Region for the accepter VPC
+// to modify the accepter VPC peering options. To verify which VPCs are the
+// accepter and the requester for a VPC peering connection, use the
+// DescribeVpcPeeringConnections command.
+func (c *Client) ModifyVpcPeeringConnectionOptions(ctx context.Context, params *ModifyVpcPeeringConnectionOptionsInput, optFns ...func(*Options)) (*ModifyVpcPeeringConnectionOptionsOutput, error) {
+ if params == nil {
+ params = &ModifyVpcPeeringConnectionOptionsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ModifyVpcPeeringConnectionOptions", params, optFns, c.addOperationModifyVpcPeeringConnectionOptionsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ModifyVpcPeeringConnectionOptionsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ModifyVpcPeeringConnectionOptionsInput struct {
+
+ // The ID of the VPC peering connection.
+ //
+ // This member is required.
+ VpcPeeringConnectionId *string
+
+ // The VPC peering connection options for the accepter VPC.
+ AccepterPeeringConnectionOptions *types.PeeringConnectionOptionsRequest
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The VPC peering connection options for the requester VPC.
+ RequesterPeeringConnectionOptions *types.PeeringConnectionOptionsRequest
+
+ noSmithyDocumentSerde
+}
+
+type ModifyVpcPeeringConnectionOptionsOutput struct {
+
+ // Information about the VPC peering connection options for the accepter VPC.
+ AccepterPeeringConnectionOptions *types.PeeringConnectionOptions
+
+ // Information about the VPC peering connection options for the requester VPC.
+ RequesterPeeringConnectionOptions *types.PeeringConnectionOptions
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationModifyVpcPeeringConnectionOptionsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpModifyVpcPeeringConnectionOptions{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyVpcPeeringConnectionOptions{}, 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 = addOpModifyVpcPeeringConnectionOptionsValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyVpcPeeringConnectionOptions(options.Region), middleware.Before); 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_opModifyVpcPeeringConnectionOptions(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "ModifyVpcPeeringConnectionOptions",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVpcTenancy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVpcTenancy.go
new file mode 100644
index 00000000..87e62600
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVpcTenancy.go
@@ -0,0 +1,140 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Modifies the instance tenancy attribute of the specified VPC. You can change the
+// instance tenancy attribute of a VPC to default only. You cannot change the
+// instance tenancy attribute to dedicated. After you modify the tenancy of the
+// VPC, any new instances that you launch into the VPC have a tenancy of default,
+// unless you specify otherwise during launch. The tenancy of any existing
+// instances in the VPC is not affected. For more information, see Dedicated
+// Instances
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/dedicated-instance.html) in
+// the Amazon Elastic Compute Cloud User Guide.
+func (c *Client) ModifyVpcTenancy(ctx context.Context, params *ModifyVpcTenancyInput, optFns ...func(*Options)) (*ModifyVpcTenancyOutput, error) {
+ if params == nil {
+ params = &ModifyVpcTenancyInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ModifyVpcTenancy", params, optFns, c.addOperationModifyVpcTenancyMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ModifyVpcTenancyOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ModifyVpcTenancyInput struct {
+
+ // The instance tenancy attribute for the VPC.
+ //
+ // This member is required.
+ InstanceTenancy types.VpcTenancy
+
+ // The ID of the VPC.
+ //
+ // This member is required.
+ VpcId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type ModifyVpcTenancyOutput struct {
+
+ // Returns true if the request succeeds; otherwise, returns an error.
+ ReturnValue *bool
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationModifyVpcTenancyMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpModifyVpcTenancy{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyVpcTenancy{}, 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 = addOpModifyVpcTenancyValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyVpcTenancy(options.Region), middleware.Before); 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_opModifyVpcTenancy(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "ModifyVpcTenancy",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVpnConnection.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVpnConnection.go
new file mode 100644
index 00000000..490b0b98
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVpnConnection.go
@@ -0,0 +1,171 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Modifies the customer gateway or the target gateway of an Amazon Web Services
+// Site-to-Site VPN connection. To modify the target gateway, the following
+// migration options are available:
+//
+// * An existing virtual private gateway to a new
+// virtual private gateway
+//
+// * An existing virtual private gateway to a transit
+// gateway
+//
+// * An existing transit gateway to a new transit gateway
+//
+// * An existing
+// transit gateway to a virtual private gateway
+//
+// Before you perform the migration
+// to the new gateway, you must configure the new gateway. Use CreateVpnGateway to
+// create a virtual private gateway, or CreateTransitGateway to create a transit
+// gateway. This step is required when you migrate from a virtual private gateway
+// with static routes to a transit gateway. You must delete the static routes
+// before you migrate to the new gateway. Keep a copy of the static route before
+// you delete it. You will need to add back these routes to the transit gateway
+// after the VPN connection migration is complete. After you migrate to the new
+// gateway, you might need to modify your VPC route table. Use CreateRoute and
+// DeleteRoute to make the changes described in Update VPC route tables
+// (https://docs.aws.amazon.com/vpn/latest/s2svpn/modify-vpn-target.html#step-update-routing)
+// in the Amazon Web Services Site-to-Site VPN User Guide. When the new gateway is
+// a transit gateway, modify the transit gateway route table to allow traffic
+// between the VPC and the Amazon Web Services Site-to-Site VPN connection. Use
+// CreateTransitGatewayRoute to add the routes. If you deleted VPN static routes,
+// you must add the static routes to the transit gateway route table. After you
+// perform this operation, the VPN endpoint's IP addresses on the Amazon Web
+// Services side and the tunnel options remain intact. Your Amazon Web Services
+// Site-to-Site VPN connection will be temporarily unavailable for a brief period
+// while we provision the new endpoints.
+func (c *Client) ModifyVpnConnection(ctx context.Context, params *ModifyVpnConnectionInput, optFns ...func(*Options)) (*ModifyVpnConnectionOutput, error) {
+ if params == nil {
+ params = &ModifyVpnConnectionInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ModifyVpnConnection", params, optFns, c.addOperationModifyVpnConnectionMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ModifyVpnConnectionOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ModifyVpnConnectionInput struct {
+
+ // The ID of the VPN connection.
+ //
+ // This member is required.
+ VpnConnectionId *string
+
+ // The ID of the customer gateway at your end of the VPN connection.
+ CustomerGatewayId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The ID of the transit gateway.
+ TransitGatewayId *string
+
+ // The ID of the virtual private gateway at the Amazon Web Services side of the VPN
+ // connection.
+ VpnGatewayId *string
+
+ noSmithyDocumentSerde
+}
+
+type ModifyVpnConnectionOutput struct {
+
+ // Describes a VPN connection.
+ VpnConnection *types.VpnConnection
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationModifyVpnConnectionMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpModifyVpnConnection{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyVpnConnection{}, 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 = addOpModifyVpnConnectionValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyVpnConnection(options.Region), middleware.Before); 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_opModifyVpnConnection(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "ModifyVpnConnection",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVpnConnectionOptions.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVpnConnectionOptions.go
new file mode 100644
index 00000000..d1476d48
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVpnConnectionOptions.go
@@ -0,0 +1,147 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Modifies the connection options for your Site-to-Site VPN connection. When you
+// modify the VPN connection options, the VPN endpoint IP addresses on the Amazon
+// Web Services side do not change, and the tunnel options do not change. Your VPN
+// connection will be temporarily unavailable for a brief period while the VPN
+// connection is updated.
+func (c *Client) ModifyVpnConnectionOptions(ctx context.Context, params *ModifyVpnConnectionOptionsInput, optFns ...func(*Options)) (*ModifyVpnConnectionOptionsOutput, error) {
+ if params == nil {
+ params = &ModifyVpnConnectionOptionsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ModifyVpnConnectionOptions", params, optFns, c.addOperationModifyVpnConnectionOptionsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ModifyVpnConnectionOptionsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ModifyVpnConnectionOptionsInput struct {
+
+ // The ID of the Site-to-Site VPN connection.
+ //
+ // This member is required.
+ VpnConnectionId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The IPv4 CIDR on the customer gateway (on-premises) side of the VPN connection.
+ // Default: 0.0.0.0/0
+ LocalIpv4NetworkCidr *string
+
+ // The IPv6 CIDR on the customer gateway (on-premises) side of the VPN connection.
+ // Default: ::/0
+ LocalIpv6NetworkCidr *string
+
+ // The IPv4 CIDR on the Amazon Web Services side of the VPN connection. Default:
+ // 0.0.0.0/0
+ RemoteIpv4NetworkCidr *string
+
+ // The IPv6 CIDR on the Amazon Web Services side of the VPN connection. Default:
+ // ::/0
+ RemoteIpv6NetworkCidr *string
+
+ noSmithyDocumentSerde
+}
+
+type ModifyVpnConnectionOptionsOutput struct {
+
+ // Describes a VPN connection.
+ VpnConnection *types.VpnConnection
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationModifyVpnConnectionOptionsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpModifyVpnConnectionOptions{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyVpnConnectionOptions{}, 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 = addOpModifyVpnConnectionOptionsValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyVpnConnectionOptions(options.Region), middleware.Before); 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_opModifyVpnConnectionOptions(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "ModifyVpnConnectionOptions",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVpnTunnelCertificate.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVpnTunnelCertificate.go
new file mode 100644
index 00000000..fd96d2d4
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVpnTunnelCertificate.go
@@ -0,0 +1,132 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Modifies the VPN tunnel endpoint certificate.
+func (c *Client) ModifyVpnTunnelCertificate(ctx context.Context, params *ModifyVpnTunnelCertificateInput, optFns ...func(*Options)) (*ModifyVpnTunnelCertificateOutput, error) {
+ if params == nil {
+ params = &ModifyVpnTunnelCertificateInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ModifyVpnTunnelCertificate", params, optFns, c.addOperationModifyVpnTunnelCertificateMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ModifyVpnTunnelCertificateOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ModifyVpnTunnelCertificateInput struct {
+
+ // The ID of the Amazon Web Services Site-to-Site VPN connection.
+ //
+ // This member is required.
+ VpnConnectionId *string
+
+ // The external IP address of the VPN tunnel.
+ //
+ // This member is required.
+ VpnTunnelOutsideIpAddress *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type ModifyVpnTunnelCertificateOutput struct {
+
+ // Describes a VPN connection.
+ VpnConnection *types.VpnConnection
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationModifyVpnTunnelCertificateMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpModifyVpnTunnelCertificate{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyVpnTunnelCertificate{}, 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 = addOpModifyVpnTunnelCertificateValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyVpnTunnelCertificate(options.Region), middleware.Before); 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_opModifyVpnTunnelCertificate(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "ModifyVpnTunnelCertificate",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVpnTunnelOptions.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVpnTunnelOptions.go
new file mode 100644
index 00000000..d5f9d1e4
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVpnTunnelOptions.go
@@ -0,0 +1,142 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Modifies the options for a VPN tunnel in an Amazon Web Services Site-to-Site VPN
+// connection. You can modify multiple options for a tunnel in a single request,
+// but you can only modify one tunnel at a time. For more information, see
+// Site-to-Site VPN tunnel options for your Site-to-Site VPN connection
+// (https://docs.aws.amazon.com/vpn/latest/s2svpn/VPNTunnels.html) in the Amazon
+// Web Services Site-to-Site VPN User Guide.
+func (c *Client) ModifyVpnTunnelOptions(ctx context.Context, params *ModifyVpnTunnelOptionsInput, optFns ...func(*Options)) (*ModifyVpnTunnelOptionsOutput, error) {
+ if params == nil {
+ params = &ModifyVpnTunnelOptionsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ModifyVpnTunnelOptions", params, optFns, c.addOperationModifyVpnTunnelOptionsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ModifyVpnTunnelOptionsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ModifyVpnTunnelOptionsInput struct {
+
+ // The tunnel options to modify.
+ //
+ // This member is required.
+ TunnelOptions *types.ModifyVpnTunnelOptionsSpecification
+
+ // The ID of the Amazon Web Services Site-to-Site VPN connection.
+ //
+ // This member is required.
+ VpnConnectionId *string
+
+ // The external IP address of the VPN tunnel.
+ //
+ // This member is required.
+ VpnTunnelOutsideIpAddress *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type ModifyVpnTunnelOptionsOutput struct {
+
+ // Describes a VPN connection.
+ VpnConnection *types.VpnConnection
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationModifyVpnTunnelOptionsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpModifyVpnTunnelOptions{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyVpnTunnelOptions{}, 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 = addOpModifyVpnTunnelOptionsValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyVpnTunnelOptions(options.Region), middleware.Before); 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_opModifyVpnTunnelOptions(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "ModifyVpnTunnelOptions",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_MonitorInstances.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_MonitorInstances.go
new file mode 100644
index 00000000..23518ac1
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_MonitorInstances.go
@@ -0,0 +1,130 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Enables detailed monitoring for a running instance. Otherwise, basic monitoring
+// is enabled. For more information, see Monitoring your instances and volumes
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-cloudwatch.html) in
+// the Amazon EC2 User Guide. To disable detailed monitoring, see .
+func (c *Client) MonitorInstances(ctx context.Context, params *MonitorInstancesInput, optFns ...func(*Options)) (*MonitorInstancesOutput, error) {
+ if params == nil {
+ params = &MonitorInstancesInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "MonitorInstances", params, optFns, c.addOperationMonitorInstancesMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*MonitorInstancesOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type MonitorInstancesInput struct {
+
+ // The IDs of the instances.
+ //
+ // This member is required.
+ InstanceIds []string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type MonitorInstancesOutput struct {
+
+ // The monitoring information.
+ InstanceMonitorings []types.InstanceMonitoring
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationMonitorInstancesMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpMonitorInstances{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpMonitorInstances{}, 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 = addOpMonitorInstancesValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opMonitorInstances(options.Region), middleware.Before); 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_opMonitorInstances(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "MonitorInstances",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_MoveAddressToVpc.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_MoveAddressToVpc.go
new file mode 100644
index 00000000..99bdd06c
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_MoveAddressToVpc.go
@@ -0,0 +1,136 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Moves an Elastic IP address from the EC2-Classic platform to the EC2-VPC
+// platform. The Elastic IP address must be allocated to your account for more than
+// 24 hours, and it must not be associated with an instance. After the Elastic IP
+// address is moved, it is no longer available for use in the EC2-Classic platform,
+// unless you move it back using the RestoreAddressToClassic request. You cannot
+// move an Elastic IP address that was originally allocated for use in the EC2-VPC
+// platform to the EC2-Classic platform.
+func (c *Client) MoveAddressToVpc(ctx context.Context, params *MoveAddressToVpcInput, optFns ...func(*Options)) (*MoveAddressToVpcOutput, error) {
+ if params == nil {
+ params = &MoveAddressToVpcInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "MoveAddressToVpc", params, optFns, c.addOperationMoveAddressToVpcMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*MoveAddressToVpcOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type MoveAddressToVpcInput struct {
+
+ // The Elastic IP address.
+ //
+ // This member is required.
+ PublicIp *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type MoveAddressToVpcOutput struct {
+
+ // The allocation ID for the Elastic IP address.
+ AllocationId *string
+
+ // The status of the move of the IP address.
+ Status types.Status
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationMoveAddressToVpcMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpMoveAddressToVpc{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpMoveAddressToVpc{}, 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 = addOpMoveAddressToVpcValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opMoveAddressToVpc(options.Region), middleware.Before); 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_opMoveAddressToVpc(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "MoveAddressToVpc",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ProvisionByoipCidr.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ProvisionByoipCidr.go
new file mode 100644
index 00000000..050cd176
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ProvisionByoipCidr.go
@@ -0,0 +1,162 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Provisions an IPv4 or IPv6 address range for use with your Amazon Web Services
+// resources through bring your own IP addresses (BYOIP) and creates a
+// corresponding address pool. After the address range is provisioned, it is ready
+// to be advertised using AdvertiseByoipCidr. Amazon Web Services verifies that you
+// own the address range and are authorized to advertise it. You must ensure that
+// the address range is registered to you and that you created an RPKI ROA to
+// authorize Amazon ASNs 16509 and 14618 to advertise the address range. For more
+// information, see Bring your own IP addresses (BYOIP)
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-byoip.html) in the
+// Amazon Elastic Compute Cloud User Guide. Provisioning an address range is an
+// asynchronous operation, so the call returns immediately, but the address range
+// is not ready to use until its status changes from pending-provision to
+// provisioned. To monitor the status of an address range, use DescribeByoipCidrs.
+// To allocate an Elastic IP address from your IPv4 address pool, use
+// AllocateAddress with either the specific address from the address pool or the ID
+// of the address pool.
+func (c *Client) ProvisionByoipCidr(ctx context.Context, params *ProvisionByoipCidrInput, optFns ...func(*Options)) (*ProvisionByoipCidrOutput, error) {
+ if params == nil {
+ params = &ProvisionByoipCidrInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ProvisionByoipCidr", params, optFns, c.addOperationProvisionByoipCidrMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ProvisionByoipCidrOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ProvisionByoipCidrInput struct {
+
+ // The public IPv4 or IPv6 address range, in CIDR notation. The most specific IPv4
+ // prefix that you can specify is /24. The most specific IPv6 prefix you can
+ // specify is /56. The address range cannot overlap with another address range that
+ // you've brought to this or another Region.
+ //
+ // This member is required.
+ Cidr *string
+
+ // A signed document that proves that you are authorized to bring the specified IP
+ // address range to Amazon using BYOIP.
+ CidrAuthorizationContext *types.CidrAuthorizationContext
+
+ // A description for the address range and the address pool.
+ Description *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // Reserved.
+ MultiRegion *bool
+
+ // The tags to apply to the address pool.
+ PoolTagSpecifications []types.TagSpecification
+
+ // (IPv6 only) Indicate whether the address range will be publicly advertised to
+ // the internet. Default: true
+ PubliclyAdvertisable *bool
+
+ noSmithyDocumentSerde
+}
+
+type ProvisionByoipCidrOutput struct {
+
+ // Information about the address range.
+ ByoipCidr *types.ByoipCidr
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationProvisionByoipCidrMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpProvisionByoipCidr{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpProvisionByoipCidr{}, 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 = addOpProvisionByoipCidrValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opProvisionByoipCidr(options.Region), middleware.Before); 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_opProvisionByoipCidr(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "ProvisionByoipCidr",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_PurchaseHostReservation.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_PurchaseHostReservation.go
new file mode 100644
index 00000000..5e332ca8
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_PurchaseHostReservation.go
@@ -0,0 +1,164 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Purchase a reservation with configurations that match those of your Dedicated
+// Host. You must have active Dedicated Hosts in your account before you purchase a
+// reservation. This action results in the specified reservation being purchased
+// and charged to your account.
+func (c *Client) PurchaseHostReservation(ctx context.Context, params *PurchaseHostReservationInput, optFns ...func(*Options)) (*PurchaseHostReservationOutput, error) {
+ if params == nil {
+ params = &PurchaseHostReservationInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "PurchaseHostReservation", params, optFns, c.addOperationPurchaseHostReservationMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*PurchaseHostReservationOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type PurchaseHostReservationInput struct {
+
+ // The IDs of the Dedicated Hosts with which the reservation will be associated.
+ //
+ // This member is required.
+ HostIdSet []string
+
+ // The ID of the offering.
+ //
+ // This member is required.
+ OfferingId *string
+
+ // Unique, case-sensitive identifier that you provide to ensure the idempotency of
+ // the request. For more information, see Ensuring Idempotency
+ // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html).
+ ClientToken *string
+
+ // The currency in which the totalUpfrontPrice, LimitPrice, and totalHourlyPrice
+ // amounts are specified. At this time, the only supported currency is USD.
+ CurrencyCode types.CurrencyCodeValues
+
+ // The specified limit is checked against the total upfront cost of the reservation
+ // (calculated as the offering's upfront cost multiplied by the host count). If the
+ // total upfront cost is greater than the specified price limit, the request fails.
+ // This is used to ensure that the purchase does not exceed the expected upfront
+ // cost of the purchase. At this time, the only supported currency is USD. For
+ // example, to indicate a limit price of USD 100, specify 100.00.
+ LimitPrice *string
+
+ // The tags to apply to the Dedicated Host Reservation during purchase.
+ TagSpecifications []types.TagSpecification
+
+ noSmithyDocumentSerde
+}
+
+type PurchaseHostReservationOutput struct {
+
+ // Unique, case-sensitive identifier that you provide to ensure the idempotency of
+ // the request. For more information, see Ensuring Idempotency
+ // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html).
+ ClientToken *string
+
+ // The currency in which the totalUpfrontPrice and totalHourlyPrice amounts are
+ // specified. At this time, the only supported currency is USD.
+ CurrencyCode types.CurrencyCodeValues
+
+ // Describes the details of the purchase.
+ Purchase []types.Purchase
+
+ // The total hourly price of the reservation calculated per hour.
+ TotalHourlyPrice *string
+
+ // The total amount charged to your account when you purchase the reservation.
+ TotalUpfrontPrice *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationPurchaseHostReservationMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpPurchaseHostReservation{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpPurchaseHostReservation{}, 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 = addOpPurchaseHostReservationValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPurchaseHostReservation(options.Region), middleware.Before); 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_opPurchaseHostReservation(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "PurchaseHostReservation",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_PurchaseReservedInstancesOffering.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_PurchaseReservedInstancesOffering.go
new file mode 100644
index 00000000..02c4c0c0
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_PurchaseReservedInstancesOffering.go
@@ -0,0 +1,158 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "time"
+)
+
+// Purchases a Reserved Instance for use with your account. With Reserved
+// Instances, you pay a lower hourly rate compared to On-Demand instance pricing.
+// Use DescribeReservedInstancesOfferings to get a list of Reserved Instance
+// offerings that match your specifications. After you've purchased a Reserved
+// Instance, you can check for your new Reserved Instance with
+// DescribeReservedInstances. To queue a purchase for a future date and time,
+// specify a purchase time. If you do not specify a purchase time, the default is
+// the current time. For more information, see Reserved Instances
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/concepts-on-demand-reserved-instances.html)
+// and Reserved Instance Marketplace
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-market-general.html) in
+// the Amazon EC2 User Guide.
+func (c *Client) PurchaseReservedInstancesOffering(ctx context.Context, params *PurchaseReservedInstancesOfferingInput, optFns ...func(*Options)) (*PurchaseReservedInstancesOfferingOutput, error) {
+ if params == nil {
+ params = &PurchaseReservedInstancesOfferingInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "PurchaseReservedInstancesOffering", params, optFns, c.addOperationPurchaseReservedInstancesOfferingMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*PurchaseReservedInstancesOfferingOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+// Contains the parameters for PurchaseReservedInstancesOffering.
+type PurchaseReservedInstancesOfferingInput struct {
+
+ // The number of Reserved Instances to purchase.
+ //
+ // This member is required.
+ InstanceCount *int32
+
+ // The ID of the Reserved Instance offering to purchase.
+ //
+ // This member is required.
+ ReservedInstancesOfferingId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // Specified for Reserved Instance Marketplace offerings to limit the total order
+ // and ensure that the Reserved Instances are not purchased at unexpected prices.
+ LimitPrice *types.ReservedInstanceLimitPrice
+
+ // The time at which to purchase the Reserved Instance, in UTC format (for example,
+ // YYYY-MM-DDTHH:MM:SSZ).
+ PurchaseTime *time.Time
+
+ noSmithyDocumentSerde
+}
+
+// Contains the output of PurchaseReservedInstancesOffering.
+type PurchaseReservedInstancesOfferingOutput struct {
+
+ // The IDs of the purchased Reserved Instances. If your purchase crosses into a
+ // discounted pricing tier, the final Reserved Instances IDs might change. For more
+ // information, see Crossing pricing tiers
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/concepts-reserved-instances-application.html#crossing-pricing-tiers)
+ // in the Amazon Elastic Compute Cloud User Guide.
+ ReservedInstancesId *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationPurchaseReservedInstancesOfferingMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpPurchaseReservedInstancesOffering{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpPurchaseReservedInstancesOffering{}, 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 = addOpPurchaseReservedInstancesOfferingValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPurchaseReservedInstancesOffering(options.Region), middleware.Before); 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_opPurchaseReservedInstancesOffering(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "PurchaseReservedInstancesOffering",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_PurchaseScheduledInstances.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_PurchaseScheduledInstances.go
new file mode 100644
index 00000000..3e4ebb73
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_PurchaseScheduledInstances.go
@@ -0,0 +1,177 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Purchases the Scheduled Instances with the specified schedule. Scheduled
+// Instances enable you to purchase Amazon EC2 compute capacity by the hour for a
+// one-year term. Before you can purchase a Scheduled Instance, you must call
+// DescribeScheduledInstanceAvailability to check for available schedules and
+// obtain a purchase token. After you purchase a Scheduled Instance, you must call
+// RunScheduledInstances during each scheduled time period. After you purchase a
+// Scheduled Instance, you can't cancel, modify, or resell your purchase.
+func (c *Client) PurchaseScheduledInstances(ctx context.Context, params *PurchaseScheduledInstancesInput, optFns ...func(*Options)) (*PurchaseScheduledInstancesOutput, error) {
+ if params == nil {
+ params = &PurchaseScheduledInstancesInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "PurchaseScheduledInstances", params, optFns, c.addOperationPurchaseScheduledInstancesMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*PurchaseScheduledInstancesOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+// Contains the parameters for PurchaseScheduledInstances.
+type PurchaseScheduledInstancesInput struct {
+
+ // The purchase requests.
+ //
+ // This member is required.
+ PurchaseRequests []types.PurchaseRequest
+
+ // Unique, case-sensitive identifier that ensures the idempotency of the request.
+ // For more information, see Ensuring Idempotency
+ // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html).
+ ClientToken *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+// Contains the output of PurchaseScheduledInstances.
+type PurchaseScheduledInstancesOutput struct {
+
+ // Information about the Scheduled Instances.
+ ScheduledInstanceSet []types.ScheduledInstance
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationPurchaseScheduledInstancesMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpPurchaseScheduledInstances{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpPurchaseScheduledInstances{}, 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 = addIdempotencyToken_opPurchaseScheduledInstancesMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpPurchaseScheduledInstancesValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPurchaseScheduledInstances(options.Region), middleware.Before); 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
+}
+
+type idempotencyToken_initializeOpPurchaseScheduledInstances struct {
+ tokenProvider IdempotencyTokenProvider
+}
+
+func (*idempotencyToken_initializeOpPurchaseScheduledInstances) ID() string {
+ return "OperationIdempotencyTokenAutoFill"
+}
+
+func (m *idempotencyToken_initializeOpPurchaseScheduledInstances) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ if m.tokenProvider == nil {
+ return next.HandleInitialize(ctx, in)
+ }
+
+ input, ok := in.Parameters.(*PurchaseScheduledInstancesInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("expected middleware input to be of type *PurchaseScheduledInstancesInput ")
+ }
+
+ if input.ClientToken == nil {
+ t, err := m.tokenProvider.GetIdempotencyToken()
+ if err != nil {
+ return out, metadata, err
+ }
+ input.ClientToken = &t
+ }
+ return next.HandleInitialize(ctx, in)
+}
+func addIdempotencyToken_opPurchaseScheduledInstancesMiddleware(stack *middleware.Stack, cfg Options) error {
+ return stack.Initialize.Add(&idempotencyToken_initializeOpPurchaseScheduledInstances{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before)
+}
+
+func newServiceMetadataMiddleware_opPurchaseScheduledInstances(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "PurchaseScheduledInstances",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RebootInstances.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RebootInstances.go
new file mode 100644
index 00000000..b24bef8e
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RebootInstances.go
@@ -0,0 +1,129 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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"
+)
+
+// Requests a reboot of the specified instances. This operation is asynchronous; it
+// only queues a request to reboot the specified instances. The operation succeeds
+// if the instances are valid and belong to you. Requests to reboot terminated
+// instances are ignored. If an instance does not cleanly shut down within a few
+// minutes, Amazon EC2 performs a hard reboot. For more information about
+// troubleshooting, see Getting console output and rebooting instances
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-console.html) in
+// the Amazon EC2 User Guide.
+func (c *Client) RebootInstances(ctx context.Context, params *RebootInstancesInput, optFns ...func(*Options)) (*RebootInstancesOutput, error) {
+ if params == nil {
+ params = &RebootInstancesInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "RebootInstances", params, optFns, c.addOperationRebootInstancesMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*RebootInstancesOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type RebootInstancesInput struct {
+
+ // The instance IDs.
+ //
+ // This member is required.
+ InstanceIds []string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type RebootInstancesOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationRebootInstancesMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpRebootInstances{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpRebootInstances{}, 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 = addOpRebootInstancesValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRebootInstances(options.Region), middleware.Before); 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_opRebootInstances(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "RebootInstances",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RegisterImage.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RegisterImage.go
new file mode 100644
index 00000000..93fdd55b
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RegisterImage.go
@@ -0,0 +1,234 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Registers an AMI. When you're creating an AMI, this is the final step you must
+// complete before you can launch an instance from the AMI. For more information
+// about creating AMIs, see Creating your own AMIs
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/creating-an-ami.html) in
+// the Amazon Elastic Compute Cloud User Guide. For Amazon EBS-backed instances,
+// CreateImage creates and registers the AMI in a single request, so you don't have
+// to register the AMI yourself. If needed, you can deregister an AMI at any time.
+// Any modifications you make to an AMI backed by an instance store volume
+// invalidates its registration. If you make changes to an image, deregister the
+// previous image and register the new image. Register a snapshot of a root device
+// volume You can use RegisterImage to create an Amazon EBS-backed Linux AMI from a
+// snapshot of a root device volume. You specify the snapshot using a block device
+// mapping. You can't set the encryption state of the volume using the block device
+// mapping. If the snapshot is encrypted, or encryption by default is enabled, the
+// root volume of an instance launched from the AMI is encrypted. For more
+// information, see Create a Linux AMI from a snapshot
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/creating-an-ami-ebs.html#creating-launching-ami-from-snapshot)
+// and Use encryption with Amazon EBS-backed AMIs
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AMIEncryption.html) in the
+// Amazon Elastic Compute Cloud User Guide. Amazon Web Services Marketplace product
+// codes If any snapshots have Amazon Web Services Marketplace product codes, they
+// are copied to the new AMI. Windows and some Linux distributions, such as Red Hat
+// Enterprise Linux (RHEL) and SUSE Linux Enterprise Server (SLES), use the Amazon
+// EC2 billing product code associated with an AMI to verify the subscription
+// status for package updates. To create a new AMI for operating systems that
+// require a billing product code, instead of registering the AMI, do the following
+// to preserve the billing product code association:
+//
+// * Launch an instance from an
+// existing AMI with that billing product code.
+//
+// * Customize the instance.
+//
+// *
+// Create an AMI from the instance using CreateImage.
+//
+// If you purchase a Reserved
+// Instance to apply to an On-Demand Instance that was launched from an AMI with a
+// billing product code, make sure that the Reserved Instance has the matching
+// billing product code. If you purchase a Reserved Instance without the matching
+// billing product code, the Reserved Instance will not be applied to the On-Demand
+// Instance. For information about how to obtain the platform details and billing
+// information of an AMI, see Understanding AMI billing
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-billing-info.html) in
+// the Amazon Elastic Compute Cloud User Guide.
+func (c *Client) RegisterImage(ctx context.Context, params *RegisterImageInput, optFns ...func(*Options)) (*RegisterImageOutput, error) {
+ if params == nil {
+ params = &RegisterImageInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "RegisterImage", params, optFns, c.addOperationRegisterImageMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*RegisterImageOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+// Contains the parameters for RegisterImage.
+type RegisterImageInput struct {
+
+ // A name for your AMI. Constraints: 3-128 alphanumeric characters, parentheses
+ // (()), square brackets ([]), spaces ( ), periods (.), slashes (/), dashes (-),
+ // single quotes ('), at-signs (@), or underscores(_)
+ //
+ // This member is required.
+ Name *string
+
+ // The architecture of the AMI. Default: For Amazon EBS-backed AMIs, i386. For
+ // instance store-backed AMIs, the architecture specified in the manifest file.
+ Architecture types.ArchitectureValues
+
+ // The billing product codes. Your account must be authorized to specify billing
+ // product codes. Otherwise, you can use the Amazon Web Services Marketplace to
+ // bill for the use of an AMI.
+ BillingProducts []string
+
+ // The block device mapping entries. If you specify an Amazon EBS volume using the
+ // ID of an Amazon EBS snapshot, you can't specify the encryption state of the
+ // volume. If you create an AMI on an Outpost, then all backing snapshots must be
+ // on the same Outpost or in the Region of that Outpost. AMIs on an Outpost that
+ // include local snapshots can be used to launch instances on the same Outpost
+ // only. For more information, Amazon EBS local snapshots on Outposts
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/snapshots-outposts.html#ami)
+ // in the Amazon Elastic Compute Cloud User Guide.
+ BlockDeviceMappings []types.BlockDeviceMapping
+
+ // The boot mode of the AMI. For more information, see Boot modes
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-boot.html) in the
+ // Amazon Elastic Compute Cloud User Guide.
+ BootMode types.BootModeValues
+
+ // A description for your AMI.
+ Description *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // Set to true to enable enhanced networking with ENA for the AMI and any instances
+ // that you launch from the AMI. This option is supported only for HVM AMIs.
+ // Specifying this option with a PV AMI can make instances launched from the AMI
+ // unreachable.
+ EnaSupport *bool
+
+ // The full path to your AMI manifest in Amazon S3 storage. The specified bucket
+ // must have the aws-exec-read canned access control list (ACL) to ensure that it
+ // can be accessed by Amazon EC2. For more information, see Canned ACLs
+ // (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#canned-acl)
+ // in the Amazon S3 Service Developer Guide.
+ ImageLocation *string
+
+ // The ID of the kernel.
+ KernelId *string
+
+ // The ID of the RAM disk.
+ RamdiskId *string
+
+ // The device name of the root device volume (for example, /dev/sda1).
+ RootDeviceName *string
+
+ // Set to simple to enable enhanced networking with the Intel 82599 Virtual
+ // Function interface for the AMI and any instances that you launch from the AMI.
+ // There is no way to disable sriovNetSupport at this time. This option is
+ // supported only for HVM AMIs. Specifying this option with a PV AMI can make
+ // instances launched from the AMI unreachable.
+ SriovNetSupport *string
+
+ // The type of virtualization (hvm | paravirtual). Default: paravirtual
+ VirtualizationType *string
+
+ noSmithyDocumentSerde
+}
+
+// Contains the output of RegisterImage.
+type RegisterImageOutput struct {
+
+ // The ID of the newly registered AMI.
+ ImageId *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationRegisterImageMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpRegisterImage{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpRegisterImage{}, 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 = addOpRegisterImageValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRegisterImage(options.Region), middleware.Before); 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_opRegisterImage(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "RegisterImage",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RegisterInstanceEventNotificationAttributes.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RegisterInstanceEventNotificationAttributes.go
new file mode 100644
index 00000000..47d82fec
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RegisterInstanceEventNotificationAttributes.go
@@ -0,0 +1,123 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Registers a set of tag keys to include in scheduled event notifications for your
+// resources. To remove tags, use .
+func (c *Client) RegisterInstanceEventNotificationAttributes(ctx context.Context, params *RegisterInstanceEventNotificationAttributesInput, optFns ...func(*Options)) (*RegisterInstanceEventNotificationAttributesOutput, error) {
+ if params == nil {
+ params = &RegisterInstanceEventNotificationAttributesInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "RegisterInstanceEventNotificationAttributes", params, optFns, c.addOperationRegisterInstanceEventNotificationAttributesMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*RegisterInstanceEventNotificationAttributesOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type RegisterInstanceEventNotificationAttributesInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // Information about the tag keys to register.
+ InstanceTagAttribute *types.RegisterInstanceTagAttributeRequest
+
+ noSmithyDocumentSerde
+}
+
+type RegisterInstanceEventNotificationAttributesOutput struct {
+
+ // The resulting set of tag keys.
+ InstanceTagAttribute *types.InstanceTagNotificationAttribute
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationRegisterInstanceEventNotificationAttributesMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpRegisterInstanceEventNotificationAttributes{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpRegisterInstanceEventNotificationAttributes{}, 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_opRegisterInstanceEventNotificationAttributes(options.Region), middleware.Before); 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_opRegisterInstanceEventNotificationAttributes(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "RegisterInstanceEventNotificationAttributes",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RegisterTransitGatewayMulticastGroupMembers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RegisterTransitGatewayMulticastGroupMembers.go
new file mode 100644
index 00000000..254af7a3
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RegisterTransitGatewayMulticastGroupMembers.go
@@ -0,0 +1,137 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Registers members (network interfaces) with the transit gateway multicast group.
+// A member is a network interface associated with a supported EC2 instance that
+// receives multicast traffic. For information about supported instances, see
+// Multicast Consideration
+// (https://docs.aws.amazon.com/vpc/latest/tgw/transit-gateway-limits.html#multicast-limits)
+// in Amazon VPC Transit Gateways. After you add the members, use
+// SearchTransitGatewayMulticastGroups
+// (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_SearchTransitGatewayMulticastGroups.html)
+// to verify that the members were added to the transit gateway multicast group.
+func (c *Client) RegisterTransitGatewayMulticastGroupMembers(ctx context.Context, params *RegisterTransitGatewayMulticastGroupMembersInput, optFns ...func(*Options)) (*RegisterTransitGatewayMulticastGroupMembersOutput, error) {
+ if params == nil {
+ params = &RegisterTransitGatewayMulticastGroupMembersInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "RegisterTransitGatewayMulticastGroupMembers", params, optFns, c.addOperationRegisterTransitGatewayMulticastGroupMembersMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*RegisterTransitGatewayMulticastGroupMembersOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type RegisterTransitGatewayMulticastGroupMembersInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The IP address assigned to the transit gateway multicast group.
+ GroupIpAddress *string
+
+ // The group members' network interface IDs to register with the transit gateway
+ // multicast group.
+ NetworkInterfaceIds []string
+
+ // The ID of the transit gateway multicast domain.
+ TransitGatewayMulticastDomainId *string
+
+ noSmithyDocumentSerde
+}
+
+type RegisterTransitGatewayMulticastGroupMembersOutput struct {
+
+ // Information about the registered transit gateway multicast group members.
+ RegisteredMulticastGroupMembers *types.TransitGatewayMulticastRegisteredGroupMembers
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationRegisterTransitGatewayMulticastGroupMembersMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpRegisterTransitGatewayMulticastGroupMembers{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpRegisterTransitGatewayMulticastGroupMembers{}, 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_opRegisterTransitGatewayMulticastGroupMembers(options.Region), middleware.Before); 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_opRegisterTransitGatewayMulticastGroupMembers(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "RegisterTransitGatewayMulticastGroupMembers",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RegisterTransitGatewayMulticastGroupSources.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RegisterTransitGatewayMulticastGroupSources.go
new file mode 100644
index 00000000..7d0877af
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RegisterTransitGatewayMulticastGroupSources.go
@@ -0,0 +1,137 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Registers sources (network interfaces) with the specified transit gateway
+// multicast group. A multicast source is a network interface attached to a
+// supported instance that sends multicast traffic. For information about supported
+// instances, see Multicast Considerations
+// (https://docs.aws.amazon.com/vpc/latest/tgw/transit-gateway-limits.html#multicast-limits)
+// in Amazon VPC Transit Gateways. After you add the source, use
+// SearchTransitGatewayMulticastGroups
+// (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_SearchTransitGatewayMulticastGroups.html)
+// to verify that the source was added to the multicast group.
+func (c *Client) RegisterTransitGatewayMulticastGroupSources(ctx context.Context, params *RegisterTransitGatewayMulticastGroupSourcesInput, optFns ...func(*Options)) (*RegisterTransitGatewayMulticastGroupSourcesOutput, error) {
+ if params == nil {
+ params = &RegisterTransitGatewayMulticastGroupSourcesInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "RegisterTransitGatewayMulticastGroupSources", params, optFns, c.addOperationRegisterTransitGatewayMulticastGroupSourcesMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*RegisterTransitGatewayMulticastGroupSourcesOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type RegisterTransitGatewayMulticastGroupSourcesInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The IP address assigned to the transit gateway multicast group.
+ GroupIpAddress *string
+
+ // The group sources' network interface IDs to register with the transit gateway
+ // multicast group.
+ NetworkInterfaceIds []string
+
+ // The ID of the transit gateway multicast domain.
+ TransitGatewayMulticastDomainId *string
+
+ noSmithyDocumentSerde
+}
+
+type RegisterTransitGatewayMulticastGroupSourcesOutput struct {
+
+ // Information about the transit gateway multicast group sources.
+ RegisteredMulticastGroupSources *types.TransitGatewayMulticastRegisteredGroupSources
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationRegisterTransitGatewayMulticastGroupSourcesMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpRegisterTransitGatewayMulticastGroupSources{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpRegisterTransitGatewayMulticastGroupSources{}, 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_opRegisterTransitGatewayMulticastGroupSources(options.Region), middleware.Before); 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_opRegisterTransitGatewayMulticastGroupSources(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "RegisterTransitGatewayMulticastGroupSources",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RejectTransitGatewayMulticastDomainAssociations.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RejectTransitGatewayMulticastDomainAssociations.go
new file mode 100644
index 00000000..0f76e289
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RejectTransitGatewayMulticastDomainAssociations.go
@@ -0,0 +1,129 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Rejects a request to associate cross-account subnets with a transit gateway
+// multicast domain.
+func (c *Client) RejectTransitGatewayMulticastDomainAssociations(ctx context.Context, params *RejectTransitGatewayMulticastDomainAssociationsInput, optFns ...func(*Options)) (*RejectTransitGatewayMulticastDomainAssociationsOutput, error) {
+ if params == nil {
+ params = &RejectTransitGatewayMulticastDomainAssociationsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "RejectTransitGatewayMulticastDomainAssociations", params, optFns, c.addOperationRejectTransitGatewayMulticastDomainAssociationsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*RejectTransitGatewayMulticastDomainAssociationsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type RejectTransitGatewayMulticastDomainAssociationsInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The IDs of the subnets to associate with the transit gateway multicast domain.
+ SubnetIds []string
+
+ // The ID of the transit gateway attachment.
+ TransitGatewayAttachmentId *string
+
+ // The ID of the transit gateway multicast domain.
+ TransitGatewayMulticastDomainId *string
+
+ noSmithyDocumentSerde
+}
+
+type RejectTransitGatewayMulticastDomainAssociationsOutput struct {
+
+ // Describes the multicast domain associations.
+ Associations *types.TransitGatewayMulticastDomainAssociations
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationRejectTransitGatewayMulticastDomainAssociationsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpRejectTransitGatewayMulticastDomainAssociations{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpRejectTransitGatewayMulticastDomainAssociations{}, 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_opRejectTransitGatewayMulticastDomainAssociations(options.Region), middleware.Before); 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_opRejectTransitGatewayMulticastDomainAssociations(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "RejectTransitGatewayMulticastDomainAssociations",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RejectTransitGatewayPeeringAttachment.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RejectTransitGatewayPeeringAttachment.go
new file mode 100644
index 00000000..900d5ebd
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RejectTransitGatewayPeeringAttachment.go
@@ -0,0 +1,127 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Rejects a transit gateway peering attachment request.
+func (c *Client) RejectTransitGatewayPeeringAttachment(ctx context.Context, params *RejectTransitGatewayPeeringAttachmentInput, optFns ...func(*Options)) (*RejectTransitGatewayPeeringAttachmentOutput, error) {
+ if params == nil {
+ params = &RejectTransitGatewayPeeringAttachmentInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "RejectTransitGatewayPeeringAttachment", params, optFns, c.addOperationRejectTransitGatewayPeeringAttachmentMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*RejectTransitGatewayPeeringAttachmentOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type RejectTransitGatewayPeeringAttachmentInput struct {
+
+ // The ID of the transit gateway peering attachment.
+ //
+ // This member is required.
+ TransitGatewayAttachmentId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type RejectTransitGatewayPeeringAttachmentOutput struct {
+
+ // The transit gateway peering attachment.
+ TransitGatewayPeeringAttachment *types.TransitGatewayPeeringAttachment
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationRejectTransitGatewayPeeringAttachmentMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpRejectTransitGatewayPeeringAttachment{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpRejectTransitGatewayPeeringAttachment{}, 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 = addOpRejectTransitGatewayPeeringAttachmentValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRejectTransitGatewayPeeringAttachment(options.Region), middleware.Before); 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_opRejectTransitGatewayPeeringAttachment(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "RejectTransitGatewayPeeringAttachment",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RejectTransitGatewayVpcAttachment.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RejectTransitGatewayVpcAttachment.go
new file mode 100644
index 00000000..a5bb0fd4
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RejectTransitGatewayVpcAttachment.go
@@ -0,0 +1,130 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Rejects a request to attach a VPC to a transit gateway. The VPC attachment must
+// be in the pendingAcceptance state. Use DescribeTransitGatewayVpcAttachments to
+// view your pending VPC attachment requests. Use AcceptTransitGatewayVpcAttachment
+// to accept a VPC attachment request.
+func (c *Client) RejectTransitGatewayVpcAttachment(ctx context.Context, params *RejectTransitGatewayVpcAttachmentInput, optFns ...func(*Options)) (*RejectTransitGatewayVpcAttachmentOutput, error) {
+ if params == nil {
+ params = &RejectTransitGatewayVpcAttachmentInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "RejectTransitGatewayVpcAttachment", params, optFns, c.addOperationRejectTransitGatewayVpcAttachmentMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*RejectTransitGatewayVpcAttachmentOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type RejectTransitGatewayVpcAttachmentInput struct {
+
+ // The ID of the attachment.
+ //
+ // This member is required.
+ TransitGatewayAttachmentId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type RejectTransitGatewayVpcAttachmentOutput struct {
+
+ // Information about the attachment.
+ TransitGatewayVpcAttachment *types.TransitGatewayVpcAttachment
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationRejectTransitGatewayVpcAttachmentMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpRejectTransitGatewayVpcAttachment{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpRejectTransitGatewayVpcAttachment{}, 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 = addOpRejectTransitGatewayVpcAttachmentValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRejectTransitGatewayVpcAttachment(options.Region), middleware.Before); 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_opRejectTransitGatewayVpcAttachment(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "RejectTransitGatewayVpcAttachment",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RejectVpcEndpointConnections.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RejectVpcEndpointConnections.go
new file mode 100644
index 00000000..073eb883
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RejectVpcEndpointConnections.go
@@ -0,0 +1,133 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Rejects one or more VPC endpoint connection requests to your VPC endpoint
+// service.
+func (c *Client) RejectVpcEndpointConnections(ctx context.Context, params *RejectVpcEndpointConnectionsInput, optFns ...func(*Options)) (*RejectVpcEndpointConnectionsOutput, error) {
+ if params == nil {
+ params = &RejectVpcEndpointConnectionsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "RejectVpcEndpointConnections", params, optFns, c.addOperationRejectVpcEndpointConnectionsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*RejectVpcEndpointConnectionsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type RejectVpcEndpointConnectionsInput struct {
+
+ // The ID of the service.
+ //
+ // This member is required.
+ ServiceId *string
+
+ // The IDs of one or more VPC endpoints.
+ //
+ // This member is required.
+ VpcEndpointIds []string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type RejectVpcEndpointConnectionsOutput struct {
+
+ // Information about the endpoints that were not rejected, if applicable.
+ Unsuccessful []types.UnsuccessfulItem
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationRejectVpcEndpointConnectionsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpRejectVpcEndpointConnections{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpRejectVpcEndpointConnections{}, 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 = addOpRejectVpcEndpointConnectionsValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRejectVpcEndpointConnections(options.Region), middleware.Before); 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_opRejectVpcEndpointConnections(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "RejectVpcEndpointConnections",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RejectVpcPeeringConnection.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RejectVpcPeeringConnection.go
new file mode 100644
index 00000000..e1765ca6
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RejectVpcPeeringConnection.go
@@ -0,0 +1,130 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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"
+)
+
+// Rejects a VPC peering connection request. The VPC peering connection must be in
+// the pending-acceptance state. Use the DescribeVpcPeeringConnections request to
+// view your outstanding VPC peering connection requests. To delete an active VPC
+// peering connection, or to delete a VPC peering connection request that you
+// initiated, use DeleteVpcPeeringConnection.
+func (c *Client) RejectVpcPeeringConnection(ctx context.Context, params *RejectVpcPeeringConnectionInput, optFns ...func(*Options)) (*RejectVpcPeeringConnectionOutput, error) {
+ if params == nil {
+ params = &RejectVpcPeeringConnectionInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "RejectVpcPeeringConnection", params, optFns, c.addOperationRejectVpcPeeringConnectionMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*RejectVpcPeeringConnectionOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type RejectVpcPeeringConnectionInput struct {
+
+ // The ID of the VPC peering connection.
+ //
+ // This member is required.
+ VpcPeeringConnectionId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type RejectVpcPeeringConnectionOutput struct {
+
+ // Returns true if the request succeeds; otherwise, it returns an error.
+ Return *bool
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationRejectVpcPeeringConnectionMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpRejectVpcPeeringConnection{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpRejectVpcPeeringConnection{}, 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 = addOpRejectVpcPeeringConnectionValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRejectVpcPeeringConnection(options.Region), middleware.Before); 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_opRejectVpcPeeringConnection(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "RejectVpcPeeringConnection",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ReleaseAddress.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ReleaseAddress.go
new file mode 100644
index 00000000..4dab4c41
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ReleaseAddress.go
@@ -0,0 +1,142 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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"
+)
+
+// Releases the specified Elastic IP address. [EC2-Classic, default VPC] Releasing
+// an Elastic IP address automatically disassociates it from any instance that it's
+// associated with. To disassociate an Elastic IP address without releasing it, use
+// DisassociateAddress. [Nondefault VPC] You must use DisassociateAddress to
+// disassociate the Elastic IP address before you can release it. Otherwise, Amazon
+// EC2 returns an error (InvalidIPAddress.InUse). After releasing an Elastic IP
+// address, it is released to the IP address pool. Be sure to update your DNS
+// records and any servers or devices that communicate with the address. If you
+// attempt to release an Elastic IP address that you already released, you'll get
+// an AuthFailure error if the address is already allocated to another Amazon Web
+// Services account. [EC2-VPC] After you release an Elastic IP address for use in a
+// VPC, you might be able to recover it. For more information, see AllocateAddress.
+func (c *Client) ReleaseAddress(ctx context.Context, params *ReleaseAddressInput, optFns ...func(*Options)) (*ReleaseAddressOutput, error) {
+ if params == nil {
+ params = &ReleaseAddressInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ReleaseAddress", params, optFns, c.addOperationReleaseAddressMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ReleaseAddressOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ReleaseAddressInput struct {
+
+ // [EC2-VPC] The allocation ID. Required for EC2-VPC.
+ AllocationId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The set of Availability Zones, Local Zones, or Wavelength Zones from which AWS
+ // advertises IP addresses. If you provide an incorrect network border group, you
+ // will receive an InvalidAddress.NotFound error. For more information, see Error
+ // Codes
+ // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/errors-overview.html).
+ // You cannot use a network border group with EC2 Classic. If you attempt this
+ // operation on EC2 classic, you will receive an InvalidParameterCombination error.
+ // For more information, see Error Codes
+ // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/errors-overview.html).
+ NetworkBorderGroup *string
+
+ // [EC2-Classic] The Elastic IP address. Required for EC2-Classic.
+ PublicIp *string
+
+ noSmithyDocumentSerde
+}
+
+type ReleaseAddressOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationReleaseAddressMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpReleaseAddress{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpReleaseAddress{}, 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_opReleaseAddress(options.Region), middleware.Before); 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_opReleaseAddress(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "ReleaseAddress",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ReleaseHosts.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ReleaseHosts.go
new file mode 100644
index 00000000..89d7d75a
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ReleaseHosts.go
@@ -0,0 +1,133 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// When you no longer want to use an On-Demand Dedicated Host it can be released.
+// On-Demand billing is stopped and the host goes into released state. The host ID
+// of Dedicated Hosts that have been released can no longer be specified in another
+// request, for example, to modify the host. You must stop or terminate all
+// instances on a host before it can be released. When Dedicated Hosts are
+// released, it may take some time for them to stop counting toward your limit and
+// you may receive capacity errors when trying to allocate new Dedicated Hosts.
+// Wait a few minutes and then try again. Released hosts still appear in a
+// DescribeHosts response.
+func (c *Client) ReleaseHosts(ctx context.Context, params *ReleaseHostsInput, optFns ...func(*Options)) (*ReleaseHostsOutput, error) {
+ if params == nil {
+ params = &ReleaseHostsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ReleaseHosts", params, optFns, c.addOperationReleaseHostsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ReleaseHostsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ReleaseHostsInput struct {
+
+ // The IDs of the Dedicated Hosts to release.
+ //
+ // This member is required.
+ HostIds []string
+
+ noSmithyDocumentSerde
+}
+
+type ReleaseHostsOutput struct {
+
+ // The IDs of the Dedicated Hosts that were successfully released.
+ Successful []string
+
+ // The IDs of the Dedicated Hosts that could not be released, including an error
+ // message.
+ Unsuccessful []types.UnsuccessfulItem
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationReleaseHostsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpReleaseHosts{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpReleaseHosts{}, 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 = addOpReleaseHostsValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opReleaseHosts(options.Region), middleware.Before); 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_opReleaseHosts(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "ReleaseHosts",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ReplaceIamInstanceProfileAssociation.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ReplaceIamInstanceProfileAssociation.go
new file mode 100644
index 00000000..d2eb6930
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ReplaceIamInstanceProfileAssociation.go
@@ -0,0 +1,129 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Replaces an IAM instance profile for the specified running instance. You can use
+// this action to change the IAM instance profile that's associated with an
+// instance without having to disassociate the existing IAM instance profile first.
+// Use DescribeIamInstanceProfileAssociations to get the association ID.
+func (c *Client) ReplaceIamInstanceProfileAssociation(ctx context.Context, params *ReplaceIamInstanceProfileAssociationInput, optFns ...func(*Options)) (*ReplaceIamInstanceProfileAssociationOutput, error) {
+ if params == nil {
+ params = &ReplaceIamInstanceProfileAssociationInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ReplaceIamInstanceProfileAssociation", params, optFns, c.addOperationReplaceIamInstanceProfileAssociationMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ReplaceIamInstanceProfileAssociationOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ReplaceIamInstanceProfileAssociationInput struct {
+
+ // The ID of the existing IAM instance profile association.
+ //
+ // This member is required.
+ AssociationId *string
+
+ // The IAM instance profile.
+ //
+ // This member is required.
+ IamInstanceProfile *types.IamInstanceProfileSpecification
+
+ noSmithyDocumentSerde
+}
+
+type ReplaceIamInstanceProfileAssociationOutput struct {
+
+ // Information about the IAM instance profile association.
+ IamInstanceProfileAssociation *types.IamInstanceProfileAssociation
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationReplaceIamInstanceProfileAssociationMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpReplaceIamInstanceProfileAssociation{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpReplaceIamInstanceProfileAssociation{}, 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 = addOpReplaceIamInstanceProfileAssociationValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opReplaceIamInstanceProfileAssociation(options.Region), middleware.Before); 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_opReplaceIamInstanceProfileAssociation(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "ReplaceIamInstanceProfileAssociation",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ReplaceNetworkAclAssociation.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ReplaceNetworkAclAssociation.go
new file mode 100644
index 00000000..ddaadfc8
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ReplaceNetworkAclAssociation.go
@@ -0,0 +1,136 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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"
+)
+
+// Changes which network ACL a subnet is associated with. By default when you
+// create a subnet, it's automatically associated with the default network ACL. For
+// more information, see Network ACLs
+// (https://docs.aws.amazon.com/vpc/latest/userguide/VPC_ACLs.html) in the Amazon
+// Virtual Private Cloud User Guide. This is an idempotent operation.
+func (c *Client) ReplaceNetworkAclAssociation(ctx context.Context, params *ReplaceNetworkAclAssociationInput, optFns ...func(*Options)) (*ReplaceNetworkAclAssociationOutput, error) {
+ if params == nil {
+ params = &ReplaceNetworkAclAssociationInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ReplaceNetworkAclAssociation", params, optFns, c.addOperationReplaceNetworkAclAssociationMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ReplaceNetworkAclAssociationOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ReplaceNetworkAclAssociationInput struct {
+
+ // The ID of the current association between the original network ACL and the
+ // subnet.
+ //
+ // This member is required.
+ AssociationId *string
+
+ // The ID of the new network ACL to associate with the subnet.
+ //
+ // This member is required.
+ NetworkAclId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type ReplaceNetworkAclAssociationOutput struct {
+
+ // The ID of the new association.
+ NewAssociationId *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationReplaceNetworkAclAssociationMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpReplaceNetworkAclAssociation{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpReplaceNetworkAclAssociation{}, 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 = addOpReplaceNetworkAclAssociationValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opReplaceNetworkAclAssociation(options.Region), middleware.Before); 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_opReplaceNetworkAclAssociation(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "ReplaceNetworkAclAssociation",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ReplaceNetworkAclEntry.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ReplaceNetworkAclEntry.go
new file mode 100644
index 00000000..bb2b6338
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ReplaceNetworkAclEntry.go
@@ -0,0 +1,168 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Replaces an entry (rule) in a network ACL. For more information, see Network
+// ACLs (https://docs.aws.amazon.com/vpc/latest/userguide/VPC_ACLs.html) in the
+// Amazon Virtual Private Cloud User Guide.
+func (c *Client) ReplaceNetworkAclEntry(ctx context.Context, params *ReplaceNetworkAclEntryInput, optFns ...func(*Options)) (*ReplaceNetworkAclEntryOutput, error) {
+ if params == nil {
+ params = &ReplaceNetworkAclEntryInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ReplaceNetworkAclEntry", params, optFns, c.addOperationReplaceNetworkAclEntryMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ReplaceNetworkAclEntryOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ReplaceNetworkAclEntryInput struct {
+
+ // Indicates whether to replace the egress rule. Default: If no value is specified,
+ // we replace the ingress rule.
+ //
+ // This member is required.
+ Egress *bool
+
+ // The ID of the ACL.
+ //
+ // This member is required.
+ NetworkAclId *string
+
+ // The protocol number. A value of "-1" means all protocols. If you specify "-1" or
+ // a protocol number other than "6" (TCP), "17" (UDP), or "1" (ICMP), traffic on
+ // all ports is allowed, regardless of any ports or ICMP types or codes that you
+ // specify. If you specify protocol "58" (ICMPv6) and specify an IPv4 CIDR block,
+ // traffic for all ICMP types and codes allowed, regardless of any that you
+ // specify. If you specify protocol "58" (ICMPv6) and specify an IPv6 CIDR block,
+ // you must specify an ICMP type and code.
+ //
+ // This member is required.
+ Protocol *string
+
+ // Indicates whether to allow or deny the traffic that matches the rule.
+ //
+ // This member is required.
+ RuleAction types.RuleAction
+
+ // The rule number of the entry to replace.
+ //
+ // This member is required.
+ RuleNumber *int32
+
+ // The IPv4 network range to allow or deny, in CIDR notation (for example
+ // 172.16.0.0/24).
+ CidrBlock *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // ICMP protocol: The ICMP or ICMPv6 type and code. Required if specifying protocol
+ // 1 (ICMP) or protocol 58 (ICMPv6) with an IPv6 CIDR block.
+ IcmpTypeCode *types.IcmpTypeCode
+
+ // The IPv6 network range to allow or deny, in CIDR notation (for example
+ // 2001:bd8:1234:1a00::/64).
+ Ipv6CidrBlock *string
+
+ // TCP or UDP protocols: The range of ports the rule applies to. Required if
+ // specifying protocol 6 (TCP) or 17 (UDP).
+ PortRange *types.PortRange
+
+ noSmithyDocumentSerde
+}
+
+type ReplaceNetworkAclEntryOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationReplaceNetworkAclEntryMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpReplaceNetworkAclEntry{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpReplaceNetworkAclEntry{}, 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 = addOpReplaceNetworkAclEntryValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opReplaceNetworkAclEntry(options.Region), middleware.Before); 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_opReplaceNetworkAclEntry(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "ReplaceNetworkAclEntry",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ReplaceRoute.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ReplaceRoute.go
new file mode 100644
index 00000000..b79dba3e
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ReplaceRoute.go
@@ -0,0 +1,171 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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"
+)
+
+// Replaces an existing route within a route table in a VPC. You must provide only
+// one of the following: internet gateway, virtual private gateway, NAT instance,
+// NAT gateway, VPC peering connection, network interface, egress-only internet
+// gateway, or transit gateway. For more information, see Route tables
+// (https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Route_Tables.html) in the
+// Amazon Virtual Private Cloud User Guide.
+func (c *Client) ReplaceRoute(ctx context.Context, params *ReplaceRouteInput, optFns ...func(*Options)) (*ReplaceRouteOutput, error) {
+ if params == nil {
+ params = &ReplaceRouteInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ReplaceRoute", params, optFns, c.addOperationReplaceRouteMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ReplaceRouteOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ReplaceRouteInput struct {
+
+ // The ID of the route table.
+ //
+ // This member is required.
+ RouteTableId *string
+
+ // [IPv4 traffic only] The ID of a carrier gateway.
+ CarrierGatewayId *string
+
+ // The IPv4 CIDR address block used for the destination match. The value that you
+ // provide must match the CIDR of an existing route in the table.
+ DestinationCidrBlock *string
+
+ // The IPv6 CIDR address block used for the destination match. The value that you
+ // provide must match the CIDR of an existing route in the table.
+ DestinationIpv6CidrBlock *string
+
+ // The ID of the prefix list for the route.
+ DestinationPrefixListId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // [IPv6 traffic only] The ID of an egress-only internet gateway.
+ EgressOnlyInternetGatewayId *string
+
+ // The ID of an internet gateway or virtual private gateway.
+ GatewayId *string
+
+ // The ID of a NAT instance in your VPC.
+ InstanceId *string
+
+ // The ID of the local gateway.
+ LocalGatewayId *string
+
+ // Specifies whether to reset the local route to its default target (local).
+ LocalTarget *bool
+
+ // [IPv4 traffic only] The ID of a NAT gateway.
+ NatGatewayId *string
+
+ // The ID of a network interface.
+ NetworkInterfaceId *string
+
+ // The ID of a transit gateway.
+ TransitGatewayId *string
+
+ // The ID of a VPC endpoint. Supported for Gateway Load Balancer endpoints only.
+ VpcEndpointId *string
+
+ // The ID of a VPC peering connection.
+ VpcPeeringConnectionId *string
+
+ noSmithyDocumentSerde
+}
+
+type ReplaceRouteOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationReplaceRouteMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpReplaceRoute{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpReplaceRoute{}, 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 = addOpReplaceRouteValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opReplaceRoute(options.Region), middleware.Before); 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_opReplaceRoute(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "ReplaceRoute",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ReplaceRouteTableAssociation.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ReplaceRouteTableAssociation.go
new file mode 100644
index 00000000..6cd30dc4
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ReplaceRouteTableAssociation.go
@@ -0,0 +1,142 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Changes the route table associated with a given subnet, internet gateway, or
+// virtual private gateway in a VPC. After the operation completes, the subnet or
+// gateway uses the routes in the new route table. For more information about route
+// tables, see Route tables
+// (https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Route_Tables.html) in the
+// Amazon Virtual Private Cloud User Guide. You can also use this operation to
+// change which table is the main route table in the VPC. Specify the main route
+// table's association ID and the route table ID of the new main route table.
+func (c *Client) ReplaceRouteTableAssociation(ctx context.Context, params *ReplaceRouteTableAssociationInput, optFns ...func(*Options)) (*ReplaceRouteTableAssociationOutput, error) {
+ if params == nil {
+ params = &ReplaceRouteTableAssociationInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ReplaceRouteTableAssociation", params, optFns, c.addOperationReplaceRouteTableAssociationMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ReplaceRouteTableAssociationOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ReplaceRouteTableAssociationInput struct {
+
+ // The association ID.
+ //
+ // This member is required.
+ AssociationId *string
+
+ // The ID of the new route table to associate with the subnet.
+ //
+ // This member is required.
+ RouteTableId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type ReplaceRouteTableAssociationOutput struct {
+
+ // The state of the association.
+ AssociationState *types.RouteTableAssociationState
+
+ // The ID of the new association.
+ NewAssociationId *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationReplaceRouteTableAssociationMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpReplaceRouteTableAssociation{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpReplaceRouteTableAssociation{}, 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 = addOpReplaceRouteTableAssociationValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opReplaceRouteTableAssociation(options.Region), middleware.Before); 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_opReplaceRouteTableAssociation(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "ReplaceRouteTableAssociation",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ReplaceTransitGatewayRoute.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ReplaceTransitGatewayRoute.go
new file mode 100644
index 00000000..01794ff8
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ReplaceTransitGatewayRoute.go
@@ -0,0 +1,139 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Replaces the specified route in the specified transit gateway route table.
+func (c *Client) ReplaceTransitGatewayRoute(ctx context.Context, params *ReplaceTransitGatewayRouteInput, optFns ...func(*Options)) (*ReplaceTransitGatewayRouteOutput, error) {
+ if params == nil {
+ params = &ReplaceTransitGatewayRouteInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ReplaceTransitGatewayRoute", params, optFns, c.addOperationReplaceTransitGatewayRouteMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ReplaceTransitGatewayRouteOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ReplaceTransitGatewayRouteInput struct {
+
+ // The CIDR range used for the destination match. Routing decisions are based on
+ // the most specific match.
+ //
+ // This member is required.
+ DestinationCidrBlock *string
+
+ // The ID of the route table.
+ //
+ // This member is required.
+ TransitGatewayRouteTableId *string
+
+ // Indicates whether traffic matching this route is to be dropped.
+ Blackhole *bool
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The ID of the attachment.
+ TransitGatewayAttachmentId *string
+
+ noSmithyDocumentSerde
+}
+
+type ReplaceTransitGatewayRouteOutput struct {
+
+ // Information about the modified route.
+ Route *types.TransitGatewayRoute
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationReplaceTransitGatewayRouteMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpReplaceTransitGatewayRoute{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpReplaceTransitGatewayRoute{}, 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 = addOpReplaceTransitGatewayRouteValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opReplaceTransitGatewayRoute(options.Region), middleware.Before); 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_opReplaceTransitGatewayRoute(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "ReplaceTransitGatewayRoute",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ReportInstanceStatus.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ReportInstanceStatus.go
new file mode 100644
index 00000000..2b618b95
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ReportInstanceStatus.go
@@ -0,0 +1,176 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "time"
+)
+
+// Submits feedback about the status of an instance. The instance must be in the
+// running state. If your experience with the instance differs from the instance
+// status returned by DescribeInstanceStatus, use ReportInstanceStatus to report
+// your experience with the instance. Amazon EC2 collects this information to
+// improve the accuracy of status checks. Use of this action does not change the
+// value returned by DescribeInstanceStatus.
+func (c *Client) ReportInstanceStatus(ctx context.Context, params *ReportInstanceStatusInput, optFns ...func(*Options)) (*ReportInstanceStatusOutput, error) {
+ if params == nil {
+ params = &ReportInstanceStatusInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ReportInstanceStatus", params, optFns, c.addOperationReportInstanceStatusMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ReportInstanceStatusOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ReportInstanceStatusInput struct {
+
+ // The instances.
+ //
+ // This member is required.
+ Instances []string
+
+ // The reason codes that describe the health state of your instance.
+ //
+ // *
+ // instance-stuck-in-state: My instance is stuck in a state.
+ //
+ // * unresponsive: My
+ // instance is unresponsive.
+ //
+ // * not-accepting-credentials: My instance is not
+ // accepting my credentials.
+ //
+ // * password-not-available: A password is not available
+ // for my instance.
+ //
+ // * performance-network: My instance is experiencing performance
+ // problems that I believe are network related.
+ //
+ // * performance-instance-store: My
+ // instance is experiencing performance problems that I believe are related to the
+ // instance stores.
+ //
+ // * performance-ebs-volume: My instance is experiencing
+ // performance problems that I believe are related to an EBS volume.
+ //
+ // *
+ // performance-other: My instance is experiencing performance problems.
+ //
+ // * other:
+ // [explain using the description parameter]
+ //
+ // This member is required.
+ ReasonCodes []types.ReportInstanceReasonCodes
+
+ // The status of all instances listed.
+ //
+ // This member is required.
+ Status types.ReportStatusType
+
+ // Descriptive text about the health state of your instance.
+ Description *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The time at which the reported instance health state ended.
+ EndTime *time.Time
+
+ // The time at which the reported instance health state began.
+ StartTime *time.Time
+
+ noSmithyDocumentSerde
+}
+
+type ReportInstanceStatusOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationReportInstanceStatusMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpReportInstanceStatus{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpReportInstanceStatus{}, 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 = addOpReportInstanceStatusValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opReportInstanceStatus(options.Region), middleware.Before); 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_opReportInstanceStatus(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "ReportInstanceStatus",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RequestSpotFleet.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RequestSpotFleet.go
new file mode 100644
index 00000000..bad92599
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RequestSpotFleet.go
@@ -0,0 +1,146 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Creates a Spot Fleet request. The Spot Fleet request specifies the total target
+// capacity and the On-Demand target capacity. Amazon EC2 calculates the difference
+// between the total capacity and On-Demand capacity, and launches the difference
+// as Spot capacity. You can submit a single request that includes multiple launch
+// specifications that vary by instance type, AMI, Availability Zone, or subnet. By
+// default, the Spot Fleet requests Spot Instances in the Spot Instance pool where
+// the price per unit is the lowest. Each launch specification can include its own
+// instance weighting that reflects the value of the instance type to your
+// application workload. Alternatively, you can specify that the Spot Fleet
+// distribute the target capacity across the Spot pools included in its launch
+// specifications. By ensuring that the Spot Instances in your Spot Fleet are in
+// different Spot pools, you can improve the availability of your fleet. You can
+// specify tags for the Spot Fleet request and instances launched by the fleet. You
+// cannot tag other resource types in a Spot Fleet request because only the
+// spot-fleet-request and instance resource types are supported. For more
+// information, see Spot Fleet requests
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-fleet-requests.html)
+// in the Amazon EC2 User Guide for Linux Instances.
+func (c *Client) RequestSpotFleet(ctx context.Context, params *RequestSpotFleetInput, optFns ...func(*Options)) (*RequestSpotFleetOutput, error) {
+ if params == nil {
+ params = &RequestSpotFleetInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "RequestSpotFleet", params, optFns, c.addOperationRequestSpotFleetMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*RequestSpotFleetOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+// Contains the parameters for RequestSpotFleet.
+type RequestSpotFleetInput struct {
+
+ // The configuration for the Spot Fleet request.
+ //
+ // This member is required.
+ SpotFleetRequestConfig *types.SpotFleetRequestConfigData
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+// Contains the output of RequestSpotFleet.
+type RequestSpotFleetOutput struct {
+
+ // The ID of the Spot Fleet request.
+ SpotFleetRequestId *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationRequestSpotFleetMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpRequestSpotFleet{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpRequestSpotFleet{}, 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 = addOpRequestSpotFleetValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRequestSpotFleet(options.Region), middleware.Before); 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_opRequestSpotFleet(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "RequestSpotFleet",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RequestSpotInstances.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RequestSpotInstances.go
new file mode 100644
index 00000000..1c8fc86e
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RequestSpotInstances.go
@@ -0,0 +1,204 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "time"
+)
+
+// Creates a Spot Instance request. For more information, see Spot Instance
+// requests
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-requests.html) in the
+// Amazon EC2 User Guide for Linux Instances.
+func (c *Client) RequestSpotInstances(ctx context.Context, params *RequestSpotInstancesInput, optFns ...func(*Options)) (*RequestSpotInstancesOutput, error) {
+ if params == nil {
+ params = &RequestSpotInstancesInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "RequestSpotInstances", params, optFns, c.addOperationRequestSpotInstancesMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*RequestSpotInstancesOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+// Contains the parameters for RequestSpotInstances.
+type RequestSpotInstancesInput struct {
+
+ // The user-specified name for a logical grouping of requests. When you specify an
+ // Availability Zone group in a Spot Instance request, all Spot Instances in the
+ // request are launched in the same Availability Zone. Instance proximity is
+ // maintained with this parameter, but the choice of Availability Zone is not. The
+ // group applies only to requests for Spot Instances of the same instance type. Any
+ // additional Spot Instance requests that are specified with the same Availability
+ // Zone group name are launched in that same Availability Zone, as long as at least
+ // one instance from the group is still active. If there is no active instance
+ // running in the Availability Zone group that you specify for a new Spot Instance
+ // request (all instances are terminated, the request is expired, or the maximum
+ // price you specified falls below current Spot price), then Amazon EC2 launches
+ // the instance in any Availability Zone where the constraint can be met.
+ // Consequently, the subsequent set of Spot Instances could be placed in a
+ // different zone from the original request, even if you specified the same
+ // Availability Zone group. Default: Instances are launched in any available
+ // Availability Zone.
+ AvailabilityZoneGroup *string
+
+ // Deprecated.
+ BlockDurationMinutes *int32
+
+ // Unique, case-sensitive identifier that you provide to ensure the idempotency of
+ // the request. For more information, see How to Ensure Idempotency
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html)
+ // in the Amazon EC2 User Guide for Linux Instances.
+ ClientToken *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The maximum number of Spot Instances to launch. Default: 1
+ InstanceCount *int32
+
+ // The behavior when a Spot Instance is interrupted. The default is terminate.
+ InstanceInterruptionBehavior types.InstanceInterruptionBehavior
+
+ // The instance launch group. Launch groups are Spot Instances that launch together
+ // and terminate together. Default: Instances are launched and terminated
+ // individually
+ LaunchGroup *string
+
+ // The launch specification.
+ LaunchSpecification *types.RequestSpotLaunchSpecification
+
+ // The maximum price per hour that you are willing to pay for a Spot Instance. The
+ // default is the On-Demand price.
+ SpotPrice *string
+
+ // The key-value pair for tagging the Spot Instance request on creation. The value
+ // for ResourceType must be spot-instances-request, otherwise the Spot Instance
+ // request fails. To tag the Spot Instance request after it has been created, see
+ // CreateTags
+ // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateTags.html).
+ TagSpecifications []types.TagSpecification
+
+ // The Spot Instance request type. Default: one-time
+ Type types.SpotInstanceType
+
+ // The start date of the request. If this is a one-time request, the request
+ // becomes active at this date and time and remains active until all instances
+ // launch, the request expires, or the request is canceled. If the request is
+ // persistent, the request becomes active at this date and time and remains active
+ // until it expires or is canceled. The specified start date and time cannot be
+ // equal to the current date and time. You must specify a start date and time that
+ // occurs after the current date and time.
+ ValidFrom *time.Time
+
+ // The end date of the request, in UTC format (YYYY-MM-DDTHH:MM:SSZ).
+ //
+ // * For a
+ // persistent request, the request remains active until the ValidUntil date and
+ // time is reached. Otherwise, the request remains active until you cancel it.
+ //
+ // *
+ // For a one-time request, the request remains active until all instances launch,
+ // the request is canceled, or the ValidUntil date and time is reached. By default,
+ // the request is valid for 7 days from the date the request was created.
+ ValidUntil *time.Time
+
+ noSmithyDocumentSerde
+}
+
+// Contains the output of RequestSpotInstances.
+type RequestSpotInstancesOutput struct {
+
+ // One or more Spot Instance requests.
+ SpotInstanceRequests []types.SpotInstanceRequest
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationRequestSpotInstancesMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpRequestSpotInstances{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpRequestSpotInstances{}, 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 = addOpRequestSpotInstancesValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRequestSpotInstances(options.Region), middleware.Before); 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_opRequestSpotInstances(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "RequestSpotInstances",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ResetAddressAttribute.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ResetAddressAttribute.go
new file mode 100644
index 00000000..25ae2076
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ResetAddressAttribute.go
@@ -0,0 +1,134 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Resets the attribute of the specified IP address. For requirements, see Using
+// reverse DNS for email applications
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html#Using_Elastic_Addressing_Reverse_DNS).
+func (c *Client) ResetAddressAttribute(ctx context.Context, params *ResetAddressAttributeInput, optFns ...func(*Options)) (*ResetAddressAttributeOutput, error) {
+ if params == nil {
+ params = &ResetAddressAttributeInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ResetAddressAttribute", params, optFns, c.addOperationResetAddressAttributeMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ResetAddressAttributeOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ResetAddressAttributeInput struct {
+
+ // [EC2-VPC] The allocation ID.
+ //
+ // This member is required.
+ AllocationId *string
+
+ // The attribute of the IP address.
+ //
+ // This member is required.
+ Attribute types.AddressAttributeName
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type ResetAddressAttributeOutput struct {
+
+ // Information about the IP address.
+ Address *types.AddressAttribute
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationResetAddressAttributeMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpResetAddressAttribute{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpResetAddressAttribute{}, 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 = addOpResetAddressAttributeValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opResetAddressAttribute(options.Region), middleware.Before); 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_opResetAddressAttribute(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "ResetAddressAttribute",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ResetEbsDefaultKmsKeyId.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ResetEbsDefaultKmsKeyId.go
new file mode 100644
index 00000000..7880617b
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ResetEbsDefaultKmsKeyId.go
@@ -0,0 +1,125 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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"
+)
+
+// Resets the default KMS key for EBS encryption for your account in this Region to
+// the Amazon Web Services managed KMS key for EBS. After resetting the default KMS
+// key to the Amazon Web Services managed KMS key, you can continue to encrypt by a
+// customer managed KMS key by specifying it when you create the volume. For more
+// information, see Amazon EBS encryption
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html) in the
+// Amazon Elastic Compute Cloud User Guide.
+func (c *Client) ResetEbsDefaultKmsKeyId(ctx context.Context, params *ResetEbsDefaultKmsKeyIdInput, optFns ...func(*Options)) (*ResetEbsDefaultKmsKeyIdOutput, error) {
+ if params == nil {
+ params = &ResetEbsDefaultKmsKeyIdInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ResetEbsDefaultKmsKeyId", params, optFns, c.addOperationResetEbsDefaultKmsKeyIdMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ResetEbsDefaultKmsKeyIdOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ResetEbsDefaultKmsKeyIdInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type ResetEbsDefaultKmsKeyIdOutput struct {
+
+ // The Amazon Resource Name (ARN) of the default KMS key for EBS encryption by
+ // default.
+ KmsKeyId *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationResetEbsDefaultKmsKeyIdMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpResetEbsDefaultKmsKeyId{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpResetEbsDefaultKmsKeyId{}, 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_opResetEbsDefaultKmsKeyId(options.Region), middleware.Before); 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_opResetEbsDefaultKmsKeyId(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "ResetEbsDefaultKmsKeyId",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ResetFpgaImageAttribute.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ResetFpgaImageAttribute.go
new file mode 100644
index 00000000..55236383
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ResetFpgaImageAttribute.go
@@ -0,0 +1,131 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Resets the specified attribute of the specified Amazon FPGA Image (AFI) to its
+// default value. You can only reset the load permission attribute.
+func (c *Client) ResetFpgaImageAttribute(ctx context.Context, params *ResetFpgaImageAttributeInput, optFns ...func(*Options)) (*ResetFpgaImageAttributeOutput, error) {
+ if params == nil {
+ params = &ResetFpgaImageAttributeInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ResetFpgaImageAttribute", params, optFns, c.addOperationResetFpgaImageAttributeMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ResetFpgaImageAttributeOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ResetFpgaImageAttributeInput struct {
+
+ // The ID of the AFI.
+ //
+ // This member is required.
+ FpgaImageId *string
+
+ // The attribute.
+ Attribute types.ResetFpgaImageAttributeName
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type ResetFpgaImageAttributeOutput struct {
+
+ // Is true if the request succeeds, and an error otherwise.
+ Return *bool
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationResetFpgaImageAttributeMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpResetFpgaImageAttribute{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpResetFpgaImageAttribute{}, 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 = addOpResetFpgaImageAttributeValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opResetFpgaImageAttribute(options.Region), middleware.Before); 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_opResetFpgaImageAttribute(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "ResetFpgaImageAttribute",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ResetImageAttribute.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ResetImageAttribute.go
new file mode 100644
index 00000000..53f621d6
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ResetImageAttribute.go
@@ -0,0 +1,130 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Resets an attribute of an AMI to its default value.
+func (c *Client) ResetImageAttribute(ctx context.Context, params *ResetImageAttributeInput, optFns ...func(*Options)) (*ResetImageAttributeOutput, error) {
+ if params == nil {
+ params = &ResetImageAttributeInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ResetImageAttribute", params, optFns, c.addOperationResetImageAttributeMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ResetImageAttributeOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+// Contains the parameters for ResetImageAttribute.
+type ResetImageAttributeInput struct {
+
+ // The attribute to reset (currently you can only reset the launch permission
+ // attribute).
+ //
+ // This member is required.
+ Attribute types.ResetImageAttributeName
+
+ // The ID of the AMI.
+ //
+ // This member is required.
+ ImageId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type ResetImageAttributeOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationResetImageAttributeMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpResetImageAttribute{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpResetImageAttribute{}, 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 = addOpResetImageAttributeValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opResetImageAttribute(options.Region), middleware.Before); 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_opResetImageAttribute(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "ResetImageAttribute",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ResetInstanceAttribute.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ResetInstanceAttribute.go
new file mode 100644
index 00000000..7681fc94
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ResetInstanceAttribute.go
@@ -0,0 +1,137 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Resets an attribute of an instance to its default value. To reset the kernel or
+// ramdisk, the instance must be in a stopped state. To reset the sourceDestCheck,
+// the instance can be either running or stopped. The sourceDestCheck attribute
+// controls whether source/destination checking is enabled. The default value is
+// true, which means checking is enabled. This value must be false for a NAT
+// instance to perform NAT. For more information, see NAT Instances
+// (https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_NAT_Instance.html)
+// in the Amazon VPC User Guide.
+func (c *Client) ResetInstanceAttribute(ctx context.Context, params *ResetInstanceAttributeInput, optFns ...func(*Options)) (*ResetInstanceAttributeOutput, error) {
+ if params == nil {
+ params = &ResetInstanceAttributeInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ResetInstanceAttribute", params, optFns, c.addOperationResetInstanceAttributeMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ResetInstanceAttributeOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ResetInstanceAttributeInput struct {
+
+ // The attribute to reset. You can only reset the following attributes: kernel |
+ // ramdisk | sourceDestCheck. To change an instance attribute, use
+ // ModifyInstanceAttribute.
+ //
+ // This member is required.
+ Attribute types.InstanceAttributeName
+
+ // The ID of the instance.
+ //
+ // This member is required.
+ InstanceId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type ResetInstanceAttributeOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationResetInstanceAttributeMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpResetInstanceAttribute{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpResetInstanceAttribute{}, 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 = addOpResetInstanceAttributeValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opResetInstanceAttribute(options.Region), middleware.Before); 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_opResetInstanceAttribute(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "ResetInstanceAttribute",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ResetNetworkInterfaceAttribute.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ResetNetworkInterfaceAttribute.go
new file mode 100644
index 00000000..f648eaae
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ResetNetworkInterfaceAttribute.go
@@ -0,0 +1,127 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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"
+)
+
+// Resets a network interface attribute. You can specify only one attribute at a
+// time.
+func (c *Client) ResetNetworkInterfaceAttribute(ctx context.Context, params *ResetNetworkInterfaceAttributeInput, optFns ...func(*Options)) (*ResetNetworkInterfaceAttributeOutput, error) {
+ if params == nil {
+ params = &ResetNetworkInterfaceAttributeInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ResetNetworkInterfaceAttribute", params, optFns, c.addOperationResetNetworkInterfaceAttributeMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ResetNetworkInterfaceAttributeOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+// Contains the parameters for ResetNetworkInterfaceAttribute.
+type ResetNetworkInterfaceAttributeInput struct {
+
+ // The ID of the network interface.
+ //
+ // This member is required.
+ NetworkInterfaceId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The source/destination checking attribute. Resets the value to true.
+ SourceDestCheck *string
+
+ noSmithyDocumentSerde
+}
+
+type ResetNetworkInterfaceAttributeOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationResetNetworkInterfaceAttributeMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpResetNetworkInterfaceAttribute{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpResetNetworkInterfaceAttribute{}, 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 = addOpResetNetworkInterfaceAttributeValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opResetNetworkInterfaceAttribute(options.Region), middleware.Before); 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_opResetNetworkInterfaceAttribute(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "ResetNetworkInterfaceAttribute",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ResetSnapshotAttribute.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ResetSnapshotAttribute.go
new file mode 100644
index 00000000..f5fd73e0
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ResetSnapshotAttribute.go
@@ -0,0 +1,132 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Resets permission settings for the specified snapshot. For more information
+// about modifying snapshot permissions, see Share a snapshot
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-modifying-snapshot-permissions.html)
+// in the Amazon Elastic Compute Cloud User Guide.
+func (c *Client) ResetSnapshotAttribute(ctx context.Context, params *ResetSnapshotAttributeInput, optFns ...func(*Options)) (*ResetSnapshotAttributeOutput, error) {
+ if params == nil {
+ params = &ResetSnapshotAttributeInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ResetSnapshotAttribute", params, optFns, c.addOperationResetSnapshotAttributeMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ResetSnapshotAttributeOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ResetSnapshotAttributeInput struct {
+
+ // The attribute to reset. Currently, only the attribute for permission to create
+ // volumes can be reset.
+ //
+ // This member is required.
+ Attribute types.SnapshotAttributeName
+
+ // The ID of the snapshot.
+ //
+ // This member is required.
+ SnapshotId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type ResetSnapshotAttributeOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationResetSnapshotAttributeMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpResetSnapshotAttribute{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpResetSnapshotAttribute{}, 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 = addOpResetSnapshotAttributeValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opResetSnapshotAttribute(options.Region), middleware.Before); 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_opResetSnapshotAttribute(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "ResetSnapshotAttribute",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RestoreAddressToClassic.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RestoreAddressToClassic.go
new file mode 100644
index 00000000..4b7b8937
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RestoreAddressToClassic.go
@@ -0,0 +1,133 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Restores an Elastic IP address that was previously moved to the EC2-VPC platform
+// back to the EC2-Classic platform. You cannot move an Elastic IP address that was
+// originally allocated for use in EC2-VPC. The Elastic IP address must not be
+// associated with an instance or network interface.
+func (c *Client) RestoreAddressToClassic(ctx context.Context, params *RestoreAddressToClassicInput, optFns ...func(*Options)) (*RestoreAddressToClassicOutput, error) {
+ if params == nil {
+ params = &RestoreAddressToClassicInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "RestoreAddressToClassic", params, optFns, c.addOperationRestoreAddressToClassicMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*RestoreAddressToClassicOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type RestoreAddressToClassicInput struct {
+
+ // The Elastic IP address.
+ //
+ // This member is required.
+ PublicIp *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type RestoreAddressToClassicOutput struct {
+
+ // The Elastic IP address.
+ PublicIp *string
+
+ // The move status for the IP address.
+ Status types.Status
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationRestoreAddressToClassicMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpRestoreAddressToClassic{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpRestoreAddressToClassic{}, 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 = addOpRestoreAddressToClassicValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRestoreAddressToClassic(options.Region), middleware.Before); 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_opRestoreAddressToClassic(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "RestoreAddressToClassic",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RestoreManagedPrefixListVersion.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RestoreManagedPrefixListVersion.go
new file mode 100644
index 00000000..0800fe6a
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RestoreManagedPrefixListVersion.go
@@ -0,0 +1,138 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Restores the entries from a previous version of a managed prefix list to a new
+// version of the prefix list.
+func (c *Client) RestoreManagedPrefixListVersion(ctx context.Context, params *RestoreManagedPrefixListVersionInput, optFns ...func(*Options)) (*RestoreManagedPrefixListVersionOutput, error) {
+ if params == nil {
+ params = &RestoreManagedPrefixListVersionInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "RestoreManagedPrefixListVersion", params, optFns, c.addOperationRestoreManagedPrefixListVersionMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*RestoreManagedPrefixListVersionOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type RestoreManagedPrefixListVersionInput struct {
+
+ // The current version number for the prefix list.
+ //
+ // This member is required.
+ CurrentVersion *int64
+
+ // The ID of the prefix list.
+ //
+ // This member is required.
+ PrefixListId *string
+
+ // The version to restore.
+ //
+ // This member is required.
+ PreviousVersion *int64
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type RestoreManagedPrefixListVersionOutput struct {
+
+ // Information about the prefix list.
+ PrefixList *types.ManagedPrefixList
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationRestoreManagedPrefixListVersionMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpRestoreManagedPrefixListVersion{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpRestoreManagedPrefixListVersion{}, 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 = addOpRestoreManagedPrefixListVersionValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRestoreManagedPrefixListVersion(options.Region), middleware.Before); 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_opRestoreManagedPrefixListVersion(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "RestoreManagedPrefixListVersion",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RevokeClientVpnIngress.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RevokeClientVpnIngress.go
new file mode 100644
index 00000000..d2c45f25
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RevokeClientVpnIngress.go
@@ -0,0 +1,140 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Removes an ingress authorization rule from a Client VPN endpoint.
+func (c *Client) RevokeClientVpnIngress(ctx context.Context, params *RevokeClientVpnIngressInput, optFns ...func(*Options)) (*RevokeClientVpnIngressOutput, error) {
+ if params == nil {
+ params = &RevokeClientVpnIngressInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "RevokeClientVpnIngress", params, optFns, c.addOperationRevokeClientVpnIngressMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*RevokeClientVpnIngressOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type RevokeClientVpnIngressInput struct {
+
+ // The ID of the Client VPN endpoint with which the authorization rule is
+ // associated.
+ //
+ // This member is required.
+ ClientVpnEndpointId *string
+
+ // The IPv4 address range, in CIDR notation, of the network for which access is
+ // being removed.
+ //
+ // This member is required.
+ TargetNetworkCidr *string
+
+ // The ID of the Active Directory group for which to revoke access.
+ AccessGroupId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // Indicates whether access should be revoked for all clients.
+ RevokeAllGroups *bool
+
+ noSmithyDocumentSerde
+}
+
+type RevokeClientVpnIngressOutput struct {
+
+ // The current state of the authorization rule.
+ Status *types.ClientVpnAuthorizationRuleStatus
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationRevokeClientVpnIngressMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpRevokeClientVpnIngress{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpRevokeClientVpnIngress{}, 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 = addOpRevokeClientVpnIngressValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRevokeClientVpnIngress(options.Region), middleware.Before); 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_opRevokeClientVpnIngress(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "RevokeClientVpnIngress",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RevokeSecurityGroupEgress.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RevokeSecurityGroupEgress.go
new file mode 100644
index 00000000..ba550d04
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RevokeSecurityGroupEgress.go
@@ -0,0 +1,174 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// [VPC only] Removes the specified outbound (egress) rules from a security group
+// for EC2-VPC. This action does not apply to security groups for use in
+// EC2-Classic. You can specify rules using either rule IDs or security group rule
+// properties. If you use rule properties, the values that you specify (for
+// example, ports) must match the existing rule's values exactly. Each rule has a
+// protocol, from and to ports, and destination (CIDR range, security group, or
+// prefix list). For the TCP and UDP protocols, you must also specify the
+// destination port or range of ports. For the ICMP protocol, you must also specify
+// the ICMP type and code. If the security group rule has a description, you do not
+// need to specify the description to revoke the rule. [Default VPC] If the values
+// you specify do not match the existing rule's values, no error is returned, and
+// the output describes the security group rules that were not revoked. Amazon Web
+// Services recommends that you describe the security group to verify that the
+// rules were removed. Rule changes are propagated to instances within the security
+// group as quickly as possible. However, a small delay might occur.
+func (c *Client) RevokeSecurityGroupEgress(ctx context.Context, params *RevokeSecurityGroupEgressInput, optFns ...func(*Options)) (*RevokeSecurityGroupEgressOutput, error) {
+ if params == nil {
+ params = &RevokeSecurityGroupEgressInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "RevokeSecurityGroupEgress", params, optFns, c.addOperationRevokeSecurityGroupEgressMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*RevokeSecurityGroupEgressOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type RevokeSecurityGroupEgressInput struct {
+
+ // The ID of the security group.
+ //
+ // This member is required.
+ GroupId *string
+
+ // Not supported. Use a set of IP permissions to specify the CIDR.
+ CidrIp *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // Not supported. Use a set of IP permissions to specify the port.
+ FromPort *int32
+
+ // The sets of IP permissions. You can't specify a destination security group and a
+ // CIDR IP address range in the same set of permissions.
+ IpPermissions []types.IpPermission
+
+ // Not supported. Use a set of IP permissions to specify the protocol name or
+ // number.
+ IpProtocol *string
+
+ // The IDs of the security group rules.
+ SecurityGroupRuleIds []string
+
+ // Not supported. Use a set of IP permissions to specify a destination security
+ // group.
+ SourceSecurityGroupName *string
+
+ // Not supported. Use a set of IP permissions to specify a destination security
+ // group.
+ SourceSecurityGroupOwnerId *string
+
+ // Not supported. Use a set of IP permissions to specify the port.
+ ToPort *int32
+
+ noSmithyDocumentSerde
+}
+
+type RevokeSecurityGroupEgressOutput struct {
+
+ // Returns true if the request succeeds; otherwise, returns an error.
+ Return *bool
+
+ // The outbound rules that were unknown to the service. In some cases,
+ // unknownIpPermissionSet might be in a different format from the request
+ // parameter.
+ UnknownIpPermissions []types.IpPermission
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationRevokeSecurityGroupEgressMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpRevokeSecurityGroupEgress{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpRevokeSecurityGroupEgress{}, 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 = addOpRevokeSecurityGroupEgressValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRevokeSecurityGroupEgress(options.Region), middleware.Before); 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_opRevokeSecurityGroupEgress(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "RevokeSecurityGroupEgress",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RevokeSecurityGroupIngress.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RevokeSecurityGroupIngress.go
new file mode 100644
index 00000000..5eae7ae0
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RevokeSecurityGroupIngress.go
@@ -0,0 +1,186 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Removes the specified inbound (ingress) rules from a security group. You can
+// specify rules using either rule IDs or security group rule properties. If you
+// use rule properties, the values that you specify (for example, ports) must match
+// the existing rule's values exactly. Each rule has a protocol, from and to ports,
+// and source (CIDR range, security group, or prefix list). For the TCP and UDP
+// protocols, you must also specify the destination port or range of ports. For the
+// ICMP protocol, you must also specify the ICMP type and code. If the security
+// group rule has a description, you do not need to specify the description to
+// revoke the rule. [EC2-Classic, default VPC] If the values you specify do not
+// match the existing rule's values, no error is returned, and the output describes
+// the security group rules that were not revoked. Amazon Web Services recommends
+// that you describe the security group to verify that the rules were removed. Rule
+// changes are propagated to instances within the security group as quickly as
+// possible. However, a small delay might occur.
+func (c *Client) RevokeSecurityGroupIngress(ctx context.Context, params *RevokeSecurityGroupIngressInput, optFns ...func(*Options)) (*RevokeSecurityGroupIngressOutput, error) {
+ if params == nil {
+ params = &RevokeSecurityGroupIngressInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "RevokeSecurityGroupIngress", params, optFns, c.addOperationRevokeSecurityGroupIngressMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*RevokeSecurityGroupIngressOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type RevokeSecurityGroupIngressInput struct {
+
+ // The CIDR IP address range. You can't specify this parameter when specifying a
+ // source security group.
+ CidrIp *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The start of port range for the TCP and UDP protocols, or an ICMP type number.
+ // For the ICMP type number, use -1 to specify all ICMP types.
+ FromPort *int32
+
+ // The ID of the security group. You must specify either the security group ID or
+ // the security group name in the request. For security groups in a nondefault VPC,
+ // you must specify the security group ID.
+ GroupId *string
+
+ // [EC2-Classic, default VPC] The name of the security group. You must specify
+ // either the security group ID or the security group name in the request.
+ GroupName *string
+
+ // The sets of IP permissions. You can't specify a source security group and a CIDR
+ // IP address range in the same set of permissions.
+ IpPermissions []types.IpPermission
+
+ // The IP protocol name (tcp, udp, icmp) or number (see Protocol Numbers
+ // (http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml)). Use
+ // -1 to specify all.
+ IpProtocol *string
+
+ // The IDs of the security group rules.
+ SecurityGroupRuleIds []string
+
+ // [EC2-Classic, default VPC] The name of the source security group. You can't
+ // specify this parameter in combination with the following parameters: the CIDR IP
+ // address range, the start of the port range, the IP protocol, and the end of the
+ // port range. For EC2-VPC, the source security group must be in the same VPC. To
+ // revoke a specific rule for an IP protocol and port range, use a set of IP
+ // permissions instead.
+ SourceSecurityGroupName *string
+
+ // [EC2-Classic] The Amazon Web Services account ID of the source security group,
+ // if the source security group is in a different account. You can't specify this
+ // parameter in combination with the following parameters: the CIDR IP address
+ // range, the IP protocol, the start of the port range, and the end of the port
+ // range. To revoke a specific rule for an IP protocol and port range, use a set of
+ // IP permissions instead.
+ SourceSecurityGroupOwnerId *string
+
+ // The end of port range for the TCP and UDP protocols, or an ICMP code number. For
+ // the ICMP code number, use -1 to specify all ICMP codes for the ICMP type.
+ ToPort *int32
+
+ noSmithyDocumentSerde
+}
+
+type RevokeSecurityGroupIngressOutput struct {
+
+ // Returns true if the request succeeds; otherwise, returns an error.
+ Return *bool
+
+ // The inbound rules that were unknown to the service. In some cases,
+ // unknownIpPermissionSet might be in a different format from the request
+ // parameter.
+ UnknownIpPermissions []types.IpPermission
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationRevokeSecurityGroupIngressMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpRevokeSecurityGroupIngress{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpRevokeSecurityGroupIngress{}, 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_opRevokeSecurityGroupIngress(options.Region), middleware.Before); 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_opRevokeSecurityGroupIngress(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "RevokeSecurityGroupIngress",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RunInstances.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RunInstances.go
new file mode 100644
index 00000000..a1d94cef
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RunInstances.go
@@ -0,0 +1,467 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Launches the specified number of instances using an AMI for which you have
+// permissions. You can specify a number of options, or leave the default options.
+// The following rules apply:
+//
+// * [EC2-VPC] If you don't specify a subnet ID, we
+// choose a default subnet from your default VPC for you. If you don't have a
+// default VPC, you must specify a subnet ID in the request.
+//
+// * [EC2-Classic] If
+// don't specify an Availability Zone, we choose one for you.
+//
+// * Some instance
+// types must be launched into a VPC. If you do not have a default VPC, or if you
+// do not specify a subnet ID, the request fails. For more information, see
+// Instance types available only in a VPC
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-vpc.html#vpc-only-instance-types).
+//
+// *
+// [EC2-VPC] All instances have a network interface with a primary private IPv4
+// address. If you don't specify this address, we choose one from the IPv4 range of
+// your subnet.
+//
+// * Not all instance types support IPv6 addresses. For more
+// information, see Instance types
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html).
+//
+// * If
+// you don't specify a security group ID, we use the default security group. For
+// more information, see Security groups
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-network-security.html).
+//
+// *
+// If any of the AMIs have a product code attached for which the user has not
+// subscribed, the request fails.
+//
+// You can create a launch template
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html),
+// which is a resource that contains the parameters to launch an instance. When you
+// launch an instance using RunInstances, you can specify the launch template
+// instead of specifying the launch parameters. To ensure faster instance launches,
+// break up large requests into smaller batches. For example, create five separate
+// launch requests for 100 instances each instead of one launch request for 500
+// instances. An instance is ready for you to use when it's in the running state.
+// You can check the state of your instance using DescribeInstances. You can tag
+// instances and EBS volumes during launch, after launch, or both. For more
+// information, see CreateTags and Tagging your Amazon EC2 resources
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html). Linux
+// instances have access to the public key of the key pair at boot. You can use
+// this key to provide secure access to the instance. Amazon EC2 public images use
+// this feature to provide secure access without passwords. For more information,
+// see Key pairs
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html). For
+// troubleshooting, see What to do if an instance immediately terminates
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_InstanceStraightToTerminated.html),
+// and Troubleshooting connecting to your instance
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/TroubleshootingInstancesConnecting.html).
+func (c *Client) RunInstances(ctx context.Context, params *RunInstancesInput, optFns ...func(*Options)) (*RunInstancesOutput, error) {
+ if params == nil {
+ params = &RunInstancesInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "RunInstances", params, optFns, c.addOperationRunInstancesMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*RunInstancesOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type RunInstancesInput struct {
+
+ // The maximum number of instances to launch. If you specify more instances than
+ // Amazon EC2 can launch in the target Availability Zone, Amazon EC2 launches the
+ // largest possible number of instances above MinCount. Constraints: Between 1 and
+ // the maximum number you're allowed for the specified instance type. For more
+ // information about the default limits, and how to request an increase, see How
+ // many instances can I run in Amazon EC2
+ // (http://aws.amazon.com/ec2/faqs/#How_many_instances_can_I_run_in_Amazon_EC2) in
+ // the Amazon EC2 FAQ.
+ //
+ // This member is required.
+ MaxCount *int32
+
+ // The minimum number of instances to launch. If you specify a minimum that is more
+ // instances than Amazon EC2 can launch in the target Availability Zone, Amazon EC2
+ // launches no instances. Constraints: Between 1 and the maximum number you're
+ // allowed for the specified instance type. For more information about the default
+ // limits, and how to request an increase, see How many instances can I run in
+ // Amazon EC2
+ // (http://aws.amazon.com/ec2/faqs/#How_many_instances_can_I_run_in_Amazon_EC2) in
+ // the Amazon EC2 General FAQ.
+ //
+ // This member is required.
+ MinCount *int32
+
+ // Reserved.
+ AdditionalInfo *string
+
+ // The block device mapping, which defines the EBS volumes and instance store
+ // volumes to attach to the instance at launch. For more information, see Block
+ // device mappings
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html)
+ // in the Amazon EC2 User Guide.
+ BlockDeviceMappings []types.BlockDeviceMapping
+
+ // Information about the Capacity Reservation targeting option. If you do not
+ // specify this parameter, the instance's Capacity Reservation preference defaults
+ // to open, which enables it to run in any open Capacity Reservation that has
+ // matching attributes (instance type, platform, Availability Zone).
+ CapacityReservationSpecification *types.CapacityReservationSpecification
+
+ // Unique, case-sensitive identifier you provide to ensure the idempotency of the
+ // request. If you do not specify a client token, a randomly generated token is
+ // used for the request to ensure idempotency. For more information, see Ensuring
+ // Idempotency
+ // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html).
+ // Constraints: Maximum 64 ASCII characters
+ ClientToken *string
+
+ // The CPU options for the instance. For more information, see Optimizing CPU
+ // options
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-optimize-cpu.html)
+ // in the Amazon EC2 User Guide.
+ CpuOptions *types.CpuOptionsRequest
+
+ // The credit option for CPU usage of the burstable performance instance. Valid
+ // values are standard and unlimited. To change this attribute after launch, use
+ // ModifyInstanceCreditSpecification
+ // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ModifyInstanceCreditSpecification.html).
+ // For more information, see Burstable performance instances
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-performance-instances.html)
+ // in the Amazon EC2 User Guide. Default: standard (T2 instances) or unlimited
+ // (T3/T3a instances) For T3 instances with host tenancy, only standard is
+ // supported.
+ CreditSpecification *types.CreditSpecificationRequest
+
+ // If you set this parameter to true, you can't terminate the instance using the
+ // Amazon EC2 console, CLI, or API; otherwise, you can. To change this attribute
+ // after launch, use ModifyInstanceAttribute
+ // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ModifyInstanceAttribute.html).
+ // Alternatively, if you set InstanceInitiatedShutdownBehavior to terminate, you
+ // can terminate the instance by running the shutdown command from the instance.
+ // Default: false
+ DisableApiTermination *bool
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // Indicates whether the instance is optimized for Amazon EBS I/O. This
+ // optimization provides dedicated throughput to Amazon EBS and an optimized
+ // configuration stack to provide optimal Amazon EBS I/O performance. This
+ // optimization isn't available with all instance types. Additional usage charges
+ // apply when using an EBS-optimized instance. Default: false
+ EbsOptimized *bool
+
+ // An elastic GPU to associate with the instance. An Elastic GPU is a GPU resource
+ // that you can attach to your Windows instance to accelerate the graphics
+ // performance of your applications. For more information, see Amazon EC2 Elastic
+ // GPUs
+ // (https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/elastic-graphics.html)
+ // in the Amazon EC2 User Guide.
+ ElasticGpuSpecification []types.ElasticGpuSpecification
+
+ // An elastic inference accelerator to associate with the instance. Elastic
+ // inference accelerators are a resource you can attach to your Amazon EC2
+ // instances to accelerate your Deep Learning (DL) inference workloads. You cannot
+ // specify accelerators from different generations in the same request.
+ ElasticInferenceAccelerators []types.ElasticInferenceAccelerator
+
+ // Indicates whether the instance is enabled for Amazon Web Services Nitro
+ // Enclaves. For more information, see What is Amazon Web Services Nitro Enclaves?
+ // (https://docs.aws.amazon.com/enclaves/latest/user/nitro-enclave.html) in the
+ // Amazon Web Services Nitro Enclaves User Guide. You can't enable Amazon Web
+ // Services Nitro Enclaves and hibernation on the same instance.
+ EnclaveOptions *types.EnclaveOptionsRequest
+
+ // Indicates whether an instance is enabled for hibernation. For more information,
+ // see Hibernate your instance
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html) in the
+ // Amazon EC2 User Guide. You can't enable hibernation and Amazon Web Services
+ // Nitro Enclaves on the same instance.
+ HibernationOptions *types.HibernationOptionsRequest
+
+ // The name or Amazon Resource Name (ARN) of an IAM instance profile.
+ IamInstanceProfile *types.IamInstanceProfileSpecification
+
+ // The ID of the AMI. An AMI ID is required to launch an instance and must be
+ // specified here or in a launch template.
+ ImageId *string
+
+ // Indicates whether an instance stops or terminates when you initiate shutdown
+ // from the instance (using the operating system command for system shutdown).
+ // Default: stop
+ InstanceInitiatedShutdownBehavior types.ShutdownBehavior
+
+ // The market (purchasing) option for the instances. For RunInstances, persistent
+ // Spot Instance requests are only supported when InstanceInterruptionBehavior is
+ // set to either hibernate or stop.
+ InstanceMarketOptions *types.InstanceMarketOptionsRequest
+
+ // The instance type. For more information, see Instance types
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html) in the
+ // Amazon EC2 User Guide. Default: m1.small
+ InstanceType types.InstanceType
+
+ // [EC2-VPC] The number of IPv6 addresses to associate with the primary network
+ // interface. Amazon EC2 chooses the IPv6 addresses from the range of your subnet.
+ // You cannot specify this option and the option to assign specific IPv6 addresses
+ // in the same request. You can specify this option if you've specified a minimum
+ // number of instances to launch. You cannot specify this option and the network
+ // interfaces option in the same request.
+ Ipv6AddressCount *int32
+
+ // [EC2-VPC] The IPv6 addresses from the range of the subnet to associate with the
+ // primary network interface. You cannot specify this option and the option to
+ // assign a number of IPv6 addresses in the same request. You cannot specify this
+ // option if you've specified a minimum number of instances to launch. You cannot
+ // specify this option and the network interfaces option in the same request.
+ Ipv6Addresses []types.InstanceIpv6Address
+
+ // The ID of the kernel. We recommend that you use PV-GRUB instead of kernels and
+ // RAM disks. For more information, see PV-GRUB
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedkernels.html)
+ // in the Amazon EC2 User Guide.
+ KernelId *string
+
+ // The name of the key pair. You can create a key pair using CreateKeyPair
+ // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateKeyPair.html)
+ // or ImportKeyPair
+ // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ImportKeyPair.html).
+ // If you do not specify a key pair, you can't connect to the instance unless you
+ // choose an AMI that is configured to allow users another way to log in.
+ KeyName *string
+
+ // The launch template to use to launch the instances. Any parameters that you
+ // specify in RunInstances override the same parameters in the launch template. You
+ // can specify either the name or ID of a launch template, but not both.
+ LaunchTemplate *types.LaunchTemplateSpecification
+
+ // The license configurations.
+ LicenseSpecifications []types.LicenseConfigurationRequest
+
+ // The metadata options for the instance. For more information, see Instance
+ // metadata and user data
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html).
+ MetadataOptions *types.InstanceMetadataOptionsRequest
+
+ // Specifies whether detailed monitoring is enabled for the instance.
+ Monitoring *types.RunInstancesMonitoringEnabled
+
+ // The network interfaces to associate with the instance. If you specify a network
+ // interface, you must specify any security groups and subnets as part of the
+ // network interface.
+ NetworkInterfaces []types.InstanceNetworkInterfaceSpecification
+
+ // The placement for the instance.
+ Placement *types.Placement
+
+ // [EC2-VPC] The primary IPv4 address. You must specify a value from the IPv4
+ // address range of the subnet. Only one private IP address can be designated as
+ // primary. You can't specify this option if you've specified the option to
+ // designate a private IP address as the primary IP address in a network interface
+ // specification. You cannot specify this option if you're launching more than one
+ // instance in the request. You cannot specify this option and the network
+ // interfaces option in the same request.
+ PrivateIpAddress *string
+
+ // The ID of the RAM disk to select. Some kernels require additional drivers at
+ // launch. Check the kernel requirements for information about whether you need to
+ // specify a RAM disk. To find kernel requirements, go to the Amazon Web Services
+ // Resource Center and search for the kernel ID. We recommend that you use PV-GRUB
+ // instead of kernels and RAM disks. For more information, see PV-GRUB
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedkernels.html)
+ // in the Amazon EC2 User Guide.
+ RamdiskId *string
+
+ // The IDs of the security groups. You can create a security group using
+ // CreateSecurityGroup
+ // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateSecurityGroup.html).
+ // If you specify a network interface, you must specify any security groups as part
+ // of the network interface.
+ SecurityGroupIds []string
+
+ // [EC2-Classic, default VPC] The names of the security groups. For a nondefault
+ // VPC, you must use security group IDs instead. If you specify a network
+ // interface, you must specify any security groups as part of the network
+ // interface. Default: Amazon EC2 uses the default security group.
+ SecurityGroups []string
+
+ // [EC2-VPC] The ID of the subnet to launch the instance into. If you specify a
+ // network interface, you must specify any subnets as part of the network
+ // interface.
+ SubnetId *string
+
+ // The tags to apply to the resources during launch. You can only tag instances and
+ // volumes on launch. The specified tags are applied to all instances or volumes
+ // that are created during launch. To tag a resource after it has been created, see
+ // CreateTags
+ // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateTags.html).
+ TagSpecifications []types.TagSpecification
+
+ // The user data to make available to the instance. For more information, see
+ // Running commands on your Linux instance at launch
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html) (Linux) and
+ // Adding User Data
+ // (https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ec2-instance-metadata.html#instancedata-add-user-data)
+ // (Windows). If you are using a command line tool, base64-encoding is performed
+ // for you, and you can load the text from a file. Otherwise, you must provide
+ // base64-encoded text. User data is limited to 16 KB.
+ UserData *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes a launch request for one or more instances, and includes owner,
+// requester, and security group information that applies to all instances in the
+// launch request.
+type RunInstancesOutput struct {
+
+ // [EC2-Classic only] The security groups.
+ Groups []types.GroupIdentifier
+
+ // The instances.
+ Instances []types.Instance
+
+ // The ID of the Amazon Web Services account that owns the reservation.
+ OwnerId *string
+
+ // The ID of the requester that launched the instances on your behalf (for example,
+ // Amazon Web Services Management Console or Auto Scaling).
+ RequesterId *string
+
+ // The ID of the reservation.
+ ReservationId *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationRunInstancesMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpRunInstances{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpRunInstances{}, 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 = addIdempotencyToken_opRunInstancesMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpRunInstancesValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRunInstances(options.Region), middleware.Before); 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
+}
+
+type idempotencyToken_initializeOpRunInstances struct {
+ tokenProvider IdempotencyTokenProvider
+}
+
+func (*idempotencyToken_initializeOpRunInstances) ID() string {
+ return "OperationIdempotencyTokenAutoFill"
+}
+
+func (m *idempotencyToken_initializeOpRunInstances) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ if m.tokenProvider == nil {
+ return next.HandleInitialize(ctx, in)
+ }
+
+ input, ok := in.Parameters.(*RunInstancesInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("expected middleware input to be of type *RunInstancesInput ")
+ }
+
+ if input.ClientToken == nil {
+ t, err := m.tokenProvider.GetIdempotencyToken()
+ if err != nil {
+ return out, metadata, err
+ }
+ input.ClientToken = &t
+ }
+ return next.HandleInitialize(ctx, in)
+}
+func addIdempotencyToken_opRunInstancesMiddleware(stack *middleware.Stack, cfg Options) error {
+ return stack.Initialize.Add(&idempotencyToken_initializeOpRunInstances{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before)
+}
+
+func newServiceMetadataMiddleware_opRunInstances(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "RunInstances",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RunScheduledInstances.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RunScheduledInstances.go
new file mode 100644
index 00000000..4941ca22
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RunScheduledInstances.go
@@ -0,0 +1,188 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Launches the specified Scheduled Instances. Before you can launch a Scheduled
+// Instance, you must purchase it and obtain an identifier using
+// PurchaseScheduledInstances. You must launch a Scheduled Instance during its
+// scheduled time period. You can't stop or reboot a Scheduled Instance, but you
+// can terminate it as needed. If you terminate a Scheduled Instance before the
+// current scheduled time period ends, you can launch it again after a few minutes.
+// For more information, see Scheduled Instances
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-scheduled-instances.html)
+// in the Amazon EC2 User Guide.
+func (c *Client) RunScheduledInstances(ctx context.Context, params *RunScheduledInstancesInput, optFns ...func(*Options)) (*RunScheduledInstancesOutput, error) {
+ if params == nil {
+ params = &RunScheduledInstancesInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "RunScheduledInstances", params, optFns, c.addOperationRunScheduledInstancesMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*RunScheduledInstancesOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+// Contains the parameters for RunScheduledInstances.
+type RunScheduledInstancesInput struct {
+
+ // The launch specification. You must match the instance type, Availability Zone,
+ // network, and platform of the schedule that you purchased.
+ //
+ // This member is required.
+ LaunchSpecification *types.ScheduledInstancesLaunchSpecification
+
+ // The Scheduled Instance ID.
+ //
+ // This member is required.
+ ScheduledInstanceId *string
+
+ // Unique, case-sensitive identifier that ensures the idempotency of the request.
+ // For more information, see Ensuring Idempotency
+ // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html).
+ ClientToken *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The number of instances. Default: 1
+ InstanceCount *int32
+
+ noSmithyDocumentSerde
+}
+
+// Contains the output of RunScheduledInstances.
+type RunScheduledInstancesOutput struct {
+
+ // The IDs of the newly launched instances.
+ InstanceIdSet []string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationRunScheduledInstancesMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpRunScheduledInstances{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpRunScheduledInstances{}, 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 = addIdempotencyToken_opRunScheduledInstancesMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpRunScheduledInstancesValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRunScheduledInstances(options.Region), middleware.Before); 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
+}
+
+type idempotencyToken_initializeOpRunScheduledInstances struct {
+ tokenProvider IdempotencyTokenProvider
+}
+
+func (*idempotencyToken_initializeOpRunScheduledInstances) ID() string {
+ return "OperationIdempotencyTokenAutoFill"
+}
+
+func (m *idempotencyToken_initializeOpRunScheduledInstances) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ if m.tokenProvider == nil {
+ return next.HandleInitialize(ctx, in)
+ }
+
+ input, ok := in.Parameters.(*RunScheduledInstancesInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("expected middleware input to be of type *RunScheduledInstancesInput ")
+ }
+
+ if input.ClientToken == nil {
+ t, err := m.tokenProvider.GetIdempotencyToken()
+ if err != nil {
+ return out, metadata, err
+ }
+ input.ClientToken = &t
+ }
+ return next.HandleInitialize(ctx, in)
+}
+func addIdempotencyToken_opRunScheduledInstancesMiddleware(stack *middleware.Stack, cfg Options) error {
+ return stack.Initialize.Add(&idempotencyToken_initializeOpRunScheduledInstances{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before)
+}
+
+func newServiceMetadataMiddleware_opRunScheduledInstances(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "RunScheduledInstances",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_SearchLocalGatewayRoutes.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_SearchLocalGatewayRoutes.go
new file mode 100644
index 00000000..49bda156
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_SearchLocalGatewayRoutes.go
@@ -0,0 +1,233 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Searches for routes in the specified local gateway route table.
+func (c *Client) SearchLocalGatewayRoutes(ctx context.Context, params *SearchLocalGatewayRoutesInput, optFns ...func(*Options)) (*SearchLocalGatewayRoutesOutput, error) {
+ if params == nil {
+ params = &SearchLocalGatewayRoutesInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "SearchLocalGatewayRoutes", params, optFns, c.addOperationSearchLocalGatewayRoutesMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*SearchLocalGatewayRoutesOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type SearchLocalGatewayRoutesInput struct {
+
+ // One or more filters.
+ //
+ // This member is required.
+ Filters []types.Filter
+
+ // The ID of the local gateway route table.
+ //
+ // This member is required.
+ LocalGatewayRouteTableId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ MaxResults *int32
+
+ // The token for the next page of results.
+ NextToken *string
+
+ noSmithyDocumentSerde
+}
+
+type SearchLocalGatewayRoutesOutput struct {
+
+ // The token to use to retrieve the next page of results. This value is null when
+ // there are no more results to return.
+ NextToken *string
+
+ // Information about the routes.
+ Routes []types.LocalGatewayRoute
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationSearchLocalGatewayRoutesMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpSearchLocalGatewayRoutes{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpSearchLocalGatewayRoutes{}, 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 = addOpSearchLocalGatewayRoutesValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSearchLocalGatewayRoutes(options.Region), middleware.Before); 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
+}
+
+// SearchLocalGatewayRoutesAPIClient is a client that implements the
+// SearchLocalGatewayRoutes operation.
+type SearchLocalGatewayRoutesAPIClient interface {
+ SearchLocalGatewayRoutes(context.Context, *SearchLocalGatewayRoutesInput, ...func(*Options)) (*SearchLocalGatewayRoutesOutput, error)
+}
+
+var _ SearchLocalGatewayRoutesAPIClient = (*Client)(nil)
+
+// SearchLocalGatewayRoutesPaginatorOptions is the paginator options for
+// SearchLocalGatewayRoutes
+type SearchLocalGatewayRoutesPaginatorOptions struct {
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ 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
+}
+
+// SearchLocalGatewayRoutesPaginator is a paginator for SearchLocalGatewayRoutes
+type SearchLocalGatewayRoutesPaginator struct {
+ options SearchLocalGatewayRoutesPaginatorOptions
+ client SearchLocalGatewayRoutesAPIClient
+ params *SearchLocalGatewayRoutesInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewSearchLocalGatewayRoutesPaginator returns a new
+// SearchLocalGatewayRoutesPaginator
+func NewSearchLocalGatewayRoutesPaginator(client SearchLocalGatewayRoutesAPIClient, params *SearchLocalGatewayRoutesInput, optFns ...func(*SearchLocalGatewayRoutesPaginatorOptions)) *SearchLocalGatewayRoutesPaginator {
+ if params == nil {
+ params = &SearchLocalGatewayRoutesInput{}
+ }
+
+ options := SearchLocalGatewayRoutesPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &SearchLocalGatewayRoutesPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *SearchLocalGatewayRoutesPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next SearchLocalGatewayRoutes page.
+func (p *SearchLocalGatewayRoutesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*SearchLocalGatewayRoutesOutput, 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.SearchLocalGatewayRoutes(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_opSearchLocalGatewayRoutes(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "SearchLocalGatewayRoutes",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_SearchTransitGatewayMulticastGroups.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_SearchTransitGatewayMulticastGroups.go
new file mode 100644
index 00000000..5c831a6d
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_SearchTransitGatewayMulticastGroups.go
@@ -0,0 +1,254 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Searches one or more transit gateway multicast groups and returns the group
+// membership information.
+func (c *Client) SearchTransitGatewayMulticastGroups(ctx context.Context, params *SearchTransitGatewayMulticastGroupsInput, optFns ...func(*Options)) (*SearchTransitGatewayMulticastGroupsOutput, error) {
+ if params == nil {
+ params = &SearchTransitGatewayMulticastGroupsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "SearchTransitGatewayMulticastGroups", params, optFns, c.addOperationSearchTransitGatewayMulticastGroupsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*SearchTransitGatewayMulticastGroupsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type SearchTransitGatewayMulticastGroupsInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // One or more filters. The possible values are:
+ //
+ // * group-ip-address - The IP
+ // address of the transit gateway multicast group.
+ //
+ // * is-group-member - The
+ // resource is a group member. Valid values are true | false.
+ //
+ // * is-group-source -
+ // The resource is a group source. Valid values are true | false.
+ //
+ // * member-type -
+ // The member type. Valid values are igmp | static.
+ //
+ // * resource-id - The ID of the
+ // resource.
+ //
+ // * resource-type - The type of resource. Valid values are vpc | vpn |
+ // direct-connect-gateway | tgw-peering.
+ //
+ // * source-type - The source type. Valid
+ // values are igmp | static.
+ //
+ // * subnet-id - The ID of the subnet.
+ //
+ // *
+ // transit-gateway-attachment-id - The id of the transit gateway attachment.
+ Filters []types.Filter
+
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ MaxResults *int32
+
+ // The token for the next page of results.
+ NextToken *string
+
+ // The ID of the transit gateway multicast domain.
+ TransitGatewayMulticastDomainId *string
+
+ noSmithyDocumentSerde
+}
+
+type SearchTransitGatewayMulticastGroupsOutput struct {
+
+ // Information about the transit gateway multicast group.
+ MulticastGroups []types.TransitGatewayMulticastGroup
+
+ // The token to use to retrieve the next page of results. This value is null when
+ // there are no more results to return.
+ NextToken *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationSearchTransitGatewayMulticastGroupsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpSearchTransitGatewayMulticastGroups{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpSearchTransitGatewayMulticastGroups{}, 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_opSearchTransitGatewayMulticastGroups(options.Region), middleware.Before); 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
+}
+
+// SearchTransitGatewayMulticastGroupsAPIClient is a client that implements the
+// SearchTransitGatewayMulticastGroups operation.
+type SearchTransitGatewayMulticastGroupsAPIClient interface {
+ SearchTransitGatewayMulticastGroups(context.Context, *SearchTransitGatewayMulticastGroupsInput, ...func(*Options)) (*SearchTransitGatewayMulticastGroupsOutput, error)
+}
+
+var _ SearchTransitGatewayMulticastGroupsAPIClient = (*Client)(nil)
+
+// SearchTransitGatewayMulticastGroupsPaginatorOptions is the paginator options for
+// SearchTransitGatewayMulticastGroups
+type SearchTransitGatewayMulticastGroupsPaginatorOptions struct {
+ // The maximum number of results to return with a single call. To retrieve the
+ // remaining results, make another call with the returned nextToken value.
+ 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
+}
+
+// SearchTransitGatewayMulticastGroupsPaginator is a paginator for
+// SearchTransitGatewayMulticastGroups
+type SearchTransitGatewayMulticastGroupsPaginator struct {
+ options SearchTransitGatewayMulticastGroupsPaginatorOptions
+ client SearchTransitGatewayMulticastGroupsAPIClient
+ params *SearchTransitGatewayMulticastGroupsInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewSearchTransitGatewayMulticastGroupsPaginator returns a new
+// SearchTransitGatewayMulticastGroupsPaginator
+func NewSearchTransitGatewayMulticastGroupsPaginator(client SearchTransitGatewayMulticastGroupsAPIClient, params *SearchTransitGatewayMulticastGroupsInput, optFns ...func(*SearchTransitGatewayMulticastGroupsPaginatorOptions)) *SearchTransitGatewayMulticastGroupsPaginator {
+ if params == nil {
+ params = &SearchTransitGatewayMulticastGroupsInput{}
+ }
+
+ options := SearchTransitGatewayMulticastGroupsPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &SearchTransitGatewayMulticastGroupsPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *SearchTransitGatewayMulticastGroupsPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next SearchTransitGatewayMulticastGroups page.
+func (p *SearchTransitGatewayMulticastGroupsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*SearchTransitGatewayMulticastGroupsOutput, 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.SearchTransitGatewayMulticastGroups(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_opSearchTransitGatewayMulticastGroups(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "SearchTransitGatewayMulticastGroups",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_SearchTransitGatewayRoutes.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_SearchTransitGatewayRoutes.go
new file mode 100644
index 00000000..7f6226e1
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_SearchTransitGatewayRoutes.go
@@ -0,0 +1,171 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Searches for routes in the specified transit gateway route table.
+func (c *Client) SearchTransitGatewayRoutes(ctx context.Context, params *SearchTransitGatewayRoutesInput, optFns ...func(*Options)) (*SearchTransitGatewayRoutesOutput, error) {
+ if params == nil {
+ params = &SearchTransitGatewayRoutesInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "SearchTransitGatewayRoutes", params, optFns, c.addOperationSearchTransitGatewayRoutesMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*SearchTransitGatewayRoutesOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type SearchTransitGatewayRoutesInput struct {
+
+ // One or more filters. The possible values are:
+ //
+ // *
+ // attachment.transit-gateway-attachment-id- The id of the transit gateway
+ // attachment.
+ //
+ // * attachment.resource-id - The resource id of the transit gateway
+ // attachment.
+ //
+ // * attachment.resource-type - The attachment resource type. Valid
+ // values are vpc | vpn | direct-connect-gateway | peering | connect.
+ //
+ // *
+ // prefix-list-id - The ID of the prefix list.
+ //
+ // * route-search.exact-match - The
+ // exact match of the specified filter.
+ //
+ // * route-search.longest-prefix-match - The
+ // longest prefix that matches the route.
+ //
+ // * route-search.subnet-of-match - The
+ // routes with a subnet that match the specified CIDR filter.
+ //
+ // *
+ // route-search.supernet-of-match - The routes with a CIDR that encompass the CIDR
+ // filter. For example, if you have 10.0.1.0/29 and 10.0.1.0/31 routes in your
+ // route table and you specify supernet-of-match as 10.0.1.0/30, then the result
+ // returns 10.0.1.0/29.
+ //
+ // * state - The state of the route (active | blackhole).
+ //
+ // *
+ // type - The type of route (propagated | static).
+ //
+ // This member is required.
+ Filters []types.Filter
+
+ // The ID of the transit gateway route table.
+ //
+ // This member is required.
+ TransitGatewayRouteTableId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The maximum number of routes to return.
+ MaxResults *int32
+
+ noSmithyDocumentSerde
+}
+
+type SearchTransitGatewayRoutesOutput struct {
+
+ // Indicates whether there are additional routes available.
+ AdditionalRoutesAvailable *bool
+
+ // Information about the routes.
+ Routes []types.TransitGatewayRoute
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationSearchTransitGatewayRoutesMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpSearchTransitGatewayRoutes{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpSearchTransitGatewayRoutes{}, 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 = addOpSearchTransitGatewayRoutesValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSearchTransitGatewayRoutes(options.Region), middleware.Before); 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_opSearchTransitGatewayRoutes(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "SearchTransitGatewayRoutes",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_SendDiagnosticInterrupt.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_SendDiagnosticInterrupt.go
new file mode 100644
index 00000000..2cd866ce
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_SendDiagnosticInterrupt.go
@@ -0,0 +1,136 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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"
+)
+
+// Sends a diagnostic interrupt to the specified Amazon EC2 instance to trigger a
+// kernel panic (on Linux instances), or a blue screen/stop error (on Windows
+// instances). For instances based on Intel and AMD processors, the interrupt is
+// received as a non-maskable interrupt (NMI). In general, the operating system
+// crashes and reboots when a kernel panic or stop error is triggered. The
+// operating system can also be configured to perform diagnostic tasks, such as
+// generating a memory dump file, loading a secondary kernel, or obtaining a call
+// trace. Before sending a diagnostic interrupt to your instance, ensure that its
+// operating system is configured to perform the required diagnostic tasks. For
+// more information about configuring your operating system to generate a crash
+// dump when a kernel panic or stop error occurs, see Send a diagnostic interrupt
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/diagnostic-interrupt.html)
+// (Linux instances) or Send a Diagnostic Interrupt
+// (https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/diagnostic-interrupt.html)
+// (Windows instances).
+func (c *Client) SendDiagnosticInterrupt(ctx context.Context, params *SendDiagnosticInterruptInput, optFns ...func(*Options)) (*SendDiagnosticInterruptOutput, error) {
+ if params == nil {
+ params = &SendDiagnosticInterruptInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "SendDiagnosticInterrupt", params, optFns, c.addOperationSendDiagnosticInterruptMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*SendDiagnosticInterruptOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type SendDiagnosticInterruptInput struct {
+
+ // The ID of the instance.
+ //
+ // This member is required.
+ InstanceId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type SendDiagnosticInterruptOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationSendDiagnosticInterruptMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpSendDiagnosticInterrupt{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpSendDiagnosticInterrupt{}, 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 = addOpSendDiagnosticInterruptValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSendDiagnosticInterrupt(options.Region), middleware.Before); 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_opSendDiagnosticInterrupt(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "SendDiagnosticInterrupt",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_StartInstances.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_StartInstances.go
new file mode 100644
index 00000000..926563e6
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_StartInstances.go
@@ -0,0 +1,147 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Starts an Amazon EBS-backed instance that you've previously stopped. Instances
+// that use Amazon EBS volumes as their root devices can be quickly stopped and
+// started. When an instance is stopped, the compute resources are released and you
+// are not billed for instance usage. However, your root partition Amazon EBS
+// volume remains and continues to persist your data, and you are charged for
+// Amazon EBS volume usage. You can restart your instance at any time. Every time
+// you start your instance, Amazon EC2 charges a one-minute minimum for instance
+// usage, and thereafter charges per second for instance usage. Before stopping an
+// instance, make sure it is in a state from which it can be restarted. Stopping an
+// instance does not preserve data stored in RAM. Performing this operation on an
+// instance that uses an instance store as its root device returns an error. If you
+// attempt to start a T3 instance with host tenancy and the unlimted CPU credit
+// option, the request fails. The unlimited CPU credit option is not supported on
+// Dedicated Hosts. Before you start the instance, either change its CPU credit
+// option to standard, or change its tenancy to default or dedicated. For more
+// information, see Stopping instances
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Stop_Start.html) in the
+// Amazon EC2 User Guide.
+func (c *Client) StartInstances(ctx context.Context, params *StartInstancesInput, optFns ...func(*Options)) (*StartInstancesOutput, error) {
+ if params == nil {
+ params = &StartInstancesInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "StartInstances", params, optFns, c.addOperationStartInstancesMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*StartInstancesOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type StartInstancesInput struct {
+
+ // The IDs of the instances.
+ //
+ // This member is required.
+ InstanceIds []string
+
+ // Reserved.
+ AdditionalInfo *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type StartInstancesOutput struct {
+
+ // Information about the started instances.
+ StartingInstances []types.InstanceStateChange
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationStartInstancesMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpStartInstances{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpStartInstances{}, 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 = addOpStartInstancesValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStartInstances(options.Region), middleware.Before); 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_opStartInstances(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "StartInstances",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_StartNetworkInsightsAnalysis.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_StartNetworkInsightsAnalysis.go
new file mode 100644
index 00000000..0c5e2466
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_StartNetworkInsightsAnalysis.go
@@ -0,0 +1,178 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Starts analyzing the specified path. If the path is reachable, the operation
+// returns the shortest feasible path.
+func (c *Client) StartNetworkInsightsAnalysis(ctx context.Context, params *StartNetworkInsightsAnalysisInput, optFns ...func(*Options)) (*StartNetworkInsightsAnalysisOutput, error) {
+ if params == nil {
+ params = &StartNetworkInsightsAnalysisInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "StartNetworkInsightsAnalysis", params, optFns, c.addOperationStartNetworkInsightsAnalysisMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*StartNetworkInsightsAnalysisOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type StartNetworkInsightsAnalysisInput struct {
+
+ // Unique, case-sensitive identifier that you provide to ensure the idempotency of
+ // the request. For more information, see How to ensure idempotency
+ // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html).
+ //
+ // This member is required.
+ ClientToken *string
+
+ // The ID of the path.
+ //
+ // This member is required.
+ NetworkInsightsPathId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The Amazon Resource Names (ARN) of the resources that the path must traverse.
+ FilterInArns []string
+
+ // The tags to apply.
+ TagSpecifications []types.TagSpecification
+
+ noSmithyDocumentSerde
+}
+
+type StartNetworkInsightsAnalysisOutput struct {
+
+ // Information about the network insights analysis.
+ NetworkInsightsAnalysis *types.NetworkInsightsAnalysis
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationStartNetworkInsightsAnalysisMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpStartNetworkInsightsAnalysis{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpStartNetworkInsightsAnalysis{}, 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 = addIdempotencyToken_opStartNetworkInsightsAnalysisMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpStartNetworkInsightsAnalysisValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStartNetworkInsightsAnalysis(options.Region), middleware.Before); 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
+}
+
+type idempotencyToken_initializeOpStartNetworkInsightsAnalysis struct {
+ tokenProvider IdempotencyTokenProvider
+}
+
+func (*idempotencyToken_initializeOpStartNetworkInsightsAnalysis) ID() string {
+ return "OperationIdempotencyTokenAutoFill"
+}
+
+func (m *idempotencyToken_initializeOpStartNetworkInsightsAnalysis) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ if m.tokenProvider == nil {
+ return next.HandleInitialize(ctx, in)
+ }
+
+ input, ok := in.Parameters.(*StartNetworkInsightsAnalysisInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("expected middleware input to be of type *StartNetworkInsightsAnalysisInput ")
+ }
+
+ if input.ClientToken == nil {
+ t, err := m.tokenProvider.GetIdempotencyToken()
+ if err != nil {
+ return out, metadata, err
+ }
+ input.ClientToken = &t
+ }
+ return next.HandleInitialize(ctx, in)
+}
+func addIdempotencyToken_opStartNetworkInsightsAnalysisMiddleware(stack *middleware.Stack, cfg Options) error {
+ return stack.Initialize.Add(&idempotencyToken_initializeOpStartNetworkInsightsAnalysis{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before)
+}
+
+func newServiceMetadataMiddleware_opStartNetworkInsightsAnalysis(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "StartNetworkInsightsAnalysis",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_StartVpcEndpointServicePrivateDnsVerification.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_StartVpcEndpointServicePrivateDnsVerification.go
new file mode 100644
index 00000000..4fb9984a
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_StartVpcEndpointServicePrivateDnsVerification.go
@@ -0,0 +1,133 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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"
+)
+
+// Initiates the verification process to prove that the service provider owns the
+// private DNS name domain for the endpoint service. The service provider must
+// successfully perform the verification before the consumer can use the name to
+// access the service. Before the service provider runs this command, they must add
+// a record to the DNS server. For more information, see Adding a TXT Record to
+// Your Domain's DNS Server
+// (https://docs.aws.amazon.com/vpc/latest/userguide/endpoint-services-dns-validation.html#add-dns-txt-record)
+// in the Amazon VPC User Guide.
+func (c *Client) StartVpcEndpointServicePrivateDnsVerification(ctx context.Context, params *StartVpcEndpointServicePrivateDnsVerificationInput, optFns ...func(*Options)) (*StartVpcEndpointServicePrivateDnsVerificationOutput, error) {
+ if params == nil {
+ params = &StartVpcEndpointServicePrivateDnsVerificationInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "StartVpcEndpointServicePrivateDnsVerification", params, optFns, c.addOperationStartVpcEndpointServicePrivateDnsVerificationMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*StartVpcEndpointServicePrivateDnsVerificationOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type StartVpcEndpointServicePrivateDnsVerificationInput struct {
+
+ // The ID of the endpoint service.
+ //
+ // This member is required.
+ ServiceId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type StartVpcEndpointServicePrivateDnsVerificationOutput struct {
+
+ // Returns true if the request succeeds; otherwise, it returns an error.
+ ReturnValue *bool
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationStartVpcEndpointServicePrivateDnsVerificationMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpStartVpcEndpointServicePrivateDnsVerification{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpStartVpcEndpointServicePrivateDnsVerification{}, 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 = addOpStartVpcEndpointServicePrivateDnsVerificationValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStartVpcEndpointServicePrivateDnsVerification(options.Region), middleware.Before); 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_opStartVpcEndpointServicePrivateDnsVerification(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "StartVpcEndpointServicePrivateDnsVerification",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_StopInstances.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_StopInstances.go
new file mode 100644
index 00000000..8c164442
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_StopInstances.go
@@ -0,0 +1,175 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Stops an Amazon EBS-backed instance. You can use the Stop action to hibernate an
+// instance if the instance is enabled for hibernation
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html#enabling-hibernation)
+// and it meets the hibernation prerequisites
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html#hibernating-prerequisites).
+// For more information, see Hibernate your instance
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html) in the
+// Amazon EC2 User Guide. We don't charge usage for a stopped instance, or data
+// transfer fees; however, your root partition Amazon EBS volume remains and
+// continues to persist your data, and you are charged for Amazon EBS volume usage.
+// Every time you start your instance, Amazon EC2 charges a one-minute minimum for
+// instance usage, and thereafter charges per second for instance usage. You can't
+// stop or hibernate instance store-backed instances. You can't use the Stop action
+// to hibernate Spot Instances, but you can specify that Amazon EC2 should
+// hibernate Spot Instances when they are interrupted. For more information, see
+// Hibernating interrupted Spot Instances
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-interruptions.html#hibernate-spot-instances)
+// in the Amazon EC2 User Guide. When you stop or hibernate an instance, we shut it
+// down. You can restart your instance at any time. Before stopping or hibernating
+// an instance, make sure it is in a state from which it can be restarted. Stopping
+// an instance does not preserve data stored in RAM, but hibernating an instance
+// does preserve data stored in RAM. If an instance cannot hibernate successfully,
+// a normal shutdown occurs. Stopping and hibernating an instance is different to
+// rebooting or terminating it. For example, when you stop or hibernate an
+// instance, the root device and any other devices attached to the instance
+// persist. When you terminate an instance, the root device and any other devices
+// attached during the instance launch are automatically deleted. For more
+// information about the differences between rebooting, stopping, hibernating, and
+// terminating instances, see Instance lifecycle
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-lifecycle.html)
+// in the Amazon EC2 User Guide. When you stop an instance, we attempt to shut it
+// down forcibly after a short while. If your instance appears stuck in the
+// stopping state after a period of time, there may be an issue with the underlying
+// host computer. For more information, see Troubleshooting stopping your instance
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/TroubleshootingInstancesStopping.html)
+// in the Amazon EC2 User Guide.
+func (c *Client) StopInstances(ctx context.Context, params *StopInstancesInput, optFns ...func(*Options)) (*StopInstancesOutput, error) {
+ if params == nil {
+ params = &StopInstancesInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "StopInstances", params, optFns, c.addOperationStopInstancesMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*StopInstancesOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type StopInstancesInput struct {
+
+ // The IDs of the instances.
+ //
+ // This member is required.
+ InstanceIds []string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // Forces the instances to stop. The instances do not have an opportunity to flush
+ // file system caches or file system metadata. If you use this option, you must
+ // perform file system check and repair procedures. This option is not recommended
+ // for Windows instances. Default: false
+ Force *bool
+
+ // Hibernates the instance if the instance was enabled for hibernation at launch.
+ // If the instance cannot hibernate successfully, a normal shutdown occurs. For
+ // more information, see Hibernate your instance
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html) in the
+ // Amazon EC2 User Guide. Default: false
+ Hibernate *bool
+
+ noSmithyDocumentSerde
+}
+
+type StopInstancesOutput struct {
+
+ // Information about the stopped instances.
+ StoppingInstances []types.InstanceStateChange
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationStopInstancesMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpStopInstances{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpStopInstances{}, 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 = addOpStopInstancesValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStopInstances(options.Region), middleware.Before); 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_opStopInstances(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "StopInstances",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_TerminateClientVpnConnections.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_TerminateClientVpnConnections.go
new file mode 100644
index 00000000..e79d0225
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_TerminateClientVpnConnections.go
@@ -0,0 +1,143 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Terminates active Client VPN endpoint connections. This action can be used to
+// terminate a specific client connection, or up to five connections established by
+// a specific user.
+func (c *Client) TerminateClientVpnConnections(ctx context.Context, params *TerminateClientVpnConnectionsInput, optFns ...func(*Options)) (*TerminateClientVpnConnectionsOutput, error) {
+ if params == nil {
+ params = &TerminateClientVpnConnectionsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "TerminateClientVpnConnections", params, optFns, c.addOperationTerminateClientVpnConnectionsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*TerminateClientVpnConnectionsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type TerminateClientVpnConnectionsInput struct {
+
+ // The ID of the Client VPN endpoint to which the client is connected.
+ //
+ // This member is required.
+ ClientVpnEndpointId *string
+
+ // The ID of the client connection to be terminated.
+ ConnectionId *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The name of the user who initiated the connection. Use this option to terminate
+ // all active connections for the specified user. This option can only be used if
+ // the user has established up to five connections.
+ Username *string
+
+ noSmithyDocumentSerde
+}
+
+type TerminateClientVpnConnectionsOutput struct {
+
+ // The ID of the Client VPN endpoint.
+ ClientVpnEndpointId *string
+
+ // The current state of the client connections.
+ ConnectionStatuses []types.TerminateConnectionStatus
+
+ // The user who established the terminated client connections.
+ Username *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationTerminateClientVpnConnectionsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpTerminateClientVpnConnections{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpTerminateClientVpnConnections{}, 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 = addOpTerminateClientVpnConnectionsValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opTerminateClientVpnConnections(options.Region), middleware.Before); 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_opTerminateClientVpnConnections(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "TerminateClientVpnConnections",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_TerminateInstances.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_TerminateInstances.go
new file mode 100644
index 00000000..4807b76a
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_TerminateInstances.go
@@ -0,0 +1,183 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Shuts down the specified instances. This operation is idempotent; if you
+// terminate an instance more than once, each call succeeds. If you specify
+// multiple instances and the request fails (for example, because of a single
+// incorrect instance ID), none of the instances are terminated. If you terminate
+// multiple instances across multiple Availability Zones, and one or more of the
+// specified instances are enabled for termination protection, the request fails
+// with the following results:
+//
+// * The specified instances that are in the same
+// Availability Zone as the protected instance are not terminated.
+//
+// * The specified
+// instances that are in different Availability Zones, where no other specified
+// instances are protected, are successfully terminated.
+//
+// For example, say you have
+// the following instances:
+//
+// * Instance A: us-east-1a; Not protected
+//
+// * Instance B:
+// us-east-1a; Not protected
+//
+// * Instance C: us-east-1b; Protected
+//
+// * Instance D:
+// us-east-1b; not protected
+//
+// If you attempt to terminate all of these instances in
+// the same request, the request reports failure with the following results:
+//
+// *
+// Instance A and Instance B are successfully terminated because none of the
+// specified instances in us-east-1a are enabled for termination protection.
+//
+// *
+// Instance C and Instance D fail to terminate because at least one of the
+// specified instances in us-east-1b (Instance C) is enabled for termination
+// protection.
+//
+// Terminated instances remain visible after termination (for
+// approximately one hour). By default, Amazon EC2 deletes all EBS volumes that
+// were attached when the instance launched. Volumes attached after instance launch
+// continue running. You can stop, start, and terminate EBS-backed instances. You
+// can only terminate instance store-backed instances. What happens to an instance
+// differs if you stop it or terminate it. For example, when you stop an instance,
+// the root device and any other devices attached to the instance persist. When you
+// terminate an instance, any attached EBS volumes with the DeleteOnTermination
+// block device mapping parameter set to true are automatically deleted. For more
+// information about the differences between stopping and terminating instances,
+// see Instance lifecycle
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-lifecycle.html)
+// in the Amazon EC2 User Guide. For more information about troubleshooting, see
+// Troubleshooting terminating your instance
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/TroubleshootingInstancesShuttingDown.html)
+// in the Amazon EC2 User Guide.
+func (c *Client) TerminateInstances(ctx context.Context, params *TerminateInstancesInput, optFns ...func(*Options)) (*TerminateInstancesOutput, error) {
+ if params == nil {
+ params = &TerminateInstancesInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "TerminateInstances", params, optFns, c.addOperationTerminateInstancesMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*TerminateInstancesOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type TerminateInstancesInput struct {
+
+ // The IDs of the instances. Constraints: Up to 1000 instance IDs. We recommend
+ // breaking up this request into smaller batches.
+ //
+ // This member is required.
+ InstanceIds []string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type TerminateInstancesOutput struct {
+
+ // Information about the terminated instances.
+ TerminatingInstances []types.InstanceStateChange
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationTerminateInstancesMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpTerminateInstances{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpTerminateInstances{}, 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 = addOpTerminateInstancesValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opTerminateInstances(options.Region), middleware.Before); 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_opTerminateInstances(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "TerminateInstances",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_UnassignIpv6Addresses.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_UnassignIpv6Addresses.go
new file mode 100644
index 00000000..b88be012
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_UnassignIpv6Addresses.go
@@ -0,0 +1,133 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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"
+)
+
+// Unassigns one or more IPv6 addresses IPv4 Prefix Delegation prefixes from a
+// network interface.
+func (c *Client) UnassignIpv6Addresses(ctx context.Context, params *UnassignIpv6AddressesInput, optFns ...func(*Options)) (*UnassignIpv6AddressesOutput, error) {
+ if params == nil {
+ params = &UnassignIpv6AddressesInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "UnassignIpv6Addresses", params, optFns, c.addOperationUnassignIpv6AddressesMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*UnassignIpv6AddressesOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type UnassignIpv6AddressesInput struct {
+
+ // The ID of the network interface.
+ //
+ // This member is required.
+ NetworkInterfaceId *string
+
+ // The IPv6 addresses to unassign from the network interface.
+ Ipv6Addresses []string
+
+ // One or more IPv6 prefixes to unassign from the network interface.
+ Ipv6Prefixes []string
+
+ noSmithyDocumentSerde
+}
+
+type UnassignIpv6AddressesOutput struct {
+
+ // The ID of the network interface.
+ NetworkInterfaceId *string
+
+ // The IPv6 addresses that have been unassigned from the network interface.
+ UnassignedIpv6Addresses []string
+
+ // The IPv4 prefixes that have been unassigned from the network interface.
+ UnassignedIpv6Prefixes []string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationUnassignIpv6AddressesMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpUnassignIpv6Addresses{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpUnassignIpv6Addresses{}, 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 = addOpUnassignIpv6AddressesValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUnassignIpv6Addresses(options.Region), middleware.Before); 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_opUnassignIpv6Addresses(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "UnassignIpv6Addresses",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_UnassignPrivateIpAddresses.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_UnassignPrivateIpAddresses.go
new file mode 100644
index 00000000..35495754
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_UnassignPrivateIpAddresses.go
@@ -0,0 +1,125 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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"
+)
+
+// Unassigns one or more secondary private IP addresses, or IPv4 Prefix Delegation
+// prefixes from a network interface.
+func (c *Client) UnassignPrivateIpAddresses(ctx context.Context, params *UnassignPrivateIpAddressesInput, optFns ...func(*Options)) (*UnassignPrivateIpAddressesOutput, error) {
+ if params == nil {
+ params = &UnassignPrivateIpAddressesInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "UnassignPrivateIpAddresses", params, optFns, c.addOperationUnassignPrivateIpAddressesMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*UnassignPrivateIpAddressesOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+// Contains the parameters for UnassignPrivateIpAddresses.
+type UnassignPrivateIpAddressesInput struct {
+
+ // The ID of the network interface.
+ //
+ // This member is required.
+ NetworkInterfaceId *string
+
+ // The IPv4 prefixes to unassign from the network interface.
+ Ipv4Prefixes []string
+
+ // The secondary private IP addresses to unassign from the network interface. You
+ // can specify this option multiple times to unassign more than one IP address.
+ PrivateIpAddresses []string
+
+ noSmithyDocumentSerde
+}
+
+type UnassignPrivateIpAddressesOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationUnassignPrivateIpAddressesMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpUnassignPrivateIpAddresses{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpUnassignPrivateIpAddresses{}, 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 = addOpUnassignPrivateIpAddressesValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUnassignPrivateIpAddresses(options.Region), middleware.Before); 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_opUnassignPrivateIpAddresses(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "UnassignPrivateIpAddresses",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_UnmonitorInstances.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_UnmonitorInstances.go
new file mode 100644
index 00000000..77e3a706
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_UnmonitorInstances.go
@@ -0,0 +1,130 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Disables detailed monitoring for a running instance. For more information, see
+// Monitoring your instances and volumes
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-cloudwatch.html) in
+// the Amazon EC2 User Guide.
+func (c *Client) UnmonitorInstances(ctx context.Context, params *UnmonitorInstancesInput, optFns ...func(*Options)) (*UnmonitorInstancesOutput, error) {
+ if params == nil {
+ params = &UnmonitorInstancesInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "UnmonitorInstances", params, optFns, c.addOperationUnmonitorInstancesMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*UnmonitorInstancesOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type UnmonitorInstancesInput struct {
+
+ // The IDs of the instances.
+ //
+ // This member is required.
+ InstanceIds []string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type UnmonitorInstancesOutput struct {
+
+ // The monitoring information.
+ InstanceMonitorings []types.InstanceMonitoring
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationUnmonitorInstancesMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpUnmonitorInstances{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpUnmonitorInstances{}, 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 = addOpUnmonitorInstancesValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUnmonitorInstances(options.Region), middleware.Before); 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_opUnmonitorInstances(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "UnmonitorInstances",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_UpdateSecurityGroupRuleDescriptionsEgress.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_UpdateSecurityGroupRuleDescriptionsEgress.go
new file mode 100644
index 00000000..044463cd
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_UpdateSecurityGroupRuleDescriptionsEgress.go
@@ -0,0 +1,139 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// [VPC only] Updates the description of an egress (outbound) security group rule.
+// You can replace an existing description, or add a description to a rule that did
+// not have one previously. You can remove a description for a security group rule
+// by omitting the description parameter in the request.
+func (c *Client) UpdateSecurityGroupRuleDescriptionsEgress(ctx context.Context, params *UpdateSecurityGroupRuleDescriptionsEgressInput, optFns ...func(*Options)) (*UpdateSecurityGroupRuleDescriptionsEgressOutput, error) {
+ if params == nil {
+ params = &UpdateSecurityGroupRuleDescriptionsEgressInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "UpdateSecurityGroupRuleDescriptionsEgress", params, optFns, c.addOperationUpdateSecurityGroupRuleDescriptionsEgressMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*UpdateSecurityGroupRuleDescriptionsEgressOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type UpdateSecurityGroupRuleDescriptionsEgressInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The ID of the security group. You must specify either the security group ID or
+ // the security group name in the request. For security groups in a nondefault VPC,
+ // you must specify the security group ID.
+ GroupId *string
+
+ // [Default VPC] The name of the security group. You must specify either the
+ // security group ID or the security group name in the request.
+ GroupName *string
+
+ // The IP permissions for the security group rule. You must specify either the IP
+ // permissions or the description.
+ IpPermissions []types.IpPermission
+
+ // The description for the egress security group rules. You must specify either the
+ // description or the IP permissions.
+ SecurityGroupRuleDescriptions []types.SecurityGroupRuleDescription
+
+ noSmithyDocumentSerde
+}
+
+type UpdateSecurityGroupRuleDescriptionsEgressOutput struct {
+
+ // Returns true if the request succeeds; otherwise, returns an error.
+ Return *bool
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationUpdateSecurityGroupRuleDescriptionsEgressMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpUpdateSecurityGroupRuleDescriptionsEgress{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpUpdateSecurityGroupRuleDescriptionsEgress{}, 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_opUpdateSecurityGroupRuleDescriptionsEgress(options.Region), middleware.Before); 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_opUpdateSecurityGroupRuleDescriptionsEgress(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "UpdateSecurityGroupRuleDescriptionsEgress",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_UpdateSecurityGroupRuleDescriptionsIngress.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_UpdateSecurityGroupRuleDescriptionsIngress.go
new file mode 100644
index 00000000..b1d55491
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_UpdateSecurityGroupRuleDescriptionsIngress.go
@@ -0,0 +1,139 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Updates the description of an ingress (inbound) security group rule. You can
+// replace an existing description, or add a description to a rule that did not
+// have one previously. You can remove a description for a security group rule by
+// omitting the description parameter in the request.
+func (c *Client) UpdateSecurityGroupRuleDescriptionsIngress(ctx context.Context, params *UpdateSecurityGroupRuleDescriptionsIngressInput, optFns ...func(*Options)) (*UpdateSecurityGroupRuleDescriptionsIngressOutput, error) {
+ if params == nil {
+ params = &UpdateSecurityGroupRuleDescriptionsIngressInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "UpdateSecurityGroupRuleDescriptionsIngress", params, optFns, c.addOperationUpdateSecurityGroupRuleDescriptionsIngressMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*UpdateSecurityGroupRuleDescriptionsIngressOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type UpdateSecurityGroupRuleDescriptionsIngressInput struct {
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ // The ID of the security group. You must specify either the security group ID or
+ // the security group name in the request. For security groups in a nondefault VPC,
+ // you must specify the security group ID.
+ GroupId *string
+
+ // [EC2-Classic, default VPC] The name of the security group. You must specify
+ // either the security group ID or the security group name in the request.
+ GroupName *string
+
+ // The IP permissions for the security group rule. You must specify either IP
+ // permissions or a description.
+ IpPermissions []types.IpPermission
+
+ // [VPC only] The description for the ingress security group rules. You must
+ // specify either a description or IP permissions.
+ SecurityGroupRuleDescriptions []types.SecurityGroupRuleDescription
+
+ noSmithyDocumentSerde
+}
+
+type UpdateSecurityGroupRuleDescriptionsIngressOutput struct {
+
+ // Returns true if the request succeeds; otherwise, returns an error.
+ Return *bool
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationUpdateSecurityGroupRuleDescriptionsIngressMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpUpdateSecurityGroupRuleDescriptionsIngress{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpUpdateSecurityGroupRuleDescriptionsIngress{}, 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_opUpdateSecurityGroupRuleDescriptionsIngress(options.Region), middleware.Before); 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_opUpdateSecurityGroupRuleDescriptionsIngress(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "UpdateSecurityGroupRuleDescriptionsIngress",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_WithdrawByoipCidr.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_WithdrawByoipCidr.go
new file mode 100644
index 00000000..998d948e
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_WithdrawByoipCidr.go
@@ -0,0 +1,131 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Stops advertising an address range that is provisioned as an address pool. You
+// can perform this operation at most once every 10 seconds, even if you specify
+// different address ranges each time. It can take a few minutes before traffic to
+// the specified addresses stops routing to Amazon Web Services because of BGP
+// propagation delays.
+func (c *Client) WithdrawByoipCidr(ctx context.Context, params *WithdrawByoipCidrInput, optFns ...func(*Options)) (*WithdrawByoipCidrOutput, error) {
+ if params == nil {
+ params = &WithdrawByoipCidrInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "WithdrawByoipCidr", params, optFns, c.addOperationWithdrawByoipCidrMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*WithdrawByoipCidrOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type WithdrawByoipCidrInput struct {
+
+ // The address range, in CIDR notation.
+ //
+ // This member is required.
+ Cidr *string
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have the
+ // required permissions, the error response is DryRunOperation. Otherwise, it is
+ // UnauthorizedOperation.
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type WithdrawByoipCidrOutput struct {
+
+ // Information about the address pool.
+ ByoipCidr *types.ByoipCidr
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationWithdrawByoipCidrMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsEc2query_serializeOpWithdrawByoipCidr{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsEc2query_deserializeOpWithdrawByoipCidr{}, 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 = addOpWithdrawByoipCidrValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opWithdrawByoipCidr(options.Region), middleware.Before); 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_opWithdrawByoipCidr(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "ec2",
+ OperationName: "WithdrawByoipCidr",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/deserializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/deserializers.go
new file mode 100644
index 00000000..1cc37cbe
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/deserializers.go
@@ -0,0 +1,127380 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+import (
+ "bytes"
+ "context"
+ "encoding/base64"
+ "encoding/xml"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/protocol/ec2query"
+ "github.com/aws/aws-sdk-go-v2/service/ec2/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"
+ "io/ioutil"
+ "strconv"
+ "strings"
+)
+
+type awsEc2query_deserializeOpAcceptReservedInstancesExchangeQuote struct {
+}
+
+func (*awsEc2query_deserializeOpAcceptReservedInstancesExchangeQuote) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpAcceptReservedInstancesExchangeQuote) 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, awsEc2query_deserializeOpErrorAcceptReservedInstancesExchangeQuote(response, &metadata)
+ }
+ output := &AcceptReservedInstancesExchangeQuoteOutput{}
+ 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 = awsEc2query_deserializeOpDocumentAcceptReservedInstancesExchangeQuoteOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorAcceptReservedInstancesExchangeQuote(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpAcceptTransitGatewayMulticastDomainAssociations struct {
+}
+
+func (*awsEc2query_deserializeOpAcceptTransitGatewayMulticastDomainAssociations) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpAcceptTransitGatewayMulticastDomainAssociations) 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, awsEc2query_deserializeOpErrorAcceptTransitGatewayMulticastDomainAssociations(response, &metadata)
+ }
+ output := &AcceptTransitGatewayMulticastDomainAssociationsOutput{}
+ 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 = awsEc2query_deserializeOpDocumentAcceptTransitGatewayMulticastDomainAssociationsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorAcceptTransitGatewayMulticastDomainAssociations(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpAcceptTransitGatewayPeeringAttachment struct {
+}
+
+func (*awsEc2query_deserializeOpAcceptTransitGatewayPeeringAttachment) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpAcceptTransitGatewayPeeringAttachment) 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, awsEc2query_deserializeOpErrorAcceptTransitGatewayPeeringAttachment(response, &metadata)
+ }
+ output := &AcceptTransitGatewayPeeringAttachmentOutput{}
+ 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 = awsEc2query_deserializeOpDocumentAcceptTransitGatewayPeeringAttachmentOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorAcceptTransitGatewayPeeringAttachment(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpAcceptTransitGatewayVpcAttachment struct {
+}
+
+func (*awsEc2query_deserializeOpAcceptTransitGatewayVpcAttachment) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpAcceptTransitGatewayVpcAttachment) 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, awsEc2query_deserializeOpErrorAcceptTransitGatewayVpcAttachment(response, &metadata)
+ }
+ output := &AcceptTransitGatewayVpcAttachmentOutput{}
+ 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 = awsEc2query_deserializeOpDocumentAcceptTransitGatewayVpcAttachmentOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorAcceptTransitGatewayVpcAttachment(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpAcceptVpcEndpointConnections struct {
+}
+
+func (*awsEc2query_deserializeOpAcceptVpcEndpointConnections) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpAcceptVpcEndpointConnections) 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, awsEc2query_deserializeOpErrorAcceptVpcEndpointConnections(response, &metadata)
+ }
+ output := &AcceptVpcEndpointConnectionsOutput{}
+ 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 = awsEc2query_deserializeOpDocumentAcceptVpcEndpointConnectionsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorAcceptVpcEndpointConnections(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpAcceptVpcPeeringConnection struct {
+}
+
+func (*awsEc2query_deserializeOpAcceptVpcPeeringConnection) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpAcceptVpcPeeringConnection) 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, awsEc2query_deserializeOpErrorAcceptVpcPeeringConnection(response, &metadata)
+ }
+ output := &AcceptVpcPeeringConnectionOutput{}
+ 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 = awsEc2query_deserializeOpDocumentAcceptVpcPeeringConnectionOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorAcceptVpcPeeringConnection(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpAdvertiseByoipCidr struct {
+}
+
+func (*awsEc2query_deserializeOpAdvertiseByoipCidr) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpAdvertiseByoipCidr) 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, awsEc2query_deserializeOpErrorAdvertiseByoipCidr(response, &metadata)
+ }
+ output := &AdvertiseByoipCidrOutput{}
+ 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 = awsEc2query_deserializeOpDocumentAdvertiseByoipCidrOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorAdvertiseByoipCidr(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpAllocateAddress struct {
+}
+
+func (*awsEc2query_deserializeOpAllocateAddress) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpAllocateAddress) 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, awsEc2query_deserializeOpErrorAllocateAddress(response, &metadata)
+ }
+ output := &AllocateAddressOutput{}
+ 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 = awsEc2query_deserializeOpDocumentAllocateAddressOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorAllocateAddress(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpAllocateHosts struct {
+}
+
+func (*awsEc2query_deserializeOpAllocateHosts) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpAllocateHosts) 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, awsEc2query_deserializeOpErrorAllocateHosts(response, &metadata)
+ }
+ output := &AllocateHostsOutput{}
+ 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 = awsEc2query_deserializeOpDocumentAllocateHostsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorAllocateHosts(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpApplySecurityGroupsToClientVpnTargetNetwork struct {
+}
+
+func (*awsEc2query_deserializeOpApplySecurityGroupsToClientVpnTargetNetwork) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpApplySecurityGroupsToClientVpnTargetNetwork) 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, awsEc2query_deserializeOpErrorApplySecurityGroupsToClientVpnTargetNetwork(response, &metadata)
+ }
+ output := &ApplySecurityGroupsToClientVpnTargetNetworkOutput{}
+ 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 = awsEc2query_deserializeOpDocumentApplySecurityGroupsToClientVpnTargetNetworkOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorApplySecurityGroupsToClientVpnTargetNetwork(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpAssignIpv6Addresses struct {
+}
+
+func (*awsEc2query_deserializeOpAssignIpv6Addresses) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpAssignIpv6Addresses) 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, awsEc2query_deserializeOpErrorAssignIpv6Addresses(response, &metadata)
+ }
+ output := &AssignIpv6AddressesOutput{}
+ 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 = awsEc2query_deserializeOpDocumentAssignIpv6AddressesOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorAssignIpv6Addresses(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpAssignPrivateIpAddresses struct {
+}
+
+func (*awsEc2query_deserializeOpAssignPrivateIpAddresses) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpAssignPrivateIpAddresses) 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, awsEc2query_deserializeOpErrorAssignPrivateIpAddresses(response, &metadata)
+ }
+ output := &AssignPrivateIpAddressesOutput{}
+ 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 = awsEc2query_deserializeOpDocumentAssignPrivateIpAddressesOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorAssignPrivateIpAddresses(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpAssociateAddress struct {
+}
+
+func (*awsEc2query_deserializeOpAssociateAddress) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpAssociateAddress) 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, awsEc2query_deserializeOpErrorAssociateAddress(response, &metadata)
+ }
+ output := &AssociateAddressOutput{}
+ 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 = awsEc2query_deserializeOpDocumentAssociateAddressOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorAssociateAddress(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpAssociateClientVpnTargetNetwork struct {
+}
+
+func (*awsEc2query_deserializeOpAssociateClientVpnTargetNetwork) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpAssociateClientVpnTargetNetwork) 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, awsEc2query_deserializeOpErrorAssociateClientVpnTargetNetwork(response, &metadata)
+ }
+ output := &AssociateClientVpnTargetNetworkOutput{}
+ 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 = awsEc2query_deserializeOpDocumentAssociateClientVpnTargetNetworkOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorAssociateClientVpnTargetNetwork(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpAssociateDhcpOptions struct {
+}
+
+func (*awsEc2query_deserializeOpAssociateDhcpOptions) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpAssociateDhcpOptions) 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, awsEc2query_deserializeOpErrorAssociateDhcpOptions(response, &metadata)
+ }
+ output := &AssociateDhcpOptionsOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorAssociateDhcpOptions(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpAssociateEnclaveCertificateIamRole struct {
+}
+
+func (*awsEc2query_deserializeOpAssociateEnclaveCertificateIamRole) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpAssociateEnclaveCertificateIamRole) 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, awsEc2query_deserializeOpErrorAssociateEnclaveCertificateIamRole(response, &metadata)
+ }
+ output := &AssociateEnclaveCertificateIamRoleOutput{}
+ 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 = awsEc2query_deserializeOpDocumentAssociateEnclaveCertificateIamRoleOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorAssociateEnclaveCertificateIamRole(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpAssociateIamInstanceProfile struct {
+}
+
+func (*awsEc2query_deserializeOpAssociateIamInstanceProfile) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpAssociateIamInstanceProfile) 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, awsEc2query_deserializeOpErrorAssociateIamInstanceProfile(response, &metadata)
+ }
+ output := &AssociateIamInstanceProfileOutput{}
+ 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 = awsEc2query_deserializeOpDocumentAssociateIamInstanceProfileOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorAssociateIamInstanceProfile(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpAssociateInstanceEventWindow struct {
+}
+
+func (*awsEc2query_deserializeOpAssociateInstanceEventWindow) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpAssociateInstanceEventWindow) 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, awsEc2query_deserializeOpErrorAssociateInstanceEventWindow(response, &metadata)
+ }
+ output := &AssociateInstanceEventWindowOutput{}
+ 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 = awsEc2query_deserializeOpDocumentAssociateInstanceEventWindowOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorAssociateInstanceEventWindow(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpAssociateRouteTable struct {
+}
+
+func (*awsEc2query_deserializeOpAssociateRouteTable) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpAssociateRouteTable) 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, awsEc2query_deserializeOpErrorAssociateRouteTable(response, &metadata)
+ }
+ output := &AssociateRouteTableOutput{}
+ 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 = awsEc2query_deserializeOpDocumentAssociateRouteTableOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorAssociateRouteTable(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpAssociateSubnetCidrBlock struct {
+}
+
+func (*awsEc2query_deserializeOpAssociateSubnetCidrBlock) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpAssociateSubnetCidrBlock) 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, awsEc2query_deserializeOpErrorAssociateSubnetCidrBlock(response, &metadata)
+ }
+ output := &AssociateSubnetCidrBlockOutput{}
+ 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 = awsEc2query_deserializeOpDocumentAssociateSubnetCidrBlockOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorAssociateSubnetCidrBlock(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpAssociateTransitGatewayMulticastDomain struct {
+}
+
+func (*awsEc2query_deserializeOpAssociateTransitGatewayMulticastDomain) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpAssociateTransitGatewayMulticastDomain) 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, awsEc2query_deserializeOpErrorAssociateTransitGatewayMulticastDomain(response, &metadata)
+ }
+ output := &AssociateTransitGatewayMulticastDomainOutput{}
+ 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 = awsEc2query_deserializeOpDocumentAssociateTransitGatewayMulticastDomainOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorAssociateTransitGatewayMulticastDomain(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpAssociateTransitGatewayRouteTable struct {
+}
+
+func (*awsEc2query_deserializeOpAssociateTransitGatewayRouteTable) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpAssociateTransitGatewayRouteTable) 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, awsEc2query_deserializeOpErrorAssociateTransitGatewayRouteTable(response, &metadata)
+ }
+ output := &AssociateTransitGatewayRouteTableOutput{}
+ 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 = awsEc2query_deserializeOpDocumentAssociateTransitGatewayRouteTableOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorAssociateTransitGatewayRouteTable(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpAssociateTrunkInterface struct {
+}
+
+func (*awsEc2query_deserializeOpAssociateTrunkInterface) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpAssociateTrunkInterface) 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, awsEc2query_deserializeOpErrorAssociateTrunkInterface(response, &metadata)
+ }
+ output := &AssociateTrunkInterfaceOutput{}
+ 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 = awsEc2query_deserializeOpDocumentAssociateTrunkInterfaceOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorAssociateTrunkInterface(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpAssociateVpcCidrBlock struct {
+}
+
+func (*awsEc2query_deserializeOpAssociateVpcCidrBlock) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpAssociateVpcCidrBlock) 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, awsEc2query_deserializeOpErrorAssociateVpcCidrBlock(response, &metadata)
+ }
+ output := &AssociateVpcCidrBlockOutput{}
+ 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 = awsEc2query_deserializeOpDocumentAssociateVpcCidrBlockOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorAssociateVpcCidrBlock(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpAttachClassicLinkVpc struct {
+}
+
+func (*awsEc2query_deserializeOpAttachClassicLinkVpc) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpAttachClassicLinkVpc) 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, awsEc2query_deserializeOpErrorAttachClassicLinkVpc(response, &metadata)
+ }
+ output := &AttachClassicLinkVpcOutput{}
+ 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 = awsEc2query_deserializeOpDocumentAttachClassicLinkVpcOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorAttachClassicLinkVpc(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpAttachInternetGateway struct {
+}
+
+func (*awsEc2query_deserializeOpAttachInternetGateway) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpAttachInternetGateway) 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, awsEc2query_deserializeOpErrorAttachInternetGateway(response, &metadata)
+ }
+ output := &AttachInternetGatewayOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorAttachInternetGateway(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpAttachNetworkInterface struct {
+}
+
+func (*awsEc2query_deserializeOpAttachNetworkInterface) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpAttachNetworkInterface) 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, awsEc2query_deserializeOpErrorAttachNetworkInterface(response, &metadata)
+ }
+ output := &AttachNetworkInterfaceOutput{}
+ 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 = awsEc2query_deserializeOpDocumentAttachNetworkInterfaceOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorAttachNetworkInterface(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpAttachVolume struct {
+}
+
+func (*awsEc2query_deserializeOpAttachVolume) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpAttachVolume) 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, awsEc2query_deserializeOpErrorAttachVolume(response, &metadata)
+ }
+ output := &AttachVolumeOutput{}
+ 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 = awsEc2query_deserializeOpDocumentAttachVolumeOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorAttachVolume(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpAttachVpnGateway struct {
+}
+
+func (*awsEc2query_deserializeOpAttachVpnGateway) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpAttachVpnGateway) 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, awsEc2query_deserializeOpErrorAttachVpnGateway(response, &metadata)
+ }
+ output := &AttachVpnGatewayOutput{}
+ 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 = awsEc2query_deserializeOpDocumentAttachVpnGatewayOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorAttachVpnGateway(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpAuthorizeClientVpnIngress struct {
+}
+
+func (*awsEc2query_deserializeOpAuthorizeClientVpnIngress) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpAuthorizeClientVpnIngress) 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, awsEc2query_deserializeOpErrorAuthorizeClientVpnIngress(response, &metadata)
+ }
+ output := &AuthorizeClientVpnIngressOutput{}
+ 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 = awsEc2query_deserializeOpDocumentAuthorizeClientVpnIngressOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorAuthorizeClientVpnIngress(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpAuthorizeSecurityGroupEgress struct {
+}
+
+func (*awsEc2query_deserializeOpAuthorizeSecurityGroupEgress) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpAuthorizeSecurityGroupEgress) 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, awsEc2query_deserializeOpErrorAuthorizeSecurityGroupEgress(response, &metadata)
+ }
+ output := &AuthorizeSecurityGroupEgressOutput{}
+ 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 = awsEc2query_deserializeOpDocumentAuthorizeSecurityGroupEgressOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorAuthorizeSecurityGroupEgress(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpAuthorizeSecurityGroupIngress struct {
+}
+
+func (*awsEc2query_deserializeOpAuthorizeSecurityGroupIngress) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpAuthorizeSecurityGroupIngress) 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, awsEc2query_deserializeOpErrorAuthorizeSecurityGroupIngress(response, &metadata)
+ }
+ output := &AuthorizeSecurityGroupIngressOutput{}
+ 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 = awsEc2query_deserializeOpDocumentAuthorizeSecurityGroupIngressOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorAuthorizeSecurityGroupIngress(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpBundleInstance struct {
+}
+
+func (*awsEc2query_deserializeOpBundleInstance) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpBundleInstance) 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, awsEc2query_deserializeOpErrorBundleInstance(response, &metadata)
+ }
+ output := &BundleInstanceOutput{}
+ 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 = awsEc2query_deserializeOpDocumentBundleInstanceOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorBundleInstance(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpCancelBundleTask struct {
+}
+
+func (*awsEc2query_deserializeOpCancelBundleTask) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpCancelBundleTask) 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, awsEc2query_deserializeOpErrorCancelBundleTask(response, &metadata)
+ }
+ output := &CancelBundleTaskOutput{}
+ 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 = awsEc2query_deserializeOpDocumentCancelBundleTaskOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorCancelBundleTask(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpCancelCapacityReservation struct {
+}
+
+func (*awsEc2query_deserializeOpCancelCapacityReservation) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpCancelCapacityReservation) 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, awsEc2query_deserializeOpErrorCancelCapacityReservation(response, &metadata)
+ }
+ output := &CancelCapacityReservationOutput{}
+ 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 = awsEc2query_deserializeOpDocumentCancelCapacityReservationOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorCancelCapacityReservation(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpCancelConversionTask struct {
+}
+
+func (*awsEc2query_deserializeOpCancelConversionTask) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpCancelConversionTask) 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, awsEc2query_deserializeOpErrorCancelConversionTask(response, &metadata)
+ }
+ output := &CancelConversionTaskOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorCancelConversionTask(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpCancelExportTask struct {
+}
+
+func (*awsEc2query_deserializeOpCancelExportTask) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpCancelExportTask) 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, awsEc2query_deserializeOpErrorCancelExportTask(response, &metadata)
+ }
+ output := &CancelExportTaskOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorCancelExportTask(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpCancelImportTask struct {
+}
+
+func (*awsEc2query_deserializeOpCancelImportTask) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpCancelImportTask) 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, awsEc2query_deserializeOpErrorCancelImportTask(response, &metadata)
+ }
+ output := &CancelImportTaskOutput{}
+ 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 = awsEc2query_deserializeOpDocumentCancelImportTaskOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorCancelImportTask(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpCancelReservedInstancesListing struct {
+}
+
+func (*awsEc2query_deserializeOpCancelReservedInstancesListing) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpCancelReservedInstancesListing) 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, awsEc2query_deserializeOpErrorCancelReservedInstancesListing(response, &metadata)
+ }
+ output := &CancelReservedInstancesListingOutput{}
+ 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 = awsEc2query_deserializeOpDocumentCancelReservedInstancesListingOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorCancelReservedInstancesListing(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpCancelSpotFleetRequests struct {
+}
+
+func (*awsEc2query_deserializeOpCancelSpotFleetRequests) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpCancelSpotFleetRequests) 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, awsEc2query_deserializeOpErrorCancelSpotFleetRequests(response, &metadata)
+ }
+ output := &CancelSpotFleetRequestsOutput{}
+ 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 = awsEc2query_deserializeOpDocumentCancelSpotFleetRequestsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorCancelSpotFleetRequests(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpCancelSpotInstanceRequests struct {
+}
+
+func (*awsEc2query_deserializeOpCancelSpotInstanceRequests) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpCancelSpotInstanceRequests) 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, awsEc2query_deserializeOpErrorCancelSpotInstanceRequests(response, &metadata)
+ }
+ output := &CancelSpotInstanceRequestsOutput{}
+ 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 = awsEc2query_deserializeOpDocumentCancelSpotInstanceRequestsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorCancelSpotInstanceRequests(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpConfirmProductInstance struct {
+}
+
+func (*awsEc2query_deserializeOpConfirmProductInstance) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpConfirmProductInstance) 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, awsEc2query_deserializeOpErrorConfirmProductInstance(response, &metadata)
+ }
+ output := &ConfirmProductInstanceOutput{}
+ 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 = awsEc2query_deserializeOpDocumentConfirmProductInstanceOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorConfirmProductInstance(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpCopyFpgaImage struct {
+}
+
+func (*awsEc2query_deserializeOpCopyFpgaImage) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpCopyFpgaImage) 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, awsEc2query_deserializeOpErrorCopyFpgaImage(response, &metadata)
+ }
+ output := &CopyFpgaImageOutput{}
+ 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 = awsEc2query_deserializeOpDocumentCopyFpgaImageOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorCopyFpgaImage(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpCopyImage struct {
+}
+
+func (*awsEc2query_deserializeOpCopyImage) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpCopyImage) 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, awsEc2query_deserializeOpErrorCopyImage(response, &metadata)
+ }
+ output := &CopyImageOutput{}
+ 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 = awsEc2query_deserializeOpDocumentCopyImageOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorCopyImage(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpCopySnapshot struct {
+}
+
+func (*awsEc2query_deserializeOpCopySnapshot) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpCopySnapshot) 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, awsEc2query_deserializeOpErrorCopySnapshot(response, &metadata)
+ }
+ output := &CopySnapshotOutput{}
+ 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 = awsEc2query_deserializeOpDocumentCopySnapshotOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorCopySnapshot(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpCreateCapacityReservation struct {
+}
+
+func (*awsEc2query_deserializeOpCreateCapacityReservation) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpCreateCapacityReservation) 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, awsEc2query_deserializeOpErrorCreateCapacityReservation(response, &metadata)
+ }
+ output := &CreateCapacityReservationOutput{}
+ 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 = awsEc2query_deserializeOpDocumentCreateCapacityReservationOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorCreateCapacityReservation(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpCreateCarrierGateway struct {
+}
+
+func (*awsEc2query_deserializeOpCreateCarrierGateway) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpCreateCarrierGateway) 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, awsEc2query_deserializeOpErrorCreateCarrierGateway(response, &metadata)
+ }
+ output := &CreateCarrierGatewayOutput{}
+ 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 = awsEc2query_deserializeOpDocumentCreateCarrierGatewayOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorCreateCarrierGateway(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpCreateClientVpnEndpoint struct {
+}
+
+func (*awsEc2query_deserializeOpCreateClientVpnEndpoint) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpCreateClientVpnEndpoint) 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, awsEc2query_deserializeOpErrorCreateClientVpnEndpoint(response, &metadata)
+ }
+ output := &CreateClientVpnEndpointOutput{}
+ 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 = awsEc2query_deserializeOpDocumentCreateClientVpnEndpointOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorCreateClientVpnEndpoint(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpCreateClientVpnRoute struct {
+}
+
+func (*awsEc2query_deserializeOpCreateClientVpnRoute) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpCreateClientVpnRoute) 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, awsEc2query_deserializeOpErrorCreateClientVpnRoute(response, &metadata)
+ }
+ output := &CreateClientVpnRouteOutput{}
+ 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 = awsEc2query_deserializeOpDocumentCreateClientVpnRouteOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorCreateClientVpnRoute(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpCreateCustomerGateway struct {
+}
+
+func (*awsEc2query_deserializeOpCreateCustomerGateway) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpCreateCustomerGateway) 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, awsEc2query_deserializeOpErrorCreateCustomerGateway(response, &metadata)
+ }
+ output := &CreateCustomerGatewayOutput{}
+ 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 = awsEc2query_deserializeOpDocumentCreateCustomerGatewayOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorCreateCustomerGateway(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpCreateDefaultSubnet struct {
+}
+
+func (*awsEc2query_deserializeOpCreateDefaultSubnet) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpCreateDefaultSubnet) 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, awsEc2query_deserializeOpErrorCreateDefaultSubnet(response, &metadata)
+ }
+ output := &CreateDefaultSubnetOutput{}
+ 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 = awsEc2query_deserializeOpDocumentCreateDefaultSubnetOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorCreateDefaultSubnet(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpCreateDefaultVpc struct {
+}
+
+func (*awsEc2query_deserializeOpCreateDefaultVpc) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpCreateDefaultVpc) 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, awsEc2query_deserializeOpErrorCreateDefaultVpc(response, &metadata)
+ }
+ output := &CreateDefaultVpcOutput{}
+ 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 = awsEc2query_deserializeOpDocumentCreateDefaultVpcOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorCreateDefaultVpc(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpCreateDhcpOptions struct {
+}
+
+func (*awsEc2query_deserializeOpCreateDhcpOptions) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpCreateDhcpOptions) 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, awsEc2query_deserializeOpErrorCreateDhcpOptions(response, &metadata)
+ }
+ output := &CreateDhcpOptionsOutput{}
+ 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 = awsEc2query_deserializeOpDocumentCreateDhcpOptionsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorCreateDhcpOptions(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpCreateEgressOnlyInternetGateway struct {
+}
+
+func (*awsEc2query_deserializeOpCreateEgressOnlyInternetGateway) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpCreateEgressOnlyInternetGateway) 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, awsEc2query_deserializeOpErrorCreateEgressOnlyInternetGateway(response, &metadata)
+ }
+ output := &CreateEgressOnlyInternetGatewayOutput{}
+ 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 = awsEc2query_deserializeOpDocumentCreateEgressOnlyInternetGatewayOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorCreateEgressOnlyInternetGateway(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpCreateFleet struct {
+}
+
+func (*awsEc2query_deserializeOpCreateFleet) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpCreateFleet) 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, awsEc2query_deserializeOpErrorCreateFleet(response, &metadata)
+ }
+ output := &CreateFleetOutput{}
+ 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 = awsEc2query_deserializeOpDocumentCreateFleetOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorCreateFleet(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpCreateFlowLogs struct {
+}
+
+func (*awsEc2query_deserializeOpCreateFlowLogs) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpCreateFlowLogs) 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, awsEc2query_deserializeOpErrorCreateFlowLogs(response, &metadata)
+ }
+ output := &CreateFlowLogsOutput{}
+ 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 = awsEc2query_deserializeOpDocumentCreateFlowLogsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorCreateFlowLogs(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpCreateFpgaImage struct {
+}
+
+func (*awsEc2query_deserializeOpCreateFpgaImage) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpCreateFpgaImage) 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, awsEc2query_deserializeOpErrorCreateFpgaImage(response, &metadata)
+ }
+ output := &CreateFpgaImageOutput{}
+ 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 = awsEc2query_deserializeOpDocumentCreateFpgaImageOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorCreateFpgaImage(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpCreateImage struct {
+}
+
+func (*awsEc2query_deserializeOpCreateImage) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpCreateImage) 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, awsEc2query_deserializeOpErrorCreateImage(response, &metadata)
+ }
+ output := &CreateImageOutput{}
+ 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 = awsEc2query_deserializeOpDocumentCreateImageOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorCreateImage(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpCreateInstanceEventWindow struct {
+}
+
+func (*awsEc2query_deserializeOpCreateInstanceEventWindow) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpCreateInstanceEventWindow) 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, awsEc2query_deserializeOpErrorCreateInstanceEventWindow(response, &metadata)
+ }
+ output := &CreateInstanceEventWindowOutput{}
+ 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 = awsEc2query_deserializeOpDocumentCreateInstanceEventWindowOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorCreateInstanceEventWindow(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpCreateInstanceExportTask struct {
+}
+
+func (*awsEc2query_deserializeOpCreateInstanceExportTask) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpCreateInstanceExportTask) 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, awsEc2query_deserializeOpErrorCreateInstanceExportTask(response, &metadata)
+ }
+ output := &CreateInstanceExportTaskOutput{}
+ 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 = awsEc2query_deserializeOpDocumentCreateInstanceExportTaskOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorCreateInstanceExportTask(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpCreateInternetGateway struct {
+}
+
+func (*awsEc2query_deserializeOpCreateInternetGateway) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpCreateInternetGateway) 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, awsEc2query_deserializeOpErrorCreateInternetGateway(response, &metadata)
+ }
+ output := &CreateInternetGatewayOutput{}
+ 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 = awsEc2query_deserializeOpDocumentCreateInternetGatewayOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorCreateInternetGateway(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpCreateKeyPair struct {
+}
+
+func (*awsEc2query_deserializeOpCreateKeyPair) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpCreateKeyPair) 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, awsEc2query_deserializeOpErrorCreateKeyPair(response, &metadata)
+ }
+ output := &CreateKeyPairOutput{}
+ 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 = awsEc2query_deserializeOpDocumentCreateKeyPairOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorCreateKeyPair(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpCreateLaunchTemplate struct {
+}
+
+func (*awsEc2query_deserializeOpCreateLaunchTemplate) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpCreateLaunchTemplate) 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, awsEc2query_deserializeOpErrorCreateLaunchTemplate(response, &metadata)
+ }
+ output := &CreateLaunchTemplateOutput{}
+ 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 = awsEc2query_deserializeOpDocumentCreateLaunchTemplateOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorCreateLaunchTemplate(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpCreateLaunchTemplateVersion struct {
+}
+
+func (*awsEc2query_deserializeOpCreateLaunchTemplateVersion) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpCreateLaunchTemplateVersion) 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, awsEc2query_deserializeOpErrorCreateLaunchTemplateVersion(response, &metadata)
+ }
+ output := &CreateLaunchTemplateVersionOutput{}
+ 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 = awsEc2query_deserializeOpDocumentCreateLaunchTemplateVersionOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorCreateLaunchTemplateVersion(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpCreateLocalGatewayRoute struct {
+}
+
+func (*awsEc2query_deserializeOpCreateLocalGatewayRoute) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpCreateLocalGatewayRoute) 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, awsEc2query_deserializeOpErrorCreateLocalGatewayRoute(response, &metadata)
+ }
+ output := &CreateLocalGatewayRouteOutput{}
+ 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 = awsEc2query_deserializeOpDocumentCreateLocalGatewayRouteOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorCreateLocalGatewayRoute(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpCreateLocalGatewayRouteTableVpcAssociation struct {
+}
+
+func (*awsEc2query_deserializeOpCreateLocalGatewayRouteTableVpcAssociation) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpCreateLocalGatewayRouteTableVpcAssociation) 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, awsEc2query_deserializeOpErrorCreateLocalGatewayRouteTableVpcAssociation(response, &metadata)
+ }
+ output := &CreateLocalGatewayRouteTableVpcAssociationOutput{}
+ 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 = awsEc2query_deserializeOpDocumentCreateLocalGatewayRouteTableVpcAssociationOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorCreateLocalGatewayRouteTableVpcAssociation(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpCreateManagedPrefixList struct {
+}
+
+func (*awsEc2query_deserializeOpCreateManagedPrefixList) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpCreateManagedPrefixList) 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, awsEc2query_deserializeOpErrorCreateManagedPrefixList(response, &metadata)
+ }
+ output := &CreateManagedPrefixListOutput{}
+ 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 = awsEc2query_deserializeOpDocumentCreateManagedPrefixListOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorCreateManagedPrefixList(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpCreateNatGateway struct {
+}
+
+func (*awsEc2query_deserializeOpCreateNatGateway) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpCreateNatGateway) 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, awsEc2query_deserializeOpErrorCreateNatGateway(response, &metadata)
+ }
+ output := &CreateNatGatewayOutput{}
+ 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 = awsEc2query_deserializeOpDocumentCreateNatGatewayOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorCreateNatGateway(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpCreateNetworkAcl struct {
+}
+
+func (*awsEc2query_deserializeOpCreateNetworkAcl) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpCreateNetworkAcl) 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, awsEc2query_deserializeOpErrorCreateNetworkAcl(response, &metadata)
+ }
+ output := &CreateNetworkAclOutput{}
+ 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 = awsEc2query_deserializeOpDocumentCreateNetworkAclOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorCreateNetworkAcl(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpCreateNetworkAclEntry struct {
+}
+
+func (*awsEc2query_deserializeOpCreateNetworkAclEntry) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpCreateNetworkAclEntry) 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, awsEc2query_deserializeOpErrorCreateNetworkAclEntry(response, &metadata)
+ }
+ output := &CreateNetworkAclEntryOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorCreateNetworkAclEntry(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpCreateNetworkInsightsPath struct {
+}
+
+func (*awsEc2query_deserializeOpCreateNetworkInsightsPath) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpCreateNetworkInsightsPath) 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, awsEc2query_deserializeOpErrorCreateNetworkInsightsPath(response, &metadata)
+ }
+ output := &CreateNetworkInsightsPathOutput{}
+ 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 = awsEc2query_deserializeOpDocumentCreateNetworkInsightsPathOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorCreateNetworkInsightsPath(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpCreateNetworkInterface struct {
+}
+
+func (*awsEc2query_deserializeOpCreateNetworkInterface) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpCreateNetworkInterface) 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, awsEc2query_deserializeOpErrorCreateNetworkInterface(response, &metadata)
+ }
+ output := &CreateNetworkInterfaceOutput{}
+ 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 = awsEc2query_deserializeOpDocumentCreateNetworkInterfaceOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorCreateNetworkInterface(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpCreateNetworkInterfacePermission struct {
+}
+
+func (*awsEc2query_deserializeOpCreateNetworkInterfacePermission) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpCreateNetworkInterfacePermission) 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, awsEc2query_deserializeOpErrorCreateNetworkInterfacePermission(response, &metadata)
+ }
+ output := &CreateNetworkInterfacePermissionOutput{}
+ 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 = awsEc2query_deserializeOpDocumentCreateNetworkInterfacePermissionOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorCreateNetworkInterfacePermission(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpCreatePlacementGroup struct {
+}
+
+func (*awsEc2query_deserializeOpCreatePlacementGroup) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpCreatePlacementGroup) 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, awsEc2query_deserializeOpErrorCreatePlacementGroup(response, &metadata)
+ }
+ output := &CreatePlacementGroupOutput{}
+ 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 = awsEc2query_deserializeOpDocumentCreatePlacementGroupOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorCreatePlacementGroup(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpCreateReplaceRootVolumeTask struct {
+}
+
+func (*awsEc2query_deserializeOpCreateReplaceRootVolumeTask) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpCreateReplaceRootVolumeTask) 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, awsEc2query_deserializeOpErrorCreateReplaceRootVolumeTask(response, &metadata)
+ }
+ output := &CreateReplaceRootVolumeTaskOutput{}
+ 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 = awsEc2query_deserializeOpDocumentCreateReplaceRootVolumeTaskOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorCreateReplaceRootVolumeTask(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpCreateReservedInstancesListing struct {
+}
+
+func (*awsEc2query_deserializeOpCreateReservedInstancesListing) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpCreateReservedInstancesListing) 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, awsEc2query_deserializeOpErrorCreateReservedInstancesListing(response, &metadata)
+ }
+ output := &CreateReservedInstancesListingOutput{}
+ 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 = awsEc2query_deserializeOpDocumentCreateReservedInstancesListingOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorCreateReservedInstancesListing(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpCreateRestoreImageTask struct {
+}
+
+func (*awsEc2query_deserializeOpCreateRestoreImageTask) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpCreateRestoreImageTask) 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, awsEc2query_deserializeOpErrorCreateRestoreImageTask(response, &metadata)
+ }
+ output := &CreateRestoreImageTaskOutput{}
+ 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 = awsEc2query_deserializeOpDocumentCreateRestoreImageTaskOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorCreateRestoreImageTask(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpCreateRoute struct {
+}
+
+func (*awsEc2query_deserializeOpCreateRoute) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpCreateRoute) 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, awsEc2query_deserializeOpErrorCreateRoute(response, &metadata)
+ }
+ output := &CreateRouteOutput{}
+ 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 = awsEc2query_deserializeOpDocumentCreateRouteOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorCreateRoute(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpCreateRouteTable struct {
+}
+
+func (*awsEc2query_deserializeOpCreateRouteTable) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpCreateRouteTable) 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, awsEc2query_deserializeOpErrorCreateRouteTable(response, &metadata)
+ }
+ output := &CreateRouteTableOutput{}
+ 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 = awsEc2query_deserializeOpDocumentCreateRouteTableOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorCreateRouteTable(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpCreateSecurityGroup struct {
+}
+
+func (*awsEc2query_deserializeOpCreateSecurityGroup) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpCreateSecurityGroup) 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, awsEc2query_deserializeOpErrorCreateSecurityGroup(response, &metadata)
+ }
+ output := &CreateSecurityGroupOutput{}
+ 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 = awsEc2query_deserializeOpDocumentCreateSecurityGroupOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorCreateSecurityGroup(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpCreateSnapshot struct {
+}
+
+func (*awsEc2query_deserializeOpCreateSnapshot) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpCreateSnapshot) 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, awsEc2query_deserializeOpErrorCreateSnapshot(response, &metadata)
+ }
+ output := &CreateSnapshotOutput{}
+ 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 = awsEc2query_deserializeOpDocumentCreateSnapshotOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorCreateSnapshot(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpCreateSnapshots struct {
+}
+
+func (*awsEc2query_deserializeOpCreateSnapshots) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpCreateSnapshots) 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, awsEc2query_deserializeOpErrorCreateSnapshots(response, &metadata)
+ }
+ output := &CreateSnapshotsOutput{}
+ 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 = awsEc2query_deserializeOpDocumentCreateSnapshotsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorCreateSnapshots(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpCreateSpotDatafeedSubscription struct {
+}
+
+func (*awsEc2query_deserializeOpCreateSpotDatafeedSubscription) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpCreateSpotDatafeedSubscription) 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, awsEc2query_deserializeOpErrorCreateSpotDatafeedSubscription(response, &metadata)
+ }
+ output := &CreateSpotDatafeedSubscriptionOutput{}
+ 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 = awsEc2query_deserializeOpDocumentCreateSpotDatafeedSubscriptionOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorCreateSpotDatafeedSubscription(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpCreateStoreImageTask struct {
+}
+
+func (*awsEc2query_deserializeOpCreateStoreImageTask) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpCreateStoreImageTask) 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, awsEc2query_deserializeOpErrorCreateStoreImageTask(response, &metadata)
+ }
+ output := &CreateStoreImageTaskOutput{}
+ 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 = awsEc2query_deserializeOpDocumentCreateStoreImageTaskOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorCreateStoreImageTask(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpCreateSubnet struct {
+}
+
+func (*awsEc2query_deserializeOpCreateSubnet) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpCreateSubnet) 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, awsEc2query_deserializeOpErrorCreateSubnet(response, &metadata)
+ }
+ output := &CreateSubnetOutput{}
+ 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 = awsEc2query_deserializeOpDocumentCreateSubnetOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorCreateSubnet(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpCreateSubnetCidrReservation struct {
+}
+
+func (*awsEc2query_deserializeOpCreateSubnetCidrReservation) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpCreateSubnetCidrReservation) 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, awsEc2query_deserializeOpErrorCreateSubnetCidrReservation(response, &metadata)
+ }
+ output := &CreateSubnetCidrReservationOutput{}
+ 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 = awsEc2query_deserializeOpDocumentCreateSubnetCidrReservationOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorCreateSubnetCidrReservation(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpCreateTags struct {
+}
+
+func (*awsEc2query_deserializeOpCreateTags) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpCreateTags) 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, awsEc2query_deserializeOpErrorCreateTags(response, &metadata)
+ }
+ output := &CreateTagsOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorCreateTags(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpCreateTrafficMirrorFilter struct {
+}
+
+func (*awsEc2query_deserializeOpCreateTrafficMirrorFilter) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpCreateTrafficMirrorFilter) 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, awsEc2query_deserializeOpErrorCreateTrafficMirrorFilter(response, &metadata)
+ }
+ output := &CreateTrafficMirrorFilterOutput{}
+ 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 = awsEc2query_deserializeOpDocumentCreateTrafficMirrorFilterOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorCreateTrafficMirrorFilter(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpCreateTrafficMirrorFilterRule struct {
+}
+
+func (*awsEc2query_deserializeOpCreateTrafficMirrorFilterRule) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpCreateTrafficMirrorFilterRule) 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, awsEc2query_deserializeOpErrorCreateTrafficMirrorFilterRule(response, &metadata)
+ }
+ output := &CreateTrafficMirrorFilterRuleOutput{}
+ 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 = awsEc2query_deserializeOpDocumentCreateTrafficMirrorFilterRuleOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorCreateTrafficMirrorFilterRule(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpCreateTrafficMirrorSession struct {
+}
+
+func (*awsEc2query_deserializeOpCreateTrafficMirrorSession) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpCreateTrafficMirrorSession) 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, awsEc2query_deserializeOpErrorCreateTrafficMirrorSession(response, &metadata)
+ }
+ output := &CreateTrafficMirrorSessionOutput{}
+ 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 = awsEc2query_deserializeOpDocumentCreateTrafficMirrorSessionOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorCreateTrafficMirrorSession(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpCreateTrafficMirrorTarget struct {
+}
+
+func (*awsEc2query_deserializeOpCreateTrafficMirrorTarget) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpCreateTrafficMirrorTarget) 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, awsEc2query_deserializeOpErrorCreateTrafficMirrorTarget(response, &metadata)
+ }
+ output := &CreateTrafficMirrorTargetOutput{}
+ 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 = awsEc2query_deserializeOpDocumentCreateTrafficMirrorTargetOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorCreateTrafficMirrorTarget(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpCreateTransitGateway struct {
+}
+
+func (*awsEc2query_deserializeOpCreateTransitGateway) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpCreateTransitGateway) 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, awsEc2query_deserializeOpErrorCreateTransitGateway(response, &metadata)
+ }
+ output := &CreateTransitGatewayOutput{}
+ 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 = awsEc2query_deserializeOpDocumentCreateTransitGatewayOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorCreateTransitGateway(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpCreateTransitGatewayConnect struct {
+}
+
+func (*awsEc2query_deserializeOpCreateTransitGatewayConnect) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpCreateTransitGatewayConnect) 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, awsEc2query_deserializeOpErrorCreateTransitGatewayConnect(response, &metadata)
+ }
+ output := &CreateTransitGatewayConnectOutput{}
+ 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 = awsEc2query_deserializeOpDocumentCreateTransitGatewayConnectOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorCreateTransitGatewayConnect(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpCreateTransitGatewayConnectPeer struct {
+}
+
+func (*awsEc2query_deserializeOpCreateTransitGatewayConnectPeer) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpCreateTransitGatewayConnectPeer) 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, awsEc2query_deserializeOpErrorCreateTransitGatewayConnectPeer(response, &metadata)
+ }
+ output := &CreateTransitGatewayConnectPeerOutput{}
+ 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 = awsEc2query_deserializeOpDocumentCreateTransitGatewayConnectPeerOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorCreateTransitGatewayConnectPeer(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpCreateTransitGatewayMulticastDomain struct {
+}
+
+func (*awsEc2query_deserializeOpCreateTransitGatewayMulticastDomain) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpCreateTransitGatewayMulticastDomain) 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, awsEc2query_deserializeOpErrorCreateTransitGatewayMulticastDomain(response, &metadata)
+ }
+ output := &CreateTransitGatewayMulticastDomainOutput{}
+ 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 = awsEc2query_deserializeOpDocumentCreateTransitGatewayMulticastDomainOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorCreateTransitGatewayMulticastDomain(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpCreateTransitGatewayPeeringAttachment struct {
+}
+
+func (*awsEc2query_deserializeOpCreateTransitGatewayPeeringAttachment) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpCreateTransitGatewayPeeringAttachment) 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, awsEc2query_deserializeOpErrorCreateTransitGatewayPeeringAttachment(response, &metadata)
+ }
+ output := &CreateTransitGatewayPeeringAttachmentOutput{}
+ 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 = awsEc2query_deserializeOpDocumentCreateTransitGatewayPeeringAttachmentOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorCreateTransitGatewayPeeringAttachment(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpCreateTransitGatewayPrefixListReference struct {
+}
+
+func (*awsEc2query_deserializeOpCreateTransitGatewayPrefixListReference) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpCreateTransitGatewayPrefixListReference) 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, awsEc2query_deserializeOpErrorCreateTransitGatewayPrefixListReference(response, &metadata)
+ }
+ output := &CreateTransitGatewayPrefixListReferenceOutput{}
+ 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 = awsEc2query_deserializeOpDocumentCreateTransitGatewayPrefixListReferenceOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorCreateTransitGatewayPrefixListReference(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpCreateTransitGatewayRoute struct {
+}
+
+func (*awsEc2query_deserializeOpCreateTransitGatewayRoute) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpCreateTransitGatewayRoute) 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, awsEc2query_deserializeOpErrorCreateTransitGatewayRoute(response, &metadata)
+ }
+ output := &CreateTransitGatewayRouteOutput{}
+ 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 = awsEc2query_deserializeOpDocumentCreateTransitGatewayRouteOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorCreateTransitGatewayRoute(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpCreateTransitGatewayRouteTable struct {
+}
+
+func (*awsEc2query_deserializeOpCreateTransitGatewayRouteTable) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpCreateTransitGatewayRouteTable) 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, awsEc2query_deserializeOpErrorCreateTransitGatewayRouteTable(response, &metadata)
+ }
+ output := &CreateTransitGatewayRouteTableOutput{}
+ 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 = awsEc2query_deserializeOpDocumentCreateTransitGatewayRouteTableOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorCreateTransitGatewayRouteTable(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpCreateTransitGatewayVpcAttachment struct {
+}
+
+func (*awsEc2query_deserializeOpCreateTransitGatewayVpcAttachment) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpCreateTransitGatewayVpcAttachment) 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, awsEc2query_deserializeOpErrorCreateTransitGatewayVpcAttachment(response, &metadata)
+ }
+ output := &CreateTransitGatewayVpcAttachmentOutput{}
+ 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 = awsEc2query_deserializeOpDocumentCreateTransitGatewayVpcAttachmentOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorCreateTransitGatewayVpcAttachment(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpCreateVolume struct {
+}
+
+func (*awsEc2query_deserializeOpCreateVolume) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpCreateVolume) 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, awsEc2query_deserializeOpErrorCreateVolume(response, &metadata)
+ }
+ output := &CreateVolumeOutput{}
+ 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 = awsEc2query_deserializeOpDocumentCreateVolumeOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorCreateVolume(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpCreateVpc struct {
+}
+
+func (*awsEc2query_deserializeOpCreateVpc) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpCreateVpc) 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, awsEc2query_deserializeOpErrorCreateVpc(response, &metadata)
+ }
+ output := &CreateVpcOutput{}
+ 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 = awsEc2query_deserializeOpDocumentCreateVpcOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorCreateVpc(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpCreateVpcEndpoint struct {
+}
+
+func (*awsEc2query_deserializeOpCreateVpcEndpoint) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpCreateVpcEndpoint) 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, awsEc2query_deserializeOpErrorCreateVpcEndpoint(response, &metadata)
+ }
+ output := &CreateVpcEndpointOutput{}
+ 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 = awsEc2query_deserializeOpDocumentCreateVpcEndpointOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorCreateVpcEndpoint(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpCreateVpcEndpointConnectionNotification struct {
+}
+
+func (*awsEc2query_deserializeOpCreateVpcEndpointConnectionNotification) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpCreateVpcEndpointConnectionNotification) 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, awsEc2query_deserializeOpErrorCreateVpcEndpointConnectionNotification(response, &metadata)
+ }
+ output := &CreateVpcEndpointConnectionNotificationOutput{}
+ 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 = awsEc2query_deserializeOpDocumentCreateVpcEndpointConnectionNotificationOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorCreateVpcEndpointConnectionNotification(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpCreateVpcEndpointServiceConfiguration struct {
+}
+
+func (*awsEc2query_deserializeOpCreateVpcEndpointServiceConfiguration) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpCreateVpcEndpointServiceConfiguration) 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, awsEc2query_deserializeOpErrorCreateVpcEndpointServiceConfiguration(response, &metadata)
+ }
+ output := &CreateVpcEndpointServiceConfigurationOutput{}
+ 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 = awsEc2query_deserializeOpDocumentCreateVpcEndpointServiceConfigurationOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorCreateVpcEndpointServiceConfiguration(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpCreateVpcPeeringConnection struct {
+}
+
+func (*awsEc2query_deserializeOpCreateVpcPeeringConnection) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpCreateVpcPeeringConnection) 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, awsEc2query_deserializeOpErrorCreateVpcPeeringConnection(response, &metadata)
+ }
+ output := &CreateVpcPeeringConnectionOutput{}
+ 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 = awsEc2query_deserializeOpDocumentCreateVpcPeeringConnectionOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorCreateVpcPeeringConnection(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpCreateVpnConnection struct {
+}
+
+func (*awsEc2query_deserializeOpCreateVpnConnection) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpCreateVpnConnection) 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, awsEc2query_deserializeOpErrorCreateVpnConnection(response, &metadata)
+ }
+ output := &CreateVpnConnectionOutput{}
+ 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 = awsEc2query_deserializeOpDocumentCreateVpnConnectionOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorCreateVpnConnection(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpCreateVpnConnectionRoute struct {
+}
+
+func (*awsEc2query_deserializeOpCreateVpnConnectionRoute) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpCreateVpnConnectionRoute) 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, awsEc2query_deserializeOpErrorCreateVpnConnectionRoute(response, &metadata)
+ }
+ output := &CreateVpnConnectionRouteOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorCreateVpnConnectionRoute(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpCreateVpnGateway struct {
+}
+
+func (*awsEc2query_deserializeOpCreateVpnGateway) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpCreateVpnGateway) 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, awsEc2query_deserializeOpErrorCreateVpnGateway(response, &metadata)
+ }
+ output := &CreateVpnGatewayOutput{}
+ 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 = awsEc2query_deserializeOpDocumentCreateVpnGatewayOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorCreateVpnGateway(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDeleteCarrierGateway struct {
+}
+
+func (*awsEc2query_deserializeOpDeleteCarrierGateway) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDeleteCarrierGateway) 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, awsEc2query_deserializeOpErrorDeleteCarrierGateway(response, &metadata)
+ }
+ output := &DeleteCarrierGatewayOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDeleteCarrierGatewayOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDeleteCarrierGateway(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDeleteClientVpnEndpoint struct {
+}
+
+func (*awsEc2query_deserializeOpDeleteClientVpnEndpoint) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDeleteClientVpnEndpoint) 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, awsEc2query_deserializeOpErrorDeleteClientVpnEndpoint(response, &metadata)
+ }
+ output := &DeleteClientVpnEndpointOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDeleteClientVpnEndpointOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDeleteClientVpnEndpoint(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDeleteClientVpnRoute struct {
+}
+
+func (*awsEc2query_deserializeOpDeleteClientVpnRoute) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDeleteClientVpnRoute) 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, awsEc2query_deserializeOpErrorDeleteClientVpnRoute(response, &metadata)
+ }
+ output := &DeleteClientVpnRouteOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDeleteClientVpnRouteOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDeleteClientVpnRoute(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDeleteCustomerGateway struct {
+}
+
+func (*awsEc2query_deserializeOpDeleteCustomerGateway) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDeleteCustomerGateway) 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, awsEc2query_deserializeOpErrorDeleteCustomerGateway(response, &metadata)
+ }
+ output := &DeleteCustomerGatewayOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDeleteCustomerGateway(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDeleteDhcpOptions struct {
+}
+
+func (*awsEc2query_deserializeOpDeleteDhcpOptions) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDeleteDhcpOptions) 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, awsEc2query_deserializeOpErrorDeleteDhcpOptions(response, &metadata)
+ }
+ output := &DeleteDhcpOptionsOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDeleteDhcpOptions(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDeleteEgressOnlyInternetGateway struct {
+}
+
+func (*awsEc2query_deserializeOpDeleteEgressOnlyInternetGateway) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDeleteEgressOnlyInternetGateway) 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, awsEc2query_deserializeOpErrorDeleteEgressOnlyInternetGateway(response, &metadata)
+ }
+ output := &DeleteEgressOnlyInternetGatewayOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDeleteEgressOnlyInternetGatewayOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDeleteEgressOnlyInternetGateway(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDeleteFleets struct {
+}
+
+func (*awsEc2query_deserializeOpDeleteFleets) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDeleteFleets) 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, awsEc2query_deserializeOpErrorDeleteFleets(response, &metadata)
+ }
+ output := &DeleteFleetsOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDeleteFleetsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDeleteFleets(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDeleteFlowLogs struct {
+}
+
+func (*awsEc2query_deserializeOpDeleteFlowLogs) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDeleteFlowLogs) 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, awsEc2query_deserializeOpErrorDeleteFlowLogs(response, &metadata)
+ }
+ output := &DeleteFlowLogsOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDeleteFlowLogsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDeleteFlowLogs(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDeleteFpgaImage struct {
+}
+
+func (*awsEc2query_deserializeOpDeleteFpgaImage) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDeleteFpgaImage) 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, awsEc2query_deserializeOpErrorDeleteFpgaImage(response, &metadata)
+ }
+ output := &DeleteFpgaImageOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDeleteFpgaImageOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDeleteFpgaImage(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDeleteInstanceEventWindow struct {
+}
+
+func (*awsEc2query_deserializeOpDeleteInstanceEventWindow) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDeleteInstanceEventWindow) 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, awsEc2query_deserializeOpErrorDeleteInstanceEventWindow(response, &metadata)
+ }
+ output := &DeleteInstanceEventWindowOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDeleteInstanceEventWindowOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDeleteInstanceEventWindow(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDeleteInternetGateway struct {
+}
+
+func (*awsEc2query_deserializeOpDeleteInternetGateway) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDeleteInternetGateway) 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, awsEc2query_deserializeOpErrorDeleteInternetGateway(response, &metadata)
+ }
+ output := &DeleteInternetGatewayOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDeleteInternetGateway(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDeleteKeyPair struct {
+}
+
+func (*awsEc2query_deserializeOpDeleteKeyPair) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDeleteKeyPair) 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, awsEc2query_deserializeOpErrorDeleteKeyPair(response, &metadata)
+ }
+ output := &DeleteKeyPairOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDeleteKeyPair(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDeleteLaunchTemplate struct {
+}
+
+func (*awsEc2query_deserializeOpDeleteLaunchTemplate) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDeleteLaunchTemplate) 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, awsEc2query_deserializeOpErrorDeleteLaunchTemplate(response, &metadata)
+ }
+ output := &DeleteLaunchTemplateOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDeleteLaunchTemplateOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDeleteLaunchTemplate(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDeleteLaunchTemplateVersions struct {
+}
+
+func (*awsEc2query_deserializeOpDeleteLaunchTemplateVersions) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDeleteLaunchTemplateVersions) 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, awsEc2query_deserializeOpErrorDeleteLaunchTemplateVersions(response, &metadata)
+ }
+ output := &DeleteLaunchTemplateVersionsOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDeleteLaunchTemplateVersionsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDeleteLaunchTemplateVersions(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDeleteLocalGatewayRoute struct {
+}
+
+func (*awsEc2query_deserializeOpDeleteLocalGatewayRoute) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDeleteLocalGatewayRoute) 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, awsEc2query_deserializeOpErrorDeleteLocalGatewayRoute(response, &metadata)
+ }
+ output := &DeleteLocalGatewayRouteOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDeleteLocalGatewayRouteOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDeleteLocalGatewayRoute(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDeleteLocalGatewayRouteTableVpcAssociation struct {
+}
+
+func (*awsEc2query_deserializeOpDeleteLocalGatewayRouteTableVpcAssociation) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDeleteLocalGatewayRouteTableVpcAssociation) 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, awsEc2query_deserializeOpErrorDeleteLocalGatewayRouteTableVpcAssociation(response, &metadata)
+ }
+ output := &DeleteLocalGatewayRouteTableVpcAssociationOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDeleteLocalGatewayRouteTableVpcAssociationOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDeleteLocalGatewayRouteTableVpcAssociation(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDeleteManagedPrefixList struct {
+}
+
+func (*awsEc2query_deserializeOpDeleteManagedPrefixList) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDeleteManagedPrefixList) 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, awsEc2query_deserializeOpErrorDeleteManagedPrefixList(response, &metadata)
+ }
+ output := &DeleteManagedPrefixListOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDeleteManagedPrefixListOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDeleteManagedPrefixList(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDeleteNatGateway struct {
+}
+
+func (*awsEc2query_deserializeOpDeleteNatGateway) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDeleteNatGateway) 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, awsEc2query_deserializeOpErrorDeleteNatGateway(response, &metadata)
+ }
+ output := &DeleteNatGatewayOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDeleteNatGatewayOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDeleteNatGateway(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDeleteNetworkAcl struct {
+}
+
+func (*awsEc2query_deserializeOpDeleteNetworkAcl) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDeleteNetworkAcl) 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, awsEc2query_deserializeOpErrorDeleteNetworkAcl(response, &metadata)
+ }
+ output := &DeleteNetworkAclOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDeleteNetworkAcl(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDeleteNetworkAclEntry struct {
+}
+
+func (*awsEc2query_deserializeOpDeleteNetworkAclEntry) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDeleteNetworkAclEntry) 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, awsEc2query_deserializeOpErrorDeleteNetworkAclEntry(response, &metadata)
+ }
+ output := &DeleteNetworkAclEntryOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDeleteNetworkAclEntry(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDeleteNetworkInsightsAnalysis struct {
+}
+
+func (*awsEc2query_deserializeOpDeleteNetworkInsightsAnalysis) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDeleteNetworkInsightsAnalysis) 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, awsEc2query_deserializeOpErrorDeleteNetworkInsightsAnalysis(response, &metadata)
+ }
+ output := &DeleteNetworkInsightsAnalysisOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDeleteNetworkInsightsAnalysisOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDeleteNetworkInsightsAnalysis(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDeleteNetworkInsightsPath struct {
+}
+
+func (*awsEc2query_deserializeOpDeleteNetworkInsightsPath) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDeleteNetworkInsightsPath) 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, awsEc2query_deserializeOpErrorDeleteNetworkInsightsPath(response, &metadata)
+ }
+ output := &DeleteNetworkInsightsPathOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDeleteNetworkInsightsPathOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDeleteNetworkInsightsPath(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDeleteNetworkInterface struct {
+}
+
+func (*awsEc2query_deserializeOpDeleteNetworkInterface) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDeleteNetworkInterface) 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, awsEc2query_deserializeOpErrorDeleteNetworkInterface(response, &metadata)
+ }
+ output := &DeleteNetworkInterfaceOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDeleteNetworkInterface(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDeleteNetworkInterfacePermission struct {
+}
+
+func (*awsEc2query_deserializeOpDeleteNetworkInterfacePermission) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDeleteNetworkInterfacePermission) 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, awsEc2query_deserializeOpErrorDeleteNetworkInterfacePermission(response, &metadata)
+ }
+ output := &DeleteNetworkInterfacePermissionOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDeleteNetworkInterfacePermissionOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDeleteNetworkInterfacePermission(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDeletePlacementGroup struct {
+}
+
+func (*awsEc2query_deserializeOpDeletePlacementGroup) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDeletePlacementGroup) 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, awsEc2query_deserializeOpErrorDeletePlacementGroup(response, &metadata)
+ }
+ output := &DeletePlacementGroupOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDeletePlacementGroup(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDeleteQueuedReservedInstances struct {
+}
+
+func (*awsEc2query_deserializeOpDeleteQueuedReservedInstances) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDeleteQueuedReservedInstances) 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, awsEc2query_deserializeOpErrorDeleteQueuedReservedInstances(response, &metadata)
+ }
+ output := &DeleteQueuedReservedInstancesOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDeleteQueuedReservedInstancesOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDeleteQueuedReservedInstances(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDeleteRoute struct {
+}
+
+func (*awsEc2query_deserializeOpDeleteRoute) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDeleteRoute) 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, awsEc2query_deserializeOpErrorDeleteRoute(response, &metadata)
+ }
+ output := &DeleteRouteOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDeleteRoute(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDeleteRouteTable struct {
+}
+
+func (*awsEc2query_deserializeOpDeleteRouteTable) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDeleteRouteTable) 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, awsEc2query_deserializeOpErrorDeleteRouteTable(response, &metadata)
+ }
+ output := &DeleteRouteTableOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDeleteRouteTable(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDeleteSecurityGroup struct {
+}
+
+func (*awsEc2query_deserializeOpDeleteSecurityGroup) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDeleteSecurityGroup) 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, awsEc2query_deserializeOpErrorDeleteSecurityGroup(response, &metadata)
+ }
+ output := &DeleteSecurityGroupOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDeleteSecurityGroup(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDeleteSnapshot struct {
+}
+
+func (*awsEc2query_deserializeOpDeleteSnapshot) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDeleteSnapshot) 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, awsEc2query_deserializeOpErrorDeleteSnapshot(response, &metadata)
+ }
+ output := &DeleteSnapshotOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDeleteSnapshot(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDeleteSpotDatafeedSubscription struct {
+}
+
+func (*awsEc2query_deserializeOpDeleteSpotDatafeedSubscription) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDeleteSpotDatafeedSubscription) 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, awsEc2query_deserializeOpErrorDeleteSpotDatafeedSubscription(response, &metadata)
+ }
+ output := &DeleteSpotDatafeedSubscriptionOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDeleteSpotDatafeedSubscription(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDeleteSubnet struct {
+}
+
+func (*awsEc2query_deserializeOpDeleteSubnet) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDeleteSubnet) 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, awsEc2query_deserializeOpErrorDeleteSubnet(response, &metadata)
+ }
+ output := &DeleteSubnetOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDeleteSubnet(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDeleteSubnetCidrReservation struct {
+}
+
+func (*awsEc2query_deserializeOpDeleteSubnetCidrReservation) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDeleteSubnetCidrReservation) 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, awsEc2query_deserializeOpErrorDeleteSubnetCidrReservation(response, &metadata)
+ }
+ output := &DeleteSubnetCidrReservationOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDeleteSubnetCidrReservationOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDeleteSubnetCidrReservation(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDeleteTags struct {
+}
+
+func (*awsEc2query_deserializeOpDeleteTags) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDeleteTags) 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, awsEc2query_deserializeOpErrorDeleteTags(response, &metadata)
+ }
+ output := &DeleteTagsOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDeleteTags(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDeleteTrafficMirrorFilter struct {
+}
+
+func (*awsEc2query_deserializeOpDeleteTrafficMirrorFilter) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDeleteTrafficMirrorFilter) 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, awsEc2query_deserializeOpErrorDeleteTrafficMirrorFilter(response, &metadata)
+ }
+ output := &DeleteTrafficMirrorFilterOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDeleteTrafficMirrorFilterOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDeleteTrafficMirrorFilter(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDeleteTrafficMirrorFilterRule struct {
+}
+
+func (*awsEc2query_deserializeOpDeleteTrafficMirrorFilterRule) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDeleteTrafficMirrorFilterRule) 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, awsEc2query_deserializeOpErrorDeleteTrafficMirrorFilterRule(response, &metadata)
+ }
+ output := &DeleteTrafficMirrorFilterRuleOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDeleteTrafficMirrorFilterRuleOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDeleteTrafficMirrorFilterRule(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDeleteTrafficMirrorSession struct {
+}
+
+func (*awsEc2query_deserializeOpDeleteTrafficMirrorSession) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDeleteTrafficMirrorSession) 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, awsEc2query_deserializeOpErrorDeleteTrafficMirrorSession(response, &metadata)
+ }
+ output := &DeleteTrafficMirrorSessionOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDeleteTrafficMirrorSessionOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDeleteTrafficMirrorSession(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDeleteTrafficMirrorTarget struct {
+}
+
+func (*awsEc2query_deserializeOpDeleteTrafficMirrorTarget) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDeleteTrafficMirrorTarget) 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, awsEc2query_deserializeOpErrorDeleteTrafficMirrorTarget(response, &metadata)
+ }
+ output := &DeleteTrafficMirrorTargetOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDeleteTrafficMirrorTargetOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDeleteTrafficMirrorTarget(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDeleteTransitGateway struct {
+}
+
+func (*awsEc2query_deserializeOpDeleteTransitGateway) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDeleteTransitGateway) 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, awsEc2query_deserializeOpErrorDeleteTransitGateway(response, &metadata)
+ }
+ output := &DeleteTransitGatewayOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDeleteTransitGatewayOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDeleteTransitGateway(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDeleteTransitGatewayConnect struct {
+}
+
+func (*awsEc2query_deserializeOpDeleteTransitGatewayConnect) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDeleteTransitGatewayConnect) 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, awsEc2query_deserializeOpErrorDeleteTransitGatewayConnect(response, &metadata)
+ }
+ output := &DeleteTransitGatewayConnectOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDeleteTransitGatewayConnectOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDeleteTransitGatewayConnect(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDeleteTransitGatewayConnectPeer struct {
+}
+
+func (*awsEc2query_deserializeOpDeleteTransitGatewayConnectPeer) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDeleteTransitGatewayConnectPeer) 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, awsEc2query_deserializeOpErrorDeleteTransitGatewayConnectPeer(response, &metadata)
+ }
+ output := &DeleteTransitGatewayConnectPeerOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDeleteTransitGatewayConnectPeerOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDeleteTransitGatewayConnectPeer(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDeleteTransitGatewayMulticastDomain struct {
+}
+
+func (*awsEc2query_deserializeOpDeleteTransitGatewayMulticastDomain) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDeleteTransitGatewayMulticastDomain) 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, awsEc2query_deserializeOpErrorDeleteTransitGatewayMulticastDomain(response, &metadata)
+ }
+ output := &DeleteTransitGatewayMulticastDomainOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDeleteTransitGatewayMulticastDomainOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDeleteTransitGatewayMulticastDomain(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDeleteTransitGatewayPeeringAttachment struct {
+}
+
+func (*awsEc2query_deserializeOpDeleteTransitGatewayPeeringAttachment) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDeleteTransitGatewayPeeringAttachment) 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, awsEc2query_deserializeOpErrorDeleteTransitGatewayPeeringAttachment(response, &metadata)
+ }
+ output := &DeleteTransitGatewayPeeringAttachmentOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDeleteTransitGatewayPeeringAttachmentOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDeleteTransitGatewayPeeringAttachment(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDeleteTransitGatewayPrefixListReference struct {
+}
+
+func (*awsEc2query_deserializeOpDeleteTransitGatewayPrefixListReference) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDeleteTransitGatewayPrefixListReference) 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, awsEc2query_deserializeOpErrorDeleteTransitGatewayPrefixListReference(response, &metadata)
+ }
+ output := &DeleteTransitGatewayPrefixListReferenceOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDeleteTransitGatewayPrefixListReferenceOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDeleteTransitGatewayPrefixListReference(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDeleteTransitGatewayRoute struct {
+}
+
+func (*awsEc2query_deserializeOpDeleteTransitGatewayRoute) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDeleteTransitGatewayRoute) 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, awsEc2query_deserializeOpErrorDeleteTransitGatewayRoute(response, &metadata)
+ }
+ output := &DeleteTransitGatewayRouteOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDeleteTransitGatewayRouteOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDeleteTransitGatewayRoute(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDeleteTransitGatewayRouteTable struct {
+}
+
+func (*awsEc2query_deserializeOpDeleteTransitGatewayRouteTable) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDeleteTransitGatewayRouteTable) 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, awsEc2query_deserializeOpErrorDeleteTransitGatewayRouteTable(response, &metadata)
+ }
+ output := &DeleteTransitGatewayRouteTableOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDeleteTransitGatewayRouteTableOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDeleteTransitGatewayRouteTable(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDeleteTransitGatewayVpcAttachment struct {
+}
+
+func (*awsEc2query_deserializeOpDeleteTransitGatewayVpcAttachment) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDeleteTransitGatewayVpcAttachment) 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, awsEc2query_deserializeOpErrorDeleteTransitGatewayVpcAttachment(response, &metadata)
+ }
+ output := &DeleteTransitGatewayVpcAttachmentOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDeleteTransitGatewayVpcAttachmentOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDeleteTransitGatewayVpcAttachment(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDeleteVolume struct {
+}
+
+func (*awsEc2query_deserializeOpDeleteVolume) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDeleteVolume) 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, awsEc2query_deserializeOpErrorDeleteVolume(response, &metadata)
+ }
+ output := &DeleteVolumeOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDeleteVolume(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDeleteVpc struct {
+}
+
+func (*awsEc2query_deserializeOpDeleteVpc) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDeleteVpc) 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, awsEc2query_deserializeOpErrorDeleteVpc(response, &metadata)
+ }
+ output := &DeleteVpcOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDeleteVpc(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDeleteVpcEndpointConnectionNotifications struct {
+}
+
+func (*awsEc2query_deserializeOpDeleteVpcEndpointConnectionNotifications) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDeleteVpcEndpointConnectionNotifications) 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, awsEc2query_deserializeOpErrorDeleteVpcEndpointConnectionNotifications(response, &metadata)
+ }
+ output := &DeleteVpcEndpointConnectionNotificationsOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDeleteVpcEndpointConnectionNotificationsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDeleteVpcEndpointConnectionNotifications(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDeleteVpcEndpoints struct {
+}
+
+func (*awsEc2query_deserializeOpDeleteVpcEndpoints) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDeleteVpcEndpoints) 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, awsEc2query_deserializeOpErrorDeleteVpcEndpoints(response, &metadata)
+ }
+ output := &DeleteVpcEndpointsOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDeleteVpcEndpointsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDeleteVpcEndpoints(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDeleteVpcEndpointServiceConfigurations struct {
+}
+
+func (*awsEc2query_deserializeOpDeleteVpcEndpointServiceConfigurations) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDeleteVpcEndpointServiceConfigurations) 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, awsEc2query_deserializeOpErrorDeleteVpcEndpointServiceConfigurations(response, &metadata)
+ }
+ output := &DeleteVpcEndpointServiceConfigurationsOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDeleteVpcEndpointServiceConfigurationsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDeleteVpcEndpointServiceConfigurations(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDeleteVpcPeeringConnection struct {
+}
+
+func (*awsEc2query_deserializeOpDeleteVpcPeeringConnection) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDeleteVpcPeeringConnection) 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, awsEc2query_deserializeOpErrorDeleteVpcPeeringConnection(response, &metadata)
+ }
+ output := &DeleteVpcPeeringConnectionOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDeleteVpcPeeringConnectionOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDeleteVpcPeeringConnection(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDeleteVpnConnection struct {
+}
+
+func (*awsEc2query_deserializeOpDeleteVpnConnection) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDeleteVpnConnection) 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, awsEc2query_deserializeOpErrorDeleteVpnConnection(response, &metadata)
+ }
+ output := &DeleteVpnConnectionOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDeleteVpnConnection(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDeleteVpnConnectionRoute struct {
+}
+
+func (*awsEc2query_deserializeOpDeleteVpnConnectionRoute) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDeleteVpnConnectionRoute) 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, awsEc2query_deserializeOpErrorDeleteVpnConnectionRoute(response, &metadata)
+ }
+ output := &DeleteVpnConnectionRouteOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDeleteVpnConnectionRoute(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDeleteVpnGateway struct {
+}
+
+func (*awsEc2query_deserializeOpDeleteVpnGateway) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDeleteVpnGateway) 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, awsEc2query_deserializeOpErrorDeleteVpnGateway(response, &metadata)
+ }
+ output := &DeleteVpnGatewayOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDeleteVpnGateway(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDeprovisionByoipCidr struct {
+}
+
+func (*awsEc2query_deserializeOpDeprovisionByoipCidr) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDeprovisionByoipCidr) 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, awsEc2query_deserializeOpErrorDeprovisionByoipCidr(response, &metadata)
+ }
+ output := &DeprovisionByoipCidrOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDeprovisionByoipCidrOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDeprovisionByoipCidr(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDeregisterImage struct {
+}
+
+func (*awsEc2query_deserializeOpDeregisterImage) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDeregisterImage) 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, awsEc2query_deserializeOpErrorDeregisterImage(response, &metadata)
+ }
+ output := &DeregisterImageOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDeregisterImage(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDeregisterInstanceEventNotificationAttributes struct {
+}
+
+func (*awsEc2query_deserializeOpDeregisterInstanceEventNotificationAttributes) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDeregisterInstanceEventNotificationAttributes) 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, awsEc2query_deserializeOpErrorDeregisterInstanceEventNotificationAttributes(response, &metadata)
+ }
+ output := &DeregisterInstanceEventNotificationAttributesOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDeregisterInstanceEventNotificationAttributesOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDeregisterInstanceEventNotificationAttributes(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDeregisterTransitGatewayMulticastGroupMembers struct {
+}
+
+func (*awsEc2query_deserializeOpDeregisterTransitGatewayMulticastGroupMembers) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDeregisterTransitGatewayMulticastGroupMembers) 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, awsEc2query_deserializeOpErrorDeregisterTransitGatewayMulticastGroupMembers(response, &metadata)
+ }
+ output := &DeregisterTransitGatewayMulticastGroupMembersOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDeregisterTransitGatewayMulticastGroupMembersOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDeregisterTransitGatewayMulticastGroupMembers(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDeregisterTransitGatewayMulticastGroupSources struct {
+}
+
+func (*awsEc2query_deserializeOpDeregisterTransitGatewayMulticastGroupSources) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDeregisterTransitGatewayMulticastGroupSources) 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, awsEc2query_deserializeOpErrorDeregisterTransitGatewayMulticastGroupSources(response, &metadata)
+ }
+ output := &DeregisterTransitGatewayMulticastGroupSourcesOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDeregisterTransitGatewayMulticastGroupSourcesOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDeregisterTransitGatewayMulticastGroupSources(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeAccountAttributes struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeAccountAttributes) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeAccountAttributes) 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, awsEc2query_deserializeOpErrorDescribeAccountAttributes(response, &metadata)
+ }
+ output := &DescribeAccountAttributesOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeAccountAttributesOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeAccountAttributes(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeAddresses struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeAddresses) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeAddresses) 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, awsEc2query_deserializeOpErrorDescribeAddresses(response, &metadata)
+ }
+ output := &DescribeAddressesOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeAddressesOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeAddresses(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeAddressesAttribute struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeAddressesAttribute) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeAddressesAttribute) 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, awsEc2query_deserializeOpErrorDescribeAddressesAttribute(response, &metadata)
+ }
+ output := &DescribeAddressesAttributeOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeAddressesAttributeOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeAddressesAttribute(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeAggregateIdFormat struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeAggregateIdFormat) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeAggregateIdFormat) 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, awsEc2query_deserializeOpErrorDescribeAggregateIdFormat(response, &metadata)
+ }
+ output := &DescribeAggregateIdFormatOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeAggregateIdFormatOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeAggregateIdFormat(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeAvailabilityZones struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeAvailabilityZones) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeAvailabilityZones) 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, awsEc2query_deserializeOpErrorDescribeAvailabilityZones(response, &metadata)
+ }
+ output := &DescribeAvailabilityZonesOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeAvailabilityZonesOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeAvailabilityZones(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeBundleTasks struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeBundleTasks) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeBundleTasks) 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, awsEc2query_deserializeOpErrorDescribeBundleTasks(response, &metadata)
+ }
+ output := &DescribeBundleTasksOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeBundleTasksOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeBundleTasks(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeByoipCidrs struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeByoipCidrs) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeByoipCidrs) 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, awsEc2query_deserializeOpErrorDescribeByoipCidrs(response, &metadata)
+ }
+ output := &DescribeByoipCidrsOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeByoipCidrsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeByoipCidrs(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeCapacityReservations struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeCapacityReservations) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeCapacityReservations) 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, awsEc2query_deserializeOpErrorDescribeCapacityReservations(response, &metadata)
+ }
+ output := &DescribeCapacityReservationsOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeCapacityReservationsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeCapacityReservations(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeCarrierGateways struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeCarrierGateways) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeCarrierGateways) 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, awsEc2query_deserializeOpErrorDescribeCarrierGateways(response, &metadata)
+ }
+ output := &DescribeCarrierGatewaysOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeCarrierGatewaysOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeCarrierGateways(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeClassicLinkInstances struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeClassicLinkInstances) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeClassicLinkInstances) 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, awsEc2query_deserializeOpErrorDescribeClassicLinkInstances(response, &metadata)
+ }
+ output := &DescribeClassicLinkInstancesOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeClassicLinkInstancesOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeClassicLinkInstances(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeClientVpnAuthorizationRules struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeClientVpnAuthorizationRules) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeClientVpnAuthorizationRules) 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, awsEc2query_deserializeOpErrorDescribeClientVpnAuthorizationRules(response, &metadata)
+ }
+ output := &DescribeClientVpnAuthorizationRulesOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeClientVpnAuthorizationRulesOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeClientVpnAuthorizationRules(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeClientVpnConnections struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeClientVpnConnections) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeClientVpnConnections) 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, awsEc2query_deserializeOpErrorDescribeClientVpnConnections(response, &metadata)
+ }
+ output := &DescribeClientVpnConnectionsOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeClientVpnConnectionsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeClientVpnConnections(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeClientVpnEndpoints struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeClientVpnEndpoints) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeClientVpnEndpoints) 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, awsEc2query_deserializeOpErrorDescribeClientVpnEndpoints(response, &metadata)
+ }
+ output := &DescribeClientVpnEndpointsOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeClientVpnEndpointsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeClientVpnEndpoints(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeClientVpnRoutes struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeClientVpnRoutes) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeClientVpnRoutes) 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, awsEc2query_deserializeOpErrorDescribeClientVpnRoutes(response, &metadata)
+ }
+ output := &DescribeClientVpnRoutesOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeClientVpnRoutesOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeClientVpnRoutes(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeClientVpnTargetNetworks struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeClientVpnTargetNetworks) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeClientVpnTargetNetworks) 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, awsEc2query_deserializeOpErrorDescribeClientVpnTargetNetworks(response, &metadata)
+ }
+ output := &DescribeClientVpnTargetNetworksOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeClientVpnTargetNetworksOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeClientVpnTargetNetworks(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeCoipPools struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeCoipPools) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeCoipPools) 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, awsEc2query_deserializeOpErrorDescribeCoipPools(response, &metadata)
+ }
+ output := &DescribeCoipPoolsOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeCoipPoolsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeCoipPools(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeConversionTasks struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeConversionTasks) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeConversionTasks) 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, awsEc2query_deserializeOpErrorDescribeConversionTasks(response, &metadata)
+ }
+ output := &DescribeConversionTasksOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeConversionTasksOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeConversionTasks(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeCustomerGateways struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeCustomerGateways) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeCustomerGateways) 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, awsEc2query_deserializeOpErrorDescribeCustomerGateways(response, &metadata)
+ }
+ output := &DescribeCustomerGatewaysOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeCustomerGatewaysOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeCustomerGateways(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeDhcpOptions struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeDhcpOptions) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeDhcpOptions) 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, awsEc2query_deserializeOpErrorDescribeDhcpOptions(response, &metadata)
+ }
+ output := &DescribeDhcpOptionsOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeDhcpOptionsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeDhcpOptions(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeEgressOnlyInternetGateways struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeEgressOnlyInternetGateways) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeEgressOnlyInternetGateways) 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, awsEc2query_deserializeOpErrorDescribeEgressOnlyInternetGateways(response, &metadata)
+ }
+ output := &DescribeEgressOnlyInternetGatewaysOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeEgressOnlyInternetGatewaysOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeEgressOnlyInternetGateways(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeElasticGpus struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeElasticGpus) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeElasticGpus) 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, awsEc2query_deserializeOpErrorDescribeElasticGpus(response, &metadata)
+ }
+ output := &DescribeElasticGpusOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeElasticGpusOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeElasticGpus(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeExportImageTasks struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeExportImageTasks) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeExportImageTasks) 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, awsEc2query_deserializeOpErrorDescribeExportImageTasks(response, &metadata)
+ }
+ output := &DescribeExportImageTasksOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeExportImageTasksOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeExportImageTasks(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeExportTasks struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeExportTasks) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeExportTasks) 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, awsEc2query_deserializeOpErrorDescribeExportTasks(response, &metadata)
+ }
+ output := &DescribeExportTasksOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeExportTasksOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeExportTasks(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeFastSnapshotRestores struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeFastSnapshotRestores) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeFastSnapshotRestores) 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, awsEc2query_deserializeOpErrorDescribeFastSnapshotRestores(response, &metadata)
+ }
+ output := &DescribeFastSnapshotRestoresOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeFastSnapshotRestoresOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeFastSnapshotRestores(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeFleetHistory struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeFleetHistory) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeFleetHistory) 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, awsEc2query_deserializeOpErrorDescribeFleetHistory(response, &metadata)
+ }
+ output := &DescribeFleetHistoryOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeFleetHistoryOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeFleetHistory(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeFleetInstances struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeFleetInstances) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeFleetInstances) 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, awsEc2query_deserializeOpErrorDescribeFleetInstances(response, &metadata)
+ }
+ output := &DescribeFleetInstancesOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeFleetInstancesOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeFleetInstances(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeFleets struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeFleets) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeFleets) 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, awsEc2query_deserializeOpErrorDescribeFleets(response, &metadata)
+ }
+ output := &DescribeFleetsOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeFleetsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeFleets(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeFlowLogs struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeFlowLogs) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeFlowLogs) 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, awsEc2query_deserializeOpErrorDescribeFlowLogs(response, &metadata)
+ }
+ output := &DescribeFlowLogsOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeFlowLogsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeFlowLogs(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeFpgaImageAttribute struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeFpgaImageAttribute) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeFpgaImageAttribute) 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, awsEc2query_deserializeOpErrorDescribeFpgaImageAttribute(response, &metadata)
+ }
+ output := &DescribeFpgaImageAttributeOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeFpgaImageAttributeOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeFpgaImageAttribute(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeFpgaImages struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeFpgaImages) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeFpgaImages) 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, awsEc2query_deserializeOpErrorDescribeFpgaImages(response, &metadata)
+ }
+ output := &DescribeFpgaImagesOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeFpgaImagesOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeFpgaImages(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeHostReservationOfferings struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeHostReservationOfferings) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeHostReservationOfferings) 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, awsEc2query_deserializeOpErrorDescribeHostReservationOfferings(response, &metadata)
+ }
+ output := &DescribeHostReservationOfferingsOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeHostReservationOfferingsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeHostReservationOfferings(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeHostReservations struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeHostReservations) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeHostReservations) 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, awsEc2query_deserializeOpErrorDescribeHostReservations(response, &metadata)
+ }
+ output := &DescribeHostReservationsOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeHostReservationsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeHostReservations(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeHosts struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeHosts) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeHosts) 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, awsEc2query_deserializeOpErrorDescribeHosts(response, &metadata)
+ }
+ output := &DescribeHostsOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeHostsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeHosts(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeIamInstanceProfileAssociations struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeIamInstanceProfileAssociations) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeIamInstanceProfileAssociations) 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, awsEc2query_deserializeOpErrorDescribeIamInstanceProfileAssociations(response, &metadata)
+ }
+ output := &DescribeIamInstanceProfileAssociationsOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeIamInstanceProfileAssociationsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeIamInstanceProfileAssociations(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeIdentityIdFormat struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeIdentityIdFormat) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeIdentityIdFormat) 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, awsEc2query_deserializeOpErrorDescribeIdentityIdFormat(response, &metadata)
+ }
+ output := &DescribeIdentityIdFormatOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeIdentityIdFormatOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeIdentityIdFormat(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeIdFormat struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeIdFormat) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeIdFormat) 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, awsEc2query_deserializeOpErrorDescribeIdFormat(response, &metadata)
+ }
+ output := &DescribeIdFormatOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeIdFormatOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeIdFormat(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeImageAttribute struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeImageAttribute) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeImageAttribute) 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, awsEc2query_deserializeOpErrorDescribeImageAttribute(response, &metadata)
+ }
+ output := &DescribeImageAttributeOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeImageAttributeOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeImageAttribute(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeImages struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeImages) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeImages) 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, awsEc2query_deserializeOpErrorDescribeImages(response, &metadata)
+ }
+ output := &DescribeImagesOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeImagesOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeImages(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeImportImageTasks struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeImportImageTasks) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeImportImageTasks) 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, awsEc2query_deserializeOpErrorDescribeImportImageTasks(response, &metadata)
+ }
+ output := &DescribeImportImageTasksOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeImportImageTasksOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeImportImageTasks(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeImportSnapshotTasks struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeImportSnapshotTasks) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeImportSnapshotTasks) 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, awsEc2query_deserializeOpErrorDescribeImportSnapshotTasks(response, &metadata)
+ }
+ output := &DescribeImportSnapshotTasksOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeImportSnapshotTasksOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeImportSnapshotTasks(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeInstanceAttribute struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeInstanceAttribute) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeInstanceAttribute) 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, awsEc2query_deserializeOpErrorDescribeInstanceAttribute(response, &metadata)
+ }
+ output := &DescribeInstanceAttributeOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeInstanceAttributeOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeInstanceAttribute(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeInstanceCreditSpecifications struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeInstanceCreditSpecifications) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeInstanceCreditSpecifications) 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, awsEc2query_deserializeOpErrorDescribeInstanceCreditSpecifications(response, &metadata)
+ }
+ output := &DescribeInstanceCreditSpecificationsOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeInstanceCreditSpecificationsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeInstanceCreditSpecifications(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeInstanceEventNotificationAttributes struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeInstanceEventNotificationAttributes) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeInstanceEventNotificationAttributes) 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, awsEc2query_deserializeOpErrorDescribeInstanceEventNotificationAttributes(response, &metadata)
+ }
+ output := &DescribeInstanceEventNotificationAttributesOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeInstanceEventNotificationAttributesOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeInstanceEventNotificationAttributes(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeInstanceEventWindows struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeInstanceEventWindows) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeInstanceEventWindows) 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, awsEc2query_deserializeOpErrorDescribeInstanceEventWindows(response, &metadata)
+ }
+ output := &DescribeInstanceEventWindowsOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeInstanceEventWindowsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeInstanceEventWindows(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeInstances struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeInstances) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeInstances) 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, awsEc2query_deserializeOpErrorDescribeInstances(response, &metadata)
+ }
+ output := &DescribeInstancesOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeInstancesOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeInstances(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeInstanceStatus struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeInstanceStatus) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeInstanceStatus) 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, awsEc2query_deserializeOpErrorDescribeInstanceStatus(response, &metadata)
+ }
+ output := &DescribeInstanceStatusOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeInstanceStatusOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeInstanceStatus(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeInstanceTypeOfferings struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeInstanceTypeOfferings) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeInstanceTypeOfferings) 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, awsEc2query_deserializeOpErrorDescribeInstanceTypeOfferings(response, &metadata)
+ }
+ output := &DescribeInstanceTypeOfferingsOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeInstanceTypeOfferingsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeInstanceTypeOfferings(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeInstanceTypes struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeInstanceTypes) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeInstanceTypes) 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, awsEc2query_deserializeOpErrorDescribeInstanceTypes(response, &metadata)
+ }
+ output := &DescribeInstanceTypesOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeInstanceTypesOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeInstanceTypes(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeInternetGateways struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeInternetGateways) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeInternetGateways) 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, awsEc2query_deserializeOpErrorDescribeInternetGateways(response, &metadata)
+ }
+ output := &DescribeInternetGatewaysOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeInternetGatewaysOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeInternetGateways(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeIpv6Pools struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeIpv6Pools) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeIpv6Pools) 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, awsEc2query_deserializeOpErrorDescribeIpv6Pools(response, &metadata)
+ }
+ output := &DescribeIpv6PoolsOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeIpv6PoolsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeIpv6Pools(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeKeyPairs struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeKeyPairs) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeKeyPairs) 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, awsEc2query_deserializeOpErrorDescribeKeyPairs(response, &metadata)
+ }
+ output := &DescribeKeyPairsOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeKeyPairsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeKeyPairs(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeLaunchTemplates struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeLaunchTemplates) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeLaunchTemplates) 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, awsEc2query_deserializeOpErrorDescribeLaunchTemplates(response, &metadata)
+ }
+ output := &DescribeLaunchTemplatesOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeLaunchTemplatesOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeLaunchTemplates(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeLaunchTemplateVersions struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeLaunchTemplateVersions) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeLaunchTemplateVersions) 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, awsEc2query_deserializeOpErrorDescribeLaunchTemplateVersions(response, &metadata)
+ }
+ output := &DescribeLaunchTemplateVersionsOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeLaunchTemplateVersionsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeLaunchTemplateVersions(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeLocalGatewayRouteTables struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeLocalGatewayRouteTables) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeLocalGatewayRouteTables) 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, awsEc2query_deserializeOpErrorDescribeLocalGatewayRouteTables(response, &metadata)
+ }
+ output := &DescribeLocalGatewayRouteTablesOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeLocalGatewayRouteTablesOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeLocalGatewayRouteTables(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociations struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociations) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociations) 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, awsEc2query_deserializeOpErrorDescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociations(response, &metadata)
+ }
+ output := &DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociations(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeLocalGatewayRouteTableVpcAssociations struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeLocalGatewayRouteTableVpcAssociations) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeLocalGatewayRouteTableVpcAssociations) 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, awsEc2query_deserializeOpErrorDescribeLocalGatewayRouteTableVpcAssociations(response, &metadata)
+ }
+ output := &DescribeLocalGatewayRouteTableVpcAssociationsOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeLocalGatewayRouteTableVpcAssociationsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeLocalGatewayRouteTableVpcAssociations(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeLocalGateways struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeLocalGateways) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeLocalGateways) 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, awsEc2query_deserializeOpErrorDescribeLocalGateways(response, &metadata)
+ }
+ output := &DescribeLocalGatewaysOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeLocalGatewaysOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeLocalGateways(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeLocalGatewayVirtualInterfaceGroups struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeLocalGatewayVirtualInterfaceGroups) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeLocalGatewayVirtualInterfaceGroups) 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, awsEc2query_deserializeOpErrorDescribeLocalGatewayVirtualInterfaceGroups(response, &metadata)
+ }
+ output := &DescribeLocalGatewayVirtualInterfaceGroupsOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeLocalGatewayVirtualInterfaceGroupsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeLocalGatewayVirtualInterfaceGroups(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeLocalGatewayVirtualInterfaces struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeLocalGatewayVirtualInterfaces) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeLocalGatewayVirtualInterfaces) 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, awsEc2query_deserializeOpErrorDescribeLocalGatewayVirtualInterfaces(response, &metadata)
+ }
+ output := &DescribeLocalGatewayVirtualInterfacesOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeLocalGatewayVirtualInterfacesOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeLocalGatewayVirtualInterfaces(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeManagedPrefixLists struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeManagedPrefixLists) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeManagedPrefixLists) 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, awsEc2query_deserializeOpErrorDescribeManagedPrefixLists(response, &metadata)
+ }
+ output := &DescribeManagedPrefixListsOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeManagedPrefixListsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeManagedPrefixLists(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeMovingAddresses struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeMovingAddresses) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeMovingAddresses) 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, awsEc2query_deserializeOpErrorDescribeMovingAddresses(response, &metadata)
+ }
+ output := &DescribeMovingAddressesOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeMovingAddressesOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeMovingAddresses(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeNatGateways struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeNatGateways) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeNatGateways) 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, awsEc2query_deserializeOpErrorDescribeNatGateways(response, &metadata)
+ }
+ output := &DescribeNatGatewaysOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeNatGatewaysOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeNatGateways(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeNetworkAcls struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeNetworkAcls) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeNetworkAcls) 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, awsEc2query_deserializeOpErrorDescribeNetworkAcls(response, &metadata)
+ }
+ output := &DescribeNetworkAclsOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeNetworkAclsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeNetworkAcls(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeNetworkInsightsAnalyses struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeNetworkInsightsAnalyses) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeNetworkInsightsAnalyses) 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, awsEc2query_deserializeOpErrorDescribeNetworkInsightsAnalyses(response, &metadata)
+ }
+ output := &DescribeNetworkInsightsAnalysesOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeNetworkInsightsAnalysesOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeNetworkInsightsAnalyses(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeNetworkInsightsPaths struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeNetworkInsightsPaths) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeNetworkInsightsPaths) 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, awsEc2query_deserializeOpErrorDescribeNetworkInsightsPaths(response, &metadata)
+ }
+ output := &DescribeNetworkInsightsPathsOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeNetworkInsightsPathsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeNetworkInsightsPaths(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeNetworkInterfaceAttribute struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeNetworkInterfaceAttribute) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeNetworkInterfaceAttribute) 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, awsEc2query_deserializeOpErrorDescribeNetworkInterfaceAttribute(response, &metadata)
+ }
+ output := &DescribeNetworkInterfaceAttributeOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeNetworkInterfaceAttributeOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeNetworkInterfaceAttribute(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeNetworkInterfacePermissions struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeNetworkInterfacePermissions) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeNetworkInterfacePermissions) 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, awsEc2query_deserializeOpErrorDescribeNetworkInterfacePermissions(response, &metadata)
+ }
+ output := &DescribeNetworkInterfacePermissionsOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeNetworkInterfacePermissionsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeNetworkInterfacePermissions(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeNetworkInterfaces struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeNetworkInterfaces) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeNetworkInterfaces) 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, awsEc2query_deserializeOpErrorDescribeNetworkInterfaces(response, &metadata)
+ }
+ output := &DescribeNetworkInterfacesOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeNetworkInterfacesOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeNetworkInterfaces(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribePlacementGroups struct {
+}
+
+func (*awsEc2query_deserializeOpDescribePlacementGroups) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribePlacementGroups) 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, awsEc2query_deserializeOpErrorDescribePlacementGroups(response, &metadata)
+ }
+ output := &DescribePlacementGroupsOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribePlacementGroupsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribePlacementGroups(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribePrefixLists struct {
+}
+
+func (*awsEc2query_deserializeOpDescribePrefixLists) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribePrefixLists) 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, awsEc2query_deserializeOpErrorDescribePrefixLists(response, &metadata)
+ }
+ output := &DescribePrefixListsOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribePrefixListsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribePrefixLists(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribePrincipalIdFormat struct {
+}
+
+func (*awsEc2query_deserializeOpDescribePrincipalIdFormat) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribePrincipalIdFormat) 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, awsEc2query_deserializeOpErrorDescribePrincipalIdFormat(response, &metadata)
+ }
+ output := &DescribePrincipalIdFormatOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribePrincipalIdFormatOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribePrincipalIdFormat(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribePublicIpv4Pools struct {
+}
+
+func (*awsEc2query_deserializeOpDescribePublicIpv4Pools) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribePublicIpv4Pools) 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, awsEc2query_deserializeOpErrorDescribePublicIpv4Pools(response, &metadata)
+ }
+ output := &DescribePublicIpv4PoolsOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribePublicIpv4PoolsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribePublicIpv4Pools(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeRegions struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeRegions) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeRegions) 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, awsEc2query_deserializeOpErrorDescribeRegions(response, &metadata)
+ }
+ output := &DescribeRegionsOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeRegionsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeRegions(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeReplaceRootVolumeTasks struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeReplaceRootVolumeTasks) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeReplaceRootVolumeTasks) 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, awsEc2query_deserializeOpErrorDescribeReplaceRootVolumeTasks(response, &metadata)
+ }
+ output := &DescribeReplaceRootVolumeTasksOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeReplaceRootVolumeTasksOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeReplaceRootVolumeTasks(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeReservedInstances struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeReservedInstances) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeReservedInstances) 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, awsEc2query_deserializeOpErrorDescribeReservedInstances(response, &metadata)
+ }
+ output := &DescribeReservedInstancesOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeReservedInstancesOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeReservedInstances(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeReservedInstancesListings struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeReservedInstancesListings) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeReservedInstancesListings) 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, awsEc2query_deserializeOpErrorDescribeReservedInstancesListings(response, &metadata)
+ }
+ output := &DescribeReservedInstancesListingsOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeReservedInstancesListingsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeReservedInstancesListings(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeReservedInstancesModifications struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeReservedInstancesModifications) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeReservedInstancesModifications) 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, awsEc2query_deserializeOpErrorDescribeReservedInstancesModifications(response, &metadata)
+ }
+ output := &DescribeReservedInstancesModificationsOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeReservedInstancesModificationsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeReservedInstancesModifications(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeReservedInstancesOfferings struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeReservedInstancesOfferings) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeReservedInstancesOfferings) 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, awsEc2query_deserializeOpErrorDescribeReservedInstancesOfferings(response, &metadata)
+ }
+ output := &DescribeReservedInstancesOfferingsOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeReservedInstancesOfferingsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeReservedInstancesOfferings(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeRouteTables struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeRouteTables) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeRouteTables) 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, awsEc2query_deserializeOpErrorDescribeRouteTables(response, &metadata)
+ }
+ output := &DescribeRouteTablesOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeRouteTablesOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeRouteTables(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeScheduledInstanceAvailability struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeScheduledInstanceAvailability) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeScheduledInstanceAvailability) 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, awsEc2query_deserializeOpErrorDescribeScheduledInstanceAvailability(response, &metadata)
+ }
+ output := &DescribeScheduledInstanceAvailabilityOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeScheduledInstanceAvailabilityOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeScheduledInstanceAvailability(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeScheduledInstances struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeScheduledInstances) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeScheduledInstances) 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, awsEc2query_deserializeOpErrorDescribeScheduledInstances(response, &metadata)
+ }
+ output := &DescribeScheduledInstancesOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeScheduledInstancesOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeScheduledInstances(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeSecurityGroupReferences struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeSecurityGroupReferences) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeSecurityGroupReferences) 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, awsEc2query_deserializeOpErrorDescribeSecurityGroupReferences(response, &metadata)
+ }
+ output := &DescribeSecurityGroupReferencesOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeSecurityGroupReferencesOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeSecurityGroupReferences(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeSecurityGroupRules struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeSecurityGroupRules) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeSecurityGroupRules) 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, awsEc2query_deserializeOpErrorDescribeSecurityGroupRules(response, &metadata)
+ }
+ output := &DescribeSecurityGroupRulesOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeSecurityGroupRulesOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeSecurityGroupRules(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeSecurityGroups struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeSecurityGroups) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeSecurityGroups) 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, awsEc2query_deserializeOpErrorDescribeSecurityGroups(response, &metadata)
+ }
+ output := &DescribeSecurityGroupsOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeSecurityGroupsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeSecurityGroups(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeSnapshotAttribute struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeSnapshotAttribute) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeSnapshotAttribute) 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, awsEc2query_deserializeOpErrorDescribeSnapshotAttribute(response, &metadata)
+ }
+ output := &DescribeSnapshotAttributeOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeSnapshotAttributeOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeSnapshotAttribute(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeSnapshots struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeSnapshots) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeSnapshots) 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, awsEc2query_deserializeOpErrorDescribeSnapshots(response, &metadata)
+ }
+ output := &DescribeSnapshotsOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeSnapshotsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeSnapshots(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeSpotDatafeedSubscription struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeSpotDatafeedSubscription) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeSpotDatafeedSubscription) 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, awsEc2query_deserializeOpErrorDescribeSpotDatafeedSubscription(response, &metadata)
+ }
+ output := &DescribeSpotDatafeedSubscriptionOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeSpotDatafeedSubscriptionOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeSpotDatafeedSubscription(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeSpotFleetInstances struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeSpotFleetInstances) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeSpotFleetInstances) 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, awsEc2query_deserializeOpErrorDescribeSpotFleetInstances(response, &metadata)
+ }
+ output := &DescribeSpotFleetInstancesOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeSpotFleetInstancesOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeSpotFleetInstances(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeSpotFleetRequestHistory struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeSpotFleetRequestHistory) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeSpotFleetRequestHistory) 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, awsEc2query_deserializeOpErrorDescribeSpotFleetRequestHistory(response, &metadata)
+ }
+ output := &DescribeSpotFleetRequestHistoryOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeSpotFleetRequestHistoryOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeSpotFleetRequestHistory(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeSpotFleetRequests struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeSpotFleetRequests) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeSpotFleetRequests) 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, awsEc2query_deserializeOpErrorDescribeSpotFleetRequests(response, &metadata)
+ }
+ output := &DescribeSpotFleetRequestsOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeSpotFleetRequestsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeSpotFleetRequests(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeSpotInstanceRequests struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeSpotInstanceRequests) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeSpotInstanceRequests) 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, awsEc2query_deserializeOpErrorDescribeSpotInstanceRequests(response, &metadata)
+ }
+ output := &DescribeSpotInstanceRequestsOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeSpotInstanceRequestsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeSpotInstanceRequests(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeSpotPriceHistory struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeSpotPriceHistory) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeSpotPriceHistory) 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, awsEc2query_deserializeOpErrorDescribeSpotPriceHistory(response, &metadata)
+ }
+ output := &DescribeSpotPriceHistoryOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeSpotPriceHistoryOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeSpotPriceHistory(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeStaleSecurityGroups struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeStaleSecurityGroups) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeStaleSecurityGroups) 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, awsEc2query_deserializeOpErrorDescribeStaleSecurityGroups(response, &metadata)
+ }
+ output := &DescribeStaleSecurityGroupsOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeStaleSecurityGroupsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeStaleSecurityGroups(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeStoreImageTasks struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeStoreImageTasks) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeStoreImageTasks) 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, awsEc2query_deserializeOpErrorDescribeStoreImageTasks(response, &metadata)
+ }
+ output := &DescribeStoreImageTasksOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeStoreImageTasksOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeStoreImageTasks(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeSubnets struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeSubnets) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeSubnets) 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, awsEc2query_deserializeOpErrorDescribeSubnets(response, &metadata)
+ }
+ output := &DescribeSubnetsOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeSubnetsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeSubnets(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeTags struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeTags) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeTags) 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, awsEc2query_deserializeOpErrorDescribeTags(response, &metadata)
+ }
+ output := &DescribeTagsOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeTagsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeTags(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeTrafficMirrorFilters struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeTrafficMirrorFilters) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeTrafficMirrorFilters) 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, awsEc2query_deserializeOpErrorDescribeTrafficMirrorFilters(response, &metadata)
+ }
+ output := &DescribeTrafficMirrorFiltersOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeTrafficMirrorFiltersOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeTrafficMirrorFilters(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeTrafficMirrorSessions struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeTrafficMirrorSessions) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeTrafficMirrorSessions) 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, awsEc2query_deserializeOpErrorDescribeTrafficMirrorSessions(response, &metadata)
+ }
+ output := &DescribeTrafficMirrorSessionsOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeTrafficMirrorSessionsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeTrafficMirrorSessions(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeTrafficMirrorTargets struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeTrafficMirrorTargets) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeTrafficMirrorTargets) 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, awsEc2query_deserializeOpErrorDescribeTrafficMirrorTargets(response, &metadata)
+ }
+ output := &DescribeTrafficMirrorTargetsOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeTrafficMirrorTargetsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeTrafficMirrorTargets(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeTransitGatewayAttachments struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeTransitGatewayAttachments) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeTransitGatewayAttachments) 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, awsEc2query_deserializeOpErrorDescribeTransitGatewayAttachments(response, &metadata)
+ }
+ output := &DescribeTransitGatewayAttachmentsOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeTransitGatewayAttachmentsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeTransitGatewayAttachments(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeTransitGatewayConnectPeers struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeTransitGatewayConnectPeers) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeTransitGatewayConnectPeers) 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, awsEc2query_deserializeOpErrorDescribeTransitGatewayConnectPeers(response, &metadata)
+ }
+ output := &DescribeTransitGatewayConnectPeersOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeTransitGatewayConnectPeersOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeTransitGatewayConnectPeers(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeTransitGatewayConnects struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeTransitGatewayConnects) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeTransitGatewayConnects) 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, awsEc2query_deserializeOpErrorDescribeTransitGatewayConnects(response, &metadata)
+ }
+ output := &DescribeTransitGatewayConnectsOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeTransitGatewayConnectsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeTransitGatewayConnects(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeTransitGatewayMulticastDomains struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeTransitGatewayMulticastDomains) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeTransitGatewayMulticastDomains) 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, awsEc2query_deserializeOpErrorDescribeTransitGatewayMulticastDomains(response, &metadata)
+ }
+ output := &DescribeTransitGatewayMulticastDomainsOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeTransitGatewayMulticastDomainsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeTransitGatewayMulticastDomains(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeTransitGatewayPeeringAttachments struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeTransitGatewayPeeringAttachments) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeTransitGatewayPeeringAttachments) 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, awsEc2query_deserializeOpErrorDescribeTransitGatewayPeeringAttachments(response, &metadata)
+ }
+ output := &DescribeTransitGatewayPeeringAttachmentsOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeTransitGatewayPeeringAttachmentsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeTransitGatewayPeeringAttachments(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeTransitGatewayRouteTables struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeTransitGatewayRouteTables) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeTransitGatewayRouteTables) 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, awsEc2query_deserializeOpErrorDescribeTransitGatewayRouteTables(response, &metadata)
+ }
+ output := &DescribeTransitGatewayRouteTablesOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeTransitGatewayRouteTablesOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeTransitGatewayRouteTables(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeTransitGateways struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeTransitGateways) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeTransitGateways) 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, awsEc2query_deserializeOpErrorDescribeTransitGateways(response, &metadata)
+ }
+ output := &DescribeTransitGatewaysOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeTransitGatewaysOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeTransitGateways(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeTransitGatewayVpcAttachments struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeTransitGatewayVpcAttachments) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeTransitGatewayVpcAttachments) 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, awsEc2query_deserializeOpErrorDescribeTransitGatewayVpcAttachments(response, &metadata)
+ }
+ output := &DescribeTransitGatewayVpcAttachmentsOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeTransitGatewayVpcAttachmentsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeTransitGatewayVpcAttachments(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeTrunkInterfaceAssociations struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeTrunkInterfaceAssociations) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeTrunkInterfaceAssociations) 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, awsEc2query_deserializeOpErrorDescribeTrunkInterfaceAssociations(response, &metadata)
+ }
+ output := &DescribeTrunkInterfaceAssociationsOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeTrunkInterfaceAssociationsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeTrunkInterfaceAssociations(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeVolumeAttribute struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeVolumeAttribute) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeVolumeAttribute) 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, awsEc2query_deserializeOpErrorDescribeVolumeAttribute(response, &metadata)
+ }
+ output := &DescribeVolumeAttributeOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeVolumeAttributeOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeVolumeAttribute(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeVolumes struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeVolumes) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeVolumes) 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, awsEc2query_deserializeOpErrorDescribeVolumes(response, &metadata)
+ }
+ output := &DescribeVolumesOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeVolumesOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeVolumes(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeVolumesModifications struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeVolumesModifications) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeVolumesModifications) 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, awsEc2query_deserializeOpErrorDescribeVolumesModifications(response, &metadata)
+ }
+ output := &DescribeVolumesModificationsOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeVolumesModificationsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeVolumesModifications(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeVolumeStatus struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeVolumeStatus) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeVolumeStatus) 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, awsEc2query_deserializeOpErrorDescribeVolumeStatus(response, &metadata)
+ }
+ output := &DescribeVolumeStatusOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeVolumeStatusOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeVolumeStatus(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeVpcAttribute struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeVpcAttribute) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeVpcAttribute) 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, awsEc2query_deserializeOpErrorDescribeVpcAttribute(response, &metadata)
+ }
+ output := &DescribeVpcAttributeOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeVpcAttributeOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeVpcAttribute(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeVpcClassicLink struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeVpcClassicLink) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeVpcClassicLink) 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, awsEc2query_deserializeOpErrorDescribeVpcClassicLink(response, &metadata)
+ }
+ output := &DescribeVpcClassicLinkOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeVpcClassicLinkOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeVpcClassicLink(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeVpcClassicLinkDnsSupport struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeVpcClassicLinkDnsSupport) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeVpcClassicLinkDnsSupport) 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, awsEc2query_deserializeOpErrorDescribeVpcClassicLinkDnsSupport(response, &metadata)
+ }
+ output := &DescribeVpcClassicLinkDnsSupportOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeVpcClassicLinkDnsSupportOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeVpcClassicLinkDnsSupport(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeVpcEndpointConnectionNotifications struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeVpcEndpointConnectionNotifications) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeVpcEndpointConnectionNotifications) 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, awsEc2query_deserializeOpErrorDescribeVpcEndpointConnectionNotifications(response, &metadata)
+ }
+ output := &DescribeVpcEndpointConnectionNotificationsOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeVpcEndpointConnectionNotificationsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeVpcEndpointConnectionNotifications(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeVpcEndpointConnections struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeVpcEndpointConnections) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeVpcEndpointConnections) 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, awsEc2query_deserializeOpErrorDescribeVpcEndpointConnections(response, &metadata)
+ }
+ output := &DescribeVpcEndpointConnectionsOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeVpcEndpointConnectionsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeVpcEndpointConnections(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeVpcEndpoints struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeVpcEndpoints) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeVpcEndpoints) 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, awsEc2query_deserializeOpErrorDescribeVpcEndpoints(response, &metadata)
+ }
+ output := &DescribeVpcEndpointsOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeVpcEndpointsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeVpcEndpoints(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeVpcEndpointServiceConfigurations struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeVpcEndpointServiceConfigurations) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeVpcEndpointServiceConfigurations) 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, awsEc2query_deserializeOpErrorDescribeVpcEndpointServiceConfigurations(response, &metadata)
+ }
+ output := &DescribeVpcEndpointServiceConfigurationsOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeVpcEndpointServiceConfigurationsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeVpcEndpointServiceConfigurations(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeVpcEndpointServicePermissions struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeVpcEndpointServicePermissions) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeVpcEndpointServicePermissions) 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, awsEc2query_deserializeOpErrorDescribeVpcEndpointServicePermissions(response, &metadata)
+ }
+ output := &DescribeVpcEndpointServicePermissionsOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeVpcEndpointServicePermissionsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeVpcEndpointServicePermissions(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeVpcEndpointServices struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeVpcEndpointServices) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeVpcEndpointServices) 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, awsEc2query_deserializeOpErrorDescribeVpcEndpointServices(response, &metadata)
+ }
+ output := &DescribeVpcEndpointServicesOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeVpcEndpointServicesOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeVpcEndpointServices(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeVpcPeeringConnections struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeVpcPeeringConnections) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeVpcPeeringConnections) 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, awsEc2query_deserializeOpErrorDescribeVpcPeeringConnections(response, &metadata)
+ }
+ output := &DescribeVpcPeeringConnectionsOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeVpcPeeringConnectionsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeVpcPeeringConnections(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeVpcs struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeVpcs) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeVpcs) 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, awsEc2query_deserializeOpErrorDescribeVpcs(response, &metadata)
+ }
+ output := &DescribeVpcsOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeVpcsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeVpcs(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeVpnConnections struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeVpnConnections) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeVpnConnections) 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, awsEc2query_deserializeOpErrorDescribeVpnConnections(response, &metadata)
+ }
+ output := &DescribeVpnConnectionsOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeVpnConnectionsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeVpnConnections(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDescribeVpnGateways struct {
+}
+
+func (*awsEc2query_deserializeOpDescribeVpnGateways) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDescribeVpnGateways) 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, awsEc2query_deserializeOpErrorDescribeVpnGateways(response, &metadata)
+ }
+ output := &DescribeVpnGatewaysOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDescribeVpnGatewaysOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDescribeVpnGateways(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDetachClassicLinkVpc struct {
+}
+
+func (*awsEc2query_deserializeOpDetachClassicLinkVpc) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDetachClassicLinkVpc) 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, awsEc2query_deserializeOpErrorDetachClassicLinkVpc(response, &metadata)
+ }
+ output := &DetachClassicLinkVpcOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDetachClassicLinkVpcOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDetachClassicLinkVpc(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDetachInternetGateway struct {
+}
+
+func (*awsEc2query_deserializeOpDetachInternetGateway) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDetachInternetGateway) 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, awsEc2query_deserializeOpErrorDetachInternetGateway(response, &metadata)
+ }
+ output := &DetachInternetGatewayOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDetachInternetGateway(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDetachNetworkInterface struct {
+}
+
+func (*awsEc2query_deserializeOpDetachNetworkInterface) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDetachNetworkInterface) 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, awsEc2query_deserializeOpErrorDetachNetworkInterface(response, &metadata)
+ }
+ output := &DetachNetworkInterfaceOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDetachNetworkInterface(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDetachVolume struct {
+}
+
+func (*awsEc2query_deserializeOpDetachVolume) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDetachVolume) 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, awsEc2query_deserializeOpErrorDetachVolume(response, &metadata)
+ }
+ output := &DetachVolumeOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDetachVolumeOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDetachVolume(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDetachVpnGateway struct {
+}
+
+func (*awsEc2query_deserializeOpDetachVpnGateway) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDetachVpnGateway) 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, awsEc2query_deserializeOpErrorDetachVpnGateway(response, &metadata)
+ }
+ output := &DetachVpnGatewayOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDetachVpnGateway(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDisableEbsEncryptionByDefault struct {
+}
+
+func (*awsEc2query_deserializeOpDisableEbsEncryptionByDefault) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDisableEbsEncryptionByDefault) 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, awsEc2query_deserializeOpErrorDisableEbsEncryptionByDefault(response, &metadata)
+ }
+ output := &DisableEbsEncryptionByDefaultOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDisableEbsEncryptionByDefaultOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDisableEbsEncryptionByDefault(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDisableFastSnapshotRestores struct {
+}
+
+func (*awsEc2query_deserializeOpDisableFastSnapshotRestores) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDisableFastSnapshotRestores) 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, awsEc2query_deserializeOpErrorDisableFastSnapshotRestores(response, &metadata)
+ }
+ output := &DisableFastSnapshotRestoresOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDisableFastSnapshotRestoresOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDisableFastSnapshotRestores(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDisableImageDeprecation struct {
+}
+
+func (*awsEc2query_deserializeOpDisableImageDeprecation) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDisableImageDeprecation) 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, awsEc2query_deserializeOpErrorDisableImageDeprecation(response, &metadata)
+ }
+ output := &DisableImageDeprecationOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDisableImageDeprecationOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDisableImageDeprecation(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDisableSerialConsoleAccess struct {
+}
+
+func (*awsEc2query_deserializeOpDisableSerialConsoleAccess) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDisableSerialConsoleAccess) 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, awsEc2query_deserializeOpErrorDisableSerialConsoleAccess(response, &metadata)
+ }
+ output := &DisableSerialConsoleAccessOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDisableSerialConsoleAccessOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDisableSerialConsoleAccess(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDisableTransitGatewayRouteTablePropagation struct {
+}
+
+func (*awsEc2query_deserializeOpDisableTransitGatewayRouteTablePropagation) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDisableTransitGatewayRouteTablePropagation) 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, awsEc2query_deserializeOpErrorDisableTransitGatewayRouteTablePropagation(response, &metadata)
+ }
+ output := &DisableTransitGatewayRouteTablePropagationOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDisableTransitGatewayRouteTablePropagationOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDisableTransitGatewayRouteTablePropagation(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDisableVgwRoutePropagation struct {
+}
+
+func (*awsEc2query_deserializeOpDisableVgwRoutePropagation) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDisableVgwRoutePropagation) 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, awsEc2query_deserializeOpErrorDisableVgwRoutePropagation(response, &metadata)
+ }
+ output := &DisableVgwRoutePropagationOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDisableVgwRoutePropagation(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDisableVpcClassicLink struct {
+}
+
+func (*awsEc2query_deserializeOpDisableVpcClassicLink) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDisableVpcClassicLink) 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, awsEc2query_deserializeOpErrorDisableVpcClassicLink(response, &metadata)
+ }
+ output := &DisableVpcClassicLinkOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDisableVpcClassicLinkOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDisableVpcClassicLink(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDisableVpcClassicLinkDnsSupport struct {
+}
+
+func (*awsEc2query_deserializeOpDisableVpcClassicLinkDnsSupport) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDisableVpcClassicLinkDnsSupport) 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, awsEc2query_deserializeOpErrorDisableVpcClassicLinkDnsSupport(response, &metadata)
+ }
+ output := &DisableVpcClassicLinkDnsSupportOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDisableVpcClassicLinkDnsSupportOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDisableVpcClassicLinkDnsSupport(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDisassociateAddress struct {
+}
+
+func (*awsEc2query_deserializeOpDisassociateAddress) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDisassociateAddress) 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, awsEc2query_deserializeOpErrorDisassociateAddress(response, &metadata)
+ }
+ output := &DisassociateAddressOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDisassociateAddress(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDisassociateClientVpnTargetNetwork struct {
+}
+
+func (*awsEc2query_deserializeOpDisassociateClientVpnTargetNetwork) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDisassociateClientVpnTargetNetwork) 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, awsEc2query_deserializeOpErrorDisassociateClientVpnTargetNetwork(response, &metadata)
+ }
+ output := &DisassociateClientVpnTargetNetworkOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDisassociateClientVpnTargetNetworkOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDisassociateClientVpnTargetNetwork(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDisassociateEnclaveCertificateIamRole struct {
+}
+
+func (*awsEc2query_deserializeOpDisassociateEnclaveCertificateIamRole) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDisassociateEnclaveCertificateIamRole) 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, awsEc2query_deserializeOpErrorDisassociateEnclaveCertificateIamRole(response, &metadata)
+ }
+ output := &DisassociateEnclaveCertificateIamRoleOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDisassociateEnclaveCertificateIamRoleOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDisassociateEnclaveCertificateIamRole(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDisassociateIamInstanceProfile struct {
+}
+
+func (*awsEc2query_deserializeOpDisassociateIamInstanceProfile) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDisassociateIamInstanceProfile) 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, awsEc2query_deserializeOpErrorDisassociateIamInstanceProfile(response, &metadata)
+ }
+ output := &DisassociateIamInstanceProfileOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDisassociateIamInstanceProfileOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDisassociateIamInstanceProfile(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDisassociateInstanceEventWindow struct {
+}
+
+func (*awsEc2query_deserializeOpDisassociateInstanceEventWindow) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDisassociateInstanceEventWindow) 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, awsEc2query_deserializeOpErrorDisassociateInstanceEventWindow(response, &metadata)
+ }
+ output := &DisassociateInstanceEventWindowOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDisassociateInstanceEventWindowOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDisassociateInstanceEventWindow(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDisassociateRouteTable struct {
+}
+
+func (*awsEc2query_deserializeOpDisassociateRouteTable) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDisassociateRouteTable) 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, awsEc2query_deserializeOpErrorDisassociateRouteTable(response, &metadata)
+ }
+ output := &DisassociateRouteTableOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDisassociateRouteTable(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDisassociateSubnetCidrBlock struct {
+}
+
+func (*awsEc2query_deserializeOpDisassociateSubnetCidrBlock) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDisassociateSubnetCidrBlock) 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, awsEc2query_deserializeOpErrorDisassociateSubnetCidrBlock(response, &metadata)
+ }
+ output := &DisassociateSubnetCidrBlockOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDisassociateSubnetCidrBlockOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDisassociateSubnetCidrBlock(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDisassociateTransitGatewayMulticastDomain struct {
+}
+
+func (*awsEc2query_deserializeOpDisassociateTransitGatewayMulticastDomain) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDisassociateTransitGatewayMulticastDomain) 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, awsEc2query_deserializeOpErrorDisassociateTransitGatewayMulticastDomain(response, &metadata)
+ }
+ output := &DisassociateTransitGatewayMulticastDomainOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDisassociateTransitGatewayMulticastDomainOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDisassociateTransitGatewayMulticastDomain(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDisassociateTransitGatewayRouteTable struct {
+}
+
+func (*awsEc2query_deserializeOpDisassociateTransitGatewayRouteTable) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDisassociateTransitGatewayRouteTable) 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, awsEc2query_deserializeOpErrorDisassociateTransitGatewayRouteTable(response, &metadata)
+ }
+ output := &DisassociateTransitGatewayRouteTableOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDisassociateTransitGatewayRouteTableOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDisassociateTransitGatewayRouteTable(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDisassociateTrunkInterface struct {
+}
+
+func (*awsEc2query_deserializeOpDisassociateTrunkInterface) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDisassociateTrunkInterface) 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, awsEc2query_deserializeOpErrorDisassociateTrunkInterface(response, &metadata)
+ }
+ output := &DisassociateTrunkInterfaceOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDisassociateTrunkInterfaceOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDisassociateTrunkInterface(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpDisassociateVpcCidrBlock struct {
+}
+
+func (*awsEc2query_deserializeOpDisassociateVpcCidrBlock) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpDisassociateVpcCidrBlock) 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, awsEc2query_deserializeOpErrorDisassociateVpcCidrBlock(response, &metadata)
+ }
+ output := &DisassociateVpcCidrBlockOutput{}
+ 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 = awsEc2query_deserializeOpDocumentDisassociateVpcCidrBlockOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorDisassociateVpcCidrBlock(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpEnableEbsEncryptionByDefault struct {
+}
+
+func (*awsEc2query_deserializeOpEnableEbsEncryptionByDefault) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpEnableEbsEncryptionByDefault) 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, awsEc2query_deserializeOpErrorEnableEbsEncryptionByDefault(response, &metadata)
+ }
+ output := &EnableEbsEncryptionByDefaultOutput{}
+ 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 = awsEc2query_deserializeOpDocumentEnableEbsEncryptionByDefaultOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorEnableEbsEncryptionByDefault(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpEnableFastSnapshotRestores struct {
+}
+
+func (*awsEc2query_deserializeOpEnableFastSnapshotRestores) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpEnableFastSnapshotRestores) 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, awsEc2query_deserializeOpErrorEnableFastSnapshotRestores(response, &metadata)
+ }
+ output := &EnableFastSnapshotRestoresOutput{}
+ 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 = awsEc2query_deserializeOpDocumentEnableFastSnapshotRestoresOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorEnableFastSnapshotRestores(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpEnableImageDeprecation struct {
+}
+
+func (*awsEc2query_deserializeOpEnableImageDeprecation) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpEnableImageDeprecation) 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, awsEc2query_deserializeOpErrorEnableImageDeprecation(response, &metadata)
+ }
+ output := &EnableImageDeprecationOutput{}
+ 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 = awsEc2query_deserializeOpDocumentEnableImageDeprecationOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorEnableImageDeprecation(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpEnableSerialConsoleAccess struct {
+}
+
+func (*awsEc2query_deserializeOpEnableSerialConsoleAccess) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpEnableSerialConsoleAccess) 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, awsEc2query_deserializeOpErrorEnableSerialConsoleAccess(response, &metadata)
+ }
+ output := &EnableSerialConsoleAccessOutput{}
+ 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 = awsEc2query_deserializeOpDocumentEnableSerialConsoleAccessOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorEnableSerialConsoleAccess(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpEnableTransitGatewayRouteTablePropagation struct {
+}
+
+func (*awsEc2query_deserializeOpEnableTransitGatewayRouteTablePropagation) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpEnableTransitGatewayRouteTablePropagation) 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, awsEc2query_deserializeOpErrorEnableTransitGatewayRouteTablePropagation(response, &metadata)
+ }
+ output := &EnableTransitGatewayRouteTablePropagationOutput{}
+ 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 = awsEc2query_deserializeOpDocumentEnableTransitGatewayRouteTablePropagationOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorEnableTransitGatewayRouteTablePropagation(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpEnableVgwRoutePropagation struct {
+}
+
+func (*awsEc2query_deserializeOpEnableVgwRoutePropagation) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpEnableVgwRoutePropagation) 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, awsEc2query_deserializeOpErrorEnableVgwRoutePropagation(response, &metadata)
+ }
+ output := &EnableVgwRoutePropagationOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorEnableVgwRoutePropagation(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpEnableVolumeIO struct {
+}
+
+func (*awsEc2query_deserializeOpEnableVolumeIO) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpEnableVolumeIO) 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, awsEc2query_deserializeOpErrorEnableVolumeIO(response, &metadata)
+ }
+ output := &EnableVolumeIOOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorEnableVolumeIO(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpEnableVpcClassicLink struct {
+}
+
+func (*awsEc2query_deserializeOpEnableVpcClassicLink) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpEnableVpcClassicLink) 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, awsEc2query_deserializeOpErrorEnableVpcClassicLink(response, &metadata)
+ }
+ output := &EnableVpcClassicLinkOutput{}
+ 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 = awsEc2query_deserializeOpDocumentEnableVpcClassicLinkOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorEnableVpcClassicLink(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpEnableVpcClassicLinkDnsSupport struct {
+}
+
+func (*awsEc2query_deserializeOpEnableVpcClassicLinkDnsSupport) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpEnableVpcClassicLinkDnsSupport) 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, awsEc2query_deserializeOpErrorEnableVpcClassicLinkDnsSupport(response, &metadata)
+ }
+ output := &EnableVpcClassicLinkDnsSupportOutput{}
+ 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 = awsEc2query_deserializeOpDocumentEnableVpcClassicLinkDnsSupportOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorEnableVpcClassicLinkDnsSupport(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpExportClientVpnClientCertificateRevocationList struct {
+}
+
+func (*awsEc2query_deserializeOpExportClientVpnClientCertificateRevocationList) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpExportClientVpnClientCertificateRevocationList) 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, awsEc2query_deserializeOpErrorExportClientVpnClientCertificateRevocationList(response, &metadata)
+ }
+ output := &ExportClientVpnClientCertificateRevocationListOutput{}
+ 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 = awsEc2query_deserializeOpDocumentExportClientVpnClientCertificateRevocationListOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorExportClientVpnClientCertificateRevocationList(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpExportClientVpnClientConfiguration struct {
+}
+
+func (*awsEc2query_deserializeOpExportClientVpnClientConfiguration) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpExportClientVpnClientConfiguration) 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, awsEc2query_deserializeOpErrorExportClientVpnClientConfiguration(response, &metadata)
+ }
+ output := &ExportClientVpnClientConfigurationOutput{}
+ 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 = awsEc2query_deserializeOpDocumentExportClientVpnClientConfigurationOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorExportClientVpnClientConfiguration(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpExportImage struct {
+}
+
+func (*awsEc2query_deserializeOpExportImage) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpExportImage) 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, awsEc2query_deserializeOpErrorExportImage(response, &metadata)
+ }
+ output := &ExportImageOutput{}
+ 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 = awsEc2query_deserializeOpDocumentExportImageOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorExportImage(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpExportTransitGatewayRoutes struct {
+}
+
+func (*awsEc2query_deserializeOpExportTransitGatewayRoutes) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpExportTransitGatewayRoutes) 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, awsEc2query_deserializeOpErrorExportTransitGatewayRoutes(response, &metadata)
+ }
+ output := &ExportTransitGatewayRoutesOutput{}
+ 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 = awsEc2query_deserializeOpDocumentExportTransitGatewayRoutesOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorExportTransitGatewayRoutes(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpGetAssociatedEnclaveCertificateIamRoles struct {
+}
+
+func (*awsEc2query_deserializeOpGetAssociatedEnclaveCertificateIamRoles) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpGetAssociatedEnclaveCertificateIamRoles) 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, awsEc2query_deserializeOpErrorGetAssociatedEnclaveCertificateIamRoles(response, &metadata)
+ }
+ output := &GetAssociatedEnclaveCertificateIamRolesOutput{}
+ 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 = awsEc2query_deserializeOpDocumentGetAssociatedEnclaveCertificateIamRolesOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorGetAssociatedEnclaveCertificateIamRoles(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpGetAssociatedIpv6PoolCidrs struct {
+}
+
+func (*awsEc2query_deserializeOpGetAssociatedIpv6PoolCidrs) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpGetAssociatedIpv6PoolCidrs) 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, awsEc2query_deserializeOpErrorGetAssociatedIpv6PoolCidrs(response, &metadata)
+ }
+ output := &GetAssociatedIpv6PoolCidrsOutput{}
+ 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 = awsEc2query_deserializeOpDocumentGetAssociatedIpv6PoolCidrsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorGetAssociatedIpv6PoolCidrs(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpGetCapacityReservationUsage struct {
+}
+
+func (*awsEc2query_deserializeOpGetCapacityReservationUsage) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpGetCapacityReservationUsage) 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, awsEc2query_deserializeOpErrorGetCapacityReservationUsage(response, &metadata)
+ }
+ output := &GetCapacityReservationUsageOutput{}
+ 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 = awsEc2query_deserializeOpDocumentGetCapacityReservationUsageOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorGetCapacityReservationUsage(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpGetCoipPoolUsage struct {
+}
+
+func (*awsEc2query_deserializeOpGetCoipPoolUsage) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpGetCoipPoolUsage) 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, awsEc2query_deserializeOpErrorGetCoipPoolUsage(response, &metadata)
+ }
+ output := &GetCoipPoolUsageOutput{}
+ 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 = awsEc2query_deserializeOpDocumentGetCoipPoolUsageOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorGetCoipPoolUsage(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpGetConsoleOutput struct {
+}
+
+func (*awsEc2query_deserializeOpGetConsoleOutput) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpGetConsoleOutput) 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, awsEc2query_deserializeOpErrorGetConsoleOutput(response, &metadata)
+ }
+ output := &GetConsoleOutputOutput{}
+ 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 = awsEc2query_deserializeOpDocumentGetConsoleOutputOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorGetConsoleOutput(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpGetConsoleScreenshot struct {
+}
+
+func (*awsEc2query_deserializeOpGetConsoleScreenshot) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpGetConsoleScreenshot) 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, awsEc2query_deserializeOpErrorGetConsoleScreenshot(response, &metadata)
+ }
+ output := &GetConsoleScreenshotOutput{}
+ 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 = awsEc2query_deserializeOpDocumentGetConsoleScreenshotOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorGetConsoleScreenshot(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpGetDefaultCreditSpecification struct {
+}
+
+func (*awsEc2query_deserializeOpGetDefaultCreditSpecification) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpGetDefaultCreditSpecification) 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, awsEc2query_deserializeOpErrorGetDefaultCreditSpecification(response, &metadata)
+ }
+ output := &GetDefaultCreditSpecificationOutput{}
+ 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 = awsEc2query_deserializeOpDocumentGetDefaultCreditSpecificationOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorGetDefaultCreditSpecification(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpGetEbsDefaultKmsKeyId struct {
+}
+
+func (*awsEc2query_deserializeOpGetEbsDefaultKmsKeyId) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpGetEbsDefaultKmsKeyId) 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, awsEc2query_deserializeOpErrorGetEbsDefaultKmsKeyId(response, &metadata)
+ }
+ output := &GetEbsDefaultKmsKeyIdOutput{}
+ 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 = awsEc2query_deserializeOpDocumentGetEbsDefaultKmsKeyIdOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorGetEbsDefaultKmsKeyId(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpGetEbsEncryptionByDefault struct {
+}
+
+func (*awsEc2query_deserializeOpGetEbsEncryptionByDefault) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpGetEbsEncryptionByDefault) 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, awsEc2query_deserializeOpErrorGetEbsEncryptionByDefault(response, &metadata)
+ }
+ output := &GetEbsEncryptionByDefaultOutput{}
+ 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 = awsEc2query_deserializeOpDocumentGetEbsEncryptionByDefaultOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorGetEbsEncryptionByDefault(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpGetFlowLogsIntegrationTemplate struct {
+}
+
+func (*awsEc2query_deserializeOpGetFlowLogsIntegrationTemplate) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpGetFlowLogsIntegrationTemplate) 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, awsEc2query_deserializeOpErrorGetFlowLogsIntegrationTemplate(response, &metadata)
+ }
+ output := &GetFlowLogsIntegrationTemplateOutput{}
+ 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 = awsEc2query_deserializeOpDocumentGetFlowLogsIntegrationTemplateOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorGetFlowLogsIntegrationTemplate(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpGetGroupsForCapacityReservation struct {
+}
+
+func (*awsEc2query_deserializeOpGetGroupsForCapacityReservation) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpGetGroupsForCapacityReservation) 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, awsEc2query_deserializeOpErrorGetGroupsForCapacityReservation(response, &metadata)
+ }
+ output := &GetGroupsForCapacityReservationOutput{}
+ 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 = awsEc2query_deserializeOpDocumentGetGroupsForCapacityReservationOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorGetGroupsForCapacityReservation(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpGetHostReservationPurchasePreview struct {
+}
+
+func (*awsEc2query_deserializeOpGetHostReservationPurchasePreview) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpGetHostReservationPurchasePreview) 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, awsEc2query_deserializeOpErrorGetHostReservationPurchasePreview(response, &metadata)
+ }
+ output := &GetHostReservationPurchasePreviewOutput{}
+ 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 = awsEc2query_deserializeOpDocumentGetHostReservationPurchasePreviewOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorGetHostReservationPurchasePreview(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpGetLaunchTemplateData struct {
+}
+
+func (*awsEc2query_deserializeOpGetLaunchTemplateData) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpGetLaunchTemplateData) 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, awsEc2query_deserializeOpErrorGetLaunchTemplateData(response, &metadata)
+ }
+ output := &GetLaunchTemplateDataOutput{}
+ 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 = awsEc2query_deserializeOpDocumentGetLaunchTemplateDataOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorGetLaunchTemplateData(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpGetManagedPrefixListAssociations struct {
+}
+
+func (*awsEc2query_deserializeOpGetManagedPrefixListAssociations) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpGetManagedPrefixListAssociations) 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, awsEc2query_deserializeOpErrorGetManagedPrefixListAssociations(response, &metadata)
+ }
+ output := &GetManagedPrefixListAssociationsOutput{}
+ 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 = awsEc2query_deserializeOpDocumentGetManagedPrefixListAssociationsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorGetManagedPrefixListAssociations(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpGetManagedPrefixListEntries struct {
+}
+
+func (*awsEc2query_deserializeOpGetManagedPrefixListEntries) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpGetManagedPrefixListEntries) 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, awsEc2query_deserializeOpErrorGetManagedPrefixListEntries(response, &metadata)
+ }
+ output := &GetManagedPrefixListEntriesOutput{}
+ 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 = awsEc2query_deserializeOpDocumentGetManagedPrefixListEntriesOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorGetManagedPrefixListEntries(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpGetPasswordData struct {
+}
+
+func (*awsEc2query_deserializeOpGetPasswordData) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpGetPasswordData) 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, awsEc2query_deserializeOpErrorGetPasswordData(response, &metadata)
+ }
+ output := &GetPasswordDataOutput{}
+ 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 = awsEc2query_deserializeOpDocumentGetPasswordDataOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorGetPasswordData(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpGetReservedInstancesExchangeQuote struct {
+}
+
+func (*awsEc2query_deserializeOpGetReservedInstancesExchangeQuote) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpGetReservedInstancesExchangeQuote) 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, awsEc2query_deserializeOpErrorGetReservedInstancesExchangeQuote(response, &metadata)
+ }
+ output := &GetReservedInstancesExchangeQuoteOutput{}
+ 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 = awsEc2query_deserializeOpDocumentGetReservedInstancesExchangeQuoteOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorGetReservedInstancesExchangeQuote(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpGetSerialConsoleAccessStatus struct {
+}
+
+func (*awsEc2query_deserializeOpGetSerialConsoleAccessStatus) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpGetSerialConsoleAccessStatus) 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, awsEc2query_deserializeOpErrorGetSerialConsoleAccessStatus(response, &metadata)
+ }
+ output := &GetSerialConsoleAccessStatusOutput{}
+ 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 = awsEc2query_deserializeOpDocumentGetSerialConsoleAccessStatusOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorGetSerialConsoleAccessStatus(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpGetSubnetCidrReservations struct {
+}
+
+func (*awsEc2query_deserializeOpGetSubnetCidrReservations) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpGetSubnetCidrReservations) 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, awsEc2query_deserializeOpErrorGetSubnetCidrReservations(response, &metadata)
+ }
+ output := &GetSubnetCidrReservationsOutput{}
+ 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 = awsEc2query_deserializeOpDocumentGetSubnetCidrReservationsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorGetSubnetCidrReservations(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpGetTransitGatewayAttachmentPropagations struct {
+}
+
+func (*awsEc2query_deserializeOpGetTransitGatewayAttachmentPropagations) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpGetTransitGatewayAttachmentPropagations) 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, awsEc2query_deserializeOpErrorGetTransitGatewayAttachmentPropagations(response, &metadata)
+ }
+ output := &GetTransitGatewayAttachmentPropagationsOutput{}
+ 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 = awsEc2query_deserializeOpDocumentGetTransitGatewayAttachmentPropagationsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorGetTransitGatewayAttachmentPropagations(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpGetTransitGatewayMulticastDomainAssociations struct {
+}
+
+func (*awsEc2query_deserializeOpGetTransitGatewayMulticastDomainAssociations) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpGetTransitGatewayMulticastDomainAssociations) 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, awsEc2query_deserializeOpErrorGetTransitGatewayMulticastDomainAssociations(response, &metadata)
+ }
+ output := &GetTransitGatewayMulticastDomainAssociationsOutput{}
+ 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 = awsEc2query_deserializeOpDocumentGetTransitGatewayMulticastDomainAssociationsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorGetTransitGatewayMulticastDomainAssociations(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpGetTransitGatewayPrefixListReferences struct {
+}
+
+func (*awsEc2query_deserializeOpGetTransitGatewayPrefixListReferences) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpGetTransitGatewayPrefixListReferences) 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, awsEc2query_deserializeOpErrorGetTransitGatewayPrefixListReferences(response, &metadata)
+ }
+ output := &GetTransitGatewayPrefixListReferencesOutput{}
+ 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 = awsEc2query_deserializeOpDocumentGetTransitGatewayPrefixListReferencesOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorGetTransitGatewayPrefixListReferences(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpGetTransitGatewayRouteTableAssociations struct {
+}
+
+func (*awsEc2query_deserializeOpGetTransitGatewayRouteTableAssociations) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpGetTransitGatewayRouteTableAssociations) 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, awsEc2query_deserializeOpErrorGetTransitGatewayRouteTableAssociations(response, &metadata)
+ }
+ output := &GetTransitGatewayRouteTableAssociationsOutput{}
+ 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 = awsEc2query_deserializeOpDocumentGetTransitGatewayRouteTableAssociationsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorGetTransitGatewayRouteTableAssociations(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpGetTransitGatewayRouteTablePropagations struct {
+}
+
+func (*awsEc2query_deserializeOpGetTransitGatewayRouteTablePropagations) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpGetTransitGatewayRouteTablePropagations) 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, awsEc2query_deserializeOpErrorGetTransitGatewayRouteTablePropagations(response, &metadata)
+ }
+ output := &GetTransitGatewayRouteTablePropagationsOutput{}
+ 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 = awsEc2query_deserializeOpDocumentGetTransitGatewayRouteTablePropagationsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorGetTransitGatewayRouteTablePropagations(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpGetVpnConnectionDeviceSampleConfiguration struct {
+}
+
+func (*awsEc2query_deserializeOpGetVpnConnectionDeviceSampleConfiguration) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpGetVpnConnectionDeviceSampleConfiguration) 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, awsEc2query_deserializeOpErrorGetVpnConnectionDeviceSampleConfiguration(response, &metadata)
+ }
+ output := &GetVpnConnectionDeviceSampleConfigurationOutput{}
+ 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 = awsEc2query_deserializeOpDocumentGetVpnConnectionDeviceSampleConfigurationOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorGetVpnConnectionDeviceSampleConfiguration(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpGetVpnConnectionDeviceTypes struct {
+}
+
+func (*awsEc2query_deserializeOpGetVpnConnectionDeviceTypes) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpGetVpnConnectionDeviceTypes) 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, awsEc2query_deserializeOpErrorGetVpnConnectionDeviceTypes(response, &metadata)
+ }
+ output := &GetVpnConnectionDeviceTypesOutput{}
+ 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 = awsEc2query_deserializeOpDocumentGetVpnConnectionDeviceTypesOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorGetVpnConnectionDeviceTypes(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpImportClientVpnClientCertificateRevocationList struct {
+}
+
+func (*awsEc2query_deserializeOpImportClientVpnClientCertificateRevocationList) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpImportClientVpnClientCertificateRevocationList) 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, awsEc2query_deserializeOpErrorImportClientVpnClientCertificateRevocationList(response, &metadata)
+ }
+ output := &ImportClientVpnClientCertificateRevocationListOutput{}
+ 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 = awsEc2query_deserializeOpDocumentImportClientVpnClientCertificateRevocationListOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorImportClientVpnClientCertificateRevocationList(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpImportImage struct {
+}
+
+func (*awsEc2query_deserializeOpImportImage) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpImportImage) 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, awsEc2query_deserializeOpErrorImportImage(response, &metadata)
+ }
+ output := &ImportImageOutput{}
+ 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 = awsEc2query_deserializeOpDocumentImportImageOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorImportImage(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpImportInstance struct {
+}
+
+func (*awsEc2query_deserializeOpImportInstance) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpImportInstance) 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, awsEc2query_deserializeOpErrorImportInstance(response, &metadata)
+ }
+ output := &ImportInstanceOutput{}
+ 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 = awsEc2query_deserializeOpDocumentImportInstanceOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorImportInstance(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpImportKeyPair struct {
+}
+
+func (*awsEc2query_deserializeOpImportKeyPair) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpImportKeyPair) 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, awsEc2query_deserializeOpErrorImportKeyPair(response, &metadata)
+ }
+ output := &ImportKeyPairOutput{}
+ 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 = awsEc2query_deserializeOpDocumentImportKeyPairOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorImportKeyPair(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpImportSnapshot struct {
+}
+
+func (*awsEc2query_deserializeOpImportSnapshot) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpImportSnapshot) 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, awsEc2query_deserializeOpErrorImportSnapshot(response, &metadata)
+ }
+ output := &ImportSnapshotOutput{}
+ 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 = awsEc2query_deserializeOpDocumentImportSnapshotOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorImportSnapshot(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpImportVolume struct {
+}
+
+func (*awsEc2query_deserializeOpImportVolume) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpImportVolume) 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, awsEc2query_deserializeOpErrorImportVolume(response, &metadata)
+ }
+ output := &ImportVolumeOutput{}
+ 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 = awsEc2query_deserializeOpDocumentImportVolumeOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorImportVolume(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpModifyAddressAttribute struct {
+}
+
+func (*awsEc2query_deserializeOpModifyAddressAttribute) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpModifyAddressAttribute) 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, awsEc2query_deserializeOpErrorModifyAddressAttribute(response, &metadata)
+ }
+ output := &ModifyAddressAttributeOutput{}
+ 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 = awsEc2query_deserializeOpDocumentModifyAddressAttributeOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorModifyAddressAttribute(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpModifyAvailabilityZoneGroup struct {
+}
+
+func (*awsEc2query_deserializeOpModifyAvailabilityZoneGroup) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpModifyAvailabilityZoneGroup) 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, awsEc2query_deserializeOpErrorModifyAvailabilityZoneGroup(response, &metadata)
+ }
+ output := &ModifyAvailabilityZoneGroupOutput{}
+ 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 = awsEc2query_deserializeOpDocumentModifyAvailabilityZoneGroupOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorModifyAvailabilityZoneGroup(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpModifyCapacityReservation struct {
+}
+
+func (*awsEc2query_deserializeOpModifyCapacityReservation) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpModifyCapacityReservation) 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, awsEc2query_deserializeOpErrorModifyCapacityReservation(response, &metadata)
+ }
+ output := &ModifyCapacityReservationOutput{}
+ 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 = awsEc2query_deserializeOpDocumentModifyCapacityReservationOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorModifyCapacityReservation(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpModifyClientVpnEndpoint struct {
+}
+
+func (*awsEc2query_deserializeOpModifyClientVpnEndpoint) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpModifyClientVpnEndpoint) 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, awsEc2query_deserializeOpErrorModifyClientVpnEndpoint(response, &metadata)
+ }
+ output := &ModifyClientVpnEndpointOutput{}
+ 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 = awsEc2query_deserializeOpDocumentModifyClientVpnEndpointOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorModifyClientVpnEndpoint(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpModifyDefaultCreditSpecification struct {
+}
+
+func (*awsEc2query_deserializeOpModifyDefaultCreditSpecification) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpModifyDefaultCreditSpecification) 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, awsEc2query_deserializeOpErrorModifyDefaultCreditSpecification(response, &metadata)
+ }
+ output := &ModifyDefaultCreditSpecificationOutput{}
+ 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 = awsEc2query_deserializeOpDocumentModifyDefaultCreditSpecificationOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorModifyDefaultCreditSpecification(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpModifyEbsDefaultKmsKeyId struct {
+}
+
+func (*awsEc2query_deserializeOpModifyEbsDefaultKmsKeyId) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpModifyEbsDefaultKmsKeyId) 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, awsEc2query_deserializeOpErrorModifyEbsDefaultKmsKeyId(response, &metadata)
+ }
+ output := &ModifyEbsDefaultKmsKeyIdOutput{}
+ 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 = awsEc2query_deserializeOpDocumentModifyEbsDefaultKmsKeyIdOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorModifyEbsDefaultKmsKeyId(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpModifyFleet struct {
+}
+
+func (*awsEc2query_deserializeOpModifyFleet) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpModifyFleet) 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, awsEc2query_deserializeOpErrorModifyFleet(response, &metadata)
+ }
+ output := &ModifyFleetOutput{}
+ 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 = awsEc2query_deserializeOpDocumentModifyFleetOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorModifyFleet(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpModifyFpgaImageAttribute struct {
+}
+
+func (*awsEc2query_deserializeOpModifyFpgaImageAttribute) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpModifyFpgaImageAttribute) 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, awsEc2query_deserializeOpErrorModifyFpgaImageAttribute(response, &metadata)
+ }
+ output := &ModifyFpgaImageAttributeOutput{}
+ 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 = awsEc2query_deserializeOpDocumentModifyFpgaImageAttributeOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorModifyFpgaImageAttribute(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpModifyHosts struct {
+}
+
+func (*awsEc2query_deserializeOpModifyHosts) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpModifyHosts) 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, awsEc2query_deserializeOpErrorModifyHosts(response, &metadata)
+ }
+ output := &ModifyHostsOutput{}
+ 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 = awsEc2query_deserializeOpDocumentModifyHostsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorModifyHosts(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpModifyIdentityIdFormat struct {
+}
+
+func (*awsEc2query_deserializeOpModifyIdentityIdFormat) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpModifyIdentityIdFormat) 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, awsEc2query_deserializeOpErrorModifyIdentityIdFormat(response, &metadata)
+ }
+ output := &ModifyIdentityIdFormatOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorModifyIdentityIdFormat(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpModifyIdFormat struct {
+}
+
+func (*awsEc2query_deserializeOpModifyIdFormat) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpModifyIdFormat) 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, awsEc2query_deserializeOpErrorModifyIdFormat(response, &metadata)
+ }
+ output := &ModifyIdFormatOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorModifyIdFormat(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpModifyImageAttribute struct {
+}
+
+func (*awsEc2query_deserializeOpModifyImageAttribute) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpModifyImageAttribute) 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, awsEc2query_deserializeOpErrorModifyImageAttribute(response, &metadata)
+ }
+ output := &ModifyImageAttributeOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorModifyImageAttribute(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpModifyInstanceAttribute struct {
+}
+
+func (*awsEc2query_deserializeOpModifyInstanceAttribute) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpModifyInstanceAttribute) 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, awsEc2query_deserializeOpErrorModifyInstanceAttribute(response, &metadata)
+ }
+ output := &ModifyInstanceAttributeOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorModifyInstanceAttribute(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpModifyInstanceCapacityReservationAttributes struct {
+}
+
+func (*awsEc2query_deserializeOpModifyInstanceCapacityReservationAttributes) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpModifyInstanceCapacityReservationAttributes) 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, awsEc2query_deserializeOpErrorModifyInstanceCapacityReservationAttributes(response, &metadata)
+ }
+ output := &ModifyInstanceCapacityReservationAttributesOutput{}
+ 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 = awsEc2query_deserializeOpDocumentModifyInstanceCapacityReservationAttributesOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorModifyInstanceCapacityReservationAttributes(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpModifyInstanceCreditSpecification struct {
+}
+
+func (*awsEc2query_deserializeOpModifyInstanceCreditSpecification) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpModifyInstanceCreditSpecification) 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, awsEc2query_deserializeOpErrorModifyInstanceCreditSpecification(response, &metadata)
+ }
+ output := &ModifyInstanceCreditSpecificationOutput{}
+ 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 = awsEc2query_deserializeOpDocumentModifyInstanceCreditSpecificationOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorModifyInstanceCreditSpecification(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpModifyInstanceEventStartTime struct {
+}
+
+func (*awsEc2query_deserializeOpModifyInstanceEventStartTime) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpModifyInstanceEventStartTime) 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, awsEc2query_deserializeOpErrorModifyInstanceEventStartTime(response, &metadata)
+ }
+ output := &ModifyInstanceEventStartTimeOutput{}
+ 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 = awsEc2query_deserializeOpDocumentModifyInstanceEventStartTimeOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorModifyInstanceEventStartTime(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpModifyInstanceEventWindow struct {
+}
+
+func (*awsEc2query_deserializeOpModifyInstanceEventWindow) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpModifyInstanceEventWindow) 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, awsEc2query_deserializeOpErrorModifyInstanceEventWindow(response, &metadata)
+ }
+ output := &ModifyInstanceEventWindowOutput{}
+ 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 = awsEc2query_deserializeOpDocumentModifyInstanceEventWindowOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorModifyInstanceEventWindow(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpModifyInstanceMetadataOptions struct {
+}
+
+func (*awsEc2query_deserializeOpModifyInstanceMetadataOptions) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpModifyInstanceMetadataOptions) 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, awsEc2query_deserializeOpErrorModifyInstanceMetadataOptions(response, &metadata)
+ }
+ output := &ModifyInstanceMetadataOptionsOutput{}
+ 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 = awsEc2query_deserializeOpDocumentModifyInstanceMetadataOptionsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorModifyInstanceMetadataOptions(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpModifyInstancePlacement struct {
+}
+
+func (*awsEc2query_deserializeOpModifyInstancePlacement) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpModifyInstancePlacement) 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, awsEc2query_deserializeOpErrorModifyInstancePlacement(response, &metadata)
+ }
+ output := &ModifyInstancePlacementOutput{}
+ 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 = awsEc2query_deserializeOpDocumentModifyInstancePlacementOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorModifyInstancePlacement(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpModifyLaunchTemplate struct {
+}
+
+func (*awsEc2query_deserializeOpModifyLaunchTemplate) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpModifyLaunchTemplate) 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, awsEc2query_deserializeOpErrorModifyLaunchTemplate(response, &metadata)
+ }
+ output := &ModifyLaunchTemplateOutput{}
+ 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 = awsEc2query_deserializeOpDocumentModifyLaunchTemplateOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorModifyLaunchTemplate(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpModifyManagedPrefixList struct {
+}
+
+func (*awsEc2query_deserializeOpModifyManagedPrefixList) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpModifyManagedPrefixList) 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, awsEc2query_deserializeOpErrorModifyManagedPrefixList(response, &metadata)
+ }
+ output := &ModifyManagedPrefixListOutput{}
+ 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 = awsEc2query_deserializeOpDocumentModifyManagedPrefixListOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorModifyManagedPrefixList(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpModifyNetworkInterfaceAttribute struct {
+}
+
+func (*awsEc2query_deserializeOpModifyNetworkInterfaceAttribute) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpModifyNetworkInterfaceAttribute) 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, awsEc2query_deserializeOpErrorModifyNetworkInterfaceAttribute(response, &metadata)
+ }
+ output := &ModifyNetworkInterfaceAttributeOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorModifyNetworkInterfaceAttribute(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpModifyReservedInstances struct {
+}
+
+func (*awsEc2query_deserializeOpModifyReservedInstances) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpModifyReservedInstances) 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, awsEc2query_deserializeOpErrorModifyReservedInstances(response, &metadata)
+ }
+ output := &ModifyReservedInstancesOutput{}
+ 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 = awsEc2query_deserializeOpDocumentModifyReservedInstancesOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorModifyReservedInstances(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpModifySecurityGroupRules struct {
+}
+
+func (*awsEc2query_deserializeOpModifySecurityGroupRules) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpModifySecurityGroupRules) 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, awsEc2query_deserializeOpErrorModifySecurityGroupRules(response, &metadata)
+ }
+ output := &ModifySecurityGroupRulesOutput{}
+ 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 = awsEc2query_deserializeOpDocumentModifySecurityGroupRulesOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorModifySecurityGroupRules(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpModifySnapshotAttribute struct {
+}
+
+func (*awsEc2query_deserializeOpModifySnapshotAttribute) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpModifySnapshotAttribute) 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, awsEc2query_deserializeOpErrorModifySnapshotAttribute(response, &metadata)
+ }
+ output := &ModifySnapshotAttributeOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorModifySnapshotAttribute(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpModifySpotFleetRequest struct {
+}
+
+func (*awsEc2query_deserializeOpModifySpotFleetRequest) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpModifySpotFleetRequest) 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, awsEc2query_deserializeOpErrorModifySpotFleetRequest(response, &metadata)
+ }
+ output := &ModifySpotFleetRequestOutput{}
+ 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 = awsEc2query_deserializeOpDocumentModifySpotFleetRequestOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorModifySpotFleetRequest(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpModifySubnetAttribute struct {
+}
+
+func (*awsEc2query_deserializeOpModifySubnetAttribute) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpModifySubnetAttribute) 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, awsEc2query_deserializeOpErrorModifySubnetAttribute(response, &metadata)
+ }
+ output := &ModifySubnetAttributeOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorModifySubnetAttribute(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpModifyTrafficMirrorFilterNetworkServices struct {
+}
+
+func (*awsEc2query_deserializeOpModifyTrafficMirrorFilterNetworkServices) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpModifyTrafficMirrorFilterNetworkServices) 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, awsEc2query_deserializeOpErrorModifyTrafficMirrorFilterNetworkServices(response, &metadata)
+ }
+ output := &ModifyTrafficMirrorFilterNetworkServicesOutput{}
+ 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 = awsEc2query_deserializeOpDocumentModifyTrafficMirrorFilterNetworkServicesOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorModifyTrafficMirrorFilterNetworkServices(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpModifyTrafficMirrorFilterRule struct {
+}
+
+func (*awsEc2query_deserializeOpModifyTrafficMirrorFilterRule) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpModifyTrafficMirrorFilterRule) 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, awsEc2query_deserializeOpErrorModifyTrafficMirrorFilterRule(response, &metadata)
+ }
+ output := &ModifyTrafficMirrorFilterRuleOutput{}
+ 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 = awsEc2query_deserializeOpDocumentModifyTrafficMirrorFilterRuleOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorModifyTrafficMirrorFilterRule(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpModifyTrafficMirrorSession struct {
+}
+
+func (*awsEc2query_deserializeOpModifyTrafficMirrorSession) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpModifyTrafficMirrorSession) 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, awsEc2query_deserializeOpErrorModifyTrafficMirrorSession(response, &metadata)
+ }
+ output := &ModifyTrafficMirrorSessionOutput{}
+ 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 = awsEc2query_deserializeOpDocumentModifyTrafficMirrorSessionOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorModifyTrafficMirrorSession(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpModifyTransitGateway struct {
+}
+
+func (*awsEc2query_deserializeOpModifyTransitGateway) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpModifyTransitGateway) 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, awsEc2query_deserializeOpErrorModifyTransitGateway(response, &metadata)
+ }
+ output := &ModifyTransitGatewayOutput{}
+ 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 = awsEc2query_deserializeOpDocumentModifyTransitGatewayOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorModifyTransitGateway(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpModifyTransitGatewayPrefixListReference struct {
+}
+
+func (*awsEc2query_deserializeOpModifyTransitGatewayPrefixListReference) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpModifyTransitGatewayPrefixListReference) 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, awsEc2query_deserializeOpErrorModifyTransitGatewayPrefixListReference(response, &metadata)
+ }
+ output := &ModifyTransitGatewayPrefixListReferenceOutput{}
+ 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 = awsEc2query_deserializeOpDocumentModifyTransitGatewayPrefixListReferenceOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorModifyTransitGatewayPrefixListReference(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpModifyTransitGatewayVpcAttachment struct {
+}
+
+func (*awsEc2query_deserializeOpModifyTransitGatewayVpcAttachment) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpModifyTransitGatewayVpcAttachment) 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, awsEc2query_deserializeOpErrorModifyTransitGatewayVpcAttachment(response, &metadata)
+ }
+ output := &ModifyTransitGatewayVpcAttachmentOutput{}
+ 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 = awsEc2query_deserializeOpDocumentModifyTransitGatewayVpcAttachmentOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorModifyTransitGatewayVpcAttachment(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpModifyVolume struct {
+}
+
+func (*awsEc2query_deserializeOpModifyVolume) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpModifyVolume) 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, awsEc2query_deserializeOpErrorModifyVolume(response, &metadata)
+ }
+ output := &ModifyVolumeOutput{}
+ 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 = awsEc2query_deserializeOpDocumentModifyVolumeOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorModifyVolume(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpModifyVolumeAttribute struct {
+}
+
+func (*awsEc2query_deserializeOpModifyVolumeAttribute) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpModifyVolumeAttribute) 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, awsEc2query_deserializeOpErrorModifyVolumeAttribute(response, &metadata)
+ }
+ output := &ModifyVolumeAttributeOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorModifyVolumeAttribute(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpModifyVpcAttribute struct {
+}
+
+func (*awsEc2query_deserializeOpModifyVpcAttribute) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpModifyVpcAttribute) 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, awsEc2query_deserializeOpErrorModifyVpcAttribute(response, &metadata)
+ }
+ output := &ModifyVpcAttributeOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorModifyVpcAttribute(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpModifyVpcEndpoint struct {
+}
+
+func (*awsEc2query_deserializeOpModifyVpcEndpoint) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpModifyVpcEndpoint) 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, awsEc2query_deserializeOpErrorModifyVpcEndpoint(response, &metadata)
+ }
+ output := &ModifyVpcEndpointOutput{}
+ 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 = awsEc2query_deserializeOpDocumentModifyVpcEndpointOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorModifyVpcEndpoint(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpModifyVpcEndpointConnectionNotification struct {
+}
+
+func (*awsEc2query_deserializeOpModifyVpcEndpointConnectionNotification) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpModifyVpcEndpointConnectionNotification) 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, awsEc2query_deserializeOpErrorModifyVpcEndpointConnectionNotification(response, &metadata)
+ }
+ output := &ModifyVpcEndpointConnectionNotificationOutput{}
+ 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 = awsEc2query_deserializeOpDocumentModifyVpcEndpointConnectionNotificationOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorModifyVpcEndpointConnectionNotification(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpModifyVpcEndpointServiceConfiguration struct {
+}
+
+func (*awsEc2query_deserializeOpModifyVpcEndpointServiceConfiguration) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpModifyVpcEndpointServiceConfiguration) 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, awsEc2query_deserializeOpErrorModifyVpcEndpointServiceConfiguration(response, &metadata)
+ }
+ output := &ModifyVpcEndpointServiceConfigurationOutput{}
+ 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 = awsEc2query_deserializeOpDocumentModifyVpcEndpointServiceConfigurationOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorModifyVpcEndpointServiceConfiguration(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpModifyVpcEndpointServicePermissions struct {
+}
+
+func (*awsEc2query_deserializeOpModifyVpcEndpointServicePermissions) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpModifyVpcEndpointServicePermissions) 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, awsEc2query_deserializeOpErrorModifyVpcEndpointServicePermissions(response, &metadata)
+ }
+ output := &ModifyVpcEndpointServicePermissionsOutput{}
+ 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 = awsEc2query_deserializeOpDocumentModifyVpcEndpointServicePermissionsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorModifyVpcEndpointServicePermissions(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpModifyVpcPeeringConnectionOptions struct {
+}
+
+func (*awsEc2query_deserializeOpModifyVpcPeeringConnectionOptions) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpModifyVpcPeeringConnectionOptions) 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, awsEc2query_deserializeOpErrorModifyVpcPeeringConnectionOptions(response, &metadata)
+ }
+ output := &ModifyVpcPeeringConnectionOptionsOutput{}
+ 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 = awsEc2query_deserializeOpDocumentModifyVpcPeeringConnectionOptionsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorModifyVpcPeeringConnectionOptions(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpModifyVpcTenancy struct {
+}
+
+func (*awsEc2query_deserializeOpModifyVpcTenancy) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpModifyVpcTenancy) 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, awsEc2query_deserializeOpErrorModifyVpcTenancy(response, &metadata)
+ }
+ output := &ModifyVpcTenancyOutput{}
+ 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 = awsEc2query_deserializeOpDocumentModifyVpcTenancyOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorModifyVpcTenancy(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpModifyVpnConnection struct {
+}
+
+func (*awsEc2query_deserializeOpModifyVpnConnection) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpModifyVpnConnection) 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, awsEc2query_deserializeOpErrorModifyVpnConnection(response, &metadata)
+ }
+ output := &ModifyVpnConnectionOutput{}
+ 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 = awsEc2query_deserializeOpDocumentModifyVpnConnectionOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorModifyVpnConnection(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpModifyVpnConnectionOptions struct {
+}
+
+func (*awsEc2query_deserializeOpModifyVpnConnectionOptions) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpModifyVpnConnectionOptions) 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, awsEc2query_deserializeOpErrorModifyVpnConnectionOptions(response, &metadata)
+ }
+ output := &ModifyVpnConnectionOptionsOutput{}
+ 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 = awsEc2query_deserializeOpDocumentModifyVpnConnectionOptionsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorModifyVpnConnectionOptions(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpModifyVpnTunnelCertificate struct {
+}
+
+func (*awsEc2query_deserializeOpModifyVpnTunnelCertificate) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpModifyVpnTunnelCertificate) 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, awsEc2query_deserializeOpErrorModifyVpnTunnelCertificate(response, &metadata)
+ }
+ output := &ModifyVpnTunnelCertificateOutput{}
+ 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 = awsEc2query_deserializeOpDocumentModifyVpnTunnelCertificateOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorModifyVpnTunnelCertificate(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpModifyVpnTunnelOptions struct {
+}
+
+func (*awsEc2query_deserializeOpModifyVpnTunnelOptions) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpModifyVpnTunnelOptions) 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, awsEc2query_deserializeOpErrorModifyVpnTunnelOptions(response, &metadata)
+ }
+ output := &ModifyVpnTunnelOptionsOutput{}
+ 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 = awsEc2query_deserializeOpDocumentModifyVpnTunnelOptionsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorModifyVpnTunnelOptions(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpMonitorInstances struct {
+}
+
+func (*awsEc2query_deserializeOpMonitorInstances) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpMonitorInstances) 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, awsEc2query_deserializeOpErrorMonitorInstances(response, &metadata)
+ }
+ output := &MonitorInstancesOutput{}
+ 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 = awsEc2query_deserializeOpDocumentMonitorInstancesOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorMonitorInstances(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpMoveAddressToVpc struct {
+}
+
+func (*awsEc2query_deserializeOpMoveAddressToVpc) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpMoveAddressToVpc) 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, awsEc2query_deserializeOpErrorMoveAddressToVpc(response, &metadata)
+ }
+ output := &MoveAddressToVpcOutput{}
+ 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 = awsEc2query_deserializeOpDocumentMoveAddressToVpcOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorMoveAddressToVpc(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpProvisionByoipCidr struct {
+}
+
+func (*awsEc2query_deserializeOpProvisionByoipCidr) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpProvisionByoipCidr) 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, awsEc2query_deserializeOpErrorProvisionByoipCidr(response, &metadata)
+ }
+ output := &ProvisionByoipCidrOutput{}
+ 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 = awsEc2query_deserializeOpDocumentProvisionByoipCidrOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorProvisionByoipCidr(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpPurchaseHostReservation struct {
+}
+
+func (*awsEc2query_deserializeOpPurchaseHostReservation) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpPurchaseHostReservation) 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, awsEc2query_deserializeOpErrorPurchaseHostReservation(response, &metadata)
+ }
+ output := &PurchaseHostReservationOutput{}
+ 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 = awsEc2query_deserializeOpDocumentPurchaseHostReservationOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorPurchaseHostReservation(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpPurchaseReservedInstancesOffering struct {
+}
+
+func (*awsEc2query_deserializeOpPurchaseReservedInstancesOffering) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpPurchaseReservedInstancesOffering) 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, awsEc2query_deserializeOpErrorPurchaseReservedInstancesOffering(response, &metadata)
+ }
+ output := &PurchaseReservedInstancesOfferingOutput{}
+ 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 = awsEc2query_deserializeOpDocumentPurchaseReservedInstancesOfferingOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorPurchaseReservedInstancesOffering(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpPurchaseScheduledInstances struct {
+}
+
+func (*awsEc2query_deserializeOpPurchaseScheduledInstances) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpPurchaseScheduledInstances) 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, awsEc2query_deserializeOpErrorPurchaseScheduledInstances(response, &metadata)
+ }
+ output := &PurchaseScheduledInstancesOutput{}
+ 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 = awsEc2query_deserializeOpDocumentPurchaseScheduledInstancesOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorPurchaseScheduledInstances(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpRebootInstances struct {
+}
+
+func (*awsEc2query_deserializeOpRebootInstances) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpRebootInstances) 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, awsEc2query_deserializeOpErrorRebootInstances(response, &metadata)
+ }
+ output := &RebootInstancesOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorRebootInstances(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpRegisterImage struct {
+}
+
+func (*awsEc2query_deserializeOpRegisterImage) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpRegisterImage) 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, awsEc2query_deserializeOpErrorRegisterImage(response, &metadata)
+ }
+ output := &RegisterImageOutput{}
+ 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 = awsEc2query_deserializeOpDocumentRegisterImageOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorRegisterImage(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpRegisterInstanceEventNotificationAttributes struct {
+}
+
+func (*awsEc2query_deserializeOpRegisterInstanceEventNotificationAttributes) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpRegisterInstanceEventNotificationAttributes) 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, awsEc2query_deserializeOpErrorRegisterInstanceEventNotificationAttributes(response, &metadata)
+ }
+ output := &RegisterInstanceEventNotificationAttributesOutput{}
+ 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 = awsEc2query_deserializeOpDocumentRegisterInstanceEventNotificationAttributesOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorRegisterInstanceEventNotificationAttributes(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpRegisterTransitGatewayMulticastGroupMembers struct {
+}
+
+func (*awsEc2query_deserializeOpRegisterTransitGatewayMulticastGroupMembers) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpRegisterTransitGatewayMulticastGroupMembers) 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, awsEc2query_deserializeOpErrorRegisterTransitGatewayMulticastGroupMembers(response, &metadata)
+ }
+ output := &RegisterTransitGatewayMulticastGroupMembersOutput{}
+ 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 = awsEc2query_deserializeOpDocumentRegisterTransitGatewayMulticastGroupMembersOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorRegisterTransitGatewayMulticastGroupMembers(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpRegisterTransitGatewayMulticastGroupSources struct {
+}
+
+func (*awsEc2query_deserializeOpRegisterTransitGatewayMulticastGroupSources) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpRegisterTransitGatewayMulticastGroupSources) 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, awsEc2query_deserializeOpErrorRegisterTransitGatewayMulticastGroupSources(response, &metadata)
+ }
+ output := &RegisterTransitGatewayMulticastGroupSourcesOutput{}
+ 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 = awsEc2query_deserializeOpDocumentRegisterTransitGatewayMulticastGroupSourcesOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorRegisterTransitGatewayMulticastGroupSources(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpRejectTransitGatewayMulticastDomainAssociations struct {
+}
+
+func (*awsEc2query_deserializeOpRejectTransitGatewayMulticastDomainAssociations) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpRejectTransitGatewayMulticastDomainAssociations) 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, awsEc2query_deserializeOpErrorRejectTransitGatewayMulticastDomainAssociations(response, &metadata)
+ }
+ output := &RejectTransitGatewayMulticastDomainAssociationsOutput{}
+ 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 = awsEc2query_deserializeOpDocumentRejectTransitGatewayMulticastDomainAssociationsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorRejectTransitGatewayMulticastDomainAssociations(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpRejectTransitGatewayPeeringAttachment struct {
+}
+
+func (*awsEc2query_deserializeOpRejectTransitGatewayPeeringAttachment) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpRejectTransitGatewayPeeringAttachment) 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, awsEc2query_deserializeOpErrorRejectTransitGatewayPeeringAttachment(response, &metadata)
+ }
+ output := &RejectTransitGatewayPeeringAttachmentOutput{}
+ 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 = awsEc2query_deserializeOpDocumentRejectTransitGatewayPeeringAttachmentOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorRejectTransitGatewayPeeringAttachment(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpRejectTransitGatewayVpcAttachment struct {
+}
+
+func (*awsEc2query_deserializeOpRejectTransitGatewayVpcAttachment) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpRejectTransitGatewayVpcAttachment) 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, awsEc2query_deserializeOpErrorRejectTransitGatewayVpcAttachment(response, &metadata)
+ }
+ output := &RejectTransitGatewayVpcAttachmentOutput{}
+ 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 = awsEc2query_deserializeOpDocumentRejectTransitGatewayVpcAttachmentOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorRejectTransitGatewayVpcAttachment(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpRejectVpcEndpointConnections struct {
+}
+
+func (*awsEc2query_deserializeOpRejectVpcEndpointConnections) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpRejectVpcEndpointConnections) 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, awsEc2query_deserializeOpErrorRejectVpcEndpointConnections(response, &metadata)
+ }
+ output := &RejectVpcEndpointConnectionsOutput{}
+ 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 = awsEc2query_deserializeOpDocumentRejectVpcEndpointConnectionsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorRejectVpcEndpointConnections(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpRejectVpcPeeringConnection struct {
+}
+
+func (*awsEc2query_deserializeOpRejectVpcPeeringConnection) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpRejectVpcPeeringConnection) 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, awsEc2query_deserializeOpErrorRejectVpcPeeringConnection(response, &metadata)
+ }
+ output := &RejectVpcPeeringConnectionOutput{}
+ 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 = awsEc2query_deserializeOpDocumentRejectVpcPeeringConnectionOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorRejectVpcPeeringConnection(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpReleaseAddress struct {
+}
+
+func (*awsEc2query_deserializeOpReleaseAddress) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpReleaseAddress) 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, awsEc2query_deserializeOpErrorReleaseAddress(response, &metadata)
+ }
+ output := &ReleaseAddressOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorReleaseAddress(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpReleaseHosts struct {
+}
+
+func (*awsEc2query_deserializeOpReleaseHosts) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpReleaseHosts) 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, awsEc2query_deserializeOpErrorReleaseHosts(response, &metadata)
+ }
+ output := &ReleaseHostsOutput{}
+ 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 = awsEc2query_deserializeOpDocumentReleaseHostsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorReleaseHosts(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpReplaceIamInstanceProfileAssociation struct {
+}
+
+func (*awsEc2query_deserializeOpReplaceIamInstanceProfileAssociation) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpReplaceIamInstanceProfileAssociation) 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, awsEc2query_deserializeOpErrorReplaceIamInstanceProfileAssociation(response, &metadata)
+ }
+ output := &ReplaceIamInstanceProfileAssociationOutput{}
+ 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 = awsEc2query_deserializeOpDocumentReplaceIamInstanceProfileAssociationOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorReplaceIamInstanceProfileAssociation(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpReplaceNetworkAclAssociation struct {
+}
+
+func (*awsEc2query_deserializeOpReplaceNetworkAclAssociation) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpReplaceNetworkAclAssociation) 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, awsEc2query_deserializeOpErrorReplaceNetworkAclAssociation(response, &metadata)
+ }
+ output := &ReplaceNetworkAclAssociationOutput{}
+ 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 = awsEc2query_deserializeOpDocumentReplaceNetworkAclAssociationOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorReplaceNetworkAclAssociation(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpReplaceNetworkAclEntry struct {
+}
+
+func (*awsEc2query_deserializeOpReplaceNetworkAclEntry) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpReplaceNetworkAclEntry) 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, awsEc2query_deserializeOpErrorReplaceNetworkAclEntry(response, &metadata)
+ }
+ output := &ReplaceNetworkAclEntryOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorReplaceNetworkAclEntry(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpReplaceRoute struct {
+}
+
+func (*awsEc2query_deserializeOpReplaceRoute) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpReplaceRoute) 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, awsEc2query_deserializeOpErrorReplaceRoute(response, &metadata)
+ }
+ output := &ReplaceRouteOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorReplaceRoute(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpReplaceRouteTableAssociation struct {
+}
+
+func (*awsEc2query_deserializeOpReplaceRouteTableAssociation) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpReplaceRouteTableAssociation) 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, awsEc2query_deserializeOpErrorReplaceRouteTableAssociation(response, &metadata)
+ }
+ output := &ReplaceRouteTableAssociationOutput{}
+ 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 = awsEc2query_deserializeOpDocumentReplaceRouteTableAssociationOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorReplaceRouteTableAssociation(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpReplaceTransitGatewayRoute struct {
+}
+
+func (*awsEc2query_deserializeOpReplaceTransitGatewayRoute) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpReplaceTransitGatewayRoute) 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, awsEc2query_deserializeOpErrorReplaceTransitGatewayRoute(response, &metadata)
+ }
+ output := &ReplaceTransitGatewayRouteOutput{}
+ 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 = awsEc2query_deserializeOpDocumentReplaceTransitGatewayRouteOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorReplaceTransitGatewayRoute(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpReportInstanceStatus struct {
+}
+
+func (*awsEc2query_deserializeOpReportInstanceStatus) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpReportInstanceStatus) 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, awsEc2query_deserializeOpErrorReportInstanceStatus(response, &metadata)
+ }
+ output := &ReportInstanceStatusOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorReportInstanceStatus(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpRequestSpotFleet struct {
+}
+
+func (*awsEc2query_deserializeOpRequestSpotFleet) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpRequestSpotFleet) 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, awsEc2query_deserializeOpErrorRequestSpotFleet(response, &metadata)
+ }
+ output := &RequestSpotFleetOutput{}
+ 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 = awsEc2query_deserializeOpDocumentRequestSpotFleetOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorRequestSpotFleet(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpRequestSpotInstances struct {
+}
+
+func (*awsEc2query_deserializeOpRequestSpotInstances) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpRequestSpotInstances) 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, awsEc2query_deserializeOpErrorRequestSpotInstances(response, &metadata)
+ }
+ output := &RequestSpotInstancesOutput{}
+ 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 = awsEc2query_deserializeOpDocumentRequestSpotInstancesOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorRequestSpotInstances(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpResetAddressAttribute struct {
+}
+
+func (*awsEc2query_deserializeOpResetAddressAttribute) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpResetAddressAttribute) 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, awsEc2query_deserializeOpErrorResetAddressAttribute(response, &metadata)
+ }
+ output := &ResetAddressAttributeOutput{}
+ 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 = awsEc2query_deserializeOpDocumentResetAddressAttributeOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorResetAddressAttribute(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpResetEbsDefaultKmsKeyId struct {
+}
+
+func (*awsEc2query_deserializeOpResetEbsDefaultKmsKeyId) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpResetEbsDefaultKmsKeyId) 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, awsEc2query_deserializeOpErrorResetEbsDefaultKmsKeyId(response, &metadata)
+ }
+ output := &ResetEbsDefaultKmsKeyIdOutput{}
+ 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 = awsEc2query_deserializeOpDocumentResetEbsDefaultKmsKeyIdOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorResetEbsDefaultKmsKeyId(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpResetFpgaImageAttribute struct {
+}
+
+func (*awsEc2query_deserializeOpResetFpgaImageAttribute) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpResetFpgaImageAttribute) 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, awsEc2query_deserializeOpErrorResetFpgaImageAttribute(response, &metadata)
+ }
+ output := &ResetFpgaImageAttributeOutput{}
+ 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 = awsEc2query_deserializeOpDocumentResetFpgaImageAttributeOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorResetFpgaImageAttribute(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpResetImageAttribute struct {
+}
+
+func (*awsEc2query_deserializeOpResetImageAttribute) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpResetImageAttribute) 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, awsEc2query_deserializeOpErrorResetImageAttribute(response, &metadata)
+ }
+ output := &ResetImageAttributeOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorResetImageAttribute(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpResetInstanceAttribute struct {
+}
+
+func (*awsEc2query_deserializeOpResetInstanceAttribute) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpResetInstanceAttribute) 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, awsEc2query_deserializeOpErrorResetInstanceAttribute(response, &metadata)
+ }
+ output := &ResetInstanceAttributeOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorResetInstanceAttribute(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpResetNetworkInterfaceAttribute struct {
+}
+
+func (*awsEc2query_deserializeOpResetNetworkInterfaceAttribute) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpResetNetworkInterfaceAttribute) 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, awsEc2query_deserializeOpErrorResetNetworkInterfaceAttribute(response, &metadata)
+ }
+ output := &ResetNetworkInterfaceAttributeOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorResetNetworkInterfaceAttribute(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpResetSnapshotAttribute struct {
+}
+
+func (*awsEc2query_deserializeOpResetSnapshotAttribute) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpResetSnapshotAttribute) 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, awsEc2query_deserializeOpErrorResetSnapshotAttribute(response, &metadata)
+ }
+ output := &ResetSnapshotAttributeOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorResetSnapshotAttribute(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpRestoreAddressToClassic struct {
+}
+
+func (*awsEc2query_deserializeOpRestoreAddressToClassic) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpRestoreAddressToClassic) 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, awsEc2query_deserializeOpErrorRestoreAddressToClassic(response, &metadata)
+ }
+ output := &RestoreAddressToClassicOutput{}
+ 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 = awsEc2query_deserializeOpDocumentRestoreAddressToClassicOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorRestoreAddressToClassic(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpRestoreManagedPrefixListVersion struct {
+}
+
+func (*awsEc2query_deserializeOpRestoreManagedPrefixListVersion) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpRestoreManagedPrefixListVersion) 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, awsEc2query_deserializeOpErrorRestoreManagedPrefixListVersion(response, &metadata)
+ }
+ output := &RestoreManagedPrefixListVersionOutput{}
+ 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 = awsEc2query_deserializeOpDocumentRestoreManagedPrefixListVersionOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorRestoreManagedPrefixListVersion(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpRevokeClientVpnIngress struct {
+}
+
+func (*awsEc2query_deserializeOpRevokeClientVpnIngress) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpRevokeClientVpnIngress) 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, awsEc2query_deserializeOpErrorRevokeClientVpnIngress(response, &metadata)
+ }
+ output := &RevokeClientVpnIngressOutput{}
+ 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 = awsEc2query_deserializeOpDocumentRevokeClientVpnIngressOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorRevokeClientVpnIngress(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpRevokeSecurityGroupEgress struct {
+}
+
+func (*awsEc2query_deserializeOpRevokeSecurityGroupEgress) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpRevokeSecurityGroupEgress) 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, awsEc2query_deserializeOpErrorRevokeSecurityGroupEgress(response, &metadata)
+ }
+ output := &RevokeSecurityGroupEgressOutput{}
+ 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 = awsEc2query_deserializeOpDocumentRevokeSecurityGroupEgressOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorRevokeSecurityGroupEgress(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpRevokeSecurityGroupIngress struct {
+}
+
+func (*awsEc2query_deserializeOpRevokeSecurityGroupIngress) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpRevokeSecurityGroupIngress) 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, awsEc2query_deserializeOpErrorRevokeSecurityGroupIngress(response, &metadata)
+ }
+ output := &RevokeSecurityGroupIngressOutput{}
+ 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 = awsEc2query_deserializeOpDocumentRevokeSecurityGroupIngressOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorRevokeSecurityGroupIngress(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpRunInstances struct {
+}
+
+func (*awsEc2query_deserializeOpRunInstances) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpRunInstances) 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, awsEc2query_deserializeOpErrorRunInstances(response, &metadata)
+ }
+ output := &RunInstancesOutput{}
+ 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 = awsEc2query_deserializeOpDocumentRunInstancesOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorRunInstances(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpRunScheduledInstances struct {
+}
+
+func (*awsEc2query_deserializeOpRunScheduledInstances) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpRunScheduledInstances) 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, awsEc2query_deserializeOpErrorRunScheduledInstances(response, &metadata)
+ }
+ output := &RunScheduledInstancesOutput{}
+ 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 = awsEc2query_deserializeOpDocumentRunScheduledInstancesOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorRunScheduledInstances(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpSearchLocalGatewayRoutes struct {
+}
+
+func (*awsEc2query_deserializeOpSearchLocalGatewayRoutes) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpSearchLocalGatewayRoutes) 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, awsEc2query_deserializeOpErrorSearchLocalGatewayRoutes(response, &metadata)
+ }
+ output := &SearchLocalGatewayRoutesOutput{}
+ 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 = awsEc2query_deserializeOpDocumentSearchLocalGatewayRoutesOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorSearchLocalGatewayRoutes(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpSearchTransitGatewayMulticastGroups struct {
+}
+
+func (*awsEc2query_deserializeOpSearchTransitGatewayMulticastGroups) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpSearchTransitGatewayMulticastGroups) 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, awsEc2query_deserializeOpErrorSearchTransitGatewayMulticastGroups(response, &metadata)
+ }
+ output := &SearchTransitGatewayMulticastGroupsOutput{}
+ 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 = awsEc2query_deserializeOpDocumentSearchTransitGatewayMulticastGroupsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorSearchTransitGatewayMulticastGroups(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpSearchTransitGatewayRoutes struct {
+}
+
+func (*awsEc2query_deserializeOpSearchTransitGatewayRoutes) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpSearchTransitGatewayRoutes) 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, awsEc2query_deserializeOpErrorSearchTransitGatewayRoutes(response, &metadata)
+ }
+ output := &SearchTransitGatewayRoutesOutput{}
+ 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 = awsEc2query_deserializeOpDocumentSearchTransitGatewayRoutesOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorSearchTransitGatewayRoutes(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpSendDiagnosticInterrupt struct {
+}
+
+func (*awsEc2query_deserializeOpSendDiagnosticInterrupt) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpSendDiagnosticInterrupt) 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, awsEc2query_deserializeOpErrorSendDiagnosticInterrupt(response, &metadata)
+ }
+ output := &SendDiagnosticInterruptOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorSendDiagnosticInterrupt(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpStartInstances struct {
+}
+
+func (*awsEc2query_deserializeOpStartInstances) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpStartInstances) 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, awsEc2query_deserializeOpErrorStartInstances(response, &metadata)
+ }
+ output := &StartInstancesOutput{}
+ 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 = awsEc2query_deserializeOpDocumentStartInstancesOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorStartInstances(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpStartNetworkInsightsAnalysis struct {
+}
+
+func (*awsEc2query_deserializeOpStartNetworkInsightsAnalysis) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpStartNetworkInsightsAnalysis) 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, awsEc2query_deserializeOpErrorStartNetworkInsightsAnalysis(response, &metadata)
+ }
+ output := &StartNetworkInsightsAnalysisOutput{}
+ 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 = awsEc2query_deserializeOpDocumentStartNetworkInsightsAnalysisOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorStartNetworkInsightsAnalysis(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpStartVpcEndpointServicePrivateDnsVerification struct {
+}
+
+func (*awsEc2query_deserializeOpStartVpcEndpointServicePrivateDnsVerification) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpStartVpcEndpointServicePrivateDnsVerification) 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, awsEc2query_deserializeOpErrorStartVpcEndpointServicePrivateDnsVerification(response, &metadata)
+ }
+ output := &StartVpcEndpointServicePrivateDnsVerificationOutput{}
+ 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 = awsEc2query_deserializeOpDocumentStartVpcEndpointServicePrivateDnsVerificationOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorStartVpcEndpointServicePrivateDnsVerification(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpStopInstances struct {
+}
+
+func (*awsEc2query_deserializeOpStopInstances) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpStopInstances) 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, awsEc2query_deserializeOpErrorStopInstances(response, &metadata)
+ }
+ output := &StopInstancesOutput{}
+ 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 = awsEc2query_deserializeOpDocumentStopInstancesOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorStopInstances(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpTerminateClientVpnConnections struct {
+}
+
+func (*awsEc2query_deserializeOpTerminateClientVpnConnections) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpTerminateClientVpnConnections) 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, awsEc2query_deserializeOpErrorTerminateClientVpnConnections(response, &metadata)
+ }
+ output := &TerminateClientVpnConnectionsOutput{}
+ 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 = awsEc2query_deserializeOpDocumentTerminateClientVpnConnectionsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorTerminateClientVpnConnections(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpTerminateInstances struct {
+}
+
+func (*awsEc2query_deserializeOpTerminateInstances) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpTerminateInstances) 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, awsEc2query_deserializeOpErrorTerminateInstances(response, &metadata)
+ }
+ output := &TerminateInstancesOutput{}
+ 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 = awsEc2query_deserializeOpDocumentTerminateInstancesOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorTerminateInstances(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpUnassignIpv6Addresses struct {
+}
+
+func (*awsEc2query_deserializeOpUnassignIpv6Addresses) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpUnassignIpv6Addresses) 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, awsEc2query_deserializeOpErrorUnassignIpv6Addresses(response, &metadata)
+ }
+ output := &UnassignIpv6AddressesOutput{}
+ 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 = awsEc2query_deserializeOpDocumentUnassignIpv6AddressesOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorUnassignIpv6Addresses(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpUnassignPrivateIpAddresses struct {
+}
+
+func (*awsEc2query_deserializeOpUnassignPrivateIpAddresses) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpUnassignPrivateIpAddresses) 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, awsEc2query_deserializeOpErrorUnassignPrivateIpAddresses(response, &metadata)
+ }
+ output := &UnassignPrivateIpAddressesOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorUnassignPrivateIpAddresses(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpUnmonitorInstances struct {
+}
+
+func (*awsEc2query_deserializeOpUnmonitorInstances) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpUnmonitorInstances) 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, awsEc2query_deserializeOpErrorUnmonitorInstances(response, &metadata)
+ }
+ output := &UnmonitorInstancesOutput{}
+ 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 = awsEc2query_deserializeOpDocumentUnmonitorInstancesOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorUnmonitorInstances(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpUpdateSecurityGroupRuleDescriptionsEgress struct {
+}
+
+func (*awsEc2query_deserializeOpUpdateSecurityGroupRuleDescriptionsEgress) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpUpdateSecurityGroupRuleDescriptionsEgress) 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, awsEc2query_deserializeOpErrorUpdateSecurityGroupRuleDescriptionsEgress(response, &metadata)
+ }
+ output := &UpdateSecurityGroupRuleDescriptionsEgressOutput{}
+ 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 = awsEc2query_deserializeOpDocumentUpdateSecurityGroupRuleDescriptionsEgressOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorUpdateSecurityGroupRuleDescriptionsEgress(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpUpdateSecurityGroupRuleDescriptionsIngress struct {
+}
+
+func (*awsEc2query_deserializeOpUpdateSecurityGroupRuleDescriptionsIngress) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpUpdateSecurityGroupRuleDescriptionsIngress) 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, awsEc2query_deserializeOpErrorUpdateSecurityGroupRuleDescriptionsIngress(response, &metadata)
+ }
+ output := &UpdateSecurityGroupRuleDescriptionsIngressOutput{}
+ 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 = awsEc2query_deserializeOpDocumentUpdateSecurityGroupRuleDescriptionsIngressOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorUpdateSecurityGroupRuleDescriptionsIngress(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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
+
+ }
+}
+
+type awsEc2query_deserializeOpWithdrawByoipCidr struct {
+}
+
+func (*awsEc2query_deserializeOpWithdrawByoipCidr) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsEc2query_deserializeOpWithdrawByoipCidr) 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, awsEc2query_deserializeOpErrorWithdrawByoipCidr(response, &metadata)
+ }
+ output := &WithdrawByoipCidrOutput{}
+ 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 = awsEc2query_deserializeOpDocumentWithdrawByoipCidrOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsEc2query_deserializeOpErrorWithdrawByoipCidr(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 := ec2query.GetErrorResponseComponents(errorBody)
+ if err != nil {
+ return err
+ }
+ awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID)
+ 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 awsEc2query_deserializeDocumentAccountAttribute(v **types.AccountAttribute, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.AccountAttribute
+ if *v == nil {
+ sv = &types.AccountAttribute{}
+ } 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("attributeName", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AttributeName = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("attributeValueSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentAccountAttributeValueList(&sv.AttributeValues, 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 awsEc2query_deserializeDocumentAccountAttributeList(v *[]types.AccountAttribute, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.AccountAttribute
+ if *v == nil {
+ sv = make([]types.AccountAttribute, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.AccountAttribute
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentAccountAttribute(&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 awsEc2query_deserializeDocumentAccountAttributeListUnwrapped(v *[]types.AccountAttribute, decoder smithyxml.NodeDecoder) error {
+ var sv []types.AccountAttribute
+ if *v == nil {
+ sv = make([]types.AccountAttribute, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.AccountAttribute
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentAccountAttribute(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentAccountAttributeValue(v **types.AccountAttributeValue, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.AccountAttributeValue
+ if *v == nil {
+ sv = &types.AccountAttributeValue{}
+ } 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("attributeValue", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AttributeValue = 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 awsEc2query_deserializeDocumentAccountAttributeValueList(v *[]types.AccountAttributeValue, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.AccountAttributeValue
+ if *v == nil {
+ sv = make([]types.AccountAttributeValue, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.AccountAttributeValue
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentAccountAttributeValue(&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 awsEc2query_deserializeDocumentAccountAttributeValueListUnwrapped(v *[]types.AccountAttributeValue, decoder smithyxml.NodeDecoder) error {
+ var sv []types.AccountAttributeValue
+ if *v == nil {
+ sv = make([]types.AccountAttributeValue, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.AccountAttributeValue
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentAccountAttributeValue(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentActiveInstance(v **types.ActiveInstance, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.ActiveInstance
+ if *v == nil {
+ sv = &types.ActiveInstance{}
+ } 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("instanceHealth", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.InstanceHealth = types.InstanceHealthStatus(xtv)
+ }
+
+ case strings.EqualFold("instanceId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.InstanceId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("instanceType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.InstanceType = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("spotInstanceRequestId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.SpotInstanceRequestId = 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 awsEc2query_deserializeDocumentActiveInstanceSet(v *[]types.ActiveInstance, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.ActiveInstance
+ if *v == nil {
+ sv = make([]types.ActiveInstance, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.ActiveInstance
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentActiveInstance(&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 awsEc2query_deserializeDocumentActiveInstanceSetUnwrapped(v *[]types.ActiveInstance, decoder smithyxml.NodeDecoder) error {
+ var sv []types.ActiveInstance
+ if *v == nil {
+ sv = make([]types.ActiveInstance, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.ActiveInstance
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentActiveInstance(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentAddress(v **types.Address, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.Address
+ if *v == nil {
+ sv = &types.Address{}
+ } 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("allocationId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AllocationId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("associationId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AssociationId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("carrierIp", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.CarrierIp = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("customerOwnedIp", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.CustomerOwnedIp = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("customerOwnedIpv4Pool", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.CustomerOwnedIpv4Pool = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("domain", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Domain = types.DomainType(xtv)
+ }
+
+ case strings.EqualFold("instanceId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.InstanceId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("networkBorderGroup", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.NetworkBorderGroup = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("networkInterfaceId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.NetworkInterfaceId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("networkInterfaceOwnerId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.NetworkInterfaceOwnerId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("privateIpAddress", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.PrivateIpAddress = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("publicIp", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.PublicIp = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("publicIpv4Pool", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.PublicIpv4Pool = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("tagSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_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 awsEc2query_deserializeDocumentAddressAttribute(v **types.AddressAttribute, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.AddressAttribute
+ if *v == nil {
+ sv = &types.AddressAttribute{}
+ } 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("allocationId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AllocationId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("ptrRecord", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.PtrRecord = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("ptrRecordUpdate", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentPtrUpdateStatus(&sv.PtrRecordUpdate, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("publicIp", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.PublicIp = 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 awsEc2query_deserializeDocumentAddressList(v *[]types.Address, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.Address
+ if *v == nil {
+ sv = make([]types.Address, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.Address
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentAddress(&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 awsEc2query_deserializeDocumentAddressListUnwrapped(v *[]types.Address, decoder smithyxml.NodeDecoder) error {
+ var sv []types.Address
+ if *v == nil {
+ sv = make([]types.Address, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.Address
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentAddress(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentAddressSet(v *[]types.AddressAttribute, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.AddressAttribute
+ if *v == nil {
+ sv = make([]types.AddressAttribute, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.AddressAttribute
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentAddressAttribute(&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 awsEc2query_deserializeDocumentAddressSetUnwrapped(v *[]types.AddressAttribute, decoder smithyxml.NodeDecoder) error {
+ var sv []types.AddressAttribute
+ if *v == nil {
+ sv = make([]types.AddressAttribute, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.AddressAttribute
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentAddressAttribute(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentAllowedPrincipal(v **types.AllowedPrincipal, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.AllowedPrincipal
+ if *v == nil {
+ sv = &types.AllowedPrincipal{}
+ } 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("principal", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Principal = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("principalType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.PrincipalType = types.PrincipalType(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 awsEc2query_deserializeDocumentAllowedPrincipalSet(v *[]types.AllowedPrincipal, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.AllowedPrincipal
+ if *v == nil {
+ sv = make([]types.AllowedPrincipal, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.AllowedPrincipal
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentAllowedPrincipal(&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 awsEc2query_deserializeDocumentAllowedPrincipalSetUnwrapped(v *[]types.AllowedPrincipal, decoder smithyxml.NodeDecoder) error {
+ var sv []types.AllowedPrincipal
+ if *v == nil {
+ sv = make([]types.AllowedPrincipal, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.AllowedPrincipal
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentAllowedPrincipal(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentAlternatePathHint(v **types.AlternatePathHint, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.AlternatePathHint
+ if *v == nil {
+ sv = &types.AlternatePathHint{}
+ } 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("componentArn", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ComponentArn = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("componentId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ComponentId = 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 awsEc2query_deserializeDocumentAlternatePathHintList(v *[]types.AlternatePathHint, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.AlternatePathHint
+ if *v == nil {
+ sv = make([]types.AlternatePathHint, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.AlternatePathHint
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentAlternatePathHint(&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 awsEc2query_deserializeDocumentAlternatePathHintListUnwrapped(v *[]types.AlternatePathHint, decoder smithyxml.NodeDecoder) error {
+ var sv []types.AlternatePathHint
+ if *v == nil {
+ sv = make([]types.AlternatePathHint, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.AlternatePathHint
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentAlternatePathHint(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentAnalysisAclRule(v **types.AnalysisAclRule, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.AnalysisAclRule
+ if *v == nil {
+ sv = &types.AnalysisAclRule{}
+ } 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("cidr", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Cidr = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("egress", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.Egress = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("portRange", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentPortRange(&sv.PortRange, nodeDecoder); err != nil {
+ return err
+ }
+
+ 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("ruleAction", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.RuleAction = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("ruleNumber", 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.RuleNumber = 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 awsEc2query_deserializeDocumentAnalysisComponent(v **types.AnalysisComponent, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.AnalysisComponent
+ if *v == nil {
+ sv = &types.AnalysisComponent{}
+ } 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)
+ }
+
+ 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 awsEc2query_deserializeDocumentAnalysisComponentList(v *[]types.AnalysisComponent, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.AnalysisComponent
+ if *v == nil {
+ sv = make([]types.AnalysisComponent, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.AnalysisComponent
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentAnalysisComponent(&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 awsEc2query_deserializeDocumentAnalysisComponentListUnwrapped(v *[]types.AnalysisComponent, decoder smithyxml.NodeDecoder) error {
+ var sv []types.AnalysisComponent
+ if *v == nil {
+ sv = make([]types.AnalysisComponent, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.AnalysisComponent
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentAnalysisComponent(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentAnalysisLoadBalancerListener(v **types.AnalysisLoadBalancerListener, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.AnalysisLoadBalancerListener
+ if *v == nil {
+ sv = &types.AnalysisLoadBalancerListener{}
+ } 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("instancePort", 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.InstancePort = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("loadBalancerPort", 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.LoadBalancerPort = 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 awsEc2query_deserializeDocumentAnalysisLoadBalancerTarget(v **types.AnalysisLoadBalancerTarget, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.AnalysisLoadBalancerTarget
+ if *v == nil {
+ sv = &types.AnalysisLoadBalancerTarget{}
+ } 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("address", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Address = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("availabilityZone", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AvailabilityZone = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("instance", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentAnalysisComponent(&sv.Instance, nodeDecoder); err != nil {
+ return err
+ }
+
+ 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))
+ }
+
+ 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 awsEc2query_deserializeDocumentAnalysisPacketHeader(v **types.AnalysisPacketHeader, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.AnalysisPacketHeader
+ if *v == nil {
+ sv = &types.AnalysisPacketHeader{}
+ } 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("destinationAddressSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentIpAddressList(&sv.DestinationAddresses, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("destinationPortRangeSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentPortRangeList(&sv.DestinationPortRanges, nodeDecoder); err != nil {
+ return err
+ }
+
+ 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("sourceAddressSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentIpAddressList(&sv.SourceAddresses, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("sourcePortRangeSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentPortRangeList(&sv.SourcePortRanges, 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 awsEc2query_deserializeDocumentAnalysisRouteTableRoute(v **types.AnalysisRouteTableRoute, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.AnalysisRouteTableRoute
+ if *v == nil {
+ sv = &types.AnalysisRouteTableRoute{}
+ } 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("destinationCidr", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.DestinationCidr = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("destinationPrefixListId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.DestinationPrefixListId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("egressOnlyInternetGatewayId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.EgressOnlyInternetGatewayId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("gatewayId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.GatewayId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("instanceId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.InstanceId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("natGatewayId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.NatGatewayId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("networkInterfaceId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.NetworkInterfaceId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("origin", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Origin = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("transitGatewayId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.TransitGatewayId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("vpcPeeringConnectionId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.VpcPeeringConnectionId = 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 awsEc2query_deserializeDocumentAnalysisSecurityGroupRule(v **types.AnalysisSecurityGroupRule, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.AnalysisSecurityGroupRule
+ if *v == nil {
+ sv = &types.AnalysisSecurityGroupRule{}
+ } 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("cidr", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Cidr = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("direction", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Direction = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("portRange", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentPortRange(&sv.PortRange, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("prefixListId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.PrefixListId = 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("securityGroupId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.SecurityGroupId = 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 awsEc2query_deserializeDocumentArchitectureTypeList(v *[]types.ArchitectureType, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.ArchitectureType
+ if *v == nil {
+ sv = make([]types.ArchitectureType, 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("item", t.Name.Local):
+ var col types.ArchitectureType
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ col = types.ArchitectureType(xtv)
+ }
+ sv = append(sv, col)
+
+ default:
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsEc2query_deserializeDocumentArchitectureTypeListUnwrapped(v *[]types.ArchitectureType, decoder smithyxml.NodeDecoder) error {
+ var sv []types.ArchitectureType
+ if *v == nil {
+ sv = make([]types.ArchitectureType, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.ArchitectureType
+ t := decoder.StartEl
+ _ = t
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ mv = types.ArchitectureType(xtv)
+ }
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentArnList(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("item", 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 awsEc2query_deserializeDocumentArnListUnwrapped(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 awsEc2query_deserializeDocumentAssignedPrivateIpAddress(v **types.AssignedPrivateIpAddress, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.AssignedPrivateIpAddress
+ if *v == nil {
+ sv = &types.AssignedPrivateIpAddress{}
+ } 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("privateIpAddress", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.PrivateIpAddress = 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 awsEc2query_deserializeDocumentAssignedPrivateIpAddressList(v *[]types.AssignedPrivateIpAddress, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.AssignedPrivateIpAddress
+ if *v == nil {
+ sv = make([]types.AssignedPrivateIpAddress, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.AssignedPrivateIpAddress
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentAssignedPrivateIpAddress(&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 awsEc2query_deserializeDocumentAssignedPrivateIpAddressListUnwrapped(v *[]types.AssignedPrivateIpAddress, decoder smithyxml.NodeDecoder) error {
+ var sv []types.AssignedPrivateIpAddress
+ if *v == nil {
+ sv = make([]types.AssignedPrivateIpAddress, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.AssignedPrivateIpAddress
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentAssignedPrivateIpAddress(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentAssociatedRole(v **types.AssociatedRole, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.AssociatedRole
+ if *v == nil {
+ sv = &types.AssociatedRole{}
+ } 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("associatedRoleArn", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AssociatedRoleArn = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("certificateS3BucketName", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.CertificateS3BucketName = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("certificateS3ObjectKey", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.CertificateS3ObjectKey = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("encryptionKmsKeyId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.EncryptionKmsKeyId = 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 awsEc2query_deserializeDocumentAssociatedRolesList(v *[]types.AssociatedRole, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.AssociatedRole
+ if *v == nil {
+ sv = make([]types.AssociatedRole, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.AssociatedRole
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentAssociatedRole(&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 awsEc2query_deserializeDocumentAssociatedRolesListUnwrapped(v *[]types.AssociatedRole, decoder smithyxml.NodeDecoder) error {
+ var sv []types.AssociatedRole
+ if *v == nil {
+ sv = make([]types.AssociatedRole, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.AssociatedRole
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentAssociatedRole(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentAssociatedTargetNetwork(v **types.AssociatedTargetNetwork, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.AssociatedTargetNetwork
+ if *v == nil {
+ sv = &types.AssociatedTargetNetwork{}
+ } 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("networkId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.NetworkId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("networkType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.NetworkType = types.AssociatedNetworkType(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 awsEc2query_deserializeDocumentAssociatedTargetNetworkSet(v *[]types.AssociatedTargetNetwork, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.AssociatedTargetNetwork
+ if *v == nil {
+ sv = make([]types.AssociatedTargetNetwork, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.AssociatedTargetNetwork
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentAssociatedTargetNetwork(&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 awsEc2query_deserializeDocumentAssociatedTargetNetworkSetUnwrapped(v *[]types.AssociatedTargetNetwork, decoder smithyxml.NodeDecoder) error {
+ var sv []types.AssociatedTargetNetwork
+ if *v == nil {
+ sv = make([]types.AssociatedTargetNetwork, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.AssociatedTargetNetwork
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentAssociatedTargetNetwork(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentAssociationStatus(v **types.AssociationStatus, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.AssociationStatus
+ if *v == nil {
+ sv = &types.AssociationStatus{}
+ } 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("code", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Code = types.AssociationStatusCode(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)
+ }
+
+ 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 awsEc2query_deserializeDocumentAttributeBooleanValue(v **types.AttributeBooleanValue, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.AttributeBooleanValue
+ if *v == nil {
+ sv = &types.AttributeBooleanValue{}
+ } 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, err := strconv.ParseBool(string(val))
+ if err != nil {
+ return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.Value = ptr.Bool(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 awsEc2query_deserializeDocumentAttributeValue(v **types.AttributeValue, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.AttributeValue
+ if *v == nil {
+ sv = &types.AttributeValue{}
+ } 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 awsEc2query_deserializeDocumentAuthorizationRule(v **types.AuthorizationRule, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.AuthorizationRule
+ if *v == nil {
+ sv = &types.AuthorizationRule{}
+ } 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("accessAll", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.AccessAll = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("clientVpnEndpointId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ClientVpnEndpointId = ptr.String(xtv)
+ }
+
+ 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("destinationCidr", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.DestinationCidr = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("groupId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.GroupId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("status", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentClientVpnAuthorizationRuleStatus(&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
+}
+
+func awsEc2query_deserializeDocumentAuthorizationRuleSet(v *[]types.AuthorizationRule, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.AuthorizationRule
+ if *v == nil {
+ sv = make([]types.AuthorizationRule, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.AuthorizationRule
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentAuthorizationRule(&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 awsEc2query_deserializeDocumentAuthorizationRuleSetUnwrapped(v *[]types.AuthorizationRule, decoder smithyxml.NodeDecoder) error {
+ var sv []types.AuthorizationRule
+ if *v == nil {
+ sv = make([]types.AuthorizationRule, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.AuthorizationRule
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentAuthorizationRule(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentAvailabilityZone(v **types.AvailabilityZone, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.AvailabilityZone
+ if *v == nil {
+ sv = &types.AvailabilityZone{}
+ } 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("groupName", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.GroupName = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("messageSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentAvailabilityZoneMessageList(&sv.Messages, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("networkBorderGroup", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.NetworkBorderGroup = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("optInStatus", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.OptInStatus = types.AvailabilityZoneOptInStatus(xtv)
+ }
+
+ case strings.EqualFold("parentZoneId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ParentZoneId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("parentZoneName", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ParentZoneName = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("regionName", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.RegionName = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("zoneState", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.State = types.AvailabilityZoneState(xtv)
+ }
+
+ case strings.EqualFold("zoneId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ZoneId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("zoneName", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ZoneName = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("zoneType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ZoneType = 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 awsEc2query_deserializeDocumentAvailabilityZoneList(v *[]types.AvailabilityZone, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.AvailabilityZone
+ if *v == nil {
+ sv = make([]types.AvailabilityZone, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.AvailabilityZone
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentAvailabilityZone(&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 awsEc2query_deserializeDocumentAvailabilityZoneListUnwrapped(v *[]types.AvailabilityZone, decoder smithyxml.NodeDecoder) error {
+ var sv []types.AvailabilityZone
+ if *v == nil {
+ sv = make([]types.AvailabilityZone, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.AvailabilityZone
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentAvailabilityZone(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentAvailabilityZoneMessage(v **types.AvailabilityZoneMessage, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.AvailabilityZoneMessage
+ if *v == nil {
+ sv = &types.AvailabilityZoneMessage{}
+ } 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 awsEc2query_deserializeDocumentAvailabilityZoneMessageList(v *[]types.AvailabilityZoneMessage, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.AvailabilityZoneMessage
+ if *v == nil {
+ sv = make([]types.AvailabilityZoneMessage, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.AvailabilityZoneMessage
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentAvailabilityZoneMessage(&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 awsEc2query_deserializeDocumentAvailabilityZoneMessageListUnwrapped(v *[]types.AvailabilityZoneMessage, decoder smithyxml.NodeDecoder) error {
+ var sv []types.AvailabilityZoneMessage
+ if *v == nil {
+ sv = make([]types.AvailabilityZoneMessage, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.AvailabilityZoneMessage
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentAvailabilityZoneMessage(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentAvailableCapacity(v **types.AvailableCapacity, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.AvailableCapacity
+ if *v == nil {
+ sv = &types.AvailableCapacity{}
+ } 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("availableInstanceCapacity", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentAvailableInstanceCapacityList(&sv.AvailableInstanceCapacity, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("availableVCpus", 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.AvailableVCpus = 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 awsEc2query_deserializeDocumentAvailableInstanceCapacityList(v *[]types.InstanceCapacity, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.InstanceCapacity
+ if *v == nil {
+ sv = make([]types.InstanceCapacity, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.InstanceCapacity
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentInstanceCapacity(&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 awsEc2query_deserializeDocumentAvailableInstanceCapacityListUnwrapped(v *[]types.InstanceCapacity, decoder smithyxml.NodeDecoder) error {
+ var sv []types.InstanceCapacity
+ if *v == nil {
+ sv = make([]types.InstanceCapacity, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.InstanceCapacity
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentInstanceCapacity(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentBlockDeviceMapping(v **types.BlockDeviceMapping, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.BlockDeviceMapping
+ if *v == nil {
+ sv = &types.BlockDeviceMapping{}
+ } 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("deviceName", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.DeviceName = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("ebs", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentEbsBlockDevice(&sv.Ebs, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("noDevice", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.NoDevice = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("virtualName", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.VirtualName = 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 awsEc2query_deserializeDocumentBlockDeviceMappingList(v *[]types.BlockDeviceMapping, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.BlockDeviceMapping
+ if *v == nil {
+ sv = make([]types.BlockDeviceMapping, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.BlockDeviceMapping
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentBlockDeviceMapping(&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 awsEc2query_deserializeDocumentBlockDeviceMappingListUnwrapped(v *[]types.BlockDeviceMapping, decoder smithyxml.NodeDecoder) error {
+ var sv []types.BlockDeviceMapping
+ if *v == nil {
+ sv = make([]types.BlockDeviceMapping, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.BlockDeviceMapping
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentBlockDeviceMapping(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentBootModeTypeList(v *[]types.BootModeType, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.BootModeType
+ if *v == nil {
+ sv = make([]types.BootModeType, 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("item", t.Name.Local):
+ var col types.BootModeType
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ col = types.BootModeType(xtv)
+ }
+ sv = append(sv, col)
+
+ default:
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsEc2query_deserializeDocumentBootModeTypeListUnwrapped(v *[]types.BootModeType, decoder smithyxml.NodeDecoder) error {
+ var sv []types.BootModeType
+ if *v == nil {
+ sv = make([]types.BootModeType, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.BootModeType
+ t := decoder.StartEl
+ _ = t
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ mv = types.BootModeType(xtv)
+ }
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentBundleTask(v **types.BundleTask, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.BundleTask
+ if *v == nil {
+ sv = &types.BundleTask{}
+ } 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("bundleId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.BundleId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("error", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentBundleTaskError(&sv.BundleTaskError, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("instanceId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.InstanceId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("progress", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Progress = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("startTime", 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.StartTime = ptr.Time(t)
+ }
+
+ 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 = types.BundleTaskState(xtv)
+ }
+
+ case strings.EqualFold("storage", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentStorage(&sv.Storage, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("updateTime", 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.UpdateTime = 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 awsEc2query_deserializeDocumentBundleTaskError(v **types.BundleTaskError, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.BundleTaskError
+ if *v == nil {
+ sv = &types.BundleTaskError{}
+ } 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("code", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Code = 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)
+ }
+
+ 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 awsEc2query_deserializeDocumentBundleTaskList(v *[]types.BundleTask, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.BundleTask
+ if *v == nil {
+ sv = make([]types.BundleTask, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.BundleTask
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentBundleTask(&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 awsEc2query_deserializeDocumentBundleTaskListUnwrapped(v *[]types.BundleTask, decoder smithyxml.NodeDecoder) error {
+ var sv []types.BundleTask
+ if *v == nil {
+ sv = make([]types.BundleTask, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.BundleTask
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentBundleTask(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentByoipCidr(v **types.ByoipCidr, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.ByoipCidr
+ if *v == nil {
+ sv = &types.ByoipCidr{}
+ } 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("cidr", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Cidr = ptr.String(xtv)
+ }
+
+ 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("state", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.State = types.ByoipCidrState(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 awsEc2query_deserializeDocumentByoipCidrSet(v *[]types.ByoipCidr, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.ByoipCidr
+ if *v == nil {
+ sv = make([]types.ByoipCidr, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.ByoipCidr
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentByoipCidr(&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 awsEc2query_deserializeDocumentByoipCidrSetUnwrapped(v *[]types.ByoipCidr, decoder smithyxml.NodeDecoder) error {
+ var sv []types.ByoipCidr
+ if *v == nil {
+ sv = make([]types.ByoipCidr, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.ByoipCidr
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentByoipCidr(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentCancelledSpotInstanceRequest(v **types.CancelledSpotInstanceRequest, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.CancelledSpotInstanceRequest
+ if *v == nil {
+ sv = &types.CancelledSpotInstanceRequest{}
+ } 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("spotInstanceRequestId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.SpotInstanceRequestId = 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 = types.CancelSpotInstanceRequestState(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 awsEc2query_deserializeDocumentCancelledSpotInstanceRequestList(v *[]types.CancelledSpotInstanceRequest, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.CancelledSpotInstanceRequest
+ if *v == nil {
+ sv = make([]types.CancelledSpotInstanceRequest, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.CancelledSpotInstanceRequest
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentCancelledSpotInstanceRequest(&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 awsEc2query_deserializeDocumentCancelledSpotInstanceRequestListUnwrapped(v *[]types.CancelledSpotInstanceRequest, decoder smithyxml.NodeDecoder) error {
+ var sv []types.CancelledSpotInstanceRequest
+ if *v == nil {
+ sv = make([]types.CancelledSpotInstanceRequest, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.CancelledSpotInstanceRequest
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentCancelledSpotInstanceRequest(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentCancelSpotFleetRequestsError(v **types.CancelSpotFleetRequestsError, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.CancelSpotFleetRequestsError
+ if *v == nil {
+ sv = &types.CancelSpotFleetRequestsError{}
+ } 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("code", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Code = types.CancelBatchErrorCode(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)
+ }
+
+ 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 awsEc2query_deserializeDocumentCancelSpotFleetRequestsErrorItem(v **types.CancelSpotFleetRequestsErrorItem, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.CancelSpotFleetRequestsErrorItem
+ if *v == nil {
+ sv = &types.CancelSpotFleetRequestsErrorItem{}
+ } 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("error", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentCancelSpotFleetRequestsError(&sv.Error, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("spotFleetRequestId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.SpotFleetRequestId = 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 awsEc2query_deserializeDocumentCancelSpotFleetRequestsErrorSet(v *[]types.CancelSpotFleetRequestsErrorItem, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.CancelSpotFleetRequestsErrorItem
+ if *v == nil {
+ sv = make([]types.CancelSpotFleetRequestsErrorItem, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.CancelSpotFleetRequestsErrorItem
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentCancelSpotFleetRequestsErrorItem(&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 awsEc2query_deserializeDocumentCancelSpotFleetRequestsErrorSetUnwrapped(v *[]types.CancelSpotFleetRequestsErrorItem, decoder smithyxml.NodeDecoder) error {
+ var sv []types.CancelSpotFleetRequestsErrorItem
+ if *v == nil {
+ sv = make([]types.CancelSpotFleetRequestsErrorItem, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.CancelSpotFleetRequestsErrorItem
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentCancelSpotFleetRequestsErrorItem(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentCancelSpotFleetRequestsSuccessItem(v **types.CancelSpotFleetRequestsSuccessItem, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.CancelSpotFleetRequestsSuccessItem
+ if *v == nil {
+ sv = &types.CancelSpotFleetRequestsSuccessItem{}
+ } 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("currentSpotFleetRequestState", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.CurrentSpotFleetRequestState = types.BatchState(xtv)
+ }
+
+ case strings.EqualFold("previousSpotFleetRequestState", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.PreviousSpotFleetRequestState = types.BatchState(xtv)
+ }
+
+ case strings.EqualFold("spotFleetRequestId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.SpotFleetRequestId = 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 awsEc2query_deserializeDocumentCancelSpotFleetRequestsSuccessSet(v *[]types.CancelSpotFleetRequestsSuccessItem, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.CancelSpotFleetRequestsSuccessItem
+ if *v == nil {
+ sv = make([]types.CancelSpotFleetRequestsSuccessItem, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.CancelSpotFleetRequestsSuccessItem
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentCancelSpotFleetRequestsSuccessItem(&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 awsEc2query_deserializeDocumentCancelSpotFleetRequestsSuccessSetUnwrapped(v *[]types.CancelSpotFleetRequestsSuccessItem, decoder smithyxml.NodeDecoder) error {
+ var sv []types.CancelSpotFleetRequestsSuccessItem
+ if *v == nil {
+ sv = make([]types.CancelSpotFleetRequestsSuccessItem, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.CancelSpotFleetRequestsSuccessItem
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentCancelSpotFleetRequestsSuccessItem(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentCapacityReservation(v **types.CapacityReservation, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.CapacityReservation
+ if *v == nil {
+ sv = &types.CapacityReservation{}
+ } 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("availabilityZone", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AvailabilityZone = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("availabilityZoneId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AvailabilityZoneId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("availableInstanceCount", 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.AvailableInstanceCount = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("capacityReservationArn", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.CapacityReservationArn = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("capacityReservationId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.CapacityReservationId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("createDate", 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.CreateDate = ptr.Time(t)
+ }
+
+ case strings.EqualFold("ebsOptimized", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.EbsOptimized = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("endDate", 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.EndDate = ptr.Time(t)
+ }
+
+ case strings.EqualFold("endDateType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.EndDateType = types.EndDateType(xtv)
+ }
+
+ case strings.EqualFold("ephemeralStorage", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.EphemeralStorage = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("instanceMatchCriteria", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.InstanceMatchCriteria = types.InstanceMatchCriteria(xtv)
+ }
+
+ case strings.EqualFold("instancePlatform", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.InstancePlatform = types.CapacityReservationInstancePlatform(xtv)
+ }
+
+ case strings.EqualFold("instanceType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.InstanceType = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("outpostArn", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.OutpostArn = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("ownerId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.OwnerId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("startDate", 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.StartDate = ptr.Time(t)
+ }
+
+ 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 = types.CapacityReservationState(xtv)
+ }
+
+ case strings.EqualFold("tagSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("tenancy", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Tenancy = types.CapacityReservationTenancy(xtv)
+ }
+
+ case strings.EqualFold("totalInstanceCount", 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.TotalInstanceCount = 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 awsEc2query_deserializeDocumentCapacityReservationGroup(v **types.CapacityReservationGroup, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.CapacityReservationGroup
+ if *v == nil {
+ sv = &types.CapacityReservationGroup{}
+ } 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("groupArn", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.GroupArn = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("ownerId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.OwnerId = 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 awsEc2query_deserializeDocumentCapacityReservationGroupSet(v *[]types.CapacityReservationGroup, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.CapacityReservationGroup
+ if *v == nil {
+ sv = make([]types.CapacityReservationGroup, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.CapacityReservationGroup
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentCapacityReservationGroup(&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 awsEc2query_deserializeDocumentCapacityReservationGroupSetUnwrapped(v *[]types.CapacityReservationGroup, decoder smithyxml.NodeDecoder) error {
+ var sv []types.CapacityReservationGroup
+ if *v == nil {
+ sv = make([]types.CapacityReservationGroup, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.CapacityReservationGroup
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentCapacityReservationGroup(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentCapacityReservationOptions(v **types.CapacityReservationOptions, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.CapacityReservationOptions
+ if *v == nil {
+ sv = &types.CapacityReservationOptions{}
+ } 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("usageStrategy", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.UsageStrategy = types.FleetCapacityReservationUsageStrategy(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 awsEc2query_deserializeDocumentCapacityReservationSet(v *[]types.CapacityReservation, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.CapacityReservation
+ if *v == nil {
+ sv = make([]types.CapacityReservation, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.CapacityReservation
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentCapacityReservation(&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 awsEc2query_deserializeDocumentCapacityReservationSetUnwrapped(v *[]types.CapacityReservation, decoder smithyxml.NodeDecoder) error {
+ var sv []types.CapacityReservation
+ if *v == nil {
+ sv = make([]types.CapacityReservation, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.CapacityReservation
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentCapacityReservation(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentCapacityReservationSpecificationResponse(v **types.CapacityReservationSpecificationResponse, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.CapacityReservationSpecificationResponse
+ if *v == nil {
+ sv = &types.CapacityReservationSpecificationResponse{}
+ } 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("capacityReservationPreference", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.CapacityReservationPreference = types.CapacityReservationPreference(xtv)
+ }
+
+ case strings.EqualFold("capacityReservationTarget", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentCapacityReservationTargetResponse(&sv.CapacityReservationTarget, 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 awsEc2query_deserializeDocumentCapacityReservationTargetResponse(v **types.CapacityReservationTargetResponse, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.CapacityReservationTargetResponse
+ if *v == nil {
+ sv = &types.CapacityReservationTargetResponse{}
+ } 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("capacityReservationId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.CapacityReservationId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("capacityReservationResourceGroupArn", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.CapacityReservationResourceGroupArn = 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 awsEc2query_deserializeDocumentCarrierGateway(v **types.CarrierGateway, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.CarrierGateway
+ if *v == nil {
+ sv = &types.CarrierGateway{}
+ } 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("carrierGatewayId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.CarrierGatewayId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("ownerId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.OwnerId = 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 = types.CarrierGatewayState(xtv)
+ }
+
+ case strings.EqualFold("tagSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil {
+ return err
+ }
+
+ 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)
+ }
+
+ 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 awsEc2query_deserializeDocumentCarrierGatewaySet(v *[]types.CarrierGateway, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.CarrierGateway
+ if *v == nil {
+ sv = make([]types.CarrierGateway, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.CarrierGateway
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentCarrierGateway(&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 awsEc2query_deserializeDocumentCarrierGatewaySetUnwrapped(v *[]types.CarrierGateway, decoder smithyxml.NodeDecoder) error {
+ var sv []types.CarrierGateway
+ if *v == nil {
+ sv = make([]types.CarrierGateway, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.CarrierGateway
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentCarrierGateway(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentCertificateAuthentication(v **types.CertificateAuthentication, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.CertificateAuthentication
+ if *v == nil {
+ sv = &types.CertificateAuthentication{}
+ } 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("clientRootCertificateChain", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ClientRootCertificateChain = 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 awsEc2query_deserializeDocumentCidrBlock(v **types.CidrBlock, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.CidrBlock
+ if *v == nil {
+ sv = &types.CidrBlock{}
+ } 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)
+ }
+
+ 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 awsEc2query_deserializeDocumentCidrBlockSet(v *[]types.CidrBlock, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.CidrBlock
+ if *v == nil {
+ sv = make([]types.CidrBlock, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.CidrBlock
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentCidrBlock(&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 awsEc2query_deserializeDocumentCidrBlockSetUnwrapped(v *[]types.CidrBlock, decoder smithyxml.NodeDecoder) error {
+ var sv []types.CidrBlock
+ if *v == nil {
+ sv = make([]types.CidrBlock, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.CidrBlock
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentCidrBlock(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentClassicLinkDnsSupport(v **types.ClassicLinkDnsSupport, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.ClassicLinkDnsSupport
+ if *v == nil {
+ sv = &types.ClassicLinkDnsSupport{}
+ } 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("classicLinkDnsSupported", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.ClassicLinkDnsSupported = ptr.Bool(xtv)
+ }
+
+ 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)
+ }
+
+ 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 awsEc2query_deserializeDocumentClassicLinkDnsSupportList(v *[]types.ClassicLinkDnsSupport, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.ClassicLinkDnsSupport
+ if *v == nil {
+ sv = make([]types.ClassicLinkDnsSupport, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.ClassicLinkDnsSupport
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentClassicLinkDnsSupport(&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 awsEc2query_deserializeDocumentClassicLinkDnsSupportListUnwrapped(v *[]types.ClassicLinkDnsSupport, decoder smithyxml.NodeDecoder) error {
+ var sv []types.ClassicLinkDnsSupport
+ if *v == nil {
+ sv = make([]types.ClassicLinkDnsSupport, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.ClassicLinkDnsSupport
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentClassicLinkDnsSupport(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentClassicLinkInstance(v **types.ClassicLinkInstance, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.ClassicLinkInstance
+ if *v == nil {
+ sv = &types.ClassicLinkInstance{}
+ } 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("groupSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentGroupIdentifierList(&sv.Groups, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("instanceId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.InstanceId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("tagSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil {
+ return err
+ }
+
+ 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)
+ }
+
+ 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 awsEc2query_deserializeDocumentClassicLinkInstanceList(v *[]types.ClassicLinkInstance, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.ClassicLinkInstance
+ if *v == nil {
+ sv = make([]types.ClassicLinkInstance, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.ClassicLinkInstance
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentClassicLinkInstance(&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 awsEc2query_deserializeDocumentClassicLinkInstanceListUnwrapped(v *[]types.ClassicLinkInstance, decoder smithyxml.NodeDecoder) error {
+ var sv []types.ClassicLinkInstance
+ if *v == nil {
+ sv = make([]types.ClassicLinkInstance, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.ClassicLinkInstance
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentClassicLinkInstance(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentClassicLoadBalancer(v **types.ClassicLoadBalancer, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.ClassicLoadBalancer
+ if *v == nil {
+ sv = &types.ClassicLoadBalancer{}
+ } 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)
+ }
+
+ 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 awsEc2query_deserializeDocumentClassicLoadBalancers(v *[]types.ClassicLoadBalancer, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.ClassicLoadBalancer
+ if *v == nil {
+ sv = make([]types.ClassicLoadBalancer, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.ClassicLoadBalancer
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentClassicLoadBalancer(&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 awsEc2query_deserializeDocumentClassicLoadBalancersUnwrapped(v *[]types.ClassicLoadBalancer, decoder smithyxml.NodeDecoder) error {
+ var sv []types.ClassicLoadBalancer
+ if *v == nil {
+ sv = make([]types.ClassicLoadBalancer, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.ClassicLoadBalancer
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentClassicLoadBalancer(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentClassicLoadBalancersConfig(v **types.ClassicLoadBalancersConfig, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.ClassicLoadBalancersConfig
+ if *v == nil {
+ sv = &types.ClassicLoadBalancersConfig{}
+ } 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("classicLoadBalancers", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentClassicLoadBalancers(&sv.ClassicLoadBalancers, 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 awsEc2query_deserializeDocumentClientCertificateRevocationListStatus(v **types.ClientCertificateRevocationListStatus, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.ClientCertificateRevocationListStatus
+ if *v == nil {
+ sv = &types.ClientCertificateRevocationListStatus{}
+ } 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("code", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Code = types.ClientCertificateRevocationListStatusCode(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)
+ }
+
+ 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 awsEc2query_deserializeDocumentClientConnectResponseOptions(v **types.ClientConnectResponseOptions, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.ClientConnectResponseOptions
+ if *v == nil {
+ sv = &types.ClientConnectResponseOptions{}
+ } 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("enabled", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.Enabled = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("lambdaFunctionArn", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.LambdaFunctionArn = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("status", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentClientVpnEndpointAttributeStatus(&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
+}
+
+func awsEc2query_deserializeDocumentClientVpnAuthentication(v **types.ClientVpnAuthentication, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.ClientVpnAuthentication
+ if *v == nil {
+ sv = &types.ClientVpnAuthentication{}
+ } 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("activeDirectory", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentDirectoryServiceAuthentication(&sv.ActiveDirectory, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("federatedAuthentication", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentFederatedAuthentication(&sv.FederatedAuthentication, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("mutualAuthentication", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentCertificateAuthentication(&sv.MutualAuthentication, nodeDecoder); err != nil {
+ return err
+ }
+
+ 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.ClientVpnAuthenticationType(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 awsEc2query_deserializeDocumentClientVpnAuthenticationList(v *[]types.ClientVpnAuthentication, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.ClientVpnAuthentication
+ if *v == nil {
+ sv = make([]types.ClientVpnAuthentication, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.ClientVpnAuthentication
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentClientVpnAuthentication(&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 awsEc2query_deserializeDocumentClientVpnAuthenticationListUnwrapped(v *[]types.ClientVpnAuthentication, decoder smithyxml.NodeDecoder) error {
+ var sv []types.ClientVpnAuthentication
+ if *v == nil {
+ sv = make([]types.ClientVpnAuthentication, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.ClientVpnAuthentication
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentClientVpnAuthentication(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentClientVpnAuthorizationRuleStatus(v **types.ClientVpnAuthorizationRuleStatus, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.ClientVpnAuthorizationRuleStatus
+ if *v == nil {
+ sv = &types.ClientVpnAuthorizationRuleStatus{}
+ } 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("code", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Code = types.ClientVpnAuthorizationRuleStatusCode(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)
+ }
+
+ 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 awsEc2query_deserializeDocumentClientVpnConnection(v **types.ClientVpnConnection, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.ClientVpnConnection
+ if *v == nil {
+ sv = &types.ClientVpnConnection{}
+ } 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("clientIp", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ClientIp = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("clientVpnEndpointId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ClientVpnEndpointId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("commonName", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.CommonName = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("connectionEndTime", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ConnectionEndTime = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("connectionEstablishedTime", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ConnectionEstablishedTime = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("connectionId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ConnectionId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("egressBytes", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.EgressBytes = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("egressPackets", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.EgressPackets = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("ingressBytes", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.IngressBytes = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("ingressPackets", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.IngressPackets = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("postureComplianceStatusSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentValueStringList(&sv.PostureComplianceStatuses, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("status", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentClientVpnConnectionStatus(&sv.Status, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("timestamp", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Timestamp = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("username", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Username = 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 awsEc2query_deserializeDocumentClientVpnConnectionSet(v *[]types.ClientVpnConnection, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.ClientVpnConnection
+ if *v == nil {
+ sv = make([]types.ClientVpnConnection, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.ClientVpnConnection
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentClientVpnConnection(&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 awsEc2query_deserializeDocumentClientVpnConnectionSetUnwrapped(v *[]types.ClientVpnConnection, decoder smithyxml.NodeDecoder) error {
+ var sv []types.ClientVpnConnection
+ if *v == nil {
+ sv = make([]types.ClientVpnConnection, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.ClientVpnConnection
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentClientVpnConnection(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentClientVpnConnectionStatus(v **types.ClientVpnConnectionStatus, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.ClientVpnConnectionStatus
+ if *v == nil {
+ sv = &types.ClientVpnConnectionStatus{}
+ } 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("code", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Code = types.ClientVpnConnectionStatusCode(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)
+ }
+
+ 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 awsEc2query_deserializeDocumentClientVpnEndpoint(v **types.ClientVpnEndpoint, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.ClientVpnEndpoint
+ if *v == nil {
+ sv = &types.ClientVpnEndpoint{}
+ } 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("associatedTargetNetwork", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentAssociatedTargetNetworkSet(&sv.AssociatedTargetNetworks, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("authenticationOptions", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentClientVpnAuthenticationList(&sv.AuthenticationOptions, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("clientCidrBlock", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ClientCidrBlock = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("clientConnectOptions", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentClientConnectResponseOptions(&sv.ClientConnectOptions, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("clientVpnEndpointId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ClientVpnEndpointId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("connectionLogOptions", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentConnectionLogResponseOptions(&sv.ConnectionLogOptions, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("creationTime", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.CreationTime = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("deletionTime", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.DeletionTime = ptr.String(xtv)
+ }
+
+ 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("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("dnsServer", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentValueStringList(&sv.DnsServers, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("securityGroupIdSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentClientVpnSecurityGroupIdSet(&sv.SecurityGroupIds, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("selfServicePortalUrl", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.SelfServicePortalUrl = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("serverCertificateArn", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ServerCertificateArn = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("splitTunnel", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.SplitTunnel = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("status", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentClientVpnEndpointStatus(&sv.Status, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("tagSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("transportProtocol", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.TransportProtocol = types.TransportProtocol(xtv)
+ }
+
+ 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("vpnPort", 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.VpnPort = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("vpnProtocol", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.VpnProtocol = types.VpnProtocol(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 awsEc2query_deserializeDocumentClientVpnEndpointAttributeStatus(v **types.ClientVpnEndpointAttributeStatus, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.ClientVpnEndpointAttributeStatus
+ if *v == nil {
+ sv = &types.ClientVpnEndpointAttributeStatus{}
+ } 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("code", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Code = types.ClientVpnEndpointAttributeStatusCode(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)
+ }
+
+ 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 awsEc2query_deserializeDocumentClientVpnEndpointStatus(v **types.ClientVpnEndpointStatus, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.ClientVpnEndpointStatus
+ if *v == nil {
+ sv = &types.ClientVpnEndpointStatus{}
+ } 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("code", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Code = types.ClientVpnEndpointStatusCode(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)
+ }
+
+ 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 awsEc2query_deserializeDocumentClientVpnRoute(v **types.ClientVpnRoute, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.ClientVpnRoute
+ if *v == nil {
+ sv = &types.ClientVpnRoute{}
+ } 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("clientVpnEndpointId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ClientVpnEndpointId = ptr.String(xtv)
+ }
+
+ 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("destinationCidr", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.DestinationCidr = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("origin", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Origin = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("status", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentClientVpnRouteStatus(&sv.Status, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("targetSubnet", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.TargetSubnet = 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 = 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 awsEc2query_deserializeDocumentClientVpnRouteSet(v *[]types.ClientVpnRoute, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.ClientVpnRoute
+ if *v == nil {
+ sv = make([]types.ClientVpnRoute, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.ClientVpnRoute
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentClientVpnRoute(&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 awsEc2query_deserializeDocumentClientVpnRouteSetUnwrapped(v *[]types.ClientVpnRoute, decoder smithyxml.NodeDecoder) error {
+ var sv []types.ClientVpnRoute
+ if *v == nil {
+ sv = make([]types.ClientVpnRoute, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.ClientVpnRoute
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentClientVpnRoute(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentClientVpnRouteStatus(v **types.ClientVpnRouteStatus, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.ClientVpnRouteStatus
+ if *v == nil {
+ sv = &types.ClientVpnRouteStatus{}
+ } 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("code", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Code = types.ClientVpnRouteStatusCode(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)
+ }
+
+ 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 awsEc2query_deserializeDocumentClientVpnSecurityGroupIdSet(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("item", 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 awsEc2query_deserializeDocumentClientVpnSecurityGroupIdSetUnwrapped(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 awsEc2query_deserializeDocumentCoipAddressUsage(v **types.CoipAddressUsage, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.CoipAddressUsage
+ if *v == nil {
+ sv = &types.CoipAddressUsage{}
+ } 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("allocationId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AllocationId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("awsAccountId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AwsAccountId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("awsService", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AwsService = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("coIp", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.CoIp = 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 awsEc2query_deserializeDocumentCoipAddressUsageSet(v *[]types.CoipAddressUsage, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.CoipAddressUsage
+ if *v == nil {
+ sv = make([]types.CoipAddressUsage, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.CoipAddressUsage
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentCoipAddressUsage(&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 awsEc2query_deserializeDocumentCoipAddressUsageSetUnwrapped(v *[]types.CoipAddressUsage, decoder smithyxml.NodeDecoder) error {
+ var sv []types.CoipAddressUsage
+ if *v == nil {
+ sv = make([]types.CoipAddressUsage, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.CoipAddressUsage
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentCoipAddressUsage(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentCoipPool(v **types.CoipPool, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.CoipPool
+ if *v == nil {
+ sv = &types.CoipPool{}
+ } 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("localGatewayRouteTableId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.LocalGatewayRouteTableId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("poolArn", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.PoolArn = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("poolCidrSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentValueStringList(&sv.PoolCidrs, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("poolId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.PoolId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("tagSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_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 awsEc2query_deserializeDocumentCoipPoolSet(v *[]types.CoipPool, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.CoipPool
+ if *v == nil {
+ sv = make([]types.CoipPool, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.CoipPool
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentCoipPool(&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 awsEc2query_deserializeDocumentCoipPoolSetUnwrapped(v *[]types.CoipPool, decoder smithyxml.NodeDecoder) error {
+ var sv []types.CoipPool
+ if *v == nil {
+ sv = make([]types.CoipPool, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.CoipPool
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentCoipPool(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentConnectionLogResponseOptions(v **types.ConnectionLogResponseOptions, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.ConnectionLogResponseOptions
+ if *v == nil {
+ sv = &types.ConnectionLogResponseOptions{}
+ } 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("CloudwatchLogGroup", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.CloudwatchLogGroup = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("CloudwatchLogStream", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.CloudwatchLogStream = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("Enabled", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.Enabled = ptr.Bool(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 awsEc2query_deserializeDocumentConnectionNotification(v **types.ConnectionNotification, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.ConnectionNotification
+ if *v == nil {
+ sv = &types.ConnectionNotification{}
+ } 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("connectionEvents", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentValueStringList(&sv.ConnectionEvents, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("connectionNotificationArn", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ConnectionNotificationArn = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("connectionNotificationId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ConnectionNotificationId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("connectionNotificationState", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ConnectionNotificationState = types.ConnectionNotificationState(xtv)
+ }
+
+ case strings.EqualFold("connectionNotificationType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ConnectionNotificationType = types.ConnectionNotificationType(xtv)
+ }
+
+ case strings.EqualFold("serviceId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ServiceId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("vpcEndpointId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.VpcEndpointId = 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 awsEc2query_deserializeDocumentConnectionNotificationSet(v *[]types.ConnectionNotification, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.ConnectionNotification
+ if *v == nil {
+ sv = make([]types.ConnectionNotification, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.ConnectionNotification
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentConnectionNotification(&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 awsEc2query_deserializeDocumentConnectionNotificationSetUnwrapped(v *[]types.ConnectionNotification, decoder smithyxml.NodeDecoder) error {
+ var sv []types.ConnectionNotification
+ if *v == nil {
+ sv = make([]types.ConnectionNotification, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.ConnectionNotification
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentConnectionNotification(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentConversionTask(v **types.ConversionTask, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.ConversionTask
+ if *v == nil {
+ sv = &types.ConversionTask{}
+ } 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("conversionTaskId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ConversionTaskId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("expirationTime", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ExpirationTime = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("importInstance", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentImportInstanceTaskDetails(&sv.ImportInstance, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("importVolume", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentImportVolumeTaskDetails(&sv.ImportVolume, nodeDecoder); err != nil {
+ return err
+ }
+
+ 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 = types.ConversionTaskState(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)
+ }
+
+ case strings.EqualFold("tagSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_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 awsEc2query_deserializeDocumentCoreCountList(v *[]int32, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []int32
+ if *v == nil {
+ sv = make([]int32, 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("item", t.Name.Local):
+ var col int32
+ 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
+ }
+ col = int32(i64)
+ }
+ sv = append(sv, col)
+
+ default:
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsEc2query_deserializeDocumentCoreCountListUnwrapped(v *[]int32, decoder smithyxml.NodeDecoder) error {
+ var sv []int32
+ if *v == nil {
+ sv = make([]int32, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv int32
+ t := decoder.StartEl
+ _ = t
+ 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
+ }
+ mv = int32(i64)
+ }
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentCpuOptions(v **types.CpuOptions, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.CpuOptions
+ if *v == nil {
+ sv = &types.CpuOptions{}
+ } 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("coreCount", 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.CoreCount = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("threadsPerCore", 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.ThreadsPerCore = 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 awsEc2query_deserializeDocumentCreateFleetError(v **types.CreateFleetError, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.CreateFleetError
+ if *v == nil {
+ sv = &types.CreateFleetError{}
+ } 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("errorCode", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ErrorCode = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("errorMessage", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ErrorMessage = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("launchTemplateAndOverrides", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentLaunchTemplateAndOverridesResponse(&sv.LaunchTemplateAndOverrides, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("lifecycle", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Lifecycle = types.InstanceLifecycle(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 awsEc2query_deserializeDocumentCreateFleetErrorsSet(v *[]types.CreateFleetError, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.CreateFleetError
+ if *v == nil {
+ sv = make([]types.CreateFleetError, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.CreateFleetError
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentCreateFleetError(&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 awsEc2query_deserializeDocumentCreateFleetErrorsSetUnwrapped(v *[]types.CreateFleetError, decoder smithyxml.NodeDecoder) error {
+ var sv []types.CreateFleetError
+ if *v == nil {
+ sv = make([]types.CreateFleetError, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.CreateFleetError
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentCreateFleetError(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentCreateFleetInstance(v **types.CreateFleetInstance, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.CreateFleetInstance
+ if *v == nil {
+ sv = &types.CreateFleetInstance{}
+ } 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("instanceIds", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentInstanceIdsSet(&sv.InstanceIds, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("instanceType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.InstanceType = types.InstanceType(xtv)
+ }
+
+ case strings.EqualFold("launchTemplateAndOverrides", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentLaunchTemplateAndOverridesResponse(&sv.LaunchTemplateAndOverrides, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("lifecycle", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Lifecycle = types.InstanceLifecycle(xtv)
+ }
+
+ case strings.EqualFold("platform", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Platform = types.PlatformValues(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 awsEc2query_deserializeDocumentCreateFleetInstancesSet(v *[]types.CreateFleetInstance, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.CreateFleetInstance
+ if *v == nil {
+ sv = make([]types.CreateFleetInstance, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.CreateFleetInstance
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentCreateFleetInstance(&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 awsEc2query_deserializeDocumentCreateFleetInstancesSetUnwrapped(v *[]types.CreateFleetInstance, decoder smithyxml.NodeDecoder) error {
+ var sv []types.CreateFleetInstance
+ if *v == nil {
+ sv = make([]types.CreateFleetInstance, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.CreateFleetInstance
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentCreateFleetInstance(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentCreateVolumePermission(v **types.CreateVolumePermission, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.CreateVolumePermission
+ if *v == nil {
+ sv = &types.CreateVolumePermission{}
+ } 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("group", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Group = types.PermissionGroup(xtv)
+ }
+
+ case strings.EqualFold("userId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.UserId = 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 awsEc2query_deserializeDocumentCreateVolumePermissionList(v *[]types.CreateVolumePermission, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.CreateVolumePermission
+ if *v == nil {
+ sv = make([]types.CreateVolumePermission, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.CreateVolumePermission
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentCreateVolumePermission(&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 awsEc2query_deserializeDocumentCreateVolumePermissionListUnwrapped(v *[]types.CreateVolumePermission, decoder smithyxml.NodeDecoder) error {
+ var sv []types.CreateVolumePermission
+ if *v == nil {
+ sv = make([]types.CreateVolumePermission, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.CreateVolumePermission
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentCreateVolumePermission(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentCreditSpecification(v **types.CreditSpecification, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.CreditSpecification
+ if *v == nil {
+ sv = &types.CreditSpecification{}
+ } 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("cpuCredits", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.CpuCredits = 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 awsEc2query_deserializeDocumentCustomerGateway(v **types.CustomerGateway, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.CustomerGateway
+ if *v == nil {
+ sv = &types.CustomerGateway{}
+ } 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("bgpAsn", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.BgpAsn = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("certificateArn", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.CertificateArn = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("customerGatewayId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.CustomerGatewayId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("deviceName", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.DeviceName = ptr.String(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("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("tagSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil {
+ return err
+ }
+
+ 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 = 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 awsEc2query_deserializeDocumentCustomerGatewayList(v *[]types.CustomerGateway, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.CustomerGateway
+ if *v == nil {
+ sv = make([]types.CustomerGateway, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.CustomerGateway
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentCustomerGateway(&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 awsEc2query_deserializeDocumentCustomerGatewayListUnwrapped(v *[]types.CustomerGateway, decoder smithyxml.NodeDecoder) error {
+ var sv []types.CustomerGateway
+ if *v == nil {
+ sv = make([]types.CustomerGateway, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.CustomerGateway
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentCustomerGateway(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentDedicatedHostIdList(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("item", 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 awsEc2query_deserializeDocumentDedicatedHostIdListUnwrapped(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 awsEc2query_deserializeDocumentDeleteFleetError(v **types.DeleteFleetError, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.DeleteFleetError
+ if *v == nil {
+ sv = &types.DeleteFleetError{}
+ } 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("code", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Code = types.DeleteFleetErrorCode(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)
+ }
+
+ 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 awsEc2query_deserializeDocumentDeleteFleetErrorItem(v **types.DeleteFleetErrorItem, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.DeleteFleetErrorItem
+ if *v == nil {
+ sv = &types.DeleteFleetErrorItem{}
+ } 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("error", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentDeleteFleetError(&sv.Error, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("fleetId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.FleetId = 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 awsEc2query_deserializeDocumentDeleteFleetErrorSet(v *[]types.DeleteFleetErrorItem, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.DeleteFleetErrorItem
+ if *v == nil {
+ sv = make([]types.DeleteFleetErrorItem, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.DeleteFleetErrorItem
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentDeleteFleetErrorItem(&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 awsEc2query_deserializeDocumentDeleteFleetErrorSetUnwrapped(v *[]types.DeleteFleetErrorItem, decoder smithyxml.NodeDecoder) error {
+ var sv []types.DeleteFleetErrorItem
+ if *v == nil {
+ sv = make([]types.DeleteFleetErrorItem, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.DeleteFleetErrorItem
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentDeleteFleetErrorItem(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentDeleteFleetSuccessItem(v **types.DeleteFleetSuccessItem, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.DeleteFleetSuccessItem
+ if *v == nil {
+ sv = &types.DeleteFleetSuccessItem{}
+ } 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("currentFleetState", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.CurrentFleetState = types.FleetStateCode(xtv)
+ }
+
+ case strings.EqualFold("fleetId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.FleetId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("previousFleetState", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.PreviousFleetState = types.FleetStateCode(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 awsEc2query_deserializeDocumentDeleteFleetSuccessSet(v *[]types.DeleteFleetSuccessItem, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.DeleteFleetSuccessItem
+ if *v == nil {
+ sv = make([]types.DeleteFleetSuccessItem, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.DeleteFleetSuccessItem
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentDeleteFleetSuccessItem(&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 awsEc2query_deserializeDocumentDeleteFleetSuccessSetUnwrapped(v *[]types.DeleteFleetSuccessItem, decoder smithyxml.NodeDecoder) error {
+ var sv []types.DeleteFleetSuccessItem
+ if *v == nil {
+ sv = make([]types.DeleteFleetSuccessItem, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.DeleteFleetSuccessItem
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentDeleteFleetSuccessItem(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentDeleteLaunchTemplateVersionsResponseErrorItem(v **types.DeleteLaunchTemplateVersionsResponseErrorItem, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.DeleteLaunchTemplateVersionsResponseErrorItem
+ if *v == nil {
+ sv = &types.DeleteLaunchTemplateVersionsResponseErrorItem{}
+ } 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("launchTemplateId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.LaunchTemplateId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("launchTemplateName", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.LaunchTemplateName = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("responseError", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentResponseError(&sv.ResponseError, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("versionNumber", 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.VersionNumber = 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 awsEc2query_deserializeDocumentDeleteLaunchTemplateVersionsResponseErrorSet(v *[]types.DeleteLaunchTemplateVersionsResponseErrorItem, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.DeleteLaunchTemplateVersionsResponseErrorItem
+ if *v == nil {
+ sv = make([]types.DeleteLaunchTemplateVersionsResponseErrorItem, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.DeleteLaunchTemplateVersionsResponseErrorItem
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentDeleteLaunchTemplateVersionsResponseErrorItem(&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 awsEc2query_deserializeDocumentDeleteLaunchTemplateVersionsResponseErrorSetUnwrapped(v *[]types.DeleteLaunchTemplateVersionsResponseErrorItem, decoder smithyxml.NodeDecoder) error {
+ var sv []types.DeleteLaunchTemplateVersionsResponseErrorItem
+ if *v == nil {
+ sv = make([]types.DeleteLaunchTemplateVersionsResponseErrorItem, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.DeleteLaunchTemplateVersionsResponseErrorItem
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentDeleteLaunchTemplateVersionsResponseErrorItem(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentDeleteLaunchTemplateVersionsResponseSuccessItem(v **types.DeleteLaunchTemplateVersionsResponseSuccessItem, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.DeleteLaunchTemplateVersionsResponseSuccessItem
+ if *v == nil {
+ sv = &types.DeleteLaunchTemplateVersionsResponseSuccessItem{}
+ } 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("launchTemplateId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.LaunchTemplateId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("launchTemplateName", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.LaunchTemplateName = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("versionNumber", 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.VersionNumber = 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 awsEc2query_deserializeDocumentDeleteLaunchTemplateVersionsResponseSuccessSet(v *[]types.DeleteLaunchTemplateVersionsResponseSuccessItem, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.DeleteLaunchTemplateVersionsResponseSuccessItem
+ if *v == nil {
+ sv = make([]types.DeleteLaunchTemplateVersionsResponseSuccessItem, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.DeleteLaunchTemplateVersionsResponseSuccessItem
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentDeleteLaunchTemplateVersionsResponseSuccessItem(&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 awsEc2query_deserializeDocumentDeleteLaunchTemplateVersionsResponseSuccessSetUnwrapped(v *[]types.DeleteLaunchTemplateVersionsResponseSuccessItem, decoder smithyxml.NodeDecoder) error {
+ var sv []types.DeleteLaunchTemplateVersionsResponseSuccessItem
+ if *v == nil {
+ sv = make([]types.DeleteLaunchTemplateVersionsResponseSuccessItem, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.DeleteLaunchTemplateVersionsResponseSuccessItem
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentDeleteLaunchTemplateVersionsResponseSuccessItem(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentDeleteQueuedReservedInstancesError(v **types.DeleteQueuedReservedInstancesError, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.DeleteQueuedReservedInstancesError
+ if *v == nil {
+ sv = &types.DeleteQueuedReservedInstancesError{}
+ } 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("code", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Code = types.DeleteQueuedReservedInstancesErrorCode(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)
+ }
+
+ 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 awsEc2query_deserializeDocumentDescribeConversionTaskList(v *[]types.ConversionTask, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.ConversionTask
+ if *v == nil {
+ sv = make([]types.ConversionTask, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.ConversionTask
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentConversionTask(&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 awsEc2query_deserializeDocumentDescribeConversionTaskListUnwrapped(v *[]types.ConversionTask, decoder smithyxml.NodeDecoder) error {
+ var sv []types.ConversionTask
+ if *v == nil {
+ sv = make([]types.ConversionTask, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.ConversionTask
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentConversionTask(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentDescribeFastSnapshotRestoreSuccessItem(v **types.DescribeFastSnapshotRestoreSuccessItem, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.DescribeFastSnapshotRestoreSuccessItem
+ if *v == nil {
+ sv = &types.DescribeFastSnapshotRestoreSuccessItem{}
+ } 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("availabilityZone", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AvailabilityZone = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("disabledTime", 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.DisabledTime = ptr.Time(t)
+ }
+
+ case strings.EqualFold("disablingTime", 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.DisablingTime = ptr.Time(t)
+ }
+
+ case strings.EqualFold("enabledTime", 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.EnabledTime = ptr.Time(t)
+ }
+
+ case strings.EqualFold("enablingTime", 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.EnablingTime = ptr.Time(t)
+ }
+
+ case strings.EqualFold("optimizingTime", 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.OptimizingTime = ptr.Time(t)
+ }
+
+ case strings.EqualFold("ownerAlias", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.OwnerAlias = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("ownerId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.OwnerId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("snapshotId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.SnapshotId = 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 = types.FastSnapshotRestoreStateCode(xtv)
+ }
+
+ case strings.EqualFold("stateTransitionReason", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.StateTransitionReason = 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 awsEc2query_deserializeDocumentDescribeFastSnapshotRestoreSuccessSet(v *[]types.DescribeFastSnapshotRestoreSuccessItem, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.DescribeFastSnapshotRestoreSuccessItem
+ if *v == nil {
+ sv = make([]types.DescribeFastSnapshotRestoreSuccessItem, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.DescribeFastSnapshotRestoreSuccessItem
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentDescribeFastSnapshotRestoreSuccessItem(&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 awsEc2query_deserializeDocumentDescribeFastSnapshotRestoreSuccessSetUnwrapped(v *[]types.DescribeFastSnapshotRestoreSuccessItem, decoder smithyxml.NodeDecoder) error {
+ var sv []types.DescribeFastSnapshotRestoreSuccessItem
+ if *v == nil {
+ sv = make([]types.DescribeFastSnapshotRestoreSuccessItem, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.DescribeFastSnapshotRestoreSuccessItem
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentDescribeFastSnapshotRestoreSuccessItem(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentDescribeFleetError(v **types.DescribeFleetError, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.DescribeFleetError
+ if *v == nil {
+ sv = &types.DescribeFleetError{}
+ } 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("errorCode", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ErrorCode = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("errorMessage", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ErrorMessage = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("launchTemplateAndOverrides", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentLaunchTemplateAndOverridesResponse(&sv.LaunchTemplateAndOverrides, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("lifecycle", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Lifecycle = types.InstanceLifecycle(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 awsEc2query_deserializeDocumentDescribeFleetsErrorSet(v *[]types.DescribeFleetError, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.DescribeFleetError
+ if *v == nil {
+ sv = make([]types.DescribeFleetError, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.DescribeFleetError
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentDescribeFleetError(&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 awsEc2query_deserializeDocumentDescribeFleetsErrorSetUnwrapped(v *[]types.DescribeFleetError, decoder smithyxml.NodeDecoder) error {
+ var sv []types.DescribeFleetError
+ if *v == nil {
+ sv = make([]types.DescribeFleetError, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.DescribeFleetError
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentDescribeFleetError(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentDescribeFleetsInstances(v **types.DescribeFleetsInstances, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.DescribeFleetsInstances
+ if *v == nil {
+ sv = &types.DescribeFleetsInstances{}
+ } 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("instanceIds", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentInstanceIdsSet(&sv.InstanceIds, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("instanceType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.InstanceType = types.InstanceType(xtv)
+ }
+
+ case strings.EqualFold("launchTemplateAndOverrides", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentLaunchTemplateAndOverridesResponse(&sv.LaunchTemplateAndOverrides, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("lifecycle", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Lifecycle = types.InstanceLifecycle(xtv)
+ }
+
+ case strings.EqualFold("platform", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Platform = types.PlatformValues(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 awsEc2query_deserializeDocumentDescribeFleetsInstancesSet(v *[]types.DescribeFleetsInstances, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.DescribeFleetsInstances
+ if *v == nil {
+ sv = make([]types.DescribeFleetsInstances, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.DescribeFleetsInstances
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentDescribeFleetsInstances(&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 awsEc2query_deserializeDocumentDescribeFleetsInstancesSetUnwrapped(v *[]types.DescribeFleetsInstances, decoder smithyxml.NodeDecoder) error {
+ var sv []types.DescribeFleetsInstances
+ if *v == nil {
+ sv = make([]types.DescribeFleetsInstances, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.DescribeFleetsInstances
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentDescribeFleetsInstances(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentDhcpConfiguration(v **types.DhcpConfiguration, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.DhcpConfiguration
+ if *v == nil {
+ sv = &types.DhcpConfiguration{}
+ } 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("valueSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentDhcpConfigurationValueList(&sv.Values, 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 awsEc2query_deserializeDocumentDhcpConfigurationList(v *[]types.DhcpConfiguration, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.DhcpConfiguration
+ if *v == nil {
+ sv = make([]types.DhcpConfiguration, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.DhcpConfiguration
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentDhcpConfiguration(&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 awsEc2query_deserializeDocumentDhcpConfigurationListUnwrapped(v *[]types.DhcpConfiguration, decoder smithyxml.NodeDecoder) error {
+ var sv []types.DhcpConfiguration
+ if *v == nil {
+ sv = make([]types.DhcpConfiguration, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.DhcpConfiguration
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentDhcpConfiguration(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentDhcpConfigurationValueList(v *[]types.AttributeValue, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.AttributeValue
+ if *v == nil {
+ sv = make([]types.AttributeValue, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.AttributeValue
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentAttributeValue(&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 awsEc2query_deserializeDocumentDhcpConfigurationValueListUnwrapped(v *[]types.AttributeValue, decoder smithyxml.NodeDecoder) error {
+ var sv []types.AttributeValue
+ if *v == nil {
+ sv = make([]types.AttributeValue, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.AttributeValue
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentAttributeValue(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentDhcpOptions(v **types.DhcpOptions, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.DhcpOptions
+ if *v == nil {
+ sv = &types.DhcpOptions{}
+ } 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("dhcpConfigurationSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentDhcpConfigurationList(&sv.DhcpConfigurations, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("dhcpOptionsId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.DhcpOptionsId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("ownerId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.OwnerId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("tagSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_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 awsEc2query_deserializeDocumentDhcpOptionsList(v *[]types.DhcpOptions, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.DhcpOptions
+ if *v == nil {
+ sv = make([]types.DhcpOptions, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.DhcpOptions
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentDhcpOptions(&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 awsEc2query_deserializeDocumentDhcpOptionsListUnwrapped(v *[]types.DhcpOptions, decoder smithyxml.NodeDecoder) error {
+ var sv []types.DhcpOptions
+ if *v == nil {
+ sv = make([]types.DhcpOptions, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.DhcpOptions
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentDhcpOptions(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentDirectoryServiceAuthentication(v **types.DirectoryServiceAuthentication, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.DirectoryServiceAuthentication
+ if *v == nil {
+ sv = &types.DirectoryServiceAuthentication{}
+ } 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("directoryId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.DirectoryId = 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 awsEc2query_deserializeDocumentDisableFastSnapshotRestoreErrorItem(v **types.DisableFastSnapshotRestoreErrorItem, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.DisableFastSnapshotRestoreErrorItem
+ if *v == nil {
+ sv = &types.DisableFastSnapshotRestoreErrorItem{}
+ } 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("fastSnapshotRestoreStateErrorSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentDisableFastSnapshotRestoreStateErrorSet(&sv.FastSnapshotRestoreStateErrors, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("snapshotId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.SnapshotId = 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 awsEc2query_deserializeDocumentDisableFastSnapshotRestoreErrorSet(v *[]types.DisableFastSnapshotRestoreErrorItem, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.DisableFastSnapshotRestoreErrorItem
+ if *v == nil {
+ sv = make([]types.DisableFastSnapshotRestoreErrorItem, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.DisableFastSnapshotRestoreErrorItem
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentDisableFastSnapshotRestoreErrorItem(&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 awsEc2query_deserializeDocumentDisableFastSnapshotRestoreErrorSetUnwrapped(v *[]types.DisableFastSnapshotRestoreErrorItem, decoder smithyxml.NodeDecoder) error {
+ var sv []types.DisableFastSnapshotRestoreErrorItem
+ if *v == nil {
+ sv = make([]types.DisableFastSnapshotRestoreErrorItem, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.DisableFastSnapshotRestoreErrorItem
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentDisableFastSnapshotRestoreErrorItem(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentDisableFastSnapshotRestoreStateError(v **types.DisableFastSnapshotRestoreStateError, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.DisableFastSnapshotRestoreStateError
+ if *v == nil {
+ sv = &types.DisableFastSnapshotRestoreStateError{}
+ } 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("code", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Code = 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)
+ }
+
+ 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 awsEc2query_deserializeDocumentDisableFastSnapshotRestoreStateErrorItem(v **types.DisableFastSnapshotRestoreStateErrorItem, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.DisableFastSnapshotRestoreStateErrorItem
+ if *v == nil {
+ sv = &types.DisableFastSnapshotRestoreStateErrorItem{}
+ } 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("availabilityZone", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AvailabilityZone = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("error", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentDisableFastSnapshotRestoreStateError(&sv.Error, 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 awsEc2query_deserializeDocumentDisableFastSnapshotRestoreStateErrorSet(v *[]types.DisableFastSnapshotRestoreStateErrorItem, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.DisableFastSnapshotRestoreStateErrorItem
+ if *v == nil {
+ sv = make([]types.DisableFastSnapshotRestoreStateErrorItem, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.DisableFastSnapshotRestoreStateErrorItem
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentDisableFastSnapshotRestoreStateErrorItem(&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 awsEc2query_deserializeDocumentDisableFastSnapshotRestoreStateErrorSetUnwrapped(v *[]types.DisableFastSnapshotRestoreStateErrorItem, decoder smithyxml.NodeDecoder) error {
+ var sv []types.DisableFastSnapshotRestoreStateErrorItem
+ if *v == nil {
+ sv = make([]types.DisableFastSnapshotRestoreStateErrorItem, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.DisableFastSnapshotRestoreStateErrorItem
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentDisableFastSnapshotRestoreStateErrorItem(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentDisableFastSnapshotRestoreSuccessItem(v **types.DisableFastSnapshotRestoreSuccessItem, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.DisableFastSnapshotRestoreSuccessItem
+ if *v == nil {
+ sv = &types.DisableFastSnapshotRestoreSuccessItem{}
+ } 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("availabilityZone", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AvailabilityZone = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("disabledTime", 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.DisabledTime = ptr.Time(t)
+ }
+
+ case strings.EqualFold("disablingTime", 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.DisablingTime = ptr.Time(t)
+ }
+
+ case strings.EqualFold("enabledTime", 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.EnabledTime = ptr.Time(t)
+ }
+
+ case strings.EqualFold("enablingTime", 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.EnablingTime = ptr.Time(t)
+ }
+
+ case strings.EqualFold("optimizingTime", 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.OptimizingTime = ptr.Time(t)
+ }
+
+ case strings.EqualFold("ownerAlias", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.OwnerAlias = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("ownerId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.OwnerId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("snapshotId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.SnapshotId = 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 = types.FastSnapshotRestoreStateCode(xtv)
+ }
+
+ case strings.EqualFold("stateTransitionReason", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.StateTransitionReason = 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 awsEc2query_deserializeDocumentDisableFastSnapshotRestoreSuccessSet(v *[]types.DisableFastSnapshotRestoreSuccessItem, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.DisableFastSnapshotRestoreSuccessItem
+ if *v == nil {
+ sv = make([]types.DisableFastSnapshotRestoreSuccessItem, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.DisableFastSnapshotRestoreSuccessItem
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentDisableFastSnapshotRestoreSuccessItem(&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 awsEc2query_deserializeDocumentDisableFastSnapshotRestoreSuccessSetUnwrapped(v *[]types.DisableFastSnapshotRestoreSuccessItem, decoder smithyxml.NodeDecoder) error {
+ var sv []types.DisableFastSnapshotRestoreSuccessItem
+ if *v == nil {
+ sv = make([]types.DisableFastSnapshotRestoreSuccessItem, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.DisableFastSnapshotRestoreSuccessItem
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentDisableFastSnapshotRestoreSuccessItem(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentDiskImageDescription(v **types.DiskImageDescription, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.DiskImageDescription
+ if *v == nil {
+ sv = &types.DiskImageDescription{}
+ } 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("checksum", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Checksum = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("format", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Format = types.DiskImageFormat(xtv)
+ }
+
+ case strings.EqualFold("importManifestUrl", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ImportManifestUrl = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("size", 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.Size = 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 awsEc2query_deserializeDocumentDiskImageVolumeDescription(v **types.DiskImageVolumeDescription, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.DiskImageVolumeDescription
+ if *v == nil {
+ sv = &types.DiskImageVolumeDescription{}
+ } 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("size", 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.Size = 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 awsEc2query_deserializeDocumentDiskInfo(v **types.DiskInfo, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.DiskInfo
+ if *v == nil {
+ sv = &types.DiskInfo{}
+ } 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 = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("sizeInGB", 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.SizeInGB = 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.DiskType(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 awsEc2query_deserializeDocumentDiskInfoList(v *[]types.DiskInfo, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.DiskInfo
+ if *v == nil {
+ sv = make([]types.DiskInfo, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.DiskInfo
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentDiskInfo(&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 awsEc2query_deserializeDocumentDiskInfoListUnwrapped(v *[]types.DiskInfo, decoder smithyxml.NodeDecoder) error {
+ var sv []types.DiskInfo
+ if *v == nil {
+ sv = make([]types.DiskInfo, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.DiskInfo
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentDiskInfo(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentDnsEntry(v **types.DnsEntry, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.DnsEntry
+ if *v == nil {
+ sv = &types.DnsEntry{}
+ } 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)
+ }
+
+ 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 awsEc2query_deserializeDocumentDnsEntrySet(v *[]types.DnsEntry, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.DnsEntry
+ if *v == nil {
+ sv = make([]types.DnsEntry, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.DnsEntry
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentDnsEntry(&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 awsEc2query_deserializeDocumentDnsEntrySetUnwrapped(v *[]types.DnsEntry, decoder smithyxml.NodeDecoder) error {
+ var sv []types.DnsEntry
+ if *v == nil {
+ sv = make([]types.DnsEntry, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.DnsEntry
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentDnsEntry(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentEbsBlockDevice(v **types.EbsBlockDevice, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.EbsBlockDevice
+ if *v == nil {
+ sv = &types.EbsBlockDevice{}
+ } 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("deleteOnTermination", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.DeleteOnTermination = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("encrypted", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.Encrypted = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("iops", 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.Iops = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("KmsKeyId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.KmsKeyId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("outpostArn", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.OutpostArn = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("snapshotId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.SnapshotId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("throughput", 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.Throughput = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("volumeSize", 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.VolumeSize = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("volumeType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.VolumeType = types.VolumeType(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 awsEc2query_deserializeDocumentEbsInfo(v **types.EbsInfo, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.EbsInfo
+ if *v == nil {
+ sv = &types.EbsInfo{}
+ } 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("ebsOptimizedInfo", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentEbsOptimizedInfo(&sv.EbsOptimizedInfo, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("ebsOptimizedSupport", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.EbsOptimizedSupport = types.EbsOptimizedSupport(xtv)
+ }
+
+ case strings.EqualFold("encryptionSupport", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.EncryptionSupport = types.EbsEncryptionSupport(xtv)
+ }
+
+ case strings.EqualFold("nvmeSupport", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.NvmeSupport = types.EbsNvmeSupport(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 awsEc2query_deserializeDocumentEbsInstanceBlockDevice(v **types.EbsInstanceBlockDevice, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.EbsInstanceBlockDevice
+ if *v == nil {
+ sv = &types.EbsInstanceBlockDevice{}
+ } 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("attachTime", 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.AttachTime = ptr.Time(t)
+ }
+
+ case strings.EqualFold("deleteOnTermination", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.DeleteOnTermination = ptr.Bool(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.AttachmentStatus(xtv)
+ }
+
+ case strings.EqualFold("volumeId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.VolumeId = 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 awsEc2query_deserializeDocumentEbsOptimizedInfo(v **types.EbsOptimizedInfo, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.EbsOptimizedInfo
+ if *v == nil {
+ sv = &types.EbsOptimizedInfo{}
+ } 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("baselineBandwidthInMbps", 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.BaselineBandwidthInMbps = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("baselineIops", 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.BaselineIops = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("baselineThroughputInMBps", 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.BaselineThroughputInMBps = ptr.Float64(f64)
+ }
+
+ case strings.EqualFold("maximumBandwidthInMbps", 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.MaximumBandwidthInMbps = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("maximumIops", 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.MaximumIops = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("maximumThroughputInMBps", 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.MaximumThroughputInMBps = 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 awsEc2query_deserializeDocumentEfaInfo(v **types.EfaInfo, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.EfaInfo
+ if *v == nil {
+ sv = &types.EfaInfo{}
+ } 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("maximumEfaInterfaces", 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.MaximumEfaInterfaces = 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 awsEc2query_deserializeDocumentEgressOnlyInternetGateway(v **types.EgressOnlyInternetGateway, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.EgressOnlyInternetGateway
+ if *v == nil {
+ sv = &types.EgressOnlyInternetGateway{}
+ } 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("attachmentSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentInternetGatewayAttachmentList(&sv.Attachments, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("egressOnlyInternetGatewayId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.EgressOnlyInternetGatewayId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("tagSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_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 awsEc2query_deserializeDocumentEgressOnlyInternetGatewayList(v *[]types.EgressOnlyInternetGateway, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.EgressOnlyInternetGateway
+ if *v == nil {
+ sv = make([]types.EgressOnlyInternetGateway, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.EgressOnlyInternetGateway
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentEgressOnlyInternetGateway(&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 awsEc2query_deserializeDocumentEgressOnlyInternetGatewayListUnwrapped(v *[]types.EgressOnlyInternetGateway, decoder smithyxml.NodeDecoder) error {
+ var sv []types.EgressOnlyInternetGateway
+ if *v == nil {
+ sv = make([]types.EgressOnlyInternetGateway, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.EgressOnlyInternetGateway
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentEgressOnlyInternetGateway(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentElasticGpuAssociation(v **types.ElasticGpuAssociation, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.ElasticGpuAssociation
+ if *v == nil {
+ sv = &types.ElasticGpuAssociation{}
+ } 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("elasticGpuAssociationId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ElasticGpuAssociationId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("elasticGpuAssociationState", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ElasticGpuAssociationState = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("elasticGpuAssociationTime", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ElasticGpuAssociationTime = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("elasticGpuId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ElasticGpuId = 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 awsEc2query_deserializeDocumentElasticGpuAssociationList(v *[]types.ElasticGpuAssociation, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.ElasticGpuAssociation
+ if *v == nil {
+ sv = make([]types.ElasticGpuAssociation, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.ElasticGpuAssociation
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentElasticGpuAssociation(&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 awsEc2query_deserializeDocumentElasticGpuAssociationListUnwrapped(v *[]types.ElasticGpuAssociation, decoder smithyxml.NodeDecoder) error {
+ var sv []types.ElasticGpuAssociation
+ if *v == nil {
+ sv = make([]types.ElasticGpuAssociation, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.ElasticGpuAssociation
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentElasticGpuAssociation(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentElasticGpuHealth(v **types.ElasticGpuHealth, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.ElasticGpuHealth
+ if *v == nil {
+ sv = &types.ElasticGpuHealth{}
+ } 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("status", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Status = types.ElasticGpuStatus(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 awsEc2query_deserializeDocumentElasticGpus(v **types.ElasticGpus, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.ElasticGpus
+ if *v == nil {
+ sv = &types.ElasticGpus{}
+ } 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("availabilityZone", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AvailabilityZone = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("elasticGpuHealth", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentElasticGpuHealth(&sv.ElasticGpuHealth, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("elasticGpuId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ElasticGpuId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("elasticGpuState", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ElasticGpuState = types.ElasticGpuState(xtv)
+ }
+
+ case strings.EqualFold("elasticGpuType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ElasticGpuType = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("instanceId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.InstanceId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("tagSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_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 awsEc2query_deserializeDocumentElasticGpuSet(v *[]types.ElasticGpus, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.ElasticGpus
+ if *v == nil {
+ sv = make([]types.ElasticGpus, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.ElasticGpus
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentElasticGpus(&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 awsEc2query_deserializeDocumentElasticGpuSetUnwrapped(v *[]types.ElasticGpus, decoder smithyxml.NodeDecoder) error {
+ var sv []types.ElasticGpus
+ if *v == nil {
+ sv = make([]types.ElasticGpus, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.ElasticGpus
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentElasticGpus(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentElasticGpuSpecificationResponse(v **types.ElasticGpuSpecificationResponse, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.ElasticGpuSpecificationResponse
+ if *v == nil {
+ sv = &types.ElasticGpuSpecificationResponse{}
+ } 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 = 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 awsEc2query_deserializeDocumentElasticGpuSpecificationResponseList(v *[]types.ElasticGpuSpecificationResponse, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.ElasticGpuSpecificationResponse
+ if *v == nil {
+ sv = make([]types.ElasticGpuSpecificationResponse, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.ElasticGpuSpecificationResponse
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentElasticGpuSpecificationResponse(&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 awsEc2query_deserializeDocumentElasticGpuSpecificationResponseListUnwrapped(v *[]types.ElasticGpuSpecificationResponse, decoder smithyxml.NodeDecoder) error {
+ var sv []types.ElasticGpuSpecificationResponse
+ if *v == nil {
+ sv = make([]types.ElasticGpuSpecificationResponse, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.ElasticGpuSpecificationResponse
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentElasticGpuSpecificationResponse(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentElasticInferenceAcceleratorAssociation(v **types.ElasticInferenceAcceleratorAssociation, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.ElasticInferenceAcceleratorAssociation
+ if *v == nil {
+ sv = &types.ElasticInferenceAcceleratorAssociation{}
+ } 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("elasticInferenceAcceleratorArn", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ElasticInferenceAcceleratorArn = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("elasticInferenceAcceleratorAssociationId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ElasticInferenceAcceleratorAssociationId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("elasticInferenceAcceleratorAssociationState", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ElasticInferenceAcceleratorAssociationState = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("elasticInferenceAcceleratorAssociationTime", 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.ElasticInferenceAcceleratorAssociationTime = 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 awsEc2query_deserializeDocumentElasticInferenceAcceleratorAssociationList(v *[]types.ElasticInferenceAcceleratorAssociation, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.ElasticInferenceAcceleratorAssociation
+ if *v == nil {
+ sv = make([]types.ElasticInferenceAcceleratorAssociation, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.ElasticInferenceAcceleratorAssociation
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentElasticInferenceAcceleratorAssociation(&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 awsEc2query_deserializeDocumentElasticInferenceAcceleratorAssociationListUnwrapped(v *[]types.ElasticInferenceAcceleratorAssociation, decoder smithyxml.NodeDecoder) error {
+ var sv []types.ElasticInferenceAcceleratorAssociation
+ if *v == nil {
+ sv = make([]types.ElasticInferenceAcceleratorAssociation, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.ElasticInferenceAcceleratorAssociation
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentElasticInferenceAcceleratorAssociation(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentEnableFastSnapshotRestoreErrorItem(v **types.EnableFastSnapshotRestoreErrorItem, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.EnableFastSnapshotRestoreErrorItem
+ if *v == nil {
+ sv = &types.EnableFastSnapshotRestoreErrorItem{}
+ } 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("fastSnapshotRestoreStateErrorSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentEnableFastSnapshotRestoreStateErrorSet(&sv.FastSnapshotRestoreStateErrors, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("snapshotId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.SnapshotId = 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 awsEc2query_deserializeDocumentEnableFastSnapshotRestoreErrorSet(v *[]types.EnableFastSnapshotRestoreErrorItem, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.EnableFastSnapshotRestoreErrorItem
+ if *v == nil {
+ sv = make([]types.EnableFastSnapshotRestoreErrorItem, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.EnableFastSnapshotRestoreErrorItem
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentEnableFastSnapshotRestoreErrorItem(&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 awsEc2query_deserializeDocumentEnableFastSnapshotRestoreErrorSetUnwrapped(v *[]types.EnableFastSnapshotRestoreErrorItem, decoder smithyxml.NodeDecoder) error {
+ var sv []types.EnableFastSnapshotRestoreErrorItem
+ if *v == nil {
+ sv = make([]types.EnableFastSnapshotRestoreErrorItem, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.EnableFastSnapshotRestoreErrorItem
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentEnableFastSnapshotRestoreErrorItem(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentEnableFastSnapshotRestoreStateError(v **types.EnableFastSnapshotRestoreStateError, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.EnableFastSnapshotRestoreStateError
+ if *v == nil {
+ sv = &types.EnableFastSnapshotRestoreStateError{}
+ } 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("code", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Code = 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)
+ }
+
+ 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 awsEc2query_deserializeDocumentEnableFastSnapshotRestoreStateErrorItem(v **types.EnableFastSnapshotRestoreStateErrorItem, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.EnableFastSnapshotRestoreStateErrorItem
+ if *v == nil {
+ sv = &types.EnableFastSnapshotRestoreStateErrorItem{}
+ } 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("availabilityZone", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AvailabilityZone = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("error", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentEnableFastSnapshotRestoreStateError(&sv.Error, 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 awsEc2query_deserializeDocumentEnableFastSnapshotRestoreStateErrorSet(v *[]types.EnableFastSnapshotRestoreStateErrorItem, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.EnableFastSnapshotRestoreStateErrorItem
+ if *v == nil {
+ sv = make([]types.EnableFastSnapshotRestoreStateErrorItem, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.EnableFastSnapshotRestoreStateErrorItem
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentEnableFastSnapshotRestoreStateErrorItem(&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 awsEc2query_deserializeDocumentEnableFastSnapshotRestoreStateErrorSetUnwrapped(v *[]types.EnableFastSnapshotRestoreStateErrorItem, decoder smithyxml.NodeDecoder) error {
+ var sv []types.EnableFastSnapshotRestoreStateErrorItem
+ if *v == nil {
+ sv = make([]types.EnableFastSnapshotRestoreStateErrorItem, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.EnableFastSnapshotRestoreStateErrorItem
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentEnableFastSnapshotRestoreStateErrorItem(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentEnableFastSnapshotRestoreSuccessItem(v **types.EnableFastSnapshotRestoreSuccessItem, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.EnableFastSnapshotRestoreSuccessItem
+ if *v == nil {
+ sv = &types.EnableFastSnapshotRestoreSuccessItem{}
+ } 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("availabilityZone", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AvailabilityZone = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("disabledTime", 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.DisabledTime = ptr.Time(t)
+ }
+
+ case strings.EqualFold("disablingTime", 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.DisablingTime = ptr.Time(t)
+ }
+
+ case strings.EqualFold("enabledTime", 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.EnabledTime = ptr.Time(t)
+ }
+
+ case strings.EqualFold("enablingTime", 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.EnablingTime = ptr.Time(t)
+ }
+
+ case strings.EqualFold("optimizingTime", 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.OptimizingTime = ptr.Time(t)
+ }
+
+ case strings.EqualFold("ownerAlias", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.OwnerAlias = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("ownerId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.OwnerId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("snapshotId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.SnapshotId = 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 = types.FastSnapshotRestoreStateCode(xtv)
+ }
+
+ case strings.EqualFold("stateTransitionReason", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.StateTransitionReason = 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 awsEc2query_deserializeDocumentEnableFastSnapshotRestoreSuccessSet(v *[]types.EnableFastSnapshotRestoreSuccessItem, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.EnableFastSnapshotRestoreSuccessItem
+ if *v == nil {
+ sv = make([]types.EnableFastSnapshotRestoreSuccessItem, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.EnableFastSnapshotRestoreSuccessItem
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentEnableFastSnapshotRestoreSuccessItem(&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 awsEc2query_deserializeDocumentEnableFastSnapshotRestoreSuccessSetUnwrapped(v *[]types.EnableFastSnapshotRestoreSuccessItem, decoder smithyxml.NodeDecoder) error {
+ var sv []types.EnableFastSnapshotRestoreSuccessItem
+ if *v == nil {
+ sv = make([]types.EnableFastSnapshotRestoreSuccessItem, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.EnableFastSnapshotRestoreSuccessItem
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentEnableFastSnapshotRestoreSuccessItem(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentEnclaveOptions(v **types.EnclaveOptions, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.EnclaveOptions
+ if *v == nil {
+ sv = &types.EnclaveOptions{}
+ } 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("enabled", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.Enabled = ptr.Bool(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 awsEc2query_deserializeDocumentEndpointSet(v *[]types.ClientVpnEndpoint, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.ClientVpnEndpoint
+ if *v == nil {
+ sv = make([]types.ClientVpnEndpoint, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.ClientVpnEndpoint
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentClientVpnEndpoint(&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 awsEc2query_deserializeDocumentEndpointSetUnwrapped(v *[]types.ClientVpnEndpoint, decoder smithyxml.NodeDecoder) error {
+ var sv []types.ClientVpnEndpoint
+ if *v == nil {
+ sv = make([]types.ClientVpnEndpoint, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.ClientVpnEndpoint
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentClientVpnEndpoint(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentErrorSet(v *[]types.ValidationError, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.ValidationError
+ if *v == nil {
+ sv = make([]types.ValidationError, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.ValidationError
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentValidationError(&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 awsEc2query_deserializeDocumentErrorSetUnwrapped(v *[]types.ValidationError, decoder smithyxml.NodeDecoder) error {
+ var sv []types.ValidationError
+ if *v == nil {
+ sv = make([]types.ValidationError, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.ValidationError
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentValidationError(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentEventInformation(v **types.EventInformation, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.EventInformation
+ if *v == nil {
+ sv = &types.EventInformation{}
+ } 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("eventDescription", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.EventDescription = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("eventSubType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.EventSubType = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("instanceId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.InstanceId = 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 awsEc2query_deserializeDocumentExplanation(v **types.Explanation, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.Explanation
+ if *v == nil {
+ sv = &types.Explanation{}
+ } 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("acl", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentAnalysisComponent(&sv.Acl, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("aclRule", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentAnalysisAclRule(&sv.AclRule, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("address", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Address = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("addressSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentIpAddressList(&sv.Addresses, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("attachedTo", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentAnalysisComponent(&sv.AttachedTo, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("availabilityZoneSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentValueStringList(&sv.AvailabilityZones, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("cidrSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentValueStringList(&sv.Cidrs, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("classicLoadBalancerListener", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentAnalysisLoadBalancerListener(&sv.ClassicLoadBalancerListener, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("component", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentAnalysisComponent(&sv.Component, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("customerGateway", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentAnalysisComponent(&sv.CustomerGateway, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("destination", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentAnalysisComponent(&sv.Destination, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("destinationVpc", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentAnalysisComponent(&sv.DestinationVpc, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("direction", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Direction = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("elasticLoadBalancerListener", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentAnalysisComponent(&sv.ElasticLoadBalancerListener, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("explanationCode", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ExplanationCode = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("ingressRouteTable", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentAnalysisComponent(&sv.IngressRouteTable, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("internetGateway", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentAnalysisComponent(&sv.InternetGateway, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("loadBalancerArn", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.LoadBalancerArn = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("loadBalancerListenerPort", 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.LoadBalancerListenerPort = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("loadBalancerTarget", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentAnalysisLoadBalancerTarget(&sv.LoadBalancerTarget, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("loadBalancerTargetGroup", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentAnalysisComponent(&sv.LoadBalancerTargetGroup, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("loadBalancerTargetGroupSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentAnalysisComponentList(&sv.LoadBalancerTargetGroups, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("loadBalancerTargetPort", 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.LoadBalancerTargetPort = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("missingComponent", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.MissingComponent = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("natGateway", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentAnalysisComponent(&sv.NatGateway, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("networkInterface", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentAnalysisComponent(&sv.NetworkInterface, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("packetField", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.PacketField = ptr.String(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("portRangeSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentPortRangeList(&sv.PortRanges, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("prefixList", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentAnalysisComponent(&sv.PrefixList, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("protocolSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentStringList(&sv.Protocols, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("routeTable", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentAnalysisComponent(&sv.RouteTable, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("routeTableRoute", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentAnalysisRouteTableRoute(&sv.RouteTableRoute, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("securityGroup", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentAnalysisComponent(&sv.SecurityGroup, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("securityGroupRule", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentAnalysisSecurityGroupRule(&sv.SecurityGroupRule, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("securityGroupSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentAnalysisComponentList(&sv.SecurityGroups, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("sourceVpc", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentAnalysisComponent(&sv.SourceVpc, nodeDecoder); err != nil {
+ return err
+ }
+
+ 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("subnet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentAnalysisComponent(&sv.Subnet, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("subnetRouteTable", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentAnalysisComponent(&sv.SubnetRouteTable, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("vpc", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentAnalysisComponent(&sv.Vpc, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("vpcEndpoint", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentAnalysisComponent(&sv.VpcEndpoint, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("vpcPeeringConnection", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentAnalysisComponent(&sv.VpcPeeringConnection, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("vpnConnection", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentAnalysisComponent(&sv.VpnConnection, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("vpnGateway", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentAnalysisComponent(&sv.VpnGateway, 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 awsEc2query_deserializeDocumentExplanationList(v *[]types.Explanation, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.Explanation
+ if *v == nil {
+ sv = make([]types.Explanation, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.Explanation
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentExplanation(&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 awsEc2query_deserializeDocumentExplanationListUnwrapped(v *[]types.Explanation, decoder smithyxml.NodeDecoder) error {
+ var sv []types.Explanation
+ if *v == nil {
+ sv = make([]types.Explanation, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.Explanation
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentExplanation(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentExportImageTask(v **types.ExportImageTask, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.ExportImageTask
+ if *v == nil {
+ sv = &types.ExportImageTask{}
+ } 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("exportImageTaskId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ExportImageTaskId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("imageId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ImageId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("progress", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Progress = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("s3ExportLocation", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentExportTaskS3Location(&sv.S3ExportLocation, nodeDecoder); err != nil {
+ return err
+ }
+
+ 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)
+ }
+
+ case strings.EqualFold("tagSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_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 awsEc2query_deserializeDocumentExportImageTaskList(v *[]types.ExportImageTask, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.ExportImageTask
+ if *v == nil {
+ sv = make([]types.ExportImageTask, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.ExportImageTask
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentExportImageTask(&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 awsEc2query_deserializeDocumentExportImageTaskListUnwrapped(v *[]types.ExportImageTask, decoder smithyxml.NodeDecoder) error {
+ var sv []types.ExportImageTask
+ if *v == nil {
+ sv = make([]types.ExportImageTask, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.ExportImageTask
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentExportImageTask(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentExportTask(v **types.ExportTask, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.ExportTask
+ if *v == nil {
+ sv = &types.ExportTask{}
+ } 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("exportTaskId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ExportTaskId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("exportToS3", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentExportToS3Task(&sv.ExportToS3Task, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("instanceExport", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentInstanceExportDetails(&sv.InstanceExportDetails, nodeDecoder); err != nil {
+ return err
+ }
+
+ 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 = types.ExportTaskState(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)
+ }
+
+ case strings.EqualFold("tagSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_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 awsEc2query_deserializeDocumentExportTaskList(v *[]types.ExportTask, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.ExportTask
+ if *v == nil {
+ sv = make([]types.ExportTask, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.ExportTask
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentExportTask(&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 awsEc2query_deserializeDocumentExportTaskListUnwrapped(v *[]types.ExportTask, decoder smithyxml.NodeDecoder) error {
+ var sv []types.ExportTask
+ if *v == nil {
+ sv = make([]types.ExportTask, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.ExportTask
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentExportTask(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentExportTaskS3Location(v **types.ExportTaskS3Location, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.ExportTaskS3Location
+ if *v == nil {
+ sv = &types.ExportTaskS3Location{}
+ } 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("s3Bucket", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.S3Bucket = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("s3Prefix", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.S3Prefix = 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 awsEc2query_deserializeDocumentExportToS3Task(v **types.ExportToS3Task, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.ExportToS3Task
+ if *v == nil {
+ sv = &types.ExportToS3Task{}
+ } 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("containerFormat", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ContainerFormat = types.ContainerFormat(xtv)
+ }
+
+ case strings.EqualFold("diskImageFormat", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.DiskImageFormat = types.DiskImageFormat(xtv)
+ }
+
+ case strings.EqualFold("s3Bucket", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.S3Bucket = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("s3Key", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.S3Key = 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 awsEc2query_deserializeDocumentFailedQueuedPurchaseDeletion(v **types.FailedQueuedPurchaseDeletion, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.FailedQueuedPurchaseDeletion
+ if *v == nil {
+ sv = &types.FailedQueuedPurchaseDeletion{}
+ } 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("error", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentDeleteQueuedReservedInstancesError(&sv.Error, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("reservedInstancesId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ReservedInstancesId = 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 awsEc2query_deserializeDocumentFailedQueuedPurchaseDeletionSet(v *[]types.FailedQueuedPurchaseDeletion, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.FailedQueuedPurchaseDeletion
+ if *v == nil {
+ sv = make([]types.FailedQueuedPurchaseDeletion, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.FailedQueuedPurchaseDeletion
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentFailedQueuedPurchaseDeletion(&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 awsEc2query_deserializeDocumentFailedQueuedPurchaseDeletionSetUnwrapped(v *[]types.FailedQueuedPurchaseDeletion, decoder smithyxml.NodeDecoder) error {
+ var sv []types.FailedQueuedPurchaseDeletion
+ if *v == nil {
+ sv = make([]types.FailedQueuedPurchaseDeletion, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.FailedQueuedPurchaseDeletion
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentFailedQueuedPurchaseDeletion(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentFederatedAuthentication(v **types.FederatedAuthentication, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.FederatedAuthentication
+ if *v == nil {
+ sv = &types.FederatedAuthentication{}
+ } 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("samlProviderArn", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.SamlProviderArn = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("selfServiceSamlProviderArn", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.SelfServiceSamlProviderArn = 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 awsEc2query_deserializeDocumentFleetData(v **types.FleetData, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.FleetData
+ if *v == nil {
+ sv = &types.FleetData{}
+ } 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("activityStatus", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ActivityStatus = types.FleetActivityStatus(xtv)
+ }
+
+ case strings.EqualFold("clientToken", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ClientToken = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("context", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Context = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("createTime", 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.CreateTime = ptr.Time(t)
+ }
+
+ case strings.EqualFold("errorSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentDescribeFleetsErrorSet(&sv.Errors, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("excessCapacityTerminationPolicy", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ExcessCapacityTerminationPolicy = types.FleetExcessCapacityTerminationPolicy(xtv)
+ }
+
+ case strings.EqualFold("fleetId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.FleetId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("fleetState", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.FleetState = types.FleetStateCode(xtv)
+ }
+
+ case strings.EqualFold("fulfilledCapacity", 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.FulfilledCapacity = ptr.Float64(f64)
+ }
+
+ case strings.EqualFold("fulfilledOnDemandCapacity", 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.FulfilledOnDemandCapacity = ptr.Float64(f64)
+ }
+
+ case strings.EqualFold("fleetInstanceSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentDescribeFleetsInstancesSet(&sv.Instances, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("launchTemplateConfigs", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentFleetLaunchTemplateConfigList(&sv.LaunchTemplateConfigs, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("onDemandOptions", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentOnDemandOptions(&sv.OnDemandOptions, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("replaceUnhealthyInstances", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.ReplaceUnhealthyInstances = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("spotOptions", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentSpotOptions(&sv.SpotOptions, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("tagSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("targetCapacitySpecification", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTargetCapacitySpecification(&sv.TargetCapacitySpecification, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("terminateInstancesWithExpiration", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.TerminateInstancesWithExpiration = ptr.Bool(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.FleetType(xtv)
+ }
+
+ case strings.EqualFold("validFrom", 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.ValidFrom = ptr.Time(t)
+ }
+
+ case strings.EqualFold("validUntil", 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.ValidUntil = 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 awsEc2query_deserializeDocumentFleetLaunchTemplateConfig(v **types.FleetLaunchTemplateConfig, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.FleetLaunchTemplateConfig
+ if *v == nil {
+ sv = &types.FleetLaunchTemplateConfig{}
+ } 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("launchTemplateSpecification", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentFleetLaunchTemplateSpecification(&sv.LaunchTemplateSpecification, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("overrides", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentFleetLaunchTemplateOverridesList(&sv.Overrides, 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 awsEc2query_deserializeDocumentFleetLaunchTemplateConfigList(v *[]types.FleetLaunchTemplateConfig, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.FleetLaunchTemplateConfig
+ if *v == nil {
+ sv = make([]types.FleetLaunchTemplateConfig, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.FleetLaunchTemplateConfig
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentFleetLaunchTemplateConfig(&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 awsEc2query_deserializeDocumentFleetLaunchTemplateConfigListUnwrapped(v *[]types.FleetLaunchTemplateConfig, decoder smithyxml.NodeDecoder) error {
+ var sv []types.FleetLaunchTemplateConfig
+ if *v == nil {
+ sv = make([]types.FleetLaunchTemplateConfig, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.FleetLaunchTemplateConfig
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentFleetLaunchTemplateConfig(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentFleetLaunchTemplateOverrides(v **types.FleetLaunchTemplateOverrides, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.FleetLaunchTemplateOverrides
+ if *v == nil {
+ sv = &types.FleetLaunchTemplateOverrides{}
+ } 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("availabilityZone", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AvailabilityZone = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("instanceType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.InstanceType = types.InstanceType(xtv)
+ }
+
+ case strings.EqualFold("maxPrice", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.MaxPrice = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("placement", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentPlacementResponse(&sv.Placement, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("priority", 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.Priority = ptr.Float64(f64)
+ }
+
+ case strings.EqualFold("subnetId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.SubnetId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("weightedCapacity", 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.WeightedCapacity = 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 awsEc2query_deserializeDocumentFleetLaunchTemplateOverridesList(v *[]types.FleetLaunchTemplateOverrides, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.FleetLaunchTemplateOverrides
+ if *v == nil {
+ sv = make([]types.FleetLaunchTemplateOverrides, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.FleetLaunchTemplateOverrides
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentFleetLaunchTemplateOverrides(&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 awsEc2query_deserializeDocumentFleetLaunchTemplateOverridesListUnwrapped(v *[]types.FleetLaunchTemplateOverrides, decoder smithyxml.NodeDecoder) error {
+ var sv []types.FleetLaunchTemplateOverrides
+ if *v == nil {
+ sv = make([]types.FleetLaunchTemplateOverrides, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.FleetLaunchTemplateOverrides
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentFleetLaunchTemplateOverrides(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentFleetLaunchTemplateSpecification(v **types.FleetLaunchTemplateSpecification, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.FleetLaunchTemplateSpecification
+ if *v == nil {
+ sv = &types.FleetLaunchTemplateSpecification{}
+ } 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("launchTemplateId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.LaunchTemplateId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("launchTemplateName", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.LaunchTemplateName = 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)
+ sv.Version = 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 awsEc2query_deserializeDocumentFleetSet(v *[]types.FleetData, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.FleetData
+ if *v == nil {
+ sv = make([]types.FleetData, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.FleetData
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentFleetData(&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 awsEc2query_deserializeDocumentFleetSetUnwrapped(v *[]types.FleetData, decoder smithyxml.NodeDecoder) error {
+ var sv []types.FleetData
+ if *v == nil {
+ sv = make([]types.FleetData, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.FleetData
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentFleetData(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentFleetSpotCapacityRebalance(v **types.FleetSpotCapacityRebalance, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.FleetSpotCapacityRebalance
+ if *v == nil {
+ sv = &types.FleetSpotCapacityRebalance{}
+ } 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("replacementStrategy", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ReplacementStrategy = types.FleetReplacementStrategy(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 awsEc2query_deserializeDocumentFleetSpotMaintenanceStrategies(v **types.FleetSpotMaintenanceStrategies, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.FleetSpotMaintenanceStrategies
+ if *v == nil {
+ sv = &types.FleetSpotMaintenanceStrategies{}
+ } 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("capacityRebalance", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentFleetSpotCapacityRebalance(&sv.CapacityRebalance, 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 awsEc2query_deserializeDocumentFlowLog(v **types.FlowLog, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.FlowLog
+ if *v == nil {
+ sv = &types.FlowLog{}
+ } 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("creationTime", 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.CreationTime = ptr.Time(t)
+ }
+
+ case strings.EqualFold("deliverLogsErrorMessage", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.DeliverLogsErrorMessage = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("deliverLogsPermissionArn", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.DeliverLogsPermissionArn = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("deliverLogsStatus", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.DeliverLogsStatus = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("flowLogId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.FlowLogId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("flowLogStatus", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.FlowLogStatus = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("logDestination", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.LogDestination = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("logDestinationType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.LogDestinationType = types.LogDestinationType(xtv)
+ }
+
+ case strings.EqualFold("logFormat", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.LogFormat = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("logGroupName", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.LogGroupName = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("maxAggregationInterval", 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.MaxAggregationInterval = ptr.Int32(int32(i64))
+ }
+
+ 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("tagSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("trafficType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.TrafficType = types.TrafficType(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 awsEc2query_deserializeDocumentFlowLogSet(v *[]types.FlowLog, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.FlowLog
+ if *v == nil {
+ sv = make([]types.FlowLog, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.FlowLog
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentFlowLog(&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 awsEc2query_deserializeDocumentFlowLogSetUnwrapped(v *[]types.FlowLog, decoder smithyxml.NodeDecoder) error {
+ var sv []types.FlowLog
+ if *v == nil {
+ sv = make([]types.FlowLog, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.FlowLog
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentFlowLog(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentFpgaDeviceInfo(v **types.FpgaDeviceInfo, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.FpgaDeviceInfo
+ if *v == nil {
+ sv = &types.FpgaDeviceInfo{}
+ } 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 = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("manufacturer", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Manufacturer = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("memoryInfo", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentFpgaDeviceMemoryInfo(&sv.MemoryInfo, 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)
+ }
+
+ 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 awsEc2query_deserializeDocumentFpgaDeviceInfoList(v *[]types.FpgaDeviceInfo, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.FpgaDeviceInfo
+ if *v == nil {
+ sv = make([]types.FpgaDeviceInfo, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.FpgaDeviceInfo
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentFpgaDeviceInfo(&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 awsEc2query_deserializeDocumentFpgaDeviceInfoListUnwrapped(v *[]types.FpgaDeviceInfo, decoder smithyxml.NodeDecoder) error {
+ var sv []types.FpgaDeviceInfo
+ if *v == nil {
+ sv = make([]types.FpgaDeviceInfo, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.FpgaDeviceInfo
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentFpgaDeviceInfo(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentFpgaDeviceMemoryInfo(v **types.FpgaDeviceMemoryInfo, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.FpgaDeviceMemoryInfo
+ if *v == nil {
+ sv = &types.FpgaDeviceMemoryInfo{}
+ } 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("sizeInMiB", 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.SizeInMiB = 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 awsEc2query_deserializeDocumentFpgaImage(v **types.FpgaImage, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.FpgaImage
+ if *v == nil {
+ sv = &types.FpgaImage{}
+ } 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("createTime", 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.CreateTime = ptr.Time(t)
+ }
+
+ case strings.EqualFold("dataRetentionSupport", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.DataRetentionSupport = ptr.Bool(xtv)
+ }
+
+ 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("fpgaImageGlobalId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.FpgaImageGlobalId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("fpgaImageId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.FpgaImageId = 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("ownerAlias", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.OwnerAlias = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("ownerId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.OwnerId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("pciId", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentPciId(&sv.PciId, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("productCodes", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentProductCodeList(&sv.ProductCodes, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("public", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.Public = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("shellVersion", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ShellVersion = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("state", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentFpgaImageState(&sv.State, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("tags", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("updateTime", 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.UpdateTime = 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 awsEc2query_deserializeDocumentFpgaImageAttribute(v **types.FpgaImageAttribute, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.FpgaImageAttribute
+ if *v == nil {
+ sv = &types.FpgaImageAttribute{}
+ } 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("fpgaImageId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.FpgaImageId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("loadPermissions", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentLoadPermissionList(&sv.LoadPermissions, 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("productCodes", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentProductCodeList(&sv.ProductCodes, 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 awsEc2query_deserializeDocumentFpgaImageList(v *[]types.FpgaImage, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.FpgaImage
+ if *v == nil {
+ sv = make([]types.FpgaImage, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.FpgaImage
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentFpgaImage(&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 awsEc2query_deserializeDocumentFpgaImageListUnwrapped(v *[]types.FpgaImage, decoder smithyxml.NodeDecoder) error {
+ var sv []types.FpgaImage
+ if *v == nil {
+ sv = make([]types.FpgaImage, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.FpgaImage
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentFpgaImage(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentFpgaImageState(v **types.FpgaImageState, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.FpgaImageState
+ if *v == nil {
+ sv = &types.FpgaImageState{}
+ } 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("code", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Code = types.FpgaImageStateCode(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)
+ }
+
+ 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 awsEc2query_deserializeDocumentFpgaInfo(v **types.FpgaInfo, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.FpgaInfo
+ if *v == nil {
+ sv = &types.FpgaInfo{}
+ } 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("fpgas", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentFpgaDeviceInfoList(&sv.Fpgas, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("totalFpgaMemoryInMiB", 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.TotalFpgaMemoryInMiB = 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 awsEc2query_deserializeDocumentGpuDeviceInfo(v **types.GpuDeviceInfo, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.GpuDeviceInfo
+ if *v == nil {
+ sv = &types.GpuDeviceInfo{}
+ } 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 = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("manufacturer", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Manufacturer = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("memoryInfo", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentGpuDeviceMemoryInfo(&sv.MemoryInfo, 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)
+ }
+
+ 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 awsEc2query_deserializeDocumentGpuDeviceInfoList(v *[]types.GpuDeviceInfo, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.GpuDeviceInfo
+ if *v == nil {
+ sv = make([]types.GpuDeviceInfo, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.GpuDeviceInfo
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentGpuDeviceInfo(&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 awsEc2query_deserializeDocumentGpuDeviceInfoListUnwrapped(v *[]types.GpuDeviceInfo, decoder smithyxml.NodeDecoder) error {
+ var sv []types.GpuDeviceInfo
+ if *v == nil {
+ sv = make([]types.GpuDeviceInfo, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.GpuDeviceInfo
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentGpuDeviceInfo(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentGpuDeviceMemoryInfo(v **types.GpuDeviceMemoryInfo, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.GpuDeviceMemoryInfo
+ if *v == nil {
+ sv = &types.GpuDeviceMemoryInfo{}
+ } 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("sizeInMiB", 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.SizeInMiB = 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 awsEc2query_deserializeDocumentGpuInfo(v **types.GpuInfo, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.GpuInfo
+ if *v == nil {
+ sv = &types.GpuInfo{}
+ } 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("gpus", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentGpuDeviceInfoList(&sv.Gpus, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("totalGpuMemoryInMiB", 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.TotalGpuMemoryInMiB = 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 awsEc2query_deserializeDocumentGroupIdentifier(v **types.GroupIdentifier, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.GroupIdentifier
+ if *v == nil {
+ sv = &types.GroupIdentifier{}
+ } 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("groupId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.GroupId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("groupName", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.GroupName = 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 awsEc2query_deserializeDocumentGroupIdentifierList(v *[]types.GroupIdentifier, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.GroupIdentifier
+ if *v == nil {
+ sv = make([]types.GroupIdentifier, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.GroupIdentifier
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentGroupIdentifier(&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 awsEc2query_deserializeDocumentGroupIdentifierListUnwrapped(v *[]types.GroupIdentifier, decoder smithyxml.NodeDecoder) error {
+ var sv []types.GroupIdentifier
+ if *v == nil {
+ sv = make([]types.GroupIdentifier, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.GroupIdentifier
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentGroupIdentifier(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentGroupIdentifierSet(v *[]types.SecurityGroupIdentifier, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.SecurityGroupIdentifier
+ if *v == nil {
+ sv = make([]types.SecurityGroupIdentifier, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.SecurityGroupIdentifier
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentSecurityGroupIdentifier(&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 awsEc2query_deserializeDocumentGroupIdentifierSetUnwrapped(v *[]types.SecurityGroupIdentifier, decoder smithyxml.NodeDecoder) error {
+ var sv []types.SecurityGroupIdentifier
+ if *v == nil {
+ sv = make([]types.SecurityGroupIdentifier, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.SecurityGroupIdentifier
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentSecurityGroupIdentifier(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentGroupIdStringList(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("groupId", 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 awsEc2query_deserializeDocumentGroupIdStringListUnwrapped(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 awsEc2query_deserializeDocumentHibernationOptions(v **types.HibernationOptions, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.HibernationOptions
+ if *v == nil {
+ sv = &types.HibernationOptions{}
+ } 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("configured", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.Configured = ptr.Bool(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 awsEc2query_deserializeDocumentHistoryRecord(v **types.HistoryRecord, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.HistoryRecord
+ if *v == nil {
+ sv = &types.HistoryRecord{}
+ } 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("eventInformation", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentEventInformation(&sv.EventInformation, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("eventType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.EventType = types.EventType(xtv)
+ }
+
+ case strings.EqualFold("timestamp", 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.Timestamp = 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 awsEc2query_deserializeDocumentHistoryRecordEntry(v **types.HistoryRecordEntry, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.HistoryRecordEntry
+ if *v == nil {
+ sv = &types.HistoryRecordEntry{}
+ } 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("eventInformation", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentEventInformation(&sv.EventInformation, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("eventType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.EventType = types.FleetEventType(xtv)
+ }
+
+ case strings.EqualFold("timestamp", 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.Timestamp = 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 awsEc2query_deserializeDocumentHistoryRecords(v *[]types.HistoryRecord, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.HistoryRecord
+ if *v == nil {
+ sv = make([]types.HistoryRecord, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.HistoryRecord
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentHistoryRecord(&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 awsEc2query_deserializeDocumentHistoryRecordsUnwrapped(v *[]types.HistoryRecord, decoder smithyxml.NodeDecoder) error {
+ var sv []types.HistoryRecord
+ if *v == nil {
+ sv = make([]types.HistoryRecord, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.HistoryRecord
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentHistoryRecord(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentHistoryRecordSet(v *[]types.HistoryRecordEntry, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.HistoryRecordEntry
+ if *v == nil {
+ sv = make([]types.HistoryRecordEntry, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.HistoryRecordEntry
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentHistoryRecordEntry(&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 awsEc2query_deserializeDocumentHistoryRecordSetUnwrapped(v *[]types.HistoryRecordEntry, decoder smithyxml.NodeDecoder) error {
+ var sv []types.HistoryRecordEntry
+ if *v == nil {
+ sv = make([]types.HistoryRecordEntry, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.HistoryRecordEntry
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentHistoryRecordEntry(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentHost(v **types.Host, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.Host
+ if *v == nil {
+ sv = &types.Host{}
+ } 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("allocationTime", 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.AllocationTime = ptr.Time(t)
+ }
+
+ case strings.EqualFold("allowsMultipleInstanceTypes", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AllowsMultipleInstanceTypes = types.AllowsMultipleInstanceTypes(xtv)
+ }
+
+ case strings.EqualFold("autoPlacement", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AutoPlacement = types.AutoPlacement(xtv)
+ }
+
+ case strings.EqualFold("availabilityZone", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AvailabilityZone = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("availabilityZoneId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AvailabilityZoneId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("availableCapacity", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentAvailableCapacity(&sv.AvailableCapacity, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("clientToken", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ClientToken = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("hostId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.HostId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("hostProperties", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentHostProperties(&sv.HostProperties, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("hostRecovery", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.HostRecovery = types.HostRecovery(xtv)
+ }
+
+ case strings.EqualFold("hostReservationId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.HostReservationId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("instances", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentHostInstanceList(&sv.Instances, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("memberOfServiceLinkedResourceGroup", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.MemberOfServiceLinkedResourceGroup = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("ownerId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.OwnerId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("releaseTime", 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.ReleaseTime = ptr.Time(t)
+ }
+
+ 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 = types.AllocationState(xtv)
+ }
+
+ case strings.EqualFold("tagSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_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 awsEc2query_deserializeDocumentHostInstance(v **types.HostInstance, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.HostInstance
+ if *v == nil {
+ sv = &types.HostInstance{}
+ } 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("instanceId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.InstanceId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("instanceType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.InstanceType = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("ownerId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.OwnerId = 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 awsEc2query_deserializeDocumentHostInstanceList(v *[]types.HostInstance, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.HostInstance
+ if *v == nil {
+ sv = make([]types.HostInstance, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.HostInstance
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentHostInstance(&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 awsEc2query_deserializeDocumentHostInstanceListUnwrapped(v *[]types.HostInstance, decoder smithyxml.NodeDecoder) error {
+ var sv []types.HostInstance
+ if *v == nil {
+ sv = make([]types.HostInstance, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.HostInstance
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentHostInstance(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentHostList(v *[]types.Host, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.Host
+ if *v == nil {
+ sv = make([]types.Host, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.Host
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentHost(&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 awsEc2query_deserializeDocumentHostListUnwrapped(v *[]types.Host, decoder smithyxml.NodeDecoder) error {
+ var sv []types.Host
+ if *v == nil {
+ sv = make([]types.Host, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.Host
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentHost(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentHostOffering(v **types.HostOffering, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.HostOffering
+ if *v == nil {
+ sv = &types.HostOffering{}
+ } 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("currencyCode", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.CurrencyCode = types.CurrencyCodeValues(xtv)
+ }
+
+ case strings.EqualFold("duration", 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.Duration = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("hourlyPrice", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.HourlyPrice = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("instanceFamily", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.InstanceFamily = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("offeringId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.OfferingId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("paymentOption", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.PaymentOption = types.PaymentOption(xtv)
+ }
+
+ case strings.EqualFold("upfrontPrice", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.UpfrontPrice = 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 awsEc2query_deserializeDocumentHostOfferingSet(v *[]types.HostOffering, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.HostOffering
+ if *v == nil {
+ sv = make([]types.HostOffering, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.HostOffering
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentHostOffering(&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 awsEc2query_deserializeDocumentHostOfferingSetUnwrapped(v *[]types.HostOffering, decoder smithyxml.NodeDecoder) error {
+ var sv []types.HostOffering
+ if *v == nil {
+ sv = make([]types.HostOffering, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.HostOffering
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentHostOffering(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentHostProperties(v **types.HostProperties, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.HostProperties
+ if *v == nil {
+ sv = &types.HostProperties{}
+ } 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("cores", 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.Cores = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("instanceFamily", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.InstanceFamily = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("instanceType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.InstanceType = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("sockets", 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.Sockets = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("totalVCpus", 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.TotalVCpus = 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 awsEc2query_deserializeDocumentHostReservation(v **types.HostReservation, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.HostReservation
+ if *v == nil {
+ sv = &types.HostReservation{}
+ } 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 = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("currencyCode", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.CurrencyCode = types.CurrencyCodeValues(xtv)
+ }
+
+ case strings.EqualFold("duration", 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.Duration = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("end", 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.End = ptr.Time(t)
+ }
+
+ case strings.EqualFold("hostIdSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentResponseHostIdSet(&sv.HostIdSet, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("hostReservationId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.HostReservationId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("hourlyPrice", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.HourlyPrice = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("instanceFamily", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.InstanceFamily = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("offeringId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.OfferingId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("paymentOption", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.PaymentOption = types.PaymentOption(xtv)
+ }
+
+ case strings.EqualFold("start", 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.Start = ptr.Time(t)
+ }
+
+ 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 = types.ReservationState(xtv)
+ }
+
+ case strings.EqualFold("tagSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("upfrontPrice", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.UpfrontPrice = 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 awsEc2query_deserializeDocumentHostReservationSet(v *[]types.HostReservation, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.HostReservation
+ if *v == nil {
+ sv = make([]types.HostReservation, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.HostReservation
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentHostReservation(&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 awsEc2query_deserializeDocumentHostReservationSetUnwrapped(v *[]types.HostReservation, decoder smithyxml.NodeDecoder) error {
+ var sv []types.HostReservation
+ if *v == nil {
+ sv = make([]types.HostReservation, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.HostReservation
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentHostReservation(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentIamInstanceProfile(v **types.IamInstanceProfile, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.IamInstanceProfile
+ if *v == nil {
+ sv = &types.IamInstanceProfile{}
+ } 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)
+ }
+
+ 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 awsEc2query_deserializeDocumentIamInstanceProfileAssociation(v **types.IamInstanceProfileAssociation, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.IamInstanceProfileAssociation
+ if *v == nil {
+ sv = &types.IamInstanceProfileAssociation{}
+ } 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("associationId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AssociationId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("iamInstanceProfile", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentIamInstanceProfile(&sv.IamInstanceProfile, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("instanceId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.InstanceId = 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 = types.IamInstanceProfileAssociationState(xtv)
+ }
+
+ case strings.EqualFold("timestamp", 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.Timestamp = 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 awsEc2query_deserializeDocumentIamInstanceProfileAssociationSet(v *[]types.IamInstanceProfileAssociation, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.IamInstanceProfileAssociation
+ if *v == nil {
+ sv = make([]types.IamInstanceProfileAssociation, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.IamInstanceProfileAssociation
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentIamInstanceProfileAssociation(&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 awsEc2query_deserializeDocumentIamInstanceProfileAssociationSetUnwrapped(v *[]types.IamInstanceProfileAssociation, decoder smithyxml.NodeDecoder) error {
+ var sv []types.IamInstanceProfileAssociation
+ if *v == nil {
+ sv = make([]types.IamInstanceProfileAssociation, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.IamInstanceProfileAssociation
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentIamInstanceProfileAssociation(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentIamInstanceProfileSpecification(v **types.IamInstanceProfileSpecification, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.IamInstanceProfileSpecification
+ if *v == nil {
+ sv = &types.IamInstanceProfileSpecification{}
+ } 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("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)
+ }
+
+ 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 awsEc2query_deserializeDocumentIcmpTypeCode(v **types.IcmpTypeCode, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.IcmpTypeCode
+ if *v == nil {
+ sv = &types.IcmpTypeCode{}
+ } 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("code", 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.Code = 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)
+ i64, err := strconv.ParseInt(xtv, 10, 64)
+ if err != nil {
+ return err
+ }
+ sv.Type = 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 awsEc2query_deserializeDocumentIdFormat(v **types.IdFormat, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.IdFormat
+ if *v == nil {
+ sv = &types.IdFormat{}
+ } 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("deadline", 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.Deadline = ptr.Time(t)
+ }
+
+ case strings.EqualFold("resource", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Resource = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("useLongIds", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.UseLongIds = ptr.Bool(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 awsEc2query_deserializeDocumentIdFormatList(v *[]types.IdFormat, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.IdFormat
+ if *v == nil {
+ sv = make([]types.IdFormat, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.IdFormat
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentIdFormat(&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 awsEc2query_deserializeDocumentIdFormatListUnwrapped(v *[]types.IdFormat, decoder smithyxml.NodeDecoder) error {
+ var sv []types.IdFormat
+ if *v == nil {
+ sv = make([]types.IdFormat, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.IdFormat
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentIdFormat(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentIKEVersionsList(v *[]types.IKEVersionsListValue, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.IKEVersionsListValue
+ if *v == nil {
+ sv = make([]types.IKEVersionsListValue, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.IKEVersionsListValue
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentIKEVersionsListValue(&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 awsEc2query_deserializeDocumentIKEVersionsListUnwrapped(v *[]types.IKEVersionsListValue, decoder smithyxml.NodeDecoder) error {
+ var sv []types.IKEVersionsListValue
+ if *v == nil {
+ sv = make([]types.IKEVersionsListValue, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.IKEVersionsListValue
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentIKEVersionsListValue(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentIKEVersionsListValue(v **types.IKEVersionsListValue, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.IKEVersionsListValue
+ if *v == nil {
+ sv = &types.IKEVersionsListValue{}
+ } 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 awsEc2query_deserializeDocumentImage(v **types.Image, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.Image
+ if *v == nil {
+ sv = &types.Image{}
+ } 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("architecture", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Architecture = types.ArchitectureValues(xtv)
+ }
+
+ case strings.EqualFold("blockDeviceMapping", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentBlockDeviceMappingList(&sv.BlockDeviceMappings, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("bootMode", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.BootMode = types.BootModeValues(xtv)
+ }
+
+ case strings.EqualFold("creationDate", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.CreationDate = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("deprecationTime", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.DeprecationTime = ptr.String(xtv)
+ }
+
+ 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("enaSupport", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.EnaSupport = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("hypervisor", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Hypervisor = types.HypervisorType(xtv)
+ }
+
+ case strings.EqualFold("imageId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ImageId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("imageLocation", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ImageLocation = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("imageOwnerAlias", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ImageOwnerAlias = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("imageType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ImageType = types.ImageTypeValues(xtv)
+ }
+
+ case strings.EqualFold("kernelId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.KernelId = 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("imageOwnerId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.OwnerId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("platform", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Platform = types.PlatformValues(xtv)
+ }
+
+ case strings.EqualFold("platformDetails", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.PlatformDetails = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("productCodes", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentProductCodeList(&sv.ProductCodes, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("isPublic", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.Public = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("ramdiskId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.RamdiskId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("rootDeviceName", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.RootDeviceName = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("rootDeviceType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.RootDeviceType = types.DeviceType(xtv)
+ }
+
+ case strings.EqualFold("sriovNetSupport", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.SriovNetSupport = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("imageState", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.State = types.ImageState(xtv)
+ }
+
+ case strings.EqualFold("stateReason", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentStateReason(&sv.StateReason, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("tagSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("usageOperation", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.UsageOperation = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("virtualizationType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.VirtualizationType = types.VirtualizationType(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 awsEc2query_deserializeDocumentImageList(v *[]types.Image, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.Image
+ if *v == nil {
+ sv = make([]types.Image, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.Image
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentImage(&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 awsEc2query_deserializeDocumentImageListUnwrapped(v *[]types.Image, decoder smithyxml.NodeDecoder) error {
+ var sv []types.Image
+ if *v == nil {
+ sv = make([]types.Image, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.Image
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentImage(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentImportImageLicenseConfigurationResponse(v **types.ImportImageLicenseConfigurationResponse, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.ImportImageLicenseConfigurationResponse
+ if *v == nil {
+ sv = &types.ImportImageLicenseConfigurationResponse{}
+ } 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("licenseConfigurationArn", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.LicenseConfigurationArn = 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 awsEc2query_deserializeDocumentImportImageLicenseSpecificationListResponse(v *[]types.ImportImageLicenseConfigurationResponse, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.ImportImageLicenseConfigurationResponse
+ if *v == nil {
+ sv = make([]types.ImportImageLicenseConfigurationResponse, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.ImportImageLicenseConfigurationResponse
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentImportImageLicenseConfigurationResponse(&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 awsEc2query_deserializeDocumentImportImageLicenseSpecificationListResponseUnwrapped(v *[]types.ImportImageLicenseConfigurationResponse, decoder smithyxml.NodeDecoder) error {
+ var sv []types.ImportImageLicenseConfigurationResponse
+ if *v == nil {
+ sv = make([]types.ImportImageLicenseConfigurationResponse, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.ImportImageLicenseConfigurationResponse
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentImportImageLicenseConfigurationResponse(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentImportImageTask(v **types.ImportImageTask, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.ImportImageTask
+ if *v == nil {
+ sv = &types.ImportImageTask{}
+ } 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("architecture", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Architecture = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("bootMode", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.BootMode = types.BootModeValues(xtv)
+ }
+
+ 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("encrypted", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.Encrypted = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("hypervisor", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Hypervisor = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("imageId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ImageId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("importTaskId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ImportTaskId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("kmsKeyId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.KmsKeyId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("licenseSpecifications", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentImportImageLicenseSpecificationListResponse(&sv.LicenseSpecifications, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("licenseType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.LicenseType = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("platform", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Platform = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("progress", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Progress = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("snapshotDetailSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentSnapshotDetailList(&sv.SnapshotDetails, nodeDecoder); err != nil {
+ return err
+ }
+
+ 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)
+ }
+
+ case strings.EqualFold("tagSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("usageOperation", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.UsageOperation = 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 awsEc2query_deserializeDocumentImportImageTaskList(v *[]types.ImportImageTask, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.ImportImageTask
+ if *v == nil {
+ sv = make([]types.ImportImageTask, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.ImportImageTask
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentImportImageTask(&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 awsEc2query_deserializeDocumentImportImageTaskListUnwrapped(v *[]types.ImportImageTask, decoder smithyxml.NodeDecoder) error {
+ var sv []types.ImportImageTask
+ if *v == nil {
+ sv = make([]types.ImportImageTask, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.ImportImageTask
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentImportImageTask(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentImportInstanceTaskDetails(v **types.ImportInstanceTaskDetails, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.ImportInstanceTaskDetails
+ if *v == nil {
+ sv = &types.ImportInstanceTaskDetails{}
+ } 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("instanceId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.InstanceId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("platform", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Platform = types.PlatformValues(xtv)
+ }
+
+ case strings.EqualFold("volumes", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentImportInstanceVolumeDetailSet(&sv.Volumes, 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 awsEc2query_deserializeDocumentImportInstanceVolumeDetailItem(v **types.ImportInstanceVolumeDetailItem, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.ImportInstanceVolumeDetailItem
+ if *v == nil {
+ sv = &types.ImportInstanceVolumeDetailItem{}
+ } 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("availabilityZone", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AvailabilityZone = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("bytesConverted", 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.BytesConverted = ptr.Int64(i64)
+ }
+
+ 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("image", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentDiskImageDescription(&sv.Image, nodeDecoder); err != nil {
+ return err
+ }
+
+ 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)
+ }
+
+ case strings.EqualFold("volume", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentDiskImageVolumeDescription(&sv.Volume, 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 awsEc2query_deserializeDocumentImportInstanceVolumeDetailSet(v *[]types.ImportInstanceVolumeDetailItem, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.ImportInstanceVolumeDetailItem
+ if *v == nil {
+ sv = make([]types.ImportInstanceVolumeDetailItem, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.ImportInstanceVolumeDetailItem
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentImportInstanceVolumeDetailItem(&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 awsEc2query_deserializeDocumentImportInstanceVolumeDetailSetUnwrapped(v *[]types.ImportInstanceVolumeDetailItem, decoder smithyxml.NodeDecoder) error {
+ var sv []types.ImportInstanceVolumeDetailItem
+ if *v == nil {
+ sv = make([]types.ImportInstanceVolumeDetailItem, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.ImportInstanceVolumeDetailItem
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentImportInstanceVolumeDetailItem(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentImportSnapshotTask(v **types.ImportSnapshotTask, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.ImportSnapshotTask
+ if *v == nil {
+ sv = &types.ImportSnapshotTask{}
+ } 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("importTaskId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ImportTaskId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("snapshotTaskDetail", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentSnapshotTaskDetail(&sv.SnapshotTaskDetail, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("tagSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_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 awsEc2query_deserializeDocumentImportSnapshotTaskList(v *[]types.ImportSnapshotTask, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.ImportSnapshotTask
+ if *v == nil {
+ sv = make([]types.ImportSnapshotTask, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.ImportSnapshotTask
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentImportSnapshotTask(&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 awsEc2query_deserializeDocumentImportSnapshotTaskListUnwrapped(v *[]types.ImportSnapshotTask, decoder smithyxml.NodeDecoder) error {
+ var sv []types.ImportSnapshotTask
+ if *v == nil {
+ sv = make([]types.ImportSnapshotTask, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.ImportSnapshotTask
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentImportSnapshotTask(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentImportVolumeTaskDetails(v **types.ImportVolumeTaskDetails, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.ImportVolumeTaskDetails
+ if *v == nil {
+ sv = &types.ImportVolumeTaskDetails{}
+ } 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("availabilityZone", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AvailabilityZone = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("bytesConverted", 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.BytesConverted = ptr.Int64(i64)
+ }
+
+ 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("image", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentDiskImageDescription(&sv.Image, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("volume", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentDiskImageVolumeDescription(&sv.Volume, 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 awsEc2query_deserializeDocumentInferenceAcceleratorInfo(v **types.InferenceAcceleratorInfo, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.InferenceAcceleratorInfo
+ if *v == nil {
+ sv = &types.InferenceAcceleratorInfo{}
+ } 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("accelerators", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentInferenceDeviceInfoList(&sv.Accelerators, 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 awsEc2query_deserializeDocumentInferenceDeviceInfo(v **types.InferenceDeviceInfo, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.InferenceDeviceInfo
+ if *v == nil {
+ sv = &types.InferenceDeviceInfo{}
+ } 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 = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("manufacturer", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Manufacturer = 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)
+ }
+
+ 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 awsEc2query_deserializeDocumentInferenceDeviceInfoList(v *[]types.InferenceDeviceInfo, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.InferenceDeviceInfo
+ if *v == nil {
+ sv = make([]types.InferenceDeviceInfo, 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.InferenceDeviceInfo
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentInferenceDeviceInfo(&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 awsEc2query_deserializeDocumentInferenceDeviceInfoListUnwrapped(v *[]types.InferenceDeviceInfo, decoder smithyxml.NodeDecoder) error {
+ var sv []types.InferenceDeviceInfo
+ if *v == nil {
+ sv = make([]types.InferenceDeviceInfo, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.InferenceDeviceInfo
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentInferenceDeviceInfo(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentInsideCidrBlocksStringList(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("item", 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 awsEc2query_deserializeDocumentInsideCidrBlocksStringListUnwrapped(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 awsEc2query_deserializeDocumentInstance(v **types.Instance, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.Instance
+ if *v == nil {
+ sv = &types.Instance{}
+ } 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("amiLaunchIndex", 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.AmiLaunchIndex = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("architecture", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Architecture = types.ArchitectureValues(xtv)
+ }
+
+ case strings.EqualFold("blockDeviceMapping", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentInstanceBlockDeviceMappingList(&sv.BlockDeviceMappings, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("bootMode", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.BootMode = types.BootModeValues(xtv)
+ }
+
+ case strings.EqualFold("capacityReservationId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.CapacityReservationId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("capacityReservationSpecification", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentCapacityReservationSpecificationResponse(&sv.CapacityReservationSpecification, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("clientToken", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ClientToken = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("cpuOptions", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentCpuOptions(&sv.CpuOptions, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("ebsOptimized", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.EbsOptimized = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("elasticGpuAssociationSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentElasticGpuAssociationList(&sv.ElasticGpuAssociations, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("elasticInferenceAcceleratorAssociationSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentElasticInferenceAcceleratorAssociationList(&sv.ElasticInferenceAcceleratorAssociations, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("enaSupport", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.EnaSupport = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("enclaveOptions", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentEnclaveOptions(&sv.EnclaveOptions, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("hibernationOptions", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentHibernationOptions(&sv.HibernationOptions, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("hypervisor", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Hypervisor = types.HypervisorType(xtv)
+ }
+
+ case strings.EqualFold("iamInstanceProfile", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentIamInstanceProfile(&sv.IamInstanceProfile, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("imageId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ImageId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("instanceId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.InstanceId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("instanceLifecycle", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.InstanceLifecycle = types.InstanceLifecycleType(xtv)
+ }
+
+ case strings.EqualFold("instanceType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.InstanceType = types.InstanceType(xtv)
+ }
+
+ case strings.EqualFold("kernelId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.KernelId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("keyName", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.KeyName = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("launchTime", 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.LaunchTime = ptr.Time(t)
+ }
+
+ case strings.EqualFold("licenseSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentLicenseList(&sv.Licenses, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("metadataOptions", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentInstanceMetadataOptionsResponse(&sv.MetadataOptions, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("monitoring", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentMonitoring(&sv.Monitoring, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("networkInterfaceSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentInstanceNetworkInterfaceList(&sv.NetworkInterfaces, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("outpostArn", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.OutpostArn = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("placement", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentPlacement(&sv.Placement, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("platform", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Platform = types.PlatformValues(xtv)
+ }
+
+ case strings.EqualFold("platformDetails", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.PlatformDetails = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("privateDnsName", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.PrivateDnsName = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("privateIpAddress", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.PrivateIpAddress = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("productCodes", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentProductCodeList(&sv.ProductCodes, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("dnsName", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.PublicDnsName = ptr.String(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.PublicIpAddress = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("ramdiskId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.RamdiskId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("rootDeviceName", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.RootDeviceName = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("rootDeviceType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.RootDeviceType = types.DeviceType(xtv)
+ }
+
+ case strings.EqualFold("groupSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentGroupIdentifierList(&sv.SecurityGroups, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("sourceDestCheck", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.SourceDestCheck = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("spotInstanceRequestId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.SpotInstanceRequestId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("sriovNetSupport", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.SriovNetSupport = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("instanceState", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentInstanceState(&sv.State, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("stateReason", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentStateReason(&sv.StateReason, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("reason", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.StateTransitionReason = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("subnetId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.SubnetId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("tagSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("usageOperation", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.UsageOperation = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("usageOperationUpdateTime", 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.UsageOperationUpdateTime = ptr.Time(t)
+ }
+
+ case strings.EqualFold("virtualizationType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.VirtualizationType = types.VirtualizationType(xtv)
+ }
+
+ 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)
+ }
+
+ 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 awsEc2query_deserializeDocumentInstanceBlockDeviceMapping(v **types.InstanceBlockDeviceMapping, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.InstanceBlockDeviceMapping
+ if *v == nil {
+ sv = &types.InstanceBlockDeviceMapping{}
+ } 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("deviceName", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.DeviceName = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("ebs", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentEbsInstanceBlockDevice(&sv.Ebs, 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 awsEc2query_deserializeDocumentInstanceBlockDeviceMappingList(v *[]types.InstanceBlockDeviceMapping, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.InstanceBlockDeviceMapping
+ if *v == nil {
+ sv = make([]types.InstanceBlockDeviceMapping, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.InstanceBlockDeviceMapping
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentInstanceBlockDeviceMapping(&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 awsEc2query_deserializeDocumentInstanceBlockDeviceMappingListUnwrapped(v *[]types.InstanceBlockDeviceMapping, decoder smithyxml.NodeDecoder) error {
+ var sv []types.InstanceBlockDeviceMapping
+ if *v == nil {
+ sv = make([]types.InstanceBlockDeviceMapping, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.InstanceBlockDeviceMapping
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentInstanceBlockDeviceMapping(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentInstanceCapacity(v **types.InstanceCapacity, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.InstanceCapacity
+ if *v == nil {
+ sv = &types.InstanceCapacity{}
+ } 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("availableCapacity", 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.AvailableCapacity = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("instanceType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.InstanceType = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("totalCapacity", 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.TotalCapacity = 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 awsEc2query_deserializeDocumentInstanceCount(v **types.InstanceCount, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.InstanceCount
+ if *v == nil {
+ sv = &types.InstanceCount{}
+ } 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("instanceCount", 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.InstanceCount = ptr.Int32(int32(i64))
+ }
+
+ 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 = types.ListingState(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 awsEc2query_deserializeDocumentInstanceCountList(v *[]types.InstanceCount, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.InstanceCount
+ if *v == nil {
+ sv = make([]types.InstanceCount, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.InstanceCount
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentInstanceCount(&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 awsEc2query_deserializeDocumentInstanceCountListUnwrapped(v *[]types.InstanceCount, decoder smithyxml.NodeDecoder) error {
+ var sv []types.InstanceCount
+ if *v == nil {
+ sv = make([]types.InstanceCount, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.InstanceCount
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentInstanceCount(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentInstanceCreditSpecification(v **types.InstanceCreditSpecification, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.InstanceCreditSpecification
+ if *v == nil {
+ sv = &types.InstanceCreditSpecification{}
+ } 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("cpuCredits", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.CpuCredits = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("instanceId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.InstanceId = 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 awsEc2query_deserializeDocumentInstanceCreditSpecificationList(v *[]types.InstanceCreditSpecification, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.InstanceCreditSpecification
+ if *v == nil {
+ sv = make([]types.InstanceCreditSpecification, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.InstanceCreditSpecification
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentInstanceCreditSpecification(&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 awsEc2query_deserializeDocumentInstanceCreditSpecificationListUnwrapped(v *[]types.InstanceCreditSpecification, decoder smithyxml.NodeDecoder) error {
+ var sv []types.InstanceCreditSpecification
+ if *v == nil {
+ sv = make([]types.InstanceCreditSpecification, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.InstanceCreditSpecification
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentInstanceCreditSpecification(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentInstanceEventWindow(v **types.InstanceEventWindow, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.InstanceEventWindow
+ if *v == nil {
+ sv = &types.InstanceEventWindow{}
+ } 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("associationTarget", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentInstanceEventWindowAssociationTarget(&sv.AssociationTarget, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("cronExpression", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.CronExpression = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("instanceEventWindowId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.InstanceEventWindowId = 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 = types.InstanceEventWindowState(xtv)
+ }
+
+ case strings.EqualFold("tagSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("timeRangeSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentInstanceEventWindowTimeRangeList(&sv.TimeRanges, 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 awsEc2query_deserializeDocumentInstanceEventWindowAssociationTarget(v **types.InstanceEventWindowAssociationTarget, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.InstanceEventWindowAssociationTarget
+ if *v == nil {
+ sv = &types.InstanceEventWindowAssociationTarget{}
+ } 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("dedicatedHostIdSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentDedicatedHostIdList(&sv.DedicatedHostIds, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("instanceIdSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentInstanceIdList(&sv.InstanceIds, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("tagSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_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 awsEc2query_deserializeDocumentInstanceEventWindowSet(v *[]types.InstanceEventWindow, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.InstanceEventWindow
+ if *v == nil {
+ sv = make([]types.InstanceEventWindow, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.InstanceEventWindow
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentInstanceEventWindow(&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 awsEc2query_deserializeDocumentInstanceEventWindowSetUnwrapped(v *[]types.InstanceEventWindow, decoder smithyxml.NodeDecoder) error {
+ var sv []types.InstanceEventWindow
+ if *v == nil {
+ sv = make([]types.InstanceEventWindow, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.InstanceEventWindow
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentInstanceEventWindow(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentInstanceEventWindowStateChange(v **types.InstanceEventWindowStateChange, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.InstanceEventWindowStateChange
+ if *v == nil {
+ sv = &types.InstanceEventWindowStateChange{}
+ } 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("instanceEventWindowId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.InstanceEventWindowId = 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 = types.InstanceEventWindowState(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 awsEc2query_deserializeDocumentInstanceEventWindowTimeRange(v **types.InstanceEventWindowTimeRange, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.InstanceEventWindowTimeRange
+ if *v == nil {
+ sv = &types.InstanceEventWindowTimeRange{}
+ } 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("endHour", 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.EndHour = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("endWeekDay", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.EndWeekDay = types.WeekDay(xtv)
+ }
+
+ case strings.EqualFold("startHour", 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.StartHour = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("startWeekDay", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.StartWeekDay = types.WeekDay(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 awsEc2query_deserializeDocumentInstanceEventWindowTimeRangeList(v *[]types.InstanceEventWindowTimeRange, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.InstanceEventWindowTimeRange
+ if *v == nil {
+ sv = make([]types.InstanceEventWindowTimeRange, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.InstanceEventWindowTimeRange
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentInstanceEventWindowTimeRange(&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 awsEc2query_deserializeDocumentInstanceEventWindowTimeRangeListUnwrapped(v *[]types.InstanceEventWindowTimeRange, decoder smithyxml.NodeDecoder) error {
+ var sv []types.InstanceEventWindowTimeRange
+ if *v == nil {
+ sv = make([]types.InstanceEventWindowTimeRange, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.InstanceEventWindowTimeRange
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentInstanceEventWindowTimeRange(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentInstanceExportDetails(v **types.InstanceExportDetails, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.InstanceExportDetails
+ if *v == nil {
+ sv = &types.InstanceExportDetails{}
+ } 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("instanceId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.InstanceId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("targetEnvironment", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.TargetEnvironment = types.ExportEnvironment(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 awsEc2query_deserializeDocumentInstanceFamilyCreditSpecification(v **types.InstanceFamilyCreditSpecification, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.InstanceFamilyCreditSpecification
+ if *v == nil {
+ sv = &types.InstanceFamilyCreditSpecification{}
+ } 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("cpuCredits", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.CpuCredits = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("instanceFamily", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.InstanceFamily = types.UnlimitedSupportedInstanceFamily(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 awsEc2query_deserializeDocumentInstanceIdList(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("item", 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 awsEc2query_deserializeDocumentInstanceIdListUnwrapped(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 awsEc2query_deserializeDocumentInstanceIdSet(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("item", 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 awsEc2query_deserializeDocumentInstanceIdSetUnwrapped(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 awsEc2query_deserializeDocumentInstanceIdsSet(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("item", 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 awsEc2query_deserializeDocumentInstanceIdsSetUnwrapped(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 awsEc2query_deserializeDocumentInstanceIpv4Prefix(v **types.InstanceIpv4Prefix, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.InstanceIpv4Prefix
+ if *v == nil {
+ sv = &types.InstanceIpv4Prefix{}
+ } 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("ipv4Prefix", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Ipv4Prefix = 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 awsEc2query_deserializeDocumentInstanceIpv4PrefixList(v *[]types.InstanceIpv4Prefix, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.InstanceIpv4Prefix
+ if *v == nil {
+ sv = make([]types.InstanceIpv4Prefix, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.InstanceIpv4Prefix
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentInstanceIpv4Prefix(&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 awsEc2query_deserializeDocumentInstanceIpv4PrefixListUnwrapped(v *[]types.InstanceIpv4Prefix, decoder smithyxml.NodeDecoder) error {
+ var sv []types.InstanceIpv4Prefix
+ if *v == nil {
+ sv = make([]types.InstanceIpv4Prefix, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.InstanceIpv4Prefix
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentInstanceIpv4Prefix(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentInstanceIpv6Address(v **types.InstanceIpv6Address, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.InstanceIpv6Address
+ if *v == nil {
+ sv = &types.InstanceIpv6Address{}
+ } 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("ipv6Address", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Ipv6Address = 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 awsEc2query_deserializeDocumentInstanceIpv6AddressList(v *[]types.InstanceIpv6Address, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.InstanceIpv6Address
+ if *v == nil {
+ sv = make([]types.InstanceIpv6Address, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.InstanceIpv6Address
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentInstanceIpv6Address(&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 awsEc2query_deserializeDocumentInstanceIpv6AddressListUnwrapped(v *[]types.InstanceIpv6Address, decoder smithyxml.NodeDecoder) error {
+ var sv []types.InstanceIpv6Address
+ if *v == nil {
+ sv = make([]types.InstanceIpv6Address, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.InstanceIpv6Address
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentInstanceIpv6Address(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentInstanceIpv6Prefix(v **types.InstanceIpv6Prefix, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.InstanceIpv6Prefix
+ if *v == nil {
+ sv = &types.InstanceIpv6Prefix{}
+ } 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("ipv6Prefix", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Ipv6Prefix = 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 awsEc2query_deserializeDocumentInstanceIpv6PrefixList(v *[]types.InstanceIpv6Prefix, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.InstanceIpv6Prefix
+ if *v == nil {
+ sv = make([]types.InstanceIpv6Prefix, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.InstanceIpv6Prefix
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentInstanceIpv6Prefix(&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 awsEc2query_deserializeDocumentInstanceIpv6PrefixListUnwrapped(v *[]types.InstanceIpv6Prefix, decoder smithyxml.NodeDecoder) error {
+ var sv []types.InstanceIpv6Prefix
+ if *v == nil {
+ sv = make([]types.InstanceIpv6Prefix, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.InstanceIpv6Prefix
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentInstanceIpv6Prefix(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentInstanceList(v *[]types.Instance, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.Instance
+ if *v == nil {
+ sv = make([]types.Instance, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.Instance
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentInstance(&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 awsEc2query_deserializeDocumentInstanceListUnwrapped(v *[]types.Instance, decoder smithyxml.NodeDecoder) error {
+ var sv []types.Instance
+ if *v == nil {
+ sv = make([]types.Instance, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.Instance
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentInstance(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentInstanceMetadataOptionsResponse(v **types.InstanceMetadataOptionsResponse, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.InstanceMetadataOptionsResponse
+ if *v == nil {
+ sv = &types.InstanceMetadataOptionsResponse{}
+ } 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("httpEndpoint", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.HttpEndpoint = types.InstanceMetadataEndpointState(xtv)
+ }
+
+ case strings.EqualFold("httpProtocolIpv6", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.HttpProtocolIpv6 = types.InstanceMetadataProtocolState(xtv)
+ }
+
+ case strings.EqualFold("httpPutResponseHopLimit", 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.HttpPutResponseHopLimit = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("httpTokens", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.HttpTokens = types.HttpTokensState(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 = types.InstanceMetadataOptionsState(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 awsEc2query_deserializeDocumentInstanceMonitoring(v **types.InstanceMonitoring, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.InstanceMonitoring
+ if *v == nil {
+ sv = &types.InstanceMonitoring{}
+ } 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("instanceId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.InstanceId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("monitoring", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentMonitoring(&sv.Monitoring, 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 awsEc2query_deserializeDocumentInstanceMonitoringList(v *[]types.InstanceMonitoring, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.InstanceMonitoring
+ if *v == nil {
+ sv = make([]types.InstanceMonitoring, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.InstanceMonitoring
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentInstanceMonitoring(&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 awsEc2query_deserializeDocumentInstanceMonitoringListUnwrapped(v *[]types.InstanceMonitoring, decoder smithyxml.NodeDecoder) error {
+ var sv []types.InstanceMonitoring
+ if *v == nil {
+ sv = make([]types.InstanceMonitoring, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.InstanceMonitoring
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentInstanceMonitoring(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentInstanceNetworkInterface(v **types.InstanceNetworkInterface, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.InstanceNetworkInterface
+ if *v == nil {
+ sv = &types.InstanceNetworkInterface{}
+ } 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("association", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentInstanceNetworkInterfaceAssociation(&sv.Association, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("attachment", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentInstanceNetworkInterfaceAttachment(&sv.Attachment, nodeDecoder); err != nil {
+ return err
+ }
+
+ 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("groupSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentGroupIdentifierList(&sv.Groups, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("interfaceType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.InterfaceType = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("ipv4PrefixSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentInstanceIpv4PrefixList(&sv.Ipv4Prefixes, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("ipv6AddressesSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentInstanceIpv6AddressList(&sv.Ipv6Addresses, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("ipv6PrefixSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentInstanceIpv6PrefixList(&sv.Ipv6Prefixes, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("macAddress", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.MacAddress = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("networkInterfaceId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.NetworkInterfaceId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("ownerId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.OwnerId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("privateDnsName", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.PrivateDnsName = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("privateIpAddress", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.PrivateIpAddress = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("privateIpAddressesSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentInstancePrivateIpAddressList(&sv.PrivateIpAddresses, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("sourceDestCheck", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.SourceDestCheck = ptr.Bool(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.NetworkInterfaceStatus(xtv)
+ }
+
+ case strings.EqualFold("subnetId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.SubnetId = ptr.String(xtv)
+ }
+
+ 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)
+ }
+
+ 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 awsEc2query_deserializeDocumentInstanceNetworkInterfaceAssociation(v **types.InstanceNetworkInterfaceAssociation, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.InstanceNetworkInterfaceAssociation
+ if *v == nil {
+ sv = &types.InstanceNetworkInterfaceAssociation{}
+ } 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("carrierIp", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.CarrierIp = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("ipOwnerId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.IpOwnerId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("publicDnsName", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.PublicDnsName = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("publicIp", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.PublicIp = 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 awsEc2query_deserializeDocumentInstanceNetworkInterfaceAttachment(v **types.InstanceNetworkInterfaceAttachment, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.InstanceNetworkInterfaceAttachment
+ if *v == nil {
+ sv = &types.InstanceNetworkInterfaceAttachment{}
+ } 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("attachmentId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AttachmentId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("attachTime", 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.AttachTime = ptr.Time(t)
+ }
+
+ case strings.EqualFold("deleteOnTermination", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.DeleteOnTermination = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("deviceIndex", 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.DeviceIndex = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("networkCardIndex", 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.NetworkCardIndex = ptr.Int32(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 = types.AttachmentStatus(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 awsEc2query_deserializeDocumentInstanceNetworkInterfaceList(v *[]types.InstanceNetworkInterface, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.InstanceNetworkInterface
+ if *v == nil {
+ sv = make([]types.InstanceNetworkInterface, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.InstanceNetworkInterface
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentInstanceNetworkInterface(&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 awsEc2query_deserializeDocumentInstanceNetworkInterfaceListUnwrapped(v *[]types.InstanceNetworkInterface, decoder smithyxml.NodeDecoder) error {
+ var sv []types.InstanceNetworkInterface
+ if *v == nil {
+ sv = make([]types.InstanceNetworkInterface, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.InstanceNetworkInterface
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentInstanceNetworkInterface(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentInstanceNetworkInterfaceSpecification(v **types.InstanceNetworkInterfaceSpecification, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.InstanceNetworkInterfaceSpecification
+ if *v == nil {
+ sv = &types.InstanceNetworkInterfaceSpecification{}
+ } 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("AssociateCarrierIpAddress", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.AssociateCarrierIpAddress = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("associatePublicIpAddress", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.AssociatePublicIpAddress = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("deleteOnTermination", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.DeleteOnTermination = ptr.Bool(xtv)
+ }
+
+ 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("deviceIndex", 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.DeviceIndex = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("SecurityGroupId", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentSecurityGroupIdStringList(&sv.Groups, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("InterfaceType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.InterfaceType = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("Ipv4PrefixCount", 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.Ipv4PrefixCount = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("Ipv4Prefix", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentIpv4PrefixList(&sv.Ipv4Prefixes, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("ipv6AddressCount", 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.Ipv6AddressCount = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("ipv6AddressesSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentInstanceIpv6AddressList(&sv.Ipv6Addresses, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("Ipv6PrefixCount", 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.Ipv6PrefixCount = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("Ipv6Prefix", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentIpv6PrefixList(&sv.Ipv6Prefixes, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("NetworkCardIndex", 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.NetworkCardIndex = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("networkInterfaceId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.NetworkInterfaceId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("privateIpAddress", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.PrivateIpAddress = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("privateIpAddressesSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentPrivateIpAddressSpecificationList(&sv.PrivateIpAddresses, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("secondaryPrivateIpAddressCount", 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.SecondaryPrivateIpAddressCount = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("subnetId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.SubnetId = 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 awsEc2query_deserializeDocumentInstanceNetworkInterfaceSpecificationList(v *[]types.InstanceNetworkInterfaceSpecification, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.InstanceNetworkInterfaceSpecification
+ if *v == nil {
+ sv = make([]types.InstanceNetworkInterfaceSpecification, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.InstanceNetworkInterfaceSpecification
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentInstanceNetworkInterfaceSpecification(&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 awsEc2query_deserializeDocumentInstanceNetworkInterfaceSpecificationListUnwrapped(v *[]types.InstanceNetworkInterfaceSpecification, decoder smithyxml.NodeDecoder) error {
+ var sv []types.InstanceNetworkInterfaceSpecification
+ if *v == nil {
+ sv = make([]types.InstanceNetworkInterfaceSpecification, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.InstanceNetworkInterfaceSpecification
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentInstanceNetworkInterfaceSpecification(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentInstancePrivateIpAddress(v **types.InstancePrivateIpAddress, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.InstancePrivateIpAddress
+ if *v == nil {
+ sv = &types.InstancePrivateIpAddress{}
+ } 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("association", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentInstanceNetworkInterfaceAssociation(&sv.Association, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("primary", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.Primary = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("privateDnsName", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.PrivateDnsName = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("privateIpAddress", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.PrivateIpAddress = 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 awsEc2query_deserializeDocumentInstancePrivateIpAddressList(v *[]types.InstancePrivateIpAddress, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.InstancePrivateIpAddress
+ if *v == nil {
+ sv = make([]types.InstancePrivateIpAddress, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.InstancePrivateIpAddress
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentInstancePrivateIpAddress(&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 awsEc2query_deserializeDocumentInstancePrivateIpAddressListUnwrapped(v *[]types.InstancePrivateIpAddress, decoder smithyxml.NodeDecoder) error {
+ var sv []types.InstancePrivateIpAddress
+ if *v == nil {
+ sv = make([]types.InstancePrivateIpAddress, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.InstancePrivateIpAddress
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentInstancePrivateIpAddress(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentInstanceState(v **types.InstanceState, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.InstanceState
+ if *v == nil {
+ sv = &types.InstanceState{}
+ } 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("code", 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.Code = 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 = types.InstanceStateName(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 awsEc2query_deserializeDocumentInstanceStateChange(v **types.InstanceStateChange, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.InstanceStateChange
+ if *v == nil {
+ sv = &types.InstanceStateChange{}
+ } 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("currentState", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentInstanceState(&sv.CurrentState, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("instanceId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.InstanceId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("previousState", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentInstanceState(&sv.PreviousState, 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 awsEc2query_deserializeDocumentInstanceStateChangeList(v *[]types.InstanceStateChange, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.InstanceStateChange
+ if *v == nil {
+ sv = make([]types.InstanceStateChange, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.InstanceStateChange
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentInstanceStateChange(&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 awsEc2query_deserializeDocumentInstanceStateChangeListUnwrapped(v *[]types.InstanceStateChange, decoder smithyxml.NodeDecoder) error {
+ var sv []types.InstanceStateChange
+ if *v == nil {
+ sv = make([]types.InstanceStateChange, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.InstanceStateChange
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentInstanceStateChange(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentInstanceStatus(v **types.InstanceStatus, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.InstanceStatus
+ if *v == nil {
+ sv = &types.InstanceStatus{}
+ } 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("availabilityZone", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AvailabilityZone = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("eventsSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentInstanceStatusEventList(&sv.Events, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("instanceId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.InstanceId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("instanceState", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentInstanceState(&sv.InstanceState, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("instanceStatus", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentInstanceStatusSummary(&sv.InstanceStatus, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("outpostArn", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.OutpostArn = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("systemStatus", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentInstanceStatusSummary(&sv.SystemStatus, 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 awsEc2query_deserializeDocumentInstanceStatusDetails(v **types.InstanceStatusDetails, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.InstanceStatusDetails
+ if *v == nil {
+ sv = &types.InstanceStatusDetails{}
+ } 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("impairedSince", 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.ImpairedSince = 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 = types.StatusName(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.StatusType(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 awsEc2query_deserializeDocumentInstanceStatusDetailsList(v *[]types.InstanceStatusDetails, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.InstanceStatusDetails
+ if *v == nil {
+ sv = make([]types.InstanceStatusDetails, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.InstanceStatusDetails
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentInstanceStatusDetails(&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 awsEc2query_deserializeDocumentInstanceStatusDetailsListUnwrapped(v *[]types.InstanceStatusDetails, decoder smithyxml.NodeDecoder) error {
+ var sv []types.InstanceStatusDetails
+ if *v == nil {
+ sv = make([]types.InstanceStatusDetails, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.InstanceStatusDetails
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentInstanceStatusDetails(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentInstanceStatusEvent(v **types.InstanceStatusEvent, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.InstanceStatusEvent
+ if *v == nil {
+ sv = &types.InstanceStatusEvent{}
+ } 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("code", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Code = types.EventCode(xtv)
+ }
+
+ 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("instanceEventId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.InstanceEventId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("notAfter", 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.NotAfter = ptr.Time(t)
+ }
+
+ case strings.EqualFold("notBefore", 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.NotBefore = ptr.Time(t)
+ }
+
+ case strings.EqualFold("notBeforeDeadline", 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.NotBeforeDeadline = 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 awsEc2query_deserializeDocumentInstanceStatusEventList(v *[]types.InstanceStatusEvent, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.InstanceStatusEvent
+ if *v == nil {
+ sv = make([]types.InstanceStatusEvent, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.InstanceStatusEvent
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentInstanceStatusEvent(&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 awsEc2query_deserializeDocumentInstanceStatusEventListUnwrapped(v *[]types.InstanceStatusEvent, decoder smithyxml.NodeDecoder) error {
+ var sv []types.InstanceStatusEvent
+ if *v == nil {
+ sv = make([]types.InstanceStatusEvent, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.InstanceStatusEvent
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentInstanceStatusEvent(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentInstanceStatusList(v *[]types.InstanceStatus, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.InstanceStatus
+ if *v == nil {
+ sv = make([]types.InstanceStatus, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.InstanceStatus
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentInstanceStatus(&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 awsEc2query_deserializeDocumentInstanceStatusListUnwrapped(v *[]types.InstanceStatus, decoder smithyxml.NodeDecoder) error {
+ var sv []types.InstanceStatus
+ if *v == nil {
+ sv = make([]types.InstanceStatus, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.InstanceStatus
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentInstanceStatus(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentInstanceStatusSummary(v **types.InstanceStatusSummary, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.InstanceStatusSummary
+ if *v == nil {
+ sv = &types.InstanceStatusSummary{}
+ } 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("details", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentInstanceStatusDetailsList(&sv.Details, nodeDecoder); err != nil {
+ return err
+ }
+
+ 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.SummaryStatus(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 awsEc2query_deserializeDocumentInstanceStorageInfo(v **types.InstanceStorageInfo, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.InstanceStorageInfo
+ if *v == nil {
+ sv = &types.InstanceStorageInfo{}
+ } 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("disks", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentDiskInfoList(&sv.Disks, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("nvmeSupport", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.NvmeSupport = types.EphemeralNvmeSupport(xtv)
+ }
+
+ case strings.EqualFold("totalSizeInGB", 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.TotalSizeInGB = 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 awsEc2query_deserializeDocumentInstanceTagKeySet(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("item", 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 awsEc2query_deserializeDocumentInstanceTagKeySetUnwrapped(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 awsEc2query_deserializeDocumentInstanceTagNotificationAttribute(v **types.InstanceTagNotificationAttribute, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.InstanceTagNotificationAttribute
+ if *v == nil {
+ sv = &types.InstanceTagNotificationAttribute{}
+ } 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("includeAllTagsOfInstance", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.IncludeAllTagsOfInstance = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("instanceTagKeySet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentInstanceTagKeySet(&sv.InstanceTagKeys, 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 awsEc2query_deserializeDocumentInstanceTypeInfo(v **types.InstanceTypeInfo, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.InstanceTypeInfo
+ if *v == nil {
+ sv = &types.InstanceTypeInfo{}
+ } 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("autoRecoverySupported", 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 AutoRecoveryFlag to be of type *bool, got %T instead", val)
+ }
+ sv.AutoRecoverySupported = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("bareMetal", 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 BareMetalFlag to be of type *bool, got %T instead", val)
+ }
+ sv.BareMetal = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("burstablePerformanceSupported", 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 BurstablePerformanceFlag to be of type *bool, got %T instead", val)
+ }
+ sv.BurstablePerformanceSupported = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("currentGeneration", 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 CurrentGenerationFlag to be of type *bool, got %T instead", val)
+ }
+ sv.CurrentGeneration = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("dedicatedHostsSupported", 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 DedicatedHostFlag to be of type *bool, got %T instead", val)
+ }
+ sv.DedicatedHostsSupported = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("ebsInfo", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentEbsInfo(&sv.EbsInfo, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("fpgaInfo", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentFpgaInfo(&sv.FpgaInfo, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("freeTierEligible", 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 FreeTierEligibleFlag to be of type *bool, got %T instead", val)
+ }
+ sv.FreeTierEligible = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("gpuInfo", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentGpuInfo(&sv.GpuInfo, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("hibernationSupported", 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 HibernationFlag to be of type *bool, got %T instead", val)
+ }
+ sv.HibernationSupported = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("hypervisor", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Hypervisor = types.InstanceTypeHypervisor(xtv)
+ }
+
+ case strings.EqualFold("inferenceAcceleratorInfo", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentInferenceAcceleratorInfo(&sv.InferenceAcceleratorInfo, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("instanceStorageInfo", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentInstanceStorageInfo(&sv.InstanceStorageInfo, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("instanceStorageSupported", 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 InstanceStorageFlag to be of type *bool, got %T instead", val)
+ }
+ sv.InstanceStorageSupported = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("instanceType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.InstanceType = types.InstanceType(xtv)
+ }
+
+ case strings.EqualFold("memoryInfo", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentMemoryInfo(&sv.MemoryInfo, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("networkInfo", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentNetworkInfo(&sv.NetworkInfo, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("placementGroupInfo", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentPlacementGroupInfo(&sv.PlacementGroupInfo, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("processorInfo", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentProcessorInfo(&sv.ProcessorInfo, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("supportedBootModes", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentBootModeTypeList(&sv.SupportedBootModes, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("supportedRootDeviceTypes", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentRootDeviceTypeList(&sv.SupportedRootDeviceTypes, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("supportedUsageClasses", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentUsageClassTypeList(&sv.SupportedUsageClasses, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("supportedVirtualizationTypes", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentVirtualizationTypeList(&sv.SupportedVirtualizationTypes, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("vCpuInfo", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentVCpuInfo(&sv.VCpuInfo, 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 awsEc2query_deserializeDocumentInstanceTypeInfoList(v *[]types.InstanceTypeInfo, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.InstanceTypeInfo
+ if *v == nil {
+ sv = make([]types.InstanceTypeInfo, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.InstanceTypeInfo
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentInstanceTypeInfo(&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 awsEc2query_deserializeDocumentInstanceTypeInfoListUnwrapped(v *[]types.InstanceTypeInfo, decoder smithyxml.NodeDecoder) error {
+ var sv []types.InstanceTypeInfo
+ if *v == nil {
+ sv = make([]types.InstanceTypeInfo, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.InstanceTypeInfo
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentInstanceTypeInfo(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentInstanceTypeOffering(v **types.InstanceTypeOffering, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.InstanceTypeOffering
+ if *v == nil {
+ sv = &types.InstanceTypeOffering{}
+ } 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("instanceType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.InstanceType = types.InstanceType(xtv)
+ }
+
+ case strings.EqualFold("location", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Location = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("locationType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.LocationType = types.LocationType(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 awsEc2query_deserializeDocumentInstanceTypeOfferingsList(v *[]types.InstanceTypeOffering, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.InstanceTypeOffering
+ if *v == nil {
+ sv = make([]types.InstanceTypeOffering, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.InstanceTypeOffering
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentInstanceTypeOffering(&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 awsEc2query_deserializeDocumentInstanceTypeOfferingsListUnwrapped(v *[]types.InstanceTypeOffering, decoder smithyxml.NodeDecoder) error {
+ var sv []types.InstanceTypeOffering
+ if *v == nil {
+ sv = make([]types.InstanceTypeOffering, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.InstanceTypeOffering
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentInstanceTypeOffering(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentInstanceUsage(v **types.InstanceUsage, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.InstanceUsage
+ if *v == nil {
+ sv = &types.InstanceUsage{}
+ } 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("accountId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AccountId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("usedInstanceCount", 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.UsedInstanceCount = 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 awsEc2query_deserializeDocumentInstanceUsageSet(v *[]types.InstanceUsage, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.InstanceUsage
+ if *v == nil {
+ sv = make([]types.InstanceUsage, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.InstanceUsage
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentInstanceUsage(&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 awsEc2query_deserializeDocumentInstanceUsageSetUnwrapped(v *[]types.InstanceUsage, decoder smithyxml.NodeDecoder) error {
+ var sv []types.InstanceUsage
+ if *v == nil {
+ sv = make([]types.InstanceUsage, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.InstanceUsage
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentInstanceUsage(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentInternetGateway(v **types.InternetGateway, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.InternetGateway
+ if *v == nil {
+ sv = &types.InternetGateway{}
+ } 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("attachmentSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentInternetGatewayAttachmentList(&sv.Attachments, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("internetGatewayId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.InternetGatewayId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("ownerId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.OwnerId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("tagSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_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 awsEc2query_deserializeDocumentInternetGatewayAttachment(v **types.InternetGatewayAttachment, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.InternetGatewayAttachment
+ if *v == nil {
+ sv = &types.InternetGatewayAttachment{}
+ } 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("state", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.State = types.AttachmentStatus(xtv)
+ }
+
+ 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)
+ }
+
+ 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 awsEc2query_deserializeDocumentInternetGatewayAttachmentList(v *[]types.InternetGatewayAttachment, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.InternetGatewayAttachment
+ if *v == nil {
+ sv = make([]types.InternetGatewayAttachment, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.InternetGatewayAttachment
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentInternetGatewayAttachment(&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 awsEc2query_deserializeDocumentInternetGatewayAttachmentListUnwrapped(v *[]types.InternetGatewayAttachment, decoder smithyxml.NodeDecoder) error {
+ var sv []types.InternetGatewayAttachment
+ if *v == nil {
+ sv = make([]types.InternetGatewayAttachment, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.InternetGatewayAttachment
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentInternetGatewayAttachment(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentInternetGatewayList(v *[]types.InternetGateway, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.InternetGateway
+ if *v == nil {
+ sv = make([]types.InternetGateway, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.InternetGateway
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentInternetGateway(&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 awsEc2query_deserializeDocumentInternetGatewayListUnwrapped(v *[]types.InternetGateway, decoder smithyxml.NodeDecoder) error {
+ var sv []types.InternetGateway
+ if *v == nil {
+ sv = make([]types.InternetGateway, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.InternetGateway
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentInternetGateway(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentIpAddressList(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("item", 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 awsEc2query_deserializeDocumentIpAddressListUnwrapped(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 awsEc2query_deserializeDocumentIpPermission(v **types.IpPermission, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.IpPermission
+ if *v == nil {
+ sv = &types.IpPermission{}
+ } 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("fromPort", 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.FromPort = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("ipProtocol", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.IpProtocol = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("ipRanges", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentIpRangeList(&sv.IpRanges, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("ipv6Ranges", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentIpv6RangeList(&sv.Ipv6Ranges, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("prefixListIds", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentPrefixListIdList(&sv.PrefixListIds, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("toPort", 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.ToPort = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("groups", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentUserIdGroupPairList(&sv.UserIdGroupPairs, 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 awsEc2query_deserializeDocumentIpPermissionList(v *[]types.IpPermission, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.IpPermission
+ if *v == nil {
+ sv = make([]types.IpPermission, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.IpPermission
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentIpPermission(&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 awsEc2query_deserializeDocumentIpPermissionListUnwrapped(v *[]types.IpPermission, decoder smithyxml.NodeDecoder) error {
+ var sv []types.IpPermission
+ if *v == nil {
+ sv = make([]types.IpPermission, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.IpPermission
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentIpPermission(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentIpPrefixList(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("item", 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 awsEc2query_deserializeDocumentIpPrefixListUnwrapped(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 awsEc2query_deserializeDocumentIpRange(v **types.IpRange, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.IpRange
+ if *v == nil {
+ sv = &types.IpRange{}
+ } 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("cidrIp", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.CidrIp = ptr.String(xtv)
+ }
+
+ 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)
+ }
+
+ 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 awsEc2query_deserializeDocumentIpRangeList(v *[]types.IpRange, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.IpRange
+ if *v == nil {
+ sv = make([]types.IpRange, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.IpRange
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentIpRange(&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 awsEc2query_deserializeDocumentIpRangeListUnwrapped(v *[]types.IpRange, decoder smithyxml.NodeDecoder) error {
+ var sv []types.IpRange
+ if *v == nil {
+ sv = make([]types.IpRange, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.IpRange
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentIpRange(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentIpRanges(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("item", 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 awsEc2query_deserializeDocumentIpRangesUnwrapped(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 awsEc2query_deserializeDocumentIpv4PrefixesList(v *[]types.Ipv4PrefixSpecification, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.Ipv4PrefixSpecification
+ if *v == nil {
+ sv = make([]types.Ipv4PrefixSpecification, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.Ipv4PrefixSpecification
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentIpv4PrefixSpecification(&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 awsEc2query_deserializeDocumentIpv4PrefixesListUnwrapped(v *[]types.Ipv4PrefixSpecification, decoder smithyxml.NodeDecoder) error {
+ var sv []types.Ipv4PrefixSpecification
+ if *v == nil {
+ sv = make([]types.Ipv4PrefixSpecification, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.Ipv4PrefixSpecification
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentIpv4PrefixSpecification(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentIpv4PrefixList(v *[]types.Ipv4PrefixSpecificationRequest, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.Ipv4PrefixSpecificationRequest
+ if *v == nil {
+ sv = make([]types.Ipv4PrefixSpecificationRequest, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.Ipv4PrefixSpecificationRequest
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentIpv4PrefixSpecificationRequest(&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 awsEc2query_deserializeDocumentIpv4PrefixListUnwrapped(v *[]types.Ipv4PrefixSpecificationRequest, decoder smithyxml.NodeDecoder) error {
+ var sv []types.Ipv4PrefixSpecificationRequest
+ if *v == nil {
+ sv = make([]types.Ipv4PrefixSpecificationRequest, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.Ipv4PrefixSpecificationRequest
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentIpv4PrefixSpecificationRequest(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentIpv4PrefixListResponse(v *[]types.Ipv4PrefixSpecificationResponse, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.Ipv4PrefixSpecificationResponse
+ if *v == nil {
+ sv = make([]types.Ipv4PrefixSpecificationResponse, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.Ipv4PrefixSpecificationResponse
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentIpv4PrefixSpecificationResponse(&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 awsEc2query_deserializeDocumentIpv4PrefixListResponseUnwrapped(v *[]types.Ipv4PrefixSpecificationResponse, decoder smithyxml.NodeDecoder) error {
+ var sv []types.Ipv4PrefixSpecificationResponse
+ if *v == nil {
+ sv = make([]types.Ipv4PrefixSpecificationResponse, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.Ipv4PrefixSpecificationResponse
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentIpv4PrefixSpecificationResponse(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentIpv4PrefixSpecification(v **types.Ipv4PrefixSpecification, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.Ipv4PrefixSpecification
+ if *v == nil {
+ sv = &types.Ipv4PrefixSpecification{}
+ } 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("ipv4Prefix", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Ipv4Prefix = 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 awsEc2query_deserializeDocumentIpv4PrefixSpecificationRequest(v **types.Ipv4PrefixSpecificationRequest, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.Ipv4PrefixSpecificationRequest
+ if *v == nil {
+ sv = &types.Ipv4PrefixSpecificationRequest{}
+ } 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("Ipv4Prefix", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Ipv4Prefix = 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 awsEc2query_deserializeDocumentIpv4PrefixSpecificationResponse(v **types.Ipv4PrefixSpecificationResponse, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.Ipv4PrefixSpecificationResponse
+ if *v == nil {
+ sv = &types.Ipv4PrefixSpecificationResponse{}
+ } 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("ipv4Prefix", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Ipv4Prefix = 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 awsEc2query_deserializeDocumentIpv6AddressList(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("item", 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 awsEc2query_deserializeDocumentIpv6AddressListUnwrapped(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 awsEc2query_deserializeDocumentIpv6CidrAssociation(v **types.Ipv6CidrAssociation, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.Ipv6CidrAssociation
+ if *v == nil {
+ sv = &types.Ipv6CidrAssociation{}
+ } 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("associatedResource", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AssociatedResource = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("ipv6Cidr", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Ipv6Cidr = 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 awsEc2query_deserializeDocumentIpv6CidrAssociationSet(v *[]types.Ipv6CidrAssociation, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.Ipv6CidrAssociation
+ if *v == nil {
+ sv = make([]types.Ipv6CidrAssociation, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.Ipv6CidrAssociation
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentIpv6CidrAssociation(&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 awsEc2query_deserializeDocumentIpv6CidrAssociationSetUnwrapped(v *[]types.Ipv6CidrAssociation, decoder smithyxml.NodeDecoder) error {
+ var sv []types.Ipv6CidrAssociation
+ if *v == nil {
+ sv = make([]types.Ipv6CidrAssociation, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.Ipv6CidrAssociation
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentIpv6CidrAssociation(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentIpv6CidrBlock(v **types.Ipv6CidrBlock, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.Ipv6CidrBlock
+ if *v == nil {
+ sv = &types.Ipv6CidrBlock{}
+ } 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("ipv6CidrBlock", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Ipv6CidrBlock = 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 awsEc2query_deserializeDocumentIpv6CidrBlockSet(v *[]types.Ipv6CidrBlock, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.Ipv6CidrBlock
+ if *v == nil {
+ sv = make([]types.Ipv6CidrBlock, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.Ipv6CidrBlock
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentIpv6CidrBlock(&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 awsEc2query_deserializeDocumentIpv6CidrBlockSetUnwrapped(v *[]types.Ipv6CidrBlock, decoder smithyxml.NodeDecoder) error {
+ var sv []types.Ipv6CidrBlock
+ if *v == nil {
+ sv = make([]types.Ipv6CidrBlock, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.Ipv6CidrBlock
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentIpv6CidrBlock(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentIpv6Pool(v **types.Ipv6Pool, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.Ipv6Pool
+ if *v == nil {
+ sv = &types.Ipv6Pool{}
+ } 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("poolCidrBlockSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentPoolCidrBlocksSet(&sv.PoolCidrBlocks, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("poolId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.PoolId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("tagSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_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 awsEc2query_deserializeDocumentIpv6PoolSet(v *[]types.Ipv6Pool, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.Ipv6Pool
+ if *v == nil {
+ sv = make([]types.Ipv6Pool, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.Ipv6Pool
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentIpv6Pool(&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 awsEc2query_deserializeDocumentIpv6PoolSetUnwrapped(v *[]types.Ipv6Pool, decoder smithyxml.NodeDecoder) error {
+ var sv []types.Ipv6Pool
+ if *v == nil {
+ sv = make([]types.Ipv6Pool, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.Ipv6Pool
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentIpv6Pool(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentIpv6PrefixesList(v *[]types.Ipv6PrefixSpecification, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.Ipv6PrefixSpecification
+ if *v == nil {
+ sv = make([]types.Ipv6PrefixSpecification, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.Ipv6PrefixSpecification
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentIpv6PrefixSpecification(&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 awsEc2query_deserializeDocumentIpv6PrefixesListUnwrapped(v *[]types.Ipv6PrefixSpecification, decoder smithyxml.NodeDecoder) error {
+ var sv []types.Ipv6PrefixSpecification
+ if *v == nil {
+ sv = make([]types.Ipv6PrefixSpecification, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.Ipv6PrefixSpecification
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentIpv6PrefixSpecification(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentIpv6PrefixList(v *[]types.Ipv6PrefixSpecificationRequest, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.Ipv6PrefixSpecificationRequest
+ if *v == nil {
+ sv = make([]types.Ipv6PrefixSpecificationRequest, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.Ipv6PrefixSpecificationRequest
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentIpv6PrefixSpecificationRequest(&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 awsEc2query_deserializeDocumentIpv6PrefixListUnwrapped(v *[]types.Ipv6PrefixSpecificationRequest, decoder smithyxml.NodeDecoder) error {
+ var sv []types.Ipv6PrefixSpecificationRequest
+ if *v == nil {
+ sv = make([]types.Ipv6PrefixSpecificationRequest, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.Ipv6PrefixSpecificationRequest
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentIpv6PrefixSpecificationRequest(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentIpv6PrefixListResponse(v *[]types.Ipv6PrefixSpecificationResponse, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.Ipv6PrefixSpecificationResponse
+ if *v == nil {
+ sv = make([]types.Ipv6PrefixSpecificationResponse, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.Ipv6PrefixSpecificationResponse
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentIpv6PrefixSpecificationResponse(&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 awsEc2query_deserializeDocumentIpv6PrefixListResponseUnwrapped(v *[]types.Ipv6PrefixSpecificationResponse, decoder smithyxml.NodeDecoder) error {
+ var sv []types.Ipv6PrefixSpecificationResponse
+ if *v == nil {
+ sv = make([]types.Ipv6PrefixSpecificationResponse, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.Ipv6PrefixSpecificationResponse
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentIpv6PrefixSpecificationResponse(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentIpv6PrefixSpecification(v **types.Ipv6PrefixSpecification, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.Ipv6PrefixSpecification
+ if *v == nil {
+ sv = &types.Ipv6PrefixSpecification{}
+ } 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("ipv6Prefix", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Ipv6Prefix = 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 awsEc2query_deserializeDocumentIpv6PrefixSpecificationRequest(v **types.Ipv6PrefixSpecificationRequest, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.Ipv6PrefixSpecificationRequest
+ if *v == nil {
+ sv = &types.Ipv6PrefixSpecificationRequest{}
+ } 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("Ipv6Prefix", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Ipv6Prefix = 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 awsEc2query_deserializeDocumentIpv6PrefixSpecificationResponse(v **types.Ipv6PrefixSpecificationResponse, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.Ipv6PrefixSpecificationResponse
+ if *v == nil {
+ sv = &types.Ipv6PrefixSpecificationResponse{}
+ } 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("ipv6Prefix", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Ipv6Prefix = 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 awsEc2query_deserializeDocumentIpv6Range(v **types.Ipv6Range, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.Ipv6Range
+ if *v == nil {
+ sv = &types.Ipv6Range{}
+ } 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("cidrIpv6", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.CidrIpv6 = ptr.String(xtv)
+ }
+
+ 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)
+ }
+
+ 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 awsEc2query_deserializeDocumentIpv6RangeList(v *[]types.Ipv6Range, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.Ipv6Range
+ if *v == nil {
+ sv = make([]types.Ipv6Range, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.Ipv6Range
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentIpv6Range(&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 awsEc2query_deserializeDocumentIpv6RangeListUnwrapped(v *[]types.Ipv6Range, decoder smithyxml.NodeDecoder) error {
+ var sv []types.Ipv6Range
+ if *v == nil {
+ sv = make([]types.Ipv6Range, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.Ipv6Range
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentIpv6Range(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentKeyPairInfo(v **types.KeyPairInfo, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.KeyPairInfo
+ if *v == nil {
+ sv = &types.KeyPairInfo{}
+ } 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("keyFingerprint", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.KeyFingerprint = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("keyName", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.KeyName = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("keyPairId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.KeyPairId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("keyType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.KeyType = types.KeyType(xtv)
+ }
+
+ case strings.EqualFold("tagSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_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 awsEc2query_deserializeDocumentKeyPairList(v *[]types.KeyPairInfo, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.KeyPairInfo
+ if *v == nil {
+ sv = make([]types.KeyPairInfo, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.KeyPairInfo
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentKeyPairInfo(&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 awsEc2query_deserializeDocumentKeyPairListUnwrapped(v *[]types.KeyPairInfo, decoder smithyxml.NodeDecoder) error {
+ var sv []types.KeyPairInfo
+ if *v == nil {
+ sv = make([]types.KeyPairInfo, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.KeyPairInfo
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentKeyPairInfo(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentLastError(v **types.LastError, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.LastError
+ if *v == nil {
+ sv = &types.LastError{}
+ } 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("code", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Code = 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)
+ }
+
+ 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 awsEc2query_deserializeDocumentLaunchPermission(v **types.LaunchPermission, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.LaunchPermission
+ if *v == nil {
+ sv = &types.LaunchPermission{}
+ } 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("group", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Group = types.PermissionGroup(xtv)
+ }
+
+ case strings.EqualFold("userId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.UserId = 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 awsEc2query_deserializeDocumentLaunchPermissionList(v *[]types.LaunchPermission, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.LaunchPermission
+ if *v == nil {
+ sv = make([]types.LaunchPermission, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.LaunchPermission
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentLaunchPermission(&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 awsEc2query_deserializeDocumentLaunchPermissionListUnwrapped(v *[]types.LaunchPermission, decoder smithyxml.NodeDecoder) error {
+ var sv []types.LaunchPermission
+ if *v == nil {
+ sv = make([]types.LaunchPermission, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.LaunchPermission
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentLaunchPermission(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentLaunchSpecification(v **types.LaunchSpecification, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.LaunchSpecification
+ if *v == nil {
+ sv = &types.LaunchSpecification{}
+ } 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("addressingType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AddressingType = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("blockDeviceMapping", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentBlockDeviceMappingList(&sv.BlockDeviceMappings, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("ebsOptimized", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.EbsOptimized = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("iamInstanceProfile", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentIamInstanceProfileSpecification(&sv.IamInstanceProfile, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("imageId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ImageId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("instanceType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.InstanceType = types.InstanceType(xtv)
+ }
+
+ case strings.EqualFold("kernelId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.KernelId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("keyName", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.KeyName = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("monitoring", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentRunInstancesMonitoringEnabled(&sv.Monitoring, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("networkInterfaceSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentInstanceNetworkInterfaceSpecificationList(&sv.NetworkInterfaces, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("placement", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentSpotPlacement(&sv.Placement, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("ramdiskId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.RamdiskId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("groupSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentGroupIdentifierList(&sv.SecurityGroups, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("subnetId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.SubnetId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("userData", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.UserData = 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 awsEc2query_deserializeDocumentLaunchSpecsList(v *[]types.SpotFleetLaunchSpecification, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.SpotFleetLaunchSpecification
+ if *v == nil {
+ sv = make([]types.SpotFleetLaunchSpecification, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.SpotFleetLaunchSpecification
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentSpotFleetLaunchSpecification(&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 awsEc2query_deserializeDocumentLaunchSpecsListUnwrapped(v *[]types.SpotFleetLaunchSpecification, decoder smithyxml.NodeDecoder) error {
+ var sv []types.SpotFleetLaunchSpecification
+ if *v == nil {
+ sv = make([]types.SpotFleetLaunchSpecification, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.SpotFleetLaunchSpecification
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentSpotFleetLaunchSpecification(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentLaunchTemplate(v **types.LaunchTemplate, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.LaunchTemplate
+ if *v == nil {
+ sv = &types.LaunchTemplate{}
+ } 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("createdBy", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.CreatedBy = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("createTime", 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.CreateTime = ptr.Time(t)
+ }
+
+ case strings.EqualFold("defaultVersionNumber", 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.DefaultVersionNumber = ptr.Int64(i64)
+ }
+
+ case strings.EqualFold("latestVersionNumber", 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.LatestVersionNumber = ptr.Int64(i64)
+ }
+
+ case strings.EqualFold("launchTemplateId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.LaunchTemplateId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("launchTemplateName", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.LaunchTemplateName = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("tagSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_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 awsEc2query_deserializeDocumentLaunchTemplateAndOverridesResponse(v **types.LaunchTemplateAndOverridesResponse, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.LaunchTemplateAndOverridesResponse
+ if *v == nil {
+ sv = &types.LaunchTemplateAndOverridesResponse{}
+ } 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("launchTemplateSpecification", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentFleetLaunchTemplateSpecification(&sv.LaunchTemplateSpecification, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("overrides", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentFleetLaunchTemplateOverrides(&sv.Overrides, 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 awsEc2query_deserializeDocumentLaunchTemplateBlockDeviceMapping(v **types.LaunchTemplateBlockDeviceMapping, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.LaunchTemplateBlockDeviceMapping
+ if *v == nil {
+ sv = &types.LaunchTemplateBlockDeviceMapping{}
+ } 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("deviceName", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.DeviceName = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("ebs", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentLaunchTemplateEbsBlockDevice(&sv.Ebs, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("noDevice", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.NoDevice = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("virtualName", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.VirtualName = 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 awsEc2query_deserializeDocumentLaunchTemplateBlockDeviceMappingList(v *[]types.LaunchTemplateBlockDeviceMapping, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.LaunchTemplateBlockDeviceMapping
+ if *v == nil {
+ sv = make([]types.LaunchTemplateBlockDeviceMapping, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.LaunchTemplateBlockDeviceMapping
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentLaunchTemplateBlockDeviceMapping(&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 awsEc2query_deserializeDocumentLaunchTemplateBlockDeviceMappingListUnwrapped(v *[]types.LaunchTemplateBlockDeviceMapping, decoder smithyxml.NodeDecoder) error {
+ var sv []types.LaunchTemplateBlockDeviceMapping
+ if *v == nil {
+ sv = make([]types.LaunchTemplateBlockDeviceMapping, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.LaunchTemplateBlockDeviceMapping
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentLaunchTemplateBlockDeviceMapping(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentLaunchTemplateCapacityReservationSpecificationResponse(v **types.LaunchTemplateCapacityReservationSpecificationResponse, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.LaunchTemplateCapacityReservationSpecificationResponse
+ if *v == nil {
+ sv = &types.LaunchTemplateCapacityReservationSpecificationResponse{}
+ } 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("capacityReservationPreference", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.CapacityReservationPreference = types.CapacityReservationPreference(xtv)
+ }
+
+ case strings.EqualFold("capacityReservationTarget", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentCapacityReservationTargetResponse(&sv.CapacityReservationTarget, 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 awsEc2query_deserializeDocumentLaunchTemplateConfig(v **types.LaunchTemplateConfig, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.LaunchTemplateConfig
+ if *v == nil {
+ sv = &types.LaunchTemplateConfig{}
+ } 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("launchTemplateSpecification", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentFleetLaunchTemplateSpecification(&sv.LaunchTemplateSpecification, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("overrides", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentLaunchTemplateOverridesList(&sv.Overrides, 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 awsEc2query_deserializeDocumentLaunchTemplateConfigList(v *[]types.LaunchTemplateConfig, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.LaunchTemplateConfig
+ if *v == nil {
+ sv = make([]types.LaunchTemplateConfig, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.LaunchTemplateConfig
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentLaunchTemplateConfig(&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 awsEc2query_deserializeDocumentLaunchTemplateConfigListUnwrapped(v *[]types.LaunchTemplateConfig, decoder smithyxml.NodeDecoder) error {
+ var sv []types.LaunchTemplateConfig
+ if *v == nil {
+ sv = make([]types.LaunchTemplateConfig, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.LaunchTemplateConfig
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentLaunchTemplateConfig(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentLaunchTemplateCpuOptions(v **types.LaunchTemplateCpuOptions, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.LaunchTemplateCpuOptions
+ if *v == nil {
+ sv = &types.LaunchTemplateCpuOptions{}
+ } 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("coreCount", 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.CoreCount = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("threadsPerCore", 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.ThreadsPerCore = 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 awsEc2query_deserializeDocumentLaunchTemplateEbsBlockDevice(v **types.LaunchTemplateEbsBlockDevice, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.LaunchTemplateEbsBlockDevice
+ if *v == nil {
+ sv = &types.LaunchTemplateEbsBlockDevice{}
+ } 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("deleteOnTermination", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.DeleteOnTermination = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("encrypted", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.Encrypted = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("iops", 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.Iops = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("kmsKeyId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.KmsKeyId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("snapshotId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.SnapshotId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("throughput", 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.Throughput = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("volumeSize", 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.VolumeSize = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("volumeType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.VolumeType = types.VolumeType(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 awsEc2query_deserializeDocumentLaunchTemplateElasticInferenceAcceleratorResponse(v **types.LaunchTemplateElasticInferenceAcceleratorResponse, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.LaunchTemplateElasticInferenceAcceleratorResponse
+ if *v == nil {
+ sv = &types.LaunchTemplateElasticInferenceAcceleratorResponse{}
+ } 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 = 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 = 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 awsEc2query_deserializeDocumentLaunchTemplateElasticInferenceAcceleratorResponseList(v *[]types.LaunchTemplateElasticInferenceAcceleratorResponse, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.LaunchTemplateElasticInferenceAcceleratorResponse
+ if *v == nil {
+ sv = make([]types.LaunchTemplateElasticInferenceAcceleratorResponse, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.LaunchTemplateElasticInferenceAcceleratorResponse
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentLaunchTemplateElasticInferenceAcceleratorResponse(&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 awsEc2query_deserializeDocumentLaunchTemplateElasticInferenceAcceleratorResponseListUnwrapped(v *[]types.LaunchTemplateElasticInferenceAcceleratorResponse, decoder smithyxml.NodeDecoder) error {
+ var sv []types.LaunchTemplateElasticInferenceAcceleratorResponse
+ if *v == nil {
+ sv = make([]types.LaunchTemplateElasticInferenceAcceleratorResponse, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.LaunchTemplateElasticInferenceAcceleratorResponse
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentLaunchTemplateElasticInferenceAcceleratorResponse(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentLaunchTemplateEnclaveOptions(v **types.LaunchTemplateEnclaveOptions, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.LaunchTemplateEnclaveOptions
+ if *v == nil {
+ sv = &types.LaunchTemplateEnclaveOptions{}
+ } 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("enabled", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.Enabled = ptr.Bool(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 awsEc2query_deserializeDocumentLaunchTemplateHibernationOptions(v **types.LaunchTemplateHibernationOptions, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.LaunchTemplateHibernationOptions
+ if *v == nil {
+ sv = &types.LaunchTemplateHibernationOptions{}
+ } 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("configured", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.Configured = ptr.Bool(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 awsEc2query_deserializeDocumentLaunchTemplateIamInstanceProfileSpecification(v **types.LaunchTemplateIamInstanceProfileSpecification, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.LaunchTemplateIamInstanceProfileSpecification
+ if *v == nil {
+ sv = &types.LaunchTemplateIamInstanceProfileSpecification{}
+ } 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("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)
+ }
+
+ 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 awsEc2query_deserializeDocumentLaunchTemplateInstanceMarketOptions(v **types.LaunchTemplateInstanceMarketOptions, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.LaunchTemplateInstanceMarketOptions
+ if *v == nil {
+ sv = &types.LaunchTemplateInstanceMarketOptions{}
+ } 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("marketType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.MarketType = types.MarketType(xtv)
+ }
+
+ case strings.EqualFold("spotOptions", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentLaunchTemplateSpotMarketOptions(&sv.SpotOptions, 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 awsEc2query_deserializeDocumentLaunchTemplateInstanceMetadataOptions(v **types.LaunchTemplateInstanceMetadataOptions, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.LaunchTemplateInstanceMetadataOptions
+ if *v == nil {
+ sv = &types.LaunchTemplateInstanceMetadataOptions{}
+ } 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("httpEndpoint", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.HttpEndpoint = types.LaunchTemplateInstanceMetadataEndpointState(xtv)
+ }
+
+ case strings.EqualFold("httpProtocolIpv6", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.HttpProtocolIpv6 = types.LaunchTemplateInstanceMetadataProtocolIpv6(xtv)
+ }
+
+ case strings.EqualFold("httpPutResponseHopLimit", 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.HttpPutResponseHopLimit = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("httpTokens", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.HttpTokens = types.LaunchTemplateHttpTokensState(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 = types.LaunchTemplateInstanceMetadataOptionsState(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 awsEc2query_deserializeDocumentLaunchTemplateInstanceNetworkInterfaceSpecification(v **types.LaunchTemplateInstanceNetworkInterfaceSpecification, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.LaunchTemplateInstanceNetworkInterfaceSpecification
+ if *v == nil {
+ sv = &types.LaunchTemplateInstanceNetworkInterfaceSpecification{}
+ } 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("associateCarrierIpAddress", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.AssociateCarrierIpAddress = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("associatePublicIpAddress", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.AssociatePublicIpAddress = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("deleteOnTermination", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.DeleteOnTermination = ptr.Bool(xtv)
+ }
+
+ 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("deviceIndex", 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.DeviceIndex = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("groupSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentGroupIdStringList(&sv.Groups, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("interfaceType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.InterfaceType = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("ipv4PrefixCount", 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.Ipv4PrefixCount = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("ipv4PrefixSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentIpv4PrefixListResponse(&sv.Ipv4Prefixes, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("ipv6AddressCount", 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.Ipv6AddressCount = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("ipv6AddressesSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentInstanceIpv6AddressList(&sv.Ipv6Addresses, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("ipv6PrefixCount", 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.Ipv6PrefixCount = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("ipv6PrefixSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentIpv6PrefixListResponse(&sv.Ipv6Prefixes, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("networkCardIndex", 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.NetworkCardIndex = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("networkInterfaceId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.NetworkInterfaceId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("privateIpAddress", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.PrivateIpAddress = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("privateIpAddressesSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentPrivateIpAddressSpecificationList(&sv.PrivateIpAddresses, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("secondaryPrivateIpAddressCount", 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.SecondaryPrivateIpAddressCount = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("subnetId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.SubnetId = 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 awsEc2query_deserializeDocumentLaunchTemplateInstanceNetworkInterfaceSpecificationList(v *[]types.LaunchTemplateInstanceNetworkInterfaceSpecification, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.LaunchTemplateInstanceNetworkInterfaceSpecification
+ if *v == nil {
+ sv = make([]types.LaunchTemplateInstanceNetworkInterfaceSpecification, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.LaunchTemplateInstanceNetworkInterfaceSpecification
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentLaunchTemplateInstanceNetworkInterfaceSpecification(&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 awsEc2query_deserializeDocumentLaunchTemplateInstanceNetworkInterfaceSpecificationListUnwrapped(v *[]types.LaunchTemplateInstanceNetworkInterfaceSpecification, decoder smithyxml.NodeDecoder) error {
+ var sv []types.LaunchTemplateInstanceNetworkInterfaceSpecification
+ if *v == nil {
+ sv = make([]types.LaunchTemplateInstanceNetworkInterfaceSpecification, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.LaunchTemplateInstanceNetworkInterfaceSpecification
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentLaunchTemplateInstanceNetworkInterfaceSpecification(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentLaunchTemplateLicenseConfiguration(v **types.LaunchTemplateLicenseConfiguration, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.LaunchTemplateLicenseConfiguration
+ if *v == nil {
+ sv = &types.LaunchTemplateLicenseConfiguration{}
+ } 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("licenseConfigurationArn", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.LicenseConfigurationArn = 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 awsEc2query_deserializeDocumentLaunchTemplateLicenseList(v *[]types.LaunchTemplateLicenseConfiguration, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.LaunchTemplateLicenseConfiguration
+ if *v == nil {
+ sv = make([]types.LaunchTemplateLicenseConfiguration, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.LaunchTemplateLicenseConfiguration
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentLaunchTemplateLicenseConfiguration(&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 awsEc2query_deserializeDocumentLaunchTemplateLicenseListUnwrapped(v *[]types.LaunchTemplateLicenseConfiguration, decoder smithyxml.NodeDecoder) error {
+ var sv []types.LaunchTemplateLicenseConfiguration
+ if *v == nil {
+ sv = make([]types.LaunchTemplateLicenseConfiguration, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.LaunchTemplateLicenseConfiguration
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentLaunchTemplateLicenseConfiguration(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentLaunchTemplateOverrides(v **types.LaunchTemplateOverrides, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.LaunchTemplateOverrides
+ if *v == nil {
+ sv = &types.LaunchTemplateOverrides{}
+ } 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("availabilityZone", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AvailabilityZone = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("instanceType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.InstanceType = types.InstanceType(xtv)
+ }
+
+ case strings.EqualFold("priority", 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.Priority = ptr.Float64(f64)
+ }
+
+ case strings.EqualFold("spotPrice", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.SpotPrice = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("subnetId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.SubnetId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("weightedCapacity", 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.WeightedCapacity = 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 awsEc2query_deserializeDocumentLaunchTemplateOverridesList(v *[]types.LaunchTemplateOverrides, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.LaunchTemplateOverrides
+ if *v == nil {
+ sv = make([]types.LaunchTemplateOverrides, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.LaunchTemplateOverrides
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentLaunchTemplateOverrides(&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 awsEc2query_deserializeDocumentLaunchTemplateOverridesListUnwrapped(v *[]types.LaunchTemplateOverrides, decoder smithyxml.NodeDecoder) error {
+ var sv []types.LaunchTemplateOverrides
+ if *v == nil {
+ sv = make([]types.LaunchTemplateOverrides, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.LaunchTemplateOverrides
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentLaunchTemplateOverrides(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentLaunchTemplatePlacement(v **types.LaunchTemplatePlacement, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.LaunchTemplatePlacement
+ if *v == nil {
+ sv = &types.LaunchTemplatePlacement{}
+ } 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("affinity", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Affinity = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("availabilityZone", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AvailabilityZone = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("groupName", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.GroupName = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("hostId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.HostId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("hostResourceGroupArn", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.HostResourceGroupArn = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("partitionNumber", 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.PartitionNumber = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("spreadDomain", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.SpreadDomain = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("tenancy", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Tenancy = types.Tenancy(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 awsEc2query_deserializeDocumentLaunchTemplateSet(v *[]types.LaunchTemplate, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.LaunchTemplate
+ if *v == nil {
+ sv = make([]types.LaunchTemplate, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.LaunchTemplate
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentLaunchTemplate(&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 awsEc2query_deserializeDocumentLaunchTemplateSetUnwrapped(v *[]types.LaunchTemplate, decoder smithyxml.NodeDecoder) error {
+ var sv []types.LaunchTemplate
+ if *v == nil {
+ sv = make([]types.LaunchTemplate, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.LaunchTemplate
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentLaunchTemplate(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentLaunchTemplatesMonitoring(v **types.LaunchTemplatesMonitoring, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.LaunchTemplatesMonitoring
+ if *v == nil {
+ sv = &types.LaunchTemplatesMonitoring{}
+ } 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("enabled", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.Enabled = ptr.Bool(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 awsEc2query_deserializeDocumentLaunchTemplateSpotMarketOptions(v **types.LaunchTemplateSpotMarketOptions, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.LaunchTemplateSpotMarketOptions
+ if *v == nil {
+ sv = &types.LaunchTemplateSpotMarketOptions{}
+ } 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("blockDurationMinutes", 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.BlockDurationMinutes = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("instanceInterruptionBehavior", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.InstanceInterruptionBehavior = types.InstanceInterruptionBehavior(xtv)
+ }
+
+ case strings.EqualFold("maxPrice", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.MaxPrice = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("spotInstanceType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.SpotInstanceType = types.SpotInstanceType(xtv)
+ }
+
+ case strings.EqualFold("validUntil", 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.ValidUntil = 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 awsEc2query_deserializeDocumentLaunchTemplateTagSpecification(v **types.LaunchTemplateTagSpecification, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.LaunchTemplateTagSpecification
+ if *v == nil {
+ sv = &types.LaunchTemplateTagSpecification{}
+ } 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("resourceType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ResourceType = types.ResourceType(xtv)
+ }
+
+ case strings.EqualFold("tagSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_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 awsEc2query_deserializeDocumentLaunchTemplateTagSpecificationList(v *[]types.LaunchTemplateTagSpecification, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.LaunchTemplateTagSpecification
+ if *v == nil {
+ sv = make([]types.LaunchTemplateTagSpecification, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.LaunchTemplateTagSpecification
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentLaunchTemplateTagSpecification(&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 awsEc2query_deserializeDocumentLaunchTemplateTagSpecificationListUnwrapped(v *[]types.LaunchTemplateTagSpecification, decoder smithyxml.NodeDecoder) error {
+ var sv []types.LaunchTemplateTagSpecification
+ if *v == nil {
+ sv = make([]types.LaunchTemplateTagSpecification, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.LaunchTemplateTagSpecification
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentLaunchTemplateTagSpecification(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentLaunchTemplateVersion(v **types.LaunchTemplateVersion, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.LaunchTemplateVersion
+ if *v == nil {
+ sv = &types.LaunchTemplateVersion{}
+ } 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("createdBy", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.CreatedBy = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("createTime", 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.CreateTime = ptr.Time(t)
+ }
+
+ case strings.EqualFold("defaultVersion", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.DefaultVersion = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("launchTemplateData", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentResponseLaunchTemplateData(&sv.LaunchTemplateData, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("launchTemplateId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.LaunchTemplateId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("launchTemplateName", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.LaunchTemplateName = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("versionDescription", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.VersionDescription = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("versionNumber", 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.VersionNumber = 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 awsEc2query_deserializeDocumentLaunchTemplateVersionSet(v *[]types.LaunchTemplateVersion, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.LaunchTemplateVersion
+ if *v == nil {
+ sv = make([]types.LaunchTemplateVersion, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.LaunchTemplateVersion
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentLaunchTemplateVersion(&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 awsEc2query_deserializeDocumentLaunchTemplateVersionSetUnwrapped(v *[]types.LaunchTemplateVersion, decoder smithyxml.NodeDecoder) error {
+ var sv []types.LaunchTemplateVersion
+ if *v == nil {
+ sv = make([]types.LaunchTemplateVersion, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.LaunchTemplateVersion
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentLaunchTemplateVersion(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentLicenseConfiguration(v **types.LicenseConfiguration, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.LicenseConfiguration
+ if *v == nil {
+ sv = &types.LicenseConfiguration{}
+ } 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("licenseConfigurationArn", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.LicenseConfigurationArn = 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 awsEc2query_deserializeDocumentLicenseList(v *[]types.LicenseConfiguration, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.LicenseConfiguration
+ if *v == nil {
+ sv = make([]types.LicenseConfiguration, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.LicenseConfiguration
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentLicenseConfiguration(&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 awsEc2query_deserializeDocumentLicenseListUnwrapped(v *[]types.LicenseConfiguration, decoder smithyxml.NodeDecoder) error {
+ var sv []types.LicenseConfiguration
+ if *v == nil {
+ sv = make([]types.LicenseConfiguration, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.LicenseConfiguration
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentLicenseConfiguration(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentLoadBalancersConfig(v **types.LoadBalancersConfig, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.LoadBalancersConfig
+ if *v == nil {
+ sv = &types.LoadBalancersConfig{}
+ } 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("classicLoadBalancersConfig", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentClassicLoadBalancersConfig(&sv.ClassicLoadBalancersConfig, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("targetGroupsConfig", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTargetGroupsConfig(&sv.TargetGroupsConfig, 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 awsEc2query_deserializeDocumentLoadPermission(v **types.LoadPermission, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.LoadPermission
+ if *v == nil {
+ sv = &types.LoadPermission{}
+ } 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("group", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Group = types.PermissionGroup(xtv)
+ }
+
+ case strings.EqualFold("userId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.UserId = 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 awsEc2query_deserializeDocumentLoadPermissionList(v *[]types.LoadPermission, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.LoadPermission
+ if *v == nil {
+ sv = make([]types.LoadPermission, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.LoadPermission
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentLoadPermission(&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 awsEc2query_deserializeDocumentLoadPermissionListUnwrapped(v *[]types.LoadPermission, decoder smithyxml.NodeDecoder) error {
+ var sv []types.LoadPermission
+ if *v == nil {
+ sv = make([]types.LoadPermission, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.LoadPermission
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentLoadPermission(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentLocalGateway(v **types.LocalGateway, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.LocalGateway
+ if *v == nil {
+ sv = &types.LocalGateway{}
+ } 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("localGatewayId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.LocalGatewayId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("outpostArn", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.OutpostArn = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("ownerId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.OwnerId = 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("tagSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_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 awsEc2query_deserializeDocumentLocalGatewayRoute(v **types.LocalGatewayRoute, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.LocalGatewayRoute
+ if *v == nil {
+ sv = &types.LocalGatewayRoute{}
+ } 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("destinationCidrBlock", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.DestinationCidrBlock = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("localGatewayRouteTableArn", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.LocalGatewayRouteTableArn = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("localGatewayRouteTableId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.LocalGatewayRouteTableId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("localGatewayVirtualInterfaceGroupId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.LocalGatewayVirtualInterfaceGroupId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("ownerId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.OwnerId = 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 = types.LocalGatewayRouteState(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.LocalGatewayRouteType(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 awsEc2query_deserializeDocumentLocalGatewayRouteList(v *[]types.LocalGatewayRoute, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.LocalGatewayRoute
+ if *v == nil {
+ sv = make([]types.LocalGatewayRoute, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.LocalGatewayRoute
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentLocalGatewayRoute(&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 awsEc2query_deserializeDocumentLocalGatewayRouteListUnwrapped(v *[]types.LocalGatewayRoute, decoder smithyxml.NodeDecoder) error {
+ var sv []types.LocalGatewayRoute
+ if *v == nil {
+ sv = make([]types.LocalGatewayRoute, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.LocalGatewayRoute
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentLocalGatewayRoute(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentLocalGatewayRouteTable(v **types.LocalGatewayRouteTable, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.LocalGatewayRouteTable
+ if *v == nil {
+ sv = &types.LocalGatewayRouteTable{}
+ } 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("localGatewayId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.LocalGatewayId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("localGatewayRouteTableArn", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.LocalGatewayRouteTableArn = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("localGatewayRouteTableId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.LocalGatewayRouteTableId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("outpostArn", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.OutpostArn = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("ownerId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.OwnerId = 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("tagSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_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 awsEc2query_deserializeDocumentLocalGatewayRouteTableSet(v *[]types.LocalGatewayRouteTable, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.LocalGatewayRouteTable
+ if *v == nil {
+ sv = make([]types.LocalGatewayRouteTable, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.LocalGatewayRouteTable
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentLocalGatewayRouteTable(&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 awsEc2query_deserializeDocumentLocalGatewayRouteTableSetUnwrapped(v *[]types.LocalGatewayRouteTable, decoder smithyxml.NodeDecoder) error {
+ var sv []types.LocalGatewayRouteTable
+ if *v == nil {
+ sv = make([]types.LocalGatewayRouteTable, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.LocalGatewayRouteTable
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentLocalGatewayRouteTable(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentLocalGatewayRouteTableVirtualInterfaceGroupAssociation(v **types.LocalGatewayRouteTableVirtualInterfaceGroupAssociation, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.LocalGatewayRouteTableVirtualInterfaceGroupAssociation
+ if *v == nil {
+ sv = &types.LocalGatewayRouteTableVirtualInterfaceGroupAssociation{}
+ } 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("localGatewayId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.LocalGatewayId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("localGatewayRouteTableArn", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.LocalGatewayRouteTableArn = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("localGatewayRouteTableId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.LocalGatewayRouteTableId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("localGatewayRouteTableVirtualInterfaceGroupAssociationId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.LocalGatewayRouteTableVirtualInterfaceGroupAssociationId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("localGatewayVirtualInterfaceGroupId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.LocalGatewayVirtualInterfaceGroupId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("ownerId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.OwnerId = 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("tagSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_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 awsEc2query_deserializeDocumentLocalGatewayRouteTableVirtualInterfaceGroupAssociationSet(v *[]types.LocalGatewayRouteTableVirtualInterfaceGroupAssociation, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.LocalGatewayRouteTableVirtualInterfaceGroupAssociation
+ if *v == nil {
+ sv = make([]types.LocalGatewayRouteTableVirtualInterfaceGroupAssociation, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.LocalGatewayRouteTableVirtualInterfaceGroupAssociation
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentLocalGatewayRouteTableVirtualInterfaceGroupAssociation(&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 awsEc2query_deserializeDocumentLocalGatewayRouteTableVirtualInterfaceGroupAssociationSetUnwrapped(v *[]types.LocalGatewayRouteTableVirtualInterfaceGroupAssociation, decoder smithyxml.NodeDecoder) error {
+ var sv []types.LocalGatewayRouteTableVirtualInterfaceGroupAssociation
+ if *v == nil {
+ sv = make([]types.LocalGatewayRouteTableVirtualInterfaceGroupAssociation, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.LocalGatewayRouteTableVirtualInterfaceGroupAssociation
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentLocalGatewayRouteTableVirtualInterfaceGroupAssociation(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentLocalGatewayRouteTableVpcAssociation(v **types.LocalGatewayRouteTableVpcAssociation, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.LocalGatewayRouteTableVpcAssociation
+ if *v == nil {
+ sv = &types.LocalGatewayRouteTableVpcAssociation{}
+ } 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("localGatewayId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.LocalGatewayId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("localGatewayRouteTableArn", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.LocalGatewayRouteTableArn = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("localGatewayRouteTableId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.LocalGatewayRouteTableId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("localGatewayRouteTableVpcAssociationId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.LocalGatewayRouteTableVpcAssociationId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("ownerId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.OwnerId = 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("tagSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil {
+ return err
+ }
+
+ 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)
+ }
+
+ 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 awsEc2query_deserializeDocumentLocalGatewayRouteTableVpcAssociationSet(v *[]types.LocalGatewayRouteTableVpcAssociation, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.LocalGatewayRouteTableVpcAssociation
+ if *v == nil {
+ sv = make([]types.LocalGatewayRouteTableVpcAssociation, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.LocalGatewayRouteTableVpcAssociation
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentLocalGatewayRouteTableVpcAssociation(&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 awsEc2query_deserializeDocumentLocalGatewayRouteTableVpcAssociationSetUnwrapped(v *[]types.LocalGatewayRouteTableVpcAssociation, decoder smithyxml.NodeDecoder) error {
+ var sv []types.LocalGatewayRouteTableVpcAssociation
+ if *v == nil {
+ sv = make([]types.LocalGatewayRouteTableVpcAssociation, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.LocalGatewayRouteTableVpcAssociation
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentLocalGatewayRouteTableVpcAssociation(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentLocalGatewaySet(v *[]types.LocalGateway, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.LocalGateway
+ if *v == nil {
+ sv = make([]types.LocalGateway, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.LocalGateway
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentLocalGateway(&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 awsEc2query_deserializeDocumentLocalGatewaySetUnwrapped(v *[]types.LocalGateway, decoder smithyxml.NodeDecoder) error {
+ var sv []types.LocalGateway
+ if *v == nil {
+ sv = make([]types.LocalGateway, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.LocalGateway
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentLocalGateway(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentLocalGatewayVirtualInterface(v **types.LocalGatewayVirtualInterface, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.LocalGatewayVirtualInterface
+ if *v == nil {
+ sv = &types.LocalGatewayVirtualInterface{}
+ } 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("localAddress", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.LocalAddress = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("localBgpAsn", 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.LocalBgpAsn = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("localGatewayId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.LocalGatewayId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("localGatewayVirtualInterfaceId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.LocalGatewayVirtualInterfaceId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("ownerId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.OwnerId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("peerAddress", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.PeerAddress = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("peerBgpAsn", 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.PeerBgpAsn = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("tagSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("vlan", 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.Vlan = 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 awsEc2query_deserializeDocumentLocalGatewayVirtualInterfaceGroup(v **types.LocalGatewayVirtualInterfaceGroup, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.LocalGatewayVirtualInterfaceGroup
+ if *v == nil {
+ sv = &types.LocalGatewayVirtualInterfaceGroup{}
+ } 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("localGatewayId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.LocalGatewayId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("localGatewayVirtualInterfaceGroupId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.LocalGatewayVirtualInterfaceGroupId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("localGatewayVirtualInterfaceIdSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentLocalGatewayVirtualInterfaceIdSet(&sv.LocalGatewayVirtualInterfaceIds, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("ownerId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.OwnerId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("tagSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_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 awsEc2query_deserializeDocumentLocalGatewayVirtualInterfaceGroupSet(v *[]types.LocalGatewayVirtualInterfaceGroup, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.LocalGatewayVirtualInterfaceGroup
+ if *v == nil {
+ sv = make([]types.LocalGatewayVirtualInterfaceGroup, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.LocalGatewayVirtualInterfaceGroup
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentLocalGatewayVirtualInterfaceGroup(&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 awsEc2query_deserializeDocumentLocalGatewayVirtualInterfaceGroupSetUnwrapped(v *[]types.LocalGatewayVirtualInterfaceGroup, decoder smithyxml.NodeDecoder) error {
+ var sv []types.LocalGatewayVirtualInterfaceGroup
+ if *v == nil {
+ sv = make([]types.LocalGatewayVirtualInterfaceGroup, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.LocalGatewayVirtualInterfaceGroup
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentLocalGatewayVirtualInterfaceGroup(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentLocalGatewayVirtualInterfaceIdSet(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("item", 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 awsEc2query_deserializeDocumentLocalGatewayVirtualInterfaceIdSetUnwrapped(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 awsEc2query_deserializeDocumentLocalGatewayVirtualInterfaceSet(v *[]types.LocalGatewayVirtualInterface, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.LocalGatewayVirtualInterface
+ if *v == nil {
+ sv = make([]types.LocalGatewayVirtualInterface, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.LocalGatewayVirtualInterface
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentLocalGatewayVirtualInterface(&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 awsEc2query_deserializeDocumentLocalGatewayVirtualInterfaceSetUnwrapped(v *[]types.LocalGatewayVirtualInterface, decoder smithyxml.NodeDecoder) error {
+ var sv []types.LocalGatewayVirtualInterface
+ if *v == nil {
+ sv = make([]types.LocalGatewayVirtualInterface, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.LocalGatewayVirtualInterface
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentLocalGatewayVirtualInterface(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentManagedPrefixList(v **types.ManagedPrefixList, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.ManagedPrefixList
+ if *v == nil {
+ sv = &types.ManagedPrefixList{}
+ } 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("addressFamily", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AddressFamily = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("maxEntries", 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.MaxEntries = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("ownerId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.OwnerId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("prefixListArn", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.PrefixListArn = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("prefixListId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.PrefixListId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("prefixListName", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.PrefixListName = 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 = types.PrefixListState(xtv)
+ }
+
+ case strings.EqualFold("stateMessage", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.StateMessage = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("tagSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil {
+ return err
+ }
+
+ 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 awsEc2query_deserializeDocumentManagedPrefixListSet(v *[]types.ManagedPrefixList, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.ManagedPrefixList
+ if *v == nil {
+ sv = make([]types.ManagedPrefixList, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.ManagedPrefixList
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentManagedPrefixList(&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 awsEc2query_deserializeDocumentManagedPrefixListSetUnwrapped(v *[]types.ManagedPrefixList, decoder smithyxml.NodeDecoder) error {
+ var sv []types.ManagedPrefixList
+ if *v == nil {
+ sv = make([]types.ManagedPrefixList, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.ManagedPrefixList
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentManagedPrefixList(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentMemoryInfo(v **types.MemoryInfo, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.MemoryInfo
+ if *v == nil {
+ sv = &types.MemoryInfo{}
+ } 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("sizeInMiB", 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.SizeInMiB = 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 awsEc2query_deserializeDocumentMonitoring(v **types.Monitoring, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.Monitoring
+ if *v == nil {
+ sv = &types.Monitoring{}
+ } 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("state", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.State = types.MonitoringState(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 awsEc2query_deserializeDocumentMovingAddressStatus(v **types.MovingAddressStatus, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.MovingAddressStatus
+ if *v == nil {
+ sv = &types.MovingAddressStatus{}
+ } 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("moveStatus", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.MoveStatus = types.MoveStatus(xtv)
+ }
+
+ case strings.EqualFold("publicIp", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.PublicIp = 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 awsEc2query_deserializeDocumentMovingAddressStatusSet(v *[]types.MovingAddressStatus, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.MovingAddressStatus
+ if *v == nil {
+ sv = make([]types.MovingAddressStatus, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.MovingAddressStatus
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentMovingAddressStatus(&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 awsEc2query_deserializeDocumentMovingAddressStatusSetUnwrapped(v *[]types.MovingAddressStatus, decoder smithyxml.NodeDecoder) error {
+ var sv []types.MovingAddressStatus
+ if *v == nil {
+ sv = make([]types.MovingAddressStatus, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.MovingAddressStatus
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentMovingAddressStatus(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentNatGateway(v **types.NatGateway, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.NatGateway
+ if *v == nil {
+ sv = &types.NatGateway{}
+ } 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("connectivityType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ConnectivityType = types.ConnectivityType(xtv)
+ }
+
+ case strings.EqualFold("createTime", 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.CreateTime = ptr.Time(t)
+ }
+
+ case strings.EqualFold("deleteTime", 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.DeleteTime = ptr.Time(t)
+ }
+
+ case strings.EqualFold("failureCode", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.FailureCode = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("failureMessage", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.FailureMessage = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("natGatewayAddressSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentNatGatewayAddressList(&sv.NatGatewayAddresses, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("natGatewayId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.NatGatewayId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("provisionedBandwidth", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentProvisionedBandwidth(&sv.ProvisionedBandwidth, nodeDecoder); err != nil {
+ return err
+ }
+
+ 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 = types.NatGatewayState(xtv)
+ }
+
+ case strings.EqualFold("subnetId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.SubnetId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("tagSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil {
+ return err
+ }
+
+ 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)
+ }
+
+ 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 awsEc2query_deserializeDocumentNatGatewayAddress(v **types.NatGatewayAddress, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.NatGatewayAddress
+ if *v == nil {
+ sv = &types.NatGatewayAddress{}
+ } 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("allocationId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AllocationId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("networkInterfaceId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.NetworkInterfaceId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("privateIp", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.PrivateIp = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("publicIp", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.PublicIp = 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 awsEc2query_deserializeDocumentNatGatewayAddressList(v *[]types.NatGatewayAddress, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.NatGatewayAddress
+ if *v == nil {
+ sv = make([]types.NatGatewayAddress, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.NatGatewayAddress
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentNatGatewayAddress(&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 awsEc2query_deserializeDocumentNatGatewayAddressListUnwrapped(v *[]types.NatGatewayAddress, decoder smithyxml.NodeDecoder) error {
+ var sv []types.NatGatewayAddress
+ if *v == nil {
+ sv = make([]types.NatGatewayAddress, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.NatGatewayAddress
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentNatGatewayAddress(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentNatGatewayList(v *[]types.NatGateway, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.NatGateway
+ if *v == nil {
+ sv = make([]types.NatGateway, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.NatGateway
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentNatGateway(&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 awsEc2query_deserializeDocumentNatGatewayListUnwrapped(v *[]types.NatGateway, decoder smithyxml.NodeDecoder) error {
+ var sv []types.NatGateway
+ if *v == nil {
+ sv = make([]types.NatGateway, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.NatGateway
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentNatGateway(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentNetworkAcl(v **types.NetworkAcl, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.NetworkAcl
+ if *v == nil {
+ sv = &types.NetworkAcl{}
+ } 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("associationSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentNetworkAclAssociationList(&sv.Associations, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("entrySet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentNetworkAclEntryList(&sv.Entries, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("default", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.IsDefault = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("networkAclId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.NetworkAclId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("ownerId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.OwnerId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("tagSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil {
+ return err
+ }
+
+ 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)
+ }
+
+ 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 awsEc2query_deserializeDocumentNetworkAclAssociation(v **types.NetworkAclAssociation, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.NetworkAclAssociation
+ if *v == nil {
+ sv = &types.NetworkAclAssociation{}
+ } 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("networkAclAssociationId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.NetworkAclAssociationId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("networkAclId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.NetworkAclId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("subnetId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.SubnetId = 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 awsEc2query_deserializeDocumentNetworkAclAssociationList(v *[]types.NetworkAclAssociation, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.NetworkAclAssociation
+ if *v == nil {
+ sv = make([]types.NetworkAclAssociation, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.NetworkAclAssociation
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentNetworkAclAssociation(&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 awsEc2query_deserializeDocumentNetworkAclAssociationListUnwrapped(v *[]types.NetworkAclAssociation, decoder smithyxml.NodeDecoder) error {
+ var sv []types.NetworkAclAssociation
+ if *v == nil {
+ sv = make([]types.NetworkAclAssociation, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.NetworkAclAssociation
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentNetworkAclAssociation(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentNetworkAclEntry(v **types.NetworkAclEntry, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.NetworkAclEntry
+ if *v == nil {
+ sv = &types.NetworkAclEntry{}
+ } 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("egress", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.Egress = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("icmpTypeCode", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentIcmpTypeCode(&sv.IcmpTypeCode, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("ipv6CidrBlock", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Ipv6CidrBlock = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("portRange", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentPortRange(&sv.PortRange, nodeDecoder); err != nil {
+ return err
+ }
+
+ 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("ruleAction", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.RuleAction = types.RuleAction(xtv)
+ }
+
+ case strings.EqualFold("ruleNumber", 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.RuleNumber = 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 awsEc2query_deserializeDocumentNetworkAclEntryList(v *[]types.NetworkAclEntry, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.NetworkAclEntry
+ if *v == nil {
+ sv = make([]types.NetworkAclEntry, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.NetworkAclEntry
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentNetworkAclEntry(&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 awsEc2query_deserializeDocumentNetworkAclEntryListUnwrapped(v *[]types.NetworkAclEntry, decoder smithyxml.NodeDecoder) error {
+ var sv []types.NetworkAclEntry
+ if *v == nil {
+ sv = make([]types.NetworkAclEntry, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.NetworkAclEntry
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentNetworkAclEntry(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentNetworkAclList(v *[]types.NetworkAcl, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.NetworkAcl
+ if *v == nil {
+ sv = make([]types.NetworkAcl, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.NetworkAcl
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentNetworkAcl(&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 awsEc2query_deserializeDocumentNetworkAclListUnwrapped(v *[]types.NetworkAcl, decoder smithyxml.NodeDecoder) error {
+ var sv []types.NetworkAcl
+ if *v == nil {
+ sv = make([]types.NetworkAcl, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.NetworkAcl
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentNetworkAcl(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentNetworkCardInfo(v **types.NetworkCardInfo, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.NetworkCardInfo
+ if *v == nil {
+ sv = &types.NetworkCardInfo{}
+ } 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("maximumNetworkInterfaces", 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.MaximumNetworkInterfaces = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("networkCardIndex", 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.NetworkCardIndex = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("networkPerformance", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.NetworkPerformance = 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 awsEc2query_deserializeDocumentNetworkCardInfoList(v *[]types.NetworkCardInfo, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.NetworkCardInfo
+ if *v == nil {
+ sv = make([]types.NetworkCardInfo, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.NetworkCardInfo
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentNetworkCardInfo(&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 awsEc2query_deserializeDocumentNetworkCardInfoListUnwrapped(v *[]types.NetworkCardInfo, decoder smithyxml.NodeDecoder) error {
+ var sv []types.NetworkCardInfo
+ if *v == nil {
+ sv = make([]types.NetworkCardInfo, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.NetworkCardInfo
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentNetworkCardInfo(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentNetworkInfo(v **types.NetworkInfo, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.NetworkInfo
+ if *v == nil {
+ sv = &types.NetworkInfo{}
+ } 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("defaultNetworkCardIndex", 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.DefaultNetworkCardIndex = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("efaInfo", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentEfaInfo(&sv.EfaInfo, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("efaSupported", 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 EfaSupportedFlag to be of type *bool, got %T instead", val)
+ }
+ sv.EfaSupported = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("enaSupport", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.EnaSupport = types.EnaSupport(xtv)
+ }
+
+ case strings.EqualFold("encryptionInTransitSupported", 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 EncryptionInTransitSupported to be of type *bool, got %T instead", val)
+ }
+ sv.EncryptionInTransitSupported = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("ipv4AddressesPerInterface", 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.Ipv4AddressesPerInterface = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("ipv6AddressesPerInterface", 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.Ipv6AddressesPerInterface = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("ipv6Supported", 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 Ipv6Flag to be of type *bool, got %T instead", val)
+ }
+ sv.Ipv6Supported = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("maximumNetworkCards", 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.MaximumNetworkCards = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("maximumNetworkInterfaces", 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.MaximumNetworkInterfaces = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("networkCards", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentNetworkCardInfoList(&sv.NetworkCards, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("networkPerformance", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.NetworkPerformance = 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 awsEc2query_deserializeDocumentNetworkInsightsAnalysis(v **types.NetworkInsightsAnalysis, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.NetworkInsightsAnalysis
+ if *v == nil {
+ sv = &types.NetworkInsightsAnalysis{}
+ } 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("alternatePathHintSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentAlternatePathHintList(&sv.AlternatePathHints, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("explanationSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentExplanationList(&sv.Explanations, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("filterInArnSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentArnList(&sv.FilterInArns, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("forwardPathComponentSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentPathComponentList(&sv.ForwardPathComponents, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("networkInsightsAnalysisArn", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.NetworkInsightsAnalysisArn = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("networkInsightsAnalysisId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.NetworkInsightsAnalysisId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("networkInsightsPathId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.NetworkInsightsPathId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("networkPathFound", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.NetworkPathFound = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("returnPathComponentSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentPathComponentList(&sv.ReturnPathComponents, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("startDate", 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.StartDate = 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 = types.AnalysisStatus(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)
+ }
+
+ case strings.EqualFold("tagSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_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 awsEc2query_deserializeDocumentNetworkInsightsAnalysisList(v *[]types.NetworkInsightsAnalysis, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.NetworkInsightsAnalysis
+ if *v == nil {
+ sv = make([]types.NetworkInsightsAnalysis, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.NetworkInsightsAnalysis
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentNetworkInsightsAnalysis(&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 awsEc2query_deserializeDocumentNetworkInsightsAnalysisListUnwrapped(v *[]types.NetworkInsightsAnalysis, decoder smithyxml.NodeDecoder) error {
+ var sv []types.NetworkInsightsAnalysis
+ if *v == nil {
+ sv = make([]types.NetworkInsightsAnalysis, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.NetworkInsightsAnalysis
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentNetworkInsightsAnalysis(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentNetworkInsightsPath(v **types.NetworkInsightsPath, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.NetworkInsightsPath
+ if *v == nil {
+ sv = &types.NetworkInsightsPath{}
+ } 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("destination", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Destination = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("destinationIp", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.DestinationIp = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("destinationPort", 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.DestinationPort = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("networkInsightsPathArn", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.NetworkInsightsPathArn = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("networkInsightsPathId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.NetworkInsightsPathId = 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 = types.Protocol(xtv)
+ }
+
+ case strings.EqualFold("source", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Source = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("sourceIp", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.SourceIp = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("tagSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_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 awsEc2query_deserializeDocumentNetworkInsightsPathList(v *[]types.NetworkInsightsPath, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.NetworkInsightsPath
+ if *v == nil {
+ sv = make([]types.NetworkInsightsPath, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.NetworkInsightsPath
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentNetworkInsightsPath(&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 awsEc2query_deserializeDocumentNetworkInsightsPathListUnwrapped(v *[]types.NetworkInsightsPath, decoder smithyxml.NodeDecoder) error {
+ var sv []types.NetworkInsightsPath
+ if *v == nil {
+ sv = make([]types.NetworkInsightsPath, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.NetworkInsightsPath
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentNetworkInsightsPath(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentNetworkInterface(v **types.NetworkInterface, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.NetworkInterface
+ if *v == nil {
+ sv = &types.NetworkInterface{}
+ } 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("association", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentNetworkInterfaceAssociation(&sv.Association, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("attachment", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentNetworkInterfaceAttachment(&sv.Attachment, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("availabilityZone", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AvailabilityZone = ptr.String(xtv)
+ }
+
+ 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("groupSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentGroupIdentifierList(&sv.Groups, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("interfaceType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.InterfaceType = types.NetworkInterfaceType(xtv)
+ }
+
+ case strings.EqualFold("ipv4PrefixSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentIpv4PrefixesList(&sv.Ipv4Prefixes, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("ipv6AddressesSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentNetworkInterfaceIpv6AddressesList(&sv.Ipv6Addresses, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("ipv6PrefixSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentIpv6PrefixesList(&sv.Ipv6Prefixes, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("macAddress", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.MacAddress = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("networkInterfaceId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.NetworkInterfaceId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("outpostArn", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.OutpostArn = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("ownerId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.OwnerId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("privateDnsName", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.PrivateDnsName = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("privateIpAddress", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.PrivateIpAddress = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("privateIpAddressesSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentNetworkInterfacePrivateIpAddressList(&sv.PrivateIpAddresses, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("requesterId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.RequesterId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("requesterManaged", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.RequesterManaged = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("sourceDestCheck", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.SourceDestCheck = ptr.Bool(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.NetworkInterfaceStatus(xtv)
+ }
+
+ case strings.EqualFold("subnetId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.SubnetId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("tagSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTagList(&sv.TagSet, nodeDecoder); err != nil {
+ return err
+ }
+
+ 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)
+ }
+
+ 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 awsEc2query_deserializeDocumentNetworkInterfaceAssociation(v **types.NetworkInterfaceAssociation, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.NetworkInterfaceAssociation
+ if *v == nil {
+ sv = &types.NetworkInterfaceAssociation{}
+ } 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("allocationId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AllocationId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("associationId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AssociationId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("carrierIp", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.CarrierIp = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("customerOwnedIp", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.CustomerOwnedIp = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("ipOwnerId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.IpOwnerId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("publicDnsName", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.PublicDnsName = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("publicIp", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.PublicIp = 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 awsEc2query_deserializeDocumentNetworkInterfaceAttachment(v **types.NetworkInterfaceAttachment, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.NetworkInterfaceAttachment
+ if *v == nil {
+ sv = &types.NetworkInterfaceAttachment{}
+ } 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("attachmentId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AttachmentId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("attachTime", 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.AttachTime = ptr.Time(t)
+ }
+
+ case strings.EqualFold("deleteOnTermination", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.DeleteOnTermination = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("deviceIndex", 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.DeviceIndex = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("instanceId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.InstanceId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("instanceOwnerId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.InstanceOwnerId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("networkCardIndex", 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.NetworkCardIndex = ptr.Int32(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 = types.AttachmentStatus(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 awsEc2query_deserializeDocumentNetworkInterfaceIpv6Address(v **types.NetworkInterfaceIpv6Address, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.NetworkInterfaceIpv6Address
+ if *v == nil {
+ sv = &types.NetworkInterfaceIpv6Address{}
+ } 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("ipv6Address", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Ipv6Address = 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 awsEc2query_deserializeDocumentNetworkInterfaceIpv6AddressesList(v *[]types.NetworkInterfaceIpv6Address, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.NetworkInterfaceIpv6Address
+ if *v == nil {
+ sv = make([]types.NetworkInterfaceIpv6Address, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.NetworkInterfaceIpv6Address
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentNetworkInterfaceIpv6Address(&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 awsEc2query_deserializeDocumentNetworkInterfaceIpv6AddressesListUnwrapped(v *[]types.NetworkInterfaceIpv6Address, decoder smithyxml.NodeDecoder) error {
+ var sv []types.NetworkInterfaceIpv6Address
+ if *v == nil {
+ sv = make([]types.NetworkInterfaceIpv6Address, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.NetworkInterfaceIpv6Address
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentNetworkInterfaceIpv6Address(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentNetworkInterfaceList(v *[]types.NetworkInterface, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.NetworkInterface
+ if *v == nil {
+ sv = make([]types.NetworkInterface, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.NetworkInterface
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentNetworkInterface(&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 awsEc2query_deserializeDocumentNetworkInterfaceListUnwrapped(v *[]types.NetworkInterface, decoder smithyxml.NodeDecoder) error {
+ var sv []types.NetworkInterface
+ if *v == nil {
+ sv = make([]types.NetworkInterface, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.NetworkInterface
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentNetworkInterface(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentNetworkInterfacePermission(v **types.NetworkInterfacePermission, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.NetworkInterfacePermission
+ if *v == nil {
+ sv = &types.NetworkInterfacePermission{}
+ } 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("awsAccountId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AwsAccountId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("awsService", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AwsService = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("networkInterfaceId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.NetworkInterfaceId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("networkInterfacePermissionId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.NetworkInterfacePermissionId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("permission", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Permission = types.InterfacePermissionType(xtv)
+ }
+
+ case strings.EqualFold("permissionState", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentNetworkInterfacePermissionState(&sv.PermissionState, 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 awsEc2query_deserializeDocumentNetworkInterfacePermissionList(v *[]types.NetworkInterfacePermission, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.NetworkInterfacePermission
+ if *v == nil {
+ sv = make([]types.NetworkInterfacePermission, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.NetworkInterfacePermission
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentNetworkInterfacePermission(&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 awsEc2query_deserializeDocumentNetworkInterfacePermissionListUnwrapped(v *[]types.NetworkInterfacePermission, decoder smithyxml.NodeDecoder) error {
+ var sv []types.NetworkInterfacePermission
+ if *v == nil {
+ sv = make([]types.NetworkInterfacePermission, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.NetworkInterfacePermission
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentNetworkInterfacePermission(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentNetworkInterfacePermissionState(v **types.NetworkInterfacePermissionState, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.NetworkInterfacePermissionState
+ if *v == nil {
+ sv = &types.NetworkInterfacePermissionState{}
+ } 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("state", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.State = types.NetworkInterfacePermissionStateCode(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 awsEc2query_deserializeDocumentNetworkInterfacePrivateIpAddress(v **types.NetworkInterfacePrivateIpAddress, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.NetworkInterfacePrivateIpAddress
+ if *v == nil {
+ sv = &types.NetworkInterfacePrivateIpAddress{}
+ } 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("association", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentNetworkInterfaceAssociation(&sv.Association, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("primary", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.Primary = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("privateDnsName", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.PrivateDnsName = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("privateIpAddress", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.PrivateIpAddress = 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 awsEc2query_deserializeDocumentNetworkInterfacePrivateIpAddressList(v *[]types.NetworkInterfacePrivateIpAddress, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.NetworkInterfacePrivateIpAddress
+ if *v == nil {
+ sv = make([]types.NetworkInterfacePrivateIpAddress, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.NetworkInterfacePrivateIpAddress
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentNetworkInterfacePrivateIpAddress(&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 awsEc2query_deserializeDocumentNetworkInterfacePrivateIpAddressListUnwrapped(v *[]types.NetworkInterfacePrivateIpAddress, decoder smithyxml.NodeDecoder) error {
+ var sv []types.NetworkInterfacePrivateIpAddress
+ if *v == nil {
+ sv = make([]types.NetworkInterfacePrivateIpAddress, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.NetworkInterfacePrivateIpAddress
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentNetworkInterfacePrivateIpAddress(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentOccurrenceDaySet(v *[]int32, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []int32
+ if *v == nil {
+ sv = make([]int32, 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("item", t.Name.Local):
+ var col int32
+ 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
+ }
+ col = int32(i64)
+ }
+ sv = append(sv, col)
+
+ default:
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsEc2query_deserializeDocumentOccurrenceDaySetUnwrapped(v *[]int32, decoder smithyxml.NodeDecoder) error {
+ var sv []int32
+ if *v == nil {
+ sv = make([]int32, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv int32
+ t := decoder.StartEl
+ _ = t
+ 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
+ }
+ mv = int32(i64)
+ }
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentOnDemandOptions(v **types.OnDemandOptions, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.OnDemandOptions
+ if *v == nil {
+ sv = &types.OnDemandOptions{}
+ } 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("allocationStrategy", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AllocationStrategy = types.FleetOnDemandAllocationStrategy(xtv)
+ }
+
+ case strings.EqualFold("capacityReservationOptions", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentCapacityReservationOptions(&sv.CapacityReservationOptions, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("maxTotalPrice", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.MaxTotalPrice = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("minTargetCapacity", 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.MinTargetCapacity = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("singleAvailabilityZone", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.SingleAvailabilityZone = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("singleInstanceType", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.SingleInstanceType = ptr.Bool(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 awsEc2query_deserializeDocumentPathComponent(v **types.PathComponent, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.PathComponent
+ if *v == nil {
+ sv = &types.PathComponent{}
+ } 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("aclRule", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentAnalysisAclRule(&sv.AclRule, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("component", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentAnalysisComponent(&sv.Component, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("destinationVpc", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentAnalysisComponent(&sv.DestinationVpc, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("inboundHeader", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentAnalysisPacketHeader(&sv.InboundHeader, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("outboundHeader", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentAnalysisPacketHeader(&sv.OutboundHeader, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("routeTableRoute", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentAnalysisRouteTableRoute(&sv.RouteTableRoute, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("securityGroupRule", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentAnalysisSecurityGroupRule(&sv.SecurityGroupRule, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("sequenceNumber", 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.SequenceNumber = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("sourceVpc", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentAnalysisComponent(&sv.SourceVpc, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("subnet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentAnalysisComponent(&sv.Subnet, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("vpc", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentAnalysisComponent(&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
+}
+
+func awsEc2query_deserializeDocumentPathComponentList(v *[]types.PathComponent, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.PathComponent
+ if *v == nil {
+ sv = make([]types.PathComponent, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.PathComponent
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentPathComponent(&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 awsEc2query_deserializeDocumentPathComponentListUnwrapped(v *[]types.PathComponent, decoder smithyxml.NodeDecoder) error {
+ var sv []types.PathComponent
+ if *v == nil {
+ sv = make([]types.PathComponent, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.PathComponent
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentPathComponent(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentPciId(v **types.PciId, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.PciId
+ if *v == nil {
+ sv = &types.PciId{}
+ } 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("DeviceId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.DeviceId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("SubsystemId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.SubsystemId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("SubsystemVendorId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.SubsystemVendorId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("VendorId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.VendorId = 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 awsEc2query_deserializeDocumentPeeringAttachmentStatus(v **types.PeeringAttachmentStatus, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.PeeringAttachmentStatus
+ if *v == nil {
+ sv = &types.PeeringAttachmentStatus{}
+ } 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("code", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Code = 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)
+ }
+
+ 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 awsEc2query_deserializeDocumentPeeringConnectionOptions(v **types.PeeringConnectionOptions, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.PeeringConnectionOptions
+ if *v == nil {
+ sv = &types.PeeringConnectionOptions{}
+ } 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("allowDnsResolutionFromRemoteVpc", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.AllowDnsResolutionFromRemoteVpc = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("allowEgressFromLocalClassicLinkToRemoteVpc", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.AllowEgressFromLocalClassicLinkToRemoteVpc = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("allowEgressFromLocalVpcToRemoteClassicLink", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.AllowEgressFromLocalVpcToRemoteClassicLink = ptr.Bool(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 awsEc2query_deserializeDocumentPeeringTgwInfo(v **types.PeeringTgwInfo, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.PeeringTgwInfo
+ if *v == nil {
+ sv = &types.PeeringTgwInfo{}
+ } 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("ownerId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.OwnerId = 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 = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("transitGatewayId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.TransitGatewayId = 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 awsEc2query_deserializeDocumentPhase1DHGroupNumbersList(v *[]types.Phase1DHGroupNumbersListValue, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.Phase1DHGroupNumbersListValue
+ if *v == nil {
+ sv = make([]types.Phase1DHGroupNumbersListValue, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.Phase1DHGroupNumbersListValue
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentPhase1DHGroupNumbersListValue(&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 awsEc2query_deserializeDocumentPhase1DHGroupNumbersListUnwrapped(v *[]types.Phase1DHGroupNumbersListValue, decoder smithyxml.NodeDecoder) error {
+ var sv []types.Phase1DHGroupNumbersListValue
+ if *v == nil {
+ sv = make([]types.Phase1DHGroupNumbersListValue, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.Phase1DHGroupNumbersListValue
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentPhase1DHGroupNumbersListValue(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentPhase1DHGroupNumbersListValue(v **types.Phase1DHGroupNumbersListValue, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.Phase1DHGroupNumbersListValue
+ if *v == nil {
+ sv = &types.Phase1DHGroupNumbersListValue{}
+ } 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)
+ i64, err := strconv.ParseInt(xtv, 10, 64)
+ if err != nil {
+ return err
+ }
+ sv.Value = 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 awsEc2query_deserializeDocumentPhase1EncryptionAlgorithmsList(v *[]types.Phase1EncryptionAlgorithmsListValue, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.Phase1EncryptionAlgorithmsListValue
+ if *v == nil {
+ sv = make([]types.Phase1EncryptionAlgorithmsListValue, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.Phase1EncryptionAlgorithmsListValue
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentPhase1EncryptionAlgorithmsListValue(&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 awsEc2query_deserializeDocumentPhase1EncryptionAlgorithmsListUnwrapped(v *[]types.Phase1EncryptionAlgorithmsListValue, decoder smithyxml.NodeDecoder) error {
+ var sv []types.Phase1EncryptionAlgorithmsListValue
+ if *v == nil {
+ sv = make([]types.Phase1EncryptionAlgorithmsListValue, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.Phase1EncryptionAlgorithmsListValue
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentPhase1EncryptionAlgorithmsListValue(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentPhase1EncryptionAlgorithmsListValue(v **types.Phase1EncryptionAlgorithmsListValue, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.Phase1EncryptionAlgorithmsListValue
+ if *v == nil {
+ sv = &types.Phase1EncryptionAlgorithmsListValue{}
+ } 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 awsEc2query_deserializeDocumentPhase1IntegrityAlgorithmsList(v *[]types.Phase1IntegrityAlgorithmsListValue, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.Phase1IntegrityAlgorithmsListValue
+ if *v == nil {
+ sv = make([]types.Phase1IntegrityAlgorithmsListValue, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.Phase1IntegrityAlgorithmsListValue
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentPhase1IntegrityAlgorithmsListValue(&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 awsEc2query_deserializeDocumentPhase1IntegrityAlgorithmsListUnwrapped(v *[]types.Phase1IntegrityAlgorithmsListValue, decoder smithyxml.NodeDecoder) error {
+ var sv []types.Phase1IntegrityAlgorithmsListValue
+ if *v == nil {
+ sv = make([]types.Phase1IntegrityAlgorithmsListValue, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.Phase1IntegrityAlgorithmsListValue
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentPhase1IntegrityAlgorithmsListValue(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentPhase1IntegrityAlgorithmsListValue(v **types.Phase1IntegrityAlgorithmsListValue, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.Phase1IntegrityAlgorithmsListValue
+ if *v == nil {
+ sv = &types.Phase1IntegrityAlgorithmsListValue{}
+ } 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 awsEc2query_deserializeDocumentPhase2DHGroupNumbersList(v *[]types.Phase2DHGroupNumbersListValue, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.Phase2DHGroupNumbersListValue
+ if *v == nil {
+ sv = make([]types.Phase2DHGroupNumbersListValue, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.Phase2DHGroupNumbersListValue
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentPhase2DHGroupNumbersListValue(&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 awsEc2query_deserializeDocumentPhase2DHGroupNumbersListUnwrapped(v *[]types.Phase2DHGroupNumbersListValue, decoder smithyxml.NodeDecoder) error {
+ var sv []types.Phase2DHGroupNumbersListValue
+ if *v == nil {
+ sv = make([]types.Phase2DHGroupNumbersListValue, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.Phase2DHGroupNumbersListValue
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentPhase2DHGroupNumbersListValue(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentPhase2DHGroupNumbersListValue(v **types.Phase2DHGroupNumbersListValue, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.Phase2DHGroupNumbersListValue
+ if *v == nil {
+ sv = &types.Phase2DHGroupNumbersListValue{}
+ } 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)
+ i64, err := strconv.ParseInt(xtv, 10, 64)
+ if err != nil {
+ return err
+ }
+ sv.Value = 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 awsEc2query_deserializeDocumentPhase2EncryptionAlgorithmsList(v *[]types.Phase2EncryptionAlgorithmsListValue, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.Phase2EncryptionAlgorithmsListValue
+ if *v == nil {
+ sv = make([]types.Phase2EncryptionAlgorithmsListValue, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.Phase2EncryptionAlgorithmsListValue
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentPhase2EncryptionAlgorithmsListValue(&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 awsEc2query_deserializeDocumentPhase2EncryptionAlgorithmsListUnwrapped(v *[]types.Phase2EncryptionAlgorithmsListValue, decoder smithyxml.NodeDecoder) error {
+ var sv []types.Phase2EncryptionAlgorithmsListValue
+ if *v == nil {
+ sv = make([]types.Phase2EncryptionAlgorithmsListValue, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.Phase2EncryptionAlgorithmsListValue
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentPhase2EncryptionAlgorithmsListValue(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentPhase2EncryptionAlgorithmsListValue(v **types.Phase2EncryptionAlgorithmsListValue, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.Phase2EncryptionAlgorithmsListValue
+ if *v == nil {
+ sv = &types.Phase2EncryptionAlgorithmsListValue{}
+ } 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 awsEc2query_deserializeDocumentPhase2IntegrityAlgorithmsList(v *[]types.Phase2IntegrityAlgorithmsListValue, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.Phase2IntegrityAlgorithmsListValue
+ if *v == nil {
+ sv = make([]types.Phase2IntegrityAlgorithmsListValue, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.Phase2IntegrityAlgorithmsListValue
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentPhase2IntegrityAlgorithmsListValue(&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 awsEc2query_deserializeDocumentPhase2IntegrityAlgorithmsListUnwrapped(v *[]types.Phase2IntegrityAlgorithmsListValue, decoder smithyxml.NodeDecoder) error {
+ var sv []types.Phase2IntegrityAlgorithmsListValue
+ if *v == nil {
+ sv = make([]types.Phase2IntegrityAlgorithmsListValue, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.Phase2IntegrityAlgorithmsListValue
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentPhase2IntegrityAlgorithmsListValue(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentPhase2IntegrityAlgorithmsListValue(v **types.Phase2IntegrityAlgorithmsListValue, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.Phase2IntegrityAlgorithmsListValue
+ if *v == nil {
+ sv = &types.Phase2IntegrityAlgorithmsListValue{}
+ } 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 awsEc2query_deserializeDocumentPlacement(v **types.Placement, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.Placement
+ if *v == nil {
+ sv = &types.Placement{}
+ } 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("affinity", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Affinity = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("availabilityZone", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AvailabilityZone = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("groupName", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.GroupName = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("hostId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.HostId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("hostResourceGroupArn", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.HostResourceGroupArn = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("partitionNumber", 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.PartitionNumber = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("spreadDomain", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.SpreadDomain = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("tenancy", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Tenancy = types.Tenancy(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 awsEc2query_deserializeDocumentPlacementGroup(v **types.PlacementGroup, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.PlacementGroup
+ if *v == nil {
+ sv = &types.PlacementGroup{}
+ } 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("groupId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.GroupId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("groupName", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.GroupName = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("partitionCount", 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.PartitionCount = ptr.Int32(int32(i64))
+ }
+
+ 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 = types.PlacementGroupState(xtv)
+ }
+
+ case strings.EqualFold("strategy", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Strategy = types.PlacementStrategy(xtv)
+ }
+
+ case strings.EqualFold("tagSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_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 awsEc2query_deserializeDocumentPlacementGroupInfo(v **types.PlacementGroupInfo, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.PlacementGroupInfo
+ if *v == nil {
+ sv = &types.PlacementGroupInfo{}
+ } 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("supportedStrategies", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentPlacementGroupStrategyList(&sv.SupportedStrategies, 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 awsEc2query_deserializeDocumentPlacementGroupList(v *[]types.PlacementGroup, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.PlacementGroup
+ if *v == nil {
+ sv = make([]types.PlacementGroup, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.PlacementGroup
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentPlacementGroup(&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 awsEc2query_deserializeDocumentPlacementGroupListUnwrapped(v *[]types.PlacementGroup, decoder smithyxml.NodeDecoder) error {
+ var sv []types.PlacementGroup
+ if *v == nil {
+ sv = make([]types.PlacementGroup, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.PlacementGroup
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentPlacementGroup(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentPlacementGroupStrategyList(v *[]types.PlacementGroupStrategy, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.PlacementGroupStrategy
+ if *v == nil {
+ sv = make([]types.PlacementGroupStrategy, 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("item", t.Name.Local):
+ var col types.PlacementGroupStrategy
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ col = types.PlacementGroupStrategy(xtv)
+ }
+ sv = append(sv, col)
+
+ default:
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsEc2query_deserializeDocumentPlacementGroupStrategyListUnwrapped(v *[]types.PlacementGroupStrategy, decoder smithyxml.NodeDecoder) error {
+ var sv []types.PlacementGroupStrategy
+ if *v == nil {
+ sv = make([]types.PlacementGroupStrategy, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.PlacementGroupStrategy
+ t := decoder.StartEl
+ _ = t
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ mv = types.PlacementGroupStrategy(xtv)
+ }
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentPlacementResponse(v **types.PlacementResponse, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.PlacementResponse
+ if *v == nil {
+ sv = &types.PlacementResponse{}
+ } 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("groupName", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.GroupName = 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 awsEc2query_deserializeDocumentPoolCidrBlock(v **types.PoolCidrBlock, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.PoolCidrBlock
+ if *v == nil {
+ sv = &types.PoolCidrBlock{}
+ } 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("poolCidrBlock", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Cidr = 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 awsEc2query_deserializeDocumentPoolCidrBlocksSet(v *[]types.PoolCidrBlock, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.PoolCidrBlock
+ if *v == nil {
+ sv = make([]types.PoolCidrBlock, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.PoolCidrBlock
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentPoolCidrBlock(&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 awsEc2query_deserializeDocumentPoolCidrBlocksSetUnwrapped(v *[]types.PoolCidrBlock, decoder smithyxml.NodeDecoder) error {
+ var sv []types.PoolCidrBlock
+ if *v == nil {
+ sv = make([]types.PoolCidrBlock, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.PoolCidrBlock
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentPoolCidrBlock(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentPortRange(v **types.PortRange, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.PortRange
+ if *v == nil {
+ sv = &types.PortRange{}
+ } 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("from", 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.From = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("to", 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.To = 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 awsEc2query_deserializeDocumentPortRangeList(v *[]types.PortRange, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.PortRange
+ if *v == nil {
+ sv = make([]types.PortRange, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.PortRange
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentPortRange(&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 awsEc2query_deserializeDocumentPortRangeListUnwrapped(v *[]types.PortRange, decoder smithyxml.NodeDecoder) error {
+ var sv []types.PortRange
+ if *v == nil {
+ sv = make([]types.PortRange, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.PortRange
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentPortRange(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentPrefixList(v **types.PrefixList, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.PrefixList
+ if *v == nil {
+ sv = &types.PrefixList{}
+ } 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("cidrSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentValueStringList(&sv.Cidrs, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("prefixListId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.PrefixListId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("prefixListName", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.PrefixListName = 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 awsEc2query_deserializeDocumentPrefixListAssociation(v **types.PrefixListAssociation, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.PrefixListAssociation
+ if *v == nil {
+ sv = &types.PrefixListAssociation{}
+ } 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("resourceOwner", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ResourceOwner = 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 awsEc2query_deserializeDocumentPrefixListAssociationSet(v *[]types.PrefixListAssociation, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.PrefixListAssociation
+ if *v == nil {
+ sv = make([]types.PrefixListAssociation, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.PrefixListAssociation
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentPrefixListAssociation(&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 awsEc2query_deserializeDocumentPrefixListAssociationSetUnwrapped(v *[]types.PrefixListAssociation, decoder smithyxml.NodeDecoder) error {
+ var sv []types.PrefixListAssociation
+ if *v == nil {
+ sv = make([]types.PrefixListAssociation, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.PrefixListAssociation
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentPrefixListAssociation(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentPrefixListEntry(v **types.PrefixListEntry, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.PrefixListEntry
+ if *v == nil {
+ sv = &types.PrefixListEntry{}
+ } 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("cidr", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Cidr = ptr.String(xtv)
+ }
+
+ 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)
+ }
+
+ 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 awsEc2query_deserializeDocumentPrefixListEntrySet(v *[]types.PrefixListEntry, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.PrefixListEntry
+ if *v == nil {
+ sv = make([]types.PrefixListEntry, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.PrefixListEntry
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentPrefixListEntry(&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 awsEc2query_deserializeDocumentPrefixListEntrySetUnwrapped(v *[]types.PrefixListEntry, decoder smithyxml.NodeDecoder) error {
+ var sv []types.PrefixListEntry
+ if *v == nil {
+ sv = make([]types.PrefixListEntry, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.PrefixListEntry
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentPrefixListEntry(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentPrefixListId(v **types.PrefixListId, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.PrefixListId
+ if *v == nil {
+ sv = &types.PrefixListId{}
+ } 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("prefixListId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.PrefixListId = 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 awsEc2query_deserializeDocumentPrefixListIdList(v *[]types.PrefixListId, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.PrefixListId
+ if *v == nil {
+ sv = make([]types.PrefixListId, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.PrefixListId
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentPrefixListId(&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 awsEc2query_deserializeDocumentPrefixListIdListUnwrapped(v *[]types.PrefixListId, decoder smithyxml.NodeDecoder) error {
+ var sv []types.PrefixListId
+ if *v == nil {
+ sv = make([]types.PrefixListId, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.PrefixListId
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentPrefixListId(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentPrefixListIdSet(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("item", 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 awsEc2query_deserializeDocumentPrefixListIdSetUnwrapped(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 awsEc2query_deserializeDocumentPrefixListSet(v *[]types.PrefixList, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.PrefixList
+ if *v == nil {
+ sv = make([]types.PrefixList, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.PrefixList
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentPrefixList(&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 awsEc2query_deserializeDocumentPrefixListSetUnwrapped(v *[]types.PrefixList, decoder smithyxml.NodeDecoder) error {
+ var sv []types.PrefixList
+ if *v == nil {
+ sv = make([]types.PrefixList, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.PrefixList
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentPrefixList(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentPriceSchedule(v **types.PriceSchedule, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.PriceSchedule
+ if *v == nil {
+ sv = &types.PriceSchedule{}
+ } 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("active", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.Active = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("currencyCode", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.CurrencyCode = types.CurrencyCodeValues(xtv)
+ }
+
+ case strings.EqualFold("price", 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.Price = ptr.Float64(f64)
+ }
+
+ case strings.EqualFold("term", 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.Term = 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 awsEc2query_deserializeDocumentPriceScheduleList(v *[]types.PriceSchedule, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.PriceSchedule
+ if *v == nil {
+ sv = make([]types.PriceSchedule, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.PriceSchedule
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentPriceSchedule(&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 awsEc2query_deserializeDocumentPriceScheduleListUnwrapped(v *[]types.PriceSchedule, decoder smithyxml.NodeDecoder) error {
+ var sv []types.PriceSchedule
+ if *v == nil {
+ sv = make([]types.PriceSchedule, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.PriceSchedule
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentPriceSchedule(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentPricingDetail(v **types.PricingDetail, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.PricingDetail
+ if *v == nil {
+ sv = &types.PricingDetail{}
+ } 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 = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("price", 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.Price = 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 awsEc2query_deserializeDocumentPricingDetailsList(v *[]types.PricingDetail, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.PricingDetail
+ if *v == nil {
+ sv = make([]types.PricingDetail, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.PricingDetail
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentPricingDetail(&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 awsEc2query_deserializeDocumentPricingDetailsListUnwrapped(v *[]types.PricingDetail, decoder smithyxml.NodeDecoder) error {
+ var sv []types.PricingDetail
+ if *v == nil {
+ sv = make([]types.PricingDetail, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.PricingDetail
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentPricingDetail(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentPrincipalIdFormat(v **types.PrincipalIdFormat, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.PrincipalIdFormat
+ if *v == nil {
+ sv = &types.PrincipalIdFormat{}
+ } 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("statusSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentIdFormatList(&sv.Statuses, 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 awsEc2query_deserializeDocumentPrincipalIdFormatList(v *[]types.PrincipalIdFormat, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.PrincipalIdFormat
+ if *v == nil {
+ sv = make([]types.PrincipalIdFormat, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.PrincipalIdFormat
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentPrincipalIdFormat(&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 awsEc2query_deserializeDocumentPrincipalIdFormatListUnwrapped(v *[]types.PrincipalIdFormat, decoder smithyxml.NodeDecoder) error {
+ var sv []types.PrincipalIdFormat
+ if *v == nil {
+ sv = make([]types.PrincipalIdFormat, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.PrincipalIdFormat
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentPrincipalIdFormat(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentPrivateDnsDetails(v **types.PrivateDnsDetails, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.PrivateDnsDetails
+ if *v == nil {
+ sv = &types.PrivateDnsDetails{}
+ } 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("privateDnsName", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.PrivateDnsName = 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 awsEc2query_deserializeDocumentPrivateDnsDetailsSet(v *[]types.PrivateDnsDetails, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.PrivateDnsDetails
+ if *v == nil {
+ sv = make([]types.PrivateDnsDetails, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.PrivateDnsDetails
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentPrivateDnsDetails(&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 awsEc2query_deserializeDocumentPrivateDnsDetailsSetUnwrapped(v *[]types.PrivateDnsDetails, decoder smithyxml.NodeDecoder) error {
+ var sv []types.PrivateDnsDetails
+ if *v == nil {
+ sv = make([]types.PrivateDnsDetails, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.PrivateDnsDetails
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentPrivateDnsDetails(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentPrivateDnsNameConfiguration(v **types.PrivateDnsNameConfiguration, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.PrivateDnsNameConfiguration
+ if *v == nil {
+ sv = &types.PrivateDnsNameConfiguration{}
+ } 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("state", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.State = types.DnsNameState(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 = 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 awsEc2query_deserializeDocumentPrivateIpAddressSpecification(v **types.PrivateIpAddressSpecification, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.PrivateIpAddressSpecification
+ if *v == nil {
+ sv = &types.PrivateIpAddressSpecification{}
+ } 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("primary", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.Primary = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("privateIpAddress", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.PrivateIpAddress = 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 awsEc2query_deserializeDocumentPrivateIpAddressSpecificationList(v *[]types.PrivateIpAddressSpecification, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.PrivateIpAddressSpecification
+ if *v == nil {
+ sv = make([]types.PrivateIpAddressSpecification, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.PrivateIpAddressSpecification
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentPrivateIpAddressSpecification(&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 awsEc2query_deserializeDocumentPrivateIpAddressSpecificationListUnwrapped(v *[]types.PrivateIpAddressSpecification, decoder smithyxml.NodeDecoder) error {
+ var sv []types.PrivateIpAddressSpecification
+ if *v == nil {
+ sv = make([]types.PrivateIpAddressSpecification, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.PrivateIpAddressSpecification
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentPrivateIpAddressSpecification(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentProcessorInfo(v **types.ProcessorInfo, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.ProcessorInfo
+ if *v == nil {
+ sv = &types.ProcessorInfo{}
+ } 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("supportedArchitectures", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentArchitectureTypeList(&sv.SupportedArchitectures, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("sustainedClockSpeedInGhz", 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.SustainedClockSpeedInGhz = 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 awsEc2query_deserializeDocumentProductCode(v **types.ProductCode, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.ProductCode
+ if *v == nil {
+ sv = &types.ProductCode{}
+ } 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("productCode", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ProductCodeId = 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.ProductCodeType = types.ProductCodeValues(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 awsEc2query_deserializeDocumentProductCodeList(v *[]types.ProductCode, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.ProductCode
+ if *v == nil {
+ sv = make([]types.ProductCode, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.ProductCode
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentProductCode(&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 awsEc2query_deserializeDocumentProductCodeListUnwrapped(v *[]types.ProductCode, decoder smithyxml.NodeDecoder) error {
+ var sv []types.ProductCode
+ if *v == nil {
+ sv = make([]types.ProductCode, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.ProductCode
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentProductCode(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentPropagatingVgw(v **types.PropagatingVgw, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.PropagatingVgw
+ if *v == nil {
+ sv = &types.PropagatingVgw{}
+ } 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("gatewayId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.GatewayId = 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 awsEc2query_deserializeDocumentPropagatingVgwList(v *[]types.PropagatingVgw, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.PropagatingVgw
+ if *v == nil {
+ sv = make([]types.PropagatingVgw, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.PropagatingVgw
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentPropagatingVgw(&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 awsEc2query_deserializeDocumentPropagatingVgwListUnwrapped(v *[]types.PropagatingVgw, decoder smithyxml.NodeDecoder) error {
+ var sv []types.PropagatingVgw
+ if *v == nil {
+ sv = make([]types.PropagatingVgw, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.PropagatingVgw
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentPropagatingVgw(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentProvisionedBandwidth(v **types.ProvisionedBandwidth, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.ProvisionedBandwidth
+ if *v == nil {
+ sv = &types.ProvisionedBandwidth{}
+ } 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("provisioned", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Provisioned = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("provisionTime", 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.ProvisionTime = ptr.Time(t)
+ }
+
+ case strings.EqualFold("requested", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Requested = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("requestTime", 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.RequestTime = 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 awsEc2query_deserializeDocumentPtrUpdateStatus(v **types.PtrUpdateStatus, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.PtrUpdateStatus
+ if *v == nil {
+ sv = &types.PtrUpdateStatus{}
+ } 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("reason", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Reason = 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 = 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 awsEc2query_deserializeDocumentPublicIpv4Pool(v **types.PublicIpv4Pool, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.PublicIpv4Pool
+ if *v == nil {
+ sv = &types.PublicIpv4Pool{}
+ } 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("networkBorderGroup", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.NetworkBorderGroup = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("poolAddressRangeSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentPublicIpv4PoolRangeSet(&sv.PoolAddressRanges, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("poolId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.PoolId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("tagSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("totalAddressCount", 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.TotalAddressCount = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("totalAvailableAddressCount", 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.TotalAvailableAddressCount = 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 awsEc2query_deserializeDocumentPublicIpv4PoolRange(v **types.PublicIpv4PoolRange, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.PublicIpv4PoolRange
+ if *v == nil {
+ sv = &types.PublicIpv4PoolRange{}
+ } 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("addressCount", 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.AddressCount = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("availableAddressCount", 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.AvailableAddressCount = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("firstAddress", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.FirstAddress = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("lastAddress", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.LastAddress = 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 awsEc2query_deserializeDocumentPublicIpv4PoolRangeSet(v *[]types.PublicIpv4PoolRange, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.PublicIpv4PoolRange
+ if *v == nil {
+ sv = make([]types.PublicIpv4PoolRange, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.PublicIpv4PoolRange
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentPublicIpv4PoolRange(&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 awsEc2query_deserializeDocumentPublicIpv4PoolRangeSetUnwrapped(v *[]types.PublicIpv4PoolRange, decoder smithyxml.NodeDecoder) error {
+ var sv []types.PublicIpv4PoolRange
+ if *v == nil {
+ sv = make([]types.PublicIpv4PoolRange, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.PublicIpv4PoolRange
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentPublicIpv4PoolRange(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentPublicIpv4PoolSet(v *[]types.PublicIpv4Pool, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.PublicIpv4Pool
+ if *v == nil {
+ sv = make([]types.PublicIpv4Pool, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.PublicIpv4Pool
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentPublicIpv4Pool(&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 awsEc2query_deserializeDocumentPublicIpv4PoolSetUnwrapped(v *[]types.PublicIpv4Pool, decoder smithyxml.NodeDecoder) error {
+ var sv []types.PublicIpv4Pool
+ if *v == nil {
+ sv = make([]types.PublicIpv4Pool, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.PublicIpv4Pool
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentPublicIpv4Pool(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentPurchase(v **types.Purchase, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.Purchase
+ if *v == nil {
+ sv = &types.Purchase{}
+ } 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("currencyCode", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.CurrencyCode = types.CurrencyCodeValues(xtv)
+ }
+
+ case strings.EqualFold("duration", 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.Duration = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("hostIdSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentResponseHostIdSet(&sv.HostIdSet, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("hostReservationId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.HostReservationId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("hourlyPrice", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.HourlyPrice = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("instanceFamily", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.InstanceFamily = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("paymentOption", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.PaymentOption = types.PaymentOption(xtv)
+ }
+
+ case strings.EqualFold("upfrontPrice", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.UpfrontPrice = 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 awsEc2query_deserializeDocumentPurchasedScheduledInstanceSet(v *[]types.ScheduledInstance, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.ScheduledInstance
+ if *v == nil {
+ sv = make([]types.ScheduledInstance, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.ScheduledInstance
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentScheduledInstance(&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 awsEc2query_deserializeDocumentPurchasedScheduledInstanceSetUnwrapped(v *[]types.ScheduledInstance, decoder smithyxml.NodeDecoder) error {
+ var sv []types.ScheduledInstance
+ if *v == nil {
+ sv = make([]types.ScheduledInstance, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.ScheduledInstance
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentScheduledInstance(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentPurchaseSet(v *[]types.Purchase, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.Purchase
+ if *v == nil {
+ sv = make([]types.Purchase, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.Purchase
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentPurchase(&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 awsEc2query_deserializeDocumentPurchaseSetUnwrapped(v *[]types.Purchase, decoder smithyxml.NodeDecoder) error {
+ var sv []types.Purchase
+ if *v == nil {
+ sv = make([]types.Purchase, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.Purchase
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentPurchase(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentRecurringCharge(v **types.RecurringCharge, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.RecurringCharge
+ if *v == nil {
+ sv = &types.RecurringCharge{}
+ } 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("amount", 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.Amount = ptr.Float64(f64)
+ }
+
+ case strings.EqualFold("frequency", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Frequency = types.RecurringChargeFrequency(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 awsEc2query_deserializeDocumentRecurringChargesList(v *[]types.RecurringCharge, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.RecurringCharge
+ if *v == nil {
+ sv = make([]types.RecurringCharge, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.RecurringCharge
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentRecurringCharge(&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 awsEc2query_deserializeDocumentRecurringChargesListUnwrapped(v *[]types.RecurringCharge, decoder smithyxml.NodeDecoder) error {
+ var sv []types.RecurringCharge
+ if *v == nil {
+ sv = make([]types.RecurringCharge, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.RecurringCharge
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentRecurringCharge(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentReferencedSecurityGroup(v **types.ReferencedSecurityGroup, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.ReferencedSecurityGroup
+ if *v == nil {
+ sv = &types.ReferencedSecurityGroup{}
+ } 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("groupId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.GroupId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("peeringStatus", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.PeeringStatus = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("userId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.UserId = ptr.String(xtv)
+ }
+
+ 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("vpcPeeringConnectionId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.VpcPeeringConnectionId = 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 awsEc2query_deserializeDocumentRegion(v **types.Region, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.Region
+ if *v == nil {
+ sv = &types.Region{}
+ } 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("regionEndpoint", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Endpoint = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("optInStatus", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.OptInStatus = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("regionName", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.RegionName = 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 awsEc2query_deserializeDocumentRegionList(v *[]types.Region, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.Region
+ if *v == nil {
+ sv = make([]types.Region, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.Region
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentRegion(&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 awsEc2query_deserializeDocumentRegionListUnwrapped(v *[]types.Region, decoder smithyxml.NodeDecoder) error {
+ var sv []types.Region
+ if *v == nil {
+ sv = make([]types.Region, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.Region
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentRegion(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentReplaceRootVolumeTask(v **types.ReplaceRootVolumeTask, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.ReplaceRootVolumeTask
+ if *v == nil {
+ sv = &types.ReplaceRootVolumeTask{}
+ } 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("completeTime", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.CompleteTime = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("instanceId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.InstanceId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("replaceRootVolumeTaskId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ReplaceRootVolumeTaskId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("startTime", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.StartTime = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("tagSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("taskState", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.TaskState = types.ReplaceRootVolumeTaskState(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 awsEc2query_deserializeDocumentReplaceRootVolumeTasks(v *[]types.ReplaceRootVolumeTask, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.ReplaceRootVolumeTask
+ if *v == nil {
+ sv = make([]types.ReplaceRootVolumeTask, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.ReplaceRootVolumeTask
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentReplaceRootVolumeTask(&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 awsEc2query_deserializeDocumentReplaceRootVolumeTasksUnwrapped(v *[]types.ReplaceRootVolumeTask, decoder smithyxml.NodeDecoder) error {
+ var sv []types.ReplaceRootVolumeTask
+ if *v == nil {
+ sv = make([]types.ReplaceRootVolumeTask, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.ReplaceRootVolumeTask
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentReplaceRootVolumeTask(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentReservation(v **types.Reservation, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.Reservation
+ if *v == nil {
+ sv = &types.Reservation{}
+ } 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("groupSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentGroupIdentifierList(&sv.Groups, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("instancesSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentInstanceList(&sv.Instances, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("ownerId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.OwnerId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("requesterId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.RequesterId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("reservationId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ReservationId = 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 awsEc2query_deserializeDocumentReservationList(v *[]types.Reservation, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.Reservation
+ if *v == nil {
+ sv = make([]types.Reservation, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.Reservation
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentReservation(&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 awsEc2query_deserializeDocumentReservationListUnwrapped(v *[]types.Reservation, decoder smithyxml.NodeDecoder) error {
+ var sv []types.Reservation
+ if *v == nil {
+ sv = make([]types.Reservation, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.Reservation
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentReservation(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentReservationValue(v **types.ReservationValue, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.ReservationValue
+ if *v == nil {
+ sv = &types.ReservationValue{}
+ } 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("hourlyPrice", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.HourlyPrice = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("remainingTotalValue", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.RemainingTotalValue = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("remainingUpfrontValue", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.RemainingUpfrontValue = 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 awsEc2query_deserializeDocumentReservedInstanceReservationValue(v **types.ReservedInstanceReservationValue, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.ReservedInstanceReservationValue
+ if *v == nil {
+ sv = &types.ReservedInstanceReservationValue{}
+ } 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("reservationValue", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentReservationValue(&sv.ReservationValue, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("reservedInstanceId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ReservedInstanceId = 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 awsEc2query_deserializeDocumentReservedInstanceReservationValueSet(v *[]types.ReservedInstanceReservationValue, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.ReservedInstanceReservationValue
+ if *v == nil {
+ sv = make([]types.ReservedInstanceReservationValue, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.ReservedInstanceReservationValue
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentReservedInstanceReservationValue(&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 awsEc2query_deserializeDocumentReservedInstanceReservationValueSetUnwrapped(v *[]types.ReservedInstanceReservationValue, decoder smithyxml.NodeDecoder) error {
+ var sv []types.ReservedInstanceReservationValue
+ if *v == nil {
+ sv = make([]types.ReservedInstanceReservationValue, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.ReservedInstanceReservationValue
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentReservedInstanceReservationValue(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentReservedInstances(v **types.ReservedInstances, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.ReservedInstances
+ if *v == nil {
+ sv = &types.ReservedInstances{}
+ } 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("availabilityZone", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AvailabilityZone = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("currencyCode", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.CurrencyCode = types.CurrencyCodeValues(xtv)
+ }
+
+ case strings.EqualFold("duration", 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.Duration = ptr.Int64(i64)
+ }
+
+ case strings.EqualFold("end", 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.End = ptr.Time(t)
+ }
+
+ case strings.EqualFold("fixedPrice", 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.FixedPrice = ptr.Float32(float32(f64))
+ }
+
+ case strings.EqualFold("instanceCount", 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.InstanceCount = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("instanceTenancy", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.InstanceTenancy = types.Tenancy(xtv)
+ }
+
+ case strings.EqualFold("instanceType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.InstanceType = types.InstanceType(xtv)
+ }
+
+ case strings.EqualFold("offeringClass", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.OfferingClass = types.OfferingClassType(xtv)
+ }
+
+ case strings.EqualFold("offeringType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.OfferingType = types.OfferingTypeValues(xtv)
+ }
+
+ case strings.EqualFold("productDescription", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ProductDescription = types.RIProductDescription(xtv)
+ }
+
+ case strings.EqualFold("recurringCharges", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentRecurringChargesList(&sv.RecurringCharges, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("reservedInstancesId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ReservedInstancesId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("scope", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Scope = types.Scope(xtv)
+ }
+
+ case strings.EqualFold("start", 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.Start = ptr.Time(t)
+ }
+
+ 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 = types.ReservedInstanceState(xtv)
+ }
+
+ case strings.EqualFold("tagSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("usagePrice", 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.UsagePrice = ptr.Float32(float32(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 awsEc2query_deserializeDocumentReservedInstancesConfiguration(v **types.ReservedInstancesConfiguration, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.ReservedInstancesConfiguration
+ if *v == nil {
+ sv = &types.ReservedInstancesConfiguration{}
+ } 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("availabilityZone", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AvailabilityZone = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("instanceCount", 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.InstanceCount = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("instanceType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.InstanceType = types.InstanceType(xtv)
+ }
+
+ case strings.EqualFold("platform", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Platform = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("scope", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Scope = types.Scope(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 awsEc2query_deserializeDocumentReservedInstancesId(v **types.ReservedInstancesId, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.ReservedInstancesId
+ if *v == nil {
+ sv = &types.ReservedInstancesId{}
+ } 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("reservedInstancesId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ReservedInstancesId = 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 awsEc2query_deserializeDocumentReservedInstancesList(v *[]types.ReservedInstances, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.ReservedInstances
+ if *v == nil {
+ sv = make([]types.ReservedInstances, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.ReservedInstances
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentReservedInstances(&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 awsEc2query_deserializeDocumentReservedInstancesListUnwrapped(v *[]types.ReservedInstances, decoder smithyxml.NodeDecoder) error {
+ var sv []types.ReservedInstances
+ if *v == nil {
+ sv = make([]types.ReservedInstances, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.ReservedInstances
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentReservedInstances(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentReservedInstancesListing(v **types.ReservedInstancesListing, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.ReservedInstancesListing
+ if *v == nil {
+ sv = &types.ReservedInstancesListing{}
+ } 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("clientToken", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ClientToken = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("createDate", 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.CreateDate = ptr.Time(t)
+ }
+
+ case strings.EqualFold("instanceCounts", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentInstanceCountList(&sv.InstanceCounts, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("priceSchedules", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentPriceScheduleList(&sv.PriceSchedules, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("reservedInstancesId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ReservedInstancesId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("reservedInstancesListingId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ReservedInstancesListingId = 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.ListingStatus(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)
+ }
+
+ case strings.EqualFold("tagSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("updateDate", 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.UpdateDate = 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 awsEc2query_deserializeDocumentReservedInstancesListingList(v *[]types.ReservedInstancesListing, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.ReservedInstancesListing
+ if *v == nil {
+ sv = make([]types.ReservedInstancesListing, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.ReservedInstancesListing
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentReservedInstancesListing(&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 awsEc2query_deserializeDocumentReservedInstancesListingListUnwrapped(v *[]types.ReservedInstancesListing, decoder smithyxml.NodeDecoder) error {
+ var sv []types.ReservedInstancesListing
+ if *v == nil {
+ sv = make([]types.ReservedInstancesListing, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.ReservedInstancesListing
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentReservedInstancesListing(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentReservedInstancesModification(v **types.ReservedInstancesModification, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.ReservedInstancesModification
+ if *v == nil {
+ sv = &types.ReservedInstancesModification{}
+ } 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("clientToken", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ClientToken = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("createDate", 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.CreateDate = ptr.Time(t)
+ }
+
+ case strings.EqualFold("effectiveDate", 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.EffectiveDate = ptr.Time(t)
+ }
+
+ case strings.EqualFold("modificationResultSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentReservedInstancesModificationResultList(&sv.ModificationResults, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("reservedInstancesSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentReservedIntancesIds(&sv.ReservedInstancesIds, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("reservedInstancesModificationId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ReservedInstancesModificationId = 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 = 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)
+ }
+
+ case strings.EqualFold("updateDate", 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.UpdateDate = 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 awsEc2query_deserializeDocumentReservedInstancesModificationList(v *[]types.ReservedInstancesModification, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.ReservedInstancesModification
+ if *v == nil {
+ sv = make([]types.ReservedInstancesModification, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.ReservedInstancesModification
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentReservedInstancesModification(&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 awsEc2query_deserializeDocumentReservedInstancesModificationListUnwrapped(v *[]types.ReservedInstancesModification, decoder smithyxml.NodeDecoder) error {
+ var sv []types.ReservedInstancesModification
+ if *v == nil {
+ sv = make([]types.ReservedInstancesModification, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.ReservedInstancesModification
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentReservedInstancesModification(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentReservedInstancesModificationResult(v **types.ReservedInstancesModificationResult, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.ReservedInstancesModificationResult
+ if *v == nil {
+ sv = &types.ReservedInstancesModificationResult{}
+ } 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("reservedInstancesId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ReservedInstancesId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("targetConfiguration", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentReservedInstancesConfiguration(&sv.TargetConfiguration, 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 awsEc2query_deserializeDocumentReservedInstancesModificationResultList(v *[]types.ReservedInstancesModificationResult, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.ReservedInstancesModificationResult
+ if *v == nil {
+ sv = make([]types.ReservedInstancesModificationResult, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.ReservedInstancesModificationResult
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentReservedInstancesModificationResult(&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 awsEc2query_deserializeDocumentReservedInstancesModificationResultListUnwrapped(v *[]types.ReservedInstancesModificationResult, decoder smithyxml.NodeDecoder) error {
+ var sv []types.ReservedInstancesModificationResult
+ if *v == nil {
+ sv = make([]types.ReservedInstancesModificationResult, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.ReservedInstancesModificationResult
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentReservedInstancesModificationResult(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentReservedInstancesOffering(v **types.ReservedInstancesOffering, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.ReservedInstancesOffering
+ if *v == nil {
+ sv = &types.ReservedInstancesOffering{}
+ } 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("availabilityZone", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AvailabilityZone = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("currencyCode", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.CurrencyCode = types.CurrencyCodeValues(xtv)
+ }
+
+ case strings.EqualFold("duration", 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.Duration = ptr.Int64(i64)
+ }
+
+ case strings.EqualFold("fixedPrice", 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.FixedPrice = ptr.Float32(float32(f64))
+ }
+
+ case strings.EqualFold("instanceTenancy", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.InstanceTenancy = types.Tenancy(xtv)
+ }
+
+ case strings.EqualFold("instanceType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.InstanceType = types.InstanceType(xtv)
+ }
+
+ case strings.EqualFold("marketplace", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.Marketplace = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("offeringClass", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.OfferingClass = types.OfferingClassType(xtv)
+ }
+
+ case strings.EqualFold("offeringType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.OfferingType = types.OfferingTypeValues(xtv)
+ }
+
+ case strings.EqualFold("pricingDetailsSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentPricingDetailsList(&sv.PricingDetails, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("productDescription", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ProductDescription = types.RIProductDescription(xtv)
+ }
+
+ case strings.EqualFold("recurringCharges", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentRecurringChargesList(&sv.RecurringCharges, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("reservedInstancesOfferingId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ReservedInstancesOfferingId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("scope", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Scope = types.Scope(xtv)
+ }
+
+ case strings.EqualFold("usagePrice", 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.UsagePrice = ptr.Float32(float32(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 awsEc2query_deserializeDocumentReservedInstancesOfferingList(v *[]types.ReservedInstancesOffering, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.ReservedInstancesOffering
+ if *v == nil {
+ sv = make([]types.ReservedInstancesOffering, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.ReservedInstancesOffering
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentReservedInstancesOffering(&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 awsEc2query_deserializeDocumentReservedInstancesOfferingListUnwrapped(v *[]types.ReservedInstancesOffering, decoder smithyxml.NodeDecoder) error {
+ var sv []types.ReservedInstancesOffering
+ if *v == nil {
+ sv = make([]types.ReservedInstancesOffering, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.ReservedInstancesOffering
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentReservedInstancesOffering(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentReservedIntancesIds(v *[]types.ReservedInstancesId, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.ReservedInstancesId
+ if *v == nil {
+ sv = make([]types.ReservedInstancesId, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.ReservedInstancesId
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentReservedInstancesId(&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 awsEc2query_deserializeDocumentReservedIntancesIdsUnwrapped(v *[]types.ReservedInstancesId, decoder smithyxml.NodeDecoder) error {
+ var sv []types.ReservedInstancesId
+ if *v == nil {
+ sv = make([]types.ReservedInstancesId, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.ReservedInstancesId
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentReservedInstancesId(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentResponseError(v **types.ResponseError, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.ResponseError
+ if *v == nil {
+ sv = &types.ResponseError{}
+ } 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("code", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Code = types.LaunchTemplateErrorCode(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)
+ }
+
+ 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 awsEc2query_deserializeDocumentResponseHostIdList(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("item", 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 awsEc2query_deserializeDocumentResponseHostIdListUnwrapped(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 awsEc2query_deserializeDocumentResponseHostIdSet(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("item", 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 awsEc2query_deserializeDocumentResponseHostIdSetUnwrapped(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 awsEc2query_deserializeDocumentResponseLaunchTemplateData(v **types.ResponseLaunchTemplateData, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.ResponseLaunchTemplateData
+ if *v == nil {
+ sv = &types.ResponseLaunchTemplateData{}
+ } 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("blockDeviceMappingSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentLaunchTemplateBlockDeviceMappingList(&sv.BlockDeviceMappings, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("capacityReservationSpecification", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentLaunchTemplateCapacityReservationSpecificationResponse(&sv.CapacityReservationSpecification, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("cpuOptions", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentLaunchTemplateCpuOptions(&sv.CpuOptions, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("creditSpecification", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentCreditSpecification(&sv.CreditSpecification, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("disableApiTermination", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.DisableApiTermination = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("ebsOptimized", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.EbsOptimized = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("elasticGpuSpecificationSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentElasticGpuSpecificationResponseList(&sv.ElasticGpuSpecifications, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("elasticInferenceAcceleratorSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentLaunchTemplateElasticInferenceAcceleratorResponseList(&sv.ElasticInferenceAccelerators, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("enclaveOptions", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentLaunchTemplateEnclaveOptions(&sv.EnclaveOptions, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("hibernationOptions", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentLaunchTemplateHibernationOptions(&sv.HibernationOptions, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("iamInstanceProfile", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentLaunchTemplateIamInstanceProfileSpecification(&sv.IamInstanceProfile, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("imageId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ImageId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("instanceInitiatedShutdownBehavior", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.InstanceInitiatedShutdownBehavior = types.ShutdownBehavior(xtv)
+ }
+
+ case strings.EqualFold("instanceMarketOptions", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentLaunchTemplateInstanceMarketOptions(&sv.InstanceMarketOptions, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("instanceType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.InstanceType = types.InstanceType(xtv)
+ }
+
+ case strings.EqualFold("kernelId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.KernelId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("keyName", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.KeyName = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("licenseSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentLaunchTemplateLicenseList(&sv.LicenseSpecifications, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("metadataOptions", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentLaunchTemplateInstanceMetadataOptions(&sv.MetadataOptions, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("monitoring", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentLaunchTemplatesMonitoring(&sv.Monitoring, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("networkInterfaceSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentLaunchTemplateInstanceNetworkInterfaceSpecificationList(&sv.NetworkInterfaces, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("placement", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentLaunchTemplatePlacement(&sv.Placement, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("ramDiskId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.RamDiskId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("securityGroupIdSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentValueStringList(&sv.SecurityGroupIds, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("securityGroupSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentValueStringList(&sv.SecurityGroups, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("tagSpecificationSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentLaunchTemplateTagSpecificationList(&sv.TagSpecifications, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("userData", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.UserData = 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 awsEc2query_deserializeDocumentRootDeviceTypeList(v *[]types.RootDeviceType, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.RootDeviceType
+ if *v == nil {
+ sv = make([]types.RootDeviceType, 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("item", t.Name.Local):
+ var col types.RootDeviceType
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ col = types.RootDeviceType(xtv)
+ }
+ sv = append(sv, col)
+
+ default:
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsEc2query_deserializeDocumentRootDeviceTypeListUnwrapped(v *[]types.RootDeviceType, decoder smithyxml.NodeDecoder) error {
+ var sv []types.RootDeviceType
+ if *v == nil {
+ sv = make([]types.RootDeviceType, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.RootDeviceType
+ t := decoder.StartEl
+ _ = t
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ mv = types.RootDeviceType(xtv)
+ }
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentRoute(v **types.Route, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.Route
+ if *v == nil {
+ sv = &types.Route{}
+ } 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("carrierGatewayId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.CarrierGatewayId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("destinationCidrBlock", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.DestinationCidrBlock = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("destinationIpv6CidrBlock", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.DestinationIpv6CidrBlock = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("destinationPrefixListId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.DestinationPrefixListId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("egressOnlyInternetGatewayId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.EgressOnlyInternetGatewayId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("gatewayId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.GatewayId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("instanceId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.InstanceId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("instanceOwnerId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.InstanceOwnerId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("localGatewayId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.LocalGatewayId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("natGatewayId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.NatGatewayId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("networkInterfaceId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.NetworkInterfaceId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("origin", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Origin = types.RouteOrigin(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 = types.RouteState(xtv)
+ }
+
+ case strings.EqualFold("transitGatewayId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.TransitGatewayId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("vpcPeeringConnectionId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.VpcPeeringConnectionId = 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 awsEc2query_deserializeDocumentRouteList(v *[]types.Route, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.Route
+ if *v == nil {
+ sv = make([]types.Route, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.Route
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentRoute(&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 awsEc2query_deserializeDocumentRouteListUnwrapped(v *[]types.Route, decoder smithyxml.NodeDecoder) error {
+ var sv []types.Route
+ if *v == nil {
+ sv = make([]types.Route, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.Route
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentRoute(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentRouteTable(v **types.RouteTable, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.RouteTable
+ if *v == nil {
+ sv = &types.RouteTable{}
+ } 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("associationSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentRouteTableAssociationList(&sv.Associations, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("ownerId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.OwnerId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("propagatingVgwSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentPropagatingVgwList(&sv.PropagatingVgws, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("routeSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentRouteList(&sv.Routes, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("routeTableId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.RouteTableId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("tagSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil {
+ return err
+ }
+
+ 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)
+ }
+
+ 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 awsEc2query_deserializeDocumentRouteTableAssociation(v **types.RouteTableAssociation, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.RouteTableAssociation
+ if *v == nil {
+ sv = &types.RouteTableAssociation{}
+ } 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("associationState", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentRouteTableAssociationState(&sv.AssociationState, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("gatewayId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.GatewayId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("main", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.Main = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("routeTableAssociationId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.RouteTableAssociationId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("routeTableId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.RouteTableId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("subnetId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.SubnetId = 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 awsEc2query_deserializeDocumentRouteTableAssociationList(v *[]types.RouteTableAssociation, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.RouteTableAssociation
+ if *v == nil {
+ sv = make([]types.RouteTableAssociation, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.RouteTableAssociation
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentRouteTableAssociation(&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 awsEc2query_deserializeDocumentRouteTableAssociationListUnwrapped(v *[]types.RouteTableAssociation, decoder smithyxml.NodeDecoder) error {
+ var sv []types.RouteTableAssociation
+ if *v == nil {
+ sv = make([]types.RouteTableAssociation, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.RouteTableAssociation
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentRouteTableAssociation(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentRouteTableAssociationState(v **types.RouteTableAssociationState, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.RouteTableAssociationState
+ if *v == nil {
+ sv = &types.RouteTableAssociationState{}
+ } 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("state", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.State = types.RouteTableAssociationStateCode(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 awsEc2query_deserializeDocumentRouteTableList(v *[]types.RouteTable, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.RouteTable
+ if *v == nil {
+ sv = make([]types.RouteTable, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.RouteTable
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentRouteTable(&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 awsEc2query_deserializeDocumentRouteTableListUnwrapped(v *[]types.RouteTable, decoder smithyxml.NodeDecoder) error {
+ var sv []types.RouteTable
+ if *v == nil {
+ sv = make([]types.RouteTable, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.RouteTable
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentRouteTable(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentRunInstancesMonitoringEnabled(v **types.RunInstancesMonitoringEnabled, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.RunInstancesMonitoringEnabled
+ if *v == nil {
+ sv = &types.RunInstancesMonitoringEnabled{}
+ } 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("enabled", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.Enabled = ptr.Bool(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 awsEc2query_deserializeDocumentS3Storage(v **types.S3Storage, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.S3Storage
+ if *v == nil {
+ sv = &types.S3Storage{}
+ } 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("AWSAccessKeyId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AWSAccessKeyId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("bucket", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Bucket = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("prefix", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Prefix = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("uploadPolicy", t.Name.Local):
+ var data string
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ data = xtv
+ }
+ sv.UploadPolicy, err = base64.StdEncoding.DecodeString(data)
+ if err != nil {
+ return err
+ }
+
+ case strings.EqualFold("uploadPolicySignature", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.UploadPolicySignature = 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 awsEc2query_deserializeDocumentScheduledInstance(v **types.ScheduledInstance, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.ScheduledInstance
+ if *v == nil {
+ sv = &types.ScheduledInstance{}
+ } 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("availabilityZone", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AvailabilityZone = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("createDate", 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.CreateDate = ptr.Time(t)
+ }
+
+ case strings.EqualFold("hourlyPrice", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.HourlyPrice = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("instanceCount", 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.InstanceCount = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("instanceType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.InstanceType = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("networkPlatform", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.NetworkPlatform = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("nextSlotStartTime", 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.NextSlotStartTime = ptr.Time(t)
+ }
+
+ case strings.EqualFold("platform", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Platform = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("previousSlotEndTime", 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.PreviousSlotEndTime = ptr.Time(t)
+ }
+
+ case strings.EqualFold("recurrence", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentScheduledInstanceRecurrence(&sv.Recurrence, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("scheduledInstanceId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ScheduledInstanceId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("slotDurationInHours", 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.SlotDurationInHours = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("termEndDate", 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.TermEndDate = ptr.Time(t)
+ }
+
+ case strings.EqualFold("termStartDate", 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.TermStartDate = ptr.Time(t)
+ }
+
+ case strings.EqualFold("totalScheduledInstanceHours", 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.TotalScheduledInstanceHours = 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 awsEc2query_deserializeDocumentScheduledInstanceAvailability(v **types.ScheduledInstanceAvailability, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.ScheduledInstanceAvailability
+ if *v == nil {
+ sv = &types.ScheduledInstanceAvailability{}
+ } 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("availabilityZone", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AvailabilityZone = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("availableInstanceCount", 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.AvailableInstanceCount = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("firstSlotStartTime", 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.FirstSlotStartTime = ptr.Time(t)
+ }
+
+ case strings.EqualFold("hourlyPrice", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.HourlyPrice = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("instanceType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.InstanceType = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("maxTermDurationInDays", 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.MaxTermDurationInDays = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("minTermDurationInDays", 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.MinTermDurationInDays = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("networkPlatform", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.NetworkPlatform = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("platform", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Platform = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("purchaseToken", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.PurchaseToken = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("recurrence", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentScheduledInstanceRecurrence(&sv.Recurrence, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("slotDurationInHours", 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.SlotDurationInHours = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("totalScheduledInstanceHours", 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.TotalScheduledInstanceHours = 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 awsEc2query_deserializeDocumentScheduledInstanceAvailabilitySet(v *[]types.ScheduledInstanceAvailability, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.ScheduledInstanceAvailability
+ if *v == nil {
+ sv = make([]types.ScheduledInstanceAvailability, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.ScheduledInstanceAvailability
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentScheduledInstanceAvailability(&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 awsEc2query_deserializeDocumentScheduledInstanceAvailabilitySetUnwrapped(v *[]types.ScheduledInstanceAvailability, decoder smithyxml.NodeDecoder) error {
+ var sv []types.ScheduledInstanceAvailability
+ if *v == nil {
+ sv = make([]types.ScheduledInstanceAvailability, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.ScheduledInstanceAvailability
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentScheduledInstanceAvailability(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentScheduledInstanceRecurrence(v **types.ScheduledInstanceRecurrence, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.ScheduledInstanceRecurrence
+ if *v == nil {
+ sv = &types.ScheduledInstanceRecurrence{}
+ } 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("frequency", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Frequency = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("interval", 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.Interval = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("occurrenceDaySet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentOccurrenceDaySet(&sv.OccurrenceDaySet, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("occurrenceRelativeToEnd", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.OccurrenceRelativeToEnd = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("occurrenceUnit", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.OccurrenceUnit = 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 awsEc2query_deserializeDocumentScheduledInstanceSet(v *[]types.ScheduledInstance, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.ScheduledInstance
+ if *v == nil {
+ sv = make([]types.ScheduledInstance, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.ScheduledInstance
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentScheduledInstance(&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 awsEc2query_deserializeDocumentScheduledInstanceSetUnwrapped(v *[]types.ScheduledInstance, decoder smithyxml.NodeDecoder) error {
+ var sv []types.ScheduledInstance
+ if *v == nil {
+ sv = make([]types.ScheduledInstance, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.ScheduledInstance
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentScheduledInstance(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentSecurityGroup(v **types.SecurityGroup, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.SecurityGroup
+ if *v == nil {
+ sv = &types.SecurityGroup{}
+ } 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("groupDescription", 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("groupId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.GroupId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("groupName", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.GroupName = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("ipPermissions", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentIpPermissionList(&sv.IpPermissions, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("ipPermissionsEgress", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentIpPermissionList(&sv.IpPermissionsEgress, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("ownerId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.OwnerId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("tagSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil {
+ return err
+ }
+
+ 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)
+ }
+
+ 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 awsEc2query_deserializeDocumentSecurityGroupIdentifier(v **types.SecurityGroupIdentifier, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.SecurityGroupIdentifier
+ if *v == nil {
+ sv = &types.SecurityGroupIdentifier{}
+ } 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("groupId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.GroupId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("groupName", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.GroupName = 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 awsEc2query_deserializeDocumentSecurityGroupIdStringList(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("SecurityGroupId", 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 awsEc2query_deserializeDocumentSecurityGroupIdStringListUnwrapped(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 awsEc2query_deserializeDocumentSecurityGroupList(v *[]types.SecurityGroup, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.SecurityGroup
+ if *v == nil {
+ sv = make([]types.SecurityGroup, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.SecurityGroup
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentSecurityGroup(&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 awsEc2query_deserializeDocumentSecurityGroupListUnwrapped(v *[]types.SecurityGroup, decoder smithyxml.NodeDecoder) error {
+ var sv []types.SecurityGroup
+ if *v == nil {
+ sv = make([]types.SecurityGroup, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.SecurityGroup
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentSecurityGroup(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentSecurityGroupReference(v **types.SecurityGroupReference, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.SecurityGroupReference
+ if *v == nil {
+ sv = &types.SecurityGroupReference{}
+ } 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("groupId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.GroupId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("referencingVpcId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ReferencingVpcId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("vpcPeeringConnectionId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.VpcPeeringConnectionId = 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 awsEc2query_deserializeDocumentSecurityGroupReferences(v *[]types.SecurityGroupReference, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.SecurityGroupReference
+ if *v == nil {
+ sv = make([]types.SecurityGroupReference, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.SecurityGroupReference
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentSecurityGroupReference(&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 awsEc2query_deserializeDocumentSecurityGroupReferencesUnwrapped(v *[]types.SecurityGroupReference, decoder smithyxml.NodeDecoder) error {
+ var sv []types.SecurityGroupReference
+ if *v == nil {
+ sv = make([]types.SecurityGroupReference, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.SecurityGroupReference
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentSecurityGroupReference(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentSecurityGroupRule(v **types.SecurityGroupRule, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.SecurityGroupRule
+ if *v == nil {
+ sv = &types.SecurityGroupRule{}
+ } 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("cidrIpv4", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.CidrIpv4 = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("cidrIpv6", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.CidrIpv6 = ptr.String(xtv)
+ }
+
+ 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("fromPort", 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.FromPort = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("groupId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.GroupId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("groupOwnerId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.GroupOwnerId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("ipProtocol", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.IpProtocol = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("isEgress", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.IsEgress = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("prefixListId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.PrefixListId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("referencedGroupInfo", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentReferencedSecurityGroup(&sv.ReferencedGroupInfo, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("securityGroupRuleId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.SecurityGroupRuleId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("tagSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("toPort", 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.ToPort = 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 awsEc2query_deserializeDocumentSecurityGroupRuleList(v *[]types.SecurityGroupRule, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.SecurityGroupRule
+ if *v == nil {
+ sv = make([]types.SecurityGroupRule, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.SecurityGroupRule
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentSecurityGroupRule(&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 awsEc2query_deserializeDocumentSecurityGroupRuleListUnwrapped(v *[]types.SecurityGroupRule, decoder smithyxml.NodeDecoder) error {
+ var sv []types.SecurityGroupRule
+ if *v == nil {
+ sv = make([]types.SecurityGroupRule, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.SecurityGroupRule
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentSecurityGroupRule(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentServiceConfiguration(v **types.ServiceConfiguration, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.ServiceConfiguration
+ if *v == nil {
+ sv = &types.ServiceConfiguration{}
+ } 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("acceptanceRequired", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.AcceptanceRequired = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("availabilityZoneSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentValueStringList(&sv.AvailabilityZones, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("baseEndpointDnsNameSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentValueStringList(&sv.BaseEndpointDnsNames, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("gatewayLoadBalancerArnSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentValueStringList(&sv.GatewayLoadBalancerArns, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("managesVpcEndpoints", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.ManagesVpcEndpoints = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("networkLoadBalancerArnSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentValueStringList(&sv.NetworkLoadBalancerArns, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("privateDnsName", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.PrivateDnsName = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("privateDnsNameConfiguration", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentPrivateDnsNameConfiguration(&sv.PrivateDnsNameConfiguration, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("serviceId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ServiceId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("serviceName", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ServiceName = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("serviceState", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ServiceState = types.ServiceState(xtv)
+ }
+
+ case strings.EqualFold("serviceType", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentServiceTypeDetailSet(&sv.ServiceType, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("tagSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_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 awsEc2query_deserializeDocumentServiceConfigurationSet(v *[]types.ServiceConfiguration, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.ServiceConfiguration
+ if *v == nil {
+ sv = make([]types.ServiceConfiguration, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.ServiceConfiguration
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentServiceConfiguration(&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 awsEc2query_deserializeDocumentServiceConfigurationSetUnwrapped(v *[]types.ServiceConfiguration, decoder smithyxml.NodeDecoder) error {
+ var sv []types.ServiceConfiguration
+ if *v == nil {
+ sv = make([]types.ServiceConfiguration, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.ServiceConfiguration
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentServiceConfiguration(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentServiceDetail(v **types.ServiceDetail, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.ServiceDetail
+ if *v == nil {
+ sv = &types.ServiceDetail{}
+ } 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("acceptanceRequired", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.AcceptanceRequired = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("availabilityZoneSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentValueStringList(&sv.AvailabilityZones, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("baseEndpointDnsNameSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentValueStringList(&sv.BaseEndpointDnsNames, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("managesVpcEndpoints", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.ManagesVpcEndpoints = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("owner", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Owner = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("privateDnsName", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.PrivateDnsName = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("privateDnsNameSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentPrivateDnsDetailsSet(&sv.PrivateDnsNames, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("privateDnsNameVerificationState", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.PrivateDnsNameVerificationState = types.DnsNameState(xtv)
+ }
+
+ case strings.EqualFold("serviceId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ServiceId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("serviceName", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ServiceName = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("serviceType", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentServiceTypeDetailSet(&sv.ServiceType, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("tagSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("vpcEndpointPolicySupported", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.VpcEndpointPolicySupported = ptr.Bool(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 awsEc2query_deserializeDocumentServiceDetailSet(v *[]types.ServiceDetail, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.ServiceDetail
+ if *v == nil {
+ sv = make([]types.ServiceDetail, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.ServiceDetail
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentServiceDetail(&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 awsEc2query_deserializeDocumentServiceDetailSetUnwrapped(v *[]types.ServiceDetail, decoder smithyxml.NodeDecoder) error {
+ var sv []types.ServiceDetail
+ if *v == nil {
+ sv = make([]types.ServiceDetail, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.ServiceDetail
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentServiceDetail(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentServiceTypeDetail(v **types.ServiceTypeDetail, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.ServiceTypeDetail
+ if *v == nil {
+ sv = &types.ServiceTypeDetail{}
+ } 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("serviceType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ServiceType = types.ServiceType(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 awsEc2query_deserializeDocumentServiceTypeDetailSet(v *[]types.ServiceTypeDetail, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.ServiceTypeDetail
+ if *v == nil {
+ sv = make([]types.ServiceTypeDetail, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.ServiceTypeDetail
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentServiceTypeDetail(&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 awsEc2query_deserializeDocumentServiceTypeDetailSetUnwrapped(v *[]types.ServiceTypeDetail, decoder smithyxml.NodeDecoder) error {
+ var sv []types.ServiceTypeDetail
+ if *v == nil {
+ sv = make([]types.ServiceTypeDetail, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.ServiceTypeDetail
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentServiceTypeDetail(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentSnapshot(v **types.Snapshot, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.Snapshot
+ if *v == nil {
+ sv = &types.Snapshot{}
+ } 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("dataEncryptionKeyId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.DataEncryptionKeyId = ptr.String(xtv)
+ }
+
+ 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("encrypted", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.Encrypted = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("kmsKeyId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.KmsKeyId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("outpostArn", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.OutpostArn = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("ownerAlias", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.OwnerAlias = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("ownerId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.OwnerId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("progress", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Progress = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("snapshotId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.SnapshotId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("startTime", 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.StartTime = 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.State = types.SnapshotState(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.StateMessage = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("tagSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("volumeId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.VolumeId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("volumeSize", 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.VolumeSize = 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 awsEc2query_deserializeDocumentSnapshotDetail(v **types.SnapshotDetail, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.SnapshotDetail
+ if *v == nil {
+ sv = &types.SnapshotDetail{}
+ } 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("deviceName", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.DeviceName = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("diskImageSize", 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.DiskImageSize = ptr.Float64(f64)
+ }
+
+ case strings.EqualFold("format", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Format = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("progress", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Progress = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("snapshotId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.SnapshotId = 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 = 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)
+ }
+
+ case strings.EqualFold("url", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Url = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("userBucket", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentUserBucketDetails(&sv.UserBucket, 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 awsEc2query_deserializeDocumentSnapshotDetailList(v *[]types.SnapshotDetail, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.SnapshotDetail
+ if *v == nil {
+ sv = make([]types.SnapshotDetail, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.SnapshotDetail
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentSnapshotDetail(&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 awsEc2query_deserializeDocumentSnapshotDetailListUnwrapped(v *[]types.SnapshotDetail, decoder smithyxml.NodeDecoder) error {
+ var sv []types.SnapshotDetail
+ if *v == nil {
+ sv = make([]types.SnapshotDetail, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.SnapshotDetail
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentSnapshotDetail(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentSnapshotInfo(v **types.SnapshotInfo, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.SnapshotInfo
+ if *v == nil {
+ sv = &types.SnapshotInfo{}
+ } 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("encrypted", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.Encrypted = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("outpostArn", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.OutpostArn = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("ownerId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.OwnerId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("progress", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Progress = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("snapshotId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.SnapshotId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("startTime", 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.StartTime = ptr.Time(t)
+ }
+
+ 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 = types.SnapshotState(xtv)
+ }
+
+ case strings.EqualFold("tagSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("volumeId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.VolumeId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("volumeSize", 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.VolumeSize = 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 awsEc2query_deserializeDocumentSnapshotList(v *[]types.Snapshot, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.Snapshot
+ if *v == nil {
+ sv = make([]types.Snapshot, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.Snapshot
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentSnapshot(&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 awsEc2query_deserializeDocumentSnapshotListUnwrapped(v *[]types.Snapshot, decoder smithyxml.NodeDecoder) error {
+ var sv []types.Snapshot
+ if *v == nil {
+ sv = make([]types.Snapshot, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.Snapshot
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentSnapshot(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentSnapshotSet(v *[]types.SnapshotInfo, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.SnapshotInfo
+ if *v == nil {
+ sv = make([]types.SnapshotInfo, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.SnapshotInfo
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentSnapshotInfo(&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 awsEc2query_deserializeDocumentSnapshotSetUnwrapped(v *[]types.SnapshotInfo, decoder smithyxml.NodeDecoder) error {
+ var sv []types.SnapshotInfo
+ if *v == nil {
+ sv = make([]types.SnapshotInfo, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.SnapshotInfo
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentSnapshotInfo(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentSnapshotTaskDetail(v **types.SnapshotTaskDetail, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.SnapshotTaskDetail
+ if *v == nil {
+ sv = &types.SnapshotTaskDetail{}
+ } 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("diskImageSize", 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.DiskImageSize = ptr.Float64(f64)
+ }
+
+ case strings.EqualFold("encrypted", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.Encrypted = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("format", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Format = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("kmsKeyId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.KmsKeyId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("progress", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Progress = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("snapshotId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.SnapshotId = 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 = 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)
+ }
+
+ case strings.EqualFold("url", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Url = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("userBucket", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentUserBucketDetails(&sv.UserBucket, 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 awsEc2query_deserializeDocumentSpotCapacityRebalance(v **types.SpotCapacityRebalance, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.SpotCapacityRebalance
+ if *v == nil {
+ sv = &types.SpotCapacityRebalance{}
+ } 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("replacementStrategy", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ReplacementStrategy = types.ReplacementStrategy(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 awsEc2query_deserializeDocumentSpotDatafeedSubscription(v **types.SpotDatafeedSubscription, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.SpotDatafeedSubscription
+ if *v == nil {
+ sv = &types.SpotDatafeedSubscription{}
+ } 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("bucket", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Bucket = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("fault", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentSpotInstanceStateFault(&sv.Fault, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("ownerId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.OwnerId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("prefix", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Prefix = 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 = types.DatafeedSubscriptionState(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 awsEc2query_deserializeDocumentSpotFleetLaunchSpecification(v **types.SpotFleetLaunchSpecification, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.SpotFleetLaunchSpecification
+ if *v == nil {
+ sv = &types.SpotFleetLaunchSpecification{}
+ } 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("addressingType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AddressingType = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("blockDeviceMapping", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentBlockDeviceMappingList(&sv.BlockDeviceMappings, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("ebsOptimized", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.EbsOptimized = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("iamInstanceProfile", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentIamInstanceProfileSpecification(&sv.IamInstanceProfile, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("imageId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ImageId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("instanceType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.InstanceType = types.InstanceType(xtv)
+ }
+
+ case strings.EqualFold("kernelId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.KernelId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("keyName", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.KeyName = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("monitoring", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentSpotFleetMonitoring(&sv.Monitoring, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("networkInterfaceSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentInstanceNetworkInterfaceSpecificationList(&sv.NetworkInterfaces, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("placement", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentSpotPlacement(&sv.Placement, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("ramdiskId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.RamdiskId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("groupSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentGroupIdentifierList(&sv.SecurityGroups, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("spotPrice", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.SpotPrice = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("subnetId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.SubnetId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("tagSpecificationSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentSpotFleetTagSpecificationList(&sv.TagSpecifications, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("userData", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.UserData = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("weightedCapacity", 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.WeightedCapacity = 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 awsEc2query_deserializeDocumentSpotFleetMonitoring(v **types.SpotFleetMonitoring, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.SpotFleetMonitoring
+ if *v == nil {
+ sv = &types.SpotFleetMonitoring{}
+ } 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("enabled", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.Enabled = ptr.Bool(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 awsEc2query_deserializeDocumentSpotFleetRequestConfig(v **types.SpotFleetRequestConfig, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.SpotFleetRequestConfig
+ if *v == nil {
+ sv = &types.SpotFleetRequestConfig{}
+ } 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("activityStatus", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ActivityStatus = types.ActivityStatus(xtv)
+ }
+
+ case strings.EqualFold("createTime", 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.CreateTime = ptr.Time(t)
+ }
+
+ case strings.EqualFold("spotFleetRequestConfig", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentSpotFleetRequestConfigData(&sv.SpotFleetRequestConfig, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("spotFleetRequestId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.SpotFleetRequestId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("spotFleetRequestState", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.SpotFleetRequestState = types.BatchState(xtv)
+ }
+
+ case strings.EqualFold("tagSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_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 awsEc2query_deserializeDocumentSpotFleetRequestConfigData(v **types.SpotFleetRequestConfigData, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.SpotFleetRequestConfigData
+ if *v == nil {
+ sv = &types.SpotFleetRequestConfigData{}
+ } 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("allocationStrategy", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AllocationStrategy = types.AllocationStrategy(xtv)
+ }
+
+ case strings.EqualFold("clientToken", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ClientToken = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("context", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Context = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("excessCapacityTerminationPolicy", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ExcessCapacityTerminationPolicy = types.ExcessCapacityTerminationPolicy(xtv)
+ }
+
+ case strings.EqualFold("fulfilledCapacity", 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.FulfilledCapacity = ptr.Float64(f64)
+ }
+
+ case strings.EqualFold("iamFleetRole", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.IamFleetRole = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("instanceInterruptionBehavior", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.InstanceInterruptionBehavior = types.InstanceInterruptionBehavior(xtv)
+ }
+
+ case strings.EqualFold("instancePoolsToUseCount", 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.InstancePoolsToUseCount = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("launchSpecifications", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentLaunchSpecsList(&sv.LaunchSpecifications, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("launchTemplateConfigs", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentLaunchTemplateConfigList(&sv.LaunchTemplateConfigs, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("loadBalancersConfig", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentLoadBalancersConfig(&sv.LoadBalancersConfig, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("onDemandAllocationStrategy", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.OnDemandAllocationStrategy = types.OnDemandAllocationStrategy(xtv)
+ }
+
+ case strings.EqualFold("onDemandFulfilledCapacity", 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.OnDemandFulfilledCapacity = ptr.Float64(f64)
+ }
+
+ case strings.EqualFold("onDemandMaxTotalPrice", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.OnDemandMaxTotalPrice = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("onDemandTargetCapacity", 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.OnDemandTargetCapacity = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("replaceUnhealthyInstances", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.ReplaceUnhealthyInstances = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("spotMaintenanceStrategies", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentSpotMaintenanceStrategies(&sv.SpotMaintenanceStrategies, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("spotMaxTotalPrice", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.SpotMaxTotalPrice = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("spotPrice", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.SpotPrice = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("TagSpecification", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTagSpecificationList(&sv.TagSpecifications, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("targetCapacity", 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.TargetCapacity = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("terminateInstancesWithExpiration", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.TerminateInstancesWithExpiration = ptr.Bool(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.FleetType(xtv)
+ }
+
+ case strings.EqualFold("validFrom", 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.ValidFrom = ptr.Time(t)
+ }
+
+ case strings.EqualFold("validUntil", 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.ValidUntil = 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 awsEc2query_deserializeDocumentSpotFleetRequestConfigSet(v *[]types.SpotFleetRequestConfig, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.SpotFleetRequestConfig
+ if *v == nil {
+ sv = make([]types.SpotFleetRequestConfig, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.SpotFleetRequestConfig
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentSpotFleetRequestConfig(&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 awsEc2query_deserializeDocumentSpotFleetRequestConfigSetUnwrapped(v *[]types.SpotFleetRequestConfig, decoder smithyxml.NodeDecoder) error {
+ var sv []types.SpotFleetRequestConfig
+ if *v == nil {
+ sv = make([]types.SpotFleetRequestConfig, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.SpotFleetRequestConfig
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentSpotFleetRequestConfig(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentSpotFleetTagSpecification(v **types.SpotFleetTagSpecification, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.SpotFleetTagSpecification
+ if *v == nil {
+ sv = &types.SpotFleetTagSpecification{}
+ } 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("resourceType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ResourceType = types.ResourceType(xtv)
+ }
+
+ case strings.EqualFold("tag", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_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 awsEc2query_deserializeDocumentSpotFleetTagSpecificationList(v *[]types.SpotFleetTagSpecification, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.SpotFleetTagSpecification
+ if *v == nil {
+ sv = make([]types.SpotFleetTagSpecification, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.SpotFleetTagSpecification
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentSpotFleetTagSpecification(&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 awsEc2query_deserializeDocumentSpotFleetTagSpecificationListUnwrapped(v *[]types.SpotFleetTagSpecification, decoder smithyxml.NodeDecoder) error {
+ var sv []types.SpotFleetTagSpecification
+ if *v == nil {
+ sv = make([]types.SpotFleetTagSpecification, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.SpotFleetTagSpecification
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentSpotFleetTagSpecification(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentSpotInstanceRequest(v **types.SpotInstanceRequest, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.SpotInstanceRequest
+ if *v == nil {
+ sv = &types.SpotInstanceRequest{}
+ } 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("actualBlockHourlyPrice", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ActualBlockHourlyPrice = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("availabilityZoneGroup", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AvailabilityZoneGroup = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("blockDurationMinutes", 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.BlockDurationMinutes = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("createTime", 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.CreateTime = ptr.Time(t)
+ }
+
+ case strings.EqualFold("fault", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentSpotInstanceStateFault(&sv.Fault, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("instanceId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.InstanceId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("instanceInterruptionBehavior", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.InstanceInterruptionBehavior = types.InstanceInterruptionBehavior(xtv)
+ }
+
+ case strings.EqualFold("launchedAvailabilityZone", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.LaunchedAvailabilityZone = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("launchGroup", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.LaunchGroup = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("launchSpecification", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentLaunchSpecification(&sv.LaunchSpecification, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("productDescription", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ProductDescription = types.RIProductDescription(xtv)
+ }
+
+ case strings.EqualFold("spotInstanceRequestId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.SpotInstanceRequestId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("spotPrice", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.SpotPrice = 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 = types.SpotInstanceState(xtv)
+ }
+
+ case strings.EqualFold("status", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentSpotInstanceStatus(&sv.Status, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("tagSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil {
+ return err
+ }
+
+ 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.SpotInstanceType(xtv)
+ }
+
+ case strings.EqualFold("validFrom", 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.ValidFrom = ptr.Time(t)
+ }
+
+ case strings.EqualFold("validUntil", 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.ValidUntil = 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 awsEc2query_deserializeDocumentSpotInstanceRequestList(v *[]types.SpotInstanceRequest, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.SpotInstanceRequest
+ if *v == nil {
+ sv = make([]types.SpotInstanceRequest, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.SpotInstanceRequest
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentSpotInstanceRequest(&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 awsEc2query_deserializeDocumentSpotInstanceRequestListUnwrapped(v *[]types.SpotInstanceRequest, decoder smithyxml.NodeDecoder) error {
+ var sv []types.SpotInstanceRequest
+ if *v == nil {
+ sv = make([]types.SpotInstanceRequest, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.SpotInstanceRequest
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentSpotInstanceRequest(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentSpotInstanceStateFault(v **types.SpotInstanceStateFault, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.SpotInstanceStateFault
+ if *v == nil {
+ sv = &types.SpotInstanceStateFault{}
+ } 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("code", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Code = 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)
+ }
+
+ 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 awsEc2query_deserializeDocumentSpotInstanceStatus(v **types.SpotInstanceStatus, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.SpotInstanceStatus
+ if *v == nil {
+ sv = &types.SpotInstanceStatus{}
+ } 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("code", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Code = 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("updateTime", 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.UpdateTime = 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 awsEc2query_deserializeDocumentSpotMaintenanceStrategies(v **types.SpotMaintenanceStrategies, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.SpotMaintenanceStrategies
+ if *v == nil {
+ sv = &types.SpotMaintenanceStrategies{}
+ } 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("capacityRebalance", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentSpotCapacityRebalance(&sv.CapacityRebalance, 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 awsEc2query_deserializeDocumentSpotOptions(v **types.SpotOptions, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.SpotOptions
+ if *v == nil {
+ sv = &types.SpotOptions{}
+ } 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("allocationStrategy", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AllocationStrategy = types.SpotAllocationStrategy(xtv)
+ }
+
+ case strings.EqualFold("instanceInterruptionBehavior", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.InstanceInterruptionBehavior = types.SpotInstanceInterruptionBehavior(xtv)
+ }
+
+ case strings.EqualFold("instancePoolsToUseCount", 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.InstancePoolsToUseCount = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("maintenanceStrategies", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentFleetSpotMaintenanceStrategies(&sv.MaintenanceStrategies, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("maxTotalPrice", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.MaxTotalPrice = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("minTargetCapacity", 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.MinTargetCapacity = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("singleAvailabilityZone", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.SingleAvailabilityZone = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("singleInstanceType", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.SingleInstanceType = ptr.Bool(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 awsEc2query_deserializeDocumentSpotPlacement(v **types.SpotPlacement, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.SpotPlacement
+ if *v == nil {
+ sv = &types.SpotPlacement{}
+ } 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("availabilityZone", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AvailabilityZone = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("groupName", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.GroupName = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("tenancy", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Tenancy = types.Tenancy(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 awsEc2query_deserializeDocumentSpotPrice(v **types.SpotPrice, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.SpotPrice
+ if *v == nil {
+ sv = &types.SpotPrice{}
+ } 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("availabilityZone", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AvailabilityZone = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("instanceType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.InstanceType = types.InstanceType(xtv)
+ }
+
+ case strings.EqualFold("productDescription", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ProductDescription = types.RIProductDescription(xtv)
+ }
+
+ case strings.EqualFold("spotPrice", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.SpotPrice = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("timestamp", 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.Timestamp = 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 awsEc2query_deserializeDocumentSpotPriceHistoryList(v *[]types.SpotPrice, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.SpotPrice
+ if *v == nil {
+ sv = make([]types.SpotPrice, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.SpotPrice
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentSpotPrice(&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 awsEc2query_deserializeDocumentSpotPriceHistoryListUnwrapped(v *[]types.SpotPrice, decoder smithyxml.NodeDecoder) error {
+ var sv []types.SpotPrice
+ if *v == nil {
+ sv = make([]types.SpotPrice, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.SpotPrice
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentSpotPrice(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentStaleIpPermission(v **types.StaleIpPermission, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.StaleIpPermission
+ if *v == nil {
+ sv = &types.StaleIpPermission{}
+ } 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("fromPort", 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.FromPort = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("ipProtocol", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.IpProtocol = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("ipRanges", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentIpRanges(&sv.IpRanges, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("prefixListIds", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentPrefixListIdSet(&sv.PrefixListIds, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("toPort", 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.ToPort = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("groups", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentUserIdGroupPairSet(&sv.UserIdGroupPairs, 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 awsEc2query_deserializeDocumentStaleIpPermissionSet(v *[]types.StaleIpPermission, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.StaleIpPermission
+ if *v == nil {
+ sv = make([]types.StaleIpPermission, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.StaleIpPermission
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentStaleIpPermission(&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 awsEc2query_deserializeDocumentStaleIpPermissionSetUnwrapped(v *[]types.StaleIpPermission, decoder smithyxml.NodeDecoder) error {
+ var sv []types.StaleIpPermission
+ if *v == nil {
+ sv = make([]types.StaleIpPermission, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.StaleIpPermission
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentStaleIpPermission(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentStaleSecurityGroup(v **types.StaleSecurityGroup, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.StaleSecurityGroup
+ if *v == nil {
+ sv = &types.StaleSecurityGroup{}
+ } 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("groupId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.GroupId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("groupName", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.GroupName = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("staleIpPermissions", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentStaleIpPermissionSet(&sv.StaleIpPermissions, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("staleIpPermissionsEgress", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentStaleIpPermissionSet(&sv.StaleIpPermissionsEgress, nodeDecoder); err != nil {
+ return err
+ }
+
+ 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)
+ }
+
+ 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 awsEc2query_deserializeDocumentStaleSecurityGroupSet(v *[]types.StaleSecurityGroup, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.StaleSecurityGroup
+ if *v == nil {
+ sv = make([]types.StaleSecurityGroup, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.StaleSecurityGroup
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentStaleSecurityGroup(&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 awsEc2query_deserializeDocumentStaleSecurityGroupSetUnwrapped(v *[]types.StaleSecurityGroup, decoder smithyxml.NodeDecoder) error {
+ var sv []types.StaleSecurityGroup
+ if *v == nil {
+ sv = make([]types.StaleSecurityGroup, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.StaleSecurityGroup
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentStaleSecurityGroup(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentStateReason(v **types.StateReason, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.StateReason
+ if *v == nil {
+ sv = &types.StateReason{}
+ } 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("code", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Code = 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)
+ }
+
+ 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 awsEc2query_deserializeDocumentStorage(v **types.Storage, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.Storage
+ if *v == nil {
+ sv = &types.Storage{}
+ } 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("S3", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentS3Storage(&sv.S3, 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 awsEc2query_deserializeDocumentStoreImageTaskResult(v **types.StoreImageTaskResult, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.StoreImageTaskResult
+ if *v == nil {
+ sv = &types.StoreImageTaskResult{}
+ } 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("amiId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AmiId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("bucket", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Bucket = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("progressPercentage", 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.ProgressPercentage = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("s3objectKey", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.S3objectKey = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("storeTaskFailureReason", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.StoreTaskFailureReason = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("storeTaskState", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.StoreTaskState = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("taskStartTime", 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.TaskStartTime = 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 awsEc2query_deserializeDocumentStoreImageTaskResultSet(v *[]types.StoreImageTaskResult, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.StoreImageTaskResult
+ if *v == nil {
+ sv = make([]types.StoreImageTaskResult, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.StoreImageTaskResult
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentStoreImageTaskResult(&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 awsEc2query_deserializeDocumentStoreImageTaskResultSetUnwrapped(v *[]types.StoreImageTaskResult, decoder smithyxml.NodeDecoder) error {
+ var sv []types.StoreImageTaskResult
+ if *v == nil {
+ sv = make([]types.StoreImageTaskResult, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.StoreImageTaskResult
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentStoreImageTaskResult(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentStringList(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("item", 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 awsEc2query_deserializeDocumentStringListUnwrapped(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 awsEc2query_deserializeDocumentSubnet(v **types.Subnet, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.Subnet
+ if *v == nil {
+ sv = &types.Subnet{}
+ } 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("assignIpv6AddressOnCreation", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.AssignIpv6AddressOnCreation = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("availabilityZone", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AvailabilityZone = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("availabilityZoneId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AvailabilityZoneId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("availableIpAddressCount", 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.AvailableIpAddressCount = ptr.Int32(int32(i64))
+ }
+
+ 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("customerOwnedIpv4Pool", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.CustomerOwnedIpv4Pool = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("defaultForAz", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.DefaultForAz = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("ipv6CidrBlockAssociationSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentSubnetIpv6CidrBlockAssociationSet(&sv.Ipv6CidrBlockAssociationSet, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("mapCustomerOwnedIpOnLaunch", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.MapCustomerOwnedIpOnLaunch = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("mapPublicIpOnLaunch", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.MapPublicIpOnLaunch = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("outpostArn", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.OutpostArn = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("ownerId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.OwnerId = 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 = types.SubnetState(xtv)
+ }
+
+ case strings.EqualFold("subnetArn", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.SubnetArn = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("subnetId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.SubnetId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("tagSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil {
+ return err
+ }
+
+ 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)
+ }
+
+ 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 awsEc2query_deserializeDocumentSubnetAssociation(v **types.SubnetAssociation, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.SubnetAssociation
+ if *v == nil {
+ sv = &types.SubnetAssociation{}
+ } 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("state", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.State = types.TransitGatewayMulitcastDomainAssociationState(xtv)
+ }
+
+ case strings.EqualFold("subnetId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.SubnetId = 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 awsEc2query_deserializeDocumentSubnetAssociationList(v *[]types.SubnetAssociation, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.SubnetAssociation
+ if *v == nil {
+ sv = make([]types.SubnetAssociation, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.SubnetAssociation
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentSubnetAssociation(&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 awsEc2query_deserializeDocumentSubnetAssociationListUnwrapped(v *[]types.SubnetAssociation, decoder smithyxml.NodeDecoder) error {
+ var sv []types.SubnetAssociation
+ if *v == nil {
+ sv = make([]types.SubnetAssociation, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.SubnetAssociation
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentSubnetAssociation(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentSubnetCidrBlockState(v **types.SubnetCidrBlockState, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.SubnetCidrBlockState
+ if *v == nil {
+ sv = &types.SubnetCidrBlockState{}
+ } 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("state", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.State = types.SubnetCidrBlockStateCode(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 awsEc2query_deserializeDocumentSubnetCidrReservation(v **types.SubnetCidrReservation, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.SubnetCidrReservation
+ if *v == nil {
+ sv = &types.SubnetCidrReservation{}
+ } 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("cidr", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Cidr = ptr.String(xtv)
+ }
+
+ 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("ownerId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.OwnerId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("reservationType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ReservationType = types.SubnetCidrReservationType(xtv)
+ }
+
+ case strings.EqualFold("subnetCidrReservationId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.SubnetCidrReservationId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("subnetId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.SubnetId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("tagSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_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 awsEc2query_deserializeDocumentSubnetCidrReservationList(v *[]types.SubnetCidrReservation, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.SubnetCidrReservation
+ if *v == nil {
+ sv = make([]types.SubnetCidrReservation, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.SubnetCidrReservation
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentSubnetCidrReservation(&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 awsEc2query_deserializeDocumentSubnetCidrReservationListUnwrapped(v *[]types.SubnetCidrReservation, decoder smithyxml.NodeDecoder) error {
+ var sv []types.SubnetCidrReservation
+ if *v == nil {
+ sv = make([]types.SubnetCidrReservation, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.SubnetCidrReservation
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentSubnetCidrReservation(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentSubnetIpv6CidrBlockAssociation(v **types.SubnetIpv6CidrBlockAssociation, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.SubnetIpv6CidrBlockAssociation
+ if *v == nil {
+ sv = &types.SubnetIpv6CidrBlockAssociation{}
+ } 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("associationId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AssociationId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("ipv6CidrBlock", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Ipv6CidrBlock = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("ipv6CidrBlockState", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentSubnetCidrBlockState(&sv.Ipv6CidrBlockState, 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 awsEc2query_deserializeDocumentSubnetIpv6CidrBlockAssociationSet(v *[]types.SubnetIpv6CidrBlockAssociation, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.SubnetIpv6CidrBlockAssociation
+ if *v == nil {
+ sv = make([]types.SubnetIpv6CidrBlockAssociation, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.SubnetIpv6CidrBlockAssociation
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentSubnetIpv6CidrBlockAssociation(&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 awsEc2query_deserializeDocumentSubnetIpv6CidrBlockAssociationSetUnwrapped(v *[]types.SubnetIpv6CidrBlockAssociation, decoder smithyxml.NodeDecoder) error {
+ var sv []types.SubnetIpv6CidrBlockAssociation
+ if *v == nil {
+ sv = make([]types.SubnetIpv6CidrBlockAssociation, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.SubnetIpv6CidrBlockAssociation
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentSubnetIpv6CidrBlockAssociation(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentSubnetList(v *[]types.Subnet, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.Subnet
+ if *v == nil {
+ sv = make([]types.Subnet, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.Subnet
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentSubnet(&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 awsEc2query_deserializeDocumentSubnetListUnwrapped(v *[]types.Subnet, decoder smithyxml.NodeDecoder) error {
+ var sv []types.Subnet
+ if *v == nil {
+ sv = make([]types.Subnet, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.Subnet
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentSubnet(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentSuccessfulInstanceCreditSpecificationItem(v **types.SuccessfulInstanceCreditSpecificationItem, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.SuccessfulInstanceCreditSpecificationItem
+ if *v == nil {
+ sv = &types.SuccessfulInstanceCreditSpecificationItem{}
+ } 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("instanceId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.InstanceId = 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 awsEc2query_deserializeDocumentSuccessfulInstanceCreditSpecificationSet(v *[]types.SuccessfulInstanceCreditSpecificationItem, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.SuccessfulInstanceCreditSpecificationItem
+ if *v == nil {
+ sv = make([]types.SuccessfulInstanceCreditSpecificationItem, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.SuccessfulInstanceCreditSpecificationItem
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentSuccessfulInstanceCreditSpecificationItem(&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 awsEc2query_deserializeDocumentSuccessfulInstanceCreditSpecificationSetUnwrapped(v *[]types.SuccessfulInstanceCreditSpecificationItem, decoder smithyxml.NodeDecoder) error {
+ var sv []types.SuccessfulInstanceCreditSpecificationItem
+ if *v == nil {
+ sv = make([]types.SuccessfulInstanceCreditSpecificationItem, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.SuccessfulInstanceCreditSpecificationItem
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentSuccessfulInstanceCreditSpecificationItem(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentSuccessfulQueuedPurchaseDeletion(v **types.SuccessfulQueuedPurchaseDeletion, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.SuccessfulQueuedPurchaseDeletion
+ if *v == nil {
+ sv = &types.SuccessfulQueuedPurchaseDeletion{}
+ } 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("reservedInstancesId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ReservedInstancesId = 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 awsEc2query_deserializeDocumentSuccessfulQueuedPurchaseDeletionSet(v *[]types.SuccessfulQueuedPurchaseDeletion, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.SuccessfulQueuedPurchaseDeletion
+ if *v == nil {
+ sv = make([]types.SuccessfulQueuedPurchaseDeletion, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.SuccessfulQueuedPurchaseDeletion
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentSuccessfulQueuedPurchaseDeletion(&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 awsEc2query_deserializeDocumentSuccessfulQueuedPurchaseDeletionSetUnwrapped(v *[]types.SuccessfulQueuedPurchaseDeletion, decoder smithyxml.NodeDecoder) error {
+ var sv []types.SuccessfulQueuedPurchaseDeletion
+ if *v == nil {
+ sv = make([]types.SuccessfulQueuedPurchaseDeletion, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.SuccessfulQueuedPurchaseDeletion
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentSuccessfulQueuedPurchaseDeletion(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_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 awsEc2query_deserializeDocumentTagDescription(v **types.TagDescription, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.TagDescription
+ if *v == nil {
+ sv = &types.TagDescription{}
+ } 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("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.ResourceType(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 awsEc2query_deserializeDocumentTagDescriptionList(v *[]types.TagDescription, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.TagDescription
+ if *v == nil {
+ sv = make([]types.TagDescription, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.TagDescription
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentTagDescription(&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 awsEc2query_deserializeDocumentTagDescriptionListUnwrapped(v *[]types.TagDescription, decoder smithyxml.NodeDecoder) error {
+ var sv []types.TagDescription
+ if *v == nil {
+ sv = make([]types.TagDescription, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.TagDescription
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentTagDescription(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_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("item", t.Name.Local):
+ var col types.Tag
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_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 awsEc2query_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 := awsEc2query_deserializeDocumentTag(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentTagSpecification(v **types.TagSpecification, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.TagSpecification
+ if *v == nil {
+ sv = &types.TagSpecification{}
+ } 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("resourceType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ResourceType = types.ResourceType(xtv)
+ }
+
+ case strings.EqualFold("Tag", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_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 awsEc2query_deserializeDocumentTagSpecificationList(v *[]types.TagSpecification, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.TagSpecification
+ if *v == nil {
+ sv = make([]types.TagSpecification, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.TagSpecification
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentTagSpecification(&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 awsEc2query_deserializeDocumentTagSpecificationListUnwrapped(v *[]types.TagSpecification, decoder smithyxml.NodeDecoder) error {
+ var sv []types.TagSpecification
+ if *v == nil {
+ sv = make([]types.TagSpecification, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.TagSpecification
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentTagSpecification(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentTargetCapacitySpecification(v **types.TargetCapacitySpecification, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.TargetCapacitySpecification
+ if *v == nil {
+ sv = &types.TargetCapacitySpecification{}
+ } 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("defaultTargetCapacityType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.DefaultTargetCapacityType = types.DefaultTargetCapacityType(xtv)
+ }
+
+ case strings.EqualFold("onDemandTargetCapacity", 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.OnDemandTargetCapacity = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("spotTargetCapacity", 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.SpotTargetCapacity = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("totalTargetCapacity", 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.TotalTargetCapacity = 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 awsEc2query_deserializeDocumentTargetConfiguration(v **types.TargetConfiguration, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.TargetConfiguration
+ if *v == nil {
+ sv = &types.TargetConfiguration{}
+ } 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("instanceCount", 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.InstanceCount = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("offeringId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.OfferingId = 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 awsEc2query_deserializeDocumentTargetGroup(v **types.TargetGroup, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.TargetGroup
+ if *v == nil {
+ sv = &types.TargetGroup{}
+ } 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)
+ }
+
+ 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 awsEc2query_deserializeDocumentTargetGroups(v *[]types.TargetGroup, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.TargetGroup
+ if *v == nil {
+ sv = make([]types.TargetGroup, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.TargetGroup
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentTargetGroup(&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 awsEc2query_deserializeDocumentTargetGroupsUnwrapped(v *[]types.TargetGroup, decoder smithyxml.NodeDecoder) error {
+ var sv []types.TargetGroup
+ if *v == nil {
+ sv = make([]types.TargetGroup, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.TargetGroup
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentTargetGroup(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentTargetGroupsConfig(v **types.TargetGroupsConfig, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.TargetGroupsConfig
+ if *v == nil {
+ sv = &types.TargetGroupsConfig{}
+ } 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("targetGroups", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTargetGroups(&sv.TargetGroups, 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 awsEc2query_deserializeDocumentTargetNetwork(v **types.TargetNetwork, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.TargetNetwork
+ if *v == nil {
+ sv = &types.TargetNetwork{}
+ } 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("associationId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AssociationId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("clientVpnEndpointId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ClientVpnEndpointId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("securityGroups", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentValueStringList(&sv.SecurityGroups, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("status", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentAssociationStatus(&sv.Status, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("targetNetworkId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.TargetNetworkId = ptr.String(xtv)
+ }
+
+ 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)
+ }
+
+ 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 awsEc2query_deserializeDocumentTargetNetworkSet(v *[]types.TargetNetwork, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.TargetNetwork
+ if *v == nil {
+ sv = make([]types.TargetNetwork, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.TargetNetwork
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentTargetNetwork(&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 awsEc2query_deserializeDocumentTargetNetworkSetUnwrapped(v *[]types.TargetNetwork, decoder smithyxml.NodeDecoder) error {
+ var sv []types.TargetNetwork
+ if *v == nil {
+ sv = make([]types.TargetNetwork, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.TargetNetwork
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentTargetNetwork(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentTargetReservationValue(v **types.TargetReservationValue, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.TargetReservationValue
+ if *v == nil {
+ sv = &types.TargetReservationValue{}
+ } 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("reservationValue", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentReservationValue(&sv.ReservationValue, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("targetConfiguration", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTargetConfiguration(&sv.TargetConfiguration, 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 awsEc2query_deserializeDocumentTargetReservationValueSet(v *[]types.TargetReservationValue, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.TargetReservationValue
+ if *v == nil {
+ sv = make([]types.TargetReservationValue, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.TargetReservationValue
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentTargetReservationValue(&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 awsEc2query_deserializeDocumentTargetReservationValueSetUnwrapped(v *[]types.TargetReservationValue, decoder smithyxml.NodeDecoder) error {
+ var sv []types.TargetReservationValue
+ if *v == nil {
+ sv = make([]types.TargetReservationValue, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.TargetReservationValue
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentTargetReservationValue(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentTerminateConnectionStatus(v **types.TerminateConnectionStatus, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.TerminateConnectionStatus
+ if *v == nil {
+ sv = &types.TerminateConnectionStatus{}
+ } 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("connectionId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ConnectionId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("currentStatus", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentClientVpnConnectionStatus(&sv.CurrentStatus, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("previousStatus", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentClientVpnConnectionStatus(&sv.PreviousStatus, 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 awsEc2query_deserializeDocumentTerminateConnectionStatusSet(v *[]types.TerminateConnectionStatus, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.TerminateConnectionStatus
+ if *v == nil {
+ sv = make([]types.TerminateConnectionStatus, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.TerminateConnectionStatus
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentTerminateConnectionStatus(&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 awsEc2query_deserializeDocumentTerminateConnectionStatusSetUnwrapped(v *[]types.TerminateConnectionStatus, decoder smithyxml.NodeDecoder) error {
+ var sv []types.TerminateConnectionStatus
+ if *v == nil {
+ sv = make([]types.TerminateConnectionStatus, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.TerminateConnectionStatus
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentTerminateConnectionStatus(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentThreadsPerCoreList(v *[]int32, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []int32
+ if *v == nil {
+ sv = make([]int32, 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("item", t.Name.Local):
+ var col int32
+ 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
+ }
+ col = int32(i64)
+ }
+ sv = append(sv, col)
+
+ default:
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsEc2query_deserializeDocumentThreadsPerCoreListUnwrapped(v *[]int32, decoder smithyxml.NodeDecoder) error {
+ var sv []int32
+ if *v == nil {
+ sv = make([]int32, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv int32
+ t := decoder.StartEl
+ _ = t
+ 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
+ }
+ mv = int32(i64)
+ }
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentTrafficMirrorFilter(v **types.TrafficMirrorFilter, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.TrafficMirrorFilter
+ if *v == nil {
+ sv = &types.TrafficMirrorFilter{}
+ } 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("egressFilterRuleSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTrafficMirrorFilterRuleList(&sv.EgressFilterRules, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("ingressFilterRuleSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTrafficMirrorFilterRuleList(&sv.IngressFilterRules, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("networkServiceSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTrafficMirrorNetworkServiceList(&sv.NetworkServices, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("tagSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("trafficMirrorFilterId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.TrafficMirrorFilterId = 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 awsEc2query_deserializeDocumentTrafficMirrorFilterRule(v **types.TrafficMirrorFilterRule, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.TrafficMirrorFilterRule
+ if *v == nil {
+ sv = &types.TrafficMirrorFilterRule{}
+ } 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("destinationCidrBlock", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.DestinationCidrBlock = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("destinationPortRange", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTrafficMirrorPortRange(&sv.DestinationPortRange, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("protocol", 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.Protocol = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("ruleAction", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.RuleAction = types.TrafficMirrorRuleAction(xtv)
+ }
+
+ case strings.EqualFold("ruleNumber", 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.RuleNumber = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("sourceCidrBlock", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.SourceCidrBlock = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("sourcePortRange", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTrafficMirrorPortRange(&sv.SourcePortRange, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("trafficDirection", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.TrafficDirection = types.TrafficDirection(xtv)
+ }
+
+ case strings.EqualFold("trafficMirrorFilterId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.TrafficMirrorFilterId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("trafficMirrorFilterRuleId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.TrafficMirrorFilterRuleId = 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 awsEc2query_deserializeDocumentTrafficMirrorFilterRuleList(v *[]types.TrafficMirrorFilterRule, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.TrafficMirrorFilterRule
+ if *v == nil {
+ sv = make([]types.TrafficMirrorFilterRule, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.TrafficMirrorFilterRule
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentTrafficMirrorFilterRule(&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 awsEc2query_deserializeDocumentTrafficMirrorFilterRuleListUnwrapped(v *[]types.TrafficMirrorFilterRule, decoder smithyxml.NodeDecoder) error {
+ var sv []types.TrafficMirrorFilterRule
+ if *v == nil {
+ sv = make([]types.TrafficMirrorFilterRule, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.TrafficMirrorFilterRule
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentTrafficMirrorFilterRule(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentTrafficMirrorFilterSet(v *[]types.TrafficMirrorFilter, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.TrafficMirrorFilter
+ if *v == nil {
+ sv = make([]types.TrafficMirrorFilter, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.TrafficMirrorFilter
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentTrafficMirrorFilter(&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 awsEc2query_deserializeDocumentTrafficMirrorFilterSetUnwrapped(v *[]types.TrafficMirrorFilter, decoder smithyxml.NodeDecoder) error {
+ var sv []types.TrafficMirrorFilter
+ if *v == nil {
+ sv = make([]types.TrafficMirrorFilter, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.TrafficMirrorFilter
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentTrafficMirrorFilter(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentTrafficMirrorNetworkServiceList(v *[]types.TrafficMirrorNetworkService, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.TrafficMirrorNetworkService
+ if *v == nil {
+ sv = make([]types.TrafficMirrorNetworkService, 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("item", t.Name.Local):
+ var col types.TrafficMirrorNetworkService
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ col = types.TrafficMirrorNetworkService(xtv)
+ }
+ sv = append(sv, col)
+
+ default:
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsEc2query_deserializeDocumentTrafficMirrorNetworkServiceListUnwrapped(v *[]types.TrafficMirrorNetworkService, decoder smithyxml.NodeDecoder) error {
+ var sv []types.TrafficMirrorNetworkService
+ if *v == nil {
+ sv = make([]types.TrafficMirrorNetworkService, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.TrafficMirrorNetworkService
+ t := decoder.StartEl
+ _ = t
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ mv = types.TrafficMirrorNetworkService(xtv)
+ }
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentTrafficMirrorPortRange(v **types.TrafficMirrorPortRange, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.TrafficMirrorPortRange
+ if *v == nil {
+ sv = &types.TrafficMirrorPortRange{}
+ } 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("fromPort", 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.FromPort = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("toPort", 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.ToPort = 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 awsEc2query_deserializeDocumentTrafficMirrorSession(v **types.TrafficMirrorSession, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.TrafficMirrorSession
+ if *v == nil {
+ sv = &types.TrafficMirrorSession{}
+ } 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("networkInterfaceId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.NetworkInterfaceId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("ownerId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.OwnerId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("packetLength", 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.PacketLength = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("sessionNumber", 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.SessionNumber = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("tagSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("trafficMirrorFilterId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.TrafficMirrorFilterId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("trafficMirrorSessionId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.TrafficMirrorSessionId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("trafficMirrorTargetId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.TrafficMirrorTargetId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("virtualNetworkId", 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.VirtualNetworkId = 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 awsEc2query_deserializeDocumentTrafficMirrorSessionSet(v *[]types.TrafficMirrorSession, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.TrafficMirrorSession
+ if *v == nil {
+ sv = make([]types.TrafficMirrorSession, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.TrafficMirrorSession
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentTrafficMirrorSession(&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 awsEc2query_deserializeDocumentTrafficMirrorSessionSetUnwrapped(v *[]types.TrafficMirrorSession, decoder smithyxml.NodeDecoder) error {
+ var sv []types.TrafficMirrorSession
+ if *v == nil {
+ sv = make([]types.TrafficMirrorSession, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.TrafficMirrorSession
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentTrafficMirrorSession(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentTrafficMirrorTarget(v **types.TrafficMirrorTarget, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.TrafficMirrorTarget
+ if *v == nil {
+ sv = &types.TrafficMirrorTarget{}
+ } 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("networkInterfaceId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.NetworkInterfaceId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("networkLoadBalancerArn", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.NetworkLoadBalancerArn = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("ownerId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.OwnerId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("tagSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("trafficMirrorTargetId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.TrafficMirrorTargetId = 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.TrafficMirrorTargetType(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 awsEc2query_deserializeDocumentTrafficMirrorTargetSet(v *[]types.TrafficMirrorTarget, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.TrafficMirrorTarget
+ if *v == nil {
+ sv = make([]types.TrafficMirrorTarget, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.TrafficMirrorTarget
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentTrafficMirrorTarget(&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 awsEc2query_deserializeDocumentTrafficMirrorTargetSetUnwrapped(v *[]types.TrafficMirrorTarget, decoder smithyxml.NodeDecoder) error {
+ var sv []types.TrafficMirrorTarget
+ if *v == nil {
+ sv = make([]types.TrafficMirrorTarget, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.TrafficMirrorTarget
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentTrafficMirrorTarget(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentTransitGateway(v **types.TransitGateway, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.TransitGateway
+ if *v == nil {
+ sv = &types.TransitGateway{}
+ } 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("creationTime", 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.CreationTime = ptr.Time(t)
+ }
+
+ 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("options", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTransitGatewayOptions(&sv.Options, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("ownerId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.OwnerId = 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 = types.TransitGatewayState(xtv)
+ }
+
+ case strings.EqualFold("tagSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("transitGatewayArn", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.TransitGatewayArn = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("transitGatewayId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.TransitGatewayId = 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 awsEc2query_deserializeDocumentTransitGatewayAssociation(v **types.TransitGatewayAssociation, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.TransitGatewayAssociation
+ if *v == nil {
+ sv = &types.TransitGatewayAssociation{}
+ } 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.TransitGatewayAttachmentResourceType(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 = types.TransitGatewayAssociationState(xtv)
+ }
+
+ case strings.EqualFold("transitGatewayAttachmentId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.TransitGatewayAttachmentId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("transitGatewayRouteTableId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.TransitGatewayRouteTableId = 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 awsEc2query_deserializeDocumentTransitGatewayAttachment(v **types.TransitGatewayAttachment, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.TransitGatewayAttachment
+ if *v == nil {
+ sv = &types.TransitGatewayAttachment{}
+ } 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("association", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTransitGatewayAttachmentAssociation(&sv.Association, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("creationTime", 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.CreationTime = ptr.Time(t)
+ }
+
+ 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("resourceOwnerId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ResourceOwnerId = 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.TransitGatewayAttachmentResourceType(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 = types.TransitGatewayAttachmentState(xtv)
+ }
+
+ case strings.EqualFold("tagSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("transitGatewayAttachmentId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.TransitGatewayAttachmentId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("transitGatewayId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.TransitGatewayId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("transitGatewayOwnerId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.TransitGatewayOwnerId = 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 awsEc2query_deserializeDocumentTransitGatewayAttachmentAssociation(v **types.TransitGatewayAttachmentAssociation, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.TransitGatewayAttachmentAssociation
+ if *v == nil {
+ sv = &types.TransitGatewayAttachmentAssociation{}
+ } 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("state", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.State = types.TransitGatewayAssociationState(xtv)
+ }
+
+ case strings.EqualFold("transitGatewayRouteTableId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.TransitGatewayRouteTableId = 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 awsEc2query_deserializeDocumentTransitGatewayAttachmentBgpConfiguration(v **types.TransitGatewayAttachmentBgpConfiguration, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.TransitGatewayAttachmentBgpConfiguration
+ if *v == nil {
+ sv = &types.TransitGatewayAttachmentBgpConfiguration{}
+ } 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("bgpStatus", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.BgpStatus = types.BgpStatus(xtv)
+ }
+
+ case strings.EqualFold("peerAddress", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.PeerAddress = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("peerAsn", 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.PeerAsn = ptr.Int64(i64)
+ }
+
+ case strings.EqualFold("transitGatewayAddress", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.TransitGatewayAddress = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("transitGatewayAsn", 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.TransitGatewayAsn = 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 awsEc2query_deserializeDocumentTransitGatewayAttachmentBgpConfigurationList(v *[]types.TransitGatewayAttachmentBgpConfiguration, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.TransitGatewayAttachmentBgpConfiguration
+ if *v == nil {
+ sv = make([]types.TransitGatewayAttachmentBgpConfiguration, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.TransitGatewayAttachmentBgpConfiguration
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentTransitGatewayAttachmentBgpConfiguration(&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 awsEc2query_deserializeDocumentTransitGatewayAttachmentBgpConfigurationListUnwrapped(v *[]types.TransitGatewayAttachmentBgpConfiguration, decoder smithyxml.NodeDecoder) error {
+ var sv []types.TransitGatewayAttachmentBgpConfiguration
+ if *v == nil {
+ sv = make([]types.TransitGatewayAttachmentBgpConfiguration, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.TransitGatewayAttachmentBgpConfiguration
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentTransitGatewayAttachmentBgpConfiguration(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentTransitGatewayAttachmentList(v *[]types.TransitGatewayAttachment, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.TransitGatewayAttachment
+ if *v == nil {
+ sv = make([]types.TransitGatewayAttachment, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.TransitGatewayAttachment
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentTransitGatewayAttachment(&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 awsEc2query_deserializeDocumentTransitGatewayAttachmentListUnwrapped(v *[]types.TransitGatewayAttachment, decoder smithyxml.NodeDecoder) error {
+ var sv []types.TransitGatewayAttachment
+ if *v == nil {
+ sv = make([]types.TransitGatewayAttachment, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.TransitGatewayAttachment
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentTransitGatewayAttachment(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentTransitGatewayAttachmentPropagation(v **types.TransitGatewayAttachmentPropagation, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.TransitGatewayAttachmentPropagation
+ if *v == nil {
+ sv = &types.TransitGatewayAttachmentPropagation{}
+ } 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("state", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.State = types.TransitGatewayPropagationState(xtv)
+ }
+
+ case strings.EqualFold("transitGatewayRouteTableId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.TransitGatewayRouteTableId = 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 awsEc2query_deserializeDocumentTransitGatewayAttachmentPropagationList(v *[]types.TransitGatewayAttachmentPropagation, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.TransitGatewayAttachmentPropagation
+ if *v == nil {
+ sv = make([]types.TransitGatewayAttachmentPropagation, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.TransitGatewayAttachmentPropagation
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentTransitGatewayAttachmentPropagation(&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 awsEc2query_deserializeDocumentTransitGatewayAttachmentPropagationListUnwrapped(v *[]types.TransitGatewayAttachmentPropagation, decoder smithyxml.NodeDecoder) error {
+ var sv []types.TransitGatewayAttachmentPropagation
+ if *v == nil {
+ sv = make([]types.TransitGatewayAttachmentPropagation, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.TransitGatewayAttachmentPropagation
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentTransitGatewayAttachmentPropagation(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentTransitGatewayConnect(v **types.TransitGatewayConnect, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.TransitGatewayConnect
+ if *v == nil {
+ sv = &types.TransitGatewayConnect{}
+ } 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("creationTime", 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.CreationTime = ptr.Time(t)
+ }
+
+ case strings.EqualFold("options", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTransitGatewayConnectOptions(&sv.Options, nodeDecoder); err != nil {
+ return err
+ }
+
+ 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 = types.TransitGatewayAttachmentState(xtv)
+ }
+
+ case strings.EqualFold("tagSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("transitGatewayAttachmentId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.TransitGatewayAttachmentId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("transitGatewayId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.TransitGatewayId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("transportTransitGatewayAttachmentId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.TransportTransitGatewayAttachmentId = 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 awsEc2query_deserializeDocumentTransitGatewayConnectList(v *[]types.TransitGatewayConnect, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.TransitGatewayConnect
+ if *v == nil {
+ sv = make([]types.TransitGatewayConnect, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.TransitGatewayConnect
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentTransitGatewayConnect(&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 awsEc2query_deserializeDocumentTransitGatewayConnectListUnwrapped(v *[]types.TransitGatewayConnect, decoder smithyxml.NodeDecoder) error {
+ var sv []types.TransitGatewayConnect
+ if *v == nil {
+ sv = make([]types.TransitGatewayConnect, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.TransitGatewayConnect
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentTransitGatewayConnect(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentTransitGatewayConnectOptions(v **types.TransitGatewayConnectOptions, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.TransitGatewayConnectOptions
+ if *v == nil {
+ sv = &types.TransitGatewayConnectOptions{}
+ } 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("protocol", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Protocol = types.ProtocolValue(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 awsEc2query_deserializeDocumentTransitGatewayConnectPeer(v **types.TransitGatewayConnectPeer, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.TransitGatewayConnectPeer
+ if *v == nil {
+ sv = &types.TransitGatewayConnectPeer{}
+ } 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("connectPeerConfiguration", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTransitGatewayConnectPeerConfiguration(&sv.ConnectPeerConfiguration, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("creationTime", 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.CreationTime = ptr.Time(t)
+ }
+
+ 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 = types.TransitGatewayConnectPeerState(xtv)
+ }
+
+ case strings.EqualFold("tagSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("transitGatewayAttachmentId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.TransitGatewayAttachmentId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("transitGatewayConnectPeerId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.TransitGatewayConnectPeerId = 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 awsEc2query_deserializeDocumentTransitGatewayConnectPeerConfiguration(v **types.TransitGatewayConnectPeerConfiguration, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.TransitGatewayConnectPeerConfiguration
+ if *v == nil {
+ sv = &types.TransitGatewayConnectPeerConfiguration{}
+ } 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("bgpConfigurations", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTransitGatewayAttachmentBgpConfigurationList(&sv.BgpConfigurations, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("insideCidrBlocks", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentInsideCidrBlocksStringList(&sv.InsideCidrBlocks, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("peerAddress", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.PeerAddress = 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 = types.ProtocolValue(xtv)
+ }
+
+ case strings.EqualFold("transitGatewayAddress", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.TransitGatewayAddress = 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 awsEc2query_deserializeDocumentTransitGatewayConnectPeerList(v *[]types.TransitGatewayConnectPeer, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.TransitGatewayConnectPeer
+ if *v == nil {
+ sv = make([]types.TransitGatewayConnectPeer, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.TransitGatewayConnectPeer
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentTransitGatewayConnectPeer(&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 awsEc2query_deserializeDocumentTransitGatewayConnectPeerListUnwrapped(v *[]types.TransitGatewayConnectPeer, decoder smithyxml.NodeDecoder) error {
+ var sv []types.TransitGatewayConnectPeer
+ if *v == nil {
+ sv = make([]types.TransitGatewayConnectPeer, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.TransitGatewayConnectPeer
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentTransitGatewayConnectPeer(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentTransitGatewayList(v *[]types.TransitGateway, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.TransitGateway
+ if *v == nil {
+ sv = make([]types.TransitGateway, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.TransitGateway
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentTransitGateway(&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 awsEc2query_deserializeDocumentTransitGatewayListUnwrapped(v *[]types.TransitGateway, decoder smithyxml.NodeDecoder) error {
+ var sv []types.TransitGateway
+ if *v == nil {
+ sv = make([]types.TransitGateway, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.TransitGateway
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentTransitGateway(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentTransitGatewayMulticastDeregisteredGroupMembers(v **types.TransitGatewayMulticastDeregisteredGroupMembers, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.TransitGatewayMulticastDeregisteredGroupMembers
+ if *v == nil {
+ sv = &types.TransitGatewayMulticastDeregisteredGroupMembers{}
+ } 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("deregisteredNetworkInterfaceIds", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentValueStringList(&sv.DeregisteredNetworkInterfaceIds, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("groupIpAddress", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.GroupIpAddress = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("transitGatewayMulticastDomainId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.TransitGatewayMulticastDomainId = 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 awsEc2query_deserializeDocumentTransitGatewayMulticastDeregisteredGroupSources(v **types.TransitGatewayMulticastDeregisteredGroupSources, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.TransitGatewayMulticastDeregisteredGroupSources
+ if *v == nil {
+ sv = &types.TransitGatewayMulticastDeregisteredGroupSources{}
+ } 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("deregisteredNetworkInterfaceIds", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentValueStringList(&sv.DeregisteredNetworkInterfaceIds, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("groupIpAddress", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.GroupIpAddress = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("transitGatewayMulticastDomainId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.TransitGatewayMulticastDomainId = 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 awsEc2query_deserializeDocumentTransitGatewayMulticastDomain(v **types.TransitGatewayMulticastDomain, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.TransitGatewayMulticastDomain
+ if *v == nil {
+ sv = &types.TransitGatewayMulticastDomain{}
+ } 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("creationTime", 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.CreationTime = ptr.Time(t)
+ }
+
+ case strings.EqualFold("options", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTransitGatewayMulticastDomainOptions(&sv.Options, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("ownerId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.OwnerId = 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 = types.TransitGatewayMulticastDomainState(xtv)
+ }
+
+ case strings.EqualFold("tagSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("transitGatewayId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.TransitGatewayId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("transitGatewayMulticastDomainArn", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.TransitGatewayMulticastDomainArn = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("transitGatewayMulticastDomainId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.TransitGatewayMulticastDomainId = 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 awsEc2query_deserializeDocumentTransitGatewayMulticastDomainAssociation(v **types.TransitGatewayMulticastDomainAssociation, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.TransitGatewayMulticastDomainAssociation
+ if *v == nil {
+ sv = &types.TransitGatewayMulticastDomainAssociation{}
+ } 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("resourceOwnerId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ResourceOwnerId = 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.TransitGatewayAttachmentResourceType(xtv)
+ }
+
+ case strings.EqualFold("subnet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentSubnetAssociation(&sv.Subnet, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("transitGatewayAttachmentId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.TransitGatewayAttachmentId = 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 awsEc2query_deserializeDocumentTransitGatewayMulticastDomainAssociationList(v *[]types.TransitGatewayMulticastDomainAssociation, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.TransitGatewayMulticastDomainAssociation
+ if *v == nil {
+ sv = make([]types.TransitGatewayMulticastDomainAssociation, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.TransitGatewayMulticastDomainAssociation
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentTransitGatewayMulticastDomainAssociation(&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 awsEc2query_deserializeDocumentTransitGatewayMulticastDomainAssociationListUnwrapped(v *[]types.TransitGatewayMulticastDomainAssociation, decoder smithyxml.NodeDecoder) error {
+ var sv []types.TransitGatewayMulticastDomainAssociation
+ if *v == nil {
+ sv = make([]types.TransitGatewayMulticastDomainAssociation, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.TransitGatewayMulticastDomainAssociation
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentTransitGatewayMulticastDomainAssociation(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentTransitGatewayMulticastDomainAssociations(v **types.TransitGatewayMulticastDomainAssociations, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.TransitGatewayMulticastDomainAssociations
+ if *v == nil {
+ sv = &types.TransitGatewayMulticastDomainAssociations{}
+ } 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("resourceOwnerId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ResourceOwnerId = 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.TransitGatewayAttachmentResourceType(xtv)
+ }
+
+ case strings.EqualFold("subnets", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentSubnetAssociationList(&sv.Subnets, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("transitGatewayAttachmentId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.TransitGatewayAttachmentId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("transitGatewayMulticastDomainId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.TransitGatewayMulticastDomainId = 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 awsEc2query_deserializeDocumentTransitGatewayMulticastDomainList(v *[]types.TransitGatewayMulticastDomain, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.TransitGatewayMulticastDomain
+ if *v == nil {
+ sv = make([]types.TransitGatewayMulticastDomain, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.TransitGatewayMulticastDomain
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentTransitGatewayMulticastDomain(&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 awsEc2query_deserializeDocumentTransitGatewayMulticastDomainListUnwrapped(v *[]types.TransitGatewayMulticastDomain, decoder smithyxml.NodeDecoder) error {
+ var sv []types.TransitGatewayMulticastDomain
+ if *v == nil {
+ sv = make([]types.TransitGatewayMulticastDomain, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.TransitGatewayMulticastDomain
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentTransitGatewayMulticastDomain(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentTransitGatewayMulticastDomainOptions(v **types.TransitGatewayMulticastDomainOptions, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.TransitGatewayMulticastDomainOptions
+ if *v == nil {
+ sv = &types.TransitGatewayMulticastDomainOptions{}
+ } 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("autoAcceptSharedAssociations", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AutoAcceptSharedAssociations = types.AutoAcceptSharedAssociationsValue(xtv)
+ }
+
+ case strings.EqualFold("igmpv2Support", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Igmpv2Support = types.Igmpv2SupportValue(xtv)
+ }
+
+ case strings.EqualFold("staticSourcesSupport", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.StaticSourcesSupport = types.StaticSourcesSupportValue(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 awsEc2query_deserializeDocumentTransitGatewayMulticastGroup(v **types.TransitGatewayMulticastGroup, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.TransitGatewayMulticastGroup
+ if *v == nil {
+ sv = &types.TransitGatewayMulticastGroup{}
+ } 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("groupIpAddress", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.GroupIpAddress = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("groupMember", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.GroupMember = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("groupSource", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.GroupSource = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("memberType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.MemberType = types.MembershipType(xtv)
+ }
+
+ case strings.EqualFold("networkInterfaceId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.NetworkInterfaceId = ptr.String(xtv)
+ }
+
+ 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("resourceOwnerId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ResourceOwnerId = 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.TransitGatewayAttachmentResourceType(xtv)
+ }
+
+ case strings.EqualFold("sourceType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.SourceType = types.MembershipType(xtv)
+ }
+
+ case strings.EqualFold("subnetId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.SubnetId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("transitGatewayAttachmentId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.TransitGatewayAttachmentId = 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 awsEc2query_deserializeDocumentTransitGatewayMulticastGroupList(v *[]types.TransitGatewayMulticastGroup, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.TransitGatewayMulticastGroup
+ if *v == nil {
+ sv = make([]types.TransitGatewayMulticastGroup, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.TransitGatewayMulticastGroup
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentTransitGatewayMulticastGroup(&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 awsEc2query_deserializeDocumentTransitGatewayMulticastGroupListUnwrapped(v *[]types.TransitGatewayMulticastGroup, decoder smithyxml.NodeDecoder) error {
+ var sv []types.TransitGatewayMulticastGroup
+ if *v == nil {
+ sv = make([]types.TransitGatewayMulticastGroup, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.TransitGatewayMulticastGroup
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentTransitGatewayMulticastGroup(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentTransitGatewayMulticastRegisteredGroupMembers(v **types.TransitGatewayMulticastRegisteredGroupMembers, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.TransitGatewayMulticastRegisteredGroupMembers
+ if *v == nil {
+ sv = &types.TransitGatewayMulticastRegisteredGroupMembers{}
+ } 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("groupIpAddress", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.GroupIpAddress = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("registeredNetworkInterfaceIds", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentValueStringList(&sv.RegisteredNetworkInterfaceIds, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("transitGatewayMulticastDomainId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.TransitGatewayMulticastDomainId = 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 awsEc2query_deserializeDocumentTransitGatewayMulticastRegisteredGroupSources(v **types.TransitGatewayMulticastRegisteredGroupSources, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.TransitGatewayMulticastRegisteredGroupSources
+ if *v == nil {
+ sv = &types.TransitGatewayMulticastRegisteredGroupSources{}
+ } 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("groupIpAddress", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.GroupIpAddress = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("registeredNetworkInterfaceIds", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentValueStringList(&sv.RegisteredNetworkInterfaceIds, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("transitGatewayMulticastDomainId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.TransitGatewayMulticastDomainId = 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 awsEc2query_deserializeDocumentTransitGatewayOptions(v **types.TransitGatewayOptions, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.TransitGatewayOptions
+ if *v == nil {
+ sv = &types.TransitGatewayOptions{}
+ } 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("amazonSideAsn", 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.AmazonSideAsn = ptr.Int64(i64)
+ }
+
+ case strings.EqualFold("associationDefaultRouteTableId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AssociationDefaultRouteTableId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("autoAcceptSharedAttachments", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AutoAcceptSharedAttachments = types.AutoAcceptSharedAttachmentsValue(xtv)
+ }
+
+ case strings.EqualFold("defaultRouteTableAssociation", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.DefaultRouteTableAssociation = types.DefaultRouteTableAssociationValue(xtv)
+ }
+
+ case strings.EqualFold("defaultRouteTablePropagation", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.DefaultRouteTablePropagation = types.DefaultRouteTablePropagationValue(xtv)
+ }
+
+ case strings.EqualFold("dnsSupport", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.DnsSupport = types.DnsSupportValue(xtv)
+ }
+
+ case strings.EqualFold("multicastSupport", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.MulticastSupport = types.MulticastSupportValue(xtv)
+ }
+
+ case strings.EqualFold("propagationDefaultRouteTableId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.PropagationDefaultRouteTableId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("transitGatewayCidrBlocks", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentValueStringList(&sv.TransitGatewayCidrBlocks, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("vpnEcmpSupport", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.VpnEcmpSupport = types.VpnEcmpSupportValue(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 awsEc2query_deserializeDocumentTransitGatewayPeeringAttachment(v **types.TransitGatewayPeeringAttachment, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.TransitGatewayPeeringAttachment
+ if *v == nil {
+ sv = &types.TransitGatewayPeeringAttachment{}
+ } 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("accepterTgwInfo", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentPeeringTgwInfo(&sv.AccepterTgwInfo, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("creationTime", 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.CreationTime = ptr.Time(t)
+ }
+
+ case strings.EqualFold("requesterTgwInfo", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentPeeringTgwInfo(&sv.RequesterTgwInfo, nodeDecoder); err != nil {
+ return err
+ }
+
+ 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 = types.TransitGatewayAttachmentState(xtv)
+ }
+
+ case strings.EqualFold("status", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentPeeringAttachmentStatus(&sv.Status, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("tagSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("transitGatewayAttachmentId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.TransitGatewayAttachmentId = 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 awsEc2query_deserializeDocumentTransitGatewayPeeringAttachmentList(v *[]types.TransitGatewayPeeringAttachment, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.TransitGatewayPeeringAttachment
+ if *v == nil {
+ sv = make([]types.TransitGatewayPeeringAttachment, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.TransitGatewayPeeringAttachment
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentTransitGatewayPeeringAttachment(&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 awsEc2query_deserializeDocumentTransitGatewayPeeringAttachmentListUnwrapped(v *[]types.TransitGatewayPeeringAttachment, decoder smithyxml.NodeDecoder) error {
+ var sv []types.TransitGatewayPeeringAttachment
+ if *v == nil {
+ sv = make([]types.TransitGatewayPeeringAttachment, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.TransitGatewayPeeringAttachment
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentTransitGatewayPeeringAttachment(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentTransitGatewayPrefixListAttachment(v **types.TransitGatewayPrefixListAttachment, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.TransitGatewayPrefixListAttachment
+ if *v == nil {
+ sv = &types.TransitGatewayPrefixListAttachment{}
+ } 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.TransitGatewayAttachmentResourceType(xtv)
+ }
+
+ case strings.EqualFold("transitGatewayAttachmentId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.TransitGatewayAttachmentId = 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 awsEc2query_deserializeDocumentTransitGatewayPrefixListReference(v **types.TransitGatewayPrefixListReference, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.TransitGatewayPrefixListReference
+ if *v == nil {
+ sv = &types.TransitGatewayPrefixListReference{}
+ } 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("blackhole", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.Blackhole = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("prefixListId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.PrefixListId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("prefixListOwnerId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.PrefixListOwnerId = 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 = types.TransitGatewayPrefixListReferenceState(xtv)
+ }
+
+ case strings.EqualFold("transitGatewayAttachment", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTransitGatewayPrefixListAttachment(&sv.TransitGatewayAttachment, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("transitGatewayRouteTableId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.TransitGatewayRouteTableId = 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 awsEc2query_deserializeDocumentTransitGatewayPrefixListReferenceSet(v *[]types.TransitGatewayPrefixListReference, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.TransitGatewayPrefixListReference
+ if *v == nil {
+ sv = make([]types.TransitGatewayPrefixListReference, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.TransitGatewayPrefixListReference
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentTransitGatewayPrefixListReference(&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 awsEc2query_deserializeDocumentTransitGatewayPrefixListReferenceSetUnwrapped(v *[]types.TransitGatewayPrefixListReference, decoder smithyxml.NodeDecoder) error {
+ var sv []types.TransitGatewayPrefixListReference
+ if *v == nil {
+ sv = make([]types.TransitGatewayPrefixListReference, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.TransitGatewayPrefixListReference
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentTransitGatewayPrefixListReference(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentTransitGatewayPropagation(v **types.TransitGatewayPropagation, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.TransitGatewayPropagation
+ if *v == nil {
+ sv = &types.TransitGatewayPropagation{}
+ } 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.TransitGatewayAttachmentResourceType(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 = types.TransitGatewayPropagationState(xtv)
+ }
+
+ case strings.EqualFold("transitGatewayAttachmentId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.TransitGatewayAttachmentId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("transitGatewayRouteTableId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.TransitGatewayRouteTableId = 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 awsEc2query_deserializeDocumentTransitGatewayRoute(v **types.TransitGatewayRoute, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.TransitGatewayRoute
+ if *v == nil {
+ sv = &types.TransitGatewayRoute{}
+ } 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("destinationCidrBlock", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.DestinationCidrBlock = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("prefixListId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.PrefixListId = 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 = types.TransitGatewayRouteState(xtv)
+ }
+
+ case strings.EqualFold("transitGatewayAttachments", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTransitGatewayRouteAttachmentList(&sv.TransitGatewayAttachments, nodeDecoder); err != nil {
+ return err
+ }
+
+ 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.TransitGatewayRouteType(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 awsEc2query_deserializeDocumentTransitGatewayRouteAttachment(v **types.TransitGatewayRouteAttachment, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.TransitGatewayRouteAttachment
+ if *v == nil {
+ sv = &types.TransitGatewayRouteAttachment{}
+ } 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.TransitGatewayAttachmentResourceType(xtv)
+ }
+
+ case strings.EqualFold("transitGatewayAttachmentId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.TransitGatewayAttachmentId = 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 awsEc2query_deserializeDocumentTransitGatewayRouteAttachmentList(v *[]types.TransitGatewayRouteAttachment, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.TransitGatewayRouteAttachment
+ if *v == nil {
+ sv = make([]types.TransitGatewayRouteAttachment, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.TransitGatewayRouteAttachment
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentTransitGatewayRouteAttachment(&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 awsEc2query_deserializeDocumentTransitGatewayRouteAttachmentListUnwrapped(v *[]types.TransitGatewayRouteAttachment, decoder smithyxml.NodeDecoder) error {
+ var sv []types.TransitGatewayRouteAttachment
+ if *v == nil {
+ sv = make([]types.TransitGatewayRouteAttachment, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.TransitGatewayRouteAttachment
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentTransitGatewayRouteAttachment(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentTransitGatewayRouteList(v *[]types.TransitGatewayRoute, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.TransitGatewayRoute
+ if *v == nil {
+ sv = make([]types.TransitGatewayRoute, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.TransitGatewayRoute
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentTransitGatewayRoute(&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 awsEc2query_deserializeDocumentTransitGatewayRouteListUnwrapped(v *[]types.TransitGatewayRoute, decoder smithyxml.NodeDecoder) error {
+ var sv []types.TransitGatewayRoute
+ if *v == nil {
+ sv = make([]types.TransitGatewayRoute, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.TransitGatewayRoute
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentTransitGatewayRoute(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentTransitGatewayRouteTable(v **types.TransitGatewayRouteTable, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.TransitGatewayRouteTable
+ if *v == nil {
+ sv = &types.TransitGatewayRouteTable{}
+ } 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("creationTime", 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.CreationTime = ptr.Time(t)
+ }
+
+ case strings.EqualFold("defaultAssociationRouteTable", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.DefaultAssociationRouteTable = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("defaultPropagationRouteTable", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.DefaultPropagationRouteTable = ptr.Bool(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 = types.TransitGatewayRouteTableState(xtv)
+ }
+
+ case strings.EqualFold("tagSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("transitGatewayId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.TransitGatewayId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("transitGatewayRouteTableId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.TransitGatewayRouteTableId = 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 awsEc2query_deserializeDocumentTransitGatewayRouteTableAssociation(v **types.TransitGatewayRouteTableAssociation, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.TransitGatewayRouteTableAssociation
+ if *v == nil {
+ sv = &types.TransitGatewayRouteTableAssociation{}
+ } 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.TransitGatewayAttachmentResourceType(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 = types.TransitGatewayAssociationState(xtv)
+ }
+
+ case strings.EqualFold("transitGatewayAttachmentId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.TransitGatewayAttachmentId = 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 awsEc2query_deserializeDocumentTransitGatewayRouteTableAssociationList(v *[]types.TransitGatewayRouteTableAssociation, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.TransitGatewayRouteTableAssociation
+ if *v == nil {
+ sv = make([]types.TransitGatewayRouteTableAssociation, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.TransitGatewayRouteTableAssociation
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentTransitGatewayRouteTableAssociation(&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 awsEc2query_deserializeDocumentTransitGatewayRouteTableAssociationListUnwrapped(v *[]types.TransitGatewayRouteTableAssociation, decoder smithyxml.NodeDecoder) error {
+ var sv []types.TransitGatewayRouteTableAssociation
+ if *v == nil {
+ sv = make([]types.TransitGatewayRouteTableAssociation, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.TransitGatewayRouteTableAssociation
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentTransitGatewayRouteTableAssociation(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentTransitGatewayRouteTableList(v *[]types.TransitGatewayRouteTable, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.TransitGatewayRouteTable
+ if *v == nil {
+ sv = make([]types.TransitGatewayRouteTable, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.TransitGatewayRouteTable
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentTransitGatewayRouteTable(&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 awsEc2query_deserializeDocumentTransitGatewayRouteTableListUnwrapped(v *[]types.TransitGatewayRouteTable, decoder smithyxml.NodeDecoder) error {
+ var sv []types.TransitGatewayRouteTable
+ if *v == nil {
+ sv = make([]types.TransitGatewayRouteTable, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.TransitGatewayRouteTable
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentTransitGatewayRouteTable(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentTransitGatewayRouteTablePropagation(v **types.TransitGatewayRouteTablePropagation, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.TransitGatewayRouteTablePropagation
+ if *v == nil {
+ sv = &types.TransitGatewayRouteTablePropagation{}
+ } 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.TransitGatewayAttachmentResourceType(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 = types.TransitGatewayPropagationState(xtv)
+ }
+
+ case strings.EqualFold("transitGatewayAttachmentId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.TransitGatewayAttachmentId = 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 awsEc2query_deserializeDocumentTransitGatewayRouteTablePropagationList(v *[]types.TransitGatewayRouteTablePropagation, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.TransitGatewayRouteTablePropagation
+ if *v == nil {
+ sv = make([]types.TransitGatewayRouteTablePropagation, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.TransitGatewayRouteTablePropagation
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentTransitGatewayRouteTablePropagation(&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 awsEc2query_deserializeDocumentTransitGatewayRouteTablePropagationListUnwrapped(v *[]types.TransitGatewayRouteTablePropagation, decoder smithyxml.NodeDecoder) error {
+ var sv []types.TransitGatewayRouteTablePropagation
+ if *v == nil {
+ sv = make([]types.TransitGatewayRouteTablePropagation, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.TransitGatewayRouteTablePropagation
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentTransitGatewayRouteTablePropagation(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentTransitGatewayVpcAttachment(v **types.TransitGatewayVpcAttachment, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.TransitGatewayVpcAttachment
+ if *v == nil {
+ sv = &types.TransitGatewayVpcAttachment{}
+ } 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("creationTime", 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.CreationTime = ptr.Time(t)
+ }
+
+ case strings.EqualFold("options", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTransitGatewayVpcAttachmentOptions(&sv.Options, nodeDecoder); err != nil {
+ return err
+ }
+
+ 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 = types.TransitGatewayAttachmentState(xtv)
+ }
+
+ case strings.EqualFold("subnetIds", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentValueStringList(&sv.SubnetIds, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("tagSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("transitGatewayAttachmentId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.TransitGatewayAttachmentId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("transitGatewayId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.TransitGatewayId = ptr.String(xtv)
+ }
+
+ 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("vpcOwnerId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.VpcOwnerId = 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 awsEc2query_deserializeDocumentTransitGatewayVpcAttachmentList(v *[]types.TransitGatewayVpcAttachment, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.TransitGatewayVpcAttachment
+ if *v == nil {
+ sv = make([]types.TransitGatewayVpcAttachment, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.TransitGatewayVpcAttachment
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentTransitGatewayVpcAttachment(&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 awsEc2query_deserializeDocumentTransitGatewayVpcAttachmentListUnwrapped(v *[]types.TransitGatewayVpcAttachment, decoder smithyxml.NodeDecoder) error {
+ var sv []types.TransitGatewayVpcAttachment
+ if *v == nil {
+ sv = make([]types.TransitGatewayVpcAttachment, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.TransitGatewayVpcAttachment
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentTransitGatewayVpcAttachment(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentTransitGatewayVpcAttachmentOptions(v **types.TransitGatewayVpcAttachmentOptions, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.TransitGatewayVpcAttachmentOptions
+ if *v == nil {
+ sv = &types.TransitGatewayVpcAttachmentOptions{}
+ } 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("applianceModeSupport", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ApplianceModeSupport = types.ApplianceModeSupportValue(xtv)
+ }
+
+ case strings.EqualFold("dnsSupport", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.DnsSupport = types.DnsSupportValue(xtv)
+ }
+
+ case strings.EqualFold("ipv6Support", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Ipv6Support = types.Ipv6SupportValue(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 awsEc2query_deserializeDocumentTrunkInterfaceAssociation(v **types.TrunkInterfaceAssociation, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.TrunkInterfaceAssociation
+ if *v == nil {
+ sv = &types.TrunkInterfaceAssociation{}
+ } 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("associationId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AssociationId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("branchInterfaceId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.BranchInterfaceId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("greKey", 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.GreKey = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("interfaceProtocol", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.InterfaceProtocol = types.InterfaceProtocolType(xtv)
+ }
+
+ case strings.EqualFold("tagSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("trunkInterfaceId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.TrunkInterfaceId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("vlanId", 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.VlanId = 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 awsEc2query_deserializeDocumentTrunkInterfaceAssociationList(v *[]types.TrunkInterfaceAssociation, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.TrunkInterfaceAssociation
+ if *v == nil {
+ sv = make([]types.TrunkInterfaceAssociation, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.TrunkInterfaceAssociation
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentTrunkInterfaceAssociation(&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 awsEc2query_deserializeDocumentTrunkInterfaceAssociationListUnwrapped(v *[]types.TrunkInterfaceAssociation, decoder smithyxml.NodeDecoder) error {
+ var sv []types.TrunkInterfaceAssociation
+ if *v == nil {
+ sv = make([]types.TrunkInterfaceAssociation, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.TrunkInterfaceAssociation
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentTrunkInterfaceAssociation(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentTunnelOption(v **types.TunnelOption, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.TunnelOption
+ if *v == nil {
+ sv = &types.TunnelOption{}
+ } 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("dpdTimeoutAction", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.DpdTimeoutAction = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("dpdTimeoutSeconds", 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.DpdTimeoutSeconds = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("ikeVersionSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentIKEVersionsList(&sv.IkeVersions, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("outsideIpAddress", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.OutsideIpAddress = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("phase1DHGroupNumberSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentPhase1DHGroupNumbersList(&sv.Phase1DHGroupNumbers, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("phase1EncryptionAlgorithmSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentPhase1EncryptionAlgorithmsList(&sv.Phase1EncryptionAlgorithms, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("phase1IntegrityAlgorithmSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentPhase1IntegrityAlgorithmsList(&sv.Phase1IntegrityAlgorithms, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("phase1LifetimeSeconds", 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.Phase1LifetimeSeconds = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("phase2DHGroupNumberSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentPhase2DHGroupNumbersList(&sv.Phase2DHGroupNumbers, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("phase2EncryptionAlgorithmSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentPhase2EncryptionAlgorithmsList(&sv.Phase2EncryptionAlgorithms, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("phase2IntegrityAlgorithmSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentPhase2IntegrityAlgorithmsList(&sv.Phase2IntegrityAlgorithms, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("phase2LifetimeSeconds", 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.Phase2LifetimeSeconds = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("preSharedKey", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.PreSharedKey = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("rekeyFuzzPercentage", 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.RekeyFuzzPercentage = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("rekeyMarginTimeSeconds", 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.RekeyMarginTimeSeconds = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("replayWindowSize", 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.ReplayWindowSize = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("startupAction", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.StartupAction = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("tunnelInsideCidr", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.TunnelInsideCidr = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("tunnelInsideIpv6Cidr", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.TunnelInsideIpv6Cidr = 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 awsEc2query_deserializeDocumentTunnelOptionsList(v *[]types.TunnelOption, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.TunnelOption
+ if *v == nil {
+ sv = make([]types.TunnelOption, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.TunnelOption
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentTunnelOption(&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 awsEc2query_deserializeDocumentTunnelOptionsListUnwrapped(v *[]types.TunnelOption, decoder smithyxml.NodeDecoder) error {
+ var sv []types.TunnelOption
+ if *v == nil {
+ sv = make([]types.TunnelOption, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.TunnelOption
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentTunnelOption(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentUnsuccessfulInstanceCreditSpecificationItem(v **types.UnsuccessfulInstanceCreditSpecificationItem, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.UnsuccessfulInstanceCreditSpecificationItem
+ if *v == nil {
+ sv = &types.UnsuccessfulInstanceCreditSpecificationItem{}
+ } 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("error", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentUnsuccessfulInstanceCreditSpecificationItemError(&sv.Error, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("instanceId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.InstanceId = 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 awsEc2query_deserializeDocumentUnsuccessfulInstanceCreditSpecificationItemError(v **types.UnsuccessfulInstanceCreditSpecificationItemError, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.UnsuccessfulInstanceCreditSpecificationItemError
+ if *v == nil {
+ sv = &types.UnsuccessfulInstanceCreditSpecificationItemError{}
+ } 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("code", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Code = types.UnsuccessfulInstanceCreditSpecificationErrorCode(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)
+ }
+
+ 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 awsEc2query_deserializeDocumentUnsuccessfulInstanceCreditSpecificationSet(v *[]types.UnsuccessfulInstanceCreditSpecificationItem, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.UnsuccessfulInstanceCreditSpecificationItem
+ if *v == nil {
+ sv = make([]types.UnsuccessfulInstanceCreditSpecificationItem, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.UnsuccessfulInstanceCreditSpecificationItem
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentUnsuccessfulInstanceCreditSpecificationItem(&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 awsEc2query_deserializeDocumentUnsuccessfulInstanceCreditSpecificationSetUnwrapped(v *[]types.UnsuccessfulInstanceCreditSpecificationItem, decoder smithyxml.NodeDecoder) error {
+ var sv []types.UnsuccessfulInstanceCreditSpecificationItem
+ if *v == nil {
+ sv = make([]types.UnsuccessfulInstanceCreditSpecificationItem, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.UnsuccessfulInstanceCreditSpecificationItem
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentUnsuccessfulInstanceCreditSpecificationItem(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentUnsuccessfulItem(v **types.UnsuccessfulItem, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.UnsuccessfulItem
+ if *v == nil {
+ sv = &types.UnsuccessfulItem{}
+ } 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("error", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentUnsuccessfulItemError(&sv.Error, nodeDecoder); err != nil {
+ return err
+ }
+
+ 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)
+ }
+
+ 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 awsEc2query_deserializeDocumentUnsuccessfulItemError(v **types.UnsuccessfulItemError, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.UnsuccessfulItemError
+ if *v == nil {
+ sv = &types.UnsuccessfulItemError{}
+ } 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("code", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Code = 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)
+ }
+
+ 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 awsEc2query_deserializeDocumentUnsuccessfulItemList(v *[]types.UnsuccessfulItem, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.UnsuccessfulItem
+ if *v == nil {
+ sv = make([]types.UnsuccessfulItem, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.UnsuccessfulItem
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentUnsuccessfulItem(&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 awsEc2query_deserializeDocumentUnsuccessfulItemListUnwrapped(v *[]types.UnsuccessfulItem, decoder smithyxml.NodeDecoder) error {
+ var sv []types.UnsuccessfulItem
+ if *v == nil {
+ sv = make([]types.UnsuccessfulItem, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.UnsuccessfulItem
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentUnsuccessfulItem(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentUnsuccessfulItemSet(v *[]types.UnsuccessfulItem, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.UnsuccessfulItem
+ if *v == nil {
+ sv = make([]types.UnsuccessfulItem, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.UnsuccessfulItem
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentUnsuccessfulItem(&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 awsEc2query_deserializeDocumentUnsuccessfulItemSetUnwrapped(v *[]types.UnsuccessfulItem, decoder smithyxml.NodeDecoder) error {
+ var sv []types.UnsuccessfulItem
+ if *v == nil {
+ sv = make([]types.UnsuccessfulItem, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.UnsuccessfulItem
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentUnsuccessfulItem(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentUsageClassTypeList(v *[]types.UsageClassType, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.UsageClassType
+ if *v == nil {
+ sv = make([]types.UsageClassType, 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("item", t.Name.Local):
+ var col types.UsageClassType
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ col = types.UsageClassType(xtv)
+ }
+ sv = append(sv, col)
+
+ default:
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsEc2query_deserializeDocumentUsageClassTypeListUnwrapped(v *[]types.UsageClassType, decoder smithyxml.NodeDecoder) error {
+ var sv []types.UsageClassType
+ if *v == nil {
+ sv = make([]types.UsageClassType, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.UsageClassType
+ t := decoder.StartEl
+ _ = t
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ mv = types.UsageClassType(xtv)
+ }
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentUserBucketDetails(v **types.UserBucketDetails, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.UserBucketDetails
+ if *v == nil {
+ sv = &types.UserBucketDetails{}
+ } 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("s3Bucket", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.S3Bucket = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("s3Key", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.S3Key = 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 awsEc2query_deserializeDocumentUserIdGroupPair(v **types.UserIdGroupPair, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.UserIdGroupPair
+ if *v == nil {
+ sv = &types.UserIdGroupPair{}
+ } 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("groupId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.GroupId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("groupName", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.GroupName = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("peeringStatus", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.PeeringStatus = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("userId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.UserId = ptr.String(xtv)
+ }
+
+ 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("vpcPeeringConnectionId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.VpcPeeringConnectionId = 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 awsEc2query_deserializeDocumentUserIdGroupPairList(v *[]types.UserIdGroupPair, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.UserIdGroupPair
+ if *v == nil {
+ sv = make([]types.UserIdGroupPair, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.UserIdGroupPair
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentUserIdGroupPair(&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 awsEc2query_deserializeDocumentUserIdGroupPairListUnwrapped(v *[]types.UserIdGroupPair, decoder smithyxml.NodeDecoder) error {
+ var sv []types.UserIdGroupPair
+ if *v == nil {
+ sv = make([]types.UserIdGroupPair, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.UserIdGroupPair
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentUserIdGroupPair(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentUserIdGroupPairSet(v *[]types.UserIdGroupPair, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.UserIdGroupPair
+ if *v == nil {
+ sv = make([]types.UserIdGroupPair, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.UserIdGroupPair
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentUserIdGroupPair(&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 awsEc2query_deserializeDocumentUserIdGroupPairSetUnwrapped(v *[]types.UserIdGroupPair, decoder smithyxml.NodeDecoder) error {
+ var sv []types.UserIdGroupPair
+ if *v == nil {
+ sv = make([]types.UserIdGroupPair, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.UserIdGroupPair
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentUserIdGroupPair(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentValidationError(v **types.ValidationError, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.ValidationError
+ if *v == nil {
+ sv = &types.ValidationError{}
+ } 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("code", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Code = 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)
+ }
+
+ 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 awsEc2query_deserializeDocumentValidationWarning(v **types.ValidationWarning, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.ValidationWarning
+ if *v == nil {
+ sv = &types.ValidationWarning{}
+ } 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("errorSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentErrorSet(&sv.Errors, 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 awsEc2query_deserializeDocumentValueStringList(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("item", 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 awsEc2query_deserializeDocumentValueStringListUnwrapped(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 awsEc2query_deserializeDocumentVCpuInfo(v **types.VCpuInfo, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.VCpuInfo
+ if *v == nil {
+ sv = &types.VCpuInfo{}
+ } 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("defaultCores", 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.DefaultCores = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("defaultThreadsPerCore", 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.DefaultThreadsPerCore = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("defaultVCpus", 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.DefaultVCpus = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("validCores", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentCoreCountList(&sv.ValidCores, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("validThreadsPerCore", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentThreadsPerCoreList(&sv.ValidThreadsPerCore, 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 awsEc2query_deserializeDocumentVgwTelemetry(v **types.VgwTelemetry, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.VgwTelemetry
+ if *v == nil {
+ sv = &types.VgwTelemetry{}
+ } 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("acceptedRouteCount", 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.AcceptedRouteCount = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("certificateArn", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.CertificateArn = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("lastStatusChange", 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.LastStatusChange = ptr.Time(t)
+ }
+
+ case strings.EqualFold("outsideIpAddress", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.OutsideIpAddress = 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.TelemetryStatus(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 awsEc2query_deserializeDocumentVgwTelemetryList(v *[]types.VgwTelemetry, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.VgwTelemetry
+ if *v == nil {
+ sv = make([]types.VgwTelemetry, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.VgwTelemetry
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentVgwTelemetry(&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 awsEc2query_deserializeDocumentVgwTelemetryListUnwrapped(v *[]types.VgwTelemetry, decoder smithyxml.NodeDecoder) error {
+ var sv []types.VgwTelemetry
+ if *v == nil {
+ sv = make([]types.VgwTelemetry, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.VgwTelemetry
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentVgwTelemetry(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentVirtualizationTypeList(v *[]types.VirtualizationType, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.VirtualizationType
+ if *v == nil {
+ sv = make([]types.VirtualizationType, 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("item", t.Name.Local):
+ var col types.VirtualizationType
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ col = types.VirtualizationType(xtv)
+ }
+ sv = append(sv, col)
+
+ default:
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsEc2query_deserializeDocumentVirtualizationTypeListUnwrapped(v *[]types.VirtualizationType, decoder smithyxml.NodeDecoder) error {
+ var sv []types.VirtualizationType
+ if *v == nil {
+ sv = make([]types.VirtualizationType, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.VirtualizationType
+ t := decoder.StartEl
+ _ = t
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ mv = types.VirtualizationType(xtv)
+ }
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentVolume(v **types.Volume, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.Volume
+ if *v == nil {
+ sv = &types.Volume{}
+ } 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("attachmentSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentVolumeAttachmentList(&sv.Attachments, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("availabilityZone", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AvailabilityZone = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("createTime", 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.CreateTime = ptr.Time(t)
+ }
+
+ case strings.EqualFold("encrypted", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.Encrypted = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("fastRestored", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.FastRestored = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("iops", 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.Iops = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("kmsKeyId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.KmsKeyId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("multiAttachEnabled", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.MultiAttachEnabled = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("outpostArn", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.OutpostArn = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("size", 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.Size = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("snapshotId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.SnapshotId = 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.State = types.VolumeState(xtv)
+ }
+
+ case strings.EqualFold("tagSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("throughput", 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.Throughput = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("volumeId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.VolumeId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("volumeType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.VolumeType = types.VolumeType(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 awsEc2query_deserializeDocumentVolumeAttachment(v **types.VolumeAttachment, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.VolumeAttachment
+ if *v == nil {
+ sv = &types.VolumeAttachment{}
+ } 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("attachTime", 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.AttachTime = ptr.Time(t)
+ }
+
+ case strings.EqualFold("deleteOnTermination", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.DeleteOnTermination = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("device", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Device = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("instanceId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.InstanceId = 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.State = types.VolumeAttachmentState(xtv)
+ }
+
+ case strings.EqualFold("volumeId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.VolumeId = 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 awsEc2query_deserializeDocumentVolumeAttachmentList(v *[]types.VolumeAttachment, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.VolumeAttachment
+ if *v == nil {
+ sv = make([]types.VolumeAttachment, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.VolumeAttachment
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentVolumeAttachment(&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 awsEc2query_deserializeDocumentVolumeAttachmentListUnwrapped(v *[]types.VolumeAttachment, decoder smithyxml.NodeDecoder) error {
+ var sv []types.VolumeAttachment
+ if *v == nil {
+ sv = make([]types.VolumeAttachment, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.VolumeAttachment
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentVolumeAttachment(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentVolumeList(v *[]types.Volume, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.Volume
+ if *v == nil {
+ sv = make([]types.Volume, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.Volume
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentVolume(&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 awsEc2query_deserializeDocumentVolumeListUnwrapped(v *[]types.Volume, decoder smithyxml.NodeDecoder) error {
+ var sv []types.Volume
+ if *v == nil {
+ sv = make([]types.Volume, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.Volume
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentVolume(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentVolumeModification(v **types.VolumeModification, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.VolumeModification
+ if *v == nil {
+ sv = &types.VolumeModification{}
+ } 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("endTime", 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.EndTime = ptr.Time(t)
+ }
+
+ case strings.EqualFold("modificationState", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ModificationState = types.VolumeModificationState(xtv)
+ }
+
+ case strings.EqualFold("originalIops", 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.OriginalIops = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("originalMultiAttachEnabled", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.OriginalMultiAttachEnabled = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("originalSize", 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.OriginalSize = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("originalThroughput", 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.OriginalThroughput = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("originalVolumeType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.OriginalVolumeType = types.VolumeType(xtv)
+ }
+
+ case strings.EqualFold("progress", 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.Progress = ptr.Int64(i64)
+ }
+
+ case strings.EqualFold("startTime", 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.StartTime = ptr.Time(t)
+ }
+
+ 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)
+ }
+
+ case strings.EqualFold("targetIops", 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.TargetIops = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("targetMultiAttachEnabled", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.TargetMultiAttachEnabled = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("targetSize", 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.TargetSize = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("targetThroughput", 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.TargetThroughput = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("targetVolumeType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.TargetVolumeType = types.VolumeType(xtv)
+ }
+
+ case strings.EqualFold("volumeId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.VolumeId = 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 awsEc2query_deserializeDocumentVolumeModificationList(v *[]types.VolumeModification, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.VolumeModification
+ if *v == nil {
+ sv = make([]types.VolumeModification, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.VolumeModification
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentVolumeModification(&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 awsEc2query_deserializeDocumentVolumeModificationListUnwrapped(v *[]types.VolumeModification, decoder smithyxml.NodeDecoder) error {
+ var sv []types.VolumeModification
+ if *v == nil {
+ sv = make([]types.VolumeModification, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.VolumeModification
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentVolumeModification(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentVolumeStatusAction(v **types.VolumeStatusAction, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.VolumeStatusAction
+ if *v == nil {
+ sv = &types.VolumeStatusAction{}
+ } 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("code", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Code = ptr.String(xtv)
+ }
+
+ 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("eventId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.EventId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("eventType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.EventType = 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 awsEc2query_deserializeDocumentVolumeStatusActionsList(v *[]types.VolumeStatusAction, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.VolumeStatusAction
+ if *v == nil {
+ sv = make([]types.VolumeStatusAction, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.VolumeStatusAction
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentVolumeStatusAction(&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 awsEc2query_deserializeDocumentVolumeStatusActionsListUnwrapped(v *[]types.VolumeStatusAction, decoder smithyxml.NodeDecoder) error {
+ var sv []types.VolumeStatusAction
+ if *v == nil {
+ sv = make([]types.VolumeStatusAction, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.VolumeStatusAction
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentVolumeStatusAction(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentVolumeStatusAttachmentStatus(v **types.VolumeStatusAttachmentStatus, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.VolumeStatusAttachmentStatus
+ if *v == nil {
+ sv = &types.VolumeStatusAttachmentStatus{}
+ } 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("instanceId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.InstanceId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("ioPerformance", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.IoPerformance = 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 awsEc2query_deserializeDocumentVolumeStatusAttachmentStatusList(v *[]types.VolumeStatusAttachmentStatus, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.VolumeStatusAttachmentStatus
+ if *v == nil {
+ sv = make([]types.VolumeStatusAttachmentStatus, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.VolumeStatusAttachmentStatus
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentVolumeStatusAttachmentStatus(&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 awsEc2query_deserializeDocumentVolumeStatusAttachmentStatusListUnwrapped(v *[]types.VolumeStatusAttachmentStatus, decoder smithyxml.NodeDecoder) error {
+ var sv []types.VolumeStatusAttachmentStatus
+ if *v == nil {
+ sv = make([]types.VolumeStatusAttachmentStatus, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.VolumeStatusAttachmentStatus
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentVolumeStatusAttachmentStatus(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentVolumeStatusDetails(v **types.VolumeStatusDetails, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.VolumeStatusDetails
+ if *v == nil {
+ sv = &types.VolumeStatusDetails{}
+ } 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 = types.VolumeStatusName(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 = 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 awsEc2query_deserializeDocumentVolumeStatusDetailsList(v *[]types.VolumeStatusDetails, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.VolumeStatusDetails
+ if *v == nil {
+ sv = make([]types.VolumeStatusDetails, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.VolumeStatusDetails
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentVolumeStatusDetails(&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 awsEc2query_deserializeDocumentVolumeStatusDetailsListUnwrapped(v *[]types.VolumeStatusDetails, decoder smithyxml.NodeDecoder) error {
+ var sv []types.VolumeStatusDetails
+ if *v == nil {
+ sv = make([]types.VolumeStatusDetails, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.VolumeStatusDetails
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentVolumeStatusDetails(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentVolumeStatusEvent(v **types.VolumeStatusEvent, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.VolumeStatusEvent
+ if *v == nil {
+ sv = &types.VolumeStatusEvent{}
+ } 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("eventId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.EventId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("eventType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.EventType = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("instanceId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.InstanceId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("notAfter", 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.NotAfter = ptr.Time(t)
+ }
+
+ case strings.EqualFold("notBefore", 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.NotBefore = 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 awsEc2query_deserializeDocumentVolumeStatusEventsList(v *[]types.VolumeStatusEvent, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.VolumeStatusEvent
+ if *v == nil {
+ sv = make([]types.VolumeStatusEvent, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.VolumeStatusEvent
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentVolumeStatusEvent(&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 awsEc2query_deserializeDocumentVolumeStatusEventsListUnwrapped(v *[]types.VolumeStatusEvent, decoder smithyxml.NodeDecoder) error {
+ var sv []types.VolumeStatusEvent
+ if *v == nil {
+ sv = make([]types.VolumeStatusEvent, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.VolumeStatusEvent
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentVolumeStatusEvent(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentVolumeStatusInfo(v **types.VolumeStatusInfo, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.VolumeStatusInfo
+ if *v == nil {
+ sv = &types.VolumeStatusInfo{}
+ } 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("details", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentVolumeStatusDetailsList(&sv.Details, nodeDecoder); err != nil {
+ return err
+ }
+
+ 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.VolumeStatusInfoStatus(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 awsEc2query_deserializeDocumentVolumeStatusItem(v **types.VolumeStatusItem, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.VolumeStatusItem
+ if *v == nil {
+ sv = &types.VolumeStatusItem{}
+ } 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("actionsSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentVolumeStatusActionsList(&sv.Actions, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("attachmentStatuses", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentVolumeStatusAttachmentStatusList(&sv.AttachmentStatuses, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("availabilityZone", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AvailabilityZone = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("eventsSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentVolumeStatusEventsList(&sv.Events, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("outpostArn", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.OutpostArn = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("volumeId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.VolumeId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("volumeStatus", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentVolumeStatusInfo(&sv.VolumeStatus, 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 awsEc2query_deserializeDocumentVolumeStatusList(v *[]types.VolumeStatusItem, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.VolumeStatusItem
+ if *v == nil {
+ sv = make([]types.VolumeStatusItem, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.VolumeStatusItem
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentVolumeStatusItem(&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 awsEc2query_deserializeDocumentVolumeStatusListUnwrapped(v *[]types.VolumeStatusItem, decoder smithyxml.NodeDecoder) error {
+ var sv []types.VolumeStatusItem
+ if *v == nil {
+ sv = make([]types.VolumeStatusItem, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.VolumeStatusItem
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentVolumeStatusItem(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_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("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("cidrBlockAssociationSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentVpcCidrBlockAssociationSet(&sv.CidrBlockAssociationSet, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("dhcpOptionsId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.DhcpOptionsId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("instanceTenancy", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.InstanceTenancy = types.Tenancy(xtv)
+ }
+
+ case strings.EqualFold("ipv6CidrBlockAssociationSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentVpcIpv6CidrBlockAssociationSet(&sv.Ipv6CidrBlockAssociationSet, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("isDefault", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.IsDefault = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("ownerId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.OwnerId = 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 = types.VpcState(xtv)
+ }
+
+ case strings.EqualFold("tagSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil {
+ return err
+ }
+
+ 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)
+ }
+
+ 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 awsEc2query_deserializeDocumentVpcAttachment(v **types.VpcAttachment, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.VpcAttachment
+ if *v == nil {
+ sv = &types.VpcAttachment{}
+ } 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("state", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.State = types.AttachmentStatus(xtv)
+ }
+
+ 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)
+ }
+
+ 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 awsEc2query_deserializeDocumentVpcAttachmentList(v *[]types.VpcAttachment, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.VpcAttachment
+ if *v == nil {
+ sv = make([]types.VpcAttachment, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.VpcAttachment
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentVpcAttachment(&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 awsEc2query_deserializeDocumentVpcAttachmentListUnwrapped(v *[]types.VpcAttachment, decoder smithyxml.NodeDecoder) error {
+ var sv []types.VpcAttachment
+ if *v == nil {
+ sv = make([]types.VpcAttachment, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.VpcAttachment
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentVpcAttachment(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentVpcCidrBlockAssociation(v **types.VpcCidrBlockAssociation, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.VpcCidrBlockAssociation
+ if *v == nil {
+ sv = &types.VpcCidrBlockAssociation{}
+ } 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("associationId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AssociationId = ptr.String(xtv)
+ }
+
+ 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("cidrBlockState", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentVpcCidrBlockState(&sv.CidrBlockState, 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 awsEc2query_deserializeDocumentVpcCidrBlockAssociationSet(v *[]types.VpcCidrBlockAssociation, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.VpcCidrBlockAssociation
+ if *v == nil {
+ sv = make([]types.VpcCidrBlockAssociation, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.VpcCidrBlockAssociation
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentVpcCidrBlockAssociation(&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 awsEc2query_deserializeDocumentVpcCidrBlockAssociationSetUnwrapped(v *[]types.VpcCidrBlockAssociation, decoder smithyxml.NodeDecoder) error {
+ var sv []types.VpcCidrBlockAssociation
+ if *v == nil {
+ sv = make([]types.VpcCidrBlockAssociation, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.VpcCidrBlockAssociation
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentVpcCidrBlockAssociation(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentVpcCidrBlockState(v **types.VpcCidrBlockState, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.VpcCidrBlockState
+ if *v == nil {
+ sv = &types.VpcCidrBlockState{}
+ } 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("state", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.State = types.VpcCidrBlockStateCode(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 awsEc2query_deserializeDocumentVpcClassicLink(v **types.VpcClassicLink, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.VpcClassicLink
+ if *v == nil {
+ sv = &types.VpcClassicLink{}
+ } 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("classicLinkEnabled", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.ClassicLinkEnabled = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("tagSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil {
+ return err
+ }
+
+ 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)
+ }
+
+ 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 awsEc2query_deserializeDocumentVpcClassicLinkList(v *[]types.VpcClassicLink, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.VpcClassicLink
+ if *v == nil {
+ sv = make([]types.VpcClassicLink, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.VpcClassicLink
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentVpcClassicLink(&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 awsEc2query_deserializeDocumentVpcClassicLinkListUnwrapped(v *[]types.VpcClassicLink, decoder smithyxml.NodeDecoder) error {
+ var sv []types.VpcClassicLink
+ if *v == nil {
+ sv = make([]types.VpcClassicLink, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.VpcClassicLink
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentVpcClassicLink(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentVpcEndpoint(v **types.VpcEndpoint, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.VpcEndpoint
+ if *v == nil {
+ sv = &types.VpcEndpoint{}
+ } 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("creationTimestamp", 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.CreationTimestamp = ptr.Time(t)
+ }
+
+ case strings.EqualFold("dnsEntrySet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentDnsEntrySet(&sv.DnsEntries, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("groupSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentGroupIdentifierSet(&sv.Groups, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("lastError", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentLastError(&sv.LastError, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("networkInterfaceIdSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentValueStringList(&sv.NetworkInterfaceIds, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("ownerId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.OwnerId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("policyDocument", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.PolicyDocument = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("privateDnsEnabled", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.PrivateDnsEnabled = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("requesterManaged", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.RequesterManaged = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("routeTableIdSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentValueStringList(&sv.RouteTableIds, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("serviceName", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ServiceName = 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 = types.State(xtv)
+ }
+
+ case strings.EqualFold("subnetIdSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentValueStringList(&sv.SubnetIds, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("tagSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("vpcEndpointId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.VpcEndpointId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("vpcEndpointType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.VpcEndpointType = types.VpcEndpointType(xtv)
+ }
+
+ 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)
+ }
+
+ 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 awsEc2query_deserializeDocumentVpcEndpointConnection(v **types.VpcEndpointConnection, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.VpcEndpointConnection
+ if *v == nil {
+ sv = &types.VpcEndpointConnection{}
+ } 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("creationTimestamp", 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.CreationTimestamp = ptr.Time(t)
+ }
+
+ case strings.EqualFold("dnsEntrySet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentDnsEntrySet(&sv.DnsEntries, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("gatewayLoadBalancerArnSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentValueStringList(&sv.GatewayLoadBalancerArns, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("networkLoadBalancerArnSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentValueStringList(&sv.NetworkLoadBalancerArns, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("serviceId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ServiceId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("vpcEndpointId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.VpcEndpointId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("vpcEndpointOwner", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.VpcEndpointOwner = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("vpcEndpointState", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.VpcEndpointState = types.State(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 awsEc2query_deserializeDocumentVpcEndpointConnectionSet(v *[]types.VpcEndpointConnection, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.VpcEndpointConnection
+ if *v == nil {
+ sv = make([]types.VpcEndpointConnection, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.VpcEndpointConnection
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentVpcEndpointConnection(&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 awsEc2query_deserializeDocumentVpcEndpointConnectionSetUnwrapped(v *[]types.VpcEndpointConnection, decoder smithyxml.NodeDecoder) error {
+ var sv []types.VpcEndpointConnection
+ if *v == nil {
+ sv = make([]types.VpcEndpointConnection, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.VpcEndpointConnection
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentVpcEndpointConnection(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentVpcEndpointSet(v *[]types.VpcEndpoint, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.VpcEndpoint
+ if *v == nil {
+ sv = make([]types.VpcEndpoint, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.VpcEndpoint
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentVpcEndpoint(&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 awsEc2query_deserializeDocumentVpcEndpointSetUnwrapped(v *[]types.VpcEndpoint, decoder smithyxml.NodeDecoder) error {
+ var sv []types.VpcEndpoint
+ if *v == nil {
+ sv = make([]types.VpcEndpoint, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.VpcEndpoint
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentVpcEndpoint(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentVpcIpv6CidrBlockAssociation(v **types.VpcIpv6CidrBlockAssociation, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.VpcIpv6CidrBlockAssociation
+ if *v == nil {
+ sv = &types.VpcIpv6CidrBlockAssociation{}
+ } 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("associationId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AssociationId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("ipv6CidrBlock", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Ipv6CidrBlock = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("ipv6CidrBlockState", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentVpcCidrBlockState(&sv.Ipv6CidrBlockState, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("ipv6Pool", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Ipv6Pool = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("networkBorderGroup", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.NetworkBorderGroup = 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 awsEc2query_deserializeDocumentVpcIpv6CidrBlockAssociationSet(v *[]types.VpcIpv6CidrBlockAssociation, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.VpcIpv6CidrBlockAssociation
+ if *v == nil {
+ sv = make([]types.VpcIpv6CidrBlockAssociation, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.VpcIpv6CidrBlockAssociation
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentVpcIpv6CidrBlockAssociation(&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 awsEc2query_deserializeDocumentVpcIpv6CidrBlockAssociationSetUnwrapped(v *[]types.VpcIpv6CidrBlockAssociation, decoder smithyxml.NodeDecoder) error {
+ var sv []types.VpcIpv6CidrBlockAssociation
+ if *v == nil {
+ sv = make([]types.VpcIpv6CidrBlockAssociation, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.VpcIpv6CidrBlockAssociation
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentVpcIpv6CidrBlockAssociation(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentVpcList(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("item", t.Name.Local):
+ var col types.Vpc
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_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 awsEc2query_deserializeDocumentVpcListUnwrapped(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 := awsEc2query_deserializeDocumentVpc(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentVpcPeeringConnection(v **types.VpcPeeringConnection, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.VpcPeeringConnection
+ if *v == nil {
+ sv = &types.VpcPeeringConnection{}
+ } 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("accepterVpcInfo", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentVpcPeeringConnectionVpcInfo(&sv.AccepterVpcInfo, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("expirationTime", 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.ExpirationTime = ptr.Time(t)
+ }
+
+ case strings.EqualFold("requesterVpcInfo", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentVpcPeeringConnectionVpcInfo(&sv.RequesterVpcInfo, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("status", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentVpcPeeringConnectionStateReason(&sv.Status, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("tagSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("vpcPeeringConnectionId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.VpcPeeringConnectionId = 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 awsEc2query_deserializeDocumentVpcPeeringConnectionList(v *[]types.VpcPeeringConnection, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.VpcPeeringConnection
+ if *v == nil {
+ sv = make([]types.VpcPeeringConnection, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.VpcPeeringConnection
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentVpcPeeringConnection(&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 awsEc2query_deserializeDocumentVpcPeeringConnectionListUnwrapped(v *[]types.VpcPeeringConnection, decoder smithyxml.NodeDecoder) error {
+ var sv []types.VpcPeeringConnection
+ if *v == nil {
+ sv = make([]types.VpcPeeringConnection, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.VpcPeeringConnection
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentVpcPeeringConnection(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentVpcPeeringConnectionOptionsDescription(v **types.VpcPeeringConnectionOptionsDescription, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.VpcPeeringConnectionOptionsDescription
+ if *v == nil {
+ sv = &types.VpcPeeringConnectionOptionsDescription{}
+ } 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("allowDnsResolutionFromRemoteVpc", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.AllowDnsResolutionFromRemoteVpc = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("allowEgressFromLocalClassicLinkToRemoteVpc", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.AllowEgressFromLocalClassicLinkToRemoteVpc = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("allowEgressFromLocalVpcToRemoteClassicLink", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.AllowEgressFromLocalVpcToRemoteClassicLink = ptr.Bool(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 awsEc2query_deserializeDocumentVpcPeeringConnectionStateReason(v **types.VpcPeeringConnectionStateReason, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.VpcPeeringConnectionStateReason
+ if *v == nil {
+ sv = &types.VpcPeeringConnectionStateReason{}
+ } 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("code", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Code = types.VpcPeeringConnectionStateReasonCode(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)
+ }
+
+ 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 awsEc2query_deserializeDocumentVpcPeeringConnectionVpcInfo(v **types.VpcPeeringConnectionVpcInfo, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.VpcPeeringConnectionVpcInfo
+ if *v == nil {
+ sv = &types.VpcPeeringConnectionVpcInfo{}
+ } 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("cidrBlockSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentCidrBlockSet(&sv.CidrBlockSet, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("ipv6CidrBlockSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentIpv6CidrBlockSet(&sv.Ipv6CidrBlockSet, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("ownerId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.OwnerId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("peeringOptions", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentVpcPeeringConnectionOptionsDescription(&sv.PeeringOptions, nodeDecoder); err != nil {
+ return err
+ }
+
+ 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 = ptr.String(xtv)
+ }
+
+ 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)
+ }
+
+ 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 awsEc2query_deserializeDocumentVpnConnection(v **types.VpnConnection, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.VpnConnection
+ if *v == nil {
+ sv = &types.VpnConnection{}
+ } 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("category", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Category = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("customerGatewayConfiguration", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.CustomerGatewayConfiguration = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("customerGatewayId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.CustomerGatewayId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("options", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentVpnConnectionOptions(&sv.Options, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("routes", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentVpnStaticRouteList(&sv.Routes, nodeDecoder); err != nil {
+ return err
+ }
+
+ 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 = types.VpnState(xtv)
+ }
+
+ case strings.EqualFold("tagSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("transitGatewayId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.TransitGatewayId = 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.GatewayType(xtv)
+ }
+
+ case strings.EqualFold("vgwTelemetry", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentVgwTelemetryList(&sv.VgwTelemetry, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("vpnConnectionId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.VpnConnectionId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("vpnGatewayId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.VpnGatewayId = 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 awsEc2query_deserializeDocumentVpnConnectionDeviceType(v **types.VpnConnectionDeviceType, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.VpnConnectionDeviceType
+ if *v == nil {
+ sv = &types.VpnConnectionDeviceType{}
+ } 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("platform", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Platform = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("software", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Software = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("vendor", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Vendor = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("vpnConnectionDeviceTypeId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.VpnConnectionDeviceTypeId = 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 awsEc2query_deserializeDocumentVpnConnectionDeviceTypeList(v *[]types.VpnConnectionDeviceType, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.VpnConnectionDeviceType
+ if *v == nil {
+ sv = make([]types.VpnConnectionDeviceType, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.VpnConnectionDeviceType
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentVpnConnectionDeviceType(&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 awsEc2query_deserializeDocumentVpnConnectionDeviceTypeListUnwrapped(v *[]types.VpnConnectionDeviceType, decoder smithyxml.NodeDecoder) error {
+ var sv []types.VpnConnectionDeviceType
+ if *v == nil {
+ sv = make([]types.VpnConnectionDeviceType, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.VpnConnectionDeviceType
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentVpnConnectionDeviceType(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentVpnConnectionList(v *[]types.VpnConnection, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.VpnConnection
+ if *v == nil {
+ sv = make([]types.VpnConnection, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.VpnConnection
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentVpnConnection(&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 awsEc2query_deserializeDocumentVpnConnectionListUnwrapped(v *[]types.VpnConnection, decoder smithyxml.NodeDecoder) error {
+ var sv []types.VpnConnection
+ if *v == nil {
+ sv = make([]types.VpnConnection, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.VpnConnection
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentVpnConnection(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentVpnConnectionOptions(v **types.VpnConnectionOptions, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.VpnConnectionOptions
+ if *v == nil {
+ sv = &types.VpnConnectionOptions{}
+ } 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("enableAcceleration", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.EnableAcceleration = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("localIpv4NetworkCidr", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.LocalIpv4NetworkCidr = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("localIpv6NetworkCidr", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.LocalIpv6NetworkCidr = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("remoteIpv4NetworkCidr", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.RemoteIpv4NetworkCidr = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("remoteIpv6NetworkCidr", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.RemoteIpv6NetworkCidr = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("staticRoutesOnly", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.StaticRoutesOnly = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("tunnelInsideIpVersion", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.TunnelInsideIpVersion = types.TunnelInsideIpVersion(xtv)
+ }
+
+ case strings.EqualFold("tunnelOptionSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTunnelOptionsList(&sv.TunnelOptions, 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 awsEc2query_deserializeDocumentVpnGateway(v **types.VpnGateway, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.VpnGateway
+ if *v == nil {
+ sv = &types.VpnGateway{}
+ } 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("amazonSideAsn", 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.AmazonSideAsn = ptr.Int64(i64)
+ }
+
+ case strings.EqualFold("availabilityZone", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AvailabilityZone = 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 = types.VpnState(xtv)
+ }
+
+ case strings.EqualFold("tagSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil {
+ return err
+ }
+
+ 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.GatewayType(xtv)
+ }
+
+ case strings.EqualFold("attachments", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentVpcAttachmentList(&sv.VpcAttachments, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("vpnGatewayId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.VpnGatewayId = 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 awsEc2query_deserializeDocumentVpnGatewayList(v *[]types.VpnGateway, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.VpnGateway
+ if *v == nil {
+ sv = make([]types.VpnGateway, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.VpnGateway
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentVpnGateway(&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 awsEc2query_deserializeDocumentVpnGatewayListUnwrapped(v *[]types.VpnGateway, decoder smithyxml.NodeDecoder) error {
+ var sv []types.VpnGateway
+ if *v == nil {
+ sv = make([]types.VpnGateway, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.VpnGateway
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentVpnGateway(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeDocumentVpnStaticRoute(v **types.VpnStaticRoute, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.VpnStaticRoute
+ if *v == nil {
+ sv = &types.VpnStaticRoute{}
+ } 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("destinationCidrBlock", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.DestinationCidrBlock = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("source", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Source = types.VpnStaticRouteSource(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 = types.VpnState(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 awsEc2query_deserializeDocumentVpnStaticRouteList(v *[]types.VpnStaticRoute, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.VpnStaticRoute
+ if *v == nil {
+ sv = make([]types.VpnStaticRoute, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("item", t.Name.Local):
+ var col types.VpnStaticRoute
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsEc2query_deserializeDocumentVpnStaticRoute(&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 awsEc2query_deserializeDocumentVpnStaticRouteListUnwrapped(v *[]types.VpnStaticRoute, decoder smithyxml.NodeDecoder) error {
+ var sv []types.VpnStaticRoute
+ if *v == nil {
+ sv = make([]types.VpnStaticRoute, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.VpnStaticRoute
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsEc2query_deserializeDocumentVpnStaticRoute(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsEc2query_deserializeOpDocumentAcceptReservedInstancesExchangeQuoteOutput(v **AcceptReservedInstancesExchangeQuoteOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *AcceptReservedInstancesExchangeQuoteOutput
+ if *v == nil {
+ sv = &AcceptReservedInstancesExchangeQuoteOutput{}
+ } 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("exchangeId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ExchangeId = 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 awsEc2query_deserializeOpDocumentAcceptTransitGatewayMulticastDomainAssociationsOutput(v **AcceptTransitGatewayMulticastDomainAssociationsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *AcceptTransitGatewayMulticastDomainAssociationsOutput
+ if *v == nil {
+ sv = &AcceptTransitGatewayMulticastDomainAssociationsOutput{}
+ } 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("associations", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTransitGatewayMulticastDomainAssociations(&sv.Associations, 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 awsEc2query_deserializeOpDocumentAcceptTransitGatewayPeeringAttachmentOutput(v **AcceptTransitGatewayPeeringAttachmentOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *AcceptTransitGatewayPeeringAttachmentOutput
+ if *v == nil {
+ sv = &AcceptTransitGatewayPeeringAttachmentOutput{}
+ } 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("transitGatewayPeeringAttachment", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTransitGatewayPeeringAttachment(&sv.TransitGatewayPeeringAttachment, 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 awsEc2query_deserializeOpDocumentAcceptTransitGatewayVpcAttachmentOutput(v **AcceptTransitGatewayVpcAttachmentOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *AcceptTransitGatewayVpcAttachmentOutput
+ if *v == nil {
+ sv = &AcceptTransitGatewayVpcAttachmentOutput{}
+ } 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("transitGatewayVpcAttachment", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTransitGatewayVpcAttachment(&sv.TransitGatewayVpcAttachment, 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 awsEc2query_deserializeOpDocumentAcceptVpcEndpointConnectionsOutput(v **AcceptVpcEndpointConnectionsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *AcceptVpcEndpointConnectionsOutput
+ if *v == nil {
+ sv = &AcceptVpcEndpointConnectionsOutput{}
+ } 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("unsuccessful", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentUnsuccessfulItemSet(&sv.Unsuccessful, 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 awsEc2query_deserializeOpDocumentAcceptVpcPeeringConnectionOutput(v **AcceptVpcPeeringConnectionOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *AcceptVpcPeeringConnectionOutput
+ if *v == nil {
+ sv = &AcceptVpcPeeringConnectionOutput{}
+ } 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("vpcPeeringConnection", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentVpcPeeringConnection(&sv.VpcPeeringConnection, 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 awsEc2query_deserializeOpDocumentAdvertiseByoipCidrOutput(v **AdvertiseByoipCidrOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *AdvertiseByoipCidrOutput
+ if *v == nil {
+ sv = &AdvertiseByoipCidrOutput{}
+ } 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("byoipCidr", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentByoipCidr(&sv.ByoipCidr, 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 awsEc2query_deserializeOpDocumentAllocateAddressOutput(v **AllocateAddressOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *AllocateAddressOutput
+ if *v == nil {
+ sv = &AllocateAddressOutput{}
+ } 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("allocationId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AllocationId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("carrierIp", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.CarrierIp = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("customerOwnedIp", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.CustomerOwnedIp = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("customerOwnedIpv4Pool", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.CustomerOwnedIpv4Pool = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("domain", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Domain = types.DomainType(xtv)
+ }
+
+ case strings.EqualFold("networkBorderGroup", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.NetworkBorderGroup = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("publicIp", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.PublicIp = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("publicIpv4Pool", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.PublicIpv4Pool = 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 awsEc2query_deserializeOpDocumentAllocateHostsOutput(v **AllocateHostsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *AllocateHostsOutput
+ if *v == nil {
+ sv = &AllocateHostsOutput{}
+ } 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("hostIdSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentResponseHostIdList(&sv.HostIds, 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 awsEc2query_deserializeOpDocumentApplySecurityGroupsToClientVpnTargetNetworkOutput(v **ApplySecurityGroupsToClientVpnTargetNetworkOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *ApplySecurityGroupsToClientVpnTargetNetworkOutput
+ if *v == nil {
+ sv = &ApplySecurityGroupsToClientVpnTargetNetworkOutput{}
+ } 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("securityGroupIds", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentClientVpnSecurityGroupIdSet(&sv.SecurityGroupIds, 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 awsEc2query_deserializeOpDocumentAssignIpv6AddressesOutput(v **AssignIpv6AddressesOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *AssignIpv6AddressesOutput
+ if *v == nil {
+ sv = &AssignIpv6AddressesOutput{}
+ } 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("assignedIpv6Addresses", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentIpv6AddressList(&sv.AssignedIpv6Addresses, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("assignedIpv6PrefixSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentIpPrefixList(&sv.AssignedIpv6Prefixes, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("networkInterfaceId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.NetworkInterfaceId = 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 awsEc2query_deserializeOpDocumentAssignPrivateIpAddressesOutput(v **AssignPrivateIpAddressesOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *AssignPrivateIpAddressesOutput
+ if *v == nil {
+ sv = &AssignPrivateIpAddressesOutput{}
+ } 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("assignedIpv4PrefixSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentIpv4PrefixesList(&sv.AssignedIpv4Prefixes, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("assignedPrivateIpAddressesSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentAssignedPrivateIpAddressList(&sv.AssignedPrivateIpAddresses, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("networkInterfaceId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.NetworkInterfaceId = 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 awsEc2query_deserializeOpDocumentAssociateAddressOutput(v **AssociateAddressOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *AssociateAddressOutput
+ if *v == nil {
+ sv = &AssociateAddressOutput{}
+ } 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("associationId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AssociationId = 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 awsEc2query_deserializeOpDocumentAssociateClientVpnTargetNetworkOutput(v **AssociateClientVpnTargetNetworkOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *AssociateClientVpnTargetNetworkOutput
+ if *v == nil {
+ sv = &AssociateClientVpnTargetNetworkOutput{}
+ } 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("associationId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AssociationId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("status", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentAssociationStatus(&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
+}
+
+func awsEc2query_deserializeOpDocumentAssociateEnclaveCertificateIamRoleOutput(v **AssociateEnclaveCertificateIamRoleOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *AssociateEnclaveCertificateIamRoleOutput
+ if *v == nil {
+ sv = &AssociateEnclaveCertificateIamRoleOutput{}
+ } 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("certificateS3BucketName", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.CertificateS3BucketName = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("certificateS3ObjectKey", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.CertificateS3ObjectKey = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("encryptionKmsKeyId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.EncryptionKmsKeyId = 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 awsEc2query_deserializeOpDocumentAssociateIamInstanceProfileOutput(v **AssociateIamInstanceProfileOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *AssociateIamInstanceProfileOutput
+ if *v == nil {
+ sv = &AssociateIamInstanceProfileOutput{}
+ } 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("iamInstanceProfileAssociation", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentIamInstanceProfileAssociation(&sv.IamInstanceProfileAssociation, 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 awsEc2query_deserializeOpDocumentAssociateInstanceEventWindowOutput(v **AssociateInstanceEventWindowOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *AssociateInstanceEventWindowOutput
+ if *v == nil {
+ sv = &AssociateInstanceEventWindowOutput{}
+ } 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("instanceEventWindow", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentInstanceEventWindow(&sv.InstanceEventWindow, 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 awsEc2query_deserializeOpDocumentAssociateRouteTableOutput(v **AssociateRouteTableOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *AssociateRouteTableOutput
+ if *v == nil {
+ sv = &AssociateRouteTableOutput{}
+ } 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("associationId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AssociationId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("associationState", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentRouteTableAssociationState(&sv.AssociationState, 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 awsEc2query_deserializeOpDocumentAssociateSubnetCidrBlockOutput(v **AssociateSubnetCidrBlockOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *AssociateSubnetCidrBlockOutput
+ if *v == nil {
+ sv = &AssociateSubnetCidrBlockOutput{}
+ } 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("ipv6CidrBlockAssociation", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentSubnetIpv6CidrBlockAssociation(&sv.Ipv6CidrBlockAssociation, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("subnetId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.SubnetId = 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 awsEc2query_deserializeOpDocumentAssociateTransitGatewayMulticastDomainOutput(v **AssociateTransitGatewayMulticastDomainOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *AssociateTransitGatewayMulticastDomainOutput
+ if *v == nil {
+ sv = &AssociateTransitGatewayMulticastDomainOutput{}
+ } 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("associations", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTransitGatewayMulticastDomainAssociations(&sv.Associations, 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 awsEc2query_deserializeOpDocumentAssociateTransitGatewayRouteTableOutput(v **AssociateTransitGatewayRouteTableOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *AssociateTransitGatewayRouteTableOutput
+ if *v == nil {
+ sv = &AssociateTransitGatewayRouteTableOutput{}
+ } 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("association", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTransitGatewayAssociation(&sv.Association, 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 awsEc2query_deserializeOpDocumentAssociateTrunkInterfaceOutput(v **AssociateTrunkInterfaceOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *AssociateTrunkInterfaceOutput
+ if *v == nil {
+ sv = &AssociateTrunkInterfaceOutput{}
+ } 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("clientToken", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ClientToken = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("interfaceAssociation", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTrunkInterfaceAssociation(&sv.InterfaceAssociation, 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 awsEc2query_deserializeOpDocumentAssociateVpcCidrBlockOutput(v **AssociateVpcCidrBlockOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *AssociateVpcCidrBlockOutput
+ if *v == nil {
+ sv = &AssociateVpcCidrBlockOutput{}
+ } 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("cidrBlockAssociation", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentVpcCidrBlockAssociation(&sv.CidrBlockAssociation, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("ipv6CidrBlockAssociation", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentVpcIpv6CidrBlockAssociation(&sv.Ipv6CidrBlockAssociation, nodeDecoder); err != nil {
+ return err
+ }
+
+ 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)
+ }
+
+ 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 awsEc2query_deserializeOpDocumentAttachClassicLinkVpcOutput(v **AttachClassicLinkVpcOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *AttachClassicLinkVpcOutput
+ if *v == nil {
+ sv = &AttachClassicLinkVpcOutput{}
+ } 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("return", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.Return = ptr.Bool(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 awsEc2query_deserializeOpDocumentAttachNetworkInterfaceOutput(v **AttachNetworkInterfaceOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *AttachNetworkInterfaceOutput
+ if *v == nil {
+ sv = &AttachNetworkInterfaceOutput{}
+ } 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("attachmentId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AttachmentId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("networkCardIndex", 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.NetworkCardIndex = 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 awsEc2query_deserializeOpDocumentAttachVolumeOutput(v **AttachVolumeOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *AttachVolumeOutput
+ if *v == nil {
+ sv = &AttachVolumeOutput{}
+ } 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("attachTime", 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.AttachTime = ptr.Time(t)
+ }
+
+ case strings.EqualFold("deleteOnTermination", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.DeleteOnTermination = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("device", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Device = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("instanceId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.InstanceId = 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.State = types.VolumeAttachmentState(xtv)
+ }
+
+ case strings.EqualFold("volumeId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.VolumeId = 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 awsEc2query_deserializeOpDocumentAttachVpnGatewayOutput(v **AttachVpnGatewayOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *AttachVpnGatewayOutput
+ if *v == nil {
+ sv = &AttachVpnGatewayOutput{}
+ } 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("attachment", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentVpcAttachment(&sv.VpcAttachment, 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 awsEc2query_deserializeOpDocumentAuthorizeClientVpnIngressOutput(v **AuthorizeClientVpnIngressOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *AuthorizeClientVpnIngressOutput
+ if *v == nil {
+ sv = &AuthorizeClientVpnIngressOutput{}
+ } 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("status", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentClientVpnAuthorizationRuleStatus(&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
+}
+
+func awsEc2query_deserializeOpDocumentAuthorizeSecurityGroupEgressOutput(v **AuthorizeSecurityGroupEgressOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *AuthorizeSecurityGroupEgressOutput
+ if *v == nil {
+ sv = &AuthorizeSecurityGroupEgressOutput{}
+ } 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("return", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.Return = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("securityGroupRuleSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentSecurityGroupRuleList(&sv.SecurityGroupRules, 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 awsEc2query_deserializeOpDocumentAuthorizeSecurityGroupIngressOutput(v **AuthorizeSecurityGroupIngressOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *AuthorizeSecurityGroupIngressOutput
+ if *v == nil {
+ sv = &AuthorizeSecurityGroupIngressOutput{}
+ } 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("return", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.Return = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("securityGroupRuleSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentSecurityGroupRuleList(&sv.SecurityGroupRules, 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 awsEc2query_deserializeOpDocumentBundleInstanceOutput(v **BundleInstanceOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *BundleInstanceOutput
+ if *v == nil {
+ sv = &BundleInstanceOutput{}
+ } 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("bundleInstanceTask", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentBundleTask(&sv.BundleTask, 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 awsEc2query_deserializeOpDocumentCancelBundleTaskOutput(v **CancelBundleTaskOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *CancelBundleTaskOutput
+ if *v == nil {
+ sv = &CancelBundleTaskOutput{}
+ } 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("bundleInstanceTask", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentBundleTask(&sv.BundleTask, 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 awsEc2query_deserializeOpDocumentCancelCapacityReservationOutput(v **CancelCapacityReservationOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *CancelCapacityReservationOutput
+ if *v == nil {
+ sv = &CancelCapacityReservationOutput{}
+ } 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("return", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.Return = ptr.Bool(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 awsEc2query_deserializeOpDocumentCancelImportTaskOutput(v **CancelImportTaskOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *CancelImportTaskOutput
+ if *v == nil {
+ sv = &CancelImportTaskOutput{}
+ } 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("importTaskId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ImportTaskId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("previousState", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.PreviousState = 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)
+ }
+
+ 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 awsEc2query_deserializeOpDocumentCancelReservedInstancesListingOutput(v **CancelReservedInstancesListingOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *CancelReservedInstancesListingOutput
+ if *v == nil {
+ sv = &CancelReservedInstancesListingOutput{}
+ } 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("reservedInstancesListingsSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentReservedInstancesListingList(&sv.ReservedInstancesListings, 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 awsEc2query_deserializeOpDocumentCancelSpotFleetRequestsOutput(v **CancelSpotFleetRequestsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *CancelSpotFleetRequestsOutput
+ if *v == nil {
+ sv = &CancelSpotFleetRequestsOutput{}
+ } 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("successfulFleetRequestSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentCancelSpotFleetRequestsSuccessSet(&sv.SuccessfulFleetRequests, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("unsuccessfulFleetRequestSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentCancelSpotFleetRequestsErrorSet(&sv.UnsuccessfulFleetRequests, 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 awsEc2query_deserializeOpDocumentCancelSpotInstanceRequestsOutput(v **CancelSpotInstanceRequestsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *CancelSpotInstanceRequestsOutput
+ if *v == nil {
+ sv = &CancelSpotInstanceRequestsOutput{}
+ } 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("spotInstanceRequestSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentCancelledSpotInstanceRequestList(&sv.CancelledSpotInstanceRequests, 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 awsEc2query_deserializeOpDocumentConfirmProductInstanceOutput(v **ConfirmProductInstanceOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *ConfirmProductInstanceOutput
+ if *v == nil {
+ sv = &ConfirmProductInstanceOutput{}
+ } 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("ownerId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.OwnerId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("return", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.Return = ptr.Bool(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 awsEc2query_deserializeOpDocumentCopyFpgaImageOutput(v **CopyFpgaImageOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *CopyFpgaImageOutput
+ if *v == nil {
+ sv = &CopyFpgaImageOutput{}
+ } 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("fpgaImageId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.FpgaImageId = 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 awsEc2query_deserializeOpDocumentCopyImageOutput(v **CopyImageOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *CopyImageOutput
+ if *v == nil {
+ sv = &CopyImageOutput{}
+ } 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("imageId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ImageId = 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 awsEc2query_deserializeOpDocumentCopySnapshotOutput(v **CopySnapshotOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *CopySnapshotOutput
+ if *v == nil {
+ sv = &CopySnapshotOutput{}
+ } 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("snapshotId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.SnapshotId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("tagSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_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 awsEc2query_deserializeOpDocumentCreateCapacityReservationOutput(v **CreateCapacityReservationOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *CreateCapacityReservationOutput
+ if *v == nil {
+ sv = &CreateCapacityReservationOutput{}
+ } 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("capacityReservation", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentCapacityReservation(&sv.CapacityReservation, 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 awsEc2query_deserializeOpDocumentCreateCarrierGatewayOutput(v **CreateCarrierGatewayOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *CreateCarrierGatewayOutput
+ if *v == nil {
+ sv = &CreateCarrierGatewayOutput{}
+ } 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("carrierGateway", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentCarrierGateway(&sv.CarrierGateway, 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 awsEc2query_deserializeOpDocumentCreateClientVpnEndpointOutput(v **CreateClientVpnEndpointOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *CreateClientVpnEndpointOutput
+ if *v == nil {
+ sv = &CreateClientVpnEndpointOutput{}
+ } 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("clientVpnEndpointId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ClientVpnEndpointId = ptr.String(xtv)
+ }
+
+ 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("status", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentClientVpnEndpointStatus(&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
+}
+
+func awsEc2query_deserializeOpDocumentCreateClientVpnRouteOutput(v **CreateClientVpnRouteOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *CreateClientVpnRouteOutput
+ if *v == nil {
+ sv = &CreateClientVpnRouteOutput{}
+ } 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("status", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentClientVpnRouteStatus(&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
+}
+
+func awsEc2query_deserializeOpDocumentCreateCustomerGatewayOutput(v **CreateCustomerGatewayOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *CreateCustomerGatewayOutput
+ if *v == nil {
+ sv = &CreateCustomerGatewayOutput{}
+ } 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("customerGateway", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentCustomerGateway(&sv.CustomerGateway, 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 awsEc2query_deserializeOpDocumentCreateDefaultSubnetOutput(v **CreateDefaultSubnetOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *CreateDefaultSubnetOutput
+ if *v == nil {
+ sv = &CreateDefaultSubnetOutput{}
+ } 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("subnet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentSubnet(&sv.Subnet, 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 awsEc2query_deserializeOpDocumentCreateDefaultVpcOutput(v **CreateDefaultVpcOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *CreateDefaultVpcOutput
+ if *v == nil {
+ sv = &CreateDefaultVpcOutput{}
+ } 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("vpc", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_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
+}
+
+func awsEc2query_deserializeOpDocumentCreateDhcpOptionsOutput(v **CreateDhcpOptionsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *CreateDhcpOptionsOutput
+ if *v == nil {
+ sv = &CreateDhcpOptionsOutput{}
+ } 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("dhcpOptions", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentDhcpOptions(&sv.DhcpOptions, 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 awsEc2query_deserializeOpDocumentCreateEgressOnlyInternetGatewayOutput(v **CreateEgressOnlyInternetGatewayOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *CreateEgressOnlyInternetGatewayOutput
+ if *v == nil {
+ sv = &CreateEgressOnlyInternetGatewayOutput{}
+ } 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("clientToken", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ClientToken = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("egressOnlyInternetGateway", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentEgressOnlyInternetGateway(&sv.EgressOnlyInternetGateway, 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 awsEc2query_deserializeOpDocumentCreateFleetOutput(v **CreateFleetOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *CreateFleetOutput
+ if *v == nil {
+ sv = &CreateFleetOutput{}
+ } 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("errorSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentCreateFleetErrorsSet(&sv.Errors, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("fleetId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.FleetId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("fleetInstanceSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentCreateFleetInstancesSet(&sv.Instances, 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 awsEc2query_deserializeOpDocumentCreateFlowLogsOutput(v **CreateFlowLogsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *CreateFlowLogsOutput
+ if *v == nil {
+ sv = &CreateFlowLogsOutput{}
+ } 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("clientToken", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ClientToken = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("flowLogIdSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentValueStringList(&sv.FlowLogIds, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("unsuccessful", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentUnsuccessfulItemSet(&sv.Unsuccessful, 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 awsEc2query_deserializeOpDocumentCreateFpgaImageOutput(v **CreateFpgaImageOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *CreateFpgaImageOutput
+ if *v == nil {
+ sv = &CreateFpgaImageOutput{}
+ } 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("fpgaImageGlobalId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.FpgaImageGlobalId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("fpgaImageId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.FpgaImageId = 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 awsEc2query_deserializeOpDocumentCreateImageOutput(v **CreateImageOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *CreateImageOutput
+ if *v == nil {
+ sv = &CreateImageOutput{}
+ } 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("imageId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ImageId = 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 awsEc2query_deserializeOpDocumentCreateInstanceEventWindowOutput(v **CreateInstanceEventWindowOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *CreateInstanceEventWindowOutput
+ if *v == nil {
+ sv = &CreateInstanceEventWindowOutput{}
+ } 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("instanceEventWindow", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentInstanceEventWindow(&sv.InstanceEventWindow, 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 awsEc2query_deserializeOpDocumentCreateInstanceExportTaskOutput(v **CreateInstanceExportTaskOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *CreateInstanceExportTaskOutput
+ if *v == nil {
+ sv = &CreateInstanceExportTaskOutput{}
+ } 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("exportTask", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentExportTask(&sv.ExportTask, 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 awsEc2query_deserializeOpDocumentCreateInternetGatewayOutput(v **CreateInternetGatewayOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *CreateInternetGatewayOutput
+ if *v == nil {
+ sv = &CreateInternetGatewayOutput{}
+ } 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("internetGateway", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentInternetGateway(&sv.InternetGateway, 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 awsEc2query_deserializeOpDocumentCreateKeyPairOutput(v **CreateKeyPairOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *CreateKeyPairOutput
+ if *v == nil {
+ sv = &CreateKeyPairOutput{}
+ } 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("keyFingerprint", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.KeyFingerprint = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("keyMaterial", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.KeyMaterial = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("keyName", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.KeyName = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("keyPairId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.KeyPairId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("tagSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_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 awsEc2query_deserializeOpDocumentCreateLaunchTemplateOutput(v **CreateLaunchTemplateOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *CreateLaunchTemplateOutput
+ if *v == nil {
+ sv = &CreateLaunchTemplateOutput{}
+ } 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("launchTemplate", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentLaunchTemplate(&sv.LaunchTemplate, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("warning", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentValidationWarning(&sv.Warning, 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 awsEc2query_deserializeOpDocumentCreateLaunchTemplateVersionOutput(v **CreateLaunchTemplateVersionOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *CreateLaunchTemplateVersionOutput
+ if *v == nil {
+ sv = &CreateLaunchTemplateVersionOutput{}
+ } 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("launchTemplateVersion", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentLaunchTemplateVersion(&sv.LaunchTemplateVersion, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("warning", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentValidationWarning(&sv.Warning, 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 awsEc2query_deserializeOpDocumentCreateLocalGatewayRouteOutput(v **CreateLocalGatewayRouteOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *CreateLocalGatewayRouteOutput
+ if *v == nil {
+ sv = &CreateLocalGatewayRouteOutput{}
+ } 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("route", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentLocalGatewayRoute(&sv.Route, 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 awsEc2query_deserializeOpDocumentCreateLocalGatewayRouteTableVpcAssociationOutput(v **CreateLocalGatewayRouteTableVpcAssociationOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *CreateLocalGatewayRouteTableVpcAssociationOutput
+ if *v == nil {
+ sv = &CreateLocalGatewayRouteTableVpcAssociationOutput{}
+ } 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("localGatewayRouteTableVpcAssociation", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentLocalGatewayRouteTableVpcAssociation(&sv.LocalGatewayRouteTableVpcAssociation, 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 awsEc2query_deserializeOpDocumentCreateManagedPrefixListOutput(v **CreateManagedPrefixListOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *CreateManagedPrefixListOutput
+ if *v == nil {
+ sv = &CreateManagedPrefixListOutput{}
+ } 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("prefixList", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentManagedPrefixList(&sv.PrefixList, 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 awsEc2query_deserializeOpDocumentCreateNatGatewayOutput(v **CreateNatGatewayOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *CreateNatGatewayOutput
+ if *v == nil {
+ sv = &CreateNatGatewayOutput{}
+ } 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("clientToken", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ClientToken = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("natGateway", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentNatGateway(&sv.NatGateway, 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 awsEc2query_deserializeOpDocumentCreateNetworkAclOutput(v **CreateNetworkAclOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *CreateNetworkAclOutput
+ if *v == nil {
+ sv = &CreateNetworkAclOutput{}
+ } 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("networkAcl", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentNetworkAcl(&sv.NetworkAcl, 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 awsEc2query_deserializeOpDocumentCreateNetworkInsightsPathOutput(v **CreateNetworkInsightsPathOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *CreateNetworkInsightsPathOutput
+ if *v == nil {
+ sv = &CreateNetworkInsightsPathOutput{}
+ } 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("networkInsightsPath", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentNetworkInsightsPath(&sv.NetworkInsightsPath, 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 awsEc2query_deserializeOpDocumentCreateNetworkInterfaceOutput(v **CreateNetworkInterfaceOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *CreateNetworkInterfaceOutput
+ if *v == nil {
+ sv = &CreateNetworkInterfaceOutput{}
+ } 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("clientToken", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ClientToken = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("networkInterface", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentNetworkInterface(&sv.NetworkInterface, 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 awsEc2query_deserializeOpDocumentCreateNetworkInterfacePermissionOutput(v **CreateNetworkInterfacePermissionOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *CreateNetworkInterfacePermissionOutput
+ if *v == nil {
+ sv = &CreateNetworkInterfacePermissionOutput{}
+ } 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("interfacePermission", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentNetworkInterfacePermission(&sv.InterfacePermission, 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 awsEc2query_deserializeOpDocumentCreatePlacementGroupOutput(v **CreatePlacementGroupOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *CreatePlacementGroupOutput
+ if *v == nil {
+ sv = &CreatePlacementGroupOutput{}
+ } 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("placementGroup", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentPlacementGroup(&sv.PlacementGroup, 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 awsEc2query_deserializeOpDocumentCreateReplaceRootVolumeTaskOutput(v **CreateReplaceRootVolumeTaskOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *CreateReplaceRootVolumeTaskOutput
+ if *v == nil {
+ sv = &CreateReplaceRootVolumeTaskOutput{}
+ } 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("replaceRootVolumeTask", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentReplaceRootVolumeTask(&sv.ReplaceRootVolumeTask, 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 awsEc2query_deserializeOpDocumentCreateReservedInstancesListingOutput(v **CreateReservedInstancesListingOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *CreateReservedInstancesListingOutput
+ if *v == nil {
+ sv = &CreateReservedInstancesListingOutput{}
+ } 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("reservedInstancesListingsSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentReservedInstancesListingList(&sv.ReservedInstancesListings, 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 awsEc2query_deserializeOpDocumentCreateRestoreImageTaskOutput(v **CreateRestoreImageTaskOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *CreateRestoreImageTaskOutput
+ if *v == nil {
+ sv = &CreateRestoreImageTaskOutput{}
+ } 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("imageId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ImageId = 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 awsEc2query_deserializeOpDocumentCreateRouteOutput(v **CreateRouteOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *CreateRouteOutput
+ if *v == nil {
+ sv = &CreateRouteOutput{}
+ } 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("return", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.Return = ptr.Bool(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 awsEc2query_deserializeOpDocumentCreateRouteTableOutput(v **CreateRouteTableOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *CreateRouteTableOutput
+ if *v == nil {
+ sv = &CreateRouteTableOutput{}
+ } 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("routeTable", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentRouteTable(&sv.RouteTable, 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 awsEc2query_deserializeOpDocumentCreateSecurityGroupOutput(v **CreateSecurityGroupOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *CreateSecurityGroupOutput
+ if *v == nil {
+ sv = &CreateSecurityGroupOutput{}
+ } 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("groupId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.GroupId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("tagSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_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 awsEc2query_deserializeOpDocumentCreateSnapshotOutput(v **CreateSnapshotOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *CreateSnapshotOutput
+ if *v == nil {
+ sv = &CreateSnapshotOutput{}
+ } 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("dataEncryptionKeyId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.DataEncryptionKeyId = ptr.String(xtv)
+ }
+
+ 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("encrypted", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.Encrypted = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("kmsKeyId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.KmsKeyId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("outpostArn", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.OutpostArn = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("ownerAlias", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.OwnerAlias = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("ownerId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.OwnerId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("progress", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Progress = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("snapshotId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.SnapshotId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("startTime", 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.StartTime = 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.State = types.SnapshotState(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.StateMessage = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("tagSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("volumeId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.VolumeId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("volumeSize", 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.VolumeSize = 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 awsEc2query_deserializeOpDocumentCreateSnapshotsOutput(v **CreateSnapshotsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *CreateSnapshotsOutput
+ if *v == nil {
+ sv = &CreateSnapshotsOutput{}
+ } 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("snapshotSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentSnapshotSet(&sv.Snapshots, 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 awsEc2query_deserializeOpDocumentCreateSpotDatafeedSubscriptionOutput(v **CreateSpotDatafeedSubscriptionOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *CreateSpotDatafeedSubscriptionOutput
+ if *v == nil {
+ sv = &CreateSpotDatafeedSubscriptionOutput{}
+ } 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("spotDatafeedSubscription", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentSpotDatafeedSubscription(&sv.SpotDatafeedSubscription, 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 awsEc2query_deserializeOpDocumentCreateStoreImageTaskOutput(v **CreateStoreImageTaskOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *CreateStoreImageTaskOutput
+ if *v == nil {
+ sv = &CreateStoreImageTaskOutput{}
+ } 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("objectKey", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ObjectKey = 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 awsEc2query_deserializeOpDocumentCreateSubnetCidrReservationOutput(v **CreateSubnetCidrReservationOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *CreateSubnetCidrReservationOutput
+ if *v == nil {
+ sv = &CreateSubnetCidrReservationOutput{}
+ } 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("subnetCidrReservation", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentSubnetCidrReservation(&sv.SubnetCidrReservation, 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 awsEc2query_deserializeOpDocumentCreateSubnetOutput(v **CreateSubnetOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *CreateSubnetOutput
+ if *v == nil {
+ sv = &CreateSubnetOutput{}
+ } 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("subnet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentSubnet(&sv.Subnet, 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 awsEc2query_deserializeOpDocumentCreateTrafficMirrorFilterOutput(v **CreateTrafficMirrorFilterOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *CreateTrafficMirrorFilterOutput
+ if *v == nil {
+ sv = &CreateTrafficMirrorFilterOutput{}
+ } 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("clientToken", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ClientToken = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("trafficMirrorFilter", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTrafficMirrorFilter(&sv.TrafficMirrorFilter, 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 awsEc2query_deserializeOpDocumentCreateTrafficMirrorFilterRuleOutput(v **CreateTrafficMirrorFilterRuleOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *CreateTrafficMirrorFilterRuleOutput
+ if *v == nil {
+ sv = &CreateTrafficMirrorFilterRuleOutput{}
+ } 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("clientToken", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ClientToken = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("trafficMirrorFilterRule", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTrafficMirrorFilterRule(&sv.TrafficMirrorFilterRule, 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 awsEc2query_deserializeOpDocumentCreateTrafficMirrorSessionOutput(v **CreateTrafficMirrorSessionOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *CreateTrafficMirrorSessionOutput
+ if *v == nil {
+ sv = &CreateTrafficMirrorSessionOutput{}
+ } 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("clientToken", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ClientToken = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("trafficMirrorSession", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTrafficMirrorSession(&sv.TrafficMirrorSession, 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 awsEc2query_deserializeOpDocumentCreateTrafficMirrorTargetOutput(v **CreateTrafficMirrorTargetOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *CreateTrafficMirrorTargetOutput
+ if *v == nil {
+ sv = &CreateTrafficMirrorTargetOutput{}
+ } 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("clientToken", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ClientToken = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("trafficMirrorTarget", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTrafficMirrorTarget(&sv.TrafficMirrorTarget, 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 awsEc2query_deserializeOpDocumentCreateTransitGatewayConnectOutput(v **CreateTransitGatewayConnectOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *CreateTransitGatewayConnectOutput
+ if *v == nil {
+ sv = &CreateTransitGatewayConnectOutput{}
+ } 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("transitGatewayConnect", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTransitGatewayConnect(&sv.TransitGatewayConnect, 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 awsEc2query_deserializeOpDocumentCreateTransitGatewayConnectPeerOutput(v **CreateTransitGatewayConnectPeerOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *CreateTransitGatewayConnectPeerOutput
+ if *v == nil {
+ sv = &CreateTransitGatewayConnectPeerOutput{}
+ } 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("transitGatewayConnectPeer", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTransitGatewayConnectPeer(&sv.TransitGatewayConnectPeer, 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 awsEc2query_deserializeOpDocumentCreateTransitGatewayMulticastDomainOutput(v **CreateTransitGatewayMulticastDomainOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *CreateTransitGatewayMulticastDomainOutput
+ if *v == nil {
+ sv = &CreateTransitGatewayMulticastDomainOutput{}
+ } 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("transitGatewayMulticastDomain", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTransitGatewayMulticastDomain(&sv.TransitGatewayMulticastDomain, 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 awsEc2query_deserializeOpDocumentCreateTransitGatewayOutput(v **CreateTransitGatewayOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *CreateTransitGatewayOutput
+ if *v == nil {
+ sv = &CreateTransitGatewayOutput{}
+ } 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("transitGateway", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTransitGateway(&sv.TransitGateway, 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 awsEc2query_deserializeOpDocumentCreateTransitGatewayPeeringAttachmentOutput(v **CreateTransitGatewayPeeringAttachmentOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *CreateTransitGatewayPeeringAttachmentOutput
+ if *v == nil {
+ sv = &CreateTransitGatewayPeeringAttachmentOutput{}
+ } 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("transitGatewayPeeringAttachment", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTransitGatewayPeeringAttachment(&sv.TransitGatewayPeeringAttachment, 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 awsEc2query_deserializeOpDocumentCreateTransitGatewayPrefixListReferenceOutput(v **CreateTransitGatewayPrefixListReferenceOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *CreateTransitGatewayPrefixListReferenceOutput
+ if *v == nil {
+ sv = &CreateTransitGatewayPrefixListReferenceOutput{}
+ } 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("transitGatewayPrefixListReference", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTransitGatewayPrefixListReference(&sv.TransitGatewayPrefixListReference, 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 awsEc2query_deserializeOpDocumentCreateTransitGatewayRouteOutput(v **CreateTransitGatewayRouteOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *CreateTransitGatewayRouteOutput
+ if *v == nil {
+ sv = &CreateTransitGatewayRouteOutput{}
+ } 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("route", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTransitGatewayRoute(&sv.Route, 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 awsEc2query_deserializeOpDocumentCreateTransitGatewayRouteTableOutput(v **CreateTransitGatewayRouteTableOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *CreateTransitGatewayRouteTableOutput
+ if *v == nil {
+ sv = &CreateTransitGatewayRouteTableOutput{}
+ } 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("transitGatewayRouteTable", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTransitGatewayRouteTable(&sv.TransitGatewayRouteTable, 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 awsEc2query_deserializeOpDocumentCreateTransitGatewayVpcAttachmentOutput(v **CreateTransitGatewayVpcAttachmentOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *CreateTransitGatewayVpcAttachmentOutput
+ if *v == nil {
+ sv = &CreateTransitGatewayVpcAttachmentOutput{}
+ } 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("transitGatewayVpcAttachment", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTransitGatewayVpcAttachment(&sv.TransitGatewayVpcAttachment, 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 awsEc2query_deserializeOpDocumentCreateVolumeOutput(v **CreateVolumeOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *CreateVolumeOutput
+ if *v == nil {
+ sv = &CreateVolumeOutput{}
+ } 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("attachmentSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentVolumeAttachmentList(&sv.Attachments, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("availabilityZone", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AvailabilityZone = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("createTime", 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.CreateTime = ptr.Time(t)
+ }
+
+ case strings.EqualFold("encrypted", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.Encrypted = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("fastRestored", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.FastRestored = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("iops", 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.Iops = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("kmsKeyId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.KmsKeyId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("multiAttachEnabled", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.MultiAttachEnabled = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("outpostArn", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.OutpostArn = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("size", 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.Size = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("snapshotId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.SnapshotId = 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.State = types.VolumeState(xtv)
+ }
+
+ case strings.EqualFold("tagSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("throughput", 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.Throughput = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("volumeId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.VolumeId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("volumeType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.VolumeType = types.VolumeType(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 awsEc2query_deserializeOpDocumentCreateVpcEndpointConnectionNotificationOutput(v **CreateVpcEndpointConnectionNotificationOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *CreateVpcEndpointConnectionNotificationOutput
+ if *v == nil {
+ sv = &CreateVpcEndpointConnectionNotificationOutput{}
+ } 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("clientToken", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ClientToken = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("connectionNotification", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentConnectionNotification(&sv.ConnectionNotification, 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 awsEc2query_deserializeOpDocumentCreateVpcEndpointOutput(v **CreateVpcEndpointOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *CreateVpcEndpointOutput
+ if *v == nil {
+ sv = &CreateVpcEndpointOutput{}
+ } 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("clientToken", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ClientToken = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("vpcEndpoint", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentVpcEndpoint(&sv.VpcEndpoint, 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 awsEc2query_deserializeOpDocumentCreateVpcEndpointServiceConfigurationOutput(v **CreateVpcEndpointServiceConfigurationOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *CreateVpcEndpointServiceConfigurationOutput
+ if *v == nil {
+ sv = &CreateVpcEndpointServiceConfigurationOutput{}
+ } 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("clientToken", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ClientToken = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("serviceConfiguration", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentServiceConfiguration(&sv.ServiceConfiguration, 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 awsEc2query_deserializeOpDocumentCreateVpcOutput(v **CreateVpcOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *CreateVpcOutput
+ if *v == nil {
+ sv = &CreateVpcOutput{}
+ } 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("vpc", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_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
+}
+
+func awsEc2query_deserializeOpDocumentCreateVpcPeeringConnectionOutput(v **CreateVpcPeeringConnectionOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *CreateVpcPeeringConnectionOutput
+ if *v == nil {
+ sv = &CreateVpcPeeringConnectionOutput{}
+ } 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("vpcPeeringConnection", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentVpcPeeringConnection(&sv.VpcPeeringConnection, 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 awsEc2query_deserializeOpDocumentCreateVpnConnectionOutput(v **CreateVpnConnectionOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *CreateVpnConnectionOutput
+ if *v == nil {
+ sv = &CreateVpnConnectionOutput{}
+ } 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("vpnConnection", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentVpnConnection(&sv.VpnConnection, 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 awsEc2query_deserializeOpDocumentCreateVpnGatewayOutput(v **CreateVpnGatewayOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *CreateVpnGatewayOutput
+ if *v == nil {
+ sv = &CreateVpnGatewayOutput{}
+ } 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("vpnGateway", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentVpnGateway(&sv.VpnGateway, 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 awsEc2query_deserializeOpDocumentDeleteCarrierGatewayOutput(v **DeleteCarrierGatewayOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DeleteCarrierGatewayOutput
+ if *v == nil {
+ sv = &DeleteCarrierGatewayOutput{}
+ } 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("carrierGateway", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentCarrierGateway(&sv.CarrierGateway, 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 awsEc2query_deserializeOpDocumentDeleteClientVpnEndpointOutput(v **DeleteClientVpnEndpointOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DeleteClientVpnEndpointOutput
+ if *v == nil {
+ sv = &DeleteClientVpnEndpointOutput{}
+ } 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("status", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentClientVpnEndpointStatus(&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
+}
+
+func awsEc2query_deserializeOpDocumentDeleteClientVpnRouteOutput(v **DeleteClientVpnRouteOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DeleteClientVpnRouteOutput
+ if *v == nil {
+ sv = &DeleteClientVpnRouteOutput{}
+ } 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("status", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentClientVpnRouteStatus(&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
+}
+
+func awsEc2query_deserializeOpDocumentDeleteEgressOnlyInternetGatewayOutput(v **DeleteEgressOnlyInternetGatewayOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DeleteEgressOnlyInternetGatewayOutput
+ if *v == nil {
+ sv = &DeleteEgressOnlyInternetGatewayOutput{}
+ } 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("returnCode", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.ReturnCode = ptr.Bool(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 awsEc2query_deserializeOpDocumentDeleteFleetsOutput(v **DeleteFleetsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DeleteFleetsOutput
+ if *v == nil {
+ sv = &DeleteFleetsOutput{}
+ } 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("successfulFleetDeletionSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentDeleteFleetSuccessSet(&sv.SuccessfulFleetDeletions, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("unsuccessfulFleetDeletionSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentDeleteFleetErrorSet(&sv.UnsuccessfulFleetDeletions, 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 awsEc2query_deserializeOpDocumentDeleteFlowLogsOutput(v **DeleteFlowLogsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DeleteFlowLogsOutput
+ if *v == nil {
+ sv = &DeleteFlowLogsOutput{}
+ } 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("unsuccessful", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentUnsuccessfulItemSet(&sv.Unsuccessful, 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 awsEc2query_deserializeOpDocumentDeleteFpgaImageOutput(v **DeleteFpgaImageOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DeleteFpgaImageOutput
+ if *v == nil {
+ sv = &DeleteFpgaImageOutput{}
+ } 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("return", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.Return = ptr.Bool(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 awsEc2query_deserializeOpDocumentDeleteInstanceEventWindowOutput(v **DeleteInstanceEventWindowOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DeleteInstanceEventWindowOutput
+ if *v == nil {
+ sv = &DeleteInstanceEventWindowOutput{}
+ } 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("instanceEventWindowState", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentInstanceEventWindowStateChange(&sv.InstanceEventWindowState, 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 awsEc2query_deserializeOpDocumentDeleteLaunchTemplateOutput(v **DeleteLaunchTemplateOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DeleteLaunchTemplateOutput
+ if *v == nil {
+ sv = &DeleteLaunchTemplateOutput{}
+ } 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("launchTemplate", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentLaunchTemplate(&sv.LaunchTemplate, 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 awsEc2query_deserializeOpDocumentDeleteLaunchTemplateVersionsOutput(v **DeleteLaunchTemplateVersionsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DeleteLaunchTemplateVersionsOutput
+ if *v == nil {
+ sv = &DeleteLaunchTemplateVersionsOutput{}
+ } 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("successfullyDeletedLaunchTemplateVersionSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentDeleteLaunchTemplateVersionsResponseSuccessSet(&sv.SuccessfullyDeletedLaunchTemplateVersions, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("unsuccessfullyDeletedLaunchTemplateVersionSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentDeleteLaunchTemplateVersionsResponseErrorSet(&sv.UnsuccessfullyDeletedLaunchTemplateVersions, 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 awsEc2query_deserializeOpDocumentDeleteLocalGatewayRouteOutput(v **DeleteLocalGatewayRouteOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DeleteLocalGatewayRouteOutput
+ if *v == nil {
+ sv = &DeleteLocalGatewayRouteOutput{}
+ } 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("route", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentLocalGatewayRoute(&sv.Route, 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 awsEc2query_deserializeOpDocumentDeleteLocalGatewayRouteTableVpcAssociationOutput(v **DeleteLocalGatewayRouteTableVpcAssociationOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DeleteLocalGatewayRouteTableVpcAssociationOutput
+ if *v == nil {
+ sv = &DeleteLocalGatewayRouteTableVpcAssociationOutput{}
+ } 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("localGatewayRouteTableVpcAssociation", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentLocalGatewayRouteTableVpcAssociation(&sv.LocalGatewayRouteTableVpcAssociation, 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 awsEc2query_deserializeOpDocumentDeleteManagedPrefixListOutput(v **DeleteManagedPrefixListOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DeleteManagedPrefixListOutput
+ if *v == nil {
+ sv = &DeleteManagedPrefixListOutput{}
+ } 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("prefixList", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentManagedPrefixList(&sv.PrefixList, 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 awsEc2query_deserializeOpDocumentDeleteNatGatewayOutput(v **DeleteNatGatewayOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DeleteNatGatewayOutput
+ if *v == nil {
+ sv = &DeleteNatGatewayOutput{}
+ } 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("natGatewayId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.NatGatewayId = 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 awsEc2query_deserializeOpDocumentDeleteNetworkInsightsAnalysisOutput(v **DeleteNetworkInsightsAnalysisOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DeleteNetworkInsightsAnalysisOutput
+ if *v == nil {
+ sv = &DeleteNetworkInsightsAnalysisOutput{}
+ } 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("networkInsightsAnalysisId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.NetworkInsightsAnalysisId = 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 awsEc2query_deserializeOpDocumentDeleteNetworkInsightsPathOutput(v **DeleteNetworkInsightsPathOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DeleteNetworkInsightsPathOutput
+ if *v == nil {
+ sv = &DeleteNetworkInsightsPathOutput{}
+ } 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("networkInsightsPathId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.NetworkInsightsPathId = 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 awsEc2query_deserializeOpDocumentDeleteNetworkInterfacePermissionOutput(v **DeleteNetworkInterfacePermissionOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DeleteNetworkInterfacePermissionOutput
+ if *v == nil {
+ sv = &DeleteNetworkInterfacePermissionOutput{}
+ } 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("return", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.Return = ptr.Bool(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 awsEc2query_deserializeOpDocumentDeleteQueuedReservedInstancesOutput(v **DeleteQueuedReservedInstancesOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DeleteQueuedReservedInstancesOutput
+ if *v == nil {
+ sv = &DeleteQueuedReservedInstancesOutput{}
+ } 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("failedQueuedPurchaseDeletionSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentFailedQueuedPurchaseDeletionSet(&sv.FailedQueuedPurchaseDeletions, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("successfulQueuedPurchaseDeletionSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentSuccessfulQueuedPurchaseDeletionSet(&sv.SuccessfulQueuedPurchaseDeletions, 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 awsEc2query_deserializeOpDocumentDeleteSubnetCidrReservationOutput(v **DeleteSubnetCidrReservationOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DeleteSubnetCidrReservationOutput
+ if *v == nil {
+ sv = &DeleteSubnetCidrReservationOutput{}
+ } 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("deletedSubnetCidrReservation", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentSubnetCidrReservation(&sv.DeletedSubnetCidrReservation, 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 awsEc2query_deserializeOpDocumentDeleteTrafficMirrorFilterOutput(v **DeleteTrafficMirrorFilterOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DeleteTrafficMirrorFilterOutput
+ if *v == nil {
+ sv = &DeleteTrafficMirrorFilterOutput{}
+ } 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("trafficMirrorFilterId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.TrafficMirrorFilterId = 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 awsEc2query_deserializeOpDocumentDeleteTrafficMirrorFilterRuleOutput(v **DeleteTrafficMirrorFilterRuleOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DeleteTrafficMirrorFilterRuleOutput
+ if *v == nil {
+ sv = &DeleteTrafficMirrorFilterRuleOutput{}
+ } 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("trafficMirrorFilterRuleId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.TrafficMirrorFilterRuleId = 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 awsEc2query_deserializeOpDocumentDeleteTrafficMirrorSessionOutput(v **DeleteTrafficMirrorSessionOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DeleteTrafficMirrorSessionOutput
+ if *v == nil {
+ sv = &DeleteTrafficMirrorSessionOutput{}
+ } 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("trafficMirrorSessionId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.TrafficMirrorSessionId = 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 awsEc2query_deserializeOpDocumentDeleteTrafficMirrorTargetOutput(v **DeleteTrafficMirrorTargetOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DeleteTrafficMirrorTargetOutput
+ if *v == nil {
+ sv = &DeleteTrafficMirrorTargetOutput{}
+ } 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("trafficMirrorTargetId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.TrafficMirrorTargetId = 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 awsEc2query_deserializeOpDocumentDeleteTransitGatewayConnectOutput(v **DeleteTransitGatewayConnectOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DeleteTransitGatewayConnectOutput
+ if *v == nil {
+ sv = &DeleteTransitGatewayConnectOutput{}
+ } 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("transitGatewayConnect", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTransitGatewayConnect(&sv.TransitGatewayConnect, 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 awsEc2query_deserializeOpDocumentDeleteTransitGatewayConnectPeerOutput(v **DeleteTransitGatewayConnectPeerOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DeleteTransitGatewayConnectPeerOutput
+ if *v == nil {
+ sv = &DeleteTransitGatewayConnectPeerOutput{}
+ } 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("transitGatewayConnectPeer", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTransitGatewayConnectPeer(&sv.TransitGatewayConnectPeer, 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 awsEc2query_deserializeOpDocumentDeleteTransitGatewayMulticastDomainOutput(v **DeleteTransitGatewayMulticastDomainOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DeleteTransitGatewayMulticastDomainOutput
+ if *v == nil {
+ sv = &DeleteTransitGatewayMulticastDomainOutput{}
+ } 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("transitGatewayMulticastDomain", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTransitGatewayMulticastDomain(&sv.TransitGatewayMulticastDomain, 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 awsEc2query_deserializeOpDocumentDeleteTransitGatewayOutput(v **DeleteTransitGatewayOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DeleteTransitGatewayOutput
+ if *v == nil {
+ sv = &DeleteTransitGatewayOutput{}
+ } 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("transitGateway", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTransitGateway(&sv.TransitGateway, 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 awsEc2query_deserializeOpDocumentDeleteTransitGatewayPeeringAttachmentOutput(v **DeleteTransitGatewayPeeringAttachmentOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DeleteTransitGatewayPeeringAttachmentOutput
+ if *v == nil {
+ sv = &DeleteTransitGatewayPeeringAttachmentOutput{}
+ } 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("transitGatewayPeeringAttachment", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTransitGatewayPeeringAttachment(&sv.TransitGatewayPeeringAttachment, 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 awsEc2query_deserializeOpDocumentDeleteTransitGatewayPrefixListReferenceOutput(v **DeleteTransitGatewayPrefixListReferenceOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DeleteTransitGatewayPrefixListReferenceOutput
+ if *v == nil {
+ sv = &DeleteTransitGatewayPrefixListReferenceOutput{}
+ } 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("transitGatewayPrefixListReference", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTransitGatewayPrefixListReference(&sv.TransitGatewayPrefixListReference, 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 awsEc2query_deserializeOpDocumentDeleteTransitGatewayRouteOutput(v **DeleteTransitGatewayRouteOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DeleteTransitGatewayRouteOutput
+ if *v == nil {
+ sv = &DeleteTransitGatewayRouteOutput{}
+ } 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("route", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTransitGatewayRoute(&sv.Route, 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 awsEc2query_deserializeOpDocumentDeleteTransitGatewayRouteTableOutput(v **DeleteTransitGatewayRouteTableOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DeleteTransitGatewayRouteTableOutput
+ if *v == nil {
+ sv = &DeleteTransitGatewayRouteTableOutput{}
+ } 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("transitGatewayRouteTable", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTransitGatewayRouteTable(&sv.TransitGatewayRouteTable, 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 awsEc2query_deserializeOpDocumentDeleteTransitGatewayVpcAttachmentOutput(v **DeleteTransitGatewayVpcAttachmentOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DeleteTransitGatewayVpcAttachmentOutput
+ if *v == nil {
+ sv = &DeleteTransitGatewayVpcAttachmentOutput{}
+ } 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("transitGatewayVpcAttachment", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTransitGatewayVpcAttachment(&sv.TransitGatewayVpcAttachment, 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 awsEc2query_deserializeOpDocumentDeleteVpcEndpointConnectionNotificationsOutput(v **DeleteVpcEndpointConnectionNotificationsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DeleteVpcEndpointConnectionNotificationsOutput
+ if *v == nil {
+ sv = &DeleteVpcEndpointConnectionNotificationsOutput{}
+ } 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("unsuccessful", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentUnsuccessfulItemSet(&sv.Unsuccessful, 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 awsEc2query_deserializeOpDocumentDeleteVpcEndpointServiceConfigurationsOutput(v **DeleteVpcEndpointServiceConfigurationsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DeleteVpcEndpointServiceConfigurationsOutput
+ if *v == nil {
+ sv = &DeleteVpcEndpointServiceConfigurationsOutput{}
+ } 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("unsuccessful", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentUnsuccessfulItemSet(&sv.Unsuccessful, 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 awsEc2query_deserializeOpDocumentDeleteVpcEndpointsOutput(v **DeleteVpcEndpointsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DeleteVpcEndpointsOutput
+ if *v == nil {
+ sv = &DeleteVpcEndpointsOutput{}
+ } 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("unsuccessful", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentUnsuccessfulItemSet(&sv.Unsuccessful, 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 awsEc2query_deserializeOpDocumentDeleteVpcPeeringConnectionOutput(v **DeleteVpcPeeringConnectionOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DeleteVpcPeeringConnectionOutput
+ if *v == nil {
+ sv = &DeleteVpcPeeringConnectionOutput{}
+ } 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("return", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.Return = ptr.Bool(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 awsEc2query_deserializeOpDocumentDeprovisionByoipCidrOutput(v **DeprovisionByoipCidrOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DeprovisionByoipCidrOutput
+ if *v == nil {
+ sv = &DeprovisionByoipCidrOutput{}
+ } 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("byoipCidr", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentByoipCidr(&sv.ByoipCidr, 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 awsEc2query_deserializeOpDocumentDeregisterInstanceEventNotificationAttributesOutput(v **DeregisterInstanceEventNotificationAttributesOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DeregisterInstanceEventNotificationAttributesOutput
+ if *v == nil {
+ sv = &DeregisterInstanceEventNotificationAttributesOutput{}
+ } 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("instanceTagAttribute", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentInstanceTagNotificationAttribute(&sv.InstanceTagAttribute, 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 awsEc2query_deserializeOpDocumentDeregisterTransitGatewayMulticastGroupMembersOutput(v **DeregisterTransitGatewayMulticastGroupMembersOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DeregisterTransitGatewayMulticastGroupMembersOutput
+ if *v == nil {
+ sv = &DeregisterTransitGatewayMulticastGroupMembersOutput{}
+ } 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("deregisteredMulticastGroupMembers", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTransitGatewayMulticastDeregisteredGroupMembers(&sv.DeregisteredMulticastGroupMembers, 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 awsEc2query_deserializeOpDocumentDeregisterTransitGatewayMulticastGroupSourcesOutput(v **DeregisterTransitGatewayMulticastGroupSourcesOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DeregisterTransitGatewayMulticastGroupSourcesOutput
+ if *v == nil {
+ sv = &DeregisterTransitGatewayMulticastGroupSourcesOutput{}
+ } 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("deregisteredMulticastGroupSources", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTransitGatewayMulticastDeregisteredGroupSources(&sv.DeregisteredMulticastGroupSources, 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 awsEc2query_deserializeOpDocumentDescribeAccountAttributesOutput(v **DescribeAccountAttributesOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeAccountAttributesOutput
+ if *v == nil {
+ sv = &DescribeAccountAttributesOutput{}
+ } 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("accountAttributeSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentAccountAttributeList(&sv.AccountAttributes, 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 awsEc2query_deserializeOpDocumentDescribeAddressesAttributeOutput(v **DescribeAddressesAttributeOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeAddressesAttributeOutput
+ if *v == nil {
+ sv = &DescribeAddressesAttributeOutput{}
+ } 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("addressSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentAddressSet(&sv.Addresses, 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
+}
+
+func awsEc2query_deserializeOpDocumentDescribeAddressesOutput(v **DescribeAddressesOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeAddressesOutput
+ if *v == nil {
+ sv = &DescribeAddressesOutput{}
+ } 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("addressesSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentAddressList(&sv.Addresses, 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 awsEc2query_deserializeOpDocumentDescribeAggregateIdFormatOutput(v **DescribeAggregateIdFormatOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeAggregateIdFormatOutput
+ if *v == nil {
+ sv = &DescribeAggregateIdFormatOutput{}
+ } 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("statusSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentIdFormatList(&sv.Statuses, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("useLongIdsAggregated", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.UseLongIdsAggregated = ptr.Bool(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 awsEc2query_deserializeOpDocumentDescribeAvailabilityZonesOutput(v **DescribeAvailabilityZonesOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeAvailabilityZonesOutput
+ if *v == nil {
+ sv = &DescribeAvailabilityZonesOutput{}
+ } 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("availabilityZoneInfo", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentAvailabilityZoneList(&sv.AvailabilityZones, 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 awsEc2query_deserializeOpDocumentDescribeBundleTasksOutput(v **DescribeBundleTasksOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeBundleTasksOutput
+ if *v == nil {
+ sv = &DescribeBundleTasksOutput{}
+ } 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("bundleInstanceTasksSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentBundleTaskList(&sv.BundleTasks, 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 awsEc2query_deserializeOpDocumentDescribeByoipCidrsOutput(v **DescribeByoipCidrsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeByoipCidrsOutput
+ if *v == nil {
+ sv = &DescribeByoipCidrsOutput{}
+ } 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("byoipCidrSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentByoipCidrSet(&sv.ByoipCidrs, 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
+}
+
+func awsEc2query_deserializeOpDocumentDescribeCapacityReservationsOutput(v **DescribeCapacityReservationsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeCapacityReservationsOutput
+ if *v == nil {
+ sv = &DescribeCapacityReservationsOutput{}
+ } 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("capacityReservationSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentCapacityReservationSet(&sv.CapacityReservations, 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
+}
+
+func awsEc2query_deserializeOpDocumentDescribeCarrierGatewaysOutput(v **DescribeCarrierGatewaysOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeCarrierGatewaysOutput
+ if *v == nil {
+ sv = &DescribeCarrierGatewaysOutput{}
+ } 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("carrierGatewaySet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentCarrierGatewaySet(&sv.CarrierGateways, 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
+}
+
+func awsEc2query_deserializeOpDocumentDescribeClassicLinkInstancesOutput(v **DescribeClassicLinkInstancesOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeClassicLinkInstancesOutput
+ if *v == nil {
+ sv = &DescribeClassicLinkInstancesOutput{}
+ } 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("instancesSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentClassicLinkInstanceList(&sv.Instances, 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
+}
+
+func awsEc2query_deserializeOpDocumentDescribeClientVpnAuthorizationRulesOutput(v **DescribeClientVpnAuthorizationRulesOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeClientVpnAuthorizationRulesOutput
+ if *v == nil {
+ sv = &DescribeClientVpnAuthorizationRulesOutput{}
+ } 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("authorizationRule", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentAuthorizationRuleSet(&sv.AuthorizationRules, 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
+}
+
+func awsEc2query_deserializeOpDocumentDescribeClientVpnConnectionsOutput(v **DescribeClientVpnConnectionsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeClientVpnConnectionsOutput
+ if *v == nil {
+ sv = &DescribeClientVpnConnectionsOutput{}
+ } 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("connections", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentClientVpnConnectionSet(&sv.Connections, 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
+}
+
+func awsEc2query_deserializeOpDocumentDescribeClientVpnEndpointsOutput(v **DescribeClientVpnEndpointsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeClientVpnEndpointsOutput
+ if *v == nil {
+ sv = &DescribeClientVpnEndpointsOutput{}
+ } 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("clientVpnEndpoint", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentEndpointSet(&sv.ClientVpnEndpoints, 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
+}
+
+func awsEc2query_deserializeOpDocumentDescribeClientVpnRoutesOutput(v **DescribeClientVpnRoutesOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeClientVpnRoutesOutput
+ if *v == nil {
+ sv = &DescribeClientVpnRoutesOutput{}
+ } 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("routes", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentClientVpnRouteSet(&sv.Routes, 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 awsEc2query_deserializeOpDocumentDescribeClientVpnTargetNetworksOutput(v **DescribeClientVpnTargetNetworksOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeClientVpnTargetNetworksOutput
+ if *v == nil {
+ sv = &DescribeClientVpnTargetNetworksOutput{}
+ } 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("clientVpnTargetNetworks", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTargetNetworkSet(&sv.ClientVpnTargetNetworks, 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
+}
+
+func awsEc2query_deserializeOpDocumentDescribeCoipPoolsOutput(v **DescribeCoipPoolsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeCoipPoolsOutput
+ if *v == nil {
+ sv = &DescribeCoipPoolsOutput{}
+ } 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("coipPoolSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentCoipPoolSet(&sv.CoipPools, 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
+}
+
+func awsEc2query_deserializeOpDocumentDescribeConversionTasksOutput(v **DescribeConversionTasksOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeConversionTasksOutput
+ if *v == nil {
+ sv = &DescribeConversionTasksOutput{}
+ } 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("conversionTasks", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentDescribeConversionTaskList(&sv.ConversionTasks, 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 awsEc2query_deserializeOpDocumentDescribeCustomerGatewaysOutput(v **DescribeCustomerGatewaysOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeCustomerGatewaysOutput
+ if *v == nil {
+ sv = &DescribeCustomerGatewaysOutput{}
+ } 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("customerGatewaySet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentCustomerGatewayList(&sv.CustomerGateways, 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 awsEc2query_deserializeOpDocumentDescribeDhcpOptionsOutput(v **DescribeDhcpOptionsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeDhcpOptionsOutput
+ if *v == nil {
+ sv = &DescribeDhcpOptionsOutput{}
+ } 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("dhcpOptionsSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentDhcpOptionsList(&sv.DhcpOptions, 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
+}
+
+func awsEc2query_deserializeOpDocumentDescribeEgressOnlyInternetGatewaysOutput(v **DescribeEgressOnlyInternetGatewaysOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeEgressOnlyInternetGatewaysOutput
+ if *v == nil {
+ sv = &DescribeEgressOnlyInternetGatewaysOutput{}
+ } 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("egressOnlyInternetGatewaySet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentEgressOnlyInternetGatewayList(&sv.EgressOnlyInternetGateways, 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
+}
+
+func awsEc2query_deserializeOpDocumentDescribeElasticGpusOutput(v **DescribeElasticGpusOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeElasticGpusOutput
+ if *v == nil {
+ sv = &DescribeElasticGpusOutput{}
+ } 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("elasticGpuSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentElasticGpuSet(&sv.ElasticGpuSet, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("maxResults", 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.MaxResults = 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
+}
+
+func awsEc2query_deserializeOpDocumentDescribeExportImageTasksOutput(v **DescribeExportImageTasksOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeExportImageTasksOutput
+ if *v == nil {
+ sv = &DescribeExportImageTasksOutput{}
+ } 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("exportImageTaskSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentExportImageTaskList(&sv.ExportImageTasks, 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
+}
+
+func awsEc2query_deserializeOpDocumentDescribeExportTasksOutput(v **DescribeExportTasksOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeExportTasksOutput
+ if *v == nil {
+ sv = &DescribeExportTasksOutput{}
+ } 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("exportTaskSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentExportTaskList(&sv.ExportTasks, 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 awsEc2query_deserializeOpDocumentDescribeFastSnapshotRestoresOutput(v **DescribeFastSnapshotRestoresOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeFastSnapshotRestoresOutput
+ if *v == nil {
+ sv = &DescribeFastSnapshotRestoresOutput{}
+ } 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("fastSnapshotRestoreSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentDescribeFastSnapshotRestoreSuccessSet(&sv.FastSnapshotRestores, 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
+}
+
+func awsEc2query_deserializeOpDocumentDescribeFleetHistoryOutput(v **DescribeFleetHistoryOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeFleetHistoryOutput
+ if *v == nil {
+ sv = &DescribeFleetHistoryOutput{}
+ } 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("fleetId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.FleetId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("historyRecordSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentHistoryRecordSet(&sv.HistoryRecords, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("lastEvaluatedTime", 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.LastEvaluatedTime = ptr.Time(t)
+ }
+
+ 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("startTime", 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.StartTime = 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 awsEc2query_deserializeOpDocumentDescribeFleetInstancesOutput(v **DescribeFleetInstancesOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeFleetInstancesOutput
+ if *v == nil {
+ sv = &DescribeFleetInstancesOutput{}
+ } 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("activeInstanceSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentActiveInstanceSet(&sv.ActiveInstances, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("fleetId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.FleetId = 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)
+ }
+
+ 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 awsEc2query_deserializeOpDocumentDescribeFleetsOutput(v **DescribeFleetsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeFleetsOutput
+ if *v == nil {
+ sv = &DescribeFleetsOutput{}
+ } 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("fleetSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentFleetSet(&sv.Fleets, 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
+}
+
+func awsEc2query_deserializeOpDocumentDescribeFlowLogsOutput(v **DescribeFlowLogsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeFlowLogsOutput
+ if *v == nil {
+ sv = &DescribeFlowLogsOutput{}
+ } 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("flowLogSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentFlowLogSet(&sv.FlowLogs, 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
+}
+
+func awsEc2query_deserializeOpDocumentDescribeFpgaImageAttributeOutput(v **DescribeFpgaImageAttributeOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeFpgaImageAttributeOutput
+ if *v == nil {
+ sv = &DescribeFpgaImageAttributeOutput{}
+ } 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("fpgaImageAttribute", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentFpgaImageAttribute(&sv.FpgaImageAttribute, 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 awsEc2query_deserializeOpDocumentDescribeFpgaImagesOutput(v **DescribeFpgaImagesOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeFpgaImagesOutput
+ if *v == nil {
+ sv = &DescribeFpgaImagesOutput{}
+ } 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("fpgaImageSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentFpgaImageList(&sv.FpgaImages, 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
+}
+
+func awsEc2query_deserializeOpDocumentDescribeHostReservationOfferingsOutput(v **DescribeHostReservationOfferingsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeHostReservationOfferingsOutput
+ if *v == nil {
+ sv = &DescribeHostReservationOfferingsOutput{}
+ } 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("offeringSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentHostOfferingSet(&sv.OfferingSet, 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 awsEc2query_deserializeOpDocumentDescribeHostReservationsOutput(v **DescribeHostReservationsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeHostReservationsOutput
+ if *v == nil {
+ sv = &DescribeHostReservationsOutput{}
+ } 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("hostReservationSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentHostReservationSet(&sv.HostReservationSet, 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
+}
+
+func awsEc2query_deserializeOpDocumentDescribeHostsOutput(v **DescribeHostsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeHostsOutput
+ if *v == nil {
+ sv = &DescribeHostsOutput{}
+ } 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("hostSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentHostList(&sv.Hosts, 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
+}
+
+func awsEc2query_deserializeOpDocumentDescribeIamInstanceProfileAssociationsOutput(v **DescribeIamInstanceProfileAssociationsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeIamInstanceProfileAssociationsOutput
+ if *v == nil {
+ sv = &DescribeIamInstanceProfileAssociationsOutput{}
+ } 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("iamInstanceProfileAssociationSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentIamInstanceProfileAssociationSet(&sv.IamInstanceProfileAssociations, 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
+}
+
+func awsEc2query_deserializeOpDocumentDescribeIdentityIdFormatOutput(v **DescribeIdentityIdFormatOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeIdentityIdFormatOutput
+ if *v == nil {
+ sv = &DescribeIdentityIdFormatOutput{}
+ } 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("statusSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentIdFormatList(&sv.Statuses, 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 awsEc2query_deserializeOpDocumentDescribeIdFormatOutput(v **DescribeIdFormatOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeIdFormatOutput
+ if *v == nil {
+ sv = &DescribeIdFormatOutput{}
+ } 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("statusSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentIdFormatList(&sv.Statuses, 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 awsEc2query_deserializeOpDocumentDescribeImageAttributeOutput(v **DescribeImageAttributeOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeImageAttributeOutput
+ if *v == nil {
+ sv = &DescribeImageAttributeOutput{}
+ } 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("blockDeviceMapping", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentBlockDeviceMappingList(&sv.BlockDeviceMappings, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("bootMode", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentAttributeValue(&sv.BootMode, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("description", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentAttributeValue(&sv.Description, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("imageId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ImageId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("kernel", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentAttributeValue(&sv.KernelId, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("launchPermission", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentLaunchPermissionList(&sv.LaunchPermissions, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("productCodes", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentProductCodeList(&sv.ProductCodes, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("ramdisk", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentAttributeValue(&sv.RamdiskId, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("sriovNetSupport", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentAttributeValue(&sv.SriovNetSupport, 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 awsEc2query_deserializeOpDocumentDescribeImagesOutput(v **DescribeImagesOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeImagesOutput
+ if *v == nil {
+ sv = &DescribeImagesOutput{}
+ } 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("imagesSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentImageList(&sv.Images, 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 awsEc2query_deserializeOpDocumentDescribeImportImageTasksOutput(v **DescribeImportImageTasksOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeImportImageTasksOutput
+ if *v == nil {
+ sv = &DescribeImportImageTasksOutput{}
+ } 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("importImageTaskSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentImportImageTaskList(&sv.ImportImageTasks, 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
+}
+
+func awsEc2query_deserializeOpDocumentDescribeImportSnapshotTasksOutput(v **DescribeImportSnapshotTasksOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeImportSnapshotTasksOutput
+ if *v == nil {
+ sv = &DescribeImportSnapshotTasksOutput{}
+ } 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("importSnapshotTaskSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentImportSnapshotTaskList(&sv.ImportSnapshotTasks, 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
+}
+
+func awsEc2query_deserializeOpDocumentDescribeInstanceAttributeOutput(v **DescribeInstanceAttributeOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeInstanceAttributeOutput
+ if *v == nil {
+ sv = &DescribeInstanceAttributeOutput{}
+ } 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("blockDeviceMapping", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentInstanceBlockDeviceMappingList(&sv.BlockDeviceMappings, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("disableApiTermination", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentAttributeBooleanValue(&sv.DisableApiTermination, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("ebsOptimized", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentAttributeBooleanValue(&sv.EbsOptimized, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("enaSupport", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentAttributeBooleanValue(&sv.EnaSupport, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("enclaveOptions", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentEnclaveOptions(&sv.EnclaveOptions, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("groupSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentGroupIdentifierList(&sv.Groups, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("instanceId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.InstanceId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("instanceInitiatedShutdownBehavior", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentAttributeValue(&sv.InstanceInitiatedShutdownBehavior, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("instanceType", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentAttributeValue(&sv.InstanceType, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("kernel", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentAttributeValue(&sv.KernelId, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("productCodes", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentProductCodeList(&sv.ProductCodes, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("ramdisk", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentAttributeValue(&sv.RamdiskId, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("rootDeviceName", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentAttributeValue(&sv.RootDeviceName, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("sourceDestCheck", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentAttributeBooleanValue(&sv.SourceDestCheck, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("sriovNetSupport", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentAttributeValue(&sv.SriovNetSupport, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("userData", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentAttributeValue(&sv.UserData, 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 awsEc2query_deserializeOpDocumentDescribeInstanceCreditSpecificationsOutput(v **DescribeInstanceCreditSpecificationsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeInstanceCreditSpecificationsOutput
+ if *v == nil {
+ sv = &DescribeInstanceCreditSpecificationsOutput{}
+ } 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("instanceCreditSpecificationSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentInstanceCreditSpecificationList(&sv.InstanceCreditSpecifications, 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
+}
+
+func awsEc2query_deserializeOpDocumentDescribeInstanceEventNotificationAttributesOutput(v **DescribeInstanceEventNotificationAttributesOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeInstanceEventNotificationAttributesOutput
+ if *v == nil {
+ sv = &DescribeInstanceEventNotificationAttributesOutput{}
+ } 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("instanceTagAttribute", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentInstanceTagNotificationAttribute(&sv.InstanceTagAttribute, 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 awsEc2query_deserializeOpDocumentDescribeInstanceEventWindowsOutput(v **DescribeInstanceEventWindowsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeInstanceEventWindowsOutput
+ if *v == nil {
+ sv = &DescribeInstanceEventWindowsOutput{}
+ } 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("instanceEventWindowSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentInstanceEventWindowSet(&sv.InstanceEventWindows, 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
+}
+
+func awsEc2query_deserializeOpDocumentDescribeInstancesOutput(v **DescribeInstancesOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeInstancesOutput
+ if *v == nil {
+ sv = &DescribeInstancesOutput{}
+ } 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("reservationSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentReservationList(&sv.Reservations, 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 awsEc2query_deserializeOpDocumentDescribeInstanceStatusOutput(v **DescribeInstanceStatusOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeInstanceStatusOutput
+ if *v == nil {
+ sv = &DescribeInstanceStatusOutput{}
+ } 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("instanceStatusSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentInstanceStatusList(&sv.InstanceStatuses, 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
+}
+
+func awsEc2query_deserializeOpDocumentDescribeInstanceTypeOfferingsOutput(v **DescribeInstanceTypeOfferingsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeInstanceTypeOfferingsOutput
+ if *v == nil {
+ sv = &DescribeInstanceTypeOfferingsOutput{}
+ } 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("instanceTypeOfferingSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentInstanceTypeOfferingsList(&sv.InstanceTypeOfferings, 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
+}
+
+func awsEc2query_deserializeOpDocumentDescribeInstanceTypesOutput(v **DescribeInstanceTypesOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeInstanceTypesOutput
+ if *v == nil {
+ sv = &DescribeInstanceTypesOutput{}
+ } 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("instanceTypeSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentInstanceTypeInfoList(&sv.InstanceTypes, 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
+}
+
+func awsEc2query_deserializeOpDocumentDescribeInternetGatewaysOutput(v **DescribeInternetGatewaysOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeInternetGatewaysOutput
+ if *v == nil {
+ sv = &DescribeInternetGatewaysOutput{}
+ } 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("internetGatewaySet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentInternetGatewayList(&sv.InternetGateways, 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
+}
+
+func awsEc2query_deserializeOpDocumentDescribeIpv6PoolsOutput(v **DescribeIpv6PoolsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeIpv6PoolsOutput
+ if *v == nil {
+ sv = &DescribeIpv6PoolsOutput{}
+ } 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("ipv6PoolSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentIpv6PoolSet(&sv.Ipv6Pools, 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
+}
+
+func awsEc2query_deserializeOpDocumentDescribeKeyPairsOutput(v **DescribeKeyPairsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeKeyPairsOutput
+ if *v == nil {
+ sv = &DescribeKeyPairsOutput{}
+ } 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("keySet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentKeyPairList(&sv.KeyPairs, 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 awsEc2query_deserializeOpDocumentDescribeLaunchTemplatesOutput(v **DescribeLaunchTemplatesOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeLaunchTemplatesOutput
+ if *v == nil {
+ sv = &DescribeLaunchTemplatesOutput{}
+ } 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("launchTemplates", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentLaunchTemplateSet(&sv.LaunchTemplates, 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
+}
+
+func awsEc2query_deserializeOpDocumentDescribeLaunchTemplateVersionsOutput(v **DescribeLaunchTemplateVersionsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeLaunchTemplateVersionsOutput
+ if *v == nil {
+ sv = &DescribeLaunchTemplateVersionsOutput{}
+ } 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("launchTemplateVersionSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentLaunchTemplateVersionSet(&sv.LaunchTemplateVersions, 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
+}
+
+func awsEc2query_deserializeOpDocumentDescribeLocalGatewayRouteTablesOutput(v **DescribeLocalGatewayRouteTablesOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeLocalGatewayRouteTablesOutput
+ if *v == nil {
+ sv = &DescribeLocalGatewayRouteTablesOutput{}
+ } 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("localGatewayRouteTableSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentLocalGatewayRouteTableSet(&sv.LocalGatewayRouteTables, 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
+}
+
+func awsEc2query_deserializeOpDocumentDescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsOutput(v **DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsOutput
+ if *v == nil {
+ sv = &DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsOutput{}
+ } 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("localGatewayRouteTableVirtualInterfaceGroupAssociationSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentLocalGatewayRouteTableVirtualInterfaceGroupAssociationSet(&sv.LocalGatewayRouteTableVirtualInterfaceGroupAssociations, 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
+}
+
+func awsEc2query_deserializeOpDocumentDescribeLocalGatewayRouteTableVpcAssociationsOutput(v **DescribeLocalGatewayRouteTableVpcAssociationsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeLocalGatewayRouteTableVpcAssociationsOutput
+ if *v == nil {
+ sv = &DescribeLocalGatewayRouteTableVpcAssociationsOutput{}
+ } 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("localGatewayRouteTableVpcAssociationSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentLocalGatewayRouteTableVpcAssociationSet(&sv.LocalGatewayRouteTableVpcAssociations, 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
+}
+
+func awsEc2query_deserializeOpDocumentDescribeLocalGatewaysOutput(v **DescribeLocalGatewaysOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeLocalGatewaysOutput
+ if *v == nil {
+ sv = &DescribeLocalGatewaysOutput{}
+ } 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("localGatewaySet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentLocalGatewaySet(&sv.LocalGateways, 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
+}
+
+func awsEc2query_deserializeOpDocumentDescribeLocalGatewayVirtualInterfaceGroupsOutput(v **DescribeLocalGatewayVirtualInterfaceGroupsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeLocalGatewayVirtualInterfaceGroupsOutput
+ if *v == nil {
+ sv = &DescribeLocalGatewayVirtualInterfaceGroupsOutput{}
+ } 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("localGatewayVirtualInterfaceGroupSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentLocalGatewayVirtualInterfaceGroupSet(&sv.LocalGatewayVirtualInterfaceGroups, 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
+}
+
+func awsEc2query_deserializeOpDocumentDescribeLocalGatewayVirtualInterfacesOutput(v **DescribeLocalGatewayVirtualInterfacesOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeLocalGatewayVirtualInterfacesOutput
+ if *v == nil {
+ sv = &DescribeLocalGatewayVirtualInterfacesOutput{}
+ } 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("localGatewayVirtualInterfaceSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentLocalGatewayVirtualInterfaceSet(&sv.LocalGatewayVirtualInterfaces, 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
+}
+
+func awsEc2query_deserializeOpDocumentDescribeManagedPrefixListsOutput(v **DescribeManagedPrefixListsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeManagedPrefixListsOutput
+ if *v == nil {
+ sv = &DescribeManagedPrefixListsOutput{}
+ } 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("prefixListSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentManagedPrefixListSet(&sv.PrefixLists, 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 awsEc2query_deserializeOpDocumentDescribeMovingAddressesOutput(v **DescribeMovingAddressesOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeMovingAddressesOutput
+ if *v == nil {
+ sv = &DescribeMovingAddressesOutput{}
+ } 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("movingAddressStatusSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentMovingAddressStatusSet(&sv.MovingAddressStatuses, 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
+}
+
+func awsEc2query_deserializeOpDocumentDescribeNatGatewaysOutput(v **DescribeNatGatewaysOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeNatGatewaysOutput
+ if *v == nil {
+ sv = &DescribeNatGatewaysOutput{}
+ } 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("natGatewaySet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentNatGatewayList(&sv.NatGateways, 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
+}
+
+func awsEc2query_deserializeOpDocumentDescribeNetworkAclsOutput(v **DescribeNetworkAclsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeNetworkAclsOutput
+ if *v == nil {
+ sv = &DescribeNetworkAclsOutput{}
+ } 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("networkAclSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentNetworkAclList(&sv.NetworkAcls, 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
+}
+
+func awsEc2query_deserializeOpDocumentDescribeNetworkInsightsAnalysesOutput(v **DescribeNetworkInsightsAnalysesOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeNetworkInsightsAnalysesOutput
+ if *v == nil {
+ sv = &DescribeNetworkInsightsAnalysesOutput{}
+ } 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("networkInsightsAnalysisSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentNetworkInsightsAnalysisList(&sv.NetworkInsightsAnalyses, 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
+}
+
+func awsEc2query_deserializeOpDocumentDescribeNetworkInsightsPathsOutput(v **DescribeNetworkInsightsPathsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeNetworkInsightsPathsOutput
+ if *v == nil {
+ sv = &DescribeNetworkInsightsPathsOutput{}
+ } 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("networkInsightsPathSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentNetworkInsightsPathList(&sv.NetworkInsightsPaths, 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
+}
+
+func awsEc2query_deserializeOpDocumentDescribeNetworkInterfaceAttributeOutput(v **DescribeNetworkInterfaceAttributeOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeNetworkInterfaceAttributeOutput
+ if *v == nil {
+ sv = &DescribeNetworkInterfaceAttributeOutput{}
+ } 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("attachment", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentNetworkInterfaceAttachment(&sv.Attachment, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("description", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentAttributeValue(&sv.Description, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("groupSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentGroupIdentifierList(&sv.Groups, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("networkInterfaceId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.NetworkInterfaceId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("sourceDestCheck", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentAttributeBooleanValue(&sv.SourceDestCheck, 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 awsEc2query_deserializeOpDocumentDescribeNetworkInterfacePermissionsOutput(v **DescribeNetworkInterfacePermissionsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeNetworkInterfacePermissionsOutput
+ if *v == nil {
+ sv = &DescribeNetworkInterfacePermissionsOutput{}
+ } 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("networkInterfacePermissions", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentNetworkInterfacePermissionList(&sv.NetworkInterfacePermissions, 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
+}
+
+func awsEc2query_deserializeOpDocumentDescribeNetworkInterfacesOutput(v **DescribeNetworkInterfacesOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeNetworkInterfacesOutput
+ if *v == nil {
+ sv = &DescribeNetworkInterfacesOutput{}
+ } 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("networkInterfaceSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentNetworkInterfaceList(&sv.NetworkInterfaces, 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
+}
+
+func awsEc2query_deserializeOpDocumentDescribePlacementGroupsOutput(v **DescribePlacementGroupsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribePlacementGroupsOutput
+ if *v == nil {
+ sv = &DescribePlacementGroupsOutput{}
+ } 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("placementGroupSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentPlacementGroupList(&sv.PlacementGroups, 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 awsEc2query_deserializeOpDocumentDescribePrefixListsOutput(v **DescribePrefixListsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribePrefixListsOutput
+ if *v == nil {
+ sv = &DescribePrefixListsOutput{}
+ } 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("prefixListSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentPrefixListSet(&sv.PrefixLists, 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 awsEc2query_deserializeOpDocumentDescribePrincipalIdFormatOutput(v **DescribePrincipalIdFormatOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribePrincipalIdFormatOutput
+ if *v == nil {
+ sv = &DescribePrincipalIdFormatOutput{}
+ } 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("principalSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentPrincipalIdFormatList(&sv.Principals, 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 awsEc2query_deserializeOpDocumentDescribePublicIpv4PoolsOutput(v **DescribePublicIpv4PoolsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribePublicIpv4PoolsOutput
+ if *v == nil {
+ sv = &DescribePublicIpv4PoolsOutput{}
+ } 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("publicIpv4PoolSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentPublicIpv4PoolSet(&sv.PublicIpv4Pools, 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 awsEc2query_deserializeOpDocumentDescribeRegionsOutput(v **DescribeRegionsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeRegionsOutput
+ if *v == nil {
+ sv = &DescribeRegionsOutput{}
+ } 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("regionInfo", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentRegionList(&sv.Regions, 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 awsEc2query_deserializeOpDocumentDescribeReplaceRootVolumeTasksOutput(v **DescribeReplaceRootVolumeTasksOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeReplaceRootVolumeTasksOutput
+ if *v == nil {
+ sv = &DescribeReplaceRootVolumeTasksOutput{}
+ } 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("replaceRootVolumeTaskSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentReplaceRootVolumeTasks(&sv.ReplaceRootVolumeTasks, 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 awsEc2query_deserializeOpDocumentDescribeReservedInstancesListingsOutput(v **DescribeReservedInstancesListingsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeReservedInstancesListingsOutput
+ if *v == nil {
+ sv = &DescribeReservedInstancesListingsOutput{}
+ } 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("reservedInstancesListingsSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentReservedInstancesListingList(&sv.ReservedInstancesListings, 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 awsEc2query_deserializeOpDocumentDescribeReservedInstancesModificationsOutput(v **DescribeReservedInstancesModificationsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeReservedInstancesModificationsOutput
+ if *v == nil {
+ sv = &DescribeReservedInstancesModificationsOutput{}
+ } 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("reservedInstancesModificationsSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentReservedInstancesModificationList(&sv.ReservedInstancesModifications, 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 awsEc2query_deserializeOpDocumentDescribeReservedInstancesOfferingsOutput(v **DescribeReservedInstancesOfferingsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeReservedInstancesOfferingsOutput
+ if *v == nil {
+ sv = &DescribeReservedInstancesOfferingsOutput{}
+ } 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("reservedInstancesOfferingsSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentReservedInstancesOfferingList(&sv.ReservedInstancesOfferings, 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 awsEc2query_deserializeOpDocumentDescribeReservedInstancesOutput(v **DescribeReservedInstancesOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeReservedInstancesOutput
+ if *v == nil {
+ sv = &DescribeReservedInstancesOutput{}
+ } 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("reservedInstancesSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentReservedInstancesList(&sv.ReservedInstances, 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 awsEc2query_deserializeOpDocumentDescribeRouteTablesOutput(v **DescribeRouteTablesOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeRouteTablesOutput
+ if *v == nil {
+ sv = &DescribeRouteTablesOutput{}
+ } 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("routeTableSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentRouteTableList(&sv.RouteTables, 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 awsEc2query_deserializeOpDocumentDescribeScheduledInstanceAvailabilityOutput(v **DescribeScheduledInstanceAvailabilityOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeScheduledInstanceAvailabilityOutput
+ if *v == nil {
+ sv = &DescribeScheduledInstanceAvailabilityOutput{}
+ } 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("scheduledInstanceAvailabilitySet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentScheduledInstanceAvailabilitySet(&sv.ScheduledInstanceAvailabilitySet, 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 awsEc2query_deserializeOpDocumentDescribeScheduledInstancesOutput(v **DescribeScheduledInstancesOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeScheduledInstancesOutput
+ if *v == nil {
+ sv = &DescribeScheduledInstancesOutput{}
+ } 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("scheduledInstanceSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentScheduledInstanceSet(&sv.ScheduledInstanceSet, 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 awsEc2query_deserializeOpDocumentDescribeSecurityGroupReferencesOutput(v **DescribeSecurityGroupReferencesOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeSecurityGroupReferencesOutput
+ if *v == nil {
+ sv = &DescribeSecurityGroupReferencesOutput{}
+ } 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("securityGroupReferenceSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentSecurityGroupReferences(&sv.SecurityGroupReferenceSet, 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 awsEc2query_deserializeOpDocumentDescribeSecurityGroupRulesOutput(v **DescribeSecurityGroupRulesOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeSecurityGroupRulesOutput
+ if *v == nil {
+ sv = &DescribeSecurityGroupRulesOutput{}
+ } 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("securityGroupRuleSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentSecurityGroupRuleList(&sv.SecurityGroupRules, 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 awsEc2query_deserializeOpDocumentDescribeSecurityGroupsOutput(v **DescribeSecurityGroupsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeSecurityGroupsOutput
+ if *v == nil {
+ sv = &DescribeSecurityGroupsOutput{}
+ } 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("securityGroupInfo", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentSecurityGroupList(&sv.SecurityGroups, 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 awsEc2query_deserializeOpDocumentDescribeSnapshotAttributeOutput(v **DescribeSnapshotAttributeOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeSnapshotAttributeOutput
+ if *v == nil {
+ sv = &DescribeSnapshotAttributeOutput{}
+ } 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("createVolumePermission", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentCreateVolumePermissionList(&sv.CreateVolumePermissions, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("productCodes", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentProductCodeList(&sv.ProductCodes, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("snapshotId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.SnapshotId = 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 awsEc2query_deserializeOpDocumentDescribeSnapshotsOutput(v **DescribeSnapshotsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeSnapshotsOutput
+ if *v == nil {
+ sv = &DescribeSnapshotsOutput{}
+ } 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("snapshotSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentSnapshotList(&sv.Snapshots, 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 awsEc2query_deserializeOpDocumentDescribeSpotDatafeedSubscriptionOutput(v **DescribeSpotDatafeedSubscriptionOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeSpotDatafeedSubscriptionOutput
+ if *v == nil {
+ sv = &DescribeSpotDatafeedSubscriptionOutput{}
+ } 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("spotDatafeedSubscription", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentSpotDatafeedSubscription(&sv.SpotDatafeedSubscription, 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 awsEc2query_deserializeOpDocumentDescribeSpotFleetInstancesOutput(v **DescribeSpotFleetInstancesOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeSpotFleetInstancesOutput
+ if *v == nil {
+ sv = &DescribeSpotFleetInstancesOutput{}
+ } 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("activeInstanceSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentActiveInstanceSet(&sv.ActiveInstances, 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)
+ }
+
+ case strings.EqualFold("spotFleetRequestId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.SpotFleetRequestId = 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 awsEc2query_deserializeOpDocumentDescribeSpotFleetRequestHistoryOutput(v **DescribeSpotFleetRequestHistoryOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeSpotFleetRequestHistoryOutput
+ if *v == nil {
+ sv = &DescribeSpotFleetRequestHistoryOutput{}
+ } 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("historyRecordSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentHistoryRecords(&sv.HistoryRecords, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("lastEvaluatedTime", 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.LastEvaluatedTime = ptr.Time(t)
+ }
+
+ 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("spotFleetRequestId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.SpotFleetRequestId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("startTime", 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.StartTime = 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 awsEc2query_deserializeOpDocumentDescribeSpotFleetRequestsOutput(v **DescribeSpotFleetRequestsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeSpotFleetRequestsOutput
+ if *v == nil {
+ sv = &DescribeSpotFleetRequestsOutput{}
+ } 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("spotFleetRequestConfigSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentSpotFleetRequestConfigSet(&sv.SpotFleetRequestConfigs, 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 awsEc2query_deserializeOpDocumentDescribeSpotInstanceRequestsOutput(v **DescribeSpotInstanceRequestsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeSpotInstanceRequestsOutput
+ if *v == nil {
+ sv = &DescribeSpotInstanceRequestsOutput{}
+ } 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("spotInstanceRequestSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentSpotInstanceRequestList(&sv.SpotInstanceRequests, 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 awsEc2query_deserializeOpDocumentDescribeSpotPriceHistoryOutput(v **DescribeSpotPriceHistoryOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeSpotPriceHistoryOutput
+ if *v == nil {
+ sv = &DescribeSpotPriceHistoryOutput{}
+ } 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("spotPriceHistorySet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentSpotPriceHistoryList(&sv.SpotPriceHistory, 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 awsEc2query_deserializeOpDocumentDescribeStaleSecurityGroupsOutput(v **DescribeStaleSecurityGroupsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeStaleSecurityGroupsOutput
+ if *v == nil {
+ sv = &DescribeStaleSecurityGroupsOutput{}
+ } 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("staleSecurityGroupSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentStaleSecurityGroupSet(&sv.StaleSecurityGroupSet, 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 awsEc2query_deserializeOpDocumentDescribeStoreImageTasksOutput(v **DescribeStoreImageTasksOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeStoreImageTasksOutput
+ if *v == nil {
+ sv = &DescribeStoreImageTasksOutput{}
+ } 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("storeImageTaskResultSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentStoreImageTaskResultSet(&sv.StoreImageTaskResults, 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 awsEc2query_deserializeOpDocumentDescribeSubnetsOutput(v **DescribeSubnetsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeSubnetsOutput
+ if *v == nil {
+ sv = &DescribeSubnetsOutput{}
+ } 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("subnetSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentSubnetList(&sv.Subnets, 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 awsEc2query_deserializeOpDocumentDescribeTagsOutput(v **DescribeTagsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeTagsOutput
+ if *v == nil {
+ sv = &DescribeTagsOutput{}
+ } 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("tagSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTagDescriptionList(&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 awsEc2query_deserializeOpDocumentDescribeTrafficMirrorFiltersOutput(v **DescribeTrafficMirrorFiltersOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeTrafficMirrorFiltersOutput
+ if *v == nil {
+ sv = &DescribeTrafficMirrorFiltersOutput{}
+ } 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("trafficMirrorFilterSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTrafficMirrorFilterSet(&sv.TrafficMirrorFilters, 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 awsEc2query_deserializeOpDocumentDescribeTrafficMirrorSessionsOutput(v **DescribeTrafficMirrorSessionsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeTrafficMirrorSessionsOutput
+ if *v == nil {
+ sv = &DescribeTrafficMirrorSessionsOutput{}
+ } 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("trafficMirrorSessionSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTrafficMirrorSessionSet(&sv.TrafficMirrorSessions, 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 awsEc2query_deserializeOpDocumentDescribeTrafficMirrorTargetsOutput(v **DescribeTrafficMirrorTargetsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeTrafficMirrorTargetsOutput
+ if *v == nil {
+ sv = &DescribeTrafficMirrorTargetsOutput{}
+ } 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("trafficMirrorTargetSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTrafficMirrorTargetSet(&sv.TrafficMirrorTargets, 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 awsEc2query_deserializeOpDocumentDescribeTransitGatewayAttachmentsOutput(v **DescribeTransitGatewayAttachmentsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeTransitGatewayAttachmentsOutput
+ if *v == nil {
+ sv = &DescribeTransitGatewayAttachmentsOutput{}
+ } 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("transitGatewayAttachments", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTransitGatewayAttachmentList(&sv.TransitGatewayAttachments, 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 awsEc2query_deserializeOpDocumentDescribeTransitGatewayConnectPeersOutput(v **DescribeTransitGatewayConnectPeersOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeTransitGatewayConnectPeersOutput
+ if *v == nil {
+ sv = &DescribeTransitGatewayConnectPeersOutput{}
+ } 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("transitGatewayConnectPeerSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTransitGatewayConnectPeerList(&sv.TransitGatewayConnectPeers, 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 awsEc2query_deserializeOpDocumentDescribeTransitGatewayConnectsOutput(v **DescribeTransitGatewayConnectsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeTransitGatewayConnectsOutput
+ if *v == nil {
+ sv = &DescribeTransitGatewayConnectsOutput{}
+ } 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("transitGatewayConnectSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTransitGatewayConnectList(&sv.TransitGatewayConnects, 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 awsEc2query_deserializeOpDocumentDescribeTransitGatewayMulticastDomainsOutput(v **DescribeTransitGatewayMulticastDomainsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeTransitGatewayMulticastDomainsOutput
+ if *v == nil {
+ sv = &DescribeTransitGatewayMulticastDomainsOutput{}
+ } 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("transitGatewayMulticastDomains", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTransitGatewayMulticastDomainList(&sv.TransitGatewayMulticastDomains, 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 awsEc2query_deserializeOpDocumentDescribeTransitGatewayPeeringAttachmentsOutput(v **DescribeTransitGatewayPeeringAttachmentsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeTransitGatewayPeeringAttachmentsOutput
+ if *v == nil {
+ sv = &DescribeTransitGatewayPeeringAttachmentsOutput{}
+ } 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("transitGatewayPeeringAttachments", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTransitGatewayPeeringAttachmentList(&sv.TransitGatewayPeeringAttachments, 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 awsEc2query_deserializeOpDocumentDescribeTransitGatewayRouteTablesOutput(v **DescribeTransitGatewayRouteTablesOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeTransitGatewayRouteTablesOutput
+ if *v == nil {
+ sv = &DescribeTransitGatewayRouteTablesOutput{}
+ } 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("transitGatewayRouteTables", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTransitGatewayRouteTableList(&sv.TransitGatewayRouteTables, 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 awsEc2query_deserializeOpDocumentDescribeTransitGatewaysOutput(v **DescribeTransitGatewaysOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeTransitGatewaysOutput
+ if *v == nil {
+ sv = &DescribeTransitGatewaysOutput{}
+ } 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("transitGatewaySet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTransitGatewayList(&sv.TransitGateways, 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 awsEc2query_deserializeOpDocumentDescribeTransitGatewayVpcAttachmentsOutput(v **DescribeTransitGatewayVpcAttachmentsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeTransitGatewayVpcAttachmentsOutput
+ if *v == nil {
+ sv = &DescribeTransitGatewayVpcAttachmentsOutput{}
+ } 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("transitGatewayVpcAttachments", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTransitGatewayVpcAttachmentList(&sv.TransitGatewayVpcAttachments, 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 awsEc2query_deserializeOpDocumentDescribeTrunkInterfaceAssociationsOutput(v **DescribeTrunkInterfaceAssociationsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeTrunkInterfaceAssociationsOutput
+ if *v == nil {
+ sv = &DescribeTrunkInterfaceAssociationsOutput{}
+ } 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("interfaceAssociationSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTrunkInterfaceAssociationList(&sv.InterfaceAssociations, 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
+}
+
+func awsEc2query_deserializeOpDocumentDescribeVolumeAttributeOutput(v **DescribeVolumeAttributeOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeVolumeAttributeOutput
+ if *v == nil {
+ sv = &DescribeVolumeAttributeOutput{}
+ } 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("autoEnableIO", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentAttributeBooleanValue(&sv.AutoEnableIO, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("productCodes", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentProductCodeList(&sv.ProductCodes, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("volumeId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.VolumeId = 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 awsEc2query_deserializeOpDocumentDescribeVolumesModificationsOutput(v **DescribeVolumesModificationsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeVolumesModificationsOutput
+ if *v == nil {
+ sv = &DescribeVolumesModificationsOutput{}
+ } 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("volumeModificationSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentVolumeModificationList(&sv.VolumesModifications, 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 awsEc2query_deserializeOpDocumentDescribeVolumesOutput(v **DescribeVolumesOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeVolumesOutput
+ if *v == nil {
+ sv = &DescribeVolumesOutput{}
+ } 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("volumeSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentVolumeList(&sv.Volumes, 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 awsEc2query_deserializeOpDocumentDescribeVolumeStatusOutput(v **DescribeVolumeStatusOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeVolumeStatusOutput
+ if *v == nil {
+ sv = &DescribeVolumeStatusOutput{}
+ } 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("volumeStatusSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentVolumeStatusList(&sv.VolumeStatuses, 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 awsEc2query_deserializeOpDocumentDescribeVpcAttributeOutput(v **DescribeVpcAttributeOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeVpcAttributeOutput
+ if *v == nil {
+ sv = &DescribeVpcAttributeOutput{}
+ } 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("enableDnsHostnames", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentAttributeBooleanValue(&sv.EnableDnsHostnames, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("enableDnsSupport", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentAttributeBooleanValue(&sv.EnableDnsSupport, nodeDecoder); err != nil {
+ return err
+ }
+
+ 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)
+ }
+
+ 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 awsEc2query_deserializeOpDocumentDescribeVpcClassicLinkDnsSupportOutput(v **DescribeVpcClassicLinkDnsSupportOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeVpcClassicLinkDnsSupportOutput
+ if *v == nil {
+ sv = &DescribeVpcClassicLinkDnsSupportOutput{}
+ } 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("vpcs", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentClassicLinkDnsSupportList(&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
+}
+
+func awsEc2query_deserializeOpDocumentDescribeVpcClassicLinkOutput(v **DescribeVpcClassicLinkOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeVpcClassicLinkOutput
+ if *v == nil {
+ sv = &DescribeVpcClassicLinkOutput{}
+ } 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("vpcSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentVpcClassicLinkList(&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
+}
+
+func awsEc2query_deserializeOpDocumentDescribeVpcEndpointConnectionNotificationsOutput(v **DescribeVpcEndpointConnectionNotificationsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeVpcEndpointConnectionNotificationsOutput
+ if *v == nil {
+ sv = &DescribeVpcEndpointConnectionNotificationsOutput{}
+ } 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("connectionNotificationSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentConnectionNotificationSet(&sv.ConnectionNotificationSet, 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
+}
+
+func awsEc2query_deserializeOpDocumentDescribeVpcEndpointConnectionsOutput(v **DescribeVpcEndpointConnectionsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeVpcEndpointConnectionsOutput
+ if *v == nil {
+ sv = &DescribeVpcEndpointConnectionsOutput{}
+ } 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("vpcEndpointConnectionSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentVpcEndpointConnectionSet(&sv.VpcEndpointConnections, 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 awsEc2query_deserializeOpDocumentDescribeVpcEndpointServiceConfigurationsOutput(v **DescribeVpcEndpointServiceConfigurationsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeVpcEndpointServiceConfigurationsOutput
+ if *v == nil {
+ sv = &DescribeVpcEndpointServiceConfigurationsOutput{}
+ } 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("serviceConfigurationSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentServiceConfigurationSet(&sv.ServiceConfigurations, 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 awsEc2query_deserializeOpDocumentDescribeVpcEndpointServicePermissionsOutput(v **DescribeVpcEndpointServicePermissionsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeVpcEndpointServicePermissionsOutput
+ if *v == nil {
+ sv = &DescribeVpcEndpointServicePermissionsOutput{}
+ } 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("allowedPrincipals", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentAllowedPrincipalSet(&sv.AllowedPrincipals, 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
+}
+
+func awsEc2query_deserializeOpDocumentDescribeVpcEndpointServicesOutput(v **DescribeVpcEndpointServicesOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeVpcEndpointServicesOutput
+ if *v == nil {
+ sv = &DescribeVpcEndpointServicesOutput{}
+ } 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("serviceDetailSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentServiceDetailSet(&sv.ServiceDetails, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("serviceNameSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentValueStringList(&sv.ServiceNames, 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 awsEc2query_deserializeOpDocumentDescribeVpcEndpointsOutput(v **DescribeVpcEndpointsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeVpcEndpointsOutput
+ if *v == nil {
+ sv = &DescribeVpcEndpointsOutput{}
+ } 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("vpcEndpointSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentVpcEndpointSet(&sv.VpcEndpoints, 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 awsEc2query_deserializeOpDocumentDescribeVpcPeeringConnectionsOutput(v **DescribeVpcPeeringConnectionsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeVpcPeeringConnectionsOutput
+ if *v == nil {
+ sv = &DescribeVpcPeeringConnectionsOutput{}
+ } 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("vpcPeeringConnectionSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentVpcPeeringConnectionList(&sv.VpcPeeringConnections, 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 awsEc2query_deserializeOpDocumentDescribeVpcsOutput(v **DescribeVpcsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeVpcsOutput
+ if *v == nil {
+ sv = &DescribeVpcsOutput{}
+ } 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("vpcSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentVpcList(&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
+}
+
+func awsEc2query_deserializeOpDocumentDescribeVpnConnectionsOutput(v **DescribeVpnConnectionsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeVpnConnectionsOutput
+ if *v == nil {
+ sv = &DescribeVpnConnectionsOutput{}
+ } 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("vpnConnectionSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentVpnConnectionList(&sv.VpnConnections, 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 awsEc2query_deserializeOpDocumentDescribeVpnGatewaysOutput(v **DescribeVpnGatewaysOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DescribeVpnGatewaysOutput
+ if *v == nil {
+ sv = &DescribeVpnGatewaysOutput{}
+ } 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("vpnGatewaySet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentVpnGatewayList(&sv.VpnGateways, 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 awsEc2query_deserializeOpDocumentDetachClassicLinkVpcOutput(v **DetachClassicLinkVpcOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DetachClassicLinkVpcOutput
+ if *v == nil {
+ sv = &DetachClassicLinkVpcOutput{}
+ } 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("return", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.Return = ptr.Bool(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 awsEc2query_deserializeOpDocumentDetachVolumeOutput(v **DetachVolumeOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DetachVolumeOutput
+ if *v == nil {
+ sv = &DetachVolumeOutput{}
+ } 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("attachTime", 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.AttachTime = ptr.Time(t)
+ }
+
+ case strings.EqualFold("deleteOnTermination", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.DeleteOnTermination = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("device", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Device = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("instanceId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.InstanceId = 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.State = types.VolumeAttachmentState(xtv)
+ }
+
+ case strings.EqualFold("volumeId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.VolumeId = 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 awsEc2query_deserializeOpDocumentDisableEbsEncryptionByDefaultOutput(v **DisableEbsEncryptionByDefaultOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DisableEbsEncryptionByDefaultOutput
+ if *v == nil {
+ sv = &DisableEbsEncryptionByDefaultOutput{}
+ } 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("ebsEncryptionByDefault", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.EbsEncryptionByDefault = ptr.Bool(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 awsEc2query_deserializeOpDocumentDisableFastSnapshotRestoresOutput(v **DisableFastSnapshotRestoresOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DisableFastSnapshotRestoresOutput
+ if *v == nil {
+ sv = &DisableFastSnapshotRestoresOutput{}
+ } 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("successful", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentDisableFastSnapshotRestoreSuccessSet(&sv.Successful, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("unsuccessful", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentDisableFastSnapshotRestoreErrorSet(&sv.Unsuccessful, 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 awsEc2query_deserializeOpDocumentDisableImageDeprecationOutput(v **DisableImageDeprecationOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DisableImageDeprecationOutput
+ if *v == nil {
+ sv = &DisableImageDeprecationOutput{}
+ } 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("return", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.Return = ptr.Bool(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 awsEc2query_deserializeOpDocumentDisableSerialConsoleAccessOutput(v **DisableSerialConsoleAccessOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DisableSerialConsoleAccessOutput
+ if *v == nil {
+ sv = &DisableSerialConsoleAccessOutput{}
+ } 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("serialConsoleAccessEnabled", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.SerialConsoleAccessEnabled = ptr.Bool(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 awsEc2query_deserializeOpDocumentDisableTransitGatewayRouteTablePropagationOutput(v **DisableTransitGatewayRouteTablePropagationOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DisableTransitGatewayRouteTablePropagationOutput
+ if *v == nil {
+ sv = &DisableTransitGatewayRouteTablePropagationOutput{}
+ } 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("propagation", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTransitGatewayPropagation(&sv.Propagation, 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 awsEc2query_deserializeOpDocumentDisableVpcClassicLinkDnsSupportOutput(v **DisableVpcClassicLinkDnsSupportOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DisableVpcClassicLinkDnsSupportOutput
+ if *v == nil {
+ sv = &DisableVpcClassicLinkDnsSupportOutput{}
+ } 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("return", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.Return = ptr.Bool(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 awsEc2query_deserializeOpDocumentDisableVpcClassicLinkOutput(v **DisableVpcClassicLinkOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DisableVpcClassicLinkOutput
+ if *v == nil {
+ sv = &DisableVpcClassicLinkOutput{}
+ } 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("return", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.Return = ptr.Bool(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 awsEc2query_deserializeOpDocumentDisassociateClientVpnTargetNetworkOutput(v **DisassociateClientVpnTargetNetworkOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DisassociateClientVpnTargetNetworkOutput
+ if *v == nil {
+ sv = &DisassociateClientVpnTargetNetworkOutput{}
+ } 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("associationId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AssociationId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("status", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentAssociationStatus(&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
+}
+
+func awsEc2query_deserializeOpDocumentDisassociateEnclaveCertificateIamRoleOutput(v **DisassociateEnclaveCertificateIamRoleOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DisassociateEnclaveCertificateIamRoleOutput
+ if *v == nil {
+ sv = &DisassociateEnclaveCertificateIamRoleOutput{}
+ } 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("return", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.Return = ptr.Bool(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 awsEc2query_deserializeOpDocumentDisassociateIamInstanceProfileOutput(v **DisassociateIamInstanceProfileOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DisassociateIamInstanceProfileOutput
+ if *v == nil {
+ sv = &DisassociateIamInstanceProfileOutput{}
+ } 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("iamInstanceProfileAssociation", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentIamInstanceProfileAssociation(&sv.IamInstanceProfileAssociation, 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 awsEc2query_deserializeOpDocumentDisassociateInstanceEventWindowOutput(v **DisassociateInstanceEventWindowOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DisassociateInstanceEventWindowOutput
+ if *v == nil {
+ sv = &DisassociateInstanceEventWindowOutput{}
+ } 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("instanceEventWindow", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentInstanceEventWindow(&sv.InstanceEventWindow, 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 awsEc2query_deserializeOpDocumentDisassociateSubnetCidrBlockOutput(v **DisassociateSubnetCidrBlockOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DisassociateSubnetCidrBlockOutput
+ if *v == nil {
+ sv = &DisassociateSubnetCidrBlockOutput{}
+ } 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("ipv6CidrBlockAssociation", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentSubnetIpv6CidrBlockAssociation(&sv.Ipv6CidrBlockAssociation, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("subnetId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.SubnetId = 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 awsEc2query_deserializeOpDocumentDisassociateTransitGatewayMulticastDomainOutput(v **DisassociateTransitGatewayMulticastDomainOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DisassociateTransitGatewayMulticastDomainOutput
+ if *v == nil {
+ sv = &DisassociateTransitGatewayMulticastDomainOutput{}
+ } 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("associations", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTransitGatewayMulticastDomainAssociations(&sv.Associations, 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 awsEc2query_deserializeOpDocumentDisassociateTransitGatewayRouteTableOutput(v **DisassociateTransitGatewayRouteTableOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DisassociateTransitGatewayRouteTableOutput
+ if *v == nil {
+ sv = &DisassociateTransitGatewayRouteTableOutput{}
+ } 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("association", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTransitGatewayAssociation(&sv.Association, 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 awsEc2query_deserializeOpDocumentDisassociateTrunkInterfaceOutput(v **DisassociateTrunkInterfaceOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DisassociateTrunkInterfaceOutput
+ if *v == nil {
+ sv = &DisassociateTrunkInterfaceOutput{}
+ } 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("clientToken", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ClientToken = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("return", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.Return = ptr.Bool(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 awsEc2query_deserializeOpDocumentDisassociateVpcCidrBlockOutput(v **DisassociateVpcCidrBlockOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DisassociateVpcCidrBlockOutput
+ if *v == nil {
+ sv = &DisassociateVpcCidrBlockOutput{}
+ } 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("cidrBlockAssociation", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentVpcCidrBlockAssociation(&sv.CidrBlockAssociation, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("ipv6CidrBlockAssociation", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentVpcIpv6CidrBlockAssociation(&sv.Ipv6CidrBlockAssociation, nodeDecoder); err != nil {
+ return err
+ }
+
+ 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)
+ }
+
+ 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 awsEc2query_deserializeOpDocumentEnableEbsEncryptionByDefaultOutput(v **EnableEbsEncryptionByDefaultOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *EnableEbsEncryptionByDefaultOutput
+ if *v == nil {
+ sv = &EnableEbsEncryptionByDefaultOutput{}
+ } 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("ebsEncryptionByDefault", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.EbsEncryptionByDefault = ptr.Bool(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 awsEc2query_deserializeOpDocumentEnableFastSnapshotRestoresOutput(v **EnableFastSnapshotRestoresOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *EnableFastSnapshotRestoresOutput
+ if *v == nil {
+ sv = &EnableFastSnapshotRestoresOutput{}
+ } 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("successful", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentEnableFastSnapshotRestoreSuccessSet(&sv.Successful, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("unsuccessful", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentEnableFastSnapshotRestoreErrorSet(&sv.Unsuccessful, 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 awsEc2query_deserializeOpDocumentEnableImageDeprecationOutput(v **EnableImageDeprecationOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *EnableImageDeprecationOutput
+ if *v == nil {
+ sv = &EnableImageDeprecationOutput{}
+ } 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("return", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.Return = ptr.Bool(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 awsEc2query_deserializeOpDocumentEnableSerialConsoleAccessOutput(v **EnableSerialConsoleAccessOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *EnableSerialConsoleAccessOutput
+ if *v == nil {
+ sv = &EnableSerialConsoleAccessOutput{}
+ } 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("serialConsoleAccessEnabled", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.SerialConsoleAccessEnabled = ptr.Bool(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 awsEc2query_deserializeOpDocumentEnableTransitGatewayRouteTablePropagationOutput(v **EnableTransitGatewayRouteTablePropagationOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *EnableTransitGatewayRouteTablePropagationOutput
+ if *v == nil {
+ sv = &EnableTransitGatewayRouteTablePropagationOutput{}
+ } 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("propagation", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTransitGatewayPropagation(&sv.Propagation, 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 awsEc2query_deserializeOpDocumentEnableVpcClassicLinkDnsSupportOutput(v **EnableVpcClassicLinkDnsSupportOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *EnableVpcClassicLinkDnsSupportOutput
+ if *v == nil {
+ sv = &EnableVpcClassicLinkDnsSupportOutput{}
+ } 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("return", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.Return = ptr.Bool(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 awsEc2query_deserializeOpDocumentEnableVpcClassicLinkOutput(v **EnableVpcClassicLinkOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *EnableVpcClassicLinkOutput
+ if *v == nil {
+ sv = &EnableVpcClassicLinkOutput{}
+ } 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("return", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.Return = ptr.Bool(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 awsEc2query_deserializeOpDocumentExportClientVpnClientCertificateRevocationListOutput(v **ExportClientVpnClientCertificateRevocationListOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *ExportClientVpnClientCertificateRevocationListOutput
+ if *v == nil {
+ sv = &ExportClientVpnClientCertificateRevocationListOutput{}
+ } 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("certificateRevocationList", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.CertificateRevocationList = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("status", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentClientCertificateRevocationListStatus(&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
+}
+
+func awsEc2query_deserializeOpDocumentExportClientVpnClientConfigurationOutput(v **ExportClientVpnClientConfigurationOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *ExportClientVpnClientConfigurationOutput
+ if *v == nil {
+ sv = &ExportClientVpnClientConfigurationOutput{}
+ } 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("clientConfiguration", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ClientConfiguration = 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 awsEc2query_deserializeOpDocumentExportImageOutput(v **ExportImageOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *ExportImageOutput
+ if *v == nil {
+ sv = &ExportImageOutput{}
+ } 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("diskImageFormat", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.DiskImageFormat = types.DiskImageFormat(xtv)
+ }
+
+ case strings.EqualFold("exportImageTaskId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ExportImageTaskId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("imageId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ImageId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("progress", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Progress = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("roleName", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.RoleName = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("s3ExportLocation", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentExportTaskS3Location(&sv.S3ExportLocation, nodeDecoder); err != nil {
+ return err
+ }
+
+ 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)
+ }
+
+ case strings.EqualFold("tagSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_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 awsEc2query_deserializeOpDocumentExportTransitGatewayRoutesOutput(v **ExportTransitGatewayRoutesOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *ExportTransitGatewayRoutesOutput
+ if *v == nil {
+ sv = &ExportTransitGatewayRoutesOutput{}
+ } 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("s3Location", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.S3Location = 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 awsEc2query_deserializeOpDocumentGetAssociatedEnclaveCertificateIamRolesOutput(v **GetAssociatedEnclaveCertificateIamRolesOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *GetAssociatedEnclaveCertificateIamRolesOutput
+ if *v == nil {
+ sv = &GetAssociatedEnclaveCertificateIamRolesOutput{}
+ } 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("associatedRoleSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentAssociatedRolesList(&sv.AssociatedRoles, 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 awsEc2query_deserializeOpDocumentGetAssociatedIpv6PoolCidrsOutput(v **GetAssociatedIpv6PoolCidrsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *GetAssociatedIpv6PoolCidrsOutput
+ if *v == nil {
+ sv = &GetAssociatedIpv6PoolCidrsOutput{}
+ } 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("ipv6CidrAssociationSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentIpv6CidrAssociationSet(&sv.Ipv6CidrAssociations, 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
+}
+
+func awsEc2query_deserializeOpDocumentGetCapacityReservationUsageOutput(v **GetCapacityReservationUsageOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *GetCapacityReservationUsageOutput
+ if *v == nil {
+ sv = &GetCapacityReservationUsageOutput{}
+ } 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("availableInstanceCount", 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.AvailableInstanceCount = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("capacityReservationId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.CapacityReservationId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("instanceType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.InstanceType = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("instanceUsageSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentInstanceUsageSet(&sv.InstanceUsages, 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)
+ }
+
+ 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 = types.CapacityReservationState(xtv)
+ }
+
+ case strings.EqualFold("totalInstanceCount", 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.TotalInstanceCount = 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 awsEc2query_deserializeOpDocumentGetCoipPoolUsageOutput(v **GetCoipPoolUsageOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *GetCoipPoolUsageOutput
+ if *v == nil {
+ sv = &GetCoipPoolUsageOutput{}
+ } 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("coipAddressUsageSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentCoipAddressUsageSet(&sv.CoipAddressUsages, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("coipPoolId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.CoipPoolId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("localGatewayRouteTableId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.LocalGatewayRouteTableId = 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 awsEc2query_deserializeOpDocumentGetConsoleOutputOutput(v **GetConsoleOutputOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *GetConsoleOutputOutput
+ if *v == nil {
+ sv = &GetConsoleOutputOutput{}
+ } 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("instanceId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.InstanceId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("output", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Output = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("timestamp", 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.Timestamp = 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 awsEc2query_deserializeOpDocumentGetConsoleScreenshotOutput(v **GetConsoleScreenshotOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *GetConsoleScreenshotOutput
+ if *v == nil {
+ sv = &GetConsoleScreenshotOutput{}
+ } 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("imageData", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ImageData = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("instanceId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.InstanceId = 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 awsEc2query_deserializeOpDocumentGetDefaultCreditSpecificationOutput(v **GetDefaultCreditSpecificationOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *GetDefaultCreditSpecificationOutput
+ if *v == nil {
+ sv = &GetDefaultCreditSpecificationOutput{}
+ } 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("instanceFamilyCreditSpecification", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentInstanceFamilyCreditSpecification(&sv.InstanceFamilyCreditSpecification, 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 awsEc2query_deserializeOpDocumentGetEbsDefaultKmsKeyIdOutput(v **GetEbsDefaultKmsKeyIdOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *GetEbsDefaultKmsKeyIdOutput
+ if *v == nil {
+ sv = &GetEbsDefaultKmsKeyIdOutput{}
+ } 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("kmsKeyId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.KmsKeyId = 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 awsEc2query_deserializeOpDocumentGetEbsEncryptionByDefaultOutput(v **GetEbsEncryptionByDefaultOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *GetEbsEncryptionByDefaultOutput
+ if *v == nil {
+ sv = &GetEbsEncryptionByDefaultOutput{}
+ } 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("ebsEncryptionByDefault", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.EbsEncryptionByDefault = ptr.Bool(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 awsEc2query_deserializeOpDocumentGetFlowLogsIntegrationTemplateOutput(v **GetFlowLogsIntegrationTemplateOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *GetFlowLogsIntegrationTemplateOutput
+ if *v == nil {
+ sv = &GetFlowLogsIntegrationTemplateOutput{}
+ } 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("result", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Result = 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 awsEc2query_deserializeOpDocumentGetGroupsForCapacityReservationOutput(v **GetGroupsForCapacityReservationOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *GetGroupsForCapacityReservationOutput
+ if *v == nil {
+ sv = &GetGroupsForCapacityReservationOutput{}
+ } 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("capacityReservationGroupSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentCapacityReservationGroupSet(&sv.CapacityReservationGroups, 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
+}
+
+func awsEc2query_deserializeOpDocumentGetHostReservationPurchasePreviewOutput(v **GetHostReservationPurchasePreviewOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *GetHostReservationPurchasePreviewOutput
+ if *v == nil {
+ sv = &GetHostReservationPurchasePreviewOutput{}
+ } 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("currencyCode", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.CurrencyCode = types.CurrencyCodeValues(xtv)
+ }
+
+ case strings.EqualFold("purchase", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentPurchaseSet(&sv.Purchase, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("totalHourlyPrice", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.TotalHourlyPrice = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("totalUpfrontPrice", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.TotalUpfrontPrice = 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 awsEc2query_deserializeOpDocumentGetLaunchTemplateDataOutput(v **GetLaunchTemplateDataOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *GetLaunchTemplateDataOutput
+ if *v == nil {
+ sv = &GetLaunchTemplateDataOutput{}
+ } 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("launchTemplateData", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentResponseLaunchTemplateData(&sv.LaunchTemplateData, 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 awsEc2query_deserializeOpDocumentGetManagedPrefixListAssociationsOutput(v **GetManagedPrefixListAssociationsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *GetManagedPrefixListAssociationsOutput
+ if *v == nil {
+ sv = &GetManagedPrefixListAssociationsOutput{}
+ } 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("prefixListAssociationSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentPrefixListAssociationSet(&sv.PrefixListAssociations, 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 awsEc2query_deserializeOpDocumentGetManagedPrefixListEntriesOutput(v **GetManagedPrefixListEntriesOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *GetManagedPrefixListEntriesOutput
+ if *v == nil {
+ sv = &GetManagedPrefixListEntriesOutput{}
+ } 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("entrySet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentPrefixListEntrySet(&sv.Entries, 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
+}
+
+func awsEc2query_deserializeOpDocumentGetPasswordDataOutput(v **GetPasswordDataOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *GetPasswordDataOutput
+ if *v == nil {
+ sv = &GetPasswordDataOutput{}
+ } 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("instanceId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.InstanceId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("passwordData", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.PasswordData = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("timestamp", 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.Timestamp = 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 awsEc2query_deserializeOpDocumentGetReservedInstancesExchangeQuoteOutput(v **GetReservedInstancesExchangeQuoteOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *GetReservedInstancesExchangeQuoteOutput
+ if *v == nil {
+ sv = &GetReservedInstancesExchangeQuoteOutput{}
+ } 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("currencyCode", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.CurrencyCode = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("isValidExchange", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.IsValidExchange = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("outputReservedInstancesWillExpireAt", 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.OutputReservedInstancesWillExpireAt = ptr.Time(t)
+ }
+
+ case strings.EqualFold("paymentDue", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.PaymentDue = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("reservedInstanceValueRollup", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentReservationValue(&sv.ReservedInstanceValueRollup, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("reservedInstanceValueSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentReservedInstanceReservationValueSet(&sv.ReservedInstanceValueSet, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("targetConfigurationValueRollup", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentReservationValue(&sv.TargetConfigurationValueRollup, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("targetConfigurationValueSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTargetReservationValueSet(&sv.TargetConfigurationValueSet, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("validationFailureReason", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ValidationFailureReason = 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 awsEc2query_deserializeOpDocumentGetSerialConsoleAccessStatusOutput(v **GetSerialConsoleAccessStatusOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *GetSerialConsoleAccessStatusOutput
+ if *v == nil {
+ sv = &GetSerialConsoleAccessStatusOutput{}
+ } 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("serialConsoleAccessEnabled", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.SerialConsoleAccessEnabled = ptr.Bool(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 awsEc2query_deserializeOpDocumentGetSubnetCidrReservationsOutput(v **GetSubnetCidrReservationsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *GetSubnetCidrReservationsOutput
+ if *v == nil {
+ sv = &GetSubnetCidrReservationsOutput{}
+ } 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("subnetIpv4CidrReservationSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentSubnetCidrReservationList(&sv.SubnetIpv4CidrReservations, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("subnetIpv6CidrReservationSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentSubnetCidrReservationList(&sv.SubnetIpv6CidrReservations, 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 awsEc2query_deserializeOpDocumentGetTransitGatewayAttachmentPropagationsOutput(v **GetTransitGatewayAttachmentPropagationsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *GetTransitGatewayAttachmentPropagationsOutput
+ if *v == nil {
+ sv = &GetTransitGatewayAttachmentPropagationsOutput{}
+ } 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("transitGatewayAttachmentPropagations", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTransitGatewayAttachmentPropagationList(&sv.TransitGatewayAttachmentPropagations, 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 awsEc2query_deserializeOpDocumentGetTransitGatewayMulticastDomainAssociationsOutput(v **GetTransitGatewayMulticastDomainAssociationsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *GetTransitGatewayMulticastDomainAssociationsOutput
+ if *v == nil {
+ sv = &GetTransitGatewayMulticastDomainAssociationsOutput{}
+ } 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("multicastDomainAssociations", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTransitGatewayMulticastDomainAssociationList(&sv.MulticastDomainAssociations, 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
+}
+
+func awsEc2query_deserializeOpDocumentGetTransitGatewayPrefixListReferencesOutput(v **GetTransitGatewayPrefixListReferencesOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *GetTransitGatewayPrefixListReferencesOutput
+ if *v == nil {
+ sv = &GetTransitGatewayPrefixListReferencesOutput{}
+ } 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("transitGatewayPrefixListReferenceSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTransitGatewayPrefixListReferenceSet(&sv.TransitGatewayPrefixListReferences, 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 awsEc2query_deserializeOpDocumentGetTransitGatewayRouteTableAssociationsOutput(v **GetTransitGatewayRouteTableAssociationsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *GetTransitGatewayRouteTableAssociationsOutput
+ if *v == nil {
+ sv = &GetTransitGatewayRouteTableAssociationsOutput{}
+ } 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("associations", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTransitGatewayRouteTableAssociationList(&sv.Associations, 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
+}
+
+func awsEc2query_deserializeOpDocumentGetTransitGatewayRouteTablePropagationsOutput(v **GetTransitGatewayRouteTablePropagationsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *GetTransitGatewayRouteTablePropagationsOutput
+ if *v == nil {
+ sv = &GetTransitGatewayRouteTablePropagationsOutput{}
+ } 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("transitGatewayRouteTablePropagations", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTransitGatewayRouteTablePropagationList(&sv.TransitGatewayRouteTablePropagations, 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 awsEc2query_deserializeOpDocumentGetVpnConnectionDeviceSampleConfigurationOutput(v **GetVpnConnectionDeviceSampleConfigurationOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *GetVpnConnectionDeviceSampleConfigurationOutput
+ if *v == nil {
+ sv = &GetVpnConnectionDeviceSampleConfigurationOutput{}
+ } 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("vpnConnectionDeviceSampleConfiguration", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.VpnConnectionDeviceSampleConfiguration = 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 awsEc2query_deserializeOpDocumentGetVpnConnectionDeviceTypesOutput(v **GetVpnConnectionDeviceTypesOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *GetVpnConnectionDeviceTypesOutput
+ if *v == nil {
+ sv = &GetVpnConnectionDeviceTypesOutput{}
+ } 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("vpnConnectionDeviceTypeSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentVpnConnectionDeviceTypeList(&sv.VpnConnectionDeviceTypes, 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 awsEc2query_deserializeOpDocumentImportClientVpnClientCertificateRevocationListOutput(v **ImportClientVpnClientCertificateRevocationListOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *ImportClientVpnClientCertificateRevocationListOutput
+ if *v == nil {
+ sv = &ImportClientVpnClientCertificateRevocationListOutput{}
+ } 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("return", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.Return = ptr.Bool(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 awsEc2query_deserializeOpDocumentImportImageOutput(v **ImportImageOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *ImportImageOutput
+ if *v == nil {
+ sv = &ImportImageOutput{}
+ } 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("architecture", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Architecture = ptr.String(xtv)
+ }
+
+ 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("encrypted", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.Encrypted = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("hypervisor", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Hypervisor = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("imageId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ImageId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("importTaskId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ImportTaskId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("kmsKeyId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.KmsKeyId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("licenseSpecifications", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentImportImageLicenseSpecificationListResponse(&sv.LicenseSpecifications, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("licenseType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.LicenseType = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("platform", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Platform = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("progress", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Progress = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("snapshotDetailSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentSnapshotDetailList(&sv.SnapshotDetails, nodeDecoder); err != nil {
+ return err
+ }
+
+ 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)
+ }
+
+ case strings.EqualFold("tagSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("usageOperation", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.UsageOperation = 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 awsEc2query_deserializeOpDocumentImportInstanceOutput(v **ImportInstanceOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *ImportInstanceOutput
+ if *v == nil {
+ sv = &ImportInstanceOutput{}
+ } 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("conversionTask", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentConversionTask(&sv.ConversionTask, 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 awsEc2query_deserializeOpDocumentImportKeyPairOutput(v **ImportKeyPairOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *ImportKeyPairOutput
+ if *v == nil {
+ sv = &ImportKeyPairOutput{}
+ } 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("keyFingerprint", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.KeyFingerprint = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("keyName", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.KeyName = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("keyPairId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.KeyPairId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("tagSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_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 awsEc2query_deserializeOpDocumentImportSnapshotOutput(v **ImportSnapshotOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *ImportSnapshotOutput
+ if *v == nil {
+ sv = &ImportSnapshotOutput{}
+ } 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("importTaskId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ImportTaskId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("snapshotTaskDetail", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentSnapshotTaskDetail(&sv.SnapshotTaskDetail, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("tagSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_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 awsEc2query_deserializeOpDocumentImportVolumeOutput(v **ImportVolumeOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *ImportVolumeOutput
+ if *v == nil {
+ sv = &ImportVolumeOutput{}
+ } 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("conversionTask", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentConversionTask(&sv.ConversionTask, 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 awsEc2query_deserializeOpDocumentModifyAddressAttributeOutput(v **ModifyAddressAttributeOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *ModifyAddressAttributeOutput
+ if *v == nil {
+ sv = &ModifyAddressAttributeOutput{}
+ } 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("address", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentAddressAttribute(&sv.Address, 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 awsEc2query_deserializeOpDocumentModifyAvailabilityZoneGroupOutput(v **ModifyAvailabilityZoneGroupOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *ModifyAvailabilityZoneGroupOutput
+ if *v == nil {
+ sv = &ModifyAvailabilityZoneGroupOutput{}
+ } 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("return", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.Return = ptr.Bool(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 awsEc2query_deserializeOpDocumentModifyCapacityReservationOutput(v **ModifyCapacityReservationOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *ModifyCapacityReservationOutput
+ if *v == nil {
+ sv = &ModifyCapacityReservationOutput{}
+ } 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("return", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.Return = ptr.Bool(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 awsEc2query_deserializeOpDocumentModifyClientVpnEndpointOutput(v **ModifyClientVpnEndpointOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *ModifyClientVpnEndpointOutput
+ if *v == nil {
+ sv = &ModifyClientVpnEndpointOutput{}
+ } 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("return", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.Return = ptr.Bool(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 awsEc2query_deserializeOpDocumentModifyDefaultCreditSpecificationOutput(v **ModifyDefaultCreditSpecificationOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *ModifyDefaultCreditSpecificationOutput
+ if *v == nil {
+ sv = &ModifyDefaultCreditSpecificationOutput{}
+ } 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("instanceFamilyCreditSpecification", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentInstanceFamilyCreditSpecification(&sv.InstanceFamilyCreditSpecification, 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 awsEc2query_deserializeOpDocumentModifyEbsDefaultKmsKeyIdOutput(v **ModifyEbsDefaultKmsKeyIdOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *ModifyEbsDefaultKmsKeyIdOutput
+ if *v == nil {
+ sv = &ModifyEbsDefaultKmsKeyIdOutput{}
+ } 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("kmsKeyId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.KmsKeyId = 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 awsEc2query_deserializeOpDocumentModifyFleetOutput(v **ModifyFleetOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *ModifyFleetOutput
+ if *v == nil {
+ sv = &ModifyFleetOutput{}
+ } 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("return", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.Return = ptr.Bool(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 awsEc2query_deserializeOpDocumentModifyFpgaImageAttributeOutput(v **ModifyFpgaImageAttributeOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *ModifyFpgaImageAttributeOutput
+ if *v == nil {
+ sv = &ModifyFpgaImageAttributeOutput{}
+ } 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("fpgaImageAttribute", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentFpgaImageAttribute(&sv.FpgaImageAttribute, 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 awsEc2query_deserializeOpDocumentModifyHostsOutput(v **ModifyHostsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *ModifyHostsOutput
+ if *v == nil {
+ sv = &ModifyHostsOutput{}
+ } 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("successful", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentResponseHostIdList(&sv.Successful, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("unsuccessful", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentUnsuccessfulItemList(&sv.Unsuccessful, 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 awsEc2query_deserializeOpDocumentModifyInstanceCapacityReservationAttributesOutput(v **ModifyInstanceCapacityReservationAttributesOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *ModifyInstanceCapacityReservationAttributesOutput
+ if *v == nil {
+ sv = &ModifyInstanceCapacityReservationAttributesOutput{}
+ } 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("return", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.Return = ptr.Bool(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 awsEc2query_deserializeOpDocumentModifyInstanceCreditSpecificationOutput(v **ModifyInstanceCreditSpecificationOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *ModifyInstanceCreditSpecificationOutput
+ if *v == nil {
+ sv = &ModifyInstanceCreditSpecificationOutput{}
+ } 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("successfulInstanceCreditSpecificationSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentSuccessfulInstanceCreditSpecificationSet(&sv.SuccessfulInstanceCreditSpecifications, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("unsuccessfulInstanceCreditSpecificationSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentUnsuccessfulInstanceCreditSpecificationSet(&sv.UnsuccessfulInstanceCreditSpecifications, 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 awsEc2query_deserializeOpDocumentModifyInstanceEventStartTimeOutput(v **ModifyInstanceEventStartTimeOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *ModifyInstanceEventStartTimeOutput
+ if *v == nil {
+ sv = &ModifyInstanceEventStartTimeOutput{}
+ } 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("event", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentInstanceStatusEvent(&sv.Event, 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 awsEc2query_deserializeOpDocumentModifyInstanceEventWindowOutput(v **ModifyInstanceEventWindowOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *ModifyInstanceEventWindowOutput
+ if *v == nil {
+ sv = &ModifyInstanceEventWindowOutput{}
+ } 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("instanceEventWindow", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentInstanceEventWindow(&sv.InstanceEventWindow, 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 awsEc2query_deserializeOpDocumentModifyInstanceMetadataOptionsOutput(v **ModifyInstanceMetadataOptionsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *ModifyInstanceMetadataOptionsOutput
+ if *v == nil {
+ sv = &ModifyInstanceMetadataOptionsOutput{}
+ } 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("instanceId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.InstanceId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("instanceMetadataOptions", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentInstanceMetadataOptionsResponse(&sv.InstanceMetadataOptions, 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 awsEc2query_deserializeOpDocumentModifyInstancePlacementOutput(v **ModifyInstancePlacementOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *ModifyInstancePlacementOutput
+ if *v == nil {
+ sv = &ModifyInstancePlacementOutput{}
+ } 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("return", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.Return = ptr.Bool(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 awsEc2query_deserializeOpDocumentModifyLaunchTemplateOutput(v **ModifyLaunchTemplateOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *ModifyLaunchTemplateOutput
+ if *v == nil {
+ sv = &ModifyLaunchTemplateOutput{}
+ } 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("launchTemplate", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentLaunchTemplate(&sv.LaunchTemplate, 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 awsEc2query_deserializeOpDocumentModifyManagedPrefixListOutput(v **ModifyManagedPrefixListOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *ModifyManagedPrefixListOutput
+ if *v == nil {
+ sv = &ModifyManagedPrefixListOutput{}
+ } 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("prefixList", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentManagedPrefixList(&sv.PrefixList, 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 awsEc2query_deserializeOpDocumentModifyReservedInstancesOutput(v **ModifyReservedInstancesOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *ModifyReservedInstancesOutput
+ if *v == nil {
+ sv = &ModifyReservedInstancesOutput{}
+ } 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("reservedInstancesModificationId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ReservedInstancesModificationId = 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 awsEc2query_deserializeOpDocumentModifySecurityGroupRulesOutput(v **ModifySecurityGroupRulesOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *ModifySecurityGroupRulesOutput
+ if *v == nil {
+ sv = &ModifySecurityGroupRulesOutput{}
+ } 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("return", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.Return = ptr.Bool(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 awsEc2query_deserializeOpDocumentModifySpotFleetRequestOutput(v **ModifySpotFleetRequestOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *ModifySpotFleetRequestOutput
+ if *v == nil {
+ sv = &ModifySpotFleetRequestOutput{}
+ } 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("return", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.Return = ptr.Bool(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 awsEc2query_deserializeOpDocumentModifyTrafficMirrorFilterNetworkServicesOutput(v **ModifyTrafficMirrorFilterNetworkServicesOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *ModifyTrafficMirrorFilterNetworkServicesOutput
+ if *v == nil {
+ sv = &ModifyTrafficMirrorFilterNetworkServicesOutput{}
+ } 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("trafficMirrorFilter", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTrafficMirrorFilter(&sv.TrafficMirrorFilter, 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 awsEc2query_deserializeOpDocumentModifyTrafficMirrorFilterRuleOutput(v **ModifyTrafficMirrorFilterRuleOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *ModifyTrafficMirrorFilterRuleOutput
+ if *v == nil {
+ sv = &ModifyTrafficMirrorFilterRuleOutput{}
+ } 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("trafficMirrorFilterRule", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTrafficMirrorFilterRule(&sv.TrafficMirrorFilterRule, 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 awsEc2query_deserializeOpDocumentModifyTrafficMirrorSessionOutput(v **ModifyTrafficMirrorSessionOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *ModifyTrafficMirrorSessionOutput
+ if *v == nil {
+ sv = &ModifyTrafficMirrorSessionOutput{}
+ } 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("trafficMirrorSession", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTrafficMirrorSession(&sv.TrafficMirrorSession, 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 awsEc2query_deserializeOpDocumentModifyTransitGatewayOutput(v **ModifyTransitGatewayOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *ModifyTransitGatewayOutput
+ if *v == nil {
+ sv = &ModifyTransitGatewayOutput{}
+ } 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("transitGateway", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTransitGateway(&sv.TransitGateway, 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 awsEc2query_deserializeOpDocumentModifyTransitGatewayPrefixListReferenceOutput(v **ModifyTransitGatewayPrefixListReferenceOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *ModifyTransitGatewayPrefixListReferenceOutput
+ if *v == nil {
+ sv = &ModifyTransitGatewayPrefixListReferenceOutput{}
+ } 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("transitGatewayPrefixListReference", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTransitGatewayPrefixListReference(&sv.TransitGatewayPrefixListReference, 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 awsEc2query_deserializeOpDocumentModifyTransitGatewayVpcAttachmentOutput(v **ModifyTransitGatewayVpcAttachmentOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *ModifyTransitGatewayVpcAttachmentOutput
+ if *v == nil {
+ sv = &ModifyTransitGatewayVpcAttachmentOutput{}
+ } 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("transitGatewayVpcAttachment", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTransitGatewayVpcAttachment(&sv.TransitGatewayVpcAttachment, 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 awsEc2query_deserializeOpDocumentModifyVolumeOutput(v **ModifyVolumeOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *ModifyVolumeOutput
+ if *v == nil {
+ sv = &ModifyVolumeOutput{}
+ } 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("volumeModification", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentVolumeModification(&sv.VolumeModification, 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 awsEc2query_deserializeOpDocumentModifyVpcEndpointConnectionNotificationOutput(v **ModifyVpcEndpointConnectionNotificationOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *ModifyVpcEndpointConnectionNotificationOutput
+ if *v == nil {
+ sv = &ModifyVpcEndpointConnectionNotificationOutput{}
+ } 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("return", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.ReturnValue = ptr.Bool(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 awsEc2query_deserializeOpDocumentModifyVpcEndpointOutput(v **ModifyVpcEndpointOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *ModifyVpcEndpointOutput
+ if *v == nil {
+ sv = &ModifyVpcEndpointOutput{}
+ } 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("return", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.Return = ptr.Bool(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 awsEc2query_deserializeOpDocumentModifyVpcEndpointServiceConfigurationOutput(v **ModifyVpcEndpointServiceConfigurationOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *ModifyVpcEndpointServiceConfigurationOutput
+ if *v == nil {
+ sv = &ModifyVpcEndpointServiceConfigurationOutput{}
+ } 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("return", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.Return = ptr.Bool(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 awsEc2query_deserializeOpDocumentModifyVpcEndpointServicePermissionsOutput(v **ModifyVpcEndpointServicePermissionsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *ModifyVpcEndpointServicePermissionsOutput
+ if *v == nil {
+ sv = &ModifyVpcEndpointServicePermissionsOutput{}
+ } 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("return", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.ReturnValue = ptr.Bool(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 awsEc2query_deserializeOpDocumentModifyVpcPeeringConnectionOptionsOutput(v **ModifyVpcPeeringConnectionOptionsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *ModifyVpcPeeringConnectionOptionsOutput
+ if *v == nil {
+ sv = &ModifyVpcPeeringConnectionOptionsOutput{}
+ } 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("accepterPeeringConnectionOptions", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentPeeringConnectionOptions(&sv.AccepterPeeringConnectionOptions, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("requesterPeeringConnectionOptions", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentPeeringConnectionOptions(&sv.RequesterPeeringConnectionOptions, 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 awsEc2query_deserializeOpDocumentModifyVpcTenancyOutput(v **ModifyVpcTenancyOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *ModifyVpcTenancyOutput
+ if *v == nil {
+ sv = &ModifyVpcTenancyOutput{}
+ } 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("return", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.ReturnValue = ptr.Bool(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 awsEc2query_deserializeOpDocumentModifyVpnConnectionOptionsOutput(v **ModifyVpnConnectionOptionsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *ModifyVpnConnectionOptionsOutput
+ if *v == nil {
+ sv = &ModifyVpnConnectionOptionsOutput{}
+ } 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("vpnConnection", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentVpnConnection(&sv.VpnConnection, 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 awsEc2query_deserializeOpDocumentModifyVpnConnectionOutput(v **ModifyVpnConnectionOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *ModifyVpnConnectionOutput
+ if *v == nil {
+ sv = &ModifyVpnConnectionOutput{}
+ } 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("vpnConnection", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentVpnConnection(&sv.VpnConnection, 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 awsEc2query_deserializeOpDocumentModifyVpnTunnelCertificateOutput(v **ModifyVpnTunnelCertificateOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *ModifyVpnTunnelCertificateOutput
+ if *v == nil {
+ sv = &ModifyVpnTunnelCertificateOutput{}
+ } 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("vpnConnection", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentVpnConnection(&sv.VpnConnection, 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 awsEc2query_deserializeOpDocumentModifyVpnTunnelOptionsOutput(v **ModifyVpnTunnelOptionsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *ModifyVpnTunnelOptionsOutput
+ if *v == nil {
+ sv = &ModifyVpnTunnelOptionsOutput{}
+ } 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("vpnConnection", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentVpnConnection(&sv.VpnConnection, 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 awsEc2query_deserializeOpDocumentMonitorInstancesOutput(v **MonitorInstancesOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *MonitorInstancesOutput
+ if *v == nil {
+ sv = &MonitorInstancesOutput{}
+ } 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("instancesSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentInstanceMonitoringList(&sv.InstanceMonitorings, 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 awsEc2query_deserializeOpDocumentMoveAddressToVpcOutput(v **MoveAddressToVpcOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *MoveAddressToVpcOutput
+ if *v == nil {
+ sv = &MoveAddressToVpcOutput{}
+ } 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("allocationId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AllocationId = 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.Status(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 awsEc2query_deserializeOpDocumentProvisionByoipCidrOutput(v **ProvisionByoipCidrOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *ProvisionByoipCidrOutput
+ if *v == nil {
+ sv = &ProvisionByoipCidrOutput{}
+ } 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("byoipCidr", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentByoipCidr(&sv.ByoipCidr, 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 awsEc2query_deserializeOpDocumentPurchaseHostReservationOutput(v **PurchaseHostReservationOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *PurchaseHostReservationOutput
+ if *v == nil {
+ sv = &PurchaseHostReservationOutput{}
+ } 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("clientToken", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ClientToken = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("currencyCode", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.CurrencyCode = types.CurrencyCodeValues(xtv)
+ }
+
+ case strings.EqualFold("purchase", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentPurchaseSet(&sv.Purchase, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("totalHourlyPrice", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.TotalHourlyPrice = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("totalUpfrontPrice", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.TotalUpfrontPrice = 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 awsEc2query_deserializeOpDocumentPurchaseReservedInstancesOfferingOutput(v **PurchaseReservedInstancesOfferingOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *PurchaseReservedInstancesOfferingOutput
+ if *v == nil {
+ sv = &PurchaseReservedInstancesOfferingOutput{}
+ } 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("reservedInstancesId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ReservedInstancesId = 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 awsEc2query_deserializeOpDocumentPurchaseScheduledInstancesOutput(v **PurchaseScheduledInstancesOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *PurchaseScheduledInstancesOutput
+ if *v == nil {
+ sv = &PurchaseScheduledInstancesOutput{}
+ } 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("scheduledInstanceSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentPurchasedScheduledInstanceSet(&sv.ScheduledInstanceSet, 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 awsEc2query_deserializeOpDocumentRegisterImageOutput(v **RegisterImageOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *RegisterImageOutput
+ if *v == nil {
+ sv = &RegisterImageOutput{}
+ } 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("imageId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ImageId = 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 awsEc2query_deserializeOpDocumentRegisterInstanceEventNotificationAttributesOutput(v **RegisterInstanceEventNotificationAttributesOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *RegisterInstanceEventNotificationAttributesOutput
+ if *v == nil {
+ sv = &RegisterInstanceEventNotificationAttributesOutput{}
+ } 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("instanceTagAttribute", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentInstanceTagNotificationAttribute(&sv.InstanceTagAttribute, 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 awsEc2query_deserializeOpDocumentRegisterTransitGatewayMulticastGroupMembersOutput(v **RegisterTransitGatewayMulticastGroupMembersOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *RegisterTransitGatewayMulticastGroupMembersOutput
+ if *v == nil {
+ sv = &RegisterTransitGatewayMulticastGroupMembersOutput{}
+ } 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("registeredMulticastGroupMembers", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTransitGatewayMulticastRegisteredGroupMembers(&sv.RegisteredMulticastGroupMembers, 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 awsEc2query_deserializeOpDocumentRegisterTransitGatewayMulticastGroupSourcesOutput(v **RegisterTransitGatewayMulticastGroupSourcesOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *RegisterTransitGatewayMulticastGroupSourcesOutput
+ if *v == nil {
+ sv = &RegisterTransitGatewayMulticastGroupSourcesOutput{}
+ } 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("registeredMulticastGroupSources", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTransitGatewayMulticastRegisteredGroupSources(&sv.RegisteredMulticastGroupSources, 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 awsEc2query_deserializeOpDocumentRejectTransitGatewayMulticastDomainAssociationsOutput(v **RejectTransitGatewayMulticastDomainAssociationsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *RejectTransitGatewayMulticastDomainAssociationsOutput
+ if *v == nil {
+ sv = &RejectTransitGatewayMulticastDomainAssociationsOutput{}
+ } 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("associations", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTransitGatewayMulticastDomainAssociations(&sv.Associations, 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 awsEc2query_deserializeOpDocumentRejectTransitGatewayPeeringAttachmentOutput(v **RejectTransitGatewayPeeringAttachmentOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *RejectTransitGatewayPeeringAttachmentOutput
+ if *v == nil {
+ sv = &RejectTransitGatewayPeeringAttachmentOutput{}
+ } 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("transitGatewayPeeringAttachment", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTransitGatewayPeeringAttachment(&sv.TransitGatewayPeeringAttachment, 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 awsEc2query_deserializeOpDocumentRejectTransitGatewayVpcAttachmentOutput(v **RejectTransitGatewayVpcAttachmentOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *RejectTransitGatewayVpcAttachmentOutput
+ if *v == nil {
+ sv = &RejectTransitGatewayVpcAttachmentOutput{}
+ } 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("transitGatewayVpcAttachment", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTransitGatewayVpcAttachment(&sv.TransitGatewayVpcAttachment, 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 awsEc2query_deserializeOpDocumentRejectVpcEndpointConnectionsOutput(v **RejectVpcEndpointConnectionsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *RejectVpcEndpointConnectionsOutput
+ if *v == nil {
+ sv = &RejectVpcEndpointConnectionsOutput{}
+ } 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("unsuccessful", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentUnsuccessfulItemSet(&sv.Unsuccessful, 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 awsEc2query_deserializeOpDocumentRejectVpcPeeringConnectionOutput(v **RejectVpcPeeringConnectionOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *RejectVpcPeeringConnectionOutput
+ if *v == nil {
+ sv = &RejectVpcPeeringConnectionOutput{}
+ } 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("return", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.Return = ptr.Bool(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 awsEc2query_deserializeOpDocumentReleaseHostsOutput(v **ReleaseHostsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *ReleaseHostsOutput
+ if *v == nil {
+ sv = &ReleaseHostsOutput{}
+ } 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("successful", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentResponseHostIdList(&sv.Successful, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("unsuccessful", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentUnsuccessfulItemList(&sv.Unsuccessful, 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 awsEc2query_deserializeOpDocumentReplaceIamInstanceProfileAssociationOutput(v **ReplaceIamInstanceProfileAssociationOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *ReplaceIamInstanceProfileAssociationOutput
+ if *v == nil {
+ sv = &ReplaceIamInstanceProfileAssociationOutput{}
+ } 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("iamInstanceProfileAssociation", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentIamInstanceProfileAssociation(&sv.IamInstanceProfileAssociation, 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 awsEc2query_deserializeOpDocumentReplaceNetworkAclAssociationOutput(v **ReplaceNetworkAclAssociationOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *ReplaceNetworkAclAssociationOutput
+ if *v == nil {
+ sv = &ReplaceNetworkAclAssociationOutput{}
+ } 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("newAssociationId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.NewAssociationId = 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 awsEc2query_deserializeOpDocumentReplaceRouteTableAssociationOutput(v **ReplaceRouteTableAssociationOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *ReplaceRouteTableAssociationOutput
+ if *v == nil {
+ sv = &ReplaceRouteTableAssociationOutput{}
+ } 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("associationState", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentRouteTableAssociationState(&sv.AssociationState, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("newAssociationId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.NewAssociationId = 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 awsEc2query_deserializeOpDocumentReplaceTransitGatewayRouteOutput(v **ReplaceTransitGatewayRouteOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *ReplaceTransitGatewayRouteOutput
+ if *v == nil {
+ sv = &ReplaceTransitGatewayRouteOutput{}
+ } 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("route", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTransitGatewayRoute(&sv.Route, 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 awsEc2query_deserializeOpDocumentRequestSpotFleetOutput(v **RequestSpotFleetOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *RequestSpotFleetOutput
+ if *v == nil {
+ sv = &RequestSpotFleetOutput{}
+ } 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("spotFleetRequestId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.SpotFleetRequestId = 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 awsEc2query_deserializeOpDocumentRequestSpotInstancesOutput(v **RequestSpotInstancesOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *RequestSpotInstancesOutput
+ if *v == nil {
+ sv = &RequestSpotInstancesOutput{}
+ } 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("spotInstanceRequestSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentSpotInstanceRequestList(&sv.SpotInstanceRequests, 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 awsEc2query_deserializeOpDocumentResetAddressAttributeOutput(v **ResetAddressAttributeOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *ResetAddressAttributeOutput
+ if *v == nil {
+ sv = &ResetAddressAttributeOutput{}
+ } 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("address", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentAddressAttribute(&sv.Address, 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 awsEc2query_deserializeOpDocumentResetEbsDefaultKmsKeyIdOutput(v **ResetEbsDefaultKmsKeyIdOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *ResetEbsDefaultKmsKeyIdOutput
+ if *v == nil {
+ sv = &ResetEbsDefaultKmsKeyIdOutput{}
+ } 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("kmsKeyId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.KmsKeyId = 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 awsEc2query_deserializeOpDocumentResetFpgaImageAttributeOutput(v **ResetFpgaImageAttributeOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *ResetFpgaImageAttributeOutput
+ if *v == nil {
+ sv = &ResetFpgaImageAttributeOutput{}
+ } 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("return", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.Return = ptr.Bool(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 awsEc2query_deserializeOpDocumentRestoreAddressToClassicOutput(v **RestoreAddressToClassicOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *RestoreAddressToClassicOutput
+ if *v == nil {
+ sv = &RestoreAddressToClassicOutput{}
+ } 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("publicIp", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.PublicIp = 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.Status(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 awsEc2query_deserializeOpDocumentRestoreManagedPrefixListVersionOutput(v **RestoreManagedPrefixListVersionOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *RestoreManagedPrefixListVersionOutput
+ if *v == nil {
+ sv = &RestoreManagedPrefixListVersionOutput{}
+ } 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("prefixList", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentManagedPrefixList(&sv.PrefixList, 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 awsEc2query_deserializeOpDocumentRevokeClientVpnIngressOutput(v **RevokeClientVpnIngressOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *RevokeClientVpnIngressOutput
+ if *v == nil {
+ sv = &RevokeClientVpnIngressOutput{}
+ } 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("status", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentClientVpnAuthorizationRuleStatus(&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
+}
+
+func awsEc2query_deserializeOpDocumentRevokeSecurityGroupEgressOutput(v **RevokeSecurityGroupEgressOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *RevokeSecurityGroupEgressOutput
+ if *v == nil {
+ sv = &RevokeSecurityGroupEgressOutput{}
+ } 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("return", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.Return = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("unknownIpPermissionSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentIpPermissionList(&sv.UnknownIpPermissions, 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 awsEc2query_deserializeOpDocumentRevokeSecurityGroupIngressOutput(v **RevokeSecurityGroupIngressOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *RevokeSecurityGroupIngressOutput
+ if *v == nil {
+ sv = &RevokeSecurityGroupIngressOutput{}
+ } 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("return", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.Return = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("unknownIpPermissionSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentIpPermissionList(&sv.UnknownIpPermissions, 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 awsEc2query_deserializeOpDocumentRunInstancesOutput(v **RunInstancesOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *RunInstancesOutput
+ if *v == nil {
+ sv = &RunInstancesOutput{}
+ } 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("groupSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentGroupIdentifierList(&sv.Groups, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("instancesSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentInstanceList(&sv.Instances, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("ownerId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.OwnerId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("requesterId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.RequesterId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("reservationId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ReservationId = 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 awsEc2query_deserializeOpDocumentRunScheduledInstancesOutput(v **RunScheduledInstancesOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *RunScheduledInstancesOutput
+ if *v == nil {
+ sv = &RunScheduledInstancesOutput{}
+ } 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("instanceIdSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentInstanceIdSet(&sv.InstanceIdSet, 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 awsEc2query_deserializeOpDocumentSearchLocalGatewayRoutesOutput(v **SearchLocalGatewayRoutesOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *SearchLocalGatewayRoutesOutput
+ if *v == nil {
+ sv = &SearchLocalGatewayRoutesOutput{}
+ } 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("routeSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentLocalGatewayRouteList(&sv.Routes, 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 awsEc2query_deserializeOpDocumentSearchTransitGatewayMulticastGroupsOutput(v **SearchTransitGatewayMulticastGroupsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *SearchTransitGatewayMulticastGroupsOutput
+ if *v == nil {
+ sv = &SearchTransitGatewayMulticastGroupsOutput{}
+ } 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("multicastGroups", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTransitGatewayMulticastGroupList(&sv.MulticastGroups, 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
+}
+
+func awsEc2query_deserializeOpDocumentSearchTransitGatewayRoutesOutput(v **SearchTransitGatewayRoutesOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *SearchTransitGatewayRoutesOutput
+ if *v == nil {
+ sv = &SearchTransitGatewayRoutesOutput{}
+ } 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("additionalRoutesAvailable", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.AdditionalRoutesAvailable = ptr.Bool(xtv)
+ }
+
+ case strings.EqualFold("routeSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTransitGatewayRouteList(&sv.Routes, 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 awsEc2query_deserializeOpDocumentStartInstancesOutput(v **StartInstancesOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *StartInstancesOutput
+ if *v == nil {
+ sv = &StartInstancesOutput{}
+ } 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("instancesSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentInstanceStateChangeList(&sv.StartingInstances, 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 awsEc2query_deserializeOpDocumentStartNetworkInsightsAnalysisOutput(v **StartNetworkInsightsAnalysisOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *StartNetworkInsightsAnalysisOutput
+ if *v == nil {
+ sv = &StartNetworkInsightsAnalysisOutput{}
+ } 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("networkInsightsAnalysis", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentNetworkInsightsAnalysis(&sv.NetworkInsightsAnalysis, 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 awsEc2query_deserializeOpDocumentStartVpcEndpointServicePrivateDnsVerificationOutput(v **StartVpcEndpointServicePrivateDnsVerificationOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *StartVpcEndpointServicePrivateDnsVerificationOutput
+ if *v == nil {
+ sv = &StartVpcEndpointServicePrivateDnsVerificationOutput{}
+ } 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("return", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.ReturnValue = ptr.Bool(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 awsEc2query_deserializeOpDocumentStopInstancesOutput(v **StopInstancesOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *StopInstancesOutput
+ if *v == nil {
+ sv = &StopInstancesOutput{}
+ } 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("instancesSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentInstanceStateChangeList(&sv.StoppingInstances, 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 awsEc2query_deserializeOpDocumentTerminateClientVpnConnectionsOutput(v **TerminateClientVpnConnectionsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *TerminateClientVpnConnectionsOutput
+ if *v == nil {
+ sv = &TerminateClientVpnConnectionsOutput{}
+ } 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("clientVpnEndpointId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ClientVpnEndpointId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("connectionStatuses", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentTerminateConnectionStatusSet(&sv.ConnectionStatuses, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("username", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Username = 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 awsEc2query_deserializeOpDocumentTerminateInstancesOutput(v **TerminateInstancesOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *TerminateInstancesOutput
+ if *v == nil {
+ sv = &TerminateInstancesOutput{}
+ } 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("instancesSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentInstanceStateChangeList(&sv.TerminatingInstances, 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 awsEc2query_deserializeOpDocumentUnassignIpv6AddressesOutput(v **UnassignIpv6AddressesOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *UnassignIpv6AddressesOutput
+ if *v == nil {
+ sv = &UnassignIpv6AddressesOutput{}
+ } 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("networkInterfaceId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.NetworkInterfaceId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("unassignedIpv6Addresses", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentIpv6AddressList(&sv.UnassignedIpv6Addresses, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("unassignedIpv6PrefixSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentIpPrefixList(&sv.UnassignedIpv6Prefixes, 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 awsEc2query_deserializeOpDocumentUnmonitorInstancesOutput(v **UnmonitorInstancesOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *UnmonitorInstancesOutput
+ if *v == nil {
+ sv = &UnmonitorInstancesOutput{}
+ } 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("instancesSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentInstanceMonitoringList(&sv.InstanceMonitorings, 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 awsEc2query_deserializeOpDocumentUpdateSecurityGroupRuleDescriptionsEgressOutput(v **UpdateSecurityGroupRuleDescriptionsEgressOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *UpdateSecurityGroupRuleDescriptionsEgressOutput
+ if *v == nil {
+ sv = &UpdateSecurityGroupRuleDescriptionsEgressOutput{}
+ } 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("return", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.Return = ptr.Bool(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 awsEc2query_deserializeOpDocumentUpdateSecurityGroupRuleDescriptionsIngressOutput(v **UpdateSecurityGroupRuleDescriptionsIngressOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *UpdateSecurityGroupRuleDescriptionsIngressOutput
+ if *v == nil {
+ sv = &UpdateSecurityGroupRuleDescriptionsIngressOutput{}
+ } 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("return", 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 Boolean to be of type *bool, got %T instead", val)
+ }
+ sv.Return = ptr.Bool(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 awsEc2query_deserializeOpDocumentWithdrawByoipCidrOutput(v **WithdrawByoipCidrOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *WithdrawByoipCidrOutput
+ if *v == nil {
+ sv = &WithdrawByoipCidrOutput{}
+ } 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("byoipCidr", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsEc2query_deserializeDocumentByoipCidr(&sv.ByoipCidr, 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
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/doc.go
new file mode 100644
index 00000000..6ebd4aaf
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/doc.go
@@ -0,0 +1,34 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+// Package ec2 provides the API client, operations, and parameter types for Amazon
+// Elastic Compute Cloud.
+//
+// Amazon Elastic Compute Cloud Amazon Elastic Compute Cloud (Amazon EC2) provides
+// secure and resizable computing capacity in the AWS Cloud. Using Amazon EC2
+// eliminates the need to invest in hardware up front, so you can develop and
+// deploy applications faster. Amazon Virtual Private Cloud (Amazon VPC) enables
+// you to provision a logically isolated section of the AWS Cloud where you can
+// launch AWS resources in a virtual network that you've defined. Amazon Elastic
+// Block Store (Amazon EBS) provides block level storage volumes for use with EC2
+// instances. EBS volumes are highly available
+//
+// and reliable storage volumes that
+// can be attached to any running instance and used like a hard drive. To learn
+// more, see the following resources:
+//
+// * Amazon EC2: AmazonEC2 product page
+// (http://aws.amazon.com/ec2), Amazon EC2 documentation
+// (http://aws.amazon.com/documentation/ec2)
+//
+// * Amazon EBS: Amazon EBS product page
+// (http://aws.amazon.com/ebs), Amazon EBS documentation
+// (http://aws.amazon.com/documentation/ebs)
+//
+// * Amazon VPC: Amazon VPC product page
+// (http://aws.amazon.com/vpc), Amazon VPC documentation
+// (http://aws.amazon.com/documentation/vpc)
+//
+// * AWS VPN: AWS VPN product page
+// (http://aws.amazon.com/vpn), AWS VPN documentation
+// (http://aws.amazon.com/documentation/vpn)
+package ec2
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/endpoints.go
new file mode 100644
index 00000000..d26b6150
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/endpoints.go
@@ -0,0 +1,160 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+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/ec2/internal/endpoints"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "net/url"
+)
+
+// 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")
+ }
+
+ var endpoint aws.Endpoint
+ endpoint, err = m.Resolver.ResolveEndpoint(awsmiddleware.GetRegion(ctx), m.Options)
+ 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 = "ec2"
+ }
+ 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.EndpointResolver
+ 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)
+ 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)
+}
+
+// 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.
+// awsResolver and fallbackResolver must not be nil
+func withEndpointResolver(awsResolver aws.EndpointResolver, fallbackResolver EndpointResolver) EndpointResolver {
+ return &wrappedEndpointResolver{
+ awsResolver: awsResolver,
+ resolver: fallbackResolver,
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/generated.json b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/generated.json
new file mode 100644
index 00000000..fcf1693d
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/generated.json
@@ -0,0 +1,493 @@
+{
+ "dependencies": {
+ "github.com/aws/aws-sdk-go-v2": "v1.4.0",
+ "github.com/aws/aws-sdk-go-v2/service/internal/presigned-url": "v1.0.7",
+ "github.com/aws/smithy-go": "v1.4.0",
+ "github.com/jmespath/go-jmespath": "v0.4.0"
+ },
+ "files": [
+ "api_client.go",
+ "api_op_AcceptReservedInstancesExchangeQuote.go",
+ "api_op_AcceptTransitGatewayMulticastDomainAssociations.go",
+ "api_op_AcceptTransitGatewayPeeringAttachment.go",
+ "api_op_AcceptTransitGatewayVpcAttachment.go",
+ "api_op_AcceptVpcEndpointConnections.go",
+ "api_op_AcceptVpcPeeringConnection.go",
+ "api_op_AdvertiseByoipCidr.go",
+ "api_op_AllocateAddress.go",
+ "api_op_AllocateHosts.go",
+ "api_op_ApplySecurityGroupsToClientVpnTargetNetwork.go",
+ "api_op_AssignIpv6Addresses.go",
+ "api_op_AssignPrivateIpAddresses.go",
+ "api_op_AssociateAddress.go",
+ "api_op_AssociateClientVpnTargetNetwork.go",
+ "api_op_AssociateDhcpOptions.go",
+ "api_op_AssociateEnclaveCertificateIamRole.go",
+ "api_op_AssociateIamInstanceProfile.go",
+ "api_op_AssociateInstanceEventWindow.go",
+ "api_op_AssociateRouteTable.go",
+ "api_op_AssociateSubnetCidrBlock.go",
+ "api_op_AssociateTransitGatewayMulticastDomain.go",
+ "api_op_AssociateTransitGatewayRouteTable.go",
+ "api_op_AssociateTrunkInterface.go",
+ "api_op_AssociateVpcCidrBlock.go",
+ "api_op_AttachClassicLinkVpc.go",
+ "api_op_AttachInternetGateway.go",
+ "api_op_AttachNetworkInterface.go",
+ "api_op_AttachVolume.go",
+ "api_op_AttachVpnGateway.go",
+ "api_op_AuthorizeClientVpnIngress.go",
+ "api_op_AuthorizeSecurityGroupEgress.go",
+ "api_op_AuthorizeSecurityGroupIngress.go",
+ "api_op_BundleInstance.go",
+ "api_op_CancelBundleTask.go",
+ "api_op_CancelCapacityReservation.go",
+ "api_op_CancelConversionTask.go",
+ "api_op_CancelExportTask.go",
+ "api_op_CancelImportTask.go",
+ "api_op_CancelReservedInstancesListing.go",
+ "api_op_CancelSpotFleetRequests.go",
+ "api_op_CancelSpotInstanceRequests.go",
+ "api_op_ConfirmProductInstance.go",
+ "api_op_CopyFpgaImage.go",
+ "api_op_CopyImage.go",
+ "api_op_CopySnapshot.go",
+ "api_op_CopySnapshot_test.go",
+ "api_op_CreateCapacityReservation.go",
+ "api_op_CreateCarrierGateway.go",
+ "api_op_CreateClientVpnEndpoint.go",
+ "api_op_CreateClientVpnRoute.go",
+ "api_op_CreateCustomerGateway.go",
+ "api_op_CreateDefaultSubnet.go",
+ "api_op_CreateDefaultVpc.go",
+ "api_op_CreateDhcpOptions.go",
+ "api_op_CreateEgressOnlyInternetGateway.go",
+ "api_op_CreateFleet.go",
+ "api_op_CreateFlowLogs.go",
+ "api_op_CreateFpgaImage.go",
+ "api_op_CreateImage.go",
+ "api_op_CreateInstanceEventWindow.go",
+ "api_op_CreateInstanceExportTask.go",
+ "api_op_CreateInternetGateway.go",
+ "api_op_CreateKeyPair.go",
+ "api_op_CreateLaunchTemplate.go",
+ "api_op_CreateLaunchTemplateVersion.go",
+ "api_op_CreateLocalGatewayRoute.go",
+ "api_op_CreateLocalGatewayRouteTableVpcAssociation.go",
+ "api_op_CreateManagedPrefixList.go",
+ "api_op_CreateNatGateway.go",
+ "api_op_CreateNetworkAcl.go",
+ "api_op_CreateNetworkAclEntry.go",
+ "api_op_CreateNetworkInsightsPath.go",
+ "api_op_CreateNetworkInterface.go",
+ "api_op_CreateNetworkInterfacePermission.go",
+ "api_op_CreatePlacementGroup.go",
+ "api_op_CreateReplaceRootVolumeTask.go",
+ "api_op_CreateReservedInstancesListing.go",
+ "api_op_CreateRestoreImageTask.go",
+ "api_op_CreateRoute.go",
+ "api_op_CreateRouteTable.go",
+ "api_op_CreateSecurityGroup.go",
+ "api_op_CreateSnapshot.go",
+ "api_op_CreateSnapshots.go",
+ "api_op_CreateSpotDatafeedSubscription.go",
+ "api_op_CreateStoreImageTask.go",
+ "api_op_CreateSubnet.go",
+ "api_op_CreateSubnetCidrReservation.go",
+ "api_op_CreateTags.go",
+ "api_op_CreateTrafficMirrorFilter.go",
+ "api_op_CreateTrafficMirrorFilterRule.go",
+ "api_op_CreateTrafficMirrorSession.go",
+ "api_op_CreateTrafficMirrorTarget.go",
+ "api_op_CreateTransitGateway.go",
+ "api_op_CreateTransitGatewayConnect.go",
+ "api_op_CreateTransitGatewayConnectPeer.go",
+ "api_op_CreateTransitGatewayMulticastDomain.go",
+ "api_op_CreateTransitGatewayPeeringAttachment.go",
+ "api_op_CreateTransitGatewayPrefixListReference.go",
+ "api_op_CreateTransitGatewayRoute.go",
+ "api_op_CreateTransitGatewayRouteTable.go",
+ "api_op_CreateTransitGatewayVpcAttachment.go",
+ "api_op_CreateVolume.go",
+ "api_op_CreateVpc.go",
+ "api_op_CreateVpcEndpoint.go",
+ "api_op_CreateVpcEndpointConnectionNotification.go",
+ "api_op_CreateVpcEndpointServiceConfiguration.go",
+ "api_op_CreateVpcPeeringConnection.go",
+ "api_op_CreateVpnConnection.go",
+ "api_op_CreateVpnConnectionRoute.go",
+ "api_op_CreateVpnGateway.go",
+ "api_op_DeleteCarrierGateway.go",
+ "api_op_DeleteClientVpnEndpoint.go",
+ "api_op_DeleteClientVpnRoute.go",
+ "api_op_DeleteCustomerGateway.go",
+ "api_op_DeleteDhcpOptions.go",
+ "api_op_DeleteEgressOnlyInternetGateway.go",
+ "api_op_DeleteFleets.go",
+ "api_op_DeleteFlowLogs.go",
+ "api_op_DeleteFpgaImage.go",
+ "api_op_DeleteInstanceEventWindow.go",
+ "api_op_DeleteInternetGateway.go",
+ "api_op_DeleteKeyPair.go",
+ "api_op_DeleteLaunchTemplate.go",
+ "api_op_DeleteLaunchTemplateVersions.go",
+ "api_op_DeleteLocalGatewayRoute.go",
+ "api_op_DeleteLocalGatewayRouteTableVpcAssociation.go",
+ "api_op_DeleteManagedPrefixList.go",
+ "api_op_DeleteNatGateway.go",
+ "api_op_DeleteNetworkAcl.go",
+ "api_op_DeleteNetworkAclEntry.go",
+ "api_op_DeleteNetworkInsightsAnalysis.go",
+ "api_op_DeleteNetworkInsightsPath.go",
+ "api_op_DeleteNetworkInterface.go",
+ "api_op_DeleteNetworkInterfacePermission.go",
+ "api_op_DeletePlacementGroup.go",
+ "api_op_DeleteQueuedReservedInstances.go",
+ "api_op_DeleteRoute.go",
+ "api_op_DeleteRouteTable.go",
+ "api_op_DeleteSecurityGroup.go",
+ "api_op_DeleteSnapshot.go",
+ "api_op_DeleteSpotDatafeedSubscription.go",
+ "api_op_DeleteSubnet.go",
+ "api_op_DeleteSubnetCidrReservation.go",
+ "api_op_DeleteTags.go",
+ "api_op_DeleteTrafficMirrorFilter.go",
+ "api_op_DeleteTrafficMirrorFilterRule.go",
+ "api_op_DeleteTrafficMirrorSession.go",
+ "api_op_DeleteTrafficMirrorTarget.go",
+ "api_op_DeleteTransitGateway.go",
+ "api_op_DeleteTransitGatewayConnect.go",
+ "api_op_DeleteTransitGatewayConnectPeer.go",
+ "api_op_DeleteTransitGatewayMulticastDomain.go",
+ "api_op_DeleteTransitGatewayPeeringAttachment.go",
+ "api_op_DeleteTransitGatewayPrefixListReference.go",
+ "api_op_DeleteTransitGatewayRoute.go",
+ "api_op_DeleteTransitGatewayRouteTable.go",
+ "api_op_DeleteTransitGatewayVpcAttachment.go",
+ "api_op_DeleteVolume.go",
+ "api_op_DeleteVpc.go",
+ "api_op_DeleteVpcEndpointConnectionNotifications.go",
+ "api_op_DeleteVpcEndpointServiceConfigurations.go",
+ "api_op_DeleteVpcEndpoints.go",
+ "api_op_DeleteVpcPeeringConnection.go",
+ "api_op_DeleteVpnConnection.go",
+ "api_op_DeleteVpnConnectionRoute.go",
+ "api_op_DeleteVpnGateway.go",
+ "api_op_DeprovisionByoipCidr.go",
+ "api_op_DeregisterImage.go",
+ "api_op_DeregisterInstanceEventNotificationAttributes.go",
+ "api_op_DeregisterTransitGatewayMulticastGroupMembers.go",
+ "api_op_DeregisterTransitGatewayMulticastGroupSources.go",
+ "api_op_DescribeAccountAttributes.go",
+ "api_op_DescribeAddresses.go",
+ "api_op_DescribeAddressesAttribute.go",
+ "api_op_DescribeAggregateIdFormat.go",
+ "api_op_DescribeAvailabilityZones.go",
+ "api_op_DescribeBundleTasks.go",
+ "api_op_DescribeByoipCidrs.go",
+ "api_op_DescribeCapacityReservations.go",
+ "api_op_DescribeCarrierGateways.go",
+ "api_op_DescribeClassicLinkInstances.go",
+ "api_op_DescribeClientVpnAuthorizationRules.go",
+ "api_op_DescribeClientVpnConnections.go",
+ "api_op_DescribeClientVpnEndpoints.go",
+ "api_op_DescribeClientVpnRoutes.go",
+ "api_op_DescribeClientVpnTargetNetworks.go",
+ "api_op_DescribeCoipPools.go",
+ "api_op_DescribeConversionTasks.go",
+ "api_op_DescribeCustomerGateways.go",
+ "api_op_DescribeDhcpOptions.go",
+ "api_op_DescribeEgressOnlyInternetGateways.go",
+ "api_op_DescribeElasticGpus.go",
+ "api_op_DescribeExportImageTasks.go",
+ "api_op_DescribeExportTasks.go",
+ "api_op_DescribeFastSnapshotRestores.go",
+ "api_op_DescribeFleetHistory.go",
+ "api_op_DescribeFleetInstances.go",
+ "api_op_DescribeFleets.go",
+ "api_op_DescribeFlowLogs.go",
+ "api_op_DescribeFpgaImageAttribute.go",
+ "api_op_DescribeFpgaImages.go",
+ "api_op_DescribeHostReservationOfferings.go",
+ "api_op_DescribeHostReservations.go",
+ "api_op_DescribeHosts.go",
+ "api_op_DescribeIamInstanceProfileAssociations.go",
+ "api_op_DescribeIdFormat.go",
+ "api_op_DescribeIdentityIdFormat.go",
+ "api_op_DescribeImageAttribute.go",
+ "api_op_DescribeImages.go",
+ "api_op_DescribeImportImageTasks.go",
+ "api_op_DescribeImportSnapshotTasks.go",
+ "api_op_DescribeInstanceAttribute.go",
+ "api_op_DescribeInstanceCreditSpecifications.go",
+ "api_op_DescribeInstanceEventNotificationAttributes.go",
+ "api_op_DescribeInstanceEventWindows.go",
+ "api_op_DescribeInstanceStatus.go",
+ "api_op_DescribeInstanceTypeOfferings.go",
+ "api_op_DescribeInstanceTypes.go",
+ "api_op_DescribeInstances.go",
+ "api_op_DescribeInternetGateways.go",
+ "api_op_DescribeIpv6Pools.go",
+ "api_op_DescribeKeyPairs.go",
+ "api_op_DescribeLaunchTemplateVersions.go",
+ "api_op_DescribeLaunchTemplates.go",
+ "api_op_DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociations.go",
+ "api_op_DescribeLocalGatewayRouteTableVpcAssociations.go",
+ "api_op_DescribeLocalGatewayRouteTables.go",
+ "api_op_DescribeLocalGatewayVirtualInterfaceGroups.go",
+ "api_op_DescribeLocalGatewayVirtualInterfaces.go",
+ "api_op_DescribeLocalGateways.go",
+ "api_op_DescribeManagedPrefixLists.go",
+ "api_op_DescribeMovingAddresses.go",
+ "api_op_DescribeNatGateways.go",
+ "api_op_DescribeNetworkAcls.go",
+ "api_op_DescribeNetworkInsightsAnalyses.go",
+ "api_op_DescribeNetworkInsightsPaths.go",
+ "api_op_DescribeNetworkInterfaceAttribute.go",
+ "api_op_DescribeNetworkInterfacePermissions.go",
+ "api_op_DescribeNetworkInterfaces.go",
+ "api_op_DescribePlacementGroups.go",
+ "api_op_DescribePrefixLists.go",
+ "api_op_DescribePrincipalIdFormat.go",
+ "api_op_DescribePublicIpv4Pools.go",
+ "api_op_DescribeRegions.go",
+ "api_op_DescribeReplaceRootVolumeTasks.go",
+ "api_op_DescribeReservedInstances.go",
+ "api_op_DescribeReservedInstancesListings.go",
+ "api_op_DescribeReservedInstancesModifications.go",
+ "api_op_DescribeReservedInstancesOfferings.go",
+ "api_op_DescribeRouteTables.go",
+ "api_op_DescribeScheduledInstanceAvailability.go",
+ "api_op_DescribeScheduledInstances.go",
+ "api_op_DescribeSecurityGroupReferences.go",
+ "api_op_DescribeSecurityGroupRules.go",
+ "api_op_DescribeSecurityGroups.go",
+ "api_op_DescribeSnapshotAttribute.go",
+ "api_op_DescribeSnapshots.go",
+ "api_op_DescribeSpotDatafeedSubscription.go",
+ "api_op_DescribeSpotFleetInstances.go",
+ "api_op_DescribeSpotFleetRequestHistory.go",
+ "api_op_DescribeSpotFleetRequests.go",
+ "api_op_DescribeSpotInstanceRequests.go",
+ "api_op_DescribeSpotPriceHistory.go",
+ "api_op_DescribeStaleSecurityGroups.go",
+ "api_op_DescribeStoreImageTasks.go",
+ "api_op_DescribeSubnets.go",
+ "api_op_DescribeTags.go",
+ "api_op_DescribeTrafficMirrorFilters.go",
+ "api_op_DescribeTrafficMirrorSessions.go",
+ "api_op_DescribeTrafficMirrorTargets.go",
+ "api_op_DescribeTransitGatewayAttachments.go",
+ "api_op_DescribeTransitGatewayConnectPeers.go",
+ "api_op_DescribeTransitGatewayConnects.go",
+ "api_op_DescribeTransitGatewayMulticastDomains.go",
+ "api_op_DescribeTransitGatewayPeeringAttachments.go",
+ "api_op_DescribeTransitGatewayRouteTables.go",
+ "api_op_DescribeTransitGatewayVpcAttachments.go",
+ "api_op_DescribeTransitGateways.go",
+ "api_op_DescribeTrunkInterfaceAssociations.go",
+ "api_op_DescribeVolumeAttribute.go",
+ "api_op_DescribeVolumeStatus.go",
+ "api_op_DescribeVolumes.go",
+ "api_op_DescribeVolumesModifications.go",
+ "api_op_DescribeVpcAttribute.go",
+ "api_op_DescribeVpcClassicLink.go",
+ "api_op_DescribeVpcClassicLinkDnsSupport.go",
+ "api_op_DescribeVpcEndpointConnectionNotifications.go",
+ "api_op_DescribeVpcEndpointConnections.go",
+ "api_op_DescribeVpcEndpointServiceConfigurations.go",
+ "api_op_DescribeVpcEndpointServicePermissions.go",
+ "api_op_DescribeVpcEndpointServices.go",
+ "api_op_DescribeVpcEndpoints.go",
+ "api_op_DescribeVpcPeeringConnections.go",
+ "api_op_DescribeVpcs.go",
+ "api_op_DescribeVpnConnections.go",
+ "api_op_DescribeVpnGateways.go",
+ "api_op_DetachClassicLinkVpc.go",
+ "api_op_DetachInternetGateway.go",
+ "api_op_DetachNetworkInterface.go",
+ "api_op_DetachVolume.go",
+ "api_op_DetachVpnGateway.go",
+ "api_op_DisableEbsEncryptionByDefault.go",
+ "api_op_DisableFastSnapshotRestores.go",
+ "api_op_DisableImageDeprecation.go",
+ "api_op_DisableSerialConsoleAccess.go",
+ "api_op_DisableTransitGatewayRouteTablePropagation.go",
+ "api_op_DisableVgwRoutePropagation.go",
+ "api_op_DisableVpcClassicLink.go",
+ "api_op_DisableVpcClassicLinkDnsSupport.go",
+ "api_op_DisassociateAddress.go",
+ "api_op_DisassociateClientVpnTargetNetwork.go",
+ "api_op_DisassociateEnclaveCertificateIamRole.go",
+ "api_op_DisassociateIamInstanceProfile.go",
+ "api_op_DisassociateInstanceEventWindow.go",
+ "api_op_DisassociateRouteTable.go",
+ "api_op_DisassociateSubnetCidrBlock.go",
+ "api_op_DisassociateTransitGatewayMulticastDomain.go",
+ "api_op_DisassociateTransitGatewayRouteTable.go",
+ "api_op_DisassociateTrunkInterface.go",
+ "api_op_DisassociateVpcCidrBlock.go",
+ "api_op_EnableEbsEncryptionByDefault.go",
+ "api_op_EnableFastSnapshotRestores.go",
+ "api_op_EnableImageDeprecation.go",
+ "api_op_EnableSerialConsoleAccess.go",
+ "api_op_EnableTransitGatewayRouteTablePropagation.go",
+ "api_op_EnableVgwRoutePropagation.go",
+ "api_op_EnableVolumeIO.go",
+ "api_op_EnableVpcClassicLink.go",
+ "api_op_EnableVpcClassicLinkDnsSupport.go",
+ "api_op_ExportClientVpnClientCertificateRevocationList.go",
+ "api_op_ExportClientVpnClientConfiguration.go",
+ "api_op_ExportImage.go",
+ "api_op_ExportTransitGatewayRoutes.go",
+ "api_op_GetAssociatedEnclaveCertificateIamRoles.go",
+ "api_op_GetAssociatedIpv6PoolCidrs.go",
+ "api_op_GetCapacityReservationUsage.go",
+ "api_op_GetCoipPoolUsage.go",
+ "api_op_GetConsoleOutput.go",
+ "api_op_GetConsoleScreenshot.go",
+ "api_op_GetDefaultCreditSpecification.go",
+ "api_op_GetEbsDefaultKmsKeyId.go",
+ "api_op_GetEbsEncryptionByDefault.go",
+ "api_op_GetFlowLogsIntegrationTemplate.go",
+ "api_op_GetGroupsForCapacityReservation.go",
+ "api_op_GetHostReservationPurchasePreview.go",
+ "api_op_GetLaunchTemplateData.go",
+ "api_op_GetManagedPrefixListAssociations.go",
+ "api_op_GetManagedPrefixListEntries.go",
+ "api_op_GetPasswordData.go",
+ "api_op_GetReservedInstancesExchangeQuote.go",
+ "api_op_GetSerialConsoleAccessStatus.go",
+ "api_op_GetSubnetCidrReservations.go",
+ "api_op_GetTransitGatewayAttachmentPropagations.go",
+ "api_op_GetTransitGatewayMulticastDomainAssociations.go",
+ "api_op_GetTransitGatewayPrefixListReferences.go",
+ "api_op_GetTransitGatewayRouteTableAssociations.go",
+ "api_op_GetTransitGatewayRouteTablePropagations.go",
+ "api_op_GetVpnConnectionDeviceSampleConfiguration.go",
+ "api_op_GetVpnConnectionDeviceTypes.go",
+ "api_op_ImportClientVpnClientCertificateRevocationList.go",
+ "api_op_ImportImage.go",
+ "api_op_ImportInstance.go",
+ "api_op_ImportKeyPair.go",
+ "api_op_ImportSnapshot.go",
+ "api_op_ImportVolume.go",
+ "api_op_ModifyAddressAttribute.go",
+ "api_op_ModifyAvailabilityZoneGroup.go",
+ "api_op_ModifyCapacityReservation.go",
+ "api_op_ModifyClientVpnEndpoint.go",
+ "api_op_ModifyDefaultCreditSpecification.go",
+ "api_op_ModifyEbsDefaultKmsKeyId.go",
+ "api_op_ModifyFleet.go",
+ "api_op_ModifyFpgaImageAttribute.go",
+ "api_op_ModifyHosts.go",
+ "api_op_ModifyIdFormat.go",
+ "api_op_ModifyIdentityIdFormat.go",
+ "api_op_ModifyImageAttribute.go",
+ "api_op_ModifyInstanceAttribute.go",
+ "api_op_ModifyInstanceCapacityReservationAttributes.go",
+ "api_op_ModifyInstanceCreditSpecification.go",
+ "api_op_ModifyInstanceEventStartTime.go",
+ "api_op_ModifyInstanceEventWindow.go",
+ "api_op_ModifyInstanceMetadataOptions.go",
+ "api_op_ModifyInstancePlacement.go",
+ "api_op_ModifyLaunchTemplate.go",
+ "api_op_ModifyManagedPrefixList.go",
+ "api_op_ModifyNetworkInterfaceAttribute.go",
+ "api_op_ModifyReservedInstances.go",
+ "api_op_ModifySecurityGroupRules.go",
+ "api_op_ModifySnapshotAttribute.go",
+ "api_op_ModifySpotFleetRequest.go",
+ "api_op_ModifySubnetAttribute.go",
+ "api_op_ModifyTrafficMirrorFilterNetworkServices.go",
+ "api_op_ModifyTrafficMirrorFilterRule.go",
+ "api_op_ModifyTrafficMirrorSession.go",
+ "api_op_ModifyTransitGateway.go",
+ "api_op_ModifyTransitGatewayPrefixListReference.go",
+ "api_op_ModifyTransitGatewayVpcAttachment.go",
+ "api_op_ModifyVolume.go",
+ "api_op_ModifyVolumeAttribute.go",
+ "api_op_ModifyVpcAttribute.go",
+ "api_op_ModifyVpcEndpoint.go",
+ "api_op_ModifyVpcEndpointConnectionNotification.go",
+ "api_op_ModifyVpcEndpointServiceConfiguration.go",
+ "api_op_ModifyVpcEndpointServicePermissions.go",
+ "api_op_ModifyVpcPeeringConnectionOptions.go",
+ "api_op_ModifyVpcTenancy.go",
+ "api_op_ModifyVpnConnection.go",
+ "api_op_ModifyVpnConnectionOptions.go",
+ "api_op_ModifyVpnTunnelCertificate.go",
+ "api_op_ModifyVpnTunnelOptions.go",
+ "api_op_MonitorInstances.go",
+ "api_op_MoveAddressToVpc.go",
+ "api_op_ProvisionByoipCidr.go",
+ "api_op_PurchaseHostReservation.go",
+ "api_op_PurchaseReservedInstancesOffering.go",
+ "api_op_PurchaseScheduledInstances.go",
+ "api_op_RebootInstances.go",
+ "api_op_RegisterImage.go",
+ "api_op_RegisterInstanceEventNotificationAttributes.go",
+ "api_op_RegisterTransitGatewayMulticastGroupMembers.go",
+ "api_op_RegisterTransitGatewayMulticastGroupSources.go",
+ "api_op_RejectTransitGatewayMulticastDomainAssociations.go",
+ "api_op_RejectTransitGatewayPeeringAttachment.go",
+ "api_op_RejectTransitGatewayVpcAttachment.go",
+ "api_op_RejectVpcEndpointConnections.go",
+ "api_op_RejectVpcPeeringConnection.go",
+ "api_op_ReleaseAddress.go",
+ "api_op_ReleaseHosts.go",
+ "api_op_ReplaceIamInstanceProfileAssociation.go",
+ "api_op_ReplaceNetworkAclAssociation.go",
+ "api_op_ReplaceNetworkAclEntry.go",
+ "api_op_ReplaceRoute.go",
+ "api_op_ReplaceRouteTableAssociation.go",
+ "api_op_ReplaceTransitGatewayRoute.go",
+ "api_op_ReportInstanceStatus.go",
+ "api_op_RequestSpotFleet.go",
+ "api_op_RequestSpotInstances.go",
+ "api_op_ResetAddressAttribute.go",
+ "api_op_ResetEbsDefaultKmsKeyId.go",
+ "api_op_ResetFpgaImageAttribute.go",
+ "api_op_ResetImageAttribute.go",
+ "api_op_ResetInstanceAttribute.go",
+ "api_op_ResetNetworkInterfaceAttribute.go",
+ "api_op_ResetSnapshotAttribute.go",
+ "api_op_RestoreAddressToClassic.go",
+ "api_op_RestoreManagedPrefixListVersion.go",
+ "api_op_RevokeClientVpnIngress.go",
+ "api_op_RevokeSecurityGroupEgress.go",
+ "api_op_RevokeSecurityGroupIngress.go",
+ "api_op_RunInstances.go",
+ "api_op_RunScheduledInstances.go",
+ "api_op_SearchLocalGatewayRoutes.go",
+ "api_op_SearchTransitGatewayMulticastGroups.go",
+ "api_op_SearchTransitGatewayRoutes.go",
+ "api_op_SendDiagnosticInterrupt.go",
+ "api_op_StartInstances.go",
+ "api_op_StartNetworkInsightsAnalysis.go",
+ "api_op_StartVpcEndpointServicePrivateDnsVerification.go",
+ "api_op_StopInstances.go",
+ "api_op_TerminateClientVpnConnections.go",
+ "api_op_TerminateInstances.go",
+ "api_op_UnassignIpv6Addresses.go",
+ "api_op_UnassignPrivateIpAddresses.go",
+ "api_op_UnmonitorInstances.go",
+ "api_op_UpdateSecurityGroupRuleDescriptionsEgress.go",
+ "api_op_UpdateSecurityGroupRuleDescriptionsIngress.go",
+ "api_op_WithdrawByoipCidr.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/types.go",
+ "validators.go"
+ ],
+ "go": "1.15",
+ "module": "github.com/aws/aws-sdk-go-v2/service/ec2",
+ "unstable": false
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/go.mod b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/go.mod
new file mode 100644
index 00000000..3c47b291
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/go.mod
@@ -0,0 +1,14 @@
+module github.com/aws/aws-sdk-go-v2/service/ec2
+
+go 1.15
+
+require (
+ github.com/aws/aws-sdk-go-v2 v1.9.1
+ github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.3.1
+ github.com/aws/smithy-go v1.8.0
+ github.com/jmespath/go-jmespath v0.4.0
+)
+
+replace github.com/aws/aws-sdk-go-v2 => ../../
+
+replace github.com/aws/aws-sdk-go-v2/service/internal/presigned-url => ../../service/internal/presigned-url/
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/go.sum b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/go.sum
new file mode 100644
index 00000000..d5bb6d9e
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/go.sum
@@ -0,0 +1,20 @@
+github.com/aws/smithy-go v1.8.0 h1:AEwwwXQZtUwP5Mz506FeXXrKBe0jA8gVM+1gEcSRooc=
+github.com/aws/smithy-go v1.8.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E=
+github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
+github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ=
+github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg=
+github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo=
+github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8=
+github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U=
+github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
+github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
+github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
+golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
+golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
+gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10=
+gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/go_module_metadata.go
new file mode 100644
index 00000000..3045c48c
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/go_module_metadata.go
@@ -0,0 +1,6 @@
+// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT.
+
+package ec2
+
+// goModuleVersion is the tagged release for this module
+const goModuleVersion = "1.18.0"
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/internal/endpoints/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/internal/endpoints/endpoints.go
new file mode 100644
index 00000000..4d3891c6
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/internal/endpoints/endpoints.go
@@ -0,0 +1,183 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package endpoints
+
+import (
+ "github.com/aws/aws-sdk-go-v2/aws"
+ "github.com/aws/aws-sdk-go-v2/internal/endpoints"
+ "regexp"
+)
+
+// Options is the endpoint resolver configuration options
+type Options struct {
+ DisableHTTPS bool
+}
+
+// Resolver EC2 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 := endpoints.Options{
+ DisableHTTPS: options.DisableHTTPS,
+ }
+ 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
+ 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+$"),
+ AwsUsGov: regexp.MustCompile("^us\\-gov\\-\\w+\\-\\d+$"),
+}
+
+var defaultPartitions = endpoints.Partitions{
+ {
+ ID: "aws",
+ Defaults: endpoints.Endpoint{
+ Hostname: "ec2.{region}.amazonaws.com",
+ Protocols: []string{"http", "https"},
+ SignatureVersions: []string{"v4"},
+ },
+ RegionRegex: partitionRegexp.Aws,
+ IsRegionalized: true,
+ Endpoints: endpoints.Endpoints{
+ "af-south-1": endpoints.Endpoint{},
+ "ap-east-1": endpoints.Endpoint{},
+ "ap-northeast-1": endpoints.Endpoint{},
+ "ap-northeast-2": endpoints.Endpoint{},
+ "ap-northeast-3": endpoints.Endpoint{},
+ "ap-south-1": endpoints.Endpoint{},
+ "ap-southeast-1": endpoints.Endpoint{},
+ "ap-southeast-2": endpoints.Endpoint{},
+ "ca-central-1": endpoints.Endpoint{},
+ "eu-central-1": endpoints.Endpoint{},
+ "eu-north-1": endpoints.Endpoint{},
+ "eu-south-1": endpoints.Endpoint{},
+ "eu-west-1": endpoints.Endpoint{},
+ "eu-west-2": endpoints.Endpoint{},
+ "eu-west-3": endpoints.Endpoint{},
+ "fips-ca-central-1": endpoints.Endpoint{
+ Hostname: "ec2-fips.ca-central-1.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "ca-central-1",
+ },
+ },
+ "fips-us-east-1": endpoints.Endpoint{
+ Hostname: "ec2-fips.us-east-1.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "us-east-1",
+ },
+ },
+ "fips-us-east-2": endpoints.Endpoint{
+ Hostname: "ec2-fips.us-east-2.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "us-east-2",
+ },
+ },
+ "fips-us-west-1": endpoints.Endpoint{
+ Hostname: "ec2-fips.us-west-1.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "us-west-1",
+ },
+ },
+ "fips-us-west-2": endpoints.Endpoint{
+ Hostname: "ec2-fips.us-west-2.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "us-west-2",
+ },
+ },
+ "me-south-1": endpoints.Endpoint{},
+ "sa-east-1": endpoints.Endpoint{},
+ "us-east-1": endpoints.Endpoint{},
+ "us-east-2": endpoints.Endpoint{},
+ "us-west-1": endpoints.Endpoint{},
+ "us-west-2": endpoints.Endpoint{},
+ },
+ },
+ {
+ ID: "aws-cn",
+ Defaults: endpoints.Endpoint{
+ Hostname: "ec2.{region}.amazonaws.com.cn",
+ Protocols: []string{"http", "https"},
+ SignatureVersions: []string{"v4"},
+ },
+ RegionRegex: partitionRegexp.AwsCn,
+ IsRegionalized: true,
+ Endpoints: endpoints.Endpoints{
+ "cn-north-1": endpoints.Endpoint{},
+ "cn-northwest-1": endpoints.Endpoint{},
+ },
+ },
+ {
+ ID: "aws-iso",
+ Defaults: endpoints.Endpoint{
+ Hostname: "ec2.{region}.c2s.ic.gov",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ RegionRegex: partitionRegexp.AwsIso,
+ IsRegionalized: true,
+ Endpoints: endpoints.Endpoints{
+ "us-iso-east-1": endpoints.Endpoint{},
+ },
+ },
+ {
+ ID: "aws-iso-b",
+ Defaults: endpoints.Endpoint{
+ Hostname: "ec2.{region}.sc2s.sgov.gov",
+ Protocols: []string{"http", "https"},
+ SignatureVersions: []string{"v4"},
+ },
+ RegionRegex: partitionRegexp.AwsIsoB,
+ IsRegionalized: true,
+ Endpoints: endpoints.Endpoints{
+ "us-isob-east-1": endpoints.Endpoint{},
+ },
+ },
+ {
+ ID: "aws-us-gov",
+ Defaults: endpoints.Endpoint{
+ Hostname: "ec2.{region}.amazonaws.com",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ RegionRegex: partitionRegexp.AwsUsGov,
+ IsRegionalized: true,
+ Endpoints: endpoints.Endpoints{
+ "us-gov-east-1": endpoints.Endpoint{
+ Hostname: "ec2.us-gov-east-1.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "us-gov-east-1",
+ },
+ },
+ "us-gov-west-1": endpoints.Endpoint{
+ Hostname: "ec2.us-gov-west-1.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
+ },
+ },
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/serializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/serializers.go
new file mode 100644
index 00000000..d9db4a6e
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/serializers.go
@@ -0,0 +1,48118 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ec2
+
+import (
+ "bytes"
+ "context"
+ "fmt"
+ "github.com/aws/aws-sdk-go-v2/aws/protocol/query"
+ "github.com/aws/aws-sdk-go-v2/service/ec2/types"
+ smithy "github.com/aws/smithy-go"
+ "github.com/aws/smithy-go/encoding/httpbinding"
+ "github.com/aws/smithy-go/middleware"
+ smithytime "github.com/aws/smithy-go/time"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "math"
+)
+
+type awsEc2query_serializeOpAcceptReservedInstancesExchangeQuote struct {
+}
+
+func (*awsEc2query_serializeOpAcceptReservedInstancesExchangeQuote) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpAcceptReservedInstancesExchangeQuote) 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.(*AcceptReservedInstancesExchangeQuoteInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("AcceptReservedInstancesExchangeQuote")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentAcceptReservedInstancesExchangeQuoteInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpAcceptTransitGatewayMulticastDomainAssociations struct {
+}
+
+func (*awsEc2query_serializeOpAcceptTransitGatewayMulticastDomainAssociations) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpAcceptTransitGatewayMulticastDomainAssociations) 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.(*AcceptTransitGatewayMulticastDomainAssociationsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("AcceptTransitGatewayMulticastDomainAssociations")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentAcceptTransitGatewayMulticastDomainAssociationsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpAcceptTransitGatewayPeeringAttachment struct {
+}
+
+func (*awsEc2query_serializeOpAcceptTransitGatewayPeeringAttachment) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpAcceptTransitGatewayPeeringAttachment) 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.(*AcceptTransitGatewayPeeringAttachmentInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("AcceptTransitGatewayPeeringAttachment")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentAcceptTransitGatewayPeeringAttachmentInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpAcceptTransitGatewayVpcAttachment struct {
+}
+
+func (*awsEc2query_serializeOpAcceptTransitGatewayVpcAttachment) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpAcceptTransitGatewayVpcAttachment) 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.(*AcceptTransitGatewayVpcAttachmentInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("AcceptTransitGatewayVpcAttachment")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentAcceptTransitGatewayVpcAttachmentInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpAcceptVpcEndpointConnections struct {
+}
+
+func (*awsEc2query_serializeOpAcceptVpcEndpointConnections) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpAcceptVpcEndpointConnections) 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.(*AcceptVpcEndpointConnectionsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("AcceptVpcEndpointConnections")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentAcceptVpcEndpointConnectionsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpAcceptVpcPeeringConnection struct {
+}
+
+func (*awsEc2query_serializeOpAcceptVpcPeeringConnection) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpAcceptVpcPeeringConnection) 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.(*AcceptVpcPeeringConnectionInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("AcceptVpcPeeringConnection")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentAcceptVpcPeeringConnectionInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpAdvertiseByoipCidr struct {
+}
+
+func (*awsEc2query_serializeOpAdvertiseByoipCidr) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpAdvertiseByoipCidr) 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.(*AdvertiseByoipCidrInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("AdvertiseByoipCidr")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentAdvertiseByoipCidrInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpAllocateAddress struct {
+}
+
+func (*awsEc2query_serializeOpAllocateAddress) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpAllocateAddress) 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.(*AllocateAddressInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("AllocateAddress")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentAllocateAddressInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpAllocateHosts struct {
+}
+
+func (*awsEc2query_serializeOpAllocateHosts) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpAllocateHosts) 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.(*AllocateHostsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("AllocateHosts")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentAllocateHostsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpApplySecurityGroupsToClientVpnTargetNetwork struct {
+}
+
+func (*awsEc2query_serializeOpApplySecurityGroupsToClientVpnTargetNetwork) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpApplySecurityGroupsToClientVpnTargetNetwork) 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.(*ApplySecurityGroupsToClientVpnTargetNetworkInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("ApplySecurityGroupsToClientVpnTargetNetwork")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentApplySecurityGroupsToClientVpnTargetNetworkInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpAssignIpv6Addresses struct {
+}
+
+func (*awsEc2query_serializeOpAssignIpv6Addresses) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpAssignIpv6Addresses) 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.(*AssignIpv6AddressesInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("AssignIpv6Addresses")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentAssignIpv6AddressesInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpAssignPrivateIpAddresses struct {
+}
+
+func (*awsEc2query_serializeOpAssignPrivateIpAddresses) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpAssignPrivateIpAddresses) 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.(*AssignPrivateIpAddressesInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("AssignPrivateIpAddresses")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentAssignPrivateIpAddressesInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpAssociateAddress struct {
+}
+
+func (*awsEc2query_serializeOpAssociateAddress) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpAssociateAddress) 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.(*AssociateAddressInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("AssociateAddress")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentAssociateAddressInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpAssociateClientVpnTargetNetwork struct {
+}
+
+func (*awsEc2query_serializeOpAssociateClientVpnTargetNetwork) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpAssociateClientVpnTargetNetwork) 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.(*AssociateClientVpnTargetNetworkInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("AssociateClientVpnTargetNetwork")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentAssociateClientVpnTargetNetworkInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpAssociateDhcpOptions struct {
+}
+
+func (*awsEc2query_serializeOpAssociateDhcpOptions) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpAssociateDhcpOptions) 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.(*AssociateDhcpOptionsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("AssociateDhcpOptions")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentAssociateDhcpOptionsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpAssociateEnclaveCertificateIamRole struct {
+}
+
+func (*awsEc2query_serializeOpAssociateEnclaveCertificateIamRole) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpAssociateEnclaveCertificateIamRole) 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.(*AssociateEnclaveCertificateIamRoleInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("AssociateEnclaveCertificateIamRole")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentAssociateEnclaveCertificateIamRoleInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpAssociateIamInstanceProfile struct {
+}
+
+func (*awsEc2query_serializeOpAssociateIamInstanceProfile) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpAssociateIamInstanceProfile) 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.(*AssociateIamInstanceProfileInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("AssociateIamInstanceProfile")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentAssociateIamInstanceProfileInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpAssociateInstanceEventWindow struct {
+}
+
+func (*awsEc2query_serializeOpAssociateInstanceEventWindow) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpAssociateInstanceEventWindow) 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.(*AssociateInstanceEventWindowInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("AssociateInstanceEventWindow")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentAssociateInstanceEventWindowInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpAssociateRouteTable struct {
+}
+
+func (*awsEc2query_serializeOpAssociateRouteTable) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpAssociateRouteTable) 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.(*AssociateRouteTableInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("AssociateRouteTable")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentAssociateRouteTableInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpAssociateSubnetCidrBlock struct {
+}
+
+func (*awsEc2query_serializeOpAssociateSubnetCidrBlock) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpAssociateSubnetCidrBlock) 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.(*AssociateSubnetCidrBlockInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("AssociateSubnetCidrBlock")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentAssociateSubnetCidrBlockInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpAssociateTransitGatewayMulticastDomain struct {
+}
+
+func (*awsEc2query_serializeOpAssociateTransitGatewayMulticastDomain) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpAssociateTransitGatewayMulticastDomain) 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.(*AssociateTransitGatewayMulticastDomainInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("AssociateTransitGatewayMulticastDomain")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentAssociateTransitGatewayMulticastDomainInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpAssociateTransitGatewayRouteTable struct {
+}
+
+func (*awsEc2query_serializeOpAssociateTransitGatewayRouteTable) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpAssociateTransitGatewayRouteTable) 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.(*AssociateTransitGatewayRouteTableInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("AssociateTransitGatewayRouteTable")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentAssociateTransitGatewayRouteTableInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpAssociateTrunkInterface struct {
+}
+
+func (*awsEc2query_serializeOpAssociateTrunkInterface) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpAssociateTrunkInterface) 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.(*AssociateTrunkInterfaceInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("AssociateTrunkInterface")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentAssociateTrunkInterfaceInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpAssociateVpcCidrBlock struct {
+}
+
+func (*awsEc2query_serializeOpAssociateVpcCidrBlock) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpAssociateVpcCidrBlock) 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.(*AssociateVpcCidrBlockInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("AssociateVpcCidrBlock")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentAssociateVpcCidrBlockInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpAttachClassicLinkVpc struct {
+}
+
+func (*awsEc2query_serializeOpAttachClassicLinkVpc) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpAttachClassicLinkVpc) 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.(*AttachClassicLinkVpcInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("AttachClassicLinkVpc")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentAttachClassicLinkVpcInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpAttachInternetGateway struct {
+}
+
+func (*awsEc2query_serializeOpAttachInternetGateway) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpAttachInternetGateway) 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.(*AttachInternetGatewayInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("AttachInternetGateway")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentAttachInternetGatewayInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpAttachNetworkInterface struct {
+}
+
+func (*awsEc2query_serializeOpAttachNetworkInterface) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpAttachNetworkInterface) 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.(*AttachNetworkInterfaceInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("AttachNetworkInterface")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentAttachNetworkInterfaceInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpAttachVolume struct {
+}
+
+func (*awsEc2query_serializeOpAttachVolume) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpAttachVolume) 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.(*AttachVolumeInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("AttachVolume")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentAttachVolumeInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpAttachVpnGateway struct {
+}
+
+func (*awsEc2query_serializeOpAttachVpnGateway) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpAttachVpnGateway) 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.(*AttachVpnGatewayInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("AttachVpnGateway")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentAttachVpnGatewayInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpAuthorizeClientVpnIngress struct {
+}
+
+func (*awsEc2query_serializeOpAuthorizeClientVpnIngress) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpAuthorizeClientVpnIngress) 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.(*AuthorizeClientVpnIngressInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("AuthorizeClientVpnIngress")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentAuthorizeClientVpnIngressInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpAuthorizeSecurityGroupEgress struct {
+}
+
+func (*awsEc2query_serializeOpAuthorizeSecurityGroupEgress) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpAuthorizeSecurityGroupEgress) 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.(*AuthorizeSecurityGroupEgressInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("AuthorizeSecurityGroupEgress")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentAuthorizeSecurityGroupEgressInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpAuthorizeSecurityGroupIngress struct {
+}
+
+func (*awsEc2query_serializeOpAuthorizeSecurityGroupIngress) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpAuthorizeSecurityGroupIngress) 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.(*AuthorizeSecurityGroupIngressInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("AuthorizeSecurityGroupIngress")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentAuthorizeSecurityGroupIngressInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpBundleInstance struct {
+}
+
+func (*awsEc2query_serializeOpBundleInstance) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpBundleInstance) 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.(*BundleInstanceInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("BundleInstance")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentBundleInstanceInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpCancelBundleTask struct {
+}
+
+func (*awsEc2query_serializeOpCancelBundleTask) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpCancelBundleTask) 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.(*CancelBundleTaskInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("CancelBundleTask")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentCancelBundleTaskInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpCancelCapacityReservation struct {
+}
+
+func (*awsEc2query_serializeOpCancelCapacityReservation) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpCancelCapacityReservation) 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.(*CancelCapacityReservationInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("CancelCapacityReservation")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentCancelCapacityReservationInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpCancelConversionTask struct {
+}
+
+func (*awsEc2query_serializeOpCancelConversionTask) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpCancelConversionTask) 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.(*CancelConversionTaskInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("CancelConversionTask")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentCancelConversionTaskInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpCancelExportTask struct {
+}
+
+func (*awsEc2query_serializeOpCancelExportTask) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpCancelExportTask) 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.(*CancelExportTaskInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("CancelExportTask")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentCancelExportTaskInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpCancelImportTask struct {
+}
+
+func (*awsEc2query_serializeOpCancelImportTask) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpCancelImportTask) 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.(*CancelImportTaskInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("CancelImportTask")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentCancelImportTaskInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpCancelReservedInstancesListing struct {
+}
+
+func (*awsEc2query_serializeOpCancelReservedInstancesListing) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpCancelReservedInstancesListing) 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.(*CancelReservedInstancesListingInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("CancelReservedInstancesListing")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentCancelReservedInstancesListingInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpCancelSpotFleetRequests struct {
+}
+
+func (*awsEc2query_serializeOpCancelSpotFleetRequests) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpCancelSpotFleetRequests) 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.(*CancelSpotFleetRequestsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("CancelSpotFleetRequests")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentCancelSpotFleetRequestsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpCancelSpotInstanceRequests struct {
+}
+
+func (*awsEc2query_serializeOpCancelSpotInstanceRequests) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpCancelSpotInstanceRequests) 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.(*CancelSpotInstanceRequestsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("CancelSpotInstanceRequests")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentCancelSpotInstanceRequestsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpConfirmProductInstance struct {
+}
+
+func (*awsEc2query_serializeOpConfirmProductInstance) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpConfirmProductInstance) 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.(*ConfirmProductInstanceInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("ConfirmProductInstance")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentConfirmProductInstanceInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpCopyFpgaImage struct {
+}
+
+func (*awsEc2query_serializeOpCopyFpgaImage) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpCopyFpgaImage) 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.(*CopyFpgaImageInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("CopyFpgaImage")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentCopyFpgaImageInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpCopyImage struct {
+}
+
+func (*awsEc2query_serializeOpCopyImage) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpCopyImage) 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.(*CopyImageInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("CopyImage")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentCopyImageInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpCopySnapshot struct {
+}
+
+func (*awsEc2query_serializeOpCopySnapshot) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpCopySnapshot) 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.(*CopySnapshotInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("CopySnapshot")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentCopySnapshotInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpCreateCapacityReservation struct {
+}
+
+func (*awsEc2query_serializeOpCreateCapacityReservation) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpCreateCapacityReservation) 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.(*CreateCapacityReservationInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("CreateCapacityReservation")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentCreateCapacityReservationInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpCreateCarrierGateway struct {
+}
+
+func (*awsEc2query_serializeOpCreateCarrierGateway) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpCreateCarrierGateway) 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.(*CreateCarrierGatewayInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("CreateCarrierGateway")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentCreateCarrierGatewayInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpCreateClientVpnEndpoint struct {
+}
+
+func (*awsEc2query_serializeOpCreateClientVpnEndpoint) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpCreateClientVpnEndpoint) 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.(*CreateClientVpnEndpointInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("CreateClientVpnEndpoint")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentCreateClientVpnEndpointInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpCreateClientVpnRoute struct {
+}
+
+func (*awsEc2query_serializeOpCreateClientVpnRoute) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpCreateClientVpnRoute) 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.(*CreateClientVpnRouteInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("CreateClientVpnRoute")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentCreateClientVpnRouteInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpCreateCustomerGateway struct {
+}
+
+func (*awsEc2query_serializeOpCreateCustomerGateway) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpCreateCustomerGateway) 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.(*CreateCustomerGatewayInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("CreateCustomerGateway")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentCreateCustomerGatewayInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpCreateDefaultSubnet struct {
+}
+
+func (*awsEc2query_serializeOpCreateDefaultSubnet) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpCreateDefaultSubnet) 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.(*CreateDefaultSubnetInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("CreateDefaultSubnet")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentCreateDefaultSubnetInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpCreateDefaultVpc struct {
+}
+
+func (*awsEc2query_serializeOpCreateDefaultVpc) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpCreateDefaultVpc) 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.(*CreateDefaultVpcInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("CreateDefaultVpc")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentCreateDefaultVpcInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpCreateDhcpOptions struct {
+}
+
+func (*awsEc2query_serializeOpCreateDhcpOptions) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpCreateDhcpOptions) 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.(*CreateDhcpOptionsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("CreateDhcpOptions")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentCreateDhcpOptionsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpCreateEgressOnlyInternetGateway struct {
+}
+
+func (*awsEc2query_serializeOpCreateEgressOnlyInternetGateway) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpCreateEgressOnlyInternetGateway) 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.(*CreateEgressOnlyInternetGatewayInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("CreateEgressOnlyInternetGateway")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentCreateEgressOnlyInternetGatewayInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpCreateFleet struct {
+}
+
+func (*awsEc2query_serializeOpCreateFleet) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpCreateFleet) 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.(*CreateFleetInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("CreateFleet")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentCreateFleetInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpCreateFlowLogs struct {
+}
+
+func (*awsEc2query_serializeOpCreateFlowLogs) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpCreateFlowLogs) 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.(*CreateFlowLogsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("CreateFlowLogs")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentCreateFlowLogsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpCreateFpgaImage struct {
+}
+
+func (*awsEc2query_serializeOpCreateFpgaImage) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpCreateFpgaImage) 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.(*CreateFpgaImageInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("CreateFpgaImage")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentCreateFpgaImageInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpCreateImage struct {
+}
+
+func (*awsEc2query_serializeOpCreateImage) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpCreateImage) 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.(*CreateImageInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("CreateImage")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentCreateImageInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpCreateInstanceEventWindow struct {
+}
+
+func (*awsEc2query_serializeOpCreateInstanceEventWindow) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpCreateInstanceEventWindow) 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.(*CreateInstanceEventWindowInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("CreateInstanceEventWindow")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentCreateInstanceEventWindowInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpCreateInstanceExportTask struct {
+}
+
+func (*awsEc2query_serializeOpCreateInstanceExportTask) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpCreateInstanceExportTask) 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.(*CreateInstanceExportTaskInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("CreateInstanceExportTask")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentCreateInstanceExportTaskInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpCreateInternetGateway struct {
+}
+
+func (*awsEc2query_serializeOpCreateInternetGateway) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpCreateInternetGateway) 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.(*CreateInternetGatewayInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("CreateInternetGateway")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentCreateInternetGatewayInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpCreateKeyPair struct {
+}
+
+func (*awsEc2query_serializeOpCreateKeyPair) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpCreateKeyPair) 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.(*CreateKeyPairInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("CreateKeyPair")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentCreateKeyPairInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpCreateLaunchTemplate struct {
+}
+
+func (*awsEc2query_serializeOpCreateLaunchTemplate) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpCreateLaunchTemplate) 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.(*CreateLaunchTemplateInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("CreateLaunchTemplate")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentCreateLaunchTemplateInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpCreateLaunchTemplateVersion struct {
+}
+
+func (*awsEc2query_serializeOpCreateLaunchTemplateVersion) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpCreateLaunchTemplateVersion) 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.(*CreateLaunchTemplateVersionInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("CreateLaunchTemplateVersion")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentCreateLaunchTemplateVersionInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpCreateLocalGatewayRoute struct {
+}
+
+func (*awsEc2query_serializeOpCreateLocalGatewayRoute) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpCreateLocalGatewayRoute) 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.(*CreateLocalGatewayRouteInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("CreateLocalGatewayRoute")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentCreateLocalGatewayRouteInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpCreateLocalGatewayRouteTableVpcAssociation struct {
+}
+
+func (*awsEc2query_serializeOpCreateLocalGatewayRouteTableVpcAssociation) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpCreateLocalGatewayRouteTableVpcAssociation) 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.(*CreateLocalGatewayRouteTableVpcAssociationInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("CreateLocalGatewayRouteTableVpcAssociation")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentCreateLocalGatewayRouteTableVpcAssociationInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpCreateManagedPrefixList struct {
+}
+
+func (*awsEc2query_serializeOpCreateManagedPrefixList) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpCreateManagedPrefixList) 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.(*CreateManagedPrefixListInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("CreateManagedPrefixList")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentCreateManagedPrefixListInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpCreateNatGateway struct {
+}
+
+func (*awsEc2query_serializeOpCreateNatGateway) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpCreateNatGateway) 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.(*CreateNatGatewayInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("CreateNatGateway")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentCreateNatGatewayInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpCreateNetworkAcl struct {
+}
+
+func (*awsEc2query_serializeOpCreateNetworkAcl) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpCreateNetworkAcl) 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.(*CreateNetworkAclInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("CreateNetworkAcl")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentCreateNetworkAclInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpCreateNetworkAclEntry struct {
+}
+
+func (*awsEc2query_serializeOpCreateNetworkAclEntry) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpCreateNetworkAclEntry) 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.(*CreateNetworkAclEntryInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("CreateNetworkAclEntry")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentCreateNetworkAclEntryInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpCreateNetworkInsightsPath struct {
+}
+
+func (*awsEc2query_serializeOpCreateNetworkInsightsPath) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpCreateNetworkInsightsPath) 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.(*CreateNetworkInsightsPathInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("CreateNetworkInsightsPath")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentCreateNetworkInsightsPathInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpCreateNetworkInterface struct {
+}
+
+func (*awsEc2query_serializeOpCreateNetworkInterface) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpCreateNetworkInterface) 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.(*CreateNetworkInterfaceInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("CreateNetworkInterface")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentCreateNetworkInterfaceInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpCreateNetworkInterfacePermission struct {
+}
+
+func (*awsEc2query_serializeOpCreateNetworkInterfacePermission) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpCreateNetworkInterfacePermission) 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.(*CreateNetworkInterfacePermissionInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("CreateNetworkInterfacePermission")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentCreateNetworkInterfacePermissionInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpCreatePlacementGroup struct {
+}
+
+func (*awsEc2query_serializeOpCreatePlacementGroup) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpCreatePlacementGroup) 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.(*CreatePlacementGroupInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("CreatePlacementGroup")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentCreatePlacementGroupInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpCreateReplaceRootVolumeTask struct {
+}
+
+func (*awsEc2query_serializeOpCreateReplaceRootVolumeTask) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpCreateReplaceRootVolumeTask) 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.(*CreateReplaceRootVolumeTaskInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("CreateReplaceRootVolumeTask")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentCreateReplaceRootVolumeTaskInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpCreateReservedInstancesListing struct {
+}
+
+func (*awsEc2query_serializeOpCreateReservedInstancesListing) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpCreateReservedInstancesListing) 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.(*CreateReservedInstancesListingInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("CreateReservedInstancesListing")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentCreateReservedInstancesListingInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpCreateRestoreImageTask struct {
+}
+
+func (*awsEc2query_serializeOpCreateRestoreImageTask) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpCreateRestoreImageTask) 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.(*CreateRestoreImageTaskInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("CreateRestoreImageTask")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentCreateRestoreImageTaskInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpCreateRoute struct {
+}
+
+func (*awsEc2query_serializeOpCreateRoute) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpCreateRoute) 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.(*CreateRouteInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("CreateRoute")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentCreateRouteInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpCreateRouteTable struct {
+}
+
+func (*awsEc2query_serializeOpCreateRouteTable) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpCreateRouteTable) 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.(*CreateRouteTableInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("CreateRouteTable")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentCreateRouteTableInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpCreateSecurityGroup struct {
+}
+
+func (*awsEc2query_serializeOpCreateSecurityGroup) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpCreateSecurityGroup) 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.(*CreateSecurityGroupInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("CreateSecurityGroup")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentCreateSecurityGroupInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpCreateSnapshot struct {
+}
+
+func (*awsEc2query_serializeOpCreateSnapshot) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpCreateSnapshot) 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.(*CreateSnapshotInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("CreateSnapshot")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentCreateSnapshotInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpCreateSnapshots struct {
+}
+
+func (*awsEc2query_serializeOpCreateSnapshots) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpCreateSnapshots) 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.(*CreateSnapshotsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("CreateSnapshots")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentCreateSnapshotsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpCreateSpotDatafeedSubscription struct {
+}
+
+func (*awsEc2query_serializeOpCreateSpotDatafeedSubscription) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpCreateSpotDatafeedSubscription) 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.(*CreateSpotDatafeedSubscriptionInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("CreateSpotDatafeedSubscription")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentCreateSpotDatafeedSubscriptionInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpCreateStoreImageTask struct {
+}
+
+func (*awsEc2query_serializeOpCreateStoreImageTask) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpCreateStoreImageTask) 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.(*CreateStoreImageTaskInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("CreateStoreImageTask")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentCreateStoreImageTaskInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpCreateSubnet struct {
+}
+
+func (*awsEc2query_serializeOpCreateSubnet) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpCreateSubnet) 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.(*CreateSubnetInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("CreateSubnet")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentCreateSubnetInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpCreateSubnetCidrReservation struct {
+}
+
+func (*awsEc2query_serializeOpCreateSubnetCidrReservation) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpCreateSubnetCidrReservation) 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.(*CreateSubnetCidrReservationInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("CreateSubnetCidrReservation")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentCreateSubnetCidrReservationInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpCreateTags struct {
+}
+
+func (*awsEc2query_serializeOpCreateTags) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpCreateTags) 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.(*CreateTagsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("CreateTags")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentCreateTagsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpCreateTrafficMirrorFilter struct {
+}
+
+func (*awsEc2query_serializeOpCreateTrafficMirrorFilter) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpCreateTrafficMirrorFilter) 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.(*CreateTrafficMirrorFilterInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("CreateTrafficMirrorFilter")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentCreateTrafficMirrorFilterInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpCreateTrafficMirrorFilterRule struct {
+}
+
+func (*awsEc2query_serializeOpCreateTrafficMirrorFilterRule) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpCreateTrafficMirrorFilterRule) 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.(*CreateTrafficMirrorFilterRuleInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("CreateTrafficMirrorFilterRule")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentCreateTrafficMirrorFilterRuleInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpCreateTrafficMirrorSession struct {
+}
+
+func (*awsEc2query_serializeOpCreateTrafficMirrorSession) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpCreateTrafficMirrorSession) 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.(*CreateTrafficMirrorSessionInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("CreateTrafficMirrorSession")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentCreateTrafficMirrorSessionInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpCreateTrafficMirrorTarget struct {
+}
+
+func (*awsEc2query_serializeOpCreateTrafficMirrorTarget) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpCreateTrafficMirrorTarget) 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.(*CreateTrafficMirrorTargetInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("CreateTrafficMirrorTarget")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentCreateTrafficMirrorTargetInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpCreateTransitGateway struct {
+}
+
+func (*awsEc2query_serializeOpCreateTransitGateway) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpCreateTransitGateway) 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.(*CreateTransitGatewayInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("CreateTransitGateway")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentCreateTransitGatewayInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpCreateTransitGatewayConnect struct {
+}
+
+func (*awsEc2query_serializeOpCreateTransitGatewayConnect) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpCreateTransitGatewayConnect) 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.(*CreateTransitGatewayConnectInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("CreateTransitGatewayConnect")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentCreateTransitGatewayConnectInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpCreateTransitGatewayConnectPeer struct {
+}
+
+func (*awsEc2query_serializeOpCreateTransitGatewayConnectPeer) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpCreateTransitGatewayConnectPeer) 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.(*CreateTransitGatewayConnectPeerInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("CreateTransitGatewayConnectPeer")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentCreateTransitGatewayConnectPeerInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpCreateTransitGatewayMulticastDomain struct {
+}
+
+func (*awsEc2query_serializeOpCreateTransitGatewayMulticastDomain) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpCreateTransitGatewayMulticastDomain) 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.(*CreateTransitGatewayMulticastDomainInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("CreateTransitGatewayMulticastDomain")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentCreateTransitGatewayMulticastDomainInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpCreateTransitGatewayPeeringAttachment struct {
+}
+
+func (*awsEc2query_serializeOpCreateTransitGatewayPeeringAttachment) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpCreateTransitGatewayPeeringAttachment) 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.(*CreateTransitGatewayPeeringAttachmentInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("CreateTransitGatewayPeeringAttachment")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentCreateTransitGatewayPeeringAttachmentInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpCreateTransitGatewayPrefixListReference struct {
+}
+
+func (*awsEc2query_serializeOpCreateTransitGatewayPrefixListReference) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpCreateTransitGatewayPrefixListReference) 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.(*CreateTransitGatewayPrefixListReferenceInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("CreateTransitGatewayPrefixListReference")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentCreateTransitGatewayPrefixListReferenceInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpCreateTransitGatewayRoute struct {
+}
+
+func (*awsEc2query_serializeOpCreateTransitGatewayRoute) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpCreateTransitGatewayRoute) 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.(*CreateTransitGatewayRouteInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("CreateTransitGatewayRoute")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentCreateTransitGatewayRouteInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpCreateTransitGatewayRouteTable struct {
+}
+
+func (*awsEc2query_serializeOpCreateTransitGatewayRouteTable) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpCreateTransitGatewayRouteTable) 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.(*CreateTransitGatewayRouteTableInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("CreateTransitGatewayRouteTable")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentCreateTransitGatewayRouteTableInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpCreateTransitGatewayVpcAttachment struct {
+}
+
+func (*awsEc2query_serializeOpCreateTransitGatewayVpcAttachment) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpCreateTransitGatewayVpcAttachment) 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.(*CreateTransitGatewayVpcAttachmentInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("CreateTransitGatewayVpcAttachment")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentCreateTransitGatewayVpcAttachmentInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpCreateVolume struct {
+}
+
+func (*awsEc2query_serializeOpCreateVolume) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpCreateVolume) 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.(*CreateVolumeInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("CreateVolume")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentCreateVolumeInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpCreateVpc struct {
+}
+
+func (*awsEc2query_serializeOpCreateVpc) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpCreateVpc) 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.(*CreateVpcInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("CreateVpc")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentCreateVpcInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpCreateVpcEndpoint struct {
+}
+
+func (*awsEc2query_serializeOpCreateVpcEndpoint) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpCreateVpcEndpoint) 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.(*CreateVpcEndpointInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("CreateVpcEndpoint")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentCreateVpcEndpointInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpCreateVpcEndpointConnectionNotification struct {
+}
+
+func (*awsEc2query_serializeOpCreateVpcEndpointConnectionNotification) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpCreateVpcEndpointConnectionNotification) 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.(*CreateVpcEndpointConnectionNotificationInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("CreateVpcEndpointConnectionNotification")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentCreateVpcEndpointConnectionNotificationInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpCreateVpcEndpointServiceConfiguration struct {
+}
+
+func (*awsEc2query_serializeOpCreateVpcEndpointServiceConfiguration) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpCreateVpcEndpointServiceConfiguration) 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.(*CreateVpcEndpointServiceConfigurationInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("CreateVpcEndpointServiceConfiguration")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentCreateVpcEndpointServiceConfigurationInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpCreateVpcPeeringConnection struct {
+}
+
+func (*awsEc2query_serializeOpCreateVpcPeeringConnection) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpCreateVpcPeeringConnection) 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.(*CreateVpcPeeringConnectionInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("CreateVpcPeeringConnection")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentCreateVpcPeeringConnectionInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpCreateVpnConnection struct {
+}
+
+func (*awsEc2query_serializeOpCreateVpnConnection) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpCreateVpnConnection) 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.(*CreateVpnConnectionInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("CreateVpnConnection")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentCreateVpnConnectionInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpCreateVpnConnectionRoute struct {
+}
+
+func (*awsEc2query_serializeOpCreateVpnConnectionRoute) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpCreateVpnConnectionRoute) 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.(*CreateVpnConnectionRouteInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("CreateVpnConnectionRoute")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentCreateVpnConnectionRouteInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpCreateVpnGateway struct {
+}
+
+func (*awsEc2query_serializeOpCreateVpnGateway) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpCreateVpnGateway) 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.(*CreateVpnGatewayInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("CreateVpnGateway")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentCreateVpnGatewayInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDeleteCarrierGateway struct {
+}
+
+func (*awsEc2query_serializeOpDeleteCarrierGateway) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDeleteCarrierGateway) 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.(*DeleteCarrierGatewayInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DeleteCarrierGateway")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDeleteCarrierGatewayInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDeleteClientVpnEndpoint struct {
+}
+
+func (*awsEc2query_serializeOpDeleteClientVpnEndpoint) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDeleteClientVpnEndpoint) 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.(*DeleteClientVpnEndpointInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DeleteClientVpnEndpoint")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDeleteClientVpnEndpointInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDeleteClientVpnRoute struct {
+}
+
+func (*awsEc2query_serializeOpDeleteClientVpnRoute) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDeleteClientVpnRoute) 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.(*DeleteClientVpnRouteInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DeleteClientVpnRoute")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDeleteClientVpnRouteInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDeleteCustomerGateway struct {
+}
+
+func (*awsEc2query_serializeOpDeleteCustomerGateway) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDeleteCustomerGateway) 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.(*DeleteCustomerGatewayInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DeleteCustomerGateway")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDeleteCustomerGatewayInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDeleteDhcpOptions struct {
+}
+
+func (*awsEc2query_serializeOpDeleteDhcpOptions) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDeleteDhcpOptions) 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.(*DeleteDhcpOptionsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DeleteDhcpOptions")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDeleteDhcpOptionsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDeleteEgressOnlyInternetGateway struct {
+}
+
+func (*awsEc2query_serializeOpDeleteEgressOnlyInternetGateway) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDeleteEgressOnlyInternetGateway) 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.(*DeleteEgressOnlyInternetGatewayInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DeleteEgressOnlyInternetGateway")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDeleteEgressOnlyInternetGatewayInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDeleteFleets struct {
+}
+
+func (*awsEc2query_serializeOpDeleteFleets) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDeleteFleets) 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.(*DeleteFleetsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DeleteFleets")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDeleteFleetsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDeleteFlowLogs struct {
+}
+
+func (*awsEc2query_serializeOpDeleteFlowLogs) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDeleteFlowLogs) 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.(*DeleteFlowLogsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DeleteFlowLogs")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDeleteFlowLogsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDeleteFpgaImage struct {
+}
+
+func (*awsEc2query_serializeOpDeleteFpgaImage) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDeleteFpgaImage) 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.(*DeleteFpgaImageInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DeleteFpgaImage")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDeleteFpgaImageInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDeleteInstanceEventWindow struct {
+}
+
+func (*awsEc2query_serializeOpDeleteInstanceEventWindow) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDeleteInstanceEventWindow) 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.(*DeleteInstanceEventWindowInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DeleteInstanceEventWindow")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDeleteInstanceEventWindowInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDeleteInternetGateway struct {
+}
+
+func (*awsEc2query_serializeOpDeleteInternetGateway) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDeleteInternetGateway) 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.(*DeleteInternetGatewayInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DeleteInternetGateway")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDeleteInternetGatewayInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDeleteKeyPair struct {
+}
+
+func (*awsEc2query_serializeOpDeleteKeyPair) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDeleteKeyPair) 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.(*DeleteKeyPairInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DeleteKeyPair")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDeleteKeyPairInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDeleteLaunchTemplate struct {
+}
+
+func (*awsEc2query_serializeOpDeleteLaunchTemplate) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDeleteLaunchTemplate) 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.(*DeleteLaunchTemplateInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DeleteLaunchTemplate")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDeleteLaunchTemplateInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDeleteLaunchTemplateVersions struct {
+}
+
+func (*awsEc2query_serializeOpDeleteLaunchTemplateVersions) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDeleteLaunchTemplateVersions) 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.(*DeleteLaunchTemplateVersionsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DeleteLaunchTemplateVersions")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDeleteLaunchTemplateVersionsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDeleteLocalGatewayRoute struct {
+}
+
+func (*awsEc2query_serializeOpDeleteLocalGatewayRoute) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDeleteLocalGatewayRoute) 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.(*DeleteLocalGatewayRouteInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DeleteLocalGatewayRoute")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDeleteLocalGatewayRouteInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDeleteLocalGatewayRouteTableVpcAssociation struct {
+}
+
+func (*awsEc2query_serializeOpDeleteLocalGatewayRouteTableVpcAssociation) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDeleteLocalGatewayRouteTableVpcAssociation) 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.(*DeleteLocalGatewayRouteTableVpcAssociationInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DeleteLocalGatewayRouteTableVpcAssociation")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDeleteLocalGatewayRouteTableVpcAssociationInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDeleteManagedPrefixList struct {
+}
+
+func (*awsEc2query_serializeOpDeleteManagedPrefixList) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDeleteManagedPrefixList) 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.(*DeleteManagedPrefixListInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DeleteManagedPrefixList")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDeleteManagedPrefixListInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDeleteNatGateway struct {
+}
+
+func (*awsEc2query_serializeOpDeleteNatGateway) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDeleteNatGateway) 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.(*DeleteNatGatewayInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DeleteNatGateway")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDeleteNatGatewayInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDeleteNetworkAcl struct {
+}
+
+func (*awsEc2query_serializeOpDeleteNetworkAcl) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDeleteNetworkAcl) 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.(*DeleteNetworkAclInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DeleteNetworkAcl")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDeleteNetworkAclInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDeleteNetworkAclEntry struct {
+}
+
+func (*awsEc2query_serializeOpDeleteNetworkAclEntry) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDeleteNetworkAclEntry) 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.(*DeleteNetworkAclEntryInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DeleteNetworkAclEntry")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDeleteNetworkAclEntryInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDeleteNetworkInsightsAnalysis struct {
+}
+
+func (*awsEc2query_serializeOpDeleteNetworkInsightsAnalysis) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDeleteNetworkInsightsAnalysis) 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.(*DeleteNetworkInsightsAnalysisInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DeleteNetworkInsightsAnalysis")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDeleteNetworkInsightsAnalysisInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDeleteNetworkInsightsPath struct {
+}
+
+func (*awsEc2query_serializeOpDeleteNetworkInsightsPath) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDeleteNetworkInsightsPath) 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.(*DeleteNetworkInsightsPathInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DeleteNetworkInsightsPath")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDeleteNetworkInsightsPathInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDeleteNetworkInterface struct {
+}
+
+func (*awsEc2query_serializeOpDeleteNetworkInterface) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDeleteNetworkInterface) 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.(*DeleteNetworkInterfaceInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DeleteNetworkInterface")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDeleteNetworkInterfaceInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDeleteNetworkInterfacePermission struct {
+}
+
+func (*awsEc2query_serializeOpDeleteNetworkInterfacePermission) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDeleteNetworkInterfacePermission) 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.(*DeleteNetworkInterfacePermissionInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DeleteNetworkInterfacePermission")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDeleteNetworkInterfacePermissionInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDeletePlacementGroup struct {
+}
+
+func (*awsEc2query_serializeOpDeletePlacementGroup) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDeletePlacementGroup) 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.(*DeletePlacementGroupInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DeletePlacementGroup")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDeletePlacementGroupInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDeleteQueuedReservedInstances struct {
+}
+
+func (*awsEc2query_serializeOpDeleteQueuedReservedInstances) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDeleteQueuedReservedInstances) 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.(*DeleteQueuedReservedInstancesInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DeleteQueuedReservedInstances")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDeleteQueuedReservedInstancesInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDeleteRoute struct {
+}
+
+func (*awsEc2query_serializeOpDeleteRoute) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDeleteRoute) 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.(*DeleteRouteInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DeleteRoute")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDeleteRouteInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDeleteRouteTable struct {
+}
+
+func (*awsEc2query_serializeOpDeleteRouteTable) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDeleteRouteTable) 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.(*DeleteRouteTableInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DeleteRouteTable")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDeleteRouteTableInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDeleteSecurityGroup struct {
+}
+
+func (*awsEc2query_serializeOpDeleteSecurityGroup) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDeleteSecurityGroup) 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.(*DeleteSecurityGroupInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DeleteSecurityGroup")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDeleteSecurityGroupInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDeleteSnapshot struct {
+}
+
+func (*awsEc2query_serializeOpDeleteSnapshot) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDeleteSnapshot) 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.(*DeleteSnapshotInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DeleteSnapshot")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDeleteSnapshotInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDeleteSpotDatafeedSubscription struct {
+}
+
+func (*awsEc2query_serializeOpDeleteSpotDatafeedSubscription) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDeleteSpotDatafeedSubscription) 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.(*DeleteSpotDatafeedSubscriptionInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DeleteSpotDatafeedSubscription")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDeleteSpotDatafeedSubscriptionInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDeleteSubnet struct {
+}
+
+func (*awsEc2query_serializeOpDeleteSubnet) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDeleteSubnet) 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.(*DeleteSubnetInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DeleteSubnet")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDeleteSubnetInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDeleteSubnetCidrReservation struct {
+}
+
+func (*awsEc2query_serializeOpDeleteSubnetCidrReservation) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDeleteSubnetCidrReservation) 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.(*DeleteSubnetCidrReservationInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DeleteSubnetCidrReservation")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDeleteSubnetCidrReservationInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDeleteTags struct {
+}
+
+func (*awsEc2query_serializeOpDeleteTags) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDeleteTags) 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.(*DeleteTagsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DeleteTags")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDeleteTagsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDeleteTrafficMirrorFilter struct {
+}
+
+func (*awsEc2query_serializeOpDeleteTrafficMirrorFilter) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDeleteTrafficMirrorFilter) 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.(*DeleteTrafficMirrorFilterInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DeleteTrafficMirrorFilter")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDeleteTrafficMirrorFilterInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDeleteTrafficMirrorFilterRule struct {
+}
+
+func (*awsEc2query_serializeOpDeleteTrafficMirrorFilterRule) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDeleteTrafficMirrorFilterRule) 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.(*DeleteTrafficMirrorFilterRuleInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DeleteTrafficMirrorFilterRule")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDeleteTrafficMirrorFilterRuleInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDeleteTrafficMirrorSession struct {
+}
+
+func (*awsEc2query_serializeOpDeleteTrafficMirrorSession) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDeleteTrafficMirrorSession) 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.(*DeleteTrafficMirrorSessionInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DeleteTrafficMirrorSession")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDeleteTrafficMirrorSessionInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDeleteTrafficMirrorTarget struct {
+}
+
+func (*awsEc2query_serializeOpDeleteTrafficMirrorTarget) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDeleteTrafficMirrorTarget) 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.(*DeleteTrafficMirrorTargetInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DeleteTrafficMirrorTarget")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDeleteTrafficMirrorTargetInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDeleteTransitGateway struct {
+}
+
+func (*awsEc2query_serializeOpDeleteTransitGateway) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDeleteTransitGateway) 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.(*DeleteTransitGatewayInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DeleteTransitGateway")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDeleteTransitGatewayInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDeleteTransitGatewayConnect struct {
+}
+
+func (*awsEc2query_serializeOpDeleteTransitGatewayConnect) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDeleteTransitGatewayConnect) 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.(*DeleteTransitGatewayConnectInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DeleteTransitGatewayConnect")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDeleteTransitGatewayConnectInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDeleteTransitGatewayConnectPeer struct {
+}
+
+func (*awsEc2query_serializeOpDeleteTransitGatewayConnectPeer) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDeleteTransitGatewayConnectPeer) 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.(*DeleteTransitGatewayConnectPeerInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DeleteTransitGatewayConnectPeer")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDeleteTransitGatewayConnectPeerInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDeleteTransitGatewayMulticastDomain struct {
+}
+
+func (*awsEc2query_serializeOpDeleteTransitGatewayMulticastDomain) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDeleteTransitGatewayMulticastDomain) 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.(*DeleteTransitGatewayMulticastDomainInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DeleteTransitGatewayMulticastDomain")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDeleteTransitGatewayMulticastDomainInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDeleteTransitGatewayPeeringAttachment struct {
+}
+
+func (*awsEc2query_serializeOpDeleteTransitGatewayPeeringAttachment) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDeleteTransitGatewayPeeringAttachment) 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.(*DeleteTransitGatewayPeeringAttachmentInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DeleteTransitGatewayPeeringAttachment")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDeleteTransitGatewayPeeringAttachmentInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDeleteTransitGatewayPrefixListReference struct {
+}
+
+func (*awsEc2query_serializeOpDeleteTransitGatewayPrefixListReference) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDeleteTransitGatewayPrefixListReference) 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.(*DeleteTransitGatewayPrefixListReferenceInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DeleteTransitGatewayPrefixListReference")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDeleteTransitGatewayPrefixListReferenceInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDeleteTransitGatewayRoute struct {
+}
+
+func (*awsEc2query_serializeOpDeleteTransitGatewayRoute) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDeleteTransitGatewayRoute) 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.(*DeleteTransitGatewayRouteInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DeleteTransitGatewayRoute")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDeleteTransitGatewayRouteInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDeleteTransitGatewayRouteTable struct {
+}
+
+func (*awsEc2query_serializeOpDeleteTransitGatewayRouteTable) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDeleteTransitGatewayRouteTable) 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.(*DeleteTransitGatewayRouteTableInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DeleteTransitGatewayRouteTable")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDeleteTransitGatewayRouteTableInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDeleteTransitGatewayVpcAttachment struct {
+}
+
+func (*awsEc2query_serializeOpDeleteTransitGatewayVpcAttachment) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDeleteTransitGatewayVpcAttachment) 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.(*DeleteTransitGatewayVpcAttachmentInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DeleteTransitGatewayVpcAttachment")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDeleteTransitGatewayVpcAttachmentInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDeleteVolume struct {
+}
+
+func (*awsEc2query_serializeOpDeleteVolume) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDeleteVolume) 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.(*DeleteVolumeInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DeleteVolume")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDeleteVolumeInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDeleteVpc struct {
+}
+
+func (*awsEc2query_serializeOpDeleteVpc) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDeleteVpc) 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.(*DeleteVpcInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DeleteVpc")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDeleteVpcInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDeleteVpcEndpointConnectionNotifications struct {
+}
+
+func (*awsEc2query_serializeOpDeleteVpcEndpointConnectionNotifications) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDeleteVpcEndpointConnectionNotifications) 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.(*DeleteVpcEndpointConnectionNotificationsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DeleteVpcEndpointConnectionNotifications")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDeleteVpcEndpointConnectionNotificationsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDeleteVpcEndpoints struct {
+}
+
+func (*awsEc2query_serializeOpDeleteVpcEndpoints) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDeleteVpcEndpoints) 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.(*DeleteVpcEndpointsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DeleteVpcEndpoints")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDeleteVpcEndpointsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDeleteVpcEndpointServiceConfigurations struct {
+}
+
+func (*awsEc2query_serializeOpDeleteVpcEndpointServiceConfigurations) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDeleteVpcEndpointServiceConfigurations) 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.(*DeleteVpcEndpointServiceConfigurationsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DeleteVpcEndpointServiceConfigurations")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDeleteVpcEndpointServiceConfigurationsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDeleteVpcPeeringConnection struct {
+}
+
+func (*awsEc2query_serializeOpDeleteVpcPeeringConnection) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDeleteVpcPeeringConnection) 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.(*DeleteVpcPeeringConnectionInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DeleteVpcPeeringConnection")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDeleteVpcPeeringConnectionInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDeleteVpnConnection struct {
+}
+
+func (*awsEc2query_serializeOpDeleteVpnConnection) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDeleteVpnConnection) 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.(*DeleteVpnConnectionInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DeleteVpnConnection")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDeleteVpnConnectionInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDeleteVpnConnectionRoute struct {
+}
+
+func (*awsEc2query_serializeOpDeleteVpnConnectionRoute) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDeleteVpnConnectionRoute) 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.(*DeleteVpnConnectionRouteInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DeleteVpnConnectionRoute")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDeleteVpnConnectionRouteInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDeleteVpnGateway struct {
+}
+
+func (*awsEc2query_serializeOpDeleteVpnGateway) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDeleteVpnGateway) 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.(*DeleteVpnGatewayInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DeleteVpnGateway")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDeleteVpnGatewayInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDeprovisionByoipCidr struct {
+}
+
+func (*awsEc2query_serializeOpDeprovisionByoipCidr) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDeprovisionByoipCidr) 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.(*DeprovisionByoipCidrInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DeprovisionByoipCidr")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDeprovisionByoipCidrInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDeregisterImage struct {
+}
+
+func (*awsEc2query_serializeOpDeregisterImage) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDeregisterImage) 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.(*DeregisterImageInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DeregisterImage")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDeregisterImageInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDeregisterInstanceEventNotificationAttributes struct {
+}
+
+func (*awsEc2query_serializeOpDeregisterInstanceEventNotificationAttributes) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDeregisterInstanceEventNotificationAttributes) 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.(*DeregisterInstanceEventNotificationAttributesInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DeregisterInstanceEventNotificationAttributes")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDeregisterInstanceEventNotificationAttributesInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDeregisterTransitGatewayMulticastGroupMembers struct {
+}
+
+func (*awsEc2query_serializeOpDeregisterTransitGatewayMulticastGroupMembers) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDeregisterTransitGatewayMulticastGroupMembers) 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.(*DeregisterTransitGatewayMulticastGroupMembersInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DeregisterTransitGatewayMulticastGroupMembers")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDeregisterTransitGatewayMulticastGroupMembersInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDeregisterTransitGatewayMulticastGroupSources struct {
+}
+
+func (*awsEc2query_serializeOpDeregisterTransitGatewayMulticastGroupSources) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDeregisterTransitGatewayMulticastGroupSources) 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.(*DeregisterTransitGatewayMulticastGroupSourcesInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DeregisterTransitGatewayMulticastGroupSources")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDeregisterTransitGatewayMulticastGroupSourcesInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeAccountAttributes struct {
+}
+
+func (*awsEc2query_serializeOpDescribeAccountAttributes) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeAccountAttributes) 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.(*DescribeAccountAttributesInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeAccountAttributes")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeAccountAttributesInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeAddresses struct {
+}
+
+func (*awsEc2query_serializeOpDescribeAddresses) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeAddresses) 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.(*DescribeAddressesInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeAddresses")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeAddressesInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeAddressesAttribute struct {
+}
+
+func (*awsEc2query_serializeOpDescribeAddressesAttribute) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeAddressesAttribute) 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.(*DescribeAddressesAttributeInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeAddressesAttribute")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeAddressesAttributeInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeAggregateIdFormat struct {
+}
+
+func (*awsEc2query_serializeOpDescribeAggregateIdFormat) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeAggregateIdFormat) 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.(*DescribeAggregateIdFormatInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeAggregateIdFormat")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeAggregateIdFormatInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeAvailabilityZones struct {
+}
+
+func (*awsEc2query_serializeOpDescribeAvailabilityZones) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeAvailabilityZones) 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.(*DescribeAvailabilityZonesInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeAvailabilityZones")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeAvailabilityZonesInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeBundleTasks struct {
+}
+
+func (*awsEc2query_serializeOpDescribeBundleTasks) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeBundleTasks) 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.(*DescribeBundleTasksInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeBundleTasks")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeBundleTasksInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeByoipCidrs struct {
+}
+
+func (*awsEc2query_serializeOpDescribeByoipCidrs) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeByoipCidrs) 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.(*DescribeByoipCidrsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeByoipCidrs")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeByoipCidrsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeCapacityReservations struct {
+}
+
+func (*awsEc2query_serializeOpDescribeCapacityReservations) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeCapacityReservations) 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.(*DescribeCapacityReservationsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeCapacityReservations")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeCapacityReservationsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeCarrierGateways struct {
+}
+
+func (*awsEc2query_serializeOpDescribeCarrierGateways) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeCarrierGateways) 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.(*DescribeCarrierGatewaysInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeCarrierGateways")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeCarrierGatewaysInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeClassicLinkInstances struct {
+}
+
+func (*awsEc2query_serializeOpDescribeClassicLinkInstances) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeClassicLinkInstances) 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.(*DescribeClassicLinkInstancesInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeClassicLinkInstances")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeClassicLinkInstancesInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeClientVpnAuthorizationRules struct {
+}
+
+func (*awsEc2query_serializeOpDescribeClientVpnAuthorizationRules) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeClientVpnAuthorizationRules) 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.(*DescribeClientVpnAuthorizationRulesInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeClientVpnAuthorizationRules")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeClientVpnAuthorizationRulesInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeClientVpnConnections struct {
+}
+
+func (*awsEc2query_serializeOpDescribeClientVpnConnections) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeClientVpnConnections) 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.(*DescribeClientVpnConnectionsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeClientVpnConnections")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeClientVpnConnectionsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeClientVpnEndpoints struct {
+}
+
+func (*awsEc2query_serializeOpDescribeClientVpnEndpoints) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeClientVpnEndpoints) 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.(*DescribeClientVpnEndpointsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeClientVpnEndpoints")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeClientVpnEndpointsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeClientVpnRoutes struct {
+}
+
+func (*awsEc2query_serializeOpDescribeClientVpnRoutes) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeClientVpnRoutes) 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.(*DescribeClientVpnRoutesInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeClientVpnRoutes")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeClientVpnRoutesInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeClientVpnTargetNetworks struct {
+}
+
+func (*awsEc2query_serializeOpDescribeClientVpnTargetNetworks) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeClientVpnTargetNetworks) 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.(*DescribeClientVpnTargetNetworksInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeClientVpnTargetNetworks")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeClientVpnTargetNetworksInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeCoipPools struct {
+}
+
+func (*awsEc2query_serializeOpDescribeCoipPools) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeCoipPools) 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.(*DescribeCoipPoolsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeCoipPools")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeCoipPoolsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeConversionTasks struct {
+}
+
+func (*awsEc2query_serializeOpDescribeConversionTasks) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeConversionTasks) 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.(*DescribeConversionTasksInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeConversionTasks")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeConversionTasksInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeCustomerGateways struct {
+}
+
+func (*awsEc2query_serializeOpDescribeCustomerGateways) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeCustomerGateways) 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.(*DescribeCustomerGatewaysInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeCustomerGateways")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeCustomerGatewaysInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeDhcpOptions struct {
+}
+
+func (*awsEc2query_serializeOpDescribeDhcpOptions) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeDhcpOptions) 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.(*DescribeDhcpOptionsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeDhcpOptions")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeDhcpOptionsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeEgressOnlyInternetGateways struct {
+}
+
+func (*awsEc2query_serializeOpDescribeEgressOnlyInternetGateways) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeEgressOnlyInternetGateways) 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.(*DescribeEgressOnlyInternetGatewaysInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeEgressOnlyInternetGateways")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeEgressOnlyInternetGatewaysInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeElasticGpus struct {
+}
+
+func (*awsEc2query_serializeOpDescribeElasticGpus) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeElasticGpus) 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.(*DescribeElasticGpusInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeElasticGpus")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeElasticGpusInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeExportImageTasks struct {
+}
+
+func (*awsEc2query_serializeOpDescribeExportImageTasks) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeExportImageTasks) 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.(*DescribeExportImageTasksInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeExportImageTasks")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeExportImageTasksInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeExportTasks struct {
+}
+
+func (*awsEc2query_serializeOpDescribeExportTasks) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeExportTasks) 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.(*DescribeExportTasksInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeExportTasks")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeExportTasksInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeFastSnapshotRestores struct {
+}
+
+func (*awsEc2query_serializeOpDescribeFastSnapshotRestores) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeFastSnapshotRestores) 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.(*DescribeFastSnapshotRestoresInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeFastSnapshotRestores")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeFastSnapshotRestoresInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeFleetHistory struct {
+}
+
+func (*awsEc2query_serializeOpDescribeFleetHistory) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeFleetHistory) 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.(*DescribeFleetHistoryInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeFleetHistory")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeFleetHistoryInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeFleetInstances struct {
+}
+
+func (*awsEc2query_serializeOpDescribeFleetInstances) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeFleetInstances) 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.(*DescribeFleetInstancesInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeFleetInstances")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeFleetInstancesInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeFleets struct {
+}
+
+func (*awsEc2query_serializeOpDescribeFleets) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeFleets) 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.(*DescribeFleetsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeFleets")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeFleetsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeFlowLogs struct {
+}
+
+func (*awsEc2query_serializeOpDescribeFlowLogs) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeFlowLogs) 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.(*DescribeFlowLogsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeFlowLogs")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeFlowLogsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeFpgaImageAttribute struct {
+}
+
+func (*awsEc2query_serializeOpDescribeFpgaImageAttribute) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeFpgaImageAttribute) 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.(*DescribeFpgaImageAttributeInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeFpgaImageAttribute")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeFpgaImageAttributeInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeFpgaImages struct {
+}
+
+func (*awsEc2query_serializeOpDescribeFpgaImages) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeFpgaImages) 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.(*DescribeFpgaImagesInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeFpgaImages")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeFpgaImagesInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeHostReservationOfferings struct {
+}
+
+func (*awsEc2query_serializeOpDescribeHostReservationOfferings) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeHostReservationOfferings) 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.(*DescribeHostReservationOfferingsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeHostReservationOfferings")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeHostReservationOfferingsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeHostReservations struct {
+}
+
+func (*awsEc2query_serializeOpDescribeHostReservations) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeHostReservations) 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.(*DescribeHostReservationsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeHostReservations")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeHostReservationsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeHosts struct {
+}
+
+func (*awsEc2query_serializeOpDescribeHosts) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeHosts) 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.(*DescribeHostsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeHosts")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeHostsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeIamInstanceProfileAssociations struct {
+}
+
+func (*awsEc2query_serializeOpDescribeIamInstanceProfileAssociations) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeIamInstanceProfileAssociations) 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.(*DescribeIamInstanceProfileAssociationsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeIamInstanceProfileAssociations")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeIamInstanceProfileAssociationsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeIdentityIdFormat struct {
+}
+
+func (*awsEc2query_serializeOpDescribeIdentityIdFormat) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeIdentityIdFormat) 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.(*DescribeIdentityIdFormatInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeIdentityIdFormat")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeIdentityIdFormatInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeIdFormat struct {
+}
+
+func (*awsEc2query_serializeOpDescribeIdFormat) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeIdFormat) 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.(*DescribeIdFormatInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeIdFormat")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeIdFormatInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeImageAttribute struct {
+}
+
+func (*awsEc2query_serializeOpDescribeImageAttribute) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeImageAttribute) 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.(*DescribeImageAttributeInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeImageAttribute")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeImageAttributeInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeImages struct {
+}
+
+func (*awsEc2query_serializeOpDescribeImages) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeImages) 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.(*DescribeImagesInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeImages")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeImagesInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeImportImageTasks struct {
+}
+
+func (*awsEc2query_serializeOpDescribeImportImageTasks) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeImportImageTasks) 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.(*DescribeImportImageTasksInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeImportImageTasks")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeImportImageTasksInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeImportSnapshotTasks struct {
+}
+
+func (*awsEc2query_serializeOpDescribeImportSnapshotTasks) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeImportSnapshotTasks) 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.(*DescribeImportSnapshotTasksInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeImportSnapshotTasks")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeImportSnapshotTasksInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeInstanceAttribute struct {
+}
+
+func (*awsEc2query_serializeOpDescribeInstanceAttribute) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeInstanceAttribute) 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.(*DescribeInstanceAttributeInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeInstanceAttribute")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeInstanceAttributeInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeInstanceCreditSpecifications struct {
+}
+
+func (*awsEc2query_serializeOpDescribeInstanceCreditSpecifications) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeInstanceCreditSpecifications) 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.(*DescribeInstanceCreditSpecificationsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeInstanceCreditSpecifications")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeInstanceCreditSpecificationsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeInstanceEventNotificationAttributes struct {
+}
+
+func (*awsEc2query_serializeOpDescribeInstanceEventNotificationAttributes) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeInstanceEventNotificationAttributes) 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.(*DescribeInstanceEventNotificationAttributesInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeInstanceEventNotificationAttributes")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeInstanceEventNotificationAttributesInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeInstanceEventWindows struct {
+}
+
+func (*awsEc2query_serializeOpDescribeInstanceEventWindows) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeInstanceEventWindows) 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.(*DescribeInstanceEventWindowsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeInstanceEventWindows")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeInstanceEventWindowsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeInstances struct {
+}
+
+func (*awsEc2query_serializeOpDescribeInstances) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeInstances) 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.(*DescribeInstancesInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeInstances")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeInstancesInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeInstanceStatus struct {
+}
+
+func (*awsEc2query_serializeOpDescribeInstanceStatus) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeInstanceStatus) 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.(*DescribeInstanceStatusInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeInstanceStatus")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeInstanceStatusInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeInstanceTypeOfferings struct {
+}
+
+func (*awsEc2query_serializeOpDescribeInstanceTypeOfferings) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeInstanceTypeOfferings) 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.(*DescribeInstanceTypeOfferingsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeInstanceTypeOfferings")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeInstanceTypeOfferingsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeInstanceTypes struct {
+}
+
+func (*awsEc2query_serializeOpDescribeInstanceTypes) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeInstanceTypes) 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.(*DescribeInstanceTypesInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeInstanceTypes")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeInstanceTypesInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeInternetGateways struct {
+}
+
+func (*awsEc2query_serializeOpDescribeInternetGateways) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeInternetGateways) 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.(*DescribeInternetGatewaysInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeInternetGateways")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeInternetGatewaysInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeIpv6Pools struct {
+}
+
+func (*awsEc2query_serializeOpDescribeIpv6Pools) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeIpv6Pools) 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.(*DescribeIpv6PoolsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeIpv6Pools")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeIpv6PoolsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeKeyPairs struct {
+}
+
+func (*awsEc2query_serializeOpDescribeKeyPairs) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeKeyPairs) 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.(*DescribeKeyPairsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeKeyPairs")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeKeyPairsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeLaunchTemplates struct {
+}
+
+func (*awsEc2query_serializeOpDescribeLaunchTemplates) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeLaunchTemplates) 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.(*DescribeLaunchTemplatesInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeLaunchTemplates")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeLaunchTemplatesInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeLaunchTemplateVersions struct {
+}
+
+func (*awsEc2query_serializeOpDescribeLaunchTemplateVersions) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeLaunchTemplateVersions) 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.(*DescribeLaunchTemplateVersionsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeLaunchTemplateVersions")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeLaunchTemplateVersionsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeLocalGatewayRouteTables struct {
+}
+
+func (*awsEc2query_serializeOpDescribeLocalGatewayRouteTables) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeLocalGatewayRouteTables) 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.(*DescribeLocalGatewayRouteTablesInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeLocalGatewayRouteTables")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeLocalGatewayRouteTablesInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociations struct {
+}
+
+func (*awsEc2query_serializeOpDescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociations) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociations) 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.(*DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociations")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeLocalGatewayRouteTableVpcAssociations struct {
+}
+
+func (*awsEc2query_serializeOpDescribeLocalGatewayRouteTableVpcAssociations) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeLocalGatewayRouteTableVpcAssociations) 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.(*DescribeLocalGatewayRouteTableVpcAssociationsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeLocalGatewayRouteTableVpcAssociations")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeLocalGatewayRouteTableVpcAssociationsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeLocalGateways struct {
+}
+
+func (*awsEc2query_serializeOpDescribeLocalGateways) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeLocalGateways) 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.(*DescribeLocalGatewaysInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeLocalGateways")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeLocalGatewaysInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeLocalGatewayVirtualInterfaceGroups struct {
+}
+
+func (*awsEc2query_serializeOpDescribeLocalGatewayVirtualInterfaceGroups) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeLocalGatewayVirtualInterfaceGroups) 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.(*DescribeLocalGatewayVirtualInterfaceGroupsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeLocalGatewayVirtualInterfaceGroups")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeLocalGatewayVirtualInterfaceGroupsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeLocalGatewayVirtualInterfaces struct {
+}
+
+func (*awsEc2query_serializeOpDescribeLocalGatewayVirtualInterfaces) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeLocalGatewayVirtualInterfaces) 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.(*DescribeLocalGatewayVirtualInterfacesInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeLocalGatewayVirtualInterfaces")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeLocalGatewayVirtualInterfacesInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeManagedPrefixLists struct {
+}
+
+func (*awsEc2query_serializeOpDescribeManagedPrefixLists) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeManagedPrefixLists) 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.(*DescribeManagedPrefixListsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeManagedPrefixLists")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeManagedPrefixListsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeMovingAddresses struct {
+}
+
+func (*awsEc2query_serializeOpDescribeMovingAddresses) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeMovingAddresses) 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.(*DescribeMovingAddressesInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeMovingAddresses")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeMovingAddressesInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeNatGateways struct {
+}
+
+func (*awsEc2query_serializeOpDescribeNatGateways) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeNatGateways) 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.(*DescribeNatGatewaysInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeNatGateways")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeNatGatewaysInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeNetworkAcls struct {
+}
+
+func (*awsEc2query_serializeOpDescribeNetworkAcls) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeNetworkAcls) 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.(*DescribeNetworkAclsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeNetworkAcls")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeNetworkAclsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeNetworkInsightsAnalyses struct {
+}
+
+func (*awsEc2query_serializeOpDescribeNetworkInsightsAnalyses) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeNetworkInsightsAnalyses) 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.(*DescribeNetworkInsightsAnalysesInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeNetworkInsightsAnalyses")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeNetworkInsightsAnalysesInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeNetworkInsightsPaths struct {
+}
+
+func (*awsEc2query_serializeOpDescribeNetworkInsightsPaths) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeNetworkInsightsPaths) 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.(*DescribeNetworkInsightsPathsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeNetworkInsightsPaths")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeNetworkInsightsPathsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeNetworkInterfaceAttribute struct {
+}
+
+func (*awsEc2query_serializeOpDescribeNetworkInterfaceAttribute) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeNetworkInterfaceAttribute) 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.(*DescribeNetworkInterfaceAttributeInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeNetworkInterfaceAttribute")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeNetworkInterfaceAttributeInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeNetworkInterfacePermissions struct {
+}
+
+func (*awsEc2query_serializeOpDescribeNetworkInterfacePermissions) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeNetworkInterfacePermissions) 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.(*DescribeNetworkInterfacePermissionsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeNetworkInterfacePermissions")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeNetworkInterfacePermissionsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeNetworkInterfaces struct {
+}
+
+func (*awsEc2query_serializeOpDescribeNetworkInterfaces) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeNetworkInterfaces) 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.(*DescribeNetworkInterfacesInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeNetworkInterfaces")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeNetworkInterfacesInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribePlacementGroups struct {
+}
+
+func (*awsEc2query_serializeOpDescribePlacementGroups) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribePlacementGroups) 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.(*DescribePlacementGroupsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribePlacementGroups")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribePlacementGroupsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribePrefixLists struct {
+}
+
+func (*awsEc2query_serializeOpDescribePrefixLists) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribePrefixLists) 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.(*DescribePrefixListsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribePrefixLists")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribePrefixListsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribePrincipalIdFormat struct {
+}
+
+func (*awsEc2query_serializeOpDescribePrincipalIdFormat) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribePrincipalIdFormat) 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.(*DescribePrincipalIdFormatInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribePrincipalIdFormat")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribePrincipalIdFormatInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribePublicIpv4Pools struct {
+}
+
+func (*awsEc2query_serializeOpDescribePublicIpv4Pools) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribePublicIpv4Pools) 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.(*DescribePublicIpv4PoolsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribePublicIpv4Pools")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribePublicIpv4PoolsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeRegions struct {
+}
+
+func (*awsEc2query_serializeOpDescribeRegions) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeRegions) 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.(*DescribeRegionsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeRegions")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeRegionsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeReplaceRootVolumeTasks struct {
+}
+
+func (*awsEc2query_serializeOpDescribeReplaceRootVolumeTasks) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeReplaceRootVolumeTasks) 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.(*DescribeReplaceRootVolumeTasksInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeReplaceRootVolumeTasks")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeReplaceRootVolumeTasksInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeReservedInstances struct {
+}
+
+func (*awsEc2query_serializeOpDescribeReservedInstances) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeReservedInstances) 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.(*DescribeReservedInstancesInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeReservedInstances")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeReservedInstancesInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeReservedInstancesListings struct {
+}
+
+func (*awsEc2query_serializeOpDescribeReservedInstancesListings) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeReservedInstancesListings) 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.(*DescribeReservedInstancesListingsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeReservedInstancesListings")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeReservedInstancesListingsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeReservedInstancesModifications struct {
+}
+
+func (*awsEc2query_serializeOpDescribeReservedInstancesModifications) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeReservedInstancesModifications) 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.(*DescribeReservedInstancesModificationsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeReservedInstancesModifications")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeReservedInstancesModificationsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeReservedInstancesOfferings struct {
+}
+
+func (*awsEc2query_serializeOpDescribeReservedInstancesOfferings) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeReservedInstancesOfferings) 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.(*DescribeReservedInstancesOfferingsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeReservedInstancesOfferings")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeReservedInstancesOfferingsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeRouteTables struct {
+}
+
+func (*awsEc2query_serializeOpDescribeRouteTables) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeRouteTables) 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.(*DescribeRouteTablesInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeRouteTables")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeRouteTablesInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeScheduledInstanceAvailability struct {
+}
+
+func (*awsEc2query_serializeOpDescribeScheduledInstanceAvailability) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeScheduledInstanceAvailability) 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.(*DescribeScheduledInstanceAvailabilityInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeScheduledInstanceAvailability")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeScheduledInstanceAvailabilityInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeScheduledInstances struct {
+}
+
+func (*awsEc2query_serializeOpDescribeScheduledInstances) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeScheduledInstances) 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.(*DescribeScheduledInstancesInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeScheduledInstances")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeScheduledInstancesInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeSecurityGroupReferences struct {
+}
+
+func (*awsEc2query_serializeOpDescribeSecurityGroupReferences) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeSecurityGroupReferences) 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.(*DescribeSecurityGroupReferencesInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeSecurityGroupReferences")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeSecurityGroupReferencesInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeSecurityGroupRules struct {
+}
+
+func (*awsEc2query_serializeOpDescribeSecurityGroupRules) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeSecurityGroupRules) 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.(*DescribeSecurityGroupRulesInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeSecurityGroupRules")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeSecurityGroupRulesInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeSecurityGroups struct {
+}
+
+func (*awsEc2query_serializeOpDescribeSecurityGroups) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeSecurityGroups) 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.(*DescribeSecurityGroupsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeSecurityGroups")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeSecurityGroupsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeSnapshotAttribute struct {
+}
+
+func (*awsEc2query_serializeOpDescribeSnapshotAttribute) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeSnapshotAttribute) 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.(*DescribeSnapshotAttributeInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeSnapshotAttribute")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeSnapshotAttributeInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeSnapshots struct {
+}
+
+func (*awsEc2query_serializeOpDescribeSnapshots) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeSnapshots) 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.(*DescribeSnapshotsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeSnapshots")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeSnapshotsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeSpotDatafeedSubscription struct {
+}
+
+func (*awsEc2query_serializeOpDescribeSpotDatafeedSubscription) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeSpotDatafeedSubscription) 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.(*DescribeSpotDatafeedSubscriptionInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeSpotDatafeedSubscription")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeSpotDatafeedSubscriptionInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeSpotFleetInstances struct {
+}
+
+func (*awsEc2query_serializeOpDescribeSpotFleetInstances) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeSpotFleetInstances) 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.(*DescribeSpotFleetInstancesInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeSpotFleetInstances")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeSpotFleetInstancesInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeSpotFleetRequestHistory struct {
+}
+
+func (*awsEc2query_serializeOpDescribeSpotFleetRequestHistory) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeSpotFleetRequestHistory) 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.(*DescribeSpotFleetRequestHistoryInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeSpotFleetRequestHistory")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeSpotFleetRequestHistoryInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeSpotFleetRequests struct {
+}
+
+func (*awsEc2query_serializeOpDescribeSpotFleetRequests) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeSpotFleetRequests) 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.(*DescribeSpotFleetRequestsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeSpotFleetRequests")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeSpotFleetRequestsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeSpotInstanceRequests struct {
+}
+
+func (*awsEc2query_serializeOpDescribeSpotInstanceRequests) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeSpotInstanceRequests) 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.(*DescribeSpotInstanceRequestsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeSpotInstanceRequests")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeSpotInstanceRequestsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeSpotPriceHistory struct {
+}
+
+func (*awsEc2query_serializeOpDescribeSpotPriceHistory) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeSpotPriceHistory) 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.(*DescribeSpotPriceHistoryInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeSpotPriceHistory")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeSpotPriceHistoryInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeStaleSecurityGroups struct {
+}
+
+func (*awsEc2query_serializeOpDescribeStaleSecurityGroups) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeStaleSecurityGroups) 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.(*DescribeStaleSecurityGroupsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeStaleSecurityGroups")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeStaleSecurityGroupsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeStoreImageTasks struct {
+}
+
+func (*awsEc2query_serializeOpDescribeStoreImageTasks) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeStoreImageTasks) 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.(*DescribeStoreImageTasksInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeStoreImageTasks")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeStoreImageTasksInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeSubnets struct {
+}
+
+func (*awsEc2query_serializeOpDescribeSubnets) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeSubnets) 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.(*DescribeSubnetsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeSubnets")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeSubnetsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeTags struct {
+}
+
+func (*awsEc2query_serializeOpDescribeTags) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeTags) 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.(*DescribeTagsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeTags")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeTagsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeTrafficMirrorFilters struct {
+}
+
+func (*awsEc2query_serializeOpDescribeTrafficMirrorFilters) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeTrafficMirrorFilters) 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.(*DescribeTrafficMirrorFiltersInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeTrafficMirrorFilters")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeTrafficMirrorFiltersInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeTrafficMirrorSessions struct {
+}
+
+func (*awsEc2query_serializeOpDescribeTrafficMirrorSessions) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeTrafficMirrorSessions) 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.(*DescribeTrafficMirrorSessionsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeTrafficMirrorSessions")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeTrafficMirrorSessionsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeTrafficMirrorTargets struct {
+}
+
+func (*awsEc2query_serializeOpDescribeTrafficMirrorTargets) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeTrafficMirrorTargets) 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.(*DescribeTrafficMirrorTargetsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeTrafficMirrorTargets")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeTrafficMirrorTargetsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeTransitGatewayAttachments struct {
+}
+
+func (*awsEc2query_serializeOpDescribeTransitGatewayAttachments) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeTransitGatewayAttachments) 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.(*DescribeTransitGatewayAttachmentsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeTransitGatewayAttachments")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeTransitGatewayAttachmentsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeTransitGatewayConnectPeers struct {
+}
+
+func (*awsEc2query_serializeOpDescribeTransitGatewayConnectPeers) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeTransitGatewayConnectPeers) 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.(*DescribeTransitGatewayConnectPeersInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeTransitGatewayConnectPeers")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeTransitGatewayConnectPeersInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeTransitGatewayConnects struct {
+}
+
+func (*awsEc2query_serializeOpDescribeTransitGatewayConnects) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeTransitGatewayConnects) 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.(*DescribeTransitGatewayConnectsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeTransitGatewayConnects")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeTransitGatewayConnectsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeTransitGatewayMulticastDomains struct {
+}
+
+func (*awsEc2query_serializeOpDescribeTransitGatewayMulticastDomains) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeTransitGatewayMulticastDomains) 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.(*DescribeTransitGatewayMulticastDomainsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeTransitGatewayMulticastDomains")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeTransitGatewayMulticastDomainsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeTransitGatewayPeeringAttachments struct {
+}
+
+func (*awsEc2query_serializeOpDescribeTransitGatewayPeeringAttachments) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeTransitGatewayPeeringAttachments) 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.(*DescribeTransitGatewayPeeringAttachmentsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeTransitGatewayPeeringAttachments")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeTransitGatewayPeeringAttachmentsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeTransitGatewayRouteTables struct {
+}
+
+func (*awsEc2query_serializeOpDescribeTransitGatewayRouteTables) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeTransitGatewayRouteTables) 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.(*DescribeTransitGatewayRouteTablesInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeTransitGatewayRouteTables")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeTransitGatewayRouteTablesInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeTransitGateways struct {
+}
+
+func (*awsEc2query_serializeOpDescribeTransitGateways) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeTransitGateways) 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.(*DescribeTransitGatewaysInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeTransitGateways")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeTransitGatewaysInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeTransitGatewayVpcAttachments struct {
+}
+
+func (*awsEc2query_serializeOpDescribeTransitGatewayVpcAttachments) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeTransitGatewayVpcAttachments) 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.(*DescribeTransitGatewayVpcAttachmentsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeTransitGatewayVpcAttachments")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeTransitGatewayVpcAttachmentsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeTrunkInterfaceAssociations struct {
+}
+
+func (*awsEc2query_serializeOpDescribeTrunkInterfaceAssociations) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeTrunkInterfaceAssociations) 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.(*DescribeTrunkInterfaceAssociationsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeTrunkInterfaceAssociations")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeTrunkInterfaceAssociationsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeVolumeAttribute struct {
+}
+
+func (*awsEc2query_serializeOpDescribeVolumeAttribute) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeVolumeAttribute) 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.(*DescribeVolumeAttributeInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeVolumeAttribute")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeVolumeAttributeInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeVolumes struct {
+}
+
+func (*awsEc2query_serializeOpDescribeVolumes) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeVolumes) 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.(*DescribeVolumesInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeVolumes")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeVolumesInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeVolumesModifications struct {
+}
+
+func (*awsEc2query_serializeOpDescribeVolumesModifications) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeVolumesModifications) 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.(*DescribeVolumesModificationsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeVolumesModifications")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeVolumesModificationsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeVolumeStatus struct {
+}
+
+func (*awsEc2query_serializeOpDescribeVolumeStatus) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeVolumeStatus) 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.(*DescribeVolumeStatusInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeVolumeStatus")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeVolumeStatusInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeVpcAttribute struct {
+}
+
+func (*awsEc2query_serializeOpDescribeVpcAttribute) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeVpcAttribute) 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.(*DescribeVpcAttributeInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeVpcAttribute")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeVpcAttributeInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeVpcClassicLink struct {
+}
+
+func (*awsEc2query_serializeOpDescribeVpcClassicLink) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeVpcClassicLink) 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.(*DescribeVpcClassicLinkInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeVpcClassicLink")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeVpcClassicLinkInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeVpcClassicLinkDnsSupport struct {
+}
+
+func (*awsEc2query_serializeOpDescribeVpcClassicLinkDnsSupport) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeVpcClassicLinkDnsSupport) 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.(*DescribeVpcClassicLinkDnsSupportInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeVpcClassicLinkDnsSupport")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeVpcClassicLinkDnsSupportInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeVpcEndpointConnectionNotifications struct {
+}
+
+func (*awsEc2query_serializeOpDescribeVpcEndpointConnectionNotifications) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeVpcEndpointConnectionNotifications) 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.(*DescribeVpcEndpointConnectionNotificationsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeVpcEndpointConnectionNotifications")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeVpcEndpointConnectionNotificationsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeVpcEndpointConnections struct {
+}
+
+func (*awsEc2query_serializeOpDescribeVpcEndpointConnections) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeVpcEndpointConnections) 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.(*DescribeVpcEndpointConnectionsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeVpcEndpointConnections")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeVpcEndpointConnectionsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeVpcEndpoints struct {
+}
+
+func (*awsEc2query_serializeOpDescribeVpcEndpoints) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeVpcEndpoints) 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.(*DescribeVpcEndpointsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeVpcEndpoints")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeVpcEndpointsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeVpcEndpointServiceConfigurations struct {
+}
+
+func (*awsEc2query_serializeOpDescribeVpcEndpointServiceConfigurations) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeVpcEndpointServiceConfigurations) 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.(*DescribeVpcEndpointServiceConfigurationsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeVpcEndpointServiceConfigurations")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeVpcEndpointServiceConfigurationsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeVpcEndpointServicePermissions struct {
+}
+
+func (*awsEc2query_serializeOpDescribeVpcEndpointServicePermissions) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeVpcEndpointServicePermissions) 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.(*DescribeVpcEndpointServicePermissionsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeVpcEndpointServicePermissions")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeVpcEndpointServicePermissionsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeVpcEndpointServices struct {
+}
+
+func (*awsEc2query_serializeOpDescribeVpcEndpointServices) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeVpcEndpointServices) 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.(*DescribeVpcEndpointServicesInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeVpcEndpointServices")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeVpcEndpointServicesInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeVpcPeeringConnections struct {
+}
+
+func (*awsEc2query_serializeOpDescribeVpcPeeringConnections) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeVpcPeeringConnections) 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.(*DescribeVpcPeeringConnectionsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeVpcPeeringConnections")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeVpcPeeringConnectionsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeVpcs struct {
+}
+
+func (*awsEc2query_serializeOpDescribeVpcs) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeVpcs) 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.(*DescribeVpcsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeVpcs")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeVpcsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeVpnConnections struct {
+}
+
+func (*awsEc2query_serializeOpDescribeVpnConnections) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeVpnConnections) 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.(*DescribeVpnConnectionsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeVpnConnections")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeVpnConnectionsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDescribeVpnGateways struct {
+}
+
+func (*awsEc2query_serializeOpDescribeVpnGateways) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDescribeVpnGateways) 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.(*DescribeVpnGatewaysInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DescribeVpnGateways")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDescribeVpnGatewaysInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDetachClassicLinkVpc struct {
+}
+
+func (*awsEc2query_serializeOpDetachClassicLinkVpc) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDetachClassicLinkVpc) 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.(*DetachClassicLinkVpcInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DetachClassicLinkVpc")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDetachClassicLinkVpcInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDetachInternetGateway struct {
+}
+
+func (*awsEc2query_serializeOpDetachInternetGateway) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDetachInternetGateway) 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.(*DetachInternetGatewayInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DetachInternetGateway")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDetachInternetGatewayInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDetachNetworkInterface struct {
+}
+
+func (*awsEc2query_serializeOpDetachNetworkInterface) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDetachNetworkInterface) 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.(*DetachNetworkInterfaceInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DetachNetworkInterface")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDetachNetworkInterfaceInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDetachVolume struct {
+}
+
+func (*awsEc2query_serializeOpDetachVolume) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDetachVolume) 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.(*DetachVolumeInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DetachVolume")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDetachVolumeInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDetachVpnGateway struct {
+}
+
+func (*awsEc2query_serializeOpDetachVpnGateway) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDetachVpnGateway) 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.(*DetachVpnGatewayInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DetachVpnGateway")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDetachVpnGatewayInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDisableEbsEncryptionByDefault struct {
+}
+
+func (*awsEc2query_serializeOpDisableEbsEncryptionByDefault) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDisableEbsEncryptionByDefault) 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.(*DisableEbsEncryptionByDefaultInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DisableEbsEncryptionByDefault")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDisableEbsEncryptionByDefaultInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDisableFastSnapshotRestores struct {
+}
+
+func (*awsEc2query_serializeOpDisableFastSnapshotRestores) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDisableFastSnapshotRestores) 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.(*DisableFastSnapshotRestoresInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DisableFastSnapshotRestores")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDisableFastSnapshotRestoresInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDisableImageDeprecation struct {
+}
+
+func (*awsEc2query_serializeOpDisableImageDeprecation) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDisableImageDeprecation) 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.(*DisableImageDeprecationInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DisableImageDeprecation")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDisableImageDeprecationInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDisableSerialConsoleAccess struct {
+}
+
+func (*awsEc2query_serializeOpDisableSerialConsoleAccess) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDisableSerialConsoleAccess) 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.(*DisableSerialConsoleAccessInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DisableSerialConsoleAccess")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDisableSerialConsoleAccessInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDisableTransitGatewayRouteTablePropagation struct {
+}
+
+func (*awsEc2query_serializeOpDisableTransitGatewayRouteTablePropagation) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDisableTransitGatewayRouteTablePropagation) 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.(*DisableTransitGatewayRouteTablePropagationInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DisableTransitGatewayRouteTablePropagation")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDisableTransitGatewayRouteTablePropagationInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDisableVgwRoutePropagation struct {
+}
+
+func (*awsEc2query_serializeOpDisableVgwRoutePropagation) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDisableVgwRoutePropagation) 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.(*DisableVgwRoutePropagationInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DisableVgwRoutePropagation")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDisableVgwRoutePropagationInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDisableVpcClassicLink struct {
+}
+
+func (*awsEc2query_serializeOpDisableVpcClassicLink) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDisableVpcClassicLink) 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.(*DisableVpcClassicLinkInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DisableVpcClassicLink")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDisableVpcClassicLinkInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDisableVpcClassicLinkDnsSupport struct {
+}
+
+func (*awsEc2query_serializeOpDisableVpcClassicLinkDnsSupport) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDisableVpcClassicLinkDnsSupport) 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.(*DisableVpcClassicLinkDnsSupportInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DisableVpcClassicLinkDnsSupport")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDisableVpcClassicLinkDnsSupportInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDisassociateAddress struct {
+}
+
+func (*awsEc2query_serializeOpDisassociateAddress) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDisassociateAddress) 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.(*DisassociateAddressInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DisassociateAddress")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDisassociateAddressInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDisassociateClientVpnTargetNetwork struct {
+}
+
+func (*awsEc2query_serializeOpDisassociateClientVpnTargetNetwork) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDisassociateClientVpnTargetNetwork) 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.(*DisassociateClientVpnTargetNetworkInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DisassociateClientVpnTargetNetwork")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDisassociateClientVpnTargetNetworkInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDisassociateEnclaveCertificateIamRole struct {
+}
+
+func (*awsEc2query_serializeOpDisassociateEnclaveCertificateIamRole) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDisassociateEnclaveCertificateIamRole) 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.(*DisassociateEnclaveCertificateIamRoleInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DisassociateEnclaveCertificateIamRole")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDisassociateEnclaveCertificateIamRoleInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDisassociateIamInstanceProfile struct {
+}
+
+func (*awsEc2query_serializeOpDisassociateIamInstanceProfile) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDisassociateIamInstanceProfile) 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.(*DisassociateIamInstanceProfileInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DisassociateIamInstanceProfile")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDisassociateIamInstanceProfileInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDisassociateInstanceEventWindow struct {
+}
+
+func (*awsEc2query_serializeOpDisassociateInstanceEventWindow) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDisassociateInstanceEventWindow) 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.(*DisassociateInstanceEventWindowInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DisassociateInstanceEventWindow")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDisassociateInstanceEventWindowInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDisassociateRouteTable struct {
+}
+
+func (*awsEc2query_serializeOpDisassociateRouteTable) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDisassociateRouteTable) 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.(*DisassociateRouteTableInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DisassociateRouteTable")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDisassociateRouteTableInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDisassociateSubnetCidrBlock struct {
+}
+
+func (*awsEc2query_serializeOpDisassociateSubnetCidrBlock) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDisassociateSubnetCidrBlock) 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.(*DisassociateSubnetCidrBlockInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DisassociateSubnetCidrBlock")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDisassociateSubnetCidrBlockInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDisassociateTransitGatewayMulticastDomain struct {
+}
+
+func (*awsEc2query_serializeOpDisassociateTransitGatewayMulticastDomain) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDisassociateTransitGatewayMulticastDomain) 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.(*DisassociateTransitGatewayMulticastDomainInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DisassociateTransitGatewayMulticastDomain")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDisassociateTransitGatewayMulticastDomainInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDisassociateTransitGatewayRouteTable struct {
+}
+
+func (*awsEc2query_serializeOpDisassociateTransitGatewayRouteTable) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDisassociateTransitGatewayRouteTable) 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.(*DisassociateTransitGatewayRouteTableInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DisassociateTransitGatewayRouteTable")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDisassociateTransitGatewayRouteTableInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDisassociateTrunkInterface struct {
+}
+
+func (*awsEc2query_serializeOpDisassociateTrunkInterface) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDisassociateTrunkInterface) 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.(*DisassociateTrunkInterfaceInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DisassociateTrunkInterface")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDisassociateTrunkInterfaceInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpDisassociateVpcCidrBlock struct {
+}
+
+func (*awsEc2query_serializeOpDisassociateVpcCidrBlock) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpDisassociateVpcCidrBlock) 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.(*DisassociateVpcCidrBlockInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DisassociateVpcCidrBlock")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentDisassociateVpcCidrBlockInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpEnableEbsEncryptionByDefault struct {
+}
+
+func (*awsEc2query_serializeOpEnableEbsEncryptionByDefault) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpEnableEbsEncryptionByDefault) 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.(*EnableEbsEncryptionByDefaultInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("EnableEbsEncryptionByDefault")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentEnableEbsEncryptionByDefaultInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpEnableFastSnapshotRestores struct {
+}
+
+func (*awsEc2query_serializeOpEnableFastSnapshotRestores) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpEnableFastSnapshotRestores) 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.(*EnableFastSnapshotRestoresInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("EnableFastSnapshotRestores")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentEnableFastSnapshotRestoresInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpEnableImageDeprecation struct {
+}
+
+func (*awsEc2query_serializeOpEnableImageDeprecation) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpEnableImageDeprecation) 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.(*EnableImageDeprecationInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("EnableImageDeprecation")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentEnableImageDeprecationInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpEnableSerialConsoleAccess struct {
+}
+
+func (*awsEc2query_serializeOpEnableSerialConsoleAccess) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpEnableSerialConsoleAccess) 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.(*EnableSerialConsoleAccessInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("EnableSerialConsoleAccess")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentEnableSerialConsoleAccessInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpEnableTransitGatewayRouteTablePropagation struct {
+}
+
+func (*awsEc2query_serializeOpEnableTransitGatewayRouteTablePropagation) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpEnableTransitGatewayRouteTablePropagation) 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.(*EnableTransitGatewayRouteTablePropagationInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("EnableTransitGatewayRouteTablePropagation")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentEnableTransitGatewayRouteTablePropagationInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpEnableVgwRoutePropagation struct {
+}
+
+func (*awsEc2query_serializeOpEnableVgwRoutePropagation) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpEnableVgwRoutePropagation) 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.(*EnableVgwRoutePropagationInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("EnableVgwRoutePropagation")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentEnableVgwRoutePropagationInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpEnableVolumeIO struct {
+}
+
+func (*awsEc2query_serializeOpEnableVolumeIO) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpEnableVolumeIO) 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.(*EnableVolumeIOInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("EnableVolumeIO")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentEnableVolumeIOInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpEnableVpcClassicLink struct {
+}
+
+func (*awsEc2query_serializeOpEnableVpcClassicLink) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpEnableVpcClassicLink) 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.(*EnableVpcClassicLinkInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("EnableVpcClassicLink")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentEnableVpcClassicLinkInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpEnableVpcClassicLinkDnsSupport struct {
+}
+
+func (*awsEc2query_serializeOpEnableVpcClassicLinkDnsSupport) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpEnableVpcClassicLinkDnsSupport) 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.(*EnableVpcClassicLinkDnsSupportInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("EnableVpcClassicLinkDnsSupport")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentEnableVpcClassicLinkDnsSupportInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpExportClientVpnClientCertificateRevocationList struct {
+}
+
+func (*awsEc2query_serializeOpExportClientVpnClientCertificateRevocationList) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpExportClientVpnClientCertificateRevocationList) 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.(*ExportClientVpnClientCertificateRevocationListInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("ExportClientVpnClientCertificateRevocationList")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentExportClientVpnClientCertificateRevocationListInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpExportClientVpnClientConfiguration struct {
+}
+
+func (*awsEc2query_serializeOpExportClientVpnClientConfiguration) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpExportClientVpnClientConfiguration) 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.(*ExportClientVpnClientConfigurationInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("ExportClientVpnClientConfiguration")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentExportClientVpnClientConfigurationInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpExportImage struct {
+}
+
+func (*awsEc2query_serializeOpExportImage) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpExportImage) 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.(*ExportImageInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("ExportImage")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentExportImageInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpExportTransitGatewayRoutes struct {
+}
+
+func (*awsEc2query_serializeOpExportTransitGatewayRoutes) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpExportTransitGatewayRoutes) 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.(*ExportTransitGatewayRoutesInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("ExportTransitGatewayRoutes")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentExportTransitGatewayRoutesInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpGetAssociatedEnclaveCertificateIamRoles struct {
+}
+
+func (*awsEc2query_serializeOpGetAssociatedEnclaveCertificateIamRoles) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpGetAssociatedEnclaveCertificateIamRoles) 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.(*GetAssociatedEnclaveCertificateIamRolesInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("GetAssociatedEnclaveCertificateIamRoles")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentGetAssociatedEnclaveCertificateIamRolesInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpGetAssociatedIpv6PoolCidrs struct {
+}
+
+func (*awsEc2query_serializeOpGetAssociatedIpv6PoolCidrs) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpGetAssociatedIpv6PoolCidrs) 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.(*GetAssociatedIpv6PoolCidrsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("GetAssociatedIpv6PoolCidrs")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentGetAssociatedIpv6PoolCidrsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpGetCapacityReservationUsage struct {
+}
+
+func (*awsEc2query_serializeOpGetCapacityReservationUsage) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpGetCapacityReservationUsage) 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.(*GetCapacityReservationUsageInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("GetCapacityReservationUsage")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentGetCapacityReservationUsageInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpGetCoipPoolUsage struct {
+}
+
+func (*awsEc2query_serializeOpGetCoipPoolUsage) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpGetCoipPoolUsage) 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.(*GetCoipPoolUsageInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("GetCoipPoolUsage")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentGetCoipPoolUsageInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpGetConsoleOutput struct {
+}
+
+func (*awsEc2query_serializeOpGetConsoleOutput) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpGetConsoleOutput) 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.(*GetConsoleOutputInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("GetConsoleOutput")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentGetConsoleOutputInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpGetConsoleScreenshot struct {
+}
+
+func (*awsEc2query_serializeOpGetConsoleScreenshot) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpGetConsoleScreenshot) 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.(*GetConsoleScreenshotInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("GetConsoleScreenshot")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentGetConsoleScreenshotInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpGetDefaultCreditSpecification struct {
+}
+
+func (*awsEc2query_serializeOpGetDefaultCreditSpecification) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpGetDefaultCreditSpecification) 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.(*GetDefaultCreditSpecificationInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("GetDefaultCreditSpecification")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentGetDefaultCreditSpecificationInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpGetEbsDefaultKmsKeyId struct {
+}
+
+func (*awsEc2query_serializeOpGetEbsDefaultKmsKeyId) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpGetEbsDefaultKmsKeyId) 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.(*GetEbsDefaultKmsKeyIdInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("GetEbsDefaultKmsKeyId")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentGetEbsDefaultKmsKeyIdInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpGetEbsEncryptionByDefault struct {
+}
+
+func (*awsEc2query_serializeOpGetEbsEncryptionByDefault) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpGetEbsEncryptionByDefault) 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.(*GetEbsEncryptionByDefaultInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("GetEbsEncryptionByDefault")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentGetEbsEncryptionByDefaultInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpGetFlowLogsIntegrationTemplate struct {
+}
+
+func (*awsEc2query_serializeOpGetFlowLogsIntegrationTemplate) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpGetFlowLogsIntegrationTemplate) 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.(*GetFlowLogsIntegrationTemplateInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("GetFlowLogsIntegrationTemplate")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentGetFlowLogsIntegrationTemplateInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpGetGroupsForCapacityReservation struct {
+}
+
+func (*awsEc2query_serializeOpGetGroupsForCapacityReservation) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpGetGroupsForCapacityReservation) 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.(*GetGroupsForCapacityReservationInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("GetGroupsForCapacityReservation")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentGetGroupsForCapacityReservationInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpGetHostReservationPurchasePreview struct {
+}
+
+func (*awsEc2query_serializeOpGetHostReservationPurchasePreview) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpGetHostReservationPurchasePreview) 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.(*GetHostReservationPurchasePreviewInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("GetHostReservationPurchasePreview")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentGetHostReservationPurchasePreviewInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpGetLaunchTemplateData struct {
+}
+
+func (*awsEc2query_serializeOpGetLaunchTemplateData) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpGetLaunchTemplateData) 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.(*GetLaunchTemplateDataInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("GetLaunchTemplateData")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentGetLaunchTemplateDataInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpGetManagedPrefixListAssociations struct {
+}
+
+func (*awsEc2query_serializeOpGetManagedPrefixListAssociations) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpGetManagedPrefixListAssociations) 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.(*GetManagedPrefixListAssociationsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("GetManagedPrefixListAssociations")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentGetManagedPrefixListAssociationsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpGetManagedPrefixListEntries struct {
+}
+
+func (*awsEc2query_serializeOpGetManagedPrefixListEntries) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpGetManagedPrefixListEntries) 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.(*GetManagedPrefixListEntriesInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("GetManagedPrefixListEntries")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentGetManagedPrefixListEntriesInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpGetPasswordData struct {
+}
+
+func (*awsEc2query_serializeOpGetPasswordData) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpGetPasswordData) 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.(*GetPasswordDataInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("GetPasswordData")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentGetPasswordDataInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpGetReservedInstancesExchangeQuote struct {
+}
+
+func (*awsEc2query_serializeOpGetReservedInstancesExchangeQuote) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpGetReservedInstancesExchangeQuote) 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.(*GetReservedInstancesExchangeQuoteInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("GetReservedInstancesExchangeQuote")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentGetReservedInstancesExchangeQuoteInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpGetSerialConsoleAccessStatus struct {
+}
+
+func (*awsEc2query_serializeOpGetSerialConsoleAccessStatus) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpGetSerialConsoleAccessStatus) 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.(*GetSerialConsoleAccessStatusInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("GetSerialConsoleAccessStatus")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentGetSerialConsoleAccessStatusInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpGetSubnetCidrReservations struct {
+}
+
+func (*awsEc2query_serializeOpGetSubnetCidrReservations) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpGetSubnetCidrReservations) 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.(*GetSubnetCidrReservationsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("GetSubnetCidrReservations")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentGetSubnetCidrReservationsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpGetTransitGatewayAttachmentPropagations struct {
+}
+
+func (*awsEc2query_serializeOpGetTransitGatewayAttachmentPropagations) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpGetTransitGatewayAttachmentPropagations) 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.(*GetTransitGatewayAttachmentPropagationsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("GetTransitGatewayAttachmentPropagations")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentGetTransitGatewayAttachmentPropagationsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpGetTransitGatewayMulticastDomainAssociations struct {
+}
+
+func (*awsEc2query_serializeOpGetTransitGatewayMulticastDomainAssociations) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpGetTransitGatewayMulticastDomainAssociations) 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.(*GetTransitGatewayMulticastDomainAssociationsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("GetTransitGatewayMulticastDomainAssociations")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentGetTransitGatewayMulticastDomainAssociationsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpGetTransitGatewayPrefixListReferences struct {
+}
+
+func (*awsEc2query_serializeOpGetTransitGatewayPrefixListReferences) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpGetTransitGatewayPrefixListReferences) 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.(*GetTransitGatewayPrefixListReferencesInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("GetTransitGatewayPrefixListReferences")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentGetTransitGatewayPrefixListReferencesInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpGetTransitGatewayRouteTableAssociations struct {
+}
+
+func (*awsEc2query_serializeOpGetTransitGatewayRouteTableAssociations) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpGetTransitGatewayRouteTableAssociations) 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.(*GetTransitGatewayRouteTableAssociationsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("GetTransitGatewayRouteTableAssociations")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentGetTransitGatewayRouteTableAssociationsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpGetTransitGatewayRouteTablePropagations struct {
+}
+
+func (*awsEc2query_serializeOpGetTransitGatewayRouteTablePropagations) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpGetTransitGatewayRouteTablePropagations) 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.(*GetTransitGatewayRouteTablePropagationsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("GetTransitGatewayRouteTablePropagations")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentGetTransitGatewayRouteTablePropagationsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpGetVpnConnectionDeviceSampleConfiguration struct {
+}
+
+func (*awsEc2query_serializeOpGetVpnConnectionDeviceSampleConfiguration) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpGetVpnConnectionDeviceSampleConfiguration) 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.(*GetVpnConnectionDeviceSampleConfigurationInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("GetVpnConnectionDeviceSampleConfiguration")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentGetVpnConnectionDeviceSampleConfigurationInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpGetVpnConnectionDeviceTypes struct {
+}
+
+func (*awsEc2query_serializeOpGetVpnConnectionDeviceTypes) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpGetVpnConnectionDeviceTypes) 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.(*GetVpnConnectionDeviceTypesInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("GetVpnConnectionDeviceTypes")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentGetVpnConnectionDeviceTypesInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpImportClientVpnClientCertificateRevocationList struct {
+}
+
+func (*awsEc2query_serializeOpImportClientVpnClientCertificateRevocationList) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpImportClientVpnClientCertificateRevocationList) 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.(*ImportClientVpnClientCertificateRevocationListInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("ImportClientVpnClientCertificateRevocationList")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentImportClientVpnClientCertificateRevocationListInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpImportImage struct {
+}
+
+func (*awsEc2query_serializeOpImportImage) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpImportImage) 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.(*ImportImageInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("ImportImage")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentImportImageInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpImportInstance struct {
+}
+
+func (*awsEc2query_serializeOpImportInstance) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpImportInstance) 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.(*ImportInstanceInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("ImportInstance")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentImportInstanceInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpImportKeyPair struct {
+}
+
+func (*awsEc2query_serializeOpImportKeyPair) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpImportKeyPair) 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.(*ImportKeyPairInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("ImportKeyPair")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentImportKeyPairInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpImportSnapshot struct {
+}
+
+func (*awsEc2query_serializeOpImportSnapshot) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpImportSnapshot) 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.(*ImportSnapshotInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("ImportSnapshot")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentImportSnapshotInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpImportVolume struct {
+}
+
+func (*awsEc2query_serializeOpImportVolume) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpImportVolume) 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.(*ImportVolumeInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("ImportVolume")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentImportVolumeInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpModifyAddressAttribute struct {
+}
+
+func (*awsEc2query_serializeOpModifyAddressAttribute) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpModifyAddressAttribute) 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.(*ModifyAddressAttributeInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("ModifyAddressAttribute")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentModifyAddressAttributeInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpModifyAvailabilityZoneGroup struct {
+}
+
+func (*awsEc2query_serializeOpModifyAvailabilityZoneGroup) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpModifyAvailabilityZoneGroup) 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.(*ModifyAvailabilityZoneGroupInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("ModifyAvailabilityZoneGroup")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentModifyAvailabilityZoneGroupInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpModifyCapacityReservation struct {
+}
+
+func (*awsEc2query_serializeOpModifyCapacityReservation) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpModifyCapacityReservation) 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.(*ModifyCapacityReservationInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("ModifyCapacityReservation")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentModifyCapacityReservationInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpModifyClientVpnEndpoint struct {
+}
+
+func (*awsEc2query_serializeOpModifyClientVpnEndpoint) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpModifyClientVpnEndpoint) 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.(*ModifyClientVpnEndpointInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("ModifyClientVpnEndpoint")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentModifyClientVpnEndpointInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpModifyDefaultCreditSpecification struct {
+}
+
+func (*awsEc2query_serializeOpModifyDefaultCreditSpecification) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpModifyDefaultCreditSpecification) 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.(*ModifyDefaultCreditSpecificationInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("ModifyDefaultCreditSpecification")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentModifyDefaultCreditSpecificationInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpModifyEbsDefaultKmsKeyId struct {
+}
+
+func (*awsEc2query_serializeOpModifyEbsDefaultKmsKeyId) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpModifyEbsDefaultKmsKeyId) 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.(*ModifyEbsDefaultKmsKeyIdInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("ModifyEbsDefaultKmsKeyId")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentModifyEbsDefaultKmsKeyIdInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpModifyFleet struct {
+}
+
+func (*awsEc2query_serializeOpModifyFleet) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpModifyFleet) 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.(*ModifyFleetInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("ModifyFleet")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentModifyFleetInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpModifyFpgaImageAttribute struct {
+}
+
+func (*awsEc2query_serializeOpModifyFpgaImageAttribute) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpModifyFpgaImageAttribute) 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.(*ModifyFpgaImageAttributeInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("ModifyFpgaImageAttribute")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentModifyFpgaImageAttributeInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpModifyHosts struct {
+}
+
+func (*awsEc2query_serializeOpModifyHosts) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpModifyHosts) 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.(*ModifyHostsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("ModifyHosts")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentModifyHostsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpModifyIdentityIdFormat struct {
+}
+
+func (*awsEc2query_serializeOpModifyIdentityIdFormat) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpModifyIdentityIdFormat) 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.(*ModifyIdentityIdFormatInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("ModifyIdentityIdFormat")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentModifyIdentityIdFormatInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpModifyIdFormat struct {
+}
+
+func (*awsEc2query_serializeOpModifyIdFormat) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpModifyIdFormat) 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.(*ModifyIdFormatInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("ModifyIdFormat")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentModifyIdFormatInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpModifyImageAttribute struct {
+}
+
+func (*awsEc2query_serializeOpModifyImageAttribute) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpModifyImageAttribute) 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.(*ModifyImageAttributeInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("ModifyImageAttribute")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentModifyImageAttributeInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpModifyInstanceAttribute struct {
+}
+
+func (*awsEc2query_serializeOpModifyInstanceAttribute) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpModifyInstanceAttribute) 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.(*ModifyInstanceAttributeInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("ModifyInstanceAttribute")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentModifyInstanceAttributeInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpModifyInstanceCapacityReservationAttributes struct {
+}
+
+func (*awsEc2query_serializeOpModifyInstanceCapacityReservationAttributes) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpModifyInstanceCapacityReservationAttributes) 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.(*ModifyInstanceCapacityReservationAttributesInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("ModifyInstanceCapacityReservationAttributes")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentModifyInstanceCapacityReservationAttributesInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpModifyInstanceCreditSpecification struct {
+}
+
+func (*awsEc2query_serializeOpModifyInstanceCreditSpecification) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpModifyInstanceCreditSpecification) 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.(*ModifyInstanceCreditSpecificationInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("ModifyInstanceCreditSpecification")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentModifyInstanceCreditSpecificationInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpModifyInstanceEventStartTime struct {
+}
+
+func (*awsEc2query_serializeOpModifyInstanceEventStartTime) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpModifyInstanceEventStartTime) 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.(*ModifyInstanceEventStartTimeInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("ModifyInstanceEventStartTime")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentModifyInstanceEventStartTimeInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpModifyInstanceEventWindow struct {
+}
+
+func (*awsEc2query_serializeOpModifyInstanceEventWindow) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpModifyInstanceEventWindow) 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.(*ModifyInstanceEventWindowInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("ModifyInstanceEventWindow")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentModifyInstanceEventWindowInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpModifyInstanceMetadataOptions struct {
+}
+
+func (*awsEc2query_serializeOpModifyInstanceMetadataOptions) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpModifyInstanceMetadataOptions) 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.(*ModifyInstanceMetadataOptionsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("ModifyInstanceMetadataOptions")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentModifyInstanceMetadataOptionsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpModifyInstancePlacement struct {
+}
+
+func (*awsEc2query_serializeOpModifyInstancePlacement) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpModifyInstancePlacement) 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.(*ModifyInstancePlacementInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("ModifyInstancePlacement")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentModifyInstancePlacementInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpModifyLaunchTemplate struct {
+}
+
+func (*awsEc2query_serializeOpModifyLaunchTemplate) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpModifyLaunchTemplate) 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.(*ModifyLaunchTemplateInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("ModifyLaunchTemplate")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentModifyLaunchTemplateInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpModifyManagedPrefixList struct {
+}
+
+func (*awsEc2query_serializeOpModifyManagedPrefixList) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpModifyManagedPrefixList) 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.(*ModifyManagedPrefixListInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("ModifyManagedPrefixList")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentModifyManagedPrefixListInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpModifyNetworkInterfaceAttribute struct {
+}
+
+func (*awsEc2query_serializeOpModifyNetworkInterfaceAttribute) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpModifyNetworkInterfaceAttribute) 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.(*ModifyNetworkInterfaceAttributeInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("ModifyNetworkInterfaceAttribute")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentModifyNetworkInterfaceAttributeInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpModifyReservedInstances struct {
+}
+
+func (*awsEc2query_serializeOpModifyReservedInstances) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpModifyReservedInstances) 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.(*ModifyReservedInstancesInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("ModifyReservedInstances")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentModifyReservedInstancesInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpModifySecurityGroupRules struct {
+}
+
+func (*awsEc2query_serializeOpModifySecurityGroupRules) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpModifySecurityGroupRules) 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.(*ModifySecurityGroupRulesInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("ModifySecurityGroupRules")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentModifySecurityGroupRulesInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpModifySnapshotAttribute struct {
+}
+
+func (*awsEc2query_serializeOpModifySnapshotAttribute) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpModifySnapshotAttribute) 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.(*ModifySnapshotAttributeInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("ModifySnapshotAttribute")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentModifySnapshotAttributeInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpModifySpotFleetRequest struct {
+}
+
+func (*awsEc2query_serializeOpModifySpotFleetRequest) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpModifySpotFleetRequest) 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.(*ModifySpotFleetRequestInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("ModifySpotFleetRequest")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentModifySpotFleetRequestInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpModifySubnetAttribute struct {
+}
+
+func (*awsEc2query_serializeOpModifySubnetAttribute) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpModifySubnetAttribute) 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.(*ModifySubnetAttributeInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("ModifySubnetAttribute")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentModifySubnetAttributeInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpModifyTrafficMirrorFilterNetworkServices struct {
+}
+
+func (*awsEc2query_serializeOpModifyTrafficMirrorFilterNetworkServices) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpModifyTrafficMirrorFilterNetworkServices) 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.(*ModifyTrafficMirrorFilterNetworkServicesInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("ModifyTrafficMirrorFilterNetworkServices")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentModifyTrafficMirrorFilterNetworkServicesInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpModifyTrafficMirrorFilterRule struct {
+}
+
+func (*awsEc2query_serializeOpModifyTrafficMirrorFilterRule) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpModifyTrafficMirrorFilterRule) 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.(*ModifyTrafficMirrorFilterRuleInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("ModifyTrafficMirrorFilterRule")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentModifyTrafficMirrorFilterRuleInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpModifyTrafficMirrorSession struct {
+}
+
+func (*awsEc2query_serializeOpModifyTrafficMirrorSession) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpModifyTrafficMirrorSession) 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.(*ModifyTrafficMirrorSessionInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("ModifyTrafficMirrorSession")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentModifyTrafficMirrorSessionInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpModifyTransitGateway struct {
+}
+
+func (*awsEc2query_serializeOpModifyTransitGateway) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpModifyTransitGateway) 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.(*ModifyTransitGatewayInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("ModifyTransitGateway")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentModifyTransitGatewayInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpModifyTransitGatewayPrefixListReference struct {
+}
+
+func (*awsEc2query_serializeOpModifyTransitGatewayPrefixListReference) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpModifyTransitGatewayPrefixListReference) 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.(*ModifyTransitGatewayPrefixListReferenceInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("ModifyTransitGatewayPrefixListReference")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentModifyTransitGatewayPrefixListReferenceInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpModifyTransitGatewayVpcAttachment struct {
+}
+
+func (*awsEc2query_serializeOpModifyTransitGatewayVpcAttachment) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpModifyTransitGatewayVpcAttachment) 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.(*ModifyTransitGatewayVpcAttachmentInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("ModifyTransitGatewayVpcAttachment")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentModifyTransitGatewayVpcAttachmentInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpModifyVolume struct {
+}
+
+func (*awsEc2query_serializeOpModifyVolume) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpModifyVolume) 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.(*ModifyVolumeInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("ModifyVolume")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentModifyVolumeInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpModifyVolumeAttribute struct {
+}
+
+func (*awsEc2query_serializeOpModifyVolumeAttribute) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpModifyVolumeAttribute) 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.(*ModifyVolumeAttributeInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("ModifyVolumeAttribute")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentModifyVolumeAttributeInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpModifyVpcAttribute struct {
+}
+
+func (*awsEc2query_serializeOpModifyVpcAttribute) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpModifyVpcAttribute) 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.(*ModifyVpcAttributeInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("ModifyVpcAttribute")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentModifyVpcAttributeInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpModifyVpcEndpoint struct {
+}
+
+func (*awsEc2query_serializeOpModifyVpcEndpoint) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpModifyVpcEndpoint) 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.(*ModifyVpcEndpointInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("ModifyVpcEndpoint")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentModifyVpcEndpointInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpModifyVpcEndpointConnectionNotification struct {
+}
+
+func (*awsEc2query_serializeOpModifyVpcEndpointConnectionNotification) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpModifyVpcEndpointConnectionNotification) 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.(*ModifyVpcEndpointConnectionNotificationInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("ModifyVpcEndpointConnectionNotification")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentModifyVpcEndpointConnectionNotificationInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpModifyVpcEndpointServiceConfiguration struct {
+}
+
+func (*awsEc2query_serializeOpModifyVpcEndpointServiceConfiguration) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpModifyVpcEndpointServiceConfiguration) 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.(*ModifyVpcEndpointServiceConfigurationInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("ModifyVpcEndpointServiceConfiguration")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentModifyVpcEndpointServiceConfigurationInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpModifyVpcEndpointServicePermissions struct {
+}
+
+func (*awsEc2query_serializeOpModifyVpcEndpointServicePermissions) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpModifyVpcEndpointServicePermissions) 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.(*ModifyVpcEndpointServicePermissionsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("ModifyVpcEndpointServicePermissions")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentModifyVpcEndpointServicePermissionsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpModifyVpcPeeringConnectionOptions struct {
+}
+
+func (*awsEc2query_serializeOpModifyVpcPeeringConnectionOptions) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpModifyVpcPeeringConnectionOptions) 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.(*ModifyVpcPeeringConnectionOptionsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("ModifyVpcPeeringConnectionOptions")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentModifyVpcPeeringConnectionOptionsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpModifyVpcTenancy struct {
+}
+
+func (*awsEc2query_serializeOpModifyVpcTenancy) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpModifyVpcTenancy) 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.(*ModifyVpcTenancyInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("ModifyVpcTenancy")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentModifyVpcTenancyInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpModifyVpnConnection struct {
+}
+
+func (*awsEc2query_serializeOpModifyVpnConnection) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpModifyVpnConnection) 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.(*ModifyVpnConnectionInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("ModifyVpnConnection")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentModifyVpnConnectionInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpModifyVpnConnectionOptions struct {
+}
+
+func (*awsEc2query_serializeOpModifyVpnConnectionOptions) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpModifyVpnConnectionOptions) 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.(*ModifyVpnConnectionOptionsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("ModifyVpnConnectionOptions")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentModifyVpnConnectionOptionsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpModifyVpnTunnelCertificate struct {
+}
+
+func (*awsEc2query_serializeOpModifyVpnTunnelCertificate) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpModifyVpnTunnelCertificate) 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.(*ModifyVpnTunnelCertificateInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("ModifyVpnTunnelCertificate")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentModifyVpnTunnelCertificateInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpModifyVpnTunnelOptions struct {
+}
+
+func (*awsEc2query_serializeOpModifyVpnTunnelOptions) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpModifyVpnTunnelOptions) 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.(*ModifyVpnTunnelOptionsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("ModifyVpnTunnelOptions")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentModifyVpnTunnelOptionsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpMonitorInstances struct {
+}
+
+func (*awsEc2query_serializeOpMonitorInstances) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpMonitorInstances) 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.(*MonitorInstancesInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("MonitorInstances")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentMonitorInstancesInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpMoveAddressToVpc struct {
+}
+
+func (*awsEc2query_serializeOpMoveAddressToVpc) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpMoveAddressToVpc) 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.(*MoveAddressToVpcInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("MoveAddressToVpc")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentMoveAddressToVpcInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpProvisionByoipCidr struct {
+}
+
+func (*awsEc2query_serializeOpProvisionByoipCidr) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpProvisionByoipCidr) 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.(*ProvisionByoipCidrInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("ProvisionByoipCidr")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentProvisionByoipCidrInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpPurchaseHostReservation struct {
+}
+
+func (*awsEc2query_serializeOpPurchaseHostReservation) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpPurchaseHostReservation) 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.(*PurchaseHostReservationInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("PurchaseHostReservation")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentPurchaseHostReservationInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpPurchaseReservedInstancesOffering struct {
+}
+
+func (*awsEc2query_serializeOpPurchaseReservedInstancesOffering) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpPurchaseReservedInstancesOffering) 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.(*PurchaseReservedInstancesOfferingInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("PurchaseReservedInstancesOffering")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentPurchaseReservedInstancesOfferingInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpPurchaseScheduledInstances struct {
+}
+
+func (*awsEc2query_serializeOpPurchaseScheduledInstances) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpPurchaseScheduledInstances) 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.(*PurchaseScheduledInstancesInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("PurchaseScheduledInstances")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentPurchaseScheduledInstancesInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpRebootInstances struct {
+}
+
+func (*awsEc2query_serializeOpRebootInstances) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpRebootInstances) 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.(*RebootInstancesInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("RebootInstances")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentRebootInstancesInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpRegisterImage struct {
+}
+
+func (*awsEc2query_serializeOpRegisterImage) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpRegisterImage) 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.(*RegisterImageInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("RegisterImage")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentRegisterImageInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpRegisterInstanceEventNotificationAttributes struct {
+}
+
+func (*awsEc2query_serializeOpRegisterInstanceEventNotificationAttributes) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpRegisterInstanceEventNotificationAttributes) 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.(*RegisterInstanceEventNotificationAttributesInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("RegisterInstanceEventNotificationAttributes")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentRegisterInstanceEventNotificationAttributesInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpRegisterTransitGatewayMulticastGroupMembers struct {
+}
+
+func (*awsEc2query_serializeOpRegisterTransitGatewayMulticastGroupMembers) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpRegisterTransitGatewayMulticastGroupMembers) 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.(*RegisterTransitGatewayMulticastGroupMembersInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("RegisterTransitGatewayMulticastGroupMembers")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentRegisterTransitGatewayMulticastGroupMembersInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpRegisterTransitGatewayMulticastGroupSources struct {
+}
+
+func (*awsEc2query_serializeOpRegisterTransitGatewayMulticastGroupSources) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpRegisterTransitGatewayMulticastGroupSources) 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.(*RegisterTransitGatewayMulticastGroupSourcesInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("RegisterTransitGatewayMulticastGroupSources")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentRegisterTransitGatewayMulticastGroupSourcesInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpRejectTransitGatewayMulticastDomainAssociations struct {
+}
+
+func (*awsEc2query_serializeOpRejectTransitGatewayMulticastDomainAssociations) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpRejectTransitGatewayMulticastDomainAssociations) 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.(*RejectTransitGatewayMulticastDomainAssociationsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("RejectTransitGatewayMulticastDomainAssociations")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentRejectTransitGatewayMulticastDomainAssociationsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpRejectTransitGatewayPeeringAttachment struct {
+}
+
+func (*awsEc2query_serializeOpRejectTransitGatewayPeeringAttachment) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpRejectTransitGatewayPeeringAttachment) 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.(*RejectTransitGatewayPeeringAttachmentInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("RejectTransitGatewayPeeringAttachment")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentRejectTransitGatewayPeeringAttachmentInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpRejectTransitGatewayVpcAttachment struct {
+}
+
+func (*awsEc2query_serializeOpRejectTransitGatewayVpcAttachment) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpRejectTransitGatewayVpcAttachment) 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.(*RejectTransitGatewayVpcAttachmentInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("RejectTransitGatewayVpcAttachment")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentRejectTransitGatewayVpcAttachmentInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpRejectVpcEndpointConnections struct {
+}
+
+func (*awsEc2query_serializeOpRejectVpcEndpointConnections) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpRejectVpcEndpointConnections) 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.(*RejectVpcEndpointConnectionsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("RejectVpcEndpointConnections")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentRejectVpcEndpointConnectionsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpRejectVpcPeeringConnection struct {
+}
+
+func (*awsEc2query_serializeOpRejectVpcPeeringConnection) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpRejectVpcPeeringConnection) 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.(*RejectVpcPeeringConnectionInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("RejectVpcPeeringConnection")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentRejectVpcPeeringConnectionInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpReleaseAddress struct {
+}
+
+func (*awsEc2query_serializeOpReleaseAddress) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpReleaseAddress) 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.(*ReleaseAddressInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("ReleaseAddress")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentReleaseAddressInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpReleaseHosts struct {
+}
+
+func (*awsEc2query_serializeOpReleaseHosts) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpReleaseHosts) 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.(*ReleaseHostsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("ReleaseHosts")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentReleaseHostsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpReplaceIamInstanceProfileAssociation struct {
+}
+
+func (*awsEc2query_serializeOpReplaceIamInstanceProfileAssociation) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpReplaceIamInstanceProfileAssociation) 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.(*ReplaceIamInstanceProfileAssociationInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("ReplaceIamInstanceProfileAssociation")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentReplaceIamInstanceProfileAssociationInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpReplaceNetworkAclAssociation struct {
+}
+
+func (*awsEc2query_serializeOpReplaceNetworkAclAssociation) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpReplaceNetworkAclAssociation) 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.(*ReplaceNetworkAclAssociationInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("ReplaceNetworkAclAssociation")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentReplaceNetworkAclAssociationInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpReplaceNetworkAclEntry struct {
+}
+
+func (*awsEc2query_serializeOpReplaceNetworkAclEntry) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpReplaceNetworkAclEntry) 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.(*ReplaceNetworkAclEntryInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("ReplaceNetworkAclEntry")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentReplaceNetworkAclEntryInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpReplaceRoute struct {
+}
+
+func (*awsEc2query_serializeOpReplaceRoute) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpReplaceRoute) 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.(*ReplaceRouteInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("ReplaceRoute")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentReplaceRouteInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpReplaceRouteTableAssociation struct {
+}
+
+func (*awsEc2query_serializeOpReplaceRouteTableAssociation) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpReplaceRouteTableAssociation) 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.(*ReplaceRouteTableAssociationInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("ReplaceRouteTableAssociation")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentReplaceRouteTableAssociationInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpReplaceTransitGatewayRoute struct {
+}
+
+func (*awsEc2query_serializeOpReplaceTransitGatewayRoute) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpReplaceTransitGatewayRoute) 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.(*ReplaceTransitGatewayRouteInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("ReplaceTransitGatewayRoute")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentReplaceTransitGatewayRouteInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpReportInstanceStatus struct {
+}
+
+func (*awsEc2query_serializeOpReportInstanceStatus) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpReportInstanceStatus) 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.(*ReportInstanceStatusInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("ReportInstanceStatus")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentReportInstanceStatusInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpRequestSpotFleet struct {
+}
+
+func (*awsEc2query_serializeOpRequestSpotFleet) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpRequestSpotFleet) 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.(*RequestSpotFleetInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("RequestSpotFleet")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentRequestSpotFleetInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpRequestSpotInstances struct {
+}
+
+func (*awsEc2query_serializeOpRequestSpotInstances) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpRequestSpotInstances) 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.(*RequestSpotInstancesInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("RequestSpotInstances")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentRequestSpotInstancesInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpResetAddressAttribute struct {
+}
+
+func (*awsEc2query_serializeOpResetAddressAttribute) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpResetAddressAttribute) 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.(*ResetAddressAttributeInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("ResetAddressAttribute")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentResetAddressAttributeInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpResetEbsDefaultKmsKeyId struct {
+}
+
+func (*awsEc2query_serializeOpResetEbsDefaultKmsKeyId) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpResetEbsDefaultKmsKeyId) 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.(*ResetEbsDefaultKmsKeyIdInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("ResetEbsDefaultKmsKeyId")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentResetEbsDefaultKmsKeyIdInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpResetFpgaImageAttribute struct {
+}
+
+func (*awsEc2query_serializeOpResetFpgaImageAttribute) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpResetFpgaImageAttribute) 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.(*ResetFpgaImageAttributeInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("ResetFpgaImageAttribute")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentResetFpgaImageAttributeInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpResetImageAttribute struct {
+}
+
+func (*awsEc2query_serializeOpResetImageAttribute) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpResetImageAttribute) 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.(*ResetImageAttributeInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("ResetImageAttribute")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentResetImageAttributeInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpResetInstanceAttribute struct {
+}
+
+func (*awsEc2query_serializeOpResetInstanceAttribute) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpResetInstanceAttribute) 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.(*ResetInstanceAttributeInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("ResetInstanceAttribute")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentResetInstanceAttributeInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpResetNetworkInterfaceAttribute struct {
+}
+
+func (*awsEc2query_serializeOpResetNetworkInterfaceAttribute) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpResetNetworkInterfaceAttribute) 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.(*ResetNetworkInterfaceAttributeInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("ResetNetworkInterfaceAttribute")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentResetNetworkInterfaceAttributeInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpResetSnapshotAttribute struct {
+}
+
+func (*awsEc2query_serializeOpResetSnapshotAttribute) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpResetSnapshotAttribute) 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.(*ResetSnapshotAttributeInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("ResetSnapshotAttribute")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentResetSnapshotAttributeInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpRestoreAddressToClassic struct {
+}
+
+func (*awsEc2query_serializeOpRestoreAddressToClassic) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpRestoreAddressToClassic) 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.(*RestoreAddressToClassicInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("RestoreAddressToClassic")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentRestoreAddressToClassicInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpRestoreManagedPrefixListVersion struct {
+}
+
+func (*awsEc2query_serializeOpRestoreManagedPrefixListVersion) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpRestoreManagedPrefixListVersion) 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.(*RestoreManagedPrefixListVersionInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("RestoreManagedPrefixListVersion")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentRestoreManagedPrefixListVersionInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpRevokeClientVpnIngress struct {
+}
+
+func (*awsEc2query_serializeOpRevokeClientVpnIngress) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpRevokeClientVpnIngress) 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.(*RevokeClientVpnIngressInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("RevokeClientVpnIngress")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentRevokeClientVpnIngressInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpRevokeSecurityGroupEgress struct {
+}
+
+func (*awsEc2query_serializeOpRevokeSecurityGroupEgress) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpRevokeSecurityGroupEgress) 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.(*RevokeSecurityGroupEgressInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("RevokeSecurityGroupEgress")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentRevokeSecurityGroupEgressInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpRevokeSecurityGroupIngress struct {
+}
+
+func (*awsEc2query_serializeOpRevokeSecurityGroupIngress) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpRevokeSecurityGroupIngress) 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.(*RevokeSecurityGroupIngressInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("RevokeSecurityGroupIngress")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentRevokeSecurityGroupIngressInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpRunInstances struct {
+}
+
+func (*awsEc2query_serializeOpRunInstances) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpRunInstances) 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.(*RunInstancesInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("RunInstances")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentRunInstancesInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpRunScheduledInstances struct {
+}
+
+func (*awsEc2query_serializeOpRunScheduledInstances) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpRunScheduledInstances) 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.(*RunScheduledInstancesInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("RunScheduledInstances")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentRunScheduledInstancesInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpSearchLocalGatewayRoutes struct {
+}
+
+func (*awsEc2query_serializeOpSearchLocalGatewayRoutes) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpSearchLocalGatewayRoutes) 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.(*SearchLocalGatewayRoutesInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("SearchLocalGatewayRoutes")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentSearchLocalGatewayRoutesInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpSearchTransitGatewayMulticastGroups struct {
+}
+
+func (*awsEc2query_serializeOpSearchTransitGatewayMulticastGroups) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpSearchTransitGatewayMulticastGroups) 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.(*SearchTransitGatewayMulticastGroupsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("SearchTransitGatewayMulticastGroups")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentSearchTransitGatewayMulticastGroupsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpSearchTransitGatewayRoutes struct {
+}
+
+func (*awsEc2query_serializeOpSearchTransitGatewayRoutes) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpSearchTransitGatewayRoutes) 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.(*SearchTransitGatewayRoutesInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("SearchTransitGatewayRoutes")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentSearchTransitGatewayRoutesInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpSendDiagnosticInterrupt struct {
+}
+
+func (*awsEc2query_serializeOpSendDiagnosticInterrupt) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpSendDiagnosticInterrupt) 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.(*SendDiagnosticInterruptInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("SendDiagnosticInterrupt")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentSendDiagnosticInterruptInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpStartInstances struct {
+}
+
+func (*awsEc2query_serializeOpStartInstances) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpStartInstances) 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.(*StartInstancesInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("StartInstances")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentStartInstancesInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpStartNetworkInsightsAnalysis struct {
+}
+
+func (*awsEc2query_serializeOpStartNetworkInsightsAnalysis) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpStartNetworkInsightsAnalysis) 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.(*StartNetworkInsightsAnalysisInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("StartNetworkInsightsAnalysis")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentStartNetworkInsightsAnalysisInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpStartVpcEndpointServicePrivateDnsVerification struct {
+}
+
+func (*awsEc2query_serializeOpStartVpcEndpointServicePrivateDnsVerification) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpStartVpcEndpointServicePrivateDnsVerification) 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.(*StartVpcEndpointServicePrivateDnsVerificationInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("StartVpcEndpointServicePrivateDnsVerification")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentStartVpcEndpointServicePrivateDnsVerificationInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpStopInstances struct {
+}
+
+func (*awsEc2query_serializeOpStopInstances) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpStopInstances) 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.(*StopInstancesInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("StopInstances")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentStopInstancesInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpTerminateClientVpnConnections struct {
+}
+
+func (*awsEc2query_serializeOpTerminateClientVpnConnections) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpTerminateClientVpnConnections) 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.(*TerminateClientVpnConnectionsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("TerminateClientVpnConnections")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentTerminateClientVpnConnectionsInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpTerminateInstances struct {
+}
+
+func (*awsEc2query_serializeOpTerminateInstances) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpTerminateInstances) 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.(*TerminateInstancesInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("TerminateInstances")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentTerminateInstancesInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpUnassignIpv6Addresses struct {
+}
+
+func (*awsEc2query_serializeOpUnassignIpv6Addresses) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpUnassignIpv6Addresses) 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.(*UnassignIpv6AddressesInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("UnassignIpv6Addresses")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentUnassignIpv6AddressesInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpUnassignPrivateIpAddresses struct {
+}
+
+func (*awsEc2query_serializeOpUnassignPrivateIpAddresses) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpUnassignPrivateIpAddresses) 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.(*UnassignPrivateIpAddressesInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("UnassignPrivateIpAddresses")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentUnassignPrivateIpAddressesInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpUnmonitorInstances struct {
+}
+
+func (*awsEc2query_serializeOpUnmonitorInstances) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpUnmonitorInstances) 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.(*UnmonitorInstancesInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("UnmonitorInstances")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentUnmonitorInstancesInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpUpdateSecurityGroupRuleDescriptionsEgress struct {
+}
+
+func (*awsEc2query_serializeOpUpdateSecurityGroupRuleDescriptionsEgress) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpUpdateSecurityGroupRuleDescriptionsEgress) 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.(*UpdateSecurityGroupRuleDescriptionsEgressInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("UpdateSecurityGroupRuleDescriptionsEgress")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentUpdateSecurityGroupRuleDescriptionsEgressInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpUpdateSecurityGroupRuleDescriptionsIngress struct {
+}
+
+func (*awsEc2query_serializeOpUpdateSecurityGroupRuleDescriptionsIngress) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpUpdateSecurityGroupRuleDescriptionsIngress) 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.(*UpdateSecurityGroupRuleDescriptionsIngressInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("UpdateSecurityGroupRuleDescriptionsIngress")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentUpdateSecurityGroupRuleDescriptionsIngressInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsEc2query_serializeOpWithdrawByoipCidr struct {
+}
+
+func (*awsEc2query_serializeOpWithdrawByoipCidr) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsEc2query_serializeOpWithdrawByoipCidr) 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.(*WithdrawByoipCidrInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ request.Request.URL.Path = "/"
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("WithdrawByoipCidr")
+ body.Key("Version").String("2016-11-15")
+
+ if err := awsEc2query_serializeOpDocumentWithdrawByoipCidrInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsEc2query_serializeDocumentAccountAttributeNameStringList(v []types.AccountAttributeName, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("AttributeName")
+
+ for i := range v {
+ av := array.Value()
+ av.String(string(v[i]))
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentAddPrefixListEntries(v []types.AddPrefixListEntry, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Member")
+
+ for i := range v {
+ av := array.Value()
+ if err := awsEc2query_serializeDocumentAddPrefixListEntry(&v[i], av); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentAddPrefixListEntry(v *types.AddPrefixListEntry, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Cidr != nil {
+ objectKey := object.Key("Cidr")
+ objectKey.String(*v.Cidr)
+ }
+
+ if v.Description != nil {
+ objectKey := object.Key("Description")
+ objectKey.String(*v.Description)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentAllocationIdList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("AllocationId")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentAllocationIds(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentArnList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentAssociationIdList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("AssociationId")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentAthenaIntegration(v *types.AthenaIntegration, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.IntegrationResultS3DestinationArn != nil {
+ objectKey := object.Key("IntegrationResultS3DestinationArn")
+ objectKey.String(*v.IntegrationResultS3DestinationArn)
+ }
+
+ if v.PartitionEndDate != nil {
+ objectKey := object.Key("PartitionEndDate")
+ objectKey.String(smithytime.FormatDateTime(*v.PartitionEndDate))
+ }
+
+ if len(v.PartitionLoadFrequency) > 0 {
+ objectKey := object.Key("PartitionLoadFrequency")
+ objectKey.String(string(v.PartitionLoadFrequency))
+ }
+
+ if v.PartitionStartDate != nil {
+ objectKey := object.Key("PartitionStartDate")
+ objectKey.String(smithytime.FormatDateTime(*v.PartitionStartDate))
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentAthenaIntegrationsSet(v []types.AthenaIntegration, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ if err := awsEc2query_serializeDocumentAthenaIntegration(&v[i], av); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentAttributeBooleanValue(v *types.AttributeBooleanValue, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Value != nil {
+ objectKey := object.Key("Value")
+ objectKey.Boolean(*v.Value)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentAttributeValue(v *types.AttributeValue, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Value != nil {
+ objectKey := object.Key("Value")
+ objectKey.String(*v.Value)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentAvailabilityZoneStringList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("AvailabilityZone")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentBillingProductList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentBlobAttributeValue(v *types.BlobAttributeValue, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Value != nil {
+ objectKey := object.Key("Value")
+ objectKey.Base64EncodeBytes(v.Value)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentBlockDeviceMapping(v *types.BlockDeviceMapping, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DeviceName != nil {
+ objectKey := object.Key("DeviceName")
+ objectKey.String(*v.DeviceName)
+ }
+
+ if v.Ebs != nil {
+ objectKey := object.Key("Ebs")
+ if err := awsEc2query_serializeDocumentEbsBlockDevice(v.Ebs, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.NoDevice != nil {
+ objectKey := object.Key("NoDevice")
+ objectKey.String(*v.NoDevice)
+ }
+
+ if v.VirtualName != nil {
+ objectKey := object.Key("VirtualName")
+ objectKey.String(*v.VirtualName)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentBlockDeviceMappingList(v []types.BlockDeviceMapping, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ if err := awsEc2query_serializeDocumentBlockDeviceMapping(&v[i], av); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentBlockDeviceMappingRequestList(v []types.BlockDeviceMapping, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("BlockDeviceMapping")
+
+ for i := range v {
+ av := array.Value()
+ if err := awsEc2query_serializeDocumentBlockDeviceMapping(&v[i], av); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentBundleIdStringList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("BundleId")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentCapacityReservationIdSet(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentCapacityReservationOptionsRequest(v *types.CapacityReservationOptionsRequest, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if len(v.UsageStrategy) > 0 {
+ objectKey := object.Key("UsageStrategy")
+ objectKey.String(string(v.UsageStrategy))
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentCapacityReservationSpecification(v *types.CapacityReservationSpecification, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if len(v.CapacityReservationPreference) > 0 {
+ objectKey := object.Key("CapacityReservationPreference")
+ objectKey.String(string(v.CapacityReservationPreference))
+ }
+
+ if v.CapacityReservationTarget != nil {
+ objectKey := object.Key("CapacityReservationTarget")
+ if err := awsEc2query_serializeDocumentCapacityReservationTarget(v.CapacityReservationTarget, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentCapacityReservationTarget(v *types.CapacityReservationTarget, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.CapacityReservationId != nil {
+ objectKey := object.Key("CapacityReservationId")
+ objectKey.String(*v.CapacityReservationId)
+ }
+
+ if v.CapacityReservationResourceGroupArn != nil {
+ objectKey := object.Key("CapacityReservationResourceGroupArn")
+ objectKey.String(*v.CapacityReservationResourceGroupArn)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentCarrierGatewayIdSet(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Member")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentCertificateAuthenticationRequest(v *types.CertificateAuthenticationRequest, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.ClientRootCertificateChainArn != nil {
+ objectKey := object.Key("ClientRootCertificateChainArn")
+ objectKey.String(*v.ClientRootCertificateChainArn)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentCidrAuthorizationContext(v *types.CidrAuthorizationContext, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Message != nil {
+ objectKey := object.Key("Message")
+ objectKey.String(*v.Message)
+ }
+
+ if v.Signature != nil {
+ objectKey := object.Key("Signature")
+ objectKey.String(*v.Signature)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentClassicLoadBalancer(v *types.ClassicLoadBalancer, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Name != nil {
+ objectKey := object.Key("Name")
+ objectKey.String(*v.Name)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentClassicLoadBalancers(v []types.ClassicLoadBalancer, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ if err := awsEc2query_serializeDocumentClassicLoadBalancer(&v[i], av); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentClassicLoadBalancersConfig(v *types.ClassicLoadBalancersConfig, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.ClassicLoadBalancers != nil {
+ objectKey := object.FlatKey("ClassicLoadBalancers")
+ if err := awsEc2query_serializeDocumentClassicLoadBalancers(v.ClassicLoadBalancers, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentClientConnectOptions(v *types.ClientConnectOptions, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Enabled != nil {
+ objectKey := object.Key("Enabled")
+ objectKey.Boolean(*v.Enabled)
+ }
+
+ if v.LambdaFunctionArn != nil {
+ objectKey := object.Key("LambdaFunctionArn")
+ objectKey.String(*v.LambdaFunctionArn)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentClientData(v *types.ClientData, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Comment != nil {
+ objectKey := object.Key("Comment")
+ objectKey.String(*v.Comment)
+ }
+
+ if v.UploadEnd != nil {
+ objectKey := object.Key("UploadEnd")
+ objectKey.String(smithytime.FormatDateTime(*v.UploadEnd))
+ }
+
+ if v.UploadSize != nil {
+ objectKey := object.Key("UploadSize")
+ switch {
+ case math.IsNaN(*v.UploadSize):
+ objectKey.String("NaN")
+
+ case math.IsInf(*v.UploadSize, 1):
+ objectKey.String("Infinity")
+
+ case math.IsInf(*v.UploadSize, -1):
+ objectKey.String("-Infinity")
+
+ default:
+ objectKey.Double(*v.UploadSize)
+
+ }
+ }
+
+ if v.UploadStart != nil {
+ objectKey := object.Key("UploadStart")
+ objectKey.String(smithytime.FormatDateTime(*v.UploadStart))
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentClientVpnAuthenticationRequest(v *types.ClientVpnAuthenticationRequest, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.ActiveDirectory != nil {
+ objectKey := object.Key("ActiveDirectory")
+ if err := awsEc2query_serializeDocumentDirectoryServiceAuthenticationRequest(v.ActiveDirectory, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.FederatedAuthentication != nil {
+ objectKey := object.Key("FederatedAuthentication")
+ if err := awsEc2query_serializeDocumentFederatedAuthenticationRequest(v.FederatedAuthentication, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MutualAuthentication != nil {
+ objectKey := object.Key("MutualAuthentication")
+ if err := awsEc2query_serializeDocumentCertificateAuthenticationRequest(v.MutualAuthentication, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if len(v.Type) > 0 {
+ objectKey := object.Key("Type")
+ objectKey.String(string(v.Type))
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentClientVpnAuthenticationRequestList(v []types.ClientVpnAuthenticationRequest, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Member")
+
+ for i := range v {
+ av := array.Value()
+ if err := awsEc2query_serializeDocumentClientVpnAuthenticationRequest(&v[i], av); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentClientVpnEndpointIdList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentClientVpnSecurityGroupIdSet(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentCoipPoolIdSet(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentConnectionLogOptions(v *types.ConnectionLogOptions, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.CloudwatchLogGroup != nil {
+ objectKey := object.Key("CloudwatchLogGroup")
+ objectKey.String(*v.CloudwatchLogGroup)
+ }
+
+ if v.CloudwatchLogStream != nil {
+ objectKey := object.Key("CloudwatchLogStream")
+ objectKey.String(*v.CloudwatchLogStream)
+ }
+
+ if v.Enabled != nil {
+ objectKey := object.Key("Enabled")
+ objectKey.Boolean(*v.Enabled)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentConnectionNotificationIdsList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentConversionIdStringList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentCpuOptionsRequest(v *types.CpuOptionsRequest, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.CoreCount != nil {
+ objectKey := object.Key("CoreCount")
+ objectKey.Integer(*v.CoreCount)
+ }
+
+ if v.ThreadsPerCore != nil {
+ objectKey := object.Key("ThreadsPerCore")
+ objectKey.Integer(*v.ThreadsPerCore)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentCreateTransitGatewayConnectRequestOptions(v *types.CreateTransitGatewayConnectRequestOptions, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if len(v.Protocol) > 0 {
+ objectKey := object.Key("Protocol")
+ objectKey.String(string(v.Protocol))
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentCreateTransitGatewayMulticastDomainRequestOptions(v *types.CreateTransitGatewayMulticastDomainRequestOptions, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if len(v.AutoAcceptSharedAssociations) > 0 {
+ objectKey := object.Key("AutoAcceptSharedAssociations")
+ objectKey.String(string(v.AutoAcceptSharedAssociations))
+ }
+
+ if len(v.Igmpv2Support) > 0 {
+ objectKey := object.Key("Igmpv2Support")
+ objectKey.String(string(v.Igmpv2Support))
+ }
+
+ if len(v.StaticSourcesSupport) > 0 {
+ objectKey := object.Key("StaticSourcesSupport")
+ objectKey.String(string(v.StaticSourcesSupport))
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentCreateTransitGatewayVpcAttachmentRequestOptions(v *types.CreateTransitGatewayVpcAttachmentRequestOptions, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if len(v.ApplianceModeSupport) > 0 {
+ objectKey := object.Key("ApplianceModeSupport")
+ objectKey.String(string(v.ApplianceModeSupport))
+ }
+
+ if len(v.DnsSupport) > 0 {
+ objectKey := object.Key("DnsSupport")
+ objectKey.String(string(v.DnsSupport))
+ }
+
+ if len(v.Ipv6Support) > 0 {
+ objectKey := object.Key("Ipv6Support")
+ objectKey.String(string(v.Ipv6Support))
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentCreateVolumePermission(v *types.CreateVolumePermission, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if len(v.Group) > 0 {
+ objectKey := object.Key("Group")
+ objectKey.String(string(v.Group))
+ }
+
+ if v.UserId != nil {
+ objectKey := object.Key("UserId")
+ objectKey.String(*v.UserId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentCreateVolumePermissionList(v []types.CreateVolumePermission, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ if err := awsEc2query_serializeDocumentCreateVolumePermission(&v[i], av); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentCreateVolumePermissionModifications(v *types.CreateVolumePermissionModifications, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Add != nil {
+ objectKey := object.FlatKey("Add")
+ if err := awsEc2query_serializeDocumentCreateVolumePermissionList(v.Add, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.Remove != nil {
+ objectKey := object.FlatKey("Remove")
+ if err := awsEc2query_serializeDocumentCreateVolumePermissionList(v.Remove, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentCreditSpecificationRequest(v *types.CreditSpecificationRequest, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.CpuCredits != nil {
+ objectKey := object.Key("CpuCredits")
+ objectKey.String(*v.CpuCredits)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentCustomerGatewayIdStringList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("CustomerGatewayId")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentDedicatedHostIdList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentDeleteQueuedReservedInstancesIdList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentDeregisterInstanceTagAttributeRequest(v *types.DeregisterInstanceTagAttributeRequest, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.IncludeAllTagsOfInstance != nil {
+ objectKey := object.Key("IncludeAllTagsOfInstance")
+ objectKey.Boolean(*v.IncludeAllTagsOfInstance)
+ }
+
+ if v.InstanceTagKeys != nil {
+ objectKey := object.FlatKey("InstanceTagKey")
+ if err := awsEc2query_serializeDocumentInstanceTagKeySet(v.InstanceTagKeys, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentDhcpOptionsIdStringList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("DhcpOptionsId")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentDirectoryServiceAuthenticationRequest(v *types.DirectoryServiceAuthenticationRequest, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DirectoryId != nil {
+ objectKey := object.Key("DirectoryId")
+ objectKey.String(*v.DirectoryId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentDiskImage(v *types.DiskImage, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Description != nil {
+ objectKey := object.Key("Description")
+ objectKey.String(*v.Description)
+ }
+
+ if v.Image != nil {
+ objectKey := object.Key("Image")
+ if err := awsEc2query_serializeDocumentDiskImageDetail(v.Image, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.Volume != nil {
+ objectKey := object.Key("Volume")
+ if err := awsEc2query_serializeDocumentVolumeDetail(v.Volume, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentDiskImageDetail(v *types.DiskImageDetail, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Bytes != nil {
+ objectKey := object.Key("Bytes")
+ objectKey.Long(*v.Bytes)
+ }
+
+ if len(v.Format) > 0 {
+ objectKey := object.Key("Format")
+ objectKey.String(string(v.Format))
+ }
+
+ if v.ImportManifestUrl != nil {
+ objectKey := object.Key("ImportManifestUrl")
+ objectKey.String(*v.ImportManifestUrl)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentDiskImageList(v []types.DiskImage, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Member")
+
+ for i := range v {
+ av := array.Value()
+ if err := awsEc2query_serializeDocumentDiskImage(&v[i], av); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentDnsServersOptionsModifyStructure(v *types.DnsServersOptionsModifyStructure, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.CustomDnsServers != nil {
+ objectKey := object.FlatKey("CustomDnsServers")
+ if err := awsEc2query_serializeDocumentValueStringList(v.CustomDnsServers, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.Enabled != nil {
+ objectKey := object.Key("Enabled")
+ objectKey.Boolean(*v.Enabled)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentEbsBlockDevice(v *types.EbsBlockDevice, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DeleteOnTermination != nil {
+ objectKey := object.Key("DeleteOnTermination")
+ objectKey.Boolean(*v.DeleteOnTermination)
+ }
+
+ if v.Encrypted != nil {
+ objectKey := object.Key("Encrypted")
+ objectKey.Boolean(*v.Encrypted)
+ }
+
+ if v.Iops != nil {
+ objectKey := object.Key("Iops")
+ objectKey.Integer(*v.Iops)
+ }
+
+ if v.KmsKeyId != nil {
+ objectKey := object.Key("KmsKeyId")
+ objectKey.String(*v.KmsKeyId)
+ }
+
+ if v.OutpostArn != nil {
+ objectKey := object.Key("OutpostArn")
+ objectKey.String(*v.OutpostArn)
+ }
+
+ if v.SnapshotId != nil {
+ objectKey := object.Key("SnapshotId")
+ objectKey.String(*v.SnapshotId)
+ }
+
+ if v.Throughput != nil {
+ objectKey := object.Key("Throughput")
+ objectKey.Integer(*v.Throughput)
+ }
+
+ if v.VolumeSize != nil {
+ objectKey := object.Key("VolumeSize")
+ objectKey.Integer(*v.VolumeSize)
+ }
+
+ if len(v.VolumeType) > 0 {
+ objectKey := object.Key("VolumeType")
+ objectKey.String(string(v.VolumeType))
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentEbsInstanceBlockDeviceSpecification(v *types.EbsInstanceBlockDeviceSpecification, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DeleteOnTermination != nil {
+ objectKey := object.Key("DeleteOnTermination")
+ objectKey.Boolean(*v.DeleteOnTermination)
+ }
+
+ if v.VolumeId != nil {
+ objectKey := object.Key("VolumeId")
+ objectKey.String(*v.VolumeId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentEgressOnlyInternetGatewayIdList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentElasticGpuIdSet(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentElasticGpuSpecification(v *types.ElasticGpuSpecification, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Type != nil {
+ objectKey := object.Key("Type")
+ objectKey.String(*v.Type)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentElasticGpuSpecificationList(v []types.ElasticGpuSpecification, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("ElasticGpuSpecification")
+
+ for i := range v {
+ av := array.Value()
+ if err := awsEc2query_serializeDocumentElasticGpuSpecification(&v[i], av); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentElasticGpuSpecifications(v []types.ElasticGpuSpecification, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ if err := awsEc2query_serializeDocumentElasticGpuSpecification(&v[i], av); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentElasticInferenceAccelerator(v *types.ElasticInferenceAccelerator, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Count != nil {
+ objectKey := object.Key("Count")
+ objectKey.Integer(*v.Count)
+ }
+
+ if v.Type != nil {
+ objectKey := object.Key("Type")
+ objectKey.String(*v.Type)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentElasticInferenceAccelerators(v []types.ElasticInferenceAccelerator, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ if err := awsEc2query_serializeDocumentElasticInferenceAccelerator(&v[i], av); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentEnclaveOptionsRequest(v *types.EnclaveOptionsRequest, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Enabled != nil {
+ objectKey := object.Key("Enabled")
+ objectKey.Boolean(*v.Enabled)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentExecutableByStringList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("ExecutableBy")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentExportImageTaskIdList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("ExportImageTaskId")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentExportTaskIdStringList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("ExportTaskId")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentExportTaskS3LocationRequest(v *types.ExportTaskS3LocationRequest, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.S3Bucket != nil {
+ objectKey := object.Key("S3Bucket")
+ objectKey.String(*v.S3Bucket)
+ }
+
+ if v.S3Prefix != nil {
+ objectKey := object.Key("S3Prefix")
+ objectKey.String(*v.S3Prefix)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentExportToS3TaskSpecification(v *types.ExportToS3TaskSpecification, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if len(v.ContainerFormat) > 0 {
+ objectKey := object.Key("ContainerFormat")
+ objectKey.String(string(v.ContainerFormat))
+ }
+
+ if len(v.DiskImageFormat) > 0 {
+ objectKey := object.Key("DiskImageFormat")
+ objectKey.String(string(v.DiskImageFormat))
+ }
+
+ if v.S3Bucket != nil {
+ objectKey := object.Key("S3Bucket")
+ objectKey.String(*v.S3Bucket)
+ }
+
+ if v.S3Prefix != nil {
+ objectKey := object.Key("S3Prefix")
+ objectKey.String(*v.S3Prefix)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentFederatedAuthenticationRequest(v *types.FederatedAuthenticationRequest, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.SAMLProviderArn != nil {
+ objectKey := object.Key("SAMLProviderArn")
+ objectKey.String(*v.SAMLProviderArn)
+ }
+
+ if v.SelfServiceSAMLProviderArn != nil {
+ objectKey := object.Key("SelfServiceSAMLProviderArn")
+ objectKey.String(*v.SelfServiceSAMLProviderArn)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentFilter(v *types.Filter, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Name != nil {
+ objectKey := object.Key("Name")
+ objectKey.String(*v.Name)
+ }
+
+ if v.Values != nil {
+ objectKey := object.FlatKey("Value")
+ if err := awsEc2query_serializeDocumentValueStringList(v.Values, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentFilterList(v []types.Filter, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Filter")
+
+ for i := range v {
+ av := array.Value()
+ if err := awsEc2query_serializeDocumentFilter(&v[i], av); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentFleetIdSet(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Member")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentFleetLaunchTemplateConfigListRequest(v []types.FleetLaunchTemplateConfigRequest, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ if err := awsEc2query_serializeDocumentFleetLaunchTemplateConfigRequest(&v[i], av); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentFleetLaunchTemplateConfigRequest(v *types.FleetLaunchTemplateConfigRequest, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.LaunchTemplateSpecification != nil {
+ objectKey := object.Key("LaunchTemplateSpecification")
+ if err := awsEc2query_serializeDocumentFleetLaunchTemplateSpecificationRequest(v.LaunchTemplateSpecification, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.Overrides != nil {
+ objectKey := object.FlatKey("Overrides")
+ if err := awsEc2query_serializeDocumentFleetLaunchTemplateOverridesListRequest(v.Overrides, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentFleetLaunchTemplateOverridesListRequest(v []types.FleetLaunchTemplateOverridesRequest, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ if err := awsEc2query_serializeDocumentFleetLaunchTemplateOverridesRequest(&v[i], av); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentFleetLaunchTemplateOverridesRequest(v *types.FleetLaunchTemplateOverridesRequest, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AvailabilityZone != nil {
+ objectKey := object.Key("AvailabilityZone")
+ objectKey.String(*v.AvailabilityZone)
+ }
+
+ if len(v.InstanceType) > 0 {
+ objectKey := object.Key("InstanceType")
+ objectKey.String(string(v.InstanceType))
+ }
+
+ if v.MaxPrice != nil {
+ objectKey := object.Key("MaxPrice")
+ objectKey.String(*v.MaxPrice)
+ }
+
+ if v.Placement != nil {
+ objectKey := object.Key("Placement")
+ if err := awsEc2query_serializeDocumentPlacement(v.Placement, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.Priority != nil {
+ objectKey := object.Key("Priority")
+ switch {
+ case math.IsNaN(*v.Priority):
+ objectKey.String("NaN")
+
+ case math.IsInf(*v.Priority, 1):
+ objectKey.String("Infinity")
+
+ case math.IsInf(*v.Priority, -1):
+ objectKey.String("-Infinity")
+
+ default:
+ objectKey.Double(*v.Priority)
+
+ }
+ }
+
+ if v.SubnetId != nil {
+ objectKey := object.Key("SubnetId")
+ objectKey.String(*v.SubnetId)
+ }
+
+ if v.WeightedCapacity != nil {
+ objectKey := object.Key("WeightedCapacity")
+ switch {
+ case math.IsNaN(*v.WeightedCapacity):
+ objectKey.String("NaN")
+
+ case math.IsInf(*v.WeightedCapacity, 1):
+ objectKey.String("Infinity")
+
+ case math.IsInf(*v.WeightedCapacity, -1):
+ objectKey.String("-Infinity")
+
+ default:
+ objectKey.Double(*v.WeightedCapacity)
+
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentFleetLaunchTemplateSpecification(v *types.FleetLaunchTemplateSpecification, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.LaunchTemplateId != nil {
+ objectKey := object.Key("LaunchTemplateId")
+ objectKey.String(*v.LaunchTemplateId)
+ }
+
+ if v.LaunchTemplateName != nil {
+ objectKey := object.Key("LaunchTemplateName")
+ objectKey.String(*v.LaunchTemplateName)
+ }
+
+ if v.Version != nil {
+ objectKey := object.Key("Version")
+ objectKey.String(*v.Version)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentFleetLaunchTemplateSpecificationRequest(v *types.FleetLaunchTemplateSpecificationRequest, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.LaunchTemplateId != nil {
+ objectKey := object.Key("LaunchTemplateId")
+ objectKey.String(*v.LaunchTemplateId)
+ }
+
+ if v.LaunchTemplateName != nil {
+ objectKey := object.Key("LaunchTemplateName")
+ objectKey.String(*v.LaunchTemplateName)
+ }
+
+ if v.Version != nil {
+ objectKey := object.Key("Version")
+ objectKey.String(*v.Version)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentFleetSpotCapacityRebalanceRequest(v *types.FleetSpotCapacityRebalanceRequest, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if len(v.ReplacementStrategy) > 0 {
+ objectKey := object.Key("ReplacementStrategy")
+ objectKey.String(string(v.ReplacementStrategy))
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentFleetSpotMaintenanceStrategiesRequest(v *types.FleetSpotMaintenanceStrategiesRequest, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.CapacityRebalance != nil {
+ objectKey := object.Key("CapacityRebalance")
+ if err := awsEc2query_serializeDocumentFleetSpotCapacityRebalanceRequest(v.CapacityRebalance, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentFlowLogIdList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentFlowLogResourceIds(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentFpgaImageIdList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentGroupIdentifier(v *types.GroupIdentifier, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.GroupId != nil {
+ objectKey := object.Key("GroupId")
+ objectKey.String(*v.GroupId)
+ }
+
+ if v.GroupName != nil {
+ objectKey := object.Key("GroupName")
+ objectKey.String(*v.GroupName)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentGroupIdentifierList(v []types.GroupIdentifier, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ if err := awsEc2query_serializeDocumentGroupIdentifier(&v[i], av); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentGroupIds(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentGroupIdStringList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("GroupId")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentGroupNameStringList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("GroupName")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentHibernationOptionsRequest(v *types.HibernationOptionsRequest, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Configured != nil {
+ objectKey := object.Key("Configured")
+ objectKey.Boolean(*v.Configured)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentHostReservationIdSet(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentIamInstanceProfileSpecification(v *types.IamInstanceProfileSpecification, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Arn != nil {
+ objectKey := object.Key("Arn")
+ objectKey.String(*v.Arn)
+ }
+
+ if v.Name != nil {
+ objectKey := object.Key("Name")
+ objectKey.String(*v.Name)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentIcmpTypeCode(v *types.IcmpTypeCode, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Code != nil {
+ objectKey := object.Key("Code")
+ objectKey.Integer(*v.Code)
+ }
+
+ if v.Type != nil {
+ objectKey := object.Key("Type")
+ objectKey.Integer(*v.Type)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentIKEVersionsRequestList(v []types.IKEVersionsRequestListValue, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ if err := awsEc2query_serializeDocumentIKEVersionsRequestListValue(&v[i], av); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentIKEVersionsRequestListValue(v *types.IKEVersionsRequestListValue, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Value != nil {
+ objectKey := object.Key("Value")
+ objectKey.String(*v.Value)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentImageDiskContainer(v *types.ImageDiskContainer, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Description != nil {
+ objectKey := object.Key("Description")
+ objectKey.String(*v.Description)
+ }
+
+ if v.DeviceName != nil {
+ objectKey := object.Key("DeviceName")
+ objectKey.String(*v.DeviceName)
+ }
+
+ if v.Format != nil {
+ objectKey := object.Key("Format")
+ objectKey.String(*v.Format)
+ }
+
+ if v.SnapshotId != nil {
+ objectKey := object.Key("SnapshotId")
+ objectKey.String(*v.SnapshotId)
+ }
+
+ if v.Url != nil {
+ objectKey := object.Key("Url")
+ objectKey.String(*v.Url)
+ }
+
+ if v.UserBucket != nil {
+ objectKey := object.Key("UserBucket")
+ if err := awsEc2query_serializeDocumentUserBucket(v.UserBucket, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentImageDiskContainerList(v []types.ImageDiskContainer, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ if err := awsEc2query_serializeDocumentImageDiskContainer(&v[i], av); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentImageIdList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentImageIdStringList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("ImageId")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentImportImageLicenseConfigurationRequest(v *types.ImportImageLicenseConfigurationRequest, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.LicenseConfigurationArn != nil {
+ objectKey := object.Key("LicenseConfigurationArn")
+ objectKey.String(*v.LicenseConfigurationArn)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentImportImageLicenseSpecificationListRequest(v []types.ImportImageLicenseConfigurationRequest, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ if err := awsEc2query_serializeDocumentImportImageLicenseConfigurationRequest(&v[i], av); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentImportInstanceLaunchSpecification(v *types.ImportInstanceLaunchSpecification, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AdditionalInfo != nil {
+ objectKey := object.Key("AdditionalInfo")
+ objectKey.String(*v.AdditionalInfo)
+ }
+
+ if len(v.Architecture) > 0 {
+ objectKey := object.Key("Architecture")
+ objectKey.String(string(v.Architecture))
+ }
+
+ if v.GroupIds != nil {
+ objectKey := object.FlatKey("GroupId")
+ if err := awsEc2query_serializeDocumentSecurityGroupIdStringList(v.GroupIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.GroupNames != nil {
+ objectKey := object.FlatKey("GroupName")
+ if err := awsEc2query_serializeDocumentSecurityGroupStringList(v.GroupNames, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if len(v.InstanceInitiatedShutdownBehavior) > 0 {
+ objectKey := object.Key("InstanceInitiatedShutdownBehavior")
+ objectKey.String(string(v.InstanceInitiatedShutdownBehavior))
+ }
+
+ if len(v.InstanceType) > 0 {
+ objectKey := object.Key("InstanceType")
+ objectKey.String(string(v.InstanceType))
+ }
+
+ if v.Monitoring != nil {
+ objectKey := object.Key("Monitoring")
+ objectKey.Boolean(*v.Monitoring)
+ }
+
+ if v.Placement != nil {
+ objectKey := object.Key("Placement")
+ if err := awsEc2query_serializeDocumentPlacement(v.Placement, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.PrivateIpAddress != nil {
+ objectKey := object.Key("PrivateIpAddress")
+ objectKey.String(*v.PrivateIpAddress)
+ }
+
+ if v.SubnetId != nil {
+ objectKey := object.Key("SubnetId")
+ objectKey.String(*v.SubnetId)
+ }
+
+ if v.UserData != nil {
+ objectKey := object.Key("UserData")
+ if err := awsEc2query_serializeDocumentUserData(v.UserData, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentImportSnapshotTaskIdList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("ImportTaskId")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentImportTaskIdList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("ImportTaskId")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentInsideCidrBlocksStringList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentInstanceBlockDeviceMappingSpecification(v *types.InstanceBlockDeviceMappingSpecification, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DeviceName != nil {
+ objectKey := object.Key("DeviceName")
+ objectKey.String(*v.DeviceName)
+ }
+
+ if v.Ebs != nil {
+ objectKey := object.Key("Ebs")
+ if err := awsEc2query_serializeDocumentEbsInstanceBlockDeviceSpecification(v.Ebs, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.NoDevice != nil {
+ objectKey := object.Key("NoDevice")
+ objectKey.String(*v.NoDevice)
+ }
+
+ if v.VirtualName != nil {
+ objectKey := object.Key("VirtualName")
+ objectKey.String(*v.VirtualName)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentInstanceBlockDeviceMappingSpecificationList(v []types.InstanceBlockDeviceMappingSpecification, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ if err := awsEc2query_serializeDocumentInstanceBlockDeviceMappingSpecification(&v[i], av); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentInstanceCreditSpecificationListRequest(v []types.InstanceCreditSpecificationRequest, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ if err := awsEc2query_serializeDocumentInstanceCreditSpecificationRequest(&v[i], av); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentInstanceCreditSpecificationRequest(v *types.InstanceCreditSpecificationRequest, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.CpuCredits != nil {
+ objectKey := object.Key("CpuCredits")
+ objectKey.String(*v.CpuCredits)
+ }
+
+ if v.InstanceId != nil {
+ objectKey := object.Key("InstanceId")
+ objectKey.String(*v.InstanceId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentInstanceEventWindowAssociationRequest(v *types.InstanceEventWindowAssociationRequest, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DedicatedHostIds != nil {
+ objectKey := object.FlatKey("DedicatedHostId")
+ if err := awsEc2query_serializeDocumentDedicatedHostIdList(v.DedicatedHostIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.InstanceIds != nil {
+ objectKey := object.FlatKey("InstanceId")
+ if err := awsEc2query_serializeDocumentInstanceIdList(v.InstanceIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.InstanceTags != nil {
+ objectKey := object.FlatKey("InstanceTag")
+ if err := awsEc2query_serializeDocumentTagList(v.InstanceTags, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentInstanceEventWindowDisassociationRequest(v *types.InstanceEventWindowDisassociationRequest, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DedicatedHostIds != nil {
+ objectKey := object.FlatKey("DedicatedHostId")
+ if err := awsEc2query_serializeDocumentDedicatedHostIdList(v.DedicatedHostIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.InstanceIds != nil {
+ objectKey := object.FlatKey("InstanceId")
+ if err := awsEc2query_serializeDocumentInstanceIdList(v.InstanceIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.InstanceTags != nil {
+ objectKey := object.FlatKey("InstanceTag")
+ if err := awsEc2query_serializeDocumentTagList(v.InstanceTags, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentInstanceEventWindowIdSet(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("InstanceEventWindowId")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentInstanceEventWindowTimeRangeRequest(v *types.InstanceEventWindowTimeRangeRequest, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.EndHour != nil {
+ objectKey := object.Key("EndHour")
+ objectKey.Integer(*v.EndHour)
+ }
+
+ if len(v.EndWeekDay) > 0 {
+ objectKey := object.Key("EndWeekDay")
+ objectKey.String(string(v.EndWeekDay))
+ }
+
+ if v.StartHour != nil {
+ objectKey := object.Key("StartHour")
+ objectKey.Integer(*v.StartHour)
+ }
+
+ if len(v.StartWeekDay) > 0 {
+ objectKey := object.Key("StartWeekDay")
+ objectKey.String(string(v.StartWeekDay))
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentInstanceEventWindowTimeRangeRequestSet(v []types.InstanceEventWindowTimeRangeRequest, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Member")
+
+ for i := range v {
+ av := array.Value()
+ if err := awsEc2query_serializeDocumentInstanceEventWindowTimeRangeRequest(&v[i], av); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentInstanceIdList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentInstanceIdStringList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("InstanceId")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentInstanceIpv6Address(v *types.InstanceIpv6Address, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Ipv6Address != nil {
+ objectKey := object.Key("Ipv6Address")
+ objectKey.String(*v.Ipv6Address)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentInstanceIpv6AddressList(v []types.InstanceIpv6Address, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ if err := awsEc2query_serializeDocumentInstanceIpv6Address(&v[i], av); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentInstanceIpv6AddressListRequest(v []types.InstanceIpv6AddressRequest, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("InstanceIpv6Address")
+
+ for i := range v {
+ av := array.Value()
+ if err := awsEc2query_serializeDocumentInstanceIpv6AddressRequest(&v[i], av); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentInstanceIpv6AddressRequest(v *types.InstanceIpv6AddressRequest, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Ipv6Address != nil {
+ objectKey := object.Key("Ipv6Address")
+ objectKey.String(*v.Ipv6Address)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentInstanceMarketOptionsRequest(v *types.InstanceMarketOptionsRequest, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if len(v.MarketType) > 0 {
+ objectKey := object.Key("MarketType")
+ objectKey.String(string(v.MarketType))
+ }
+
+ if v.SpotOptions != nil {
+ objectKey := object.Key("SpotOptions")
+ if err := awsEc2query_serializeDocumentSpotMarketOptions(v.SpotOptions, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentInstanceMetadataOptionsRequest(v *types.InstanceMetadataOptionsRequest, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if len(v.HttpEndpoint) > 0 {
+ objectKey := object.Key("HttpEndpoint")
+ objectKey.String(string(v.HttpEndpoint))
+ }
+
+ if len(v.HttpProtocolIpv6) > 0 {
+ objectKey := object.Key("HttpProtocolIpv6")
+ objectKey.String(string(v.HttpProtocolIpv6))
+ }
+
+ if v.HttpPutResponseHopLimit != nil {
+ objectKey := object.Key("HttpPutResponseHopLimit")
+ objectKey.Integer(*v.HttpPutResponseHopLimit)
+ }
+
+ if len(v.HttpTokens) > 0 {
+ objectKey := object.Key("HttpTokens")
+ objectKey.String(string(v.HttpTokens))
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentInstanceNetworkInterfaceSpecification(v *types.InstanceNetworkInterfaceSpecification, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AssociateCarrierIpAddress != nil {
+ objectKey := object.Key("AssociateCarrierIpAddress")
+ objectKey.Boolean(*v.AssociateCarrierIpAddress)
+ }
+
+ if v.AssociatePublicIpAddress != nil {
+ objectKey := object.Key("AssociatePublicIpAddress")
+ objectKey.Boolean(*v.AssociatePublicIpAddress)
+ }
+
+ if v.DeleteOnTermination != nil {
+ objectKey := object.Key("DeleteOnTermination")
+ objectKey.Boolean(*v.DeleteOnTermination)
+ }
+
+ if v.Description != nil {
+ objectKey := object.Key("Description")
+ objectKey.String(*v.Description)
+ }
+
+ if v.DeviceIndex != nil {
+ objectKey := object.Key("DeviceIndex")
+ objectKey.Integer(*v.DeviceIndex)
+ }
+
+ if v.Groups != nil {
+ objectKey := object.FlatKey("SecurityGroupId")
+ if err := awsEc2query_serializeDocumentSecurityGroupIdStringList(v.Groups, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.InterfaceType != nil {
+ objectKey := object.Key("InterfaceType")
+ objectKey.String(*v.InterfaceType)
+ }
+
+ if v.Ipv4PrefixCount != nil {
+ objectKey := object.Key("Ipv4PrefixCount")
+ objectKey.Integer(*v.Ipv4PrefixCount)
+ }
+
+ if v.Ipv4Prefixes != nil {
+ objectKey := object.FlatKey("Ipv4Prefix")
+ if err := awsEc2query_serializeDocumentIpv4PrefixList(v.Ipv4Prefixes, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.Ipv6AddressCount != nil {
+ objectKey := object.Key("Ipv6AddressCount")
+ objectKey.Integer(*v.Ipv6AddressCount)
+ }
+
+ if v.Ipv6Addresses != nil {
+ objectKey := object.FlatKey("Ipv6Addresses")
+ if err := awsEc2query_serializeDocumentInstanceIpv6AddressList(v.Ipv6Addresses, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.Ipv6PrefixCount != nil {
+ objectKey := object.Key("Ipv6PrefixCount")
+ objectKey.Integer(*v.Ipv6PrefixCount)
+ }
+
+ if v.Ipv6Prefixes != nil {
+ objectKey := object.FlatKey("Ipv6Prefix")
+ if err := awsEc2query_serializeDocumentIpv6PrefixList(v.Ipv6Prefixes, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.NetworkCardIndex != nil {
+ objectKey := object.Key("NetworkCardIndex")
+ objectKey.Integer(*v.NetworkCardIndex)
+ }
+
+ if v.NetworkInterfaceId != nil {
+ objectKey := object.Key("NetworkInterfaceId")
+ objectKey.String(*v.NetworkInterfaceId)
+ }
+
+ if v.PrivateIpAddress != nil {
+ objectKey := object.Key("PrivateIpAddress")
+ objectKey.String(*v.PrivateIpAddress)
+ }
+
+ if v.PrivateIpAddresses != nil {
+ objectKey := object.FlatKey("PrivateIpAddresses")
+ if err := awsEc2query_serializeDocumentPrivateIpAddressSpecificationList(v.PrivateIpAddresses, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.SecondaryPrivateIpAddressCount != nil {
+ objectKey := object.Key("SecondaryPrivateIpAddressCount")
+ objectKey.Integer(*v.SecondaryPrivateIpAddressCount)
+ }
+
+ if v.SubnetId != nil {
+ objectKey := object.Key("SubnetId")
+ objectKey.String(*v.SubnetId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentInstanceNetworkInterfaceSpecificationList(v []types.InstanceNetworkInterfaceSpecification, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ if err := awsEc2query_serializeDocumentInstanceNetworkInterfaceSpecification(&v[i], av); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentInstanceSpecification(v *types.InstanceSpecification, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.ExcludeBootVolume != nil {
+ objectKey := object.Key("ExcludeBootVolume")
+ objectKey.Boolean(*v.ExcludeBootVolume)
+ }
+
+ if v.InstanceId != nil {
+ objectKey := object.Key("InstanceId")
+ objectKey.String(*v.InstanceId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentInstanceTagKeySet(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentInstanceTypeList(v []types.InstanceType, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Member")
+
+ for i := range v {
+ av := array.Value()
+ av.String(string(v[i]))
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentIntegrateServices(v *types.IntegrateServices, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AthenaIntegrations != nil {
+ objectKey := object.FlatKey("AthenaIntegration")
+ if err := awsEc2query_serializeDocumentAthenaIntegrationsSet(v.AthenaIntegrations, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentInternetGatewayIdList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentIpPermission(v *types.IpPermission, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.FromPort != nil {
+ objectKey := object.Key("FromPort")
+ objectKey.Integer(*v.FromPort)
+ }
+
+ if v.IpProtocol != nil {
+ objectKey := object.Key("IpProtocol")
+ objectKey.String(*v.IpProtocol)
+ }
+
+ if v.IpRanges != nil {
+ objectKey := object.FlatKey("IpRanges")
+ if err := awsEc2query_serializeDocumentIpRangeList(v.IpRanges, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.Ipv6Ranges != nil {
+ objectKey := object.FlatKey("Ipv6Ranges")
+ if err := awsEc2query_serializeDocumentIpv6RangeList(v.Ipv6Ranges, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.PrefixListIds != nil {
+ objectKey := object.FlatKey("PrefixListIds")
+ if err := awsEc2query_serializeDocumentPrefixListIdList(v.PrefixListIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.ToPort != nil {
+ objectKey := object.Key("ToPort")
+ objectKey.Integer(*v.ToPort)
+ }
+
+ if v.UserIdGroupPairs != nil {
+ objectKey := object.FlatKey("Groups")
+ if err := awsEc2query_serializeDocumentUserIdGroupPairList(v.UserIdGroupPairs, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentIpPermissionList(v []types.IpPermission, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ if err := awsEc2query_serializeDocumentIpPermission(&v[i], av); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentIpPrefixList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentIpRange(v *types.IpRange, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.CidrIp != nil {
+ objectKey := object.Key("CidrIp")
+ objectKey.String(*v.CidrIp)
+ }
+
+ if v.Description != nil {
+ objectKey := object.Key("Description")
+ objectKey.String(*v.Description)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentIpRangeList(v []types.IpRange, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ if err := awsEc2query_serializeDocumentIpRange(&v[i], av); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentIpv4PrefixList(v []types.Ipv4PrefixSpecificationRequest, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ if err := awsEc2query_serializeDocumentIpv4PrefixSpecificationRequest(&v[i], av); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentIpv4PrefixSpecificationRequest(v *types.Ipv4PrefixSpecificationRequest, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Ipv4Prefix != nil {
+ objectKey := object.Key("Ipv4Prefix")
+ objectKey.String(*v.Ipv4Prefix)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentIpv6AddressList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentIpv6PoolIdList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentIpv6PrefixList(v []types.Ipv6PrefixSpecificationRequest, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ if err := awsEc2query_serializeDocumentIpv6PrefixSpecificationRequest(&v[i], av); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentIpv6PrefixSpecificationRequest(v *types.Ipv6PrefixSpecificationRequest, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Ipv6Prefix != nil {
+ objectKey := object.Key("Ipv6Prefix")
+ objectKey.String(*v.Ipv6Prefix)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentIpv6Range(v *types.Ipv6Range, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.CidrIpv6 != nil {
+ objectKey := object.Key("CidrIpv6")
+ objectKey.String(*v.CidrIpv6)
+ }
+
+ if v.Description != nil {
+ objectKey := object.Key("Description")
+ objectKey.String(*v.Description)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentIpv6RangeList(v []types.Ipv6Range, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ if err := awsEc2query_serializeDocumentIpv6Range(&v[i], av); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentKeyNameStringList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("KeyName")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentKeyPairIdStringList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("KeyPairId")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentLaunchPermission(v *types.LaunchPermission, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if len(v.Group) > 0 {
+ objectKey := object.Key("Group")
+ objectKey.String(string(v.Group))
+ }
+
+ if v.UserId != nil {
+ objectKey := object.Key("UserId")
+ objectKey.String(*v.UserId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentLaunchPermissionList(v []types.LaunchPermission, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ if err := awsEc2query_serializeDocumentLaunchPermission(&v[i], av); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentLaunchPermissionModifications(v *types.LaunchPermissionModifications, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Add != nil {
+ objectKey := object.FlatKey("Add")
+ if err := awsEc2query_serializeDocumentLaunchPermissionList(v.Add, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.Remove != nil {
+ objectKey := object.FlatKey("Remove")
+ if err := awsEc2query_serializeDocumentLaunchPermissionList(v.Remove, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentLaunchSpecsList(v []types.SpotFleetLaunchSpecification, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ if err := awsEc2query_serializeDocumentSpotFleetLaunchSpecification(&v[i], av); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentLaunchTemplateBlockDeviceMappingRequest(v *types.LaunchTemplateBlockDeviceMappingRequest, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DeviceName != nil {
+ objectKey := object.Key("DeviceName")
+ objectKey.String(*v.DeviceName)
+ }
+
+ if v.Ebs != nil {
+ objectKey := object.Key("Ebs")
+ if err := awsEc2query_serializeDocumentLaunchTemplateEbsBlockDeviceRequest(v.Ebs, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.NoDevice != nil {
+ objectKey := object.Key("NoDevice")
+ objectKey.String(*v.NoDevice)
+ }
+
+ if v.VirtualName != nil {
+ objectKey := object.Key("VirtualName")
+ objectKey.String(*v.VirtualName)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentLaunchTemplateBlockDeviceMappingRequestList(v []types.LaunchTemplateBlockDeviceMappingRequest, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("BlockDeviceMapping")
+
+ for i := range v {
+ av := array.Value()
+ if err := awsEc2query_serializeDocumentLaunchTemplateBlockDeviceMappingRequest(&v[i], av); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentLaunchTemplateCapacityReservationSpecificationRequest(v *types.LaunchTemplateCapacityReservationSpecificationRequest, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if len(v.CapacityReservationPreference) > 0 {
+ objectKey := object.Key("CapacityReservationPreference")
+ objectKey.String(string(v.CapacityReservationPreference))
+ }
+
+ if v.CapacityReservationTarget != nil {
+ objectKey := object.Key("CapacityReservationTarget")
+ if err := awsEc2query_serializeDocumentCapacityReservationTarget(v.CapacityReservationTarget, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentLaunchTemplateConfig(v *types.LaunchTemplateConfig, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.LaunchTemplateSpecification != nil {
+ objectKey := object.Key("LaunchTemplateSpecification")
+ if err := awsEc2query_serializeDocumentFleetLaunchTemplateSpecification(v.LaunchTemplateSpecification, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.Overrides != nil {
+ objectKey := object.FlatKey("Overrides")
+ if err := awsEc2query_serializeDocumentLaunchTemplateOverridesList(v.Overrides, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentLaunchTemplateConfigList(v []types.LaunchTemplateConfig, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ if err := awsEc2query_serializeDocumentLaunchTemplateConfig(&v[i], av); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentLaunchTemplateCpuOptionsRequest(v *types.LaunchTemplateCpuOptionsRequest, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.CoreCount != nil {
+ objectKey := object.Key("CoreCount")
+ objectKey.Integer(*v.CoreCount)
+ }
+
+ if v.ThreadsPerCore != nil {
+ objectKey := object.Key("ThreadsPerCore")
+ objectKey.Integer(*v.ThreadsPerCore)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentLaunchTemplateEbsBlockDeviceRequest(v *types.LaunchTemplateEbsBlockDeviceRequest, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DeleteOnTermination != nil {
+ objectKey := object.Key("DeleteOnTermination")
+ objectKey.Boolean(*v.DeleteOnTermination)
+ }
+
+ if v.Encrypted != nil {
+ objectKey := object.Key("Encrypted")
+ objectKey.Boolean(*v.Encrypted)
+ }
+
+ if v.Iops != nil {
+ objectKey := object.Key("Iops")
+ objectKey.Integer(*v.Iops)
+ }
+
+ if v.KmsKeyId != nil {
+ objectKey := object.Key("KmsKeyId")
+ objectKey.String(*v.KmsKeyId)
+ }
+
+ if v.SnapshotId != nil {
+ objectKey := object.Key("SnapshotId")
+ objectKey.String(*v.SnapshotId)
+ }
+
+ if v.Throughput != nil {
+ objectKey := object.Key("Throughput")
+ objectKey.Integer(*v.Throughput)
+ }
+
+ if v.VolumeSize != nil {
+ objectKey := object.Key("VolumeSize")
+ objectKey.Integer(*v.VolumeSize)
+ }
+
+ if len(v.VolumeType) > 0 {
+ objectKey := object.Key("VolumeType")
+ objectKey.String(string(v.VolumeType))
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentLaunchTemplateElasticInferenceAccelerator(v *types.LaunchTemplateElasticInferenceAccelerator, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Count != nil {
+ objectKey := object.Key("Count")
+ objectKey.Integer(*v.Count)
+ }
+
+ if v.Type != nil {
+ objectKey := object.Key("Type")
+ objectKey.String(*v.Type)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentLaunchTemplateElasticInferenceAcceleratorList(v []types.LaunchTemplateElasticInferenceAccelerator, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ if err := awsEc2query_serializeDocumentLaunchTemplateElasticInferenceAccelerator(&v[i], av); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentLaunchTemplateEnclaveOptionsRequest(v *types.LaunchTemplateEnclaveOptionsRequest, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Enabled != nil {
+ objectKey := object.Key("Enabled")
+ objectKey.Boolean(*v.Enabled)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentLaunchTemplateHibernationOptionsRequest(v *types.LaunchTemplateHibernationOptionsRequest, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Configured != nil {
+ objectKey := object.Key("Configured")
+ objectKey.Boolean(*v.Configured)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentLaunchTemplateIamInstanceProfileSpecificationRequest(v *types.LaunchTemplateIamInstanceProfileSpecificationRequest, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Arn != nil {
+ objectKey := object.Key("Arn")
+ objectKey.String(*v.Arn)
+ }
+
+ if v.Name != nil {
+ objectKey := object.Key("Name")
+ objectKey.String(*v.Name)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentLaunchTemplateIdStringList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentLaunchTemplateInstanceMarketOptionsRequest(v *types.LaunchTemplateInstanceMarketOptionsRequest, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if len(v.MarketType) > 0 {
+ objectKey := object.Key("MarketType")
+ objectKey.String(string(v.MarketType))
+ }
+
+ if v.SpotOptions != nil {
+ objectKey := object.Key("SpotOptions")
+ if err := awsEc2query_serializeDocumentLaunchTemplateSpotMarketOptionsRequest(v.SpotOptions, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentLaunchTemplateInstanceMetadataOptionsRequest(v *types.LaunchTemplateInstanceMetadataOptionsRequest, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if len(v.HttpEndpoint) > 0 {
+ objectKey := object.Key("HttpEndpoint")
+ objectKey.String(string(v.HttpEndpoint))
+ }
+
+ if len(v.HttpProtocolIpv6) > 0 {
+ objectKey := object.Key("HttpProtocolIpv6")
+ objectKey.String(string(v.HttpProtocolIpv6))
+ }
+
+ if v.HttpPutResponseHopLimit != nil {
+ objectKey := object.Key("HttpPutResponseHopLimit")
+ objectKey.Integer(*v.HttpPutResponseHopLimit)
+ }
+
+ if len(v.HttpTokens) > 0 {
+ objectKey := object.Key("HttpTokens")
+ objectKey.String(string(v.HttpTokens))
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentLaunchTemplateInstanceNetworkInterfaceSpecificationRequest(v *types.LaunchTemplateInstanceNetworkInterfaceSpecificationRequest, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AssociateCarrierIpAddress != nil {
+ objectKey := object.Key("AssociateCarrierIpAddress")
+ objectKey.Boolean(*v.AssociateCarrierIpAddress)
+ }
+
+ if v.AssociatePublicIpAddress != nil {
+ objectKey := object.Key("AssociatePublicIpAddress")
+ objectKey.Boolean(*v.AssociatePublicIpAddress)
+ }
+
+ if v.DeleteOnTermination != nil {
+ objectKey := object.Key("DeleteOnTermination")
+ objectKey.Boolean(*v.DeleteOnTermination)
+ }
+
+ if v.Description != nil {
+ objectKey := object.Key("Description")
+ objectKey.String(*v.Description)
+ }
+
+ if v.DeviceIndex != nil {
+ objectKey := object.Key("DeviceIndex")
+ objectKey.Integer(*v.DeviceIndex)
+ }
+
+ if v.Groups != nil {
+ objectKey := object.FlatKey("SecurityGroupId")
+ if err := awsEc2query_serializeDocumentSecurityGroupIdStringList(v.Groups, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.InterfaceType != nil {
+ objectKey := object.Key("InterfaceType")
+ objectKey.String(*v.InterfaceType)
+ }
+
+ if v.Ipv4PrefixCount != nil {
+ objectKey := object.Key("Ipv4PrefixCount")
+ objectKey.Integer(*v.Ipv4PrefixCount)
+ }
+
+ if v.Ipv4Prefixes != nil {
+ objectKey := object.FlatKey("Ipv4Prefix")
+ if err := awsEc2query_serializeDocumentIpv4PrefixList(v.Ipv4Prefixes, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.Ipv6AddressCount != nil {
+ objectKey := object.Key("Ipv6AddressCount")
+ objectKey.Integer(*v.Ipv6AddressCount)
+ }
+
+ if v.Ipv6Addresses != nil {
+ objectKey := object.FlatKey("Ipv6Addresses")
+ if err := awsEc2query_serializeDocumentInstanceIpv6AddressListRequest(v.Ipv6Addresses, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.Ipv6PrefixCount != nil {
+ objectKey := object.Key("Ipv6PrefixCount")
+ objectKey.Integer(*v.Ipv6PrefixCount)
+ }
+
+ if v.Ipv6Prefixes != nil {
+ objectKey := object.FlatKey("Ipv6Prefix")
+ if err := awsEc2query_serializeDocumentIpv6PrefixList(v.Ipv6Prefixes, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.NetworkCardIndex != nil {
+ objectKey := object.Key("NetworkCardIndex")
+ objectKey.Integer(*v.NetworkCardIndex)
+ }
+
+ if v.NetworkInterfaceId != nil {
+ objectKey := object.Key("NetworkInterfaceId")
+ objectKey.String(*v.NetworkInterfaceId)
+ }
+
+ if v.PrivateIpAddress != nil {
+ objectKey := object.Key("PrivateIpAddress")
+ objectKey.String(*v.PrivateIpAddress)
+ }
+
+ if v.PrivateIpAddresses != nil {
+ objectKey := object.FlatKey("PrivateIpAddresses")
+ if err := awsEc2query_serializeDocumentPrivateIpAddressSpecificationList(v.PrivateIpAddresses, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.SecondaryPrivateIpAddressCount != nil {
+ objectKey := object.Key("SecondaryPrivateIpAddressCount")
+ objectKey.Integer(*v.SecondaryPrivateIpAddressCount)
+ }
+
+ if v.SubnetId != nil {
+ objectKey := object.Key("SubnetId")
+ objectKey.String(*v.SubnetId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentLaunchTemplateInstanceNetworkInterfaceSpecificationRequestList(v []types.LaunchTemplateInstanceNetworkInterfaceSpecificationRequest, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("InstanceNetworkInterfaceSpecification")
+
+ for i := range v {
+ av := array.Value()
+ if err := awsEc2query_serializeDocumentLaunchTemplateInstanceNetworkInterfaceSpecificationRequest(&v[i], av); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentLaunchTemplateLicenseConfigurationRequest(v *types.LaunchTemplateLicenseConfigurationRequest, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.LicenseConfigurationArn != nil {
+ objectKey := object.Key("LicenseConfigurationArn")
+ objectKey.String(*v.LicenseConfigurationArn)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentLaunchTemplateLicenseSpecificationListRequest(v []types.LaunchTemplateLicenseConfigurationRequest, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ if err := awsEc2query_serializeDocumentLaunchTemplateLicenseConfigurationRequest(&v[i], av); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentLaunchTemplateNameStringList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentLaunchTemplateOverrides(v *types.LaunchTemplateOverrides, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AvailabilityZone != nil {
+ objectKey := object.Key("AvailabilityZone")
+ objectKey.String(*v.AvailabilityZone)
+ }
+
+ if len(v.InstanceType) > 0 {
+ objectKey := object.Key("InstanceType")
+ objectKey.String(string(v.InstanceType))
+ }
+
+ if v.Priority != nil {
+ objectKey := object.Key("Priority")
+ switch {
+ case math.IsNaN(*v.Priority):
+ objectKey.String("NaN")
+
+ case math.IsInf(*v.Priority, 1):
+ objectKey.String("Infinity")
+
+ case math.IsInf(*v.Priority, -1):
+ objectKey.String("-Infinity")
+
+ default:
+ objectKey.Double(*v.Priority)
+
+ }
+ }
+
+ if v.SpotPrice != nil {
+ objectKey := object.Key("SpotPrice")
+ objectKey.String(*v.SpotPrice)
+ }
+
+ if v.SubnetId != nil {
+ objectKey := object.Key("SubnetId")
+ objectKey.String(*v.SubnetId)
+ }
+
+ if v.WeightedCapacity != nil {
+ objectKey := object.Key("WeightedCapacity")
+ switch {
+ case math.IsNaN(*v.WeightedCapacity):
+ objectKey.String("NaN")
+
+ case math.IsInf(*v.WeightedCapacity, 1):
+ objectKey.String("Infinity")
+
+ case math.IsInf(*v.WeightedCapacity, -1):
+ objectKey.String("-Infinity")
+
+ default:
+ objectKey.Double(*v.WeightedCapacity)
+
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentLaunchTemplateOverridesList(v []types.LaunchTemplateOverrides, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ if err := awsEc2query_serializeDocumentLaunchTemplateOverrides(&v[i], av); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentLaunchTemplatePlacementRequest(v *types.LaunchTemplatePlacementRequest, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Affinity != nil {
+ objectKey := object.Key("Affinity")
+ objectKey.String(*v.Affinity)
+ }
+
+ if v.AvailabilityZone != nil {
+ objectKey := object.Key("AvailabilityZone")
+ objectKey.String(*v.AvailabilityZone)
+ }
+
+ if v.GroupName != nil {
+ objectKey := object.Key("GroupName")
+ objectKey.String(*v.GroupName)
+ }
+
+ if v.HostId != nil {
+ objectKey := object.Key("HostId")
+ objectKey.String(*v.HostId)
+ }
+
+ if v.HostResourceGroupArn != nil {
+ objectKey := object.Key("HostResourceGroupArn")
+ objectKey.String(*v.HostResourceGroupArn)
+ }
+
+ if v.PartitionNumber != nil {
+ objectKey := object.Key("PartitionNumber")
+ objectKey.Integer(*v.PartitionNumber)
+ }
+
+ if v.SpreadDomain != nil {
+ objectKey := object.Key("SpreadDomain")
+ objectKey.String(*v.SpreadDomain)
+ }
+
+ if len(v.Tenancy) > 0 {
+ objectKey := object.Key("Tenancy")
+ objectKey.String(string(v.Tenancy))
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentLaunchTemplatesMonitoringRequest(v *types.LaunchTemplatesMonitoringRequest, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Enabled != nil {
+ objectKey := object.Key("Enabled")
+ objectKey.Boolean(*v.Enabled)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentLaunchTemplateSpecification(v *types.LaunchTemplateSpecification, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.LaunchTemplateId != nil {
+ objectKey := object.Key("LaunchTemplateId")
+ objectKey.String(*v.LaunchTemplateId)
+ }
+
+ if v.LaunchTemplateName != nil {
+ objectKey := object.Key("LaunchTemplateName")
+ objectKey.String(*v.LaunchTemplateName)
+ }
+
+ if v.Version != nil {
+ objectKey := object.Key("Version")
+ objectKey.String(*v.Version)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentLaunchTemplateSpotMarketOptionsRequest(v *types.LaunchTemplateSpotMarketOptionsRequest, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.BlockDurationMinutes != nil {
+ objectKey := object.Key("BlockDurationMinutes")
+ objectKey.Integer(*v.BlockDurationMinutes)
+ }
+
+ if len(v.InstanceInterruptionBehavior) > 0 {
+ objectKey := object.Key("InstanceInterruptionBehavior")
+ objectKey.String(string(v.InstanceInterruptionBehavior))
+ }
+
+ if v.MaxPrice != nil {
+ objectKey := object.Key("MaxPrice")
+ objectKey.String(*v.MaxPrice)
+ }
+
+ if len(v.SpotInstanceType) > 0 {
+ objectKey := object.Key("SpotInstanceType")
+ objectKey.String(string(v.SpotInstanceType))
+ }
+
+ if v.ValidUntil != nil {
+ objectKey := object.Key("ValidUntil")
+ objectKey.String(smithytime.FormatDateTime(*v.ValidUntil))
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentLaunchTemplateTagSpecificationRequest(v *types.LaunchTemplateTagSpecificationRequest, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if len(v.ResourceType) > 0 {
+ objectKey := object.Key("ResourceType")
+ objectKey.String(string(v.ResourceType))
+ }
+
+ if v.Tags != nil {
+ objectKey := object.FlatKey("Tag")
+ if err := awsEc2query_serializeDocumentTagList(v.Tags, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentLaunchTemplateTagSpecificationRequestList(v []types.LaunchTemplateTagSpecificationRequest, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("LaunchTemplateTagSpecificationRequest")
+
+ for i := range v {
+ av := array.Value()
+ if err := awsEc2query_serializeDocumentLaunchTemplateTagSpecificationRequest(&v[i], av); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentLicenseConfigurationRequest(v *types.LicenseConfigurationRequest, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.LicenseConfigurationArn != nil {
+ objectKey := object.Key("LicenseConfigurationArn")
+ objectKey.String(*v.LicenseConfigurationArn)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentLicenseSpecificationListRequest(v []types.LicenseConfigurationRequest, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ if err := awsEc2query_serializeDocumentLicenseConfigurationRequest(&v[i], av); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentLoadBalancersConfig(v *types.LoadBalancersConfig, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.ClassicLoadBalancersConfig != nil {
+ objectKey := object.Key("ClassicLoadBalancersConfig")
+ if err := awsEc2query_serializeDocumentClassicLoadBalancersConfig(v.ClassicLoadBalancersConfig, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.TargetGroupsConfig != nil {
+ objectKey := object.Key("TargetGroupsConfig")
+ if err := awsEc2query_serializeDocumentTargetGroupsConfig(v.TargetGroupsConfig, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentLoadPermissionListRequest(v []types.LoadPermissionRequest, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ if err := awsEc2query_serializeDocumentLoadPermissionRequest(&v[i], av); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentLoadPermissionModifications(v *types.LoadPermissionModifications, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Add != nil {
+ objectKey := object.FlatKey("Add")
+ if err := awsEc2query_serializeDocumentLoadPermissionListRequest(v.Add, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.Remove != nil {
+ objectKey := object.FlatKey("Remove")
+ if err := awsEc2query_serializeDocumentLoadPermissionListRequest(v.Remove, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentLoadPermissionRequest(v *types.LoadPermissionRequest, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if len(v.Group) > 0 {
+ objectKey := object.Key("Group")
+ objectKey.String(string(v.Group))
+ }
+
+ if v.UserId != nil {
+ objectKey := object.Key("UserId")
+ objectKey.String(*v.UserId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentLocalGatewayIdSet(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentLocalGatewayRouteTableIdSet(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentLocalGatewayRouteTableVirtualInterfaceGroupAssociationIdSet(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentLocalGatewayRouteTableVpcAssociationIdSet(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentLocalGatewayVirtualInterfaceGroupIdSet(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentLocalGatewayVirtualInterfaceIdSet(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentModifyTransitGatewayOptions(v *types.ModifyTransitGatewayOptions, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AddTransitGatewayCidrBlocks != nil {
+ objectKey := object.FlatKey("AddTransitGatewayCidrBlocks")
+ if err := awsEc2query_serializeDocumentTransitGatewayCidrBlockStringList(v.AddTransitGatewayCidrBlocks, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.AssociationDefaultRouteTableId != nil {
+ objectKey := object.Key("AssociationDefaultRouteTableId")
+ objectKey.String(*v.AssociationDefaultRouteTableId)
+ }
+
+ if len(v.AutoAcceptSharedAttachments) > 0 {
+ objectKey := object.Key("AutoAcceptSharedAttachments")
+ objectKey.String(string(v.AutoAcceptSharedAttachments))
+ }
+
+ if len(v.DefaultRouteTableAssociation) > 0 {
+ objectKey := object.Key("DefaultRouteTableAssociation")
+ objectKey.String(string(v.DefaultRouteTableAssociation))
+ }
+
+ if len(v.DefaultRouteTablePropagation) > 0 {
+ objectKey := object.Key("DefaultRouteTablePropagation")
+ objectKey.String(string(v.DefaultRouteTablePropagation))
+ }
+
+ if len(v.DnsSupport) > 0 {
+ objectKey := object.Key("DnsSupport")
+ objectKey.String(string(v.DnsSupport))
+ }
+
+ if v.PropagationDefaultRouteTableId != nil {
+ objectKey := object.Key("PropagationDefaultRouteTableId")
+ objectKey.String(*v.PropagationDefaultRouteTableId)
+ }
+
+ if v.RemoveTransitGatewayCidrBlocks != nil {
+ objectKey := object.FlatKey("RemoveTransitGatewayCidrBlocks")
+ if err := awsEc2query_serializeDocumentTransitGatewayCidrBlockStringList(v.RemoveTransitGatewayCidrBlocks, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if len(v.VpnEcmpSupport) > 0 {
+ objectKey := object.Key("VpnEcmpSupport")
+ objectKey.String(string(v.VpnEcmpSupport))
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentModifyTransitGatewayVpcAttachmentRequestOptions(v *types.ModifyTransitGatewayVpcAttachmentRequestOptions, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if len(v.ApplianceModeSupport) > 0 {
+ objectKey := object.Key("ApplianceModeSupport")
+ objectKey.String(string(v.ApplianceModeSupport))
+ }
+
+ if len(v.DnsSupport) > 0 {
+ objectKey := object.Key("DnsSupport")
+ objectKey.String(string(v.DnsSupport))
+ }
+
+ if len(v.Ipv6Support) > 0 {
+ objectKey := object.Key("Ipv6Support")
+ objectKey.String(string(v.Ipv6Support))
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentModifyVpnTunnelOptionsSpecification(v *types.ModifyVpnTunnelOptionsSpecification, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DPDTimeoutAction != nil {
+ objectKey := object.Key("DPDTimeoutAction")
+ objectKey.String(*v.DPDTimeoutAction)
+ }
+
+ if v.DPDTimeoutSeconds != nil {
+ objectKey := object.Key("DPDTimeoutSeconds")
+ objectKey.Integer(*v.DPDTimeoutSeconds)
+ }
+
+ if v.IKEVersions != nil {
+ objectKey := object.FlatKey("IKEVersion")
+ if err := awsEc2query_serializeDocumentIKEVersionsRequestList(v.IKEVersions, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.Phase1DHGroupNumbers != nil {
+ objectKey := object.FlatKey("Phase1DHGroupNumber")
+ if err := awsEc2query_serializeDocumentPhase1DHGroupNumbersRequestList(v.Phase1DHGroupNumbers, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.Phase1EncryptionAlgorithms != nil {
+ objectKey := object.FlatKey("Phase1EncryptionAlgorithm")
+ if err := awsEc2query_serializeDocumentPhase1EncryptionAlgorithmsRequestList(v.Phase1EncryptionAlgorithms, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.Phase1IntegrityAlgorithms != nil {
+ objectKey := object.FlatKey("Phase1IntegrityAlgorithm")
+ if err := awsEc2query_serializeDocumentPhase1IntegrityAlgorithmsRequestList(v.Phase1IntegrityAlgorithms, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.Phase1LifetimeSeconds != nil {
+ objectKey := object.Key("Phase1LifetimeSeconds")
+ objectKey.Integer(*v.Phase1LifetimeSeconds)
+ }
+
+ if v.Phase2DHGroupNumbers != nil {
+ objectKey := object.FlatKey("Phase2DHGroupNumber")
+ if err := awsEc2query_serializeDocumentPhase2DHGroupNumbersRequestList(v.Phase2DHGroupNumbers, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.Phase2EncryptionAlgorithms != nil {
+ objectKey := object.FlatKey("Phase2EncryptionAlgorithm")
+ if err := awsEc2query_serializeDocumentPhase2EncryptionAlgorithmsRequestList(v.Phase2EncryptionAlgorithms, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.Phase2IntegrityAlgorithms != nil {
+ objectKey := object.FlatKey("Phase2IntegrityAlgorithm")
+ if err := awsEc2query_serializeDocumentPhase2IntegrityAlgorithmsRequestList(v.Phase2IntegrityAlgorithms, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.Phase2LifetimeSeconds != nil {
+ objectKey := object.Key("Phase2LifetimeSeconds")
+ objectKey.Integer(*v.Phase2LifetimeSeconds)
+ }
+
+ if v.PreSharedKey != nil {
+ objectKey := object.Key("PreSharedKey")
+ objectKey.String(*v.PreSharedKey)
+ }
+
+ if v.RekeyFuzzPercentage != nil {
+ objectKey := object.Key("RekeyFuzzPercentage")
+ objectKey.Integer(*v.RekeyFuzzPercentage)
+ }
+
+ if v.RekeyMarginTimeSeconds != nil {
+ objectKey := object.Key("RekeyMarginTimeSeconds")
+ objectKey.Integer(*v.RekeyMarginTimeSeconds)
+ }
+
+ if v.ReplayWindowSize != nil {
+ objectKey := object.Key("ReplayWindowSize")
+ objectKey.Integer(*v.ReplayWindowSize)
+ }
+
+ if v.StartupAction != nil {
+ objectKey := object.Key("StartupAction")
+ objectKey.String(*v.StartupAction)
+ }
+
+ if v.TunnelInsideCidr != nil {
+ objectKey := object.Key("TunnelInsideCidr")
+ objectKey.String(*v.TunnelInsideCidr)
+ }
+
+ if v.TunnelInsideIpv6Cidr != nil {
+ objectKey := object.Key("TunnelInsideIpv6Cidr")
+ objectKey.String(*v.TunnelInsideIpv6Cidr)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentNatGatewayIdStringList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentNetworkAclIdStringList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentNetworkInsightsAnalysisIdList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentNetworkInsightsPathIdList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentNetworkInterfaceAttachmentChanges(v *types.NetworkInterfaceAttachmentChanges, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AttachmentId != nil {
+ objectKey := object.Key("AttachmentId")
+ objectKey.String(*v.AttachmentId)
+ }
+
+ if v.DeleteOnTermination != nil {
+ objectKey := object.Key("DeleteOnTermination")
+ objectKey.Boolean(*v.DeleteOnTermination)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentNetworkInterfaceIdList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentNetworkInterfacePermissionIdList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Member")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentNewDhcpConfiguration(v *types.NewDhcpConfiguration, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Key != nil {
+ objectKey := object.Key("Key")
+ objectKey.String(*v.Key)
+ }
+
+ if v.Values != nil {
+ objectKey := object.FlatKey("Value")
+ if err := awsEc2query_serializeDocumentValueStringList(v.Values, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentNewDhcpConfigurationList(v []types.NewDhcpConfiguration, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ if err := awsEc2query_serializeDocumentNewDhcpConfiguration(&v[i], av); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentOccurrenceDayRequestSet(v []int32, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("OccurenceDay")
+
+ for i := range v {
+ av := array.Value()
+ av.Integer(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentOnDemandOptionsRequest(v *types.OnDemandOptionsRequest, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if len(v.AllocationStrategy) > 0 {
+ objectKey := object.Key("AllocationStrategy")
+ objectKey.String(string(v.AllocationStrategy))
+ }
+
+ if v.CapacityReservationOptions != nil {
+ objectKey := object.Key("CapacityReservationOptions")
+ if err := awsEc2query_serializeDocumentCapacityReservationOptionsRequest(v.CapacityReservationOptions, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxTotalPrice != nil {
+ objectKey := object.Key("MaxTotalPrice")
+ objectKey.String(*v.MaxTotalPrice)
+ }
+
+ if v.MinTargetCapacity != nil {
+ objectKey := object.Key("MinTargetCapacity")
+ objectKey.Integer(*v.MinTargetCapacity)
+ }
+
+ if v.SingleAvailabilityZone != nil {
+ objectKey := object.Key("SingleAvailabilityZone")
+ objectKey.Boolean(*v.SingleAvailabilityZone)
+ }
+
+ if v.SingleInstanceType != nil {
+ objectKey := object.Key("SingleInstanceType")
+ objectKey.Boolean(*v.SingleInstanceType)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentOwnerStringList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Owner")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentPeeringConnectionOptionsRequest(v *types.PeeringConnectionOptionsRequest, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AllowDnsResolutionFromRemoteVpc != nil {
+ objectKey := object.Key("AllowDnsResolutionFromRemoteVpc")
+ objectKey.Boolean(*v.AllowDnsResolutionFromRemoteVpc)
+ }
+
+ if v.AllowEgressFromLocalClassicLinkToRemoteVpc != nil {
+ objectKey := object.Key("AllowEgressFromLocalClassicLinkToRemoteVpc")
+ objectKey.Boolean(*v.AllowEgressFromLocalClassicLinkToRemoteVpc)
+ }
+
+ if v.AllowEgressFromLocalVpcToRemoteClassicLink != nil {
+ objectKey := object.Key("AllowEgressFromLocalVpcToRemoteClassicLink")
+ objectKey.Boolean(*v.AllowEgressFromLocalVpcToRemoteClassicLink)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentPhase1DHGroupNumbersRequestList(v []types.Phase1DHGroupNumbersRequestListValue, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ if err := awsEc2query_serializeDocumentPhase1DHGroupNumbersRequestListValue(&v[i], av); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentPhase1DHGroupNumbersRequestListValue(v *types.Phase1DHGroupNumbersRequestListValue, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Value != nil {
+ objectKey := object.Key("Value")
+ objectKey.Integer(*v.Value)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentPhase1EncryptionAlgorithmsRequestList(v []types.Phase1EncryptionAlgorithmsRequestListValue, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ if err := awsEc2query_serializeDocumentPhase1EncryptionAlgorithmsRequestListValue(&v[i], av); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentPhase1EncryptionAlgorithmsRequestListValue(v *types.Phase1EncryptionAlgorithmsRequestListValue, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Value != nil {
+ objectKey := object.Key("Value")
+ objectKey.String(*v.Value)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentPhase1IntegrityAlgorithmsRequestList(v []types.Phase1IntegrityAlgorithmsRequestListValue, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ if err := awsEc2query_serializeDocumentPhase1IntegrityAlgorithmsRequestListValue(&v[i], av); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentPhase1IntegrityAlgorithmsRequestListValue(v *types.Phase1IntegrityAlgorithmsRequestListValue, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Value != nil {
+ objectKey := object.Key("Value")
+ objectKey.String(*v.Value)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentPhase2DHGroupNumbersRequestList(v []types.Phase2DHGroupNumbersRequestListValue, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ if err := awsEc2query_serializeDocumentPhase2DHGroupNumbersRequestListValue(&v[i], av); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentPhase2DHGroupNumbersRequestListValue(v *types.Phase2DHGroupNumbersRequestListValue, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Value != nil {
+ objectKey := object.Key("Value")
+ objectKey.Integer(*v.Value)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentPhase2EncryptionAlgorithmsRequestList(v []types.Phase2EncryptionAlgorithmsRequestListValue, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ if err := awsEc2query_serializeDocumentPhase2EncryptionAlgorithmsRequestListValue(&v[i], av); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentPhase2EncryptionAlgorithmsRequestListValue(v *types.Phase2EncryptionAlgorithmsRequestListValue, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Value != nil {
+ objectKey := object.Key("Value")
+ objectKey.String(*v.Value)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentPhase2IntegrityAlgorithmsRequestList(v []types.Phase2IntegrityAlgorithmsRequestListValue, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ if err := awsEc2query_serializeDocumentPhase2IntegrityAlgorithmsRequestListValue(&v[i], av); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentPhase2IntegrityAlgorithmsRequestListValue(v *types.Phase2IntegrityAlgorithmsRequestListValue, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Value != nil {
+ objectKey := object.Key("Value")
+ objectKey.String(*v.Value)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentPlacement(v *types.Placement, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Affinity != nil {
+ objectKey := object.Key("Affinity")
+ objectKey.String(*v.Affinity)
+ }
+
+ if v.AvailabilityZone != nil {
+ objectKey := object.Key("AvailabilityZone")
+ objectKey.String(*v.AvailabilityZone)
+ }
+
+ if v.GroupName != nil {
+ objectKey := object.Key("GroupName")
+ objectKey.String(*v.GroupName)
+ }
+
+ if v.HostId != nil {
+ objectKey := object.Key("HostId")
+ objectKey.String(*v.HostId)
+ }
+
+ if v.HostResourceGroupArn != nil {
+ objectKey := object.Key("HostResourceGroupArn")
+ objectKey.String(*v.HostResourceGroupArn)
+ }
+
+ if v.PartitionNumber != nil {
+ objectKey := object.Key("PartitionNumber")
+ objectKey.Integer(*v.PartitionNumber)
+ }
+
+ if v.SpreadDomain != nil {
+ objectKey := object.Key("SpreadDomain")
+ objectKey.String(*v.SpreadDomain)
+ }
+
+ if len(v.Tenancy) > 0 {
+ objectKey := object.Key("Tenancy")
+ objectKey.String(string(v.Tenancy))
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentPlacementGroupIdStringList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("GroupId")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentPlacementGroupStringList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Member")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentPortRange(v *types.PortRange, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.From != nil {
+ objectKey := object.Key("From")
+ objectKey.Integer(*v.From)
+ }
+
+ if v.To != nil {
+ objectKey := object.Key("To")
+ objectKey.Integer(*v.To)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentPrefixListId(v *types.PrefixListId, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Description != nil {
+ objectKey := object.Key("Description")
+ objectKey.String(*v.Description)
+ }
+
+ if v.PrefixListId != nil {
+ objectKey := object.Key("PrefixListId")
+ objectKey.String(*v.PrefixListId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentPrefixListIdList(v []types.PrefixListId, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ if err := awsEc2query_serializeDocumentPrefixListId(&v[i], av); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentPrefixListResourceIdStringList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentPriceScheduleSpecification(v *types.PriceScheduleSpecification, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if len(v.CurrencyCode) > 0 {
+ objectKey := object.Key("CurrencyCode")
+ objectKey.String(string(v.CurrencyCode))
+ }
+
+ if v.Price != nil {
+ objectKey := object.Key("Price")
+ switch {
+ case math.IsNaN(*v.Price):
+ objectKey.String("NaN")
+
+ case math.IsInf(*v.Price, 1):
+ objectKey.String("Infinity")
+
+ case math.IsInf(*v.Price, -1):
+ objectKey.String("-Infinity")
+
+ default:
+ objectKey.Double(*v.Price)
+
+ }
+ }
+
+ if v.Term != nil {
+ objectKey := object.Key("Term")
+ objectKey.Long(*v.Term)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentPriceScheduleSpecificationList(v []types.PriceScheduleSpecification, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ if err := awsEc2query_serializeDocumentPriceScheduleSpecification(&v[i], av); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentPrivateIpAddressConfigSet(v []types.ScheduledInstancesPrivateIpAddressConfig, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("PrivateIpAddressConfigSet")
+
+ for i := range v {
+ av := array.Value()
+ if err := awsEc2query_serializeDocumentScheduledInstancesPrivateIpAddressConfig(&v[i], av); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentPrivateIpAddressSpecification(v *types.PrivateIpAddressSpecification, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Primary != nil {
+ objectKey := object.Key("Primary")
+ objectKey.Boolean(*v.Primary)
+ }
+
+ if v.PrivateIpAddress != nil {
+ objectKey := object.Key("PrivateIpAddress")
+ objectKey.String(*v.PrivateIpAddress)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentPrivateIpAddressSpecificationList(v []types.PrivateIpAddressSpecification, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ if err := awsEc2query_serializeDocumentPrivateIpAddressSpecification(&v[i], av); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentPrivateIpAddressStringList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("PrivateIpAddress")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentProductCodeStringList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("ProductCode")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentProductDescriptionList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Member")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentPublicIpStringList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("PublicIp")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentPublicIpv4PoolIdStringList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentPurchaseRequest(v *types.PurchaseRequest, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.InstanceCount != nil {
+ objectKey := object.Key("InstanceCount")
+ objectKey.Integer(*v.InstanceCount)
+ }
+
+ if v.PurchaseToken != nil {
+ objectKey := object.Key("PurchaseToken")
+ objectKey.String(*v.PurchaseToken)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentPurchaseRequestSet(v []types.PurchaseRequest, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("PurchaseRequest")
+
+ for i := range v {
+ av := array.Value()
+ if err := awsEc2query_serializeDocumentPurchaseRequest(&v[i], av); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentReasonCodesList(v []types.ReportInstanceReasonCodes, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ av.String(string(v[i]))
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentRegionNameStringList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("RegionName")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentRegisterInstanceTagAttributeRequest(v *types.RegisterInstanceTagAttributeRequest, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.IncludeAllTagsOfInstance != nil {
+ objectKey := object.Key("IncludeAllTagsOfInstance")
+ objectKey.Boolean(*v.IncludeAllTagsOfInstance)
+ }
+
+ if v.InstanceTagKeys != nil {
+ objectKey := object.FlatKey("InstanceTagKey")
+ if err := awsEc2query_serializeDocumentInstanceTagKeySet(v.InstanceTagKeys, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentRemovePrefixListEntries(v []types.RemovePrefixListEntry, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Member")
+
+ for i := range v {
+ av := array.Value()
+ if err := awsEc2query_serializeDocumentRemovePrefixListEntry(&v[i], av); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentRemovePrefixListEntry(v *types.RemovePrefixListEntry, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Cidr != nil {
+ objectKey := object.Key("Cidr")
+ objectKey.String(*v.Cidr)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentReplaceRootVolumeTaskIds(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("ReplaceRootVolumeTaskId")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentRequestHostIdList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentRequestHostIdSet(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentRequestInstanceTypeList(v []types.InstanceType, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Member")
+
+ for i := range v {
+ av := array.Value()
+ av.String(string(v[i]))
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentRequestLaunchTemplateData(v *types.RequestLaunchTemplateData, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.BlockDeviceMappings != nil {
+ objectKey := object.FlatKey("BlockDeviceMapping")
+ if err := awsEc2query_serializeDocumentLaunchTemplateBlockDeviceMappingRequestList(v.BlockDeviceMappings, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.CapacityReservationSpecification != nil {
+ objectKey := object.Key("CapacityReservationSpecification")
+ if err := awsEc2query_serializeDocumentLaunchTemplateCapacityReservationSpecificationRequest(v.CapacityReservationSpecification, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.CpuOptions != nil {
+ objectKey := object.Key("CpuOptions")
+ if err := awsEc2query_serializeDocumentLaunchTemplateCpuOptionsRequest(v.CpuOptions, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.CreditSpecification != nil {
+ objectKey := object.Key("CreditSpecification")
+ if err := awsEc2query_serializeDocumentCreditSpecificationRequest(v.CreditSpecification, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.DisableApiTermination != nil {
+ objectKey := object.Key("DisableApiTermination")
+ objectKey.Boolean(*v.DisableApiTermination)
+ }
+
+ if v.EbsOptimized != nil {
+ objectKey := object.Key("EbsOptimized")
+ objectKey.Boolean(*v.EbsOptimized)
+ }
+
+ if v.ElasticGpuSpecifications != nil {
+ objectKey := object.FlatKey("ElasticGpuSpecification")
+ if err := awsEc2query_serializeDocumentElasticGpuSpecificationList(v.ElasticGpuSpecifications, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.ElasticInferenceAccelerators != nil {
+ objectKey := object.FlatKey("ElasticInferenceAccelerator")
+ if err := awsEc2query_serializeDocumentLaunchTemplateElasticInferenceAcceleratorList(v.ElasticInferenceAccelerators, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.EnclaveOptions != nil {
+ objectKey := object.Key("EnclaveOptions")
+ if err := awsEc2query_serializeDocumentLaunchTemplateEnclaveOptionsRequest(v.EnclaveOptions, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.HibernationOptions != nil {
+ objectKey := object.Key("HibernationOptions")
+ if err := awsEc2query_serializeDocumentLaunchTemplateHibernationOptionsRequest(v.HibernationOptions, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.IamInstanceProfile != nil {
+ objectKey := object.Key("IamInstanceProfile")
+ if err := awsEc2query_serializeDocumentLaunchTemplateIamInstanceProfileSpecificationRequest(v.IamInstanceProfile, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.ImageId != nil {
+ objectKey := object.Key("ImageId")
+ objectKey.String(*v.ImageId)
+ }
+
+ if len(v.InstanceInitiatedShutdownBehavior) > 0 {
+ objectKey := object.Key("InstanceInitiatedShutdownBehavior")
+ objectKey.String(string(v.InstanceInitiatedShutdownBehavior))
+ }
+
+ if v.InstanceMarketOptions != nil {
+ objectKey := object.Key("InstanceMarketOptions")
+ if err := awsEc2query_serializeDocumentLaunchTemplateInstanceMarketOptionsRequest(v.InstanceMarketOptions, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if len(v.InstanceType) > 0 {
+ objectKey := object.Key("InstanceType")
+ objectKey.String(string(v.InstanceType))
+ }
+
+ if v.KernelId != nil {
+ objectKey := object.Key("KernelId")
+ objectKey.String(*v.KernelId)
+ }
+
+ if v.KeyName != nil {
+ objectKey := object.Key("KeyName")
+ objectKey.String(*v.KeyName)
+ }
+
+ if v.LicenseSpecifications != nil {
+ objectKey := object.FlatKey("LicenseSpecification")
+ if err := awsEc2query_serializeDocumentLaunchTemplateLicenseSpecificationListRequest(v.LicenseSpecifications, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MetadataOptions != nil {
+ objectKey := object.Key("MetadataOptions")
+ if err := awsEc2query_serializeDocumentLaunchTemplateInstanceMetadataOptionsRequest(v.MetadataOptions, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.Monitoring != nil {
+ objectKey := object.Key("Monitoring")
+ if err := awsEc2query_serializeDocumentLaunchTemplatesMonitoringRequest(v.Monitoring, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.NetworkInterfaces != nil {
+ objectKey := object.FlatKey("NetworkInterface")
+ if err := awsEc2query_serializeDocumentLaunchTemplateInstanceNetworkInterfaceSpecificationRequestList(v.NetworkInterfaces, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.Placement != nil {
+ objectKey := object.Key("Placement")
+ if err := awsEc2query_serializeDocumentLaunchTemplatePlacementRequest(v.Placement, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.RamDiskId != nil {
+ objectKey := object.Key("RamDiskId")
+ objectKey.String(*v.RamDiskId)
+ }
+
+ if v.SecurityGroupIds != nil {
+ objectKey := object.FlatKey("SecurityGroupId")
+ if err := awsEc2query_serializeDocumentSecurityGroupIdStringList(v.SecurityGroupIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.SecurityGroups != nil {
+ objectKey := object.FlatKey("SecurityGroup")
+ if err := awsEc2query_serializeDocumentSecurityGroupStringList(v.SecurityGroups, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.TagSpecifications != nil {
+ objectKey := object.FlatKey("TagSpecification")
+ if err := awsEc2query_serializeDocumentLaunchTemplateTagSpecificationRequestList(v.TagSpecifications, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.UserData != nil {
+ objectKey := object.Key("UserData")
+ objectKey.String(*v.UserData)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentRequestSpotLaunchSpecification(v *types.RequestSpotLaunchSpecification, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AddressingType != nil {
+ objectKey := object.Key("AddressingType")
+ objectKey.String(*v.AddressingType)
+ }
+
+ if v.BlockDeviceMappings != nil {
+ objectKey := object.FlatKey("BlockDeviceMapping")
+ if err := awsEc2query_serializeDocumentBlockDeviceMappingList(v.BlockDeviceMappings, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.EbsOptimized != nil {
+ objectKey := object.Key("EbsOptimized")
+ objectKey.Boolean(*v.EbsOptimized)
+ }
+
+ if v.IamInstanceProfile != nil {
+ objectKey := object.Key("IamInstanceProfile")
+ if err := awsEc2query_serializeDocumentIamInstanceProfileSpecification(v.IamInstanceProfile, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.ImageId != nil {
+ objectKey := object.Key("ImageId")
+ objectKey.String(*v.ImageId)
+ }
+
+ if len(v.InstanceType) > 0 {
+ objectKey := object.Key("InstanceType")
+ objectKey.String(string(v.InstanceType))
+ }
+
+ if v.KernelId != nil {
+ objectKey := object.Key("KernelId")
+ objectKey.String(*v.KernelId)
+ }
+
+ if v.KeyName != nil {
+ objectKey := object.Key("KeyName")
+ objectKey.String(*v.KeyName)
+ }
+
+ if v.Monitoring != nil {
+ objectKey := object.Key("Monitoring")
+ if err := awsEc2query_serializeDocumentRunInstancesMonitoringEnabled(v.Monitoring, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.NetworkInterfaces != nil {
+ objectKey := object.FlatKey("NetworkInterface")
+ if err := awsEc2query_serializeDocumentInstanceNetworkInterfaceSpecificationList(v.NetworkInterfaces, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.Placement != nil {
+ objectKey := object.Key("Placement")
+ if err := awsEc2query_serializeDocumentSpotPlacement(v.Placement, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.RamdiskId != nil {
+ objectKey := object.Key("RamdiskId")
+ objectKey.String(*v.RamdiskId)
+ }
+
+ if v.SecurityGroupIds != nil {
+ objectKey := object.FlatKey("SecurityGroupId")
+ if err := awsEc2query_serializeDocumentRequestSpotLaunchSpecificationSecurityGroupIdList(v.SecurityGroupIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.SecurityGroups != nil {
+ objectKey := object.FlatKey("SecurityGroup")
+ if err := awsEc2query_serializeDocumentRequestSpotLaunchSpecificationSecurityGroupList(v.SecurityGroups, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.SubnetId != nil {
+ objectKey := object.Key("SubnetId")
+ objectKey.String(*v.SubnetId)
+ }
+
+ if v.UserData != nil {
+ objectKey := object.Key("UserData")
+ objectKey.String(*v.UserData)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentRequestSpotLaunchSpecificationSecurityGroupIdList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentRequestSpotLaunchSpecificationSecurityGroupList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentReservedInstanceIdSet(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("ReservedInstanceId")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentReservedInstanceLimitPrice(v *types.ReservedInstanceLimitPrice, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Amount != nil {
+ objectKey := object.Key("Amount")
+ switch {
+ case math.IsNaN(*v.Amount):
+ objectKey.String("NaN")
+
+ case math.IsInf(*v.Amount, 1):
+ objectKey.String("Infinity")
+
+ case math.IsInf(*v.Amount, -1):
+ objectKey.String("-Infinity")
+
+ default:
+ objectKey.Double(*v.Amount)
+
+ }
+ }
+
+ if len(v.CurrencyCode) > 0 {
+ objectKey := object.Key("CurrencyCode")
+ objectKey.String(string(v.CurrencyCode))
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentReservedInstancesConfiguration(v *types.ReservedInstancesConfiguration, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AvailabilityZone != nil {
+ objectKey := object.Key("AvailabilityZone")
+ objectKey.String(*v.AvailabilityZone)
+ }
+
+ if v.InstanceCount != nil {
+ objectKey := object.Key("InstanceCount")
+ objectKey.Integer(*v.InstanceCount)
+ }
+
+ if len(v.InstanceType) > 0 {
+ objectKey := object.Key("InstanceType")
+ objectKey.String(string(v.InstanceType))
+ }
+
+ if v.Platform != nil {
+ objectKey := object.Key("Platform")
+ objectKey.String(*v.Platform)
+ }
+
+ if len(v.Scope) > 0 {
+ objectKey := object.Key("Scope")
+ objectKey.String(string(v.Scope))
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentReservedInstancesConfigurationList(v []types.ReservedInstancesConfiguration, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ if err := awsEc2query_serializeDocumentReservedInstancesConfiguration(&v[i], av); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentReservedInstancesIdStringList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("ReservedInstancesId")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentReservedInstancesModificationIdStringList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("ReservedInstancesModificationId")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentReservedInstancesOfferingIdStringList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Member")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentResourceIdList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Member")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentResourceList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentRestorableByStringList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Member")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentRouteTableIdStringList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentRunInstancesMonitoringEnabled(v *types.RunInstancesMonitoringEnabled, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Enabled != nil {
+ objectKey := object.Key("Enabled")
+ objectKey.Boolean(*v.Enabled)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentS3ObjectTag(v *types.S3ObjectTag, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Key != nil {
+ objectKey := object.Key("Key")
+ objectKey.String(*v.Key)
+ }
+
+ if v.Value != nil {
+ objectKey := object.Key("Value")
+ objectKey.String(*v.Value)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentS3ObjectTagList(v []types.S3ObjectTag, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ if err := awsEc2query_serializeDocumentS3ObjectTag(&v[i], av); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentS3Storage(v *types.S3Storage, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AWSAccessKeyId != nil {
+ objectKey := object.Key("AWSAccessKeyId")
+ objectKey.String(*v.AWSAccessKeyId)
+ }
+
+ if v.Bucket != nil {
+ objectKey := object.Key("Bucket")
+ objectKey.String(*v.Bucket)
+ }
+
+ if v.Prefix != nil {
+ objectKey := object.Key("Prefix")
+ objectKey.String(*v.Prefix)
+ }
+
+ if v.UploadPolicy != nil {
+ objectKey := object.Key("UploadPolicy")
+ objectKey.Base64EncodeBytes(v.UploadPolicy)
+ }
+
+ if v.UploadPolicySignature != nil {
+ objectKey := object.Key("UploadPolicySignature")
+ objectKey.String(*v.UploadPolicySignature)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentScheduledInstanceIdRequestSet(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("ScheduledInstanceId")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentScheduledInstanceRecurrenceRequest(v *types.ScheduledInstanceRecurrenceRequest, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Frequency != nil {
+ objectKey := object.Key("Frequency")
+ objectKey.String(*v.Frequency)
+ }
+
+ if v.Interval != nil {
+ objectKey := object.Key("Interval")
+ objectKey.Integer(*v.Interval)
+ }
+
+ if v.OccurrenceDays != nil {
+ objectKey := object.FlatKey("OccurrenceDay")
+ if err := awsEc2query_serializeDocumentOccurrenceDayRequestSet(v.OccurrenceDays, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.OccurrenceRelativeToEnd != nil {
+ objectKey := object.Key("OccurrenceRelativeToEnd")
+ objectKey.Boolean(*v.OccurrenceRelativeToEnd)
+ }
+
+ if v.OccurrenceUnit != nil {
+ objectKey := object.Key("OccurrenceUnit")
+ objectKey.String(*v.OccurrenceUnit)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentScheduledInstancesBlockDeviceMapping(v *types.ScheduledInstancesBlockDeviceMapping, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DeviceName != nil {
+ objectKey := object.Key("DeviceName")
+ objectKey.String(*v.DeviceName)
+ }
+
+ if v.Ebs != nil {
+ objectKey := object.Key("Ebs")
+ if err := awsEc2query_serializeDocumentScheduledInstancesEbs(v.Ebs, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.NoDevice != nil {
+ objectKey := object.Key("NoDevice")
+ objectKey.String(*v.NoDevice)
+ }
+
+ if v.VirtualName != nil {
+ objectKey := object.Key("VirtualName")
+ objectKey.String(*v.VirtualName)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentScheduledInstancesBlockDeviceMappingSet(v []types.ScheduledInstancesBlockDeviceMapping, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("BlockDeviceMapping")
+
+ for i := range v {
+ av := array.Value()
+ if err := awsEc2query_serializeDocumentScheduledInstancesBlockDeviceMapping(&v[i], av); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentScheduledInstancesEbs(v *types.ScheduledInstancesEbs, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DeleteOnTermination != nil {
+ objectKey := object.Key("DeleteOnTermination")
+ objectKey.Boolean(*v.DeleteOnTermination)
+ }
+
+ if v.Encrypted != nil {
+ objectKey := object.Key("Encrypted")
+ objectKey.Boolean(*v.Encrypted)
+ }
+
+ if v.Iops != nil {
+ objectKey := object.Key("Iops")
+ objectKey.Integer(*v.Iops)
+ }
+
+ if v.SnapshotId != nil {
+ objectKey := object.Key("SnapshotId")
+ objectKey.String(*v.SnapshotId)
+ }
+
+ if v.VolumeSize != nil {
+ objectKey := object.Key("VolumeSize")
+ objectKey.Integer(*v.VolumeSize)
+ }
+
+ if v.VolumeType != nil {
+ objectKey := object.Key("VolumeType")
+ objectKey.String(*v.VolumeType)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentScheduledInstancesIamInstanceProfile(v *types.ScheduledInstancesIamInstanceProfile, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Arn != nil {
+ objectKey := object.Key("Arn")
+ objectKey.String(*v.Arn)
+ }
+
+ if v.Name != nil {
+ objectKey := object.Key("Name")
+ objectKey.String(*v.Name)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentScheduledInstancesIpv6Address(v *types.ScheduledInstancesIpv6Address, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Ipv6Address != nil {
+ objectKey := object.Key("Ipv6Address")
+ objectKey.String(*v.Ipv6Address)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentScheduledInstancesIpv6AddressList(v []types.ScheduledInstancesIpv6Address, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Ipv6Address")
+
+ for i := range v {
+ av := array.Value()
+ if err := awsEc2query_serializeDocumentScheduledInstancesIpv6Address(&v[i], av); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentScheduledInstancesLaunchSpecification(v *types.ScheduledInstancesLaunchSpecification, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.BlockDeviceMappings != nil {
+ objectKey := object.FlatKey("BlockDeviceMapping")
+ if err := awsEc2query_serializeDocumentScheduledInstancesBlockDeviceMappingSet(v.BlockDeviceMappings, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.EbsOptimized != nil {
+ objectKey := object.Key("EbsOptimized")
+ objectKey.Boolean(*v.EbsOptimized)
+ }
+
+ if v.IamInstanceProfile != nil {
+ objectKey := object.Key("IamInstanceProfile")
+ if err := awsEc2query_serializeDocumentScheduledInstancesIamInstanceProfile(v.IamInstanceProfile, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.ImageId != nil {
+ objectKey := object.Key("ImageId")
+ objectKey.String(*v.ImageId)
+ }
+
+ if v.InstanceType != nil {
+ objectKey := object.Key("InstanceType")
+ objectKey.String(*v.InstanceType)
+ }
+
+ if v.KernelId != nil {
+ objectKey := object.Key("KernelId")
+ objectKey.String(*v.KernelId)
+ }
+
+ if v.KeyName != nil {
+ objectKey := object.Key("KeyName")
+ objectKey.String(*v.KeyName)
+ }
+
+ if v.Monitoring != nil {
+ objectKey := object.Key("Monitoring")
+ if err := awsEc2query_serializeDocumentScheduledInstancesMonitoring(v.Monitoring, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.NetworkInterfaces != nil {
+ objectKey := object.FlatKey("NetworkInterface")
+ if err := awsEc2query_serializeDocumentScheduledInstancesNetworkInterfaceSet(v.NetworkInterfaces, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.Placement != nil {
+ objectKey := object.Key("Placement")
+ if err := awsEc2query_serializeDocumentScheduledInstancesPlacement(v.Placement, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.RamdiskId != nil {
+ objectKey := object.Key("RamdiskId")
+ objectKey.String(*v.RamdiskId)
+ }
+
+ if v.SecurityGroupIds != nil {
+ objectKey := object.FlatKey("SecurityGroupId")
+ if err := awsEc2query_serializeDocumentScheduledInstancesSecurityGroupIdSet(v.SecurityGroupIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.SubnetId != nil {
+ objectKey := object.Key("SubnetId")
+ objectKey.String(*v.SubnetId)
+ }
+
+ if v.UserData != nil {
+ objectKey := object.Key("UserData")
+ objectKey.String(*v.UserData)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentScheduledInstancesMonitoring(v *types.ScheduledInstancesMonitoring, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Enabled != nil {
+ objectKey := object.Key("Enabled")
+ objectKey.Boolean(*v.Enabled)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentScheduledInstancesNetworkInterface(v *types.ScheduledInstancesNetworkInterface, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AssociatePublicIpAddress != nil {
+ objectKey := object.Key("AssociatePublicIpAddress")
+ objectKey.Boolean(*v.AssociatePublicIpAddress)
+ }
+
+ if v.DeleteOnTermination != nil {
+ objectKey := object.Key("DeleteOnTermination")
+ objectKey.Boolean(*v.DeleteOnTermination)
+ }
+
+ if v.Description != nil {
+ objectKey := object.Key("Description")
+ objectKey.String(*v.Description)
+ }
+
+ if v.DeviceIndex != nil {
+ objectKey := object.Key("DeviceIndex")
+ objectKey.Integer(*v.DeviceIndex)
+ }
+
+ if v.Groups != nil {
+ objectKey := object.FlatKey("Group")
+ if err := awsEc2query_serializeDocumentScheduledInstancesSecurityGroupIdSet(v.Groups, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.Ipv6AddressCount != nil {
+ objectKey := object.Key("Ipv6AddressCount")
+ objectKey.Integer(*v.Ipv6AddressCount)
+ }
+
+ if v.Ipv6Addresses != nil {
+ objectKey := object.FlatKey("Ipv6Address")
+ if err := awsEc2query_serializeDocumentScheduledInstancesIpv6AddressList(v.Ipv6Addresses, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.NetworkInterfaceId != nil {
+ objectKey := object.Key("NetworkInterfaceId")
+ objectKey.String(*v.NetworkInterfaceId)
+ }
+
+ if v.PrivateIpAddress != nil {
+ objectKey := object.Key("PrivateIpAddress")
+ objectKey.String(*v.PrivateIpAddress)
+ }
+
+ if v.PrivateIpAddressConfigs != nil {
+ objectKey := object.FlatKey("PrivateIpAddressConfig")
+ if err := awsEc2query_serializeDocumentPrivateIpAddressConfigSet(v.PrivateIpAddressConfigs, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.SecondaryPrivateIpAddressCount != nil {
+ objectKey := object.Key("SecondaryPrivateIpAddressCount")
+ objectKey.Integer(*v.SecondaryPrivateIpAddressCount)
+ }
+
+ if v.SubnetId != nil {
+ objectKey := object.Key("SubnetId")
+ objectKey.String(*v.SubnetId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentScheduledInstancesNetworkInterfaceSet(v []types.ScheduledInstancesNetworkInterface, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("NetworkInterface")
+
+ for i := range v {
+ av := array.Value()
+ if err := awsEc2query_serializeDocumentScheduledInstancesNetworkInterface(&v[i], av); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentScheduledInstancesPlacement(v *types.ScheduledInstancesPlacement, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AvailabilityZone != nil {
+ objectKey := object.Key("AvailabilityZone")
+ objectKey.String(*v.AvailabilityZone)
+ }
+
+ if v.GroupName != nil {
+ objectKey := object.Key("GroupName")
+ objectKey.String(*v.GroupName)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentScheduledInstancesPrivateIpAddressConfig(v *types.ScheduledInstancesPrivateIpAddressConfig, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Primary != nil {
+ objectKey := object.Key("Primary")
+ objectKey.Boolean(*v.Primary)
+ }
+
+ if v.PrivateIpAddress != nil {
+ objectKey := object.Key("PrivateIpAddress")
+ objectKey.String(*v.PrivateIpAddress)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentScheduledInstancesSecurityGroupIdSet(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("SecurityGroupId")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentSecurityGroupIdStringList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("SecurityGroupId")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentSecurityGroupRuleDescription(v *types.SecurityGroupRuleDescription, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Description != nil {
+ objectKey := object.Key("Description")
+ objectKey.String(*v.Description)
+ }
+
+ if v.SecurityGroupRuleId != nil {
+ objectKey := object.Key("SecurityGroupRuleId")
+ objectKey.String(*v.SecurityGroupRuleId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentSecurityGroupRuleDescriptionList(v []types.SecurityGroupRuleDescription, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ if err := awsEc2query_serializeDocumentSecurityGroupRuleDescription(&v[i], av); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentSecurityGroupRuleIdList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentSecurityGroupRuleRequest(v *types.SecurityGroupRuleRequest, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.CidrIpv4 != nil {
+ objectKey := object.Key("CidrIpv4")
+ objectKey.String(*v.CidrIpv4)
+ }
+
+ if v.CidrIpv6 != nil {
+ objectKey := object.Key("CidrIpv6")
+ objectKey.String(*v.CidrIpv6)
+ }
+
+ if v.Description != nil {
+ objectKey := object.Key("Description")
+ objectKey.String(*v.Description)
+ }
+
+ if v.FromPort != nil {
+ objectKey := object.Key("FromPort")
+ objectKey.Integer(*v.FromPort)
+ }
+
+ if v.IpProtocol != nil {
+ objectKey := object.Key("IpProtocol")
+ objectKey.String(*v.IpProtocol)
+ }
+
+ if v.PrefixListId != nil {
+ objectKey := object.Key("PrefixListId")
+ objectKey.String(*v.PrefixListId)
+ }
+
+ if v.ReferencedGroupId != nil {
+ objectKey := object.Key("ReferencedGroupId")
+ objectKey.String(*v.ReferencedGroupId)
+ }
+
+ if v.ToPort != nil {
+ objectKey := object.Key("ToPort")
+ objectKey.Integer(*v.ToPort)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentSecurityGroupRuleUpdate(v *types.SecurityGroupRuleUpdate, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.SecurityGroupRule != nil {
+ objectKey := object.Key("SecurityGroupRule")
+ if err := awsEc2query_serializeDocumentSecurityGroupRuleRequest(v.SecurityGroupRule, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.SecurityGroupRuleId != nil {
+ objectKey := object.Key("SecurityGroupRuleId")
+ objectKey.String(*v.SecurityGroupRuleId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentSecurityGroupRuleUpdateList(v []types.SecurityGroupRuleUpdate, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ if err := awsEc2query_serializeDocumentSecurityGroupRuleUpdate(&v[i], av); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentSecurityGroupStringList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("SecurityGroup")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentSlotDateTimeRangeRequest(v *types.SlotDateTimeRangeRequest, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.EarliestTime != nil {
+ objectKey := object.Key("EarliestTime")
+ objectKey.String(smithytime.FormatDateTime(*v.EarliestTime))
+ }
+
+ if v.LatestTime != nil {
+ objectKey := object.Key("LatestTime")
+ objectKey.String(smithytime.FormatDateTime(*v.LatestTime))
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentSlotStartTimeRangeRequest(v *types.SlotStartTimeRangeRequest, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.EarliestTime != nil {
+ objectKey := object.Key("EarliestTime")
+ objectKey.String(smithytime.FormatDateTime(*v.EarliestTime))
+ }
+
+ if v.LatestTime != nil {
+ objectKey := object.Key("LatestTime")
+ objectKey.String(smithytime.FormatDateTime(*v.LatestTime))
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentSnapshotDiskContainer(v *types.SnapshotDiskContainer, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Description != nil {
+ objectKey := object.Key("Description")
+ objectKey.String(*v.Description)
+ }
+
+ if v.Format != nil {
+ objectKey := object.Key("Format")
+ objectKey.String(*v.Format)
+ }
+
+ if v.Url != nil {
+ objectKey := object.Key("Url")
+ objectKey.String(*v.Url)
+ }
+
+ if v.UserBucket != nil {
+ objectKey := object.Key("UserBucket")
+ if err := awsEc2query_serializeDocumentUserBucket(v.UserBucket, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentSnapshotIdStringList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("SnapshotId")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentSpotCapacityRebalance(v *types.SpotCapacityRebalance, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if len(v.ReplacementStrategy) > 0 {
+ objectKey := object.Key("ReplacementStrategy")
+ objectKey.String(string(v.ReplacementStrategy))
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentSpotFleetLaunchSpecification(v *types.SpotFleetLaunchSpecification, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AddressingType != nil {
+ objectKey := object.Key("AddressingType")
+ objectKey.String(*v.AddressingType)
+ }
+
+ if v.BlockDeviceMappings != nil {
+ objectKey := object.FlatKey("BlockDeviceMapping")
+ if err := awsEc2query_serializeDocumentBlockDeviceMappingList(v.BlockDeviceMappings, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.EbsOptimized != nil {
+ objectKey := object.Key("EbsOptimized")
+ objectKey.Boolean(*v.EbsOptimized)
+ }
+
+ if v.IamInstanceProfile != nil {
+ objectKey := object.Key("IamInstanceProfile")
+ if err := awsEc2query_serializeDocumentIamInstanceProfileSpecification(v.IamInstanceProfile, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.ImageId != nil {
+ objectKey := object.Key("ImageId")
+ objectKey.String(*v.ImageId)
+ }
+
+ if len(v.InstanceType) > 0 {
+ objectKey := object.Key("InstanceType")
+ objectKey.String(string(v.InstanceType))
+ }
+
+ if v.KernelId != nil {
+ objectKey := object.Key("KernelId")
+ objectKey.String(*v.KernelId)
+ }
+
+ if v.KeyName != nil {
+ objectKey := object.Key("KeyName")
+ objectKey.String(*v.KeyName)
+ }
+
+ if v.Monitoring != nil {
+ objectKey := object.Key("Monitoring")
+ if err := awsEc2query_serializeDocumentSpotFleetMonitoring(v.Monitoring, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.NetworkInterfaces != nil {
+ objectKey := object.FlatKey("NetworkInterfaceSet")
+ if err := awsEc2query_serializeDocumentInstanceNetworkInterfaceSpecificationList(v.NetworkInterfaces, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.Placement != nil {
+ objectKey := object.Key("Placement")
+ if err := awsEc2query_serializeDocumentSpotPlacement(v.Placement, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.RamdiskId != nil {
+ objectKey := object.Key("RamdiskId")
+ objectKey.String(*v.RamdiskId)
+ }
+
+ if v.SecurityGroups != nil {
+ objectKey := object.FlatKey("GroupSet")
+ if err := awsEc2query_serializeDocumentGroupIdentifierList(v.SecurityGroups, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.SpotPrice != nil {
+ objectKey := object.Key("SpotPrice")
+ objectKey.String(*v.SpotPrice)
+ }
+
+ if v.SubnetId != nil {
+ objectKey := object.Key("SubnetId")
+ objectKey.String(*v.SubnetId)
+ }
+
+ if v.TagSpecifications != nil {
+ objectKey := object.FlatKey("TagSpecificationSet")
+ if err := awsEc2query_serializeDocumentSpotFleetTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.UserData != nil {
+ objectKey := object.Key("UserData")
+ objectKey.String(*v.UserData)
+ }
+
+ if v.WeightedCapacity != nil {
+ objectKey := object.Key("WeightedCapacity")
+ switch {
+ case math.IsNaN(*v.WeightedCapacity):
+ objectKey.String("NaN")
+
+ case math.IsInf(*v.WeightedCapacity, 1):
+ objectKey.String("Infinity")
+
+ case math.IsInf(*v.WeightedCapacity, -1):
+ objectKey.String("-Infinity")
+
+ default:
+ objectKey.Double(*v.WeightedCapacity)
+
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentSpotFleetMonitoring(v *types.SpotFleetMonitoring, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Enabled != nil {
+ objectKey := object.Key("Enabled")
+ objectKey.Boolean(*v.Enabled)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentSpotFleetRequestConfigData(v *types.SpotFleetRequestConfigData, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if len(v.AllocationStrategy) > 0 {
+ objectKey := object.Key("AllocationStrategy")
+ objectKey.String(string(v.AllocationStrategy))
+ }
+
+ if v.ClientToken != nil {
+ objectKey := object.Key("ClientToken")
+ objectKey.String(*v.ClientToken)
+ }
+
+ if v.Context != nil {
+ objectKey := object.Key("Context")
+ objectKey.String(*v.Context)
+ }
+
+ if len(v.ExcessCapacityTerminationPolicy) > 0 {
+ objectKey := object.Key("ExcessCapacityTerminationPolicy")
+ objectKey.String(string(v.ExcessCapacityTerminationPolicy))
+ }
+
+ if v.FulfilledCapacity != nil {
+ objectKey := object.Key("FulfilledCapacity")
+ switch {
+ case math.IsNaN(*v.FulfilledCapacity):
+ objectKey.String("NaN")
+
+ case math.IsInf(*v.FulfilledCapacity, 1):
+ objectKey.String("Infinity")
+
+ case math.IsInf(*v.FulfilledCapacity, -1):
+ objectKey.String("-Infinity")
+
+ default:
+ objectKey.Double(*v.FulfilledCapacity)
+
+ }
+ }
+
+ if v.IamFleetRole != nil {
+ objectKey := object.Key("IamFleetRole")
+ objectKey.String(*v.IamFleetRole)
+ }
+
+ if len(v.InstanceInterruptionBehavior) > 0 {
+ objectKey := object.Key("InstanceInterruptionBehavior")
+ objectKey.String(string(v.InstanceInterruptionBehavior))
+ }
+
+ if v.InstancePoolsToUseCount != nil {
+ objectKey := object.Key("InstancePoolsToUseCount")
+ objectKey.Integer(*v.InstancePoolsToUseCount)
+ }
+
+ if v.LaunchSpecifications != nil {
+ objectKey := object.FlatKey("LaunchSpecifications")
+ if err := awsEc2query_serializeDocumentLaunchSpecsList(v.LaunchSpecifications, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.LaunchTemplateConfigs != nil {
+ objectKey := object.FlatKey("LaunchTemplateConfigs")
+ if err := awsEc2query_serializeDocumentLaunchTemplateConfigList(v.LaunchTemplateConfigs, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.LoadBalancersConfig != nil {
+ objectKey := object.Key("LoadBalancersConfig")
+ if err := awsEc2query_serializeDocumentLoadBalancersConfig(v.LoadBalancersConfig, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if len(v.OnDemandAllocationStrategy) > 0 {
+ objectKey := object.Key("OnDemandAllocationStrategy")
+ objectKey.String(string(v.OnDemandAllocationStrategy))
+ }
+
+ if v.OnDemandFulfilledCapacity != nil {
+ objectKey := object.Key("OnDemandFulfilledCapacity")
+ switch {
+ case math.IsNaN(*v.OnDemandFulfilledCapacity):
+ objectKey.String("NaN")
+
+ case math.IsInf(*v.OnDemandFulfilledCapacity, 1):
+ objectKey.String("Infinity")
+
+ case math.IsInf(*v.OnDemandFulfilledCapacity, -1):
+ objectKey.String("-Infinity")
+
+ default:
+ objectKey.Double(*v.OnDemandFulfilledCapacity)
+
+ }
+ }
+
+ if v.OnDemandMaxTotalPrice != nil {
+ objectKey := object.Key("OnDemandMaxTotalPrice")
+ objectKey.String(*v.OnDemandMaxTotalPrice)
+ }
+
+ if v.OnDemandTargetCapacity != nil {
+ objectKey := object.Key("OnDemandTargetCapacity")
+ objectKey.Integer(*v.OnDemandTargetCapacity)
+ }
+
+ if v.ReplaceUnhealthyInstances != nil {
+ objectKey := object.Key("ReplaceUnhealthyInstances")
+ objectKey.Boolean(*v.ReplaceUnhealthyInstances)
+ }
+
+ if v.SpotMaintenanceStrategies != nil {
+ objectKey := object.Key("SpotMaintenanceStrategies")
+ if err := awsEc2query_serializeDocumentSpotMaintenanceStrategies(v.SpotMaintenanceStrategies, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.SpotMaxTotalPrice != nil {
+ objectKey := object.Key("SpotMaxTotalPrice")
+ objectKey.String(*v.SpotMaxTotalPrice)
+ }
+
+ if v.SpotPrice != nil {
+ objectKey := object.Key("SpotPrice")
+ objectKey.String(*v.SpotPrice)
+ }
+
+ if v.TagSpecifications != nil {
+ objectKey := object.FlatKey("TagSpecification")
+ if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.TargetCapacity != nil {
+ objectKey := object.Key("TargetCapacity")
+ objectKey.Integer(*v.TargetCapacity)
+ }
+
+ if v.TerminateInstancesWithExpiration != nil {
+ objectKey := object.Key("TerminateInstancesWithExpiration")
+ objectKey.Boolean(*v.TerminateInstancesWithExpiration)
+ }
+
+ if len(v.Type) > 0 {
+ objectKey := object.Key("Type")
+ objectKey.String(string(v.Type))
+ }
+
+ if v.ValidFrom != nil {
+ objectKey := object.Key("ValidFrom")
+ objectKey.String(smithytime.FormatDateTime(*v.ValidFrom))
+ }
+
+ if v.ValidUntil != nil {
+ objectKey := object.Key("ValidUntil")
+ objectKey.String(smithytime.FormatDateTime(*v.ValidUntil))
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentSpotFleetRequestIdList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentSpotFleetTagSpecification(v *types.SpotFleetTagSpecification, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if len(v.ResourceType) > 0 {
+ objectKey := object.Key("ResourceType")
+ objectKey.String(string(v.ResourceType))
+ }
+
+ if v.Tags != nil {
+ objectKey := object.FlatKey("Tag")
+ if err := awsEc2query_serializeDocumentTagList(v.Tags, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentSpotFleetTagSpecificationList(v []types.SpotFleetTagSpecification, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ if err := awsEc2query_serializeDocumentSpotFleetTagSpecification(&v[i], av); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentSpotInstanceRequestIdList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("SpotInstanceRequestId")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentSpotMaintenanceStrategies(v *types.SpotMaintenanceStrategies, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.CapacityRebalance != nil {
+ objectKey := object.Key("CapacityRebalance")
+ if err := awsEc2query_serializeDocumentSpotCapacityRebalance(v.CapacityRebalance, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentSpotMarketOptions(v *types.SpotMarketOptions, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.BlockDurationMinutes != nil {
+ objectKey := object.Key("BlockDurationMinutes")
+ objectKey.Integer(*v.BlockDurationMinutes)
+ }
+
+ if len(v.InstanceInterruptionBehavior) > 0 {
+ objectKey := object.Key("InstanceInterruptionBehavior")
+ objectKey.String(string(v.InstanceInterruptionBehavior))
+ }
+
+ if v.MaxPrice != nil {
+ objectKey := object.Key("MaxPrice")
+ objectKey.String(*v.MaxPrice)
+ }
+
+ if len(v.SpotInstanceType) > 0 {
+ objectKey := object.Key("SpotInstanceType")
+ objectKey.String(string(v.SpotInstanceType))
+ }
+
+ if v.ValidUntil != nil {
+ objectKey := object.Key("ValidUntil")
+ objectKey.String(smithytime.FormatDateTime(*v.ValidUntil))
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentSpotOptionsRequest(v *types.SpotOptionsRequest, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if len(v.AllocationStrategy) > 0 {
+ objectKey := object.Key("AllocationStrategy")
+ objectKey.String(string(v.AllocationStrategy))
+ }
+
+ if len(v.InstanceInterruptionBehavior) > 0 {
+ objectKey := object.Key("InstanceInterruptionBehavior")
+ objectKey.String(string(v.InstanceInterruptionBehavior))
+ }
+
+ if v.InstancePoolsToUseCount != nil {
+ objectKey := object.Key("InstancePoolsToUseCount")
+ objectKey.Integer(*v.InstancePoolsToUseCount)
+ }
+
+ if v.MaintenanceStrategies != nil {
+ objectKey := object.Key("MaintenanceStrategies")
+ if err := awsEc2query_serializeDocumentFleetSpotMaintenanceStrategiesRequest(v.MaintenanceStrategies, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxTotalPrice != nil {
+ objectKey := object.Key("MaxTotalPrice")
+ objectKey.String(*v.MaxTotalPrice)
+ }
+
+ if v.MinTargetCapacity != nil {
+ objectKey := object.Key("MinTargetCapacity")
+ objectKey.Integer(*v.MinTargetCapacity)
+ }
+
+ if v.SingleAvailabilityZone != nil {
+ objectKey := object.Key("SingleAvailabilityZone")
+ objectKey.Boolean(*v.SingleAvailabilityZone)
+ }
+
+ if v.SingleInstanceType != nil {
+ objectKey := object.Key("SingleInstanceType")
+ objectKey.Boolean(*v.SingleInstanceType)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentSpotPlacement(v *types.SpotPlacement, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AvailabilityZone != nil {
+ objectKey := object.Key("AvailabilityZone")
+ objectKey.String(*v.AvailabilityZone)
+ }
+
+ if v.GroupName != nil {
+ objectKey := object.Key("GroupName")
+ objectKey.String(*v.GroupName)
+ }
+
+ if len(v.Tenancy) > 0 {
+ objectKey := object.Key("Tenancy")
+ objectKey.String(string(v.Tenancy))
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentStorage(v *types.Storage, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.S3 != nil {
+ objectKey := object.Key("S3")
+ if err := awsEc2query_serializeDocumentS3Storage(v.S3, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentStorageLocation(v *types.StorageLocation, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Bucket != nil {
+ objectKey := object.Key("Bucket")
+ objectKey.String(*v.Bucket)
+ }
+
+ if v.Key != nil {
+ objectKey := object.Key("Key")
+ objectKey.String(*v.Key)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentSubnetIdStringList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("SubnetId")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentTag(v *types.Tag, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Key != nil {
+ objectKey := object.Key("Key")
+ objectKey.String(*v.Key)
+ }
+
+ if v.Value != nil {
+ objectKey := object.Key("Value")
+ objectKey.String(*v.Value)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentTagList(v []types.Tag, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ if err := awsEc2query_serializeDocumentTag(&v[i], av); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentTagSpecification(v *types.TagSpecification, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if len(v.ResourceType) > 0 {
+ objectKey := object.Key("ResourceType")
+ objectKey.String(string(v.ResourceType))
+ }
+
+ if v.Tags != nil {
+ objectKey := object.FlatKey("Tag")
+ if err := awsEc2query_serializeDocumentTagList(v.Tags, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentTagSpecificationList(v []types.TagSpecification, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ if err := awsEc2query_serializeDocumentTagSpecification(&v[i], av); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentTargetCapacitySpecificationRequest(v *types.TargetCapacitySpecificationRequest, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if len(v.DefaultTargetCapacityType) > 0 {
+ objectKey := object.Key("DefaultTargetCapacityType")
+ objectKey.String(string(v.DefaultTargetCapacityType))
+ }
+
+ if v.OnDemandTargetCapacity != nil {
+ objectKey := object.Key("OnDemandTargetCapacity")
+ objectKey.Integer(*v.OnDemandTargetCapacity)
+ }
+
+ if v.SpotTargetCapacity != nil {
+ objectKey := object.Key("SpotTargetCapacity")
+ objectKey.Integer(*v.SpotTargetCapacity)
+ }
+
+ if v.TotalTargetCapacity != nil {
+ objectKey := object.Key("TotalTargetCapacity")
+ objectKey.Integer(*v.TotalTargetCapacity)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentTargetConfigurationRequest(v *types.TargetConfigurationRequest, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.InstanceCount != nil {
+ objectKey := object.Key("InstanceCount")
+ objectKey.Integer(*v.InstanceCount)
+ }
+
+ if v.OfferingId != nil {
+ objectKey := object.Key("OfferingId")
+ objectKey.String(*v.OfferingId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentTargetConfigurationRequestSet(v []types.TargetConfigurationRequest, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("TargetConfigurationRequest")
+
+ for i := range v {
+ av := array.Value()
+ if err := awsEc2query_serializeDocumentTargetConfigurationRequest(&v[i], av); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentTargetGroup(v *types.TargetGroup, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Arn != nil {
+ objectKey := object.Key("Arn")
+ objectKey.String(*v.Arn)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentTargetGroups(v []types.TargetGroup, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ if err := awsEc2query_serializeDocumentTargetGroup(&v[i], av); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentTargetGroupsConfig(v *types.TargetGroupsConfig, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.TargetGroups != nil {
+ objectKey := object.FlatKey("TargetGroups")
+ if err := awsEc2query_serializeDocumentTargetGroups(v.TargetGroups, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentTrafficMirrorFilterIdList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentTrafficMirrorFilterRuleFieldList(v []types.TrafficMirrorFilterRuleField, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Member")
+
+ for i := range v {
+ av := array.Value()
+ av.String(string(v[i]))
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentTrafficMirrorNetworkServiceList(v []types.TrafficMirrorNetworkService, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ av.String(string(v[i]))
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentTrafficMirrorPortRangeRequest(v *types.TrafficMirrorPortRangeRequest, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.FromPort != nil {
+ objectKey := object.Key("FromPort")
+ objectKey.Integer(*v.FromPort)
+ }
+
+ if v.ToPort != nil {
+ objectKey := object.Key("ToPort")
+ objectKey.Integer(*v.ToPort)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentTrafficMirrorSessionFieldList(v []types.TrafficMirrorSessionField, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Member")
+
+ for i := range v {
+ av := array.Value()
+ av.String(string(v[i]))
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentTrafficMirrorSessionIdList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentTrafficMirrorTargetIdList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentTransitGatewayAttachmentIdStringList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Member")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentTransitGatewayCidrBlockStringList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentTransitGatewayConnectPeerIdStringList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentTransitGatewayConnectRequestBgpOptions(v *types.TransitGatewayConnectRequestBgpOptions, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.PeerAsn != nil {
+ objectKey := object.Key("PeerAsn")
+ objectKey.Long(*v.PeerAsn)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentTransitGatewayIdStringList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentTransitGatewayMulticastDomainIdStringList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentTransitGatewayNetworkInterfaceIdList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentTransitGatewayRequestOptions(v *types.TransitGatewayRequestOptions, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AmazonSideAsn != nil {
+ objectKey := object.Key("AmazonSideAsn")
+ objectKey.Long(*v.AmazonSideAsn)
+ }
+
+ if len(v.AutoAcceptSharedAttachments) > 0 {
+ objectKey := object.Key("AutoAcceptSharedAttachments")
+ objectKey.String(string(v.AutoAcceptSharedAttachments))
+ }
+
+ if len(v.DefaultRouteTableAssociation) > 0 {
+ objectKey := object.Key("DefaultRouteTableAssociation")
+ objectKey.String(string(v.DefaultRouteTableAssociation))
+ }
+
+ if len(v.DefaultRouteTablePropagation) > 0 {
+ objectKey := object.Key("DefaultRouteTablePropagation")
+ objectKey.String(string(v.DefaultRouteTablePropagation))
+ }
+
+ if len(v.DnsSupport) > 0 {
+ objectKey := object.Key("DnsSupport")
+ objectKey.String(string(v.DnsSupport))
+ }
+
+ if len(v.MulticastSupport) > 0 {
+ objectKey := object.Key("MulticastSupport")
+ objectKey.String(string(v.MulticastSupport))
+ }
+
+ if v.TransitGatewayCidrBlocks != nil {
+ objectKey := object.FlatKey("TransitGatewayCidrBlocks")
+ if err := awsEc2query_serializeDocumentTransitGatewayCidrBlockStringList(v.TransitGatewayCidrBlocks, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if len(v.VpnEcmpSupport) > 0 {
+ objectKey := object.Key("VpnEcmpSupport")
+ objectKey.String(string(v.VpnEcmpSupport))
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentTransitGatewayRouteTableIdStringList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentTransitGatewaySubnetIdList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentTrunkInterfaceAssociationIdList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentUserBucket(v *types.UserBucket, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.S3Bucket != nil {
+ objectKey := object.Key("S3Bucket")
+ objectKey.String(*v.S3Bucket)
+ }
+
+ if v.S3Key != nil {
+ objectKey := object.Key("S3Key")
+ objectKey.String(*v.S3Key)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentUserData(v *types.UserData, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Data != nil {
+ objectKey := object.Key("Data")
+ objectKey.String(*v.Data)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentUserGroupStringList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("UserGroup")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentUserIdGroupPair(v *types.UserIdGroupPair, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Description != nil {
+ objectKey := object.Key("Description")
+ objectKey.String(*v.Description)
+ }
+
+ if v.GroupId != nil {
+ objectKey := object.Key("GroupId")
+ objectKey.String(*v.GroupId)
+ }
+
+ if v.GroupName != nil {
+ objectKey := object.Key("GroupName")
+ objectKey.String(*v.GroupName)
+ }
+
+ if v.PeeringStatus != nil {
+ objectKey := object.Key("PeeringStatus")
+ objectKey.String(*v.PeeringStatus)
+ }
+
+ if v.UserId != nil {
+ objectKey := object.Key("UserId")
+ objectKey.String(*v.UserId)
+ }
+
+ if v.VpcId != nil {
+ objectKey := object.Key("VpcId")
+ objectKey.String(*v.VpcId)
+ }
+
+ if v.VpcPeeringConnectionId != nil {
+ objectKey := object.Key("VpcPeeringConnectionId")
+ objectKey.String(*v.VpcPeeringConnectionId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentUserIdGroupPairList(v []types.UserIdGroupPair, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ if err := awsEc2query_serializeDocumentUserIdGroupPair(&v[i], av); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentUserIdStringList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("UserId")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentValueStringList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentVersionStringList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentVolumeDetail(v *types.VolumeDetail, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Size != nil {
+ objectKey := object.Key("Size")
+ objectKey.Long(*v.Size)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentVolumeIdStringList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("VolumeId")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentVpcClassicLinkIdList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("VpcId")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentVpcEndpointIdList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentVpcEndpointRouteTableIdList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentVpcEndpointSecurityGroupIdList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentVpcEndpointServiceIdList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentVpcEndpointSubnetIdList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentVpcIdStringList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("VpcId")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentVpcPeeringConnectionIdList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Item")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentVpnConnectionIdStringList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("VpnConnectionId")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentVpnConnectionOptionsSpecification(v *types.VpnConnectionOptionsSpecification, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.EnableAcceleration != nil {
+ objectKey := object.Key("EnableAcceleration")
+ objectKey.Boolean(*v.EnableAcceleration)
+ }
+
+ if v.LocalIpv4NetworkCidr != nil {
+ objectKey := object.Key("LocalIpv4NetworkCidr")
+ objectKey.String(*v.LocalIpv4NetworkCidr)
+ }
+
+ if v.LocalIpv6NetworkCidr != nil {
+ objectKey := object.Key("LocalIpv6NetworkCidr")
+ objectKey.String(*v.LocalIpv6NetworkCidr)
+ }
+
+ if v.RemoteIpv4NetworkCidr != nil {
+ objectKey := object.Key("RemoteIpv4NetworkCidr")
+ objectKey.String(*v.RemoteIpv4NetworkCidr)
+ }
+
+ if v.RemoteIpv6NetworkCidr != nil {
+ objectKey := object.Key("RemoteIpv6NetworkCidr")
+ objectKey.String(*v.RemoteIpv6NetworkCidr)
+ }
+
+ if v.StaticRoutesOnly != nil {
+ objectKey := object.Key("StaticRoutesOnly")
+ objectKey.Boolean(*v.StaticRoutesOnly)
+ }
+
+ if len(v.TunnelInsideIpVersion) > 0 {
+ objectKey := object.Key("TunnelInsideIpVersion")
+ objectKey.String(string(v.TunnelInsideIpVersion))
+ }
+
+ if v.TunnelOptions != nil {
+ objectKey := object.FlatKey("TunnelOptions")
+ if err := awsEc2query_serializeDocumentVpnTunnelOptionsSpecificationsList(v.TunnelOptions, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentVpnGatewayIdStringList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("VpnGatewayId")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentVpnTunnelOptionsSpecification(v *types.VpnTunnelOptionsSpecification, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DPDTimeoutAction != nil {
+ objectKey := object.Key("DPDTimeoutAction")
+ objectKey.String(*v.DPDTimeoutAction)
+ }
+
+ if v.DPDTimeoutSeconds != nil {
+ objectKey := object.Key("DPDTimeoutSeconds")
+ objectKey.Integer(*v.DPDTimeoutSeconds)
+ }
+
+ if v.IKEVersions != nil {
+ objectKey := object.FlatKey("IKEVersion")
+ if err := awsEc2query_serializeDocumentIKEVersionsRequestList(v.IKEVersions, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.Phase1DHGroupNumbers != nil {
+ objectKey := object.FlatKey("Phase1DHGroupNumber")
+ if err := awsEc2query_serializeDocumentPhase1DHGroupNumbersRequestList(v.Phase1DHGroupNumbers, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.Phase1EncryptionAlgorithms != nil {
+ objectKey := object.FlatKey("Phase1EncryptionAlgorithm")
+ if err := awsEc2query_serializeDocumentPhase1EncryptionAlgorithmsRequestList(v.Phase1EncryptionAlgorithms, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.Phase1IntegrityAlgorithms != nil {
+ objectKey := object.FlatKey("Phase1IntegrityAlgorithm")
+ if err := awsEc2query_serializeDocumentPhase1IntegrityAlgorithmsRequestList(v.Phase1IntegrityAlgorithms, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.Phase1LifetimeSeconds != nil {
+ objectKey := object.Key("Phase1LifetimeSeconds")
+ objectKey.Integer(*v.Phase1LifetimeSeconds)
+ }
+
+ if v.Phase2DHGroupNumbers != nil {
+ objectKey := object.FlatKey("Phase2DHGroupNumber")
+ if err := awsEc2query_serializeDocumentPhase2DHGroupNumbersRequestList(v.Phase2DHGroupNumbers, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.Phase2EncryptionAlgorithms != nil {
+ objectKey := object.FlatKey("Phase2EncryptionAlgorithm")
+ if err := awsEc2query_serializeDocumentPhase2EncryptionAlgorithmsRequestList(v.Phase2EncryptionAlgorithms, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.Phase2IntegrityAlgorithms != nil {
+ objectKey := object.FlatKey("Phase2IntegrityAlgorithm")
+ if err := awsEc2query_serializeDocumentPhase2IntegrityAlgorithmsRequestList(v.Phase2IntegrityAlgorithms, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.Phase2LifetimeSeconds != nil {
+ objectKey := object.Key("Phase2LifetimeSeconds")
+ objectKey.Integer(*v.Phase2LifetimeSeconds)
+ }
+
+ if v.PreSharedKey != nil {
+ objectKey := object.Key("PreSharedKey")
+ objectKey.String(*v.PreSharedKey)
+ }
+
+ if v.RekeyFuzzPercentage != nil {
+ objectKey := object.Key("RekeyFuzzPercentage")
+ objectKey.Integer(*v.RekeyFuzzPercentage)
+ }
+
+ if v.RekeyMarginTimeSeconds != nil {
+ objectKey := object.Key("RekeyMarginTimeSeconds")
+ objectKey.Integer(*v.RekeyMarginTimeSeconds)
+ }
+
+ if v.ReplayWindowSize != nil {
+ objectKey := object.Key("ReplayWindowSize")
+ objectKey.Integer(*v.ReplayWindowSize)
+ }
+
+ if v.StartupAction != nil {
+ objectKey := object.Key("StartupAction")
+ objectKey.String(*v.StartupAction)
+ }
+
+ if v.TunnelInsideCidr != nil {
+ objectKey := object.Key("TunnelInsideCidr")
+ objectKey.String(*v.TunnelInsideCidr)
+ }
+
+ if v.TunnelInsideIpv6Cidr != nil {
+ objectKey := object.Key("TunnelInsideIpv6Cidr")
+ objectKey.String(*v.TunnelInsideIpv6Cidr)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeDocumentVpnTunnelOptionsSpecificationsList(v []types.VpnTunnelOptionsSpecification, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("Member")
+
+ for i := range v {
+ av := array.Value()
+ if err := awsEc2query_serializeDocumentVpnTunnelOptionsSpecification(&v[i], av); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentZoneIdStringList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("ZoneId")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeDocumentZoneNameStringList(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("ZoneName")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentAcceptReservedInstancesExchangeQuoteInput(v *AcceptReservedInstancesExchangeQuoteInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.ReservedInstanceIds != nil {
+ objectKey := object.FlatKey("ReservedInstanceId")
+ if err := awsEc2query_serializeDocumentReservedInstanceIdSet(v.ReservedInstanceIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.TargetConfigurations != nil {
+ objectKey := object.FlatKey("TargetConfiguration")
+ if err := awsEc2query_serializeDocumentTargetConfigurationRequestSet(v.TargetConfigurations, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentAcceptTransitGatewayMulticastDomainAssociationsInput(v *AcceptTransitGatewayMulticastDomainAssociationsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.SubnetIds != nil {
+ objectKey := object.FlatKey("SubnetIds")
+ if err := awsEc2query_serializeDocumentValueStringList(v.SubnetIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.TransitGatewayAttachmentId != nil {
+ objectKey := object.Key("TransitGatewayAttachmentId")
+ objectKey.String(*v.TransitGatewayAttachmentId)
+ }
+
+ if v.TransitGatewayMulticastDomainId != nil {
+ objectKey := object.Key("TransitGatewayMulticastDomainId")
+ objectKey.String(*v.TransitGatewayMulticastDomainId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentAcceptTransitGatewayPeeringAttachmentInput(v *AcceptTransitGatewayPeeringAttachmentInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.TransitGatewayAttachmentId != nil {
+ objectKey := object.Key("TransitGatewayAttachmentId")
+ objectKey.String(*v.TransitGatewayAttachmentId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentAcceptTransitGatewayVpcAttachmentInput(v *AcceptTransitGatewayVpcAttachmentInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.TransitGatewayAttachmentId != nil {
+ objectKey := object.Key("TransitGatewayAttachmentId")
+ objectKey.String(*v.TransitGatewayAttachmentId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentAcceptVpcEndpointConnectionsInput(v *AcceptVpcEndpointConnectionsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.ServiceId != nil {
+ objectKey := object.Key("ServiceId")
+ objectKey.String(*v.ServiceId)
+ }
+
+ if v.VpcEndpointIds != nil {
+ objectKey := object.FlatKey("VpcEndpointId")
+ if err := awsEc2query_serializeDocumentVpcEndpointIdList(v.VpcEndpointIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentAcceptVpcPeeringConnectionInput(v *AcceptVpcPeeringConnectionInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.VpcPeeringConnectionId != nil {
+ objectKey := object.Key("VpcPeeringConnectionId")
+ objectKey.String(*v.VpcPeeringConnectionId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentAdvertiseByoipCidrInput(v *AdvertiseByoipCidrInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Cidr != nil {
+ objectKey := object.Key("Cidr")
+ objectKey.String(*v.Cidr)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentAllocateAddressInput(v *AllocateAddressInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Address != nil {
+ objectKey := object.Key("Address")
+ objectKey.String(*v.Address)
+ }
+
+ if v.CustomerOwnedIpv4Pool != nil {
+ objectKey := object.Key("CustomerOwnedIpv4Pool")
+ objectKey.String(*v.CustomerOwnedIpv4Pool)
+ }
+
+ if len(v.Domain) > 0 {
+ objectKey := object.Key("Domain")
+ objectKey.String(string(v.Domain))
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.NetworkBorderGroup != nil {
+ objectKey := object.Key("NetworkBorderGroup")
+ objectKey.String(*v.NetworkBorderGroup)
+ }
+
+ if v.PublicIpv4Pool != nil {
+ objectKey := object.Key("PublicIpv4Pool")
+ objectKey.String(*v.PublicIpv4Pool)
+ }
+
+ if v.TagSpecifications != nil {
+ objectKey := object.FlatKey("TagSpecification")
+ if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentAllocateHostsInput(v *AllocateHostsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if len(v.AutoPlacement) > 0 {
+ objectKey := object.Key("AutoPlacement")
+ objectKey.String(string(v.AutoPlacement))
+ }
+
+ if v.AvailabilityZone != nil {
+ objectKey := object.Key("AvailabilityZone")
+ objectKey.String(*v.AvailabilityZone)
+ }
+
+ if v.ClientToken != nil {
+ objectKey := object.Key("ClientToken")
+ objectKey.String(*v.ClientToken)
+ }
+
+ if len(v.HostRecovery) > 0 {
+ objectKey := object.Key("HostRecovery")
+ objectKey.String(string(v.HostRecovery))
+ }
+
+ if v.InstanceFamily != nil {
+ objectKey := object.Key("InstanceFamily")
+ objectKey.String(*v.InstanceFamily)
+ }
+
+ if v.InstanceType != nil {
+ objectKey := object.Key("InstanceType")
+ objectKey.String(*v.InstanceType)
+ }
+
+ if v.Quantity != nil {
+ objectKey := object.Key("Quantity")
+ objectKey.Integer(*v.Quantity)
+ }
+
+ if v.TagSpecifications != nil {
+ objectKey := object.FlatKey("TagSpecification")
+ if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentApplySecurityGroupsToClientVpnTargetNetworkInput(v *ApplySecurityGroupsToClientVpnTargetNetworkInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.ClientVpnEndpointId != nil {
+ objectKey := object.Key("ClientVpnEndpointId")
+ objectKey.String(*v.ClientVpnEndpointId)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.SecurityGroupIds != nil {
+ objectKey := object.FlatKey("SecurityGroupId")
+ if err := awsEc2query_serializeDocumentClientVpnSecurityGroupIdSet(v.SecurityGroupIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.VpcId != nil {
+ objectKey := object.Key("VpcId")
+ objectKey.String(*v.VpcId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentAssignIpv6AddressesInput(v *AssignIpv6AddressesInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Ipv6AddressCount != nil {
+ objectKey := object.Key("Ipv6AddressCount")
+ objectKey.Integer(*v.Ipv6AddressCount)
+ }
+
+ if v.Ipv6Addresses != nil {
+ objectKey := object.FlatKey("Ipv6Addresses")
+ if err := awsEc2query_serializeDocumentIpv6AddressList(v.Ipv6Addresses, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.Ipv6PrefixCount != nil {
+ objectKey := object.Key("Ipv6PrefixCount")
+ objectKey.Integer(*v.Ipv6PrefixCount)
+ }
+
+ if v.Ipv6Prefixes != nil {
+ objectKey := object.FlatKey("Ipv6Prefix")
+ if err := awsEc2query_serializeDocumentIpPrefixList(v.Ipv6Prefixes, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.NetworkInterfaceId != nil {
+ objectKey := object.Key("NetworkInterfaceId")
+ objectKey.String(*v.NetworkInterfaceId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentAssignPrivateIpAddressesInput(v *AssignPrivateIpAddressesInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AllowReassignment != nil {
+ objectKey := object.Key("AllowReassignment")
+ objectKey.Boolean(*v.AllowReassignment)
+ }
+
+ if v.Ipv4PrefixCount != nil {
+ objectKey := object.Key("Ipv4PrefixCount")
+ objectKey.Integer(*v.Ipv4PrefixCount)
+ }
+
+ if v.Ipv4Prefixes != nil {
+ objectKey := object.FlatKey("Ipv4Prefix")
+ if err := awsEc2query_serializeDocumentIpPrefixList(v.Ipv4Prefixes, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.NetworkInterfaceId != nil {
+ objectKey := object.Key("NetworkInterfaceId")
+ objectKey.String(*v.NetworkInterfaceId)
+ }
+
+ if v.PrivateIpAddresses != nil {
+ objectKey := object.FlatKey("PrivateIpAddress")
+ if err := awsEc2query_serializeDocumentPrivateIpAddressStringList(v.PrivateIpAddresses, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.SecondaryPrivateIpAddressCount != nil {
+ objectKey := object.Key("SecondaryPrivateIpAddressCount")
+ objectKey.Integer(*v.SecondaryPrivateIpAddressCount)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentAssociateAddressInput(v *AssociateAddressInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AllocationId != nil {
+ objectKey := object.Key("AllocationId")
+ objectKey.String(*v.AllocationId)
+ }
+
+ if v.AllowReassociation != nil {
+ objectKey := object.Key("AllowReassociation")
+ objectKey.Boolean(*v.AllowReassociation)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.InstanceId != nil {
+ objectKey := object.Key("InstanceId")
+ objectKey.String(*v.InstanceId)
+ }
+
+ if v.NetworkInterfaceId != nil {
+ objectKey := object.Key("NetworkInterfaceId")
+ objectKey.String(*v.NetworkInterfaceId)
+ }
+
+ if v.PrivateIpAddress != nil {
+ objectKey := object.Key("PrivateIpAddress")
+ objectKey.String(*v.PrivateIpAddress)
+ }
+
+ if v.PublicIp != nil {
+ objectKey := object.Key("PublicIp")
+ objectKey.String(*v.PublicIp)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentAssociateClientVpnTargetNetworkInput(v *AssociateClientVpnTargetNetworkInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.ClientToken != nil {
+ objectKey := object.Key("ClientToken")
+ objectKey.String(*v.ClientToken)
+ }
+
+ if v.ClientVpnEndpointId != nil {
+ objectKey := object.Key("ClientVpnEndpointId")
+ objectKey.String(*v.ClientVpnEndpointId)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.SubnetId != nil {
+ objectKey := object.Key("SubnetId")
+ objectKey.String(*v.SubnetId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentAssociateDhcpOptionsInput(v *AssociateDhcpOptionsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DhcpOptionsId != nil {
+ objectKey := object.Key("DhcpOptionsId")
+ objectKey.String(*v.DhcpOptionsId)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.VpcId != nil {
+ objectKey := object.Key("VpcId")
+ objectKey.String(*v.VpcId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentAssociateEnclaveCertificateIamRoleInput(v *AssociateEnclaveCertificateIamRoleInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.CertificateArn != nil {
+ objectKey := object.Key("CertificateArn")
+ objectKey.String(*v.CertificateArn)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.RoleArn != nil {
+ objectKey := object.Key("RoleArn")
+ objectKey.String(*v.RoleArn)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentAssociateIamInstanceProfileInput(v *AssociateIamInstanceProfileInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.IamInstanceProfile != nil {
+ objectKey := object.Key("IamInstanceProfile")
+ if err := awsEc2query_serializeDocumentIamInstanceProfileSpecification(v.IamInstanceProfile, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.InstanceId != nil {
+ objectKey := object.Key("InstanceId")
+ objectKey.String(*v.InstanceId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentAssociateInstanceEventWindowInput(v *AssociateInstanceEventWindowInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AssociationTarget != nil {
+ objectKey := object.Key("AssociationTarget")
+ if err := awsEc2query_serializeDocumentInstanceEventWindowAssociationRequest(v.AssociationTarget, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.InstanceEventWindowId != nil {
+ objectKey := object.Key("InstanceEventWindowId")
+ objectKey.String(*v.InstanceEventWindowId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentAssociateRouteTableInput(v *AssociateRouteTableInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.GatewayId != nil {
+ objectKey := object.Key("GatewayId")
+ objectKey.String(*v.GatewayId)
+ }
+
+ if v.RouteTableId != nil {
+ objectKey := object.Key("RouteTableId")
+ objectKey.String(*v.RouteTableId)
+ }
+
+ if v.SubnetId != nil {
+ objectKey := object.Key("SubnetId")
+ objectKey.String(*v.SubnetId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentAssociateSubnetCidrBlockInput(v *AssociateSubnetCidrBlockInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Ipv6CidrBlock != nil {
+ objectKey := object.Key("Ipv6CidrBlock")
+ objectKey.String(*v.Ipv6CidrBlock)
+ }
+
+ if v.SubnetId != nil {
+ objectKey := object.Key("SubnetId")
+ objectKey.String(*v.SubnetId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentAssociateTransitGatewayMulticastDomainInput(v *AssociateTransitGatewayMulticastDomainInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.SubnetIds != nil {
+ objectKey := object.FlatKey("SubnetIds")
+ if err := awsEc2query_serializeDocumentTransitGatewaySubnetIdList(v.SubnetIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.TransitGatewayAttachmentId != nil {
+ objectKey := object.Key("TransitGatewayAttachmentId")
+ objectKey.String(*v.TransitGatewayAttachmentId)
+ }
+
+ if v.TransitGatewayMulticastDomainId != nil {
+ objectKey := object.Key("TransitGatewayMulticastDomainId")
+ objectKey.String(*v.TransitGatewayMulticastDomainId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentAssociateTransitGatewayRouteTableInput(v *AssociateTransitGatewayRouteTableInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.TransitGatewayAttachmentId != nil {
+ objectKey := object.Key("TransitGatewayAttachmentId")
+ objectKey.String(*v.TransitGatewayAttachmentId)
+ }
+
+ if v.TransitGatewayRouteTableId != nil {
+ objectKey := object.Key("TransitGatewayRouteTableId")
+ objectKey.String(*v.TransitGatewayRouteTableId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentAssociateTrunkInterfaceInput(v *AssociateTrunkInterfaceInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.BranchInterfaceId != nil {
+ objectKey := object.Key("BranchInterfaceId")
+ objectKey.String(*v.BranchInterfaceId)
+ }
+
+ if v.ClientToken != nil {
+ objectKey := object.Key("ClientToken")
+ objectKey.String(*v.ClientToken)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.GreKey != nil {
+ objectKey := object.Key("GreKey")
+ objectKey.Integer(*v.GreKey)
+ }
+
+ if v.TrunkInterfaceId != nil {
+ objectKey := object.Key("TrunkInterfaceId")
+ objectKey.String(*v.TrunkInterfaceId)
+ }
+
+ if v.VlanId != nil {
+ objectKey := object.Key("VlanId")
+ objectKey.Integer(*v.VlanId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentAssociateVpcCidrBlockInput(v *AssociateVpcCidrBlockInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AmazonProvidedIpv6CidrBlock != nil {
+ objectKey := object.Key("AmazonProvidedIpv6CidrBlock")
+ objectKey.Boolean(*v.AmazonProvidedIpv6CidrBlock)
+ }
+
+ if v.CidrBlock != nil {
+ objectKey := object.Key("CidrBlock")
+ objectKey.String(*v.CidrBlock)
+ }
+
+ if v.Ipv6CidrBlock != nil {
+ objectKey := object.Key("Ipv6CidrBlock")
+ objectKey.String(*v.Ipv6CidrBlock)
+ }
+
+ if v.Ipv6CidrBlockNetworkBorderGroup != nil {
+ objectKey := object.Key("Ipv6CidrBlockNetworkBorderGroup")
+ objectKey.String(*v.Ipv6CidrBlockNetworkBorderGroup)
+ }
+
+ if v.Ipv6Pool != nil {
+ objectKey := object.Key("Ipv6Pool")
+ objectKey.String(*v.Ipv6Pool)
+ }
+
+ if v.VpcId != nil {
+ objectKey := object.Key("VpcId")
+ objectKey.String(*v.VpcId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentAttachClassicLinkVpcInput(v *AttachClassicLinkVpcInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Groups != nil {
+ objectKey := object.FlatKey("SecurityGroupId")
+ if err := awsEc2query_serializeDocumentGroupIdStringList(v.Groups, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.InstanceId != nil {
+ objectKey := object.Key("InstanceId")
+ objectKey.String(*v.InstanceId)
+ }
+
+ if v.VpcId != nil {
+ objectKey := object.Key("VpcId")
+ objectKey.String(*v.VpcId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentAttachInternetGatewayInput(v *AttachInternetGatewayInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.InternetGatewayId != nil {
+ objectKey := object.Key("InternetGatewayId")
+ objectKey.String(*v.InternetGatewayId)
+ }
+
+ if v.VpcId != nil {
+ objectKey := object.Key("VpcId")
+ objectKey.String(*v.VpcId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentAttachNetworkInterfaceInput(v *AttachNetworkInterfaceInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DeviceIndex != nil {
+ objectKey := object.Key("DeviceIndex")
+ objectKey.Integer(*v.DeviceIndex)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.InstanceId != nil {
+ objectKey := object.Key("InstanceId")
+ objectKey.String(*v.InstanceId)
+ }
+
+ if v.NetworkCardIndex != nil {
+ objectKey := object.Key("NetworkCardIndex")
+ objectKey.Integer(*v.NetworkCardIndex)
+ }
+
+ if v.NetworkInterfaceId != nil {
+ objectKey := object.Key("NetworkInterfaceId")
+ objectKey.String(*v.NetworkInterfaceId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentAttachVolumeInput(v *AttachVolumeInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Device != nil {
+ objectKey := object.Key("Device")
+ objectKey.String(*v.Device)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.InstanceId != nil {
+ objectKey := object.Key("InstanceId")
+ objectKey.String(*v.InstanceId)
+ }
+
+ if v.VolumeId != nil {
+ objectKey := object.Key("VolumeId")
+ objectKey.String(*v.VolumeId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentAttachVpnGatewayInput(v *AttachVpnGatewayInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.VpcId != nil {
+ objectKey := object.Key("VpcId")
+ objectKey.String(*v.VpcId)
+ }
+
+ if v.VpnGatewayId != nil {
+ objectKey := object.Key("VpnGatewayId")
+ objectKey.String(*v.VpnGatewayId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentAuthorizeClientVpnIngressInput(v *AuthorizeClientVpnIngressInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AccessGroupId != nil {
+ objectKey := object.Key("AccessGroupId")
+ objectKey.String(*v.AccessGroupId)
+ }
+
+ if v.AuthorizeAllGroups != nil {
+ objectKey := object.Key("AuthorizeAllGroups")
+ objectKey.Boolean(*v.AuthorizeAllGroups)
+ }
+
+ if v.ClientToken != nil {
+ objectKey := object.Key("ClientToken")
+ objectKey.String(*v.ClientToken)
+ }
+
+ if v.ClientVpnEndpointId != nil {
+ objectKey := object.Key("ClientVpnEndpointId")
+ objectKey.String(*v.ClientVpnEndpointId)
+ }
+
+ if v.Description != nil {
+ objectKey := object.Key("Description")
+ objectKey.String(*v.Description)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.TargetNetworkCidr != nil {
+ objectKey := object.Key("TargetNetworkCidr")
+ objectKey.String(*v.TargetNetworkCidr)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentAuthorizeSecurityGroupEgressInput(v *AuthorizeSecurityGroupEgressInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.CidrIp != nil {
+ objectKey := object.Key("CidrIp")
+ objectKey.String(*v.CidrIp)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.FromPort != nil {
+ objectKey := object.Key("FromPort")
+ objectKey.Integer(*v.FromPort)
+ }
+
+ if v.GroupId != nil {
+ objectKey := object.Key("GroupId")
+ objectKey.String(*v.GroupId)
+ }
+
+ if v.IpPermissions != nil {
+ objectKey := object.FlatKey("IpPermissions")
+ if err := awsEc2query_serializeDocumentIpPermissionList(v.IpPermissions, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.IpProtocol != nil {
+ objectKey := object.Key("IpProtocol")
+ objectKey.String(*v.IpProtocol)
+ }
+
+ if v.SourceSecurityGroupName != nil {
+ objectKey := object.Key("SourceSecurityGroupName")
+ objectKey.String(*v.SourceSecurityGroupName)
+ }
+
+ if v.SourceSecurityGroupOwnerId != nil {
+ objectKey := object.Key("SourceSecurityGroupOwnerId")
+ objectKey.String(*v.SourceSecurityGroupOwnerId)
+ }
+
+ if v.TagSpecifications != nil {
+ objectKey := object.FlatKey("TagSpecification")
+ if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.ToPort != nil {
+ objectKey := object.Key("ToPort")
+ objectKey.Integer(*v.ToPort)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentAuthorizeSecurityGroupIngressInput(v *AuthorizeSecurityGroupIngressInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.CidrIp != nil {
+ objectKey := object.Key("CidrIp")
+ objectKey.String(*v.CidrIp)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.FromPort != nil {
+ objectKey := object.Key("FromPort")
+ objectKey.Integer(*v.FromPort)
+ }
+
+ if v.GroupId != nil {
+ objectKey := object.Key("GroupId")
+ objectKey.String(*v.GroupId)
+ }
+
+ if v.GroupName != nil {
+ objectKey := object.Key("GroupName")
+ objectKey.String(*v.GroupName)
+ }
+
+ if v.IpPermissions != nil {
+ objectKey := object.FlatKey("IpPermissions")
+ if err := awsEc2query_serializeDocumentIpPermissionList(v.IpPermissions, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.IpProtocol != nil {
+ objectKey := object.Key("IpProtocol")
+ objectKey.String(*v.IpProtocol)
+ }
+
+ if v.SourceSecurityGroupName != nil {
+ objectKey := object.Key("SourceSecurityGroupName")
+ objectKey.String(*v.SourceSecurityGroupName)
+ }
+
+ if v.SourceSecurityGroupOwnerId != nil {
+ objectKey := object.Key("SourceSecurityGroupOwnerId")
+ objectKey.String(*v.SourceSecurityGroupOwnerId)
+ }
+
+ if v.TagSpecifications != nil {
+ objectKey := object.FlatKey("TagSpecification")
+ if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.ToPort != nil {
+ objectKey := object.Key("ToPort")
+ objectKey.Integer(*v.ToPort)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentBundleInstanceInput(v *BundleInstanceInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.InstanceId != nil {
+ objectKey := object.Key("InstanceId")
+ objectKey.String(*v.InstanceId)
+ }
+
+ if v.Storage != nil {
+ objectKey := object.Key("Storage")
+ if err := awsEc2query_serializeDocumentStorage(v.Storage, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentCancelBundleTaskInput(v *CancelBundleTaskInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.BundleId != nil {
+ objectKey := object.Key("BundleId")
+ objectKey.String(*v.BundleId)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentCancelCapacityReservationInput(v *CancelCapacityReservationInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.CapacityReservationId != nil {
+ objectKey := object.Key("CapacityReservationId")
+ objectKey.String(*v.CapacityReservationId)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentCancelConversionTaskInput(v *CancelConversionTaskInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.ConversionTaskId != nil {
+ objectKey := object.Key("ConversionTaskId")
+ objectKey.String(*v.ConversionTaskId)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.ReasonMessage != nil {
+ objectKey := object.Key("ReasonMessage")
+ objectKey.String(*v.ReasonMessage)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentCancelExportTaskInput(v *CancelExportTaskInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.ExportTaskId != nil {
+ objectKey := object.Key("ExportTaskId")
+ objectKey.String(*v.ExportTaskId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentCancelImportTaskInput(v *CancelImportTaskInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.CancelReason != nil {
+ objectKey := object.Key("CancelReason")
+ objectKey.String(*v.CancelReason)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.ImportTaskId != nil {
+ objectKey := object.Key("ImportTaskId")
+ objectKey.String(*v.ImportTaskId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentCancelReservedInstancesListingInput(v *CancelReservedInstancesListingInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.ReservedInstancesListingId != nil {
+ objectKey := object.Key("ReservedInstancesListingId")
+ objectKey.String(*v.ReservedInstancesListingId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentCancelSpotFleetRequestsInput(v *CancelSpotFleetRequestsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.SpotFleetRequestIds != nil {
+ objectKey := object.FlatKey("SpotFleetRequestId")
+ if err := awsEc2query_serializeDocumentSpotFleetRequestIdList(v.SpotFleetRequestIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.TerminateInstances != nil {
+ objectKey := object.Key("TerminateInstances")
+ objectKey.Boolean(*v.TerminateInstances)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentCancelSpotInstanceRequestsInput(v *CancelSpotInstanceRequestsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.SpotInstanceRequestIds != nil {
+ objectKey := object.FlatKey("SpotInstanceRequestId")
+ if err := awsEc2query_serializeDocumentSpotInstanceRequestIdList(v.SpotInstanceRequestIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentConfirmProductInstanceInput(v *ConfirmProductInstanceInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.InstanceId != nil {
+ objectKey := object.Key("InstanceId")
+ objectKey.String(*v.InstanceId)
+ }
+
+ if v.ProductCode != nil {
+ objectKey := object.Key("ProductCode")
+ objectKey.String(*v.ProductCode)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentCopyFpgaImageInput(v *CopyFpgaImageInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.ClientToken != nil {
+ objectKey := object.Key("ClientToken")
+ objectKey.String(*v.ClientToken)
+ }
+
+ if v.Description != nil {
+ objectKey := object.Key("Description")
+ objectKey.String(*v.Description)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Name != nil {
+ objectKey := object.Key("Name")
+ objectKey.String(*v.Name)
+ }
+
+ if v.SourceFpgaImageId != nil {
+ objectKey := object.Key("SourceFpgaImageId")
+ objectKey.String(*v.SourceFpgaImageId)
+ }
+
+ if v.SourceRegion != nil {
+ objectKey := object.Key("SourceRegion")
+ objectKey.String(*v.SourceRegion)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentCopyImageInput(v *CopyImageInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.ClientToken != nil {
+ objectKey := object.Key("ClientToken")
+ objectKey.String(*v.ClientToken)
+ }
+
+ if v.Description != nil {
+ objectKey := object.Key("Description")
+ objectKey.String(*v.Description)
+ }
+
+ if v.DestinationOutpostArn != nil {
+ objectKey := object.Key("DestinationOutpostArn")
+ objectKey.String(*v.DestinationOutpostArn)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Encrypted != nil {
+ objectKey := object.Key("Encrypted")
+ objectKey.Boolean(*v.Encrypted)
+ }
+
+ if v.KmsKeyId != nil {
+ objectKey := object.Key("KmsKeyId")
+ objectKey.String(*v.KmsKeyId)
+ }
+
+ if v.Name != nil {
+ objectKey := object.Key("Name")
+ objectKey.String(*v.Name)
+ }
+
+ if v.SourceImageId != nil {
+ objectKey := object.Key("SourceImageId")
+ objectKey.String(*v.SourceImageId)
+ }
+
+ if v.SourceRegion != nil {
+ objectKey := object.Key("SourceRegion")
+ objectKey.String(*v.SourceRegion)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentCopySnapshotInput(v *CopySnapshotInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Description != nil {
+ objectKey := object.Key("Description")
+ objectKey.String(*v.Description)
+ }
+
+ if v.DestinationOutpostArn != nil {
+ objectKey := object.Key("DestinationOutpostArn")
+ objectKey.String(*v.DestinationOutpostArn)
+ }
+
+ if v.destinationRegion != nil {
+ objectKey := object.Key("DestinationRegion")
+ objectKey.String(*v.destinationRegion)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Encrypted != nil {
+ objectKey := object.Key("Encrypted")
+ objectKey.Boolean(*v.Encrypted)
+ }
+
+ if v.KmsKeyId != nil {
+ objectKey := object.Key("KmsKeyId")
+ objectKey.String(*v.KmsKeyId)
+ }
+
+ if v.PresignedUrl != nil {
+ objectKey := object.Key("PresignedUrl")
+ objectKey.String(*v.PresignedUrl)
+ }
+
+ if v.SourceRegion != nil {
+ objectKey := object.Key("SourceRegion")
+ objectKey.String(*v.SourceRegion)
+ }
+
+ if v.SourceSnapshotId != nil {
+ objectKey := object.Key("SourceSnapshotId")
+ objectKey.String(*v.SourceSnapshotId)
+ }
+
+ if v.TagSpecifications != nil {
+ objectKey := object.FlatKey("TagSpecification")
+ if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentCreateCapacityReservationInput(v *CreateCapacityReservationInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AvailabilityZone != nil {
+ objectKey := object.Key("AvailabilityZone")
+ objectKey.String(*v.AvailabilityZone)
+ }
+
+ if v.AvailabilityZoneId != nil {
+ objectKey := object.Key("AvailabilityZoneId")
+ objectKey.String(*v.AvailabilityZoneId)
+ }
+
+ if v.ClientToken != nil {
+ objectKey := object.Key("ClientToken")
+ objectKey.String(*v.ClientToken)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.EbsOptimized != nil {
+ objectKey := object.Key("EbsOptimized")
+ objectKey.Boolean(*v.EbsOptimized)
+ }
+
+ if v.EndDate != nil {
+ objectKey := object.Key("EndDate")
+ objectKey.String(smithytime.FormatDateTime(*v.EndDate))
+ }
+
+ if len(v.EndDateType) > 0 {
+ objectKey := object.Key("EndDateType")
+ objectKey.String(string(v.EndDateType))
+ }
+
+ if v.EphemeralStorage != nil {
+ objectKey := object.Key("EphemeralStorage")
+ objectKey.Boolean(*v.EphemeralStorage)
+ }
+
+ if v.InstanceCount != nil {
+ objectKey := object.Key("InstanceCount")
+ objectKey.Integer(*v.InstanceCount)
+ }
+
+ if len(v.InstanceMatchCriteria) > 0 {
+ objectKey := object.Key("InstanceMatchCriteria")
+ objectKey.String(string(v.InstanceMatchCriteria))
+ }
+
+ if len(v.InstancePlatform) > 0 {
+ objectKey := object.Key("InstancePlatform")
+ objectKey.String(string(v.InstancePlatform))
+ }
+
+ if v.InstanceType != nil {
+ objectKey := object.Key("InstanceType")
+ objectKey.String(*v.InstanceType)
+ }
+
+ if v.OutpostArn != nil {
+ objectKey := object.Key("OutpostArn")
+ objectKey.String(*v.OutpostArn)
+ }
+
+ if v.TagSpecifications != nil {
+ objectKey := object.FlatKey("TagSpecifications")
+ if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if len(v.Tenancy) > 0 {
+ objectKey := object.Key("Tenancy")
+ objectKey.String(string(v.Tenancy))
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentCreateCarrierGatewayInput(v *CreateCarrierGatewayInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.ClientToken != nil {
+ objectKey := object.Key("ClientToken")
+ objectKey.String(*v.ClientToken)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.TagSpecifications != nil {
+ objectKey := object.FlatKey("TagSpecification")
+ if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.VpcId != nil {
+ objectKey := object.Key("VpcId")
+ objectKey.String(*v.VpcId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentCreateClientVpnEndpointInput(v *CreateClientVpnEndpointInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AuthenticationOptions != nil {
+ objectKey := object.FlatKey("Authentication")
+ if err := awsEc2query_serializeDocumentClientVpnAuthenticationRequestList(v.AuthenticationOptions, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.ClientCidrBlock != nil {
+ objectKey := object.Key("ClientCidrBlock")
+ objectKey.String(*v.ClientCidrBlock)
+ }
+
+ if v.ClientConnectOptions != nil {
+ objectKey := object.Key("ClientConnectOptions")
+ if err := awsEc2query_serializeDocumentClientConnectOptions(v.ClientConnectOptions, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.ClientToken != nil {
+ objectKey := object.Key("ClientToken")
+ objectKey.String(*v.ClientToken)
+ }
+
+ if v.ConnectionLogOptions != nil {
+ objectKey := object.Key("ConnectionLogOptions")
+ if err := awsEc2query_serializeDocumentConnectionLogOptions(v.ConnectionLogOptions, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.Description != nil {
+ objectKey := object.Key("Description")
+ objectKey.String(*v.Description)
+ }
+
+ if v.DnsServers != nil {
+ objectKey := object.FlatKey("DnsServers")
+ if err := awsEc2query_serializeDocumentValueStringList(v.DnsServers, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.SecurityGroupIds != nil {
+ objectKey := object.FlatKey("SecurityGroupId")
+ if err := awsEc2query_serializeDocumentClientVpnSecurityGroupIdSet(v.SecurityGroupIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if len(v.SelfServicePortal) > 0 {
+ objectKey := object.Key("SelfServicePortal")
+ objectKey.String(string(v.SelfServicePortal))
+ }
+
+ if v.ServerCertificateArn != nil {
+ objectKey := object.Key("ServerCertificateArn")
+ objectKey.String(*v.ServerCertificateArn)
+ }
+
+ if v.SplitTunnel != nil {
+ objectKey := object.Key("SplitTunnel")
+ objectKey.Boolean(*v.SplitTunnel)
+ }
+
+ if v.TagSpecifications != nil {
+ objectKey := object.FlatKey("TagSpecification")
+ if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if len(v.TransportProtocol) > 0 {
+ objectKey := object.Key("TransportProtocol")
+ objectKey.String(string(v.TransportProtocol))
+ }
+
+ if v.VpcId != nil {
+ objectKey := object.Key("VpcId")
+ objectKey.String(*v.VpcId)
+ }
+
+ if v.VpnPort != nil {
+ objectKey := object.Key("VpnPort")
+ objectKey.Integer(*v.VpnPort)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentCreateClientVpnRouteInput(v *CreateClientVpnRouteInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.ClientToken != nil {
+ objectKey := object.Key("ClientToken")
+ objectKey.String(*v.ClientToken)
+ }
+
+ if v.ClientVpnEndpointId != nil {
+ objectKey := object.Key("ClientVpnEndpointId")
+ objectKey.String(*v.ClientVpnEndpointId)
+ }
+
+ if v.Description != nil {
+ objectKey := object.Key("Description")
+ objectKey.String(*v.Description)
+ }
+
+ if v.DestinationCidrBlock != nil {
+ objectKey := object.Key("DestinationCidrBlock")
+ objectKey.String(*v.DestinationCidrBlock)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.TargetVpcSubnetId != nil {
+ objectKey := object.Key("TargetVpcSubnetId")
+ objectKey.String(*v.TargetVpcSubnetId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentCreateCustomerGatewayInput(v *CreateCustomerGatewayInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.BgpAsn != nil {
+ objectKey := object.Key("BgpAsn")
+ objectKey.Integer(*v.BgpAsn)
+ }
+
+ if v.CertificateArn != nil {
+ objectKey := object.Key("CertificateArn")
+ objectKey.String(*v.CertificateArn)
+ }
+
+ if v.DeviceName != nil {
+ objectKey := object.Key("DeviceName")
+ objectKey.String(*v.DeviceName)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.PublicIp != nil {
+ objectKey := object.Key("IpAddress")
+ objectKey.String(*v.PublicIp)
+ }
+
+ if v.TagSpecifications != nil {
+ objectKey := object.FlatKey("TagSpecification")
+ if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if len(v.Type) > 0 {
+ objectKey := object.Key("Type")
+ objectKey.String(string(v.Type))
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentCreateDefaultSubnetInput(v *CreateDefaultSubnetInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AvailabilityZone != nil {
+ objectKey := object.Key("AvailabilityZone")
+ objectKey.String(*v.AvailabilityZone)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentCreateDefaultVpcInput(v *CreateDefaultVpcInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentCreateDhcpOptionsInput(v *CreateDhcpOptionsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DhcpConfigurations != nil {
+ objectKey := object.FlatKey("DhcpConfiguration")
+ if err := awsEc2query_serializeDocumentNewDhcpConfigurationList(v.DhcpConfigurations, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.TagSpecifications != nil {
+ objectKey := object.FlatKey("TagSpecification")
+ if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentCreateEgressOnlyInternetGatewayInput(v *CreateEgressOnlyInternetGatewayInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.ClientToken != nil {
+ objectKey := object.Key("ClientToken")
+ objectKey.String(*v.ClientToken)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.TagSpecifications != nil {
+ objectKey := object.FlatKey("TagSpecification")
+ if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.VpcId != nil {
+ objectKey := object.Key("VpcId")
+ objectKey.String(*v.VpcId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentCreateFleetInput(v *CreateFleetInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.ClientToken != nil {
+ objectKey := object.Key("ClientToken")
+ objectKey.String(*v.ClientToken)
+ }
+
+ if v.Context != nil {
+ objectKey := object.Key("Context")
+ objectKey.String(*v.Context)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if len(v.ExcessCapacityTerminationPolicy) > 0 {
+ objectKey := object.Key("ExcessCapacityTerminationPolicy")
+ objectKey.String(string(v.ExcessCapacityTerminationPolicy))
+ }
+
+ if v.LaunchTemplateConfigs != nil {
+ objectKey := object.FlatKey("LaunchTemplateConfigs")
+ if err := awsEc2query_serializeDocumentFleetLaunchTemplateConfigListRequest(v.LaunchTemplateConfigs, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.OnDemandOptions != nil {
+ objectKey := object.Key("OnDemandOptions")
+ if err := awsEc2query_serializeDocumentOnDemandOptionsRequest(v.OnDemandOptions, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.ReplaceUnhealthyInstances != nil {
+ objectKey := object.Key("ReplaceUnhealthyInstances")
+ objectKey.Boolean(*v.ReplaceUnhealthyInstances)
+ }
+
+ if v.SpotOptions != nil {
+ objectKey := object.Key("SpotOptions")
+ if err := awsEc2query_serializeDocumentSpotOptionsRequest(v.SpotOptions, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.TagSpecifications != nil {
+ objectKey := object.FlatKey("TagSpecification")
+ if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.TargetCapacitySpecification != nil {
+ objectKey := object.Key("TargetCapacitySpecification")
+ if err := awsEc2query_serializeDocumentTargetCapacitySpecificationRequest(v.TargetCapacitySpecification, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.TerminateInstancesWithExpiration != nil {
+ objectKey := object.Key("TerminateInstancesWithExpiration")
+ objectKey.Boolean(*v.TerminateInstancesWithExpiration)
+ }
+
+ if len(v.Type) > 0 {
+ objectKey := object.Key("Type")
+ objectKey.String(string(v.Type))
+ }
+
+ if v.ValidFrom != nil {
+ objectKey := object.Key("ValidFrom")
+ objectKey.String(smithytime.FormatDateTime(*v.ValidFrom))
+ }
+
+ if v.ValidUntil != nil {
+ objectKey := object.Key("ValidUntil")
+ objectKey.String(smithytime.FormatDateTime(*v.ValidUntil))
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentCreateFlowLogsInput(v *CreateFlowLogsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.ClientToken != nil {
+ objectKey := object.Key("ClientToken")
+ objectKey.String(*v.ClientToken)
+ }
+
+ if v.DeliverLogsPermissionArn != nil {
+ objectKey := object.Key("DeliverLogsPermissionArn")
+ objectKey.String(*v.DeliverLogsPermissionArn)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.LogDestination != nil {
+ objectKey := object.Key("LogDestination")
+ objectKey.String(*v.LogDestination)
+ }
+
+ if len(v.LogDestinationType) > 0 {
+ objectKey := object.Key("LogDestinationType")
+ objectKey.String(string(v.LogDestinationType))
+ }
+
+ if v.LogFormat != nil {
+ objectKey := object.Key("LogFormat")
+ objectKey.String(*v.LogFormat)
+ }
+
+ if v.LogGroupName != nil {
+ objectKey := object.Key("LogGroupName")
+ objectKey.String(*v.LogGroupName)
+ }
+
+ if v.MaxAggregationInterval != nil {
+ objectKey := object.Key("MaxAggregationInterval")
+ objectKey.Integer(*v.MaxAggregationInterval)
+ }
+
+ if v.ResourceIds != nil {
+ objectKey := object.FlatKey("ResourceId")
+ if err := awsEc2query_serializeDocumentFlowLogResourceIds(v.ResourceIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if len(v.ResourceType) > 0 {
+ objectKey := object.Key("ResourceType")
+ objectKey.String(string(v.ResourceType))
+ }
+
+ if v.TagSpecifications != nil {
+ objectKey := object.FlatKey("TagSpecification")
+ if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if len(v.TrafficType) > 0 {
+ objectKey := object.Key("TrafficType")
+ objectKey.String(string(v.TrafficType))
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentCreateFpgaImageInput(v *CreateFpgaImageInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.ClientToken != nil {
+ objectKey := object.Key("ClientToken")
+ objectKey.String(*v.ClientToken)
+ }
+
+ if v.Description != nil {
+ objectKey := object.Key("Description")
+ objectKey.String(*v.Description)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.InputStorageLocation != nil {
+ objectKey := object.Key("InputStorageLocation")
+ if err := awsEc2query_serializeDocumentStorageLocation(v.InputStorageLocation, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.LogsStorageLocation != nil {
+ objectKey := object.Key("LogsStorageLocation")
+ if err := awsEc2query_serializeDocumentStorageLocation(v.LogsStorageLocation, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.Name != nil {
+ objectKey := object.Key("Name")
+ objectKey.String(*v.Name)
+ }
+
+ if v.TagSpecifications != nil {
+ objectKey := object.FlatKey("TagSpecification")
+ if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentCreateImageInput(v *CreateImageInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.BlockDeviceMappings != nil {
+ objectKey := object.FlatKey("BlockDeviceMapping")
+ if err := awsEc2query_serializeDocumentBlockDeviceMappingRequestList(v.BlockDeviceMappings, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.Description != nil {
+ objectKey := object.Key("Description")
+ objectKey.String(*v.Description)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.InstanceId != nil {
+ objectKey := object.Key("InstanceId")
+ objectKey.String(*v.InstanceId)
+ }
+
+ if v.Name != nil {
+ objectKey := object.Key("Name")
+ objectKey.String(*v.Name)
+ }
+
+ if v.NoReboot != nil {
+ objectKey := object.Key("NoReboot")
+ objectKey.Boolean(*v.NoReboot)
+ }
+
+ if v.TagSpecifications != nil {
+ objectKey := object.FlatKey("TagSpecification")
+ if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentCreateInstanceEventWindowInput(v *CreateInstanceEventWindowInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.CronExpression != nil {
+ objectKey := object.Key("CronExpression")
+ objectKey.String(*v.CronExpression)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Name != nil {
+ objectKey := object.Key("Name")
+ objectKey.String(*v.Name)
+ }
+
+ if v.TagSpecifications != nil {
+ objectKey := object.FlatKey("TagSpecification")
+ if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.TimeRanges != nil {
+ objectKey := object.FlatKey("TimeRange")
+ if err := awsEc2query_serializeDocumentInstanceEventWindowTimeRangeRequestSet(v.TimeRanges, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentCreateInstanceExportTaskInput(v *CreateInstanceExportTaskInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Description != nil {
+ objectKey := object.Key("Description")
+ objectKey.String(*v.Description)
+ }
+
+ if v.ExportToS3Task != nil {
+ objectKey := object.Key("ExportToS3")
+ if err := awsEc2query_serializeDocumentExportToS3TaskSpecification(v.ExportToS3Task, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.InstanceId != nil {
+ objectKey := object.Key("InstanceId")
+ objectKey.String(*v.InstanceId)
+ }
+
+ if v.TagSpecifications != nil {
+ objectKey := object.FlatKey("TagSpecification")
+ if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if len(v.TargetEnvironment) > 0 {
+ objectKey := object.Key("TargetEnvironment")
+ objectKey.String(string(v.TargetEnvironment))
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentCreateInternetGatewayInput(v *CreateInternetGatewayInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.TagSpecifications != nil {
+ objectKey := object.FlatKey("TagSpecification")
+ if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentCreateKeyPairInput(v *CreateKeyPairInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.KeyName != nil {
+ objectKey := object.Key("KeyName")
+ objectKey.String(*v.KeyName)
+ }
+
+ if len(v.KeyType) > 0 {
+ objectKey := object.Key("KeyType")
+ objectKey.String(string(v.KeyType))
+ }
+
+ if v.TagSpecifications != nil {
+ objectKey := object.FlatKey("TagSpecification")
+ if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentCreateLaunchTemplateInput(v *CreateLaunchTemplateInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.ClientToken != nil {
+ objectKey := object.Key("ClientToken")
+ objectKey.String(*v.ClientToken)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.LaunchTemplateData != nil {
+ objectKey := object.Key("LaunchTemplateData")
+ if err := awsEc2query_serializeDocumentRequestLaunchTemplateData(v.LaunchTemplateData, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.LaunchTemplateName != nil {
+ objectKey := object.Key("LaunchTemplateName")
+ objectKey.String(*v.LaunchTemplateName)
+ }
+
+ if v.TagSpecifications != nil {
+ objectKey := object.FlatKey("TagSpecification")
+ if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.VersionDescription != nil {
+ objectKey := object.Key("VersionDescription")
+ objectKey.String(*v.VersionDescription)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentCreateLaunchTemplateVersionInput(v *CreateLaunchTemplateVersionInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.ClientToken != nil {
+ objectKey := object.Key("ClientToken")
+ objectKey.String(*v.ClientToken)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.LaunchTemplateData != nil {
+ objectKey := object.Key("LaunchTemplateData")
+ if err := awsEc2query_serializeDocumentRequestLaunchTemplateData(v.LaunchTemplateData, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.LaunchTemplateId != nil {
+ objectKey := object.Key("LaunchTemplateId")
+ objectKey.String(*v.LaunchTemplateId)
+ }
+
+ if v.LaunchTemplateName != nil {
+ objectKey := object.Key("LaunchTemplateName")
+ objectKey.String(*v.LaunchTemplateName)
+ }
+
+ if v.SourceVersion != nil {
+ objectKey := object.Key("SourceVersion")
+ objectKey.String(*v.SourceVersion)
+ }
+
+ if v.VersionDescription != nil {
+ objectKey := object.Key("VersionDescription")
+ objectKey.String(*v.VersionDescription)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentCreateLocalGatewayRouteInput(v *CreateLocalGatewayRouteInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DestinationCidrBlock != nil {
+ objectKey := object.Key("DestinationCidrBlock")
+ objectKey.String(*v.DestinationCidrBlock)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.LocalGatewayRouteTableId != nil {
+ objectKey := object.Key("LocalGatewayRouteTableId")
+ objectKey.String(*v.LocalGatewayRouteTableId)
+ }
+
+ if v.LocalGatewayVirtualInterfaceGroupId != nil {
+ objectKey := object.Key("LocalGatewayVirtualInterfaceGroupId")
+ objectKey.String(*v.LocalGatewayVirtualInterfaceGroupId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentCreateLocalGatewayRouteTableVpcAssociationInput(v *CreateLocalGatewayRouteTableVpcAssociationInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.LocalGatewayRouteTableId != nil {
+ objectKey := object.Key("LocalGatewayRouteTableId")
+ objectKey.String(*v.LocalGatewayRouteTableId)
+ }
+
+ if v.TagSpecifications != nil {
+ objectKey := object.FlatKey("TagSpecification")
+ if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.VpcId != nil {
+ objectKey := object.Key("VpcId")
+ objectKey.String(*v.VpcId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentCreateManagedPrefixListInput(v *CreateManagedPrefixListInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AddressFamily != nil {
+ objectKey := object.Key("AddressFamily")
+ objectKey.String(*v.AddressFamily)
+ }
+
+ if v.ClientToken != nil {
+ objectKey := object.Key("ClientToken")
+ objectKey.String(*v.ClientToken)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Entries != nil {
+ objectKey := object.FlatKey("Entry")
+ if err := awsEc2query_serializeDocumentAddPrefixListEntries(v.Entries, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxEntries != nil {
+ objectKey := object.Key("MaxEntries")
+ objectKey.Integer(*v.MaxEntries)
+ }
+
+ if v.PrefixListName != nil {
+ objectKey := object.Key("PrefixListName")
+ objectKey.String(*v.PrefixListName)
+ }
+
+ if v.TagSpecifications != nil {
+ objectKey := object.FlatKey("TagSpecification")
+ if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentCreateNatGatewayInput(v *CreateNatGatewayInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AllocationId != nil {
+ objectKey := object.Key("AllocationId")
+ objectKey.String(*v.AllocationId)
+ }
+
+ if v.ClientToken != nil {
+ objectKey := object.Key("ClientToken")
+ objectKey.String(*v.ClientToken)
+ }
+
+ if len(v.ConnectivityType) > 0 {
+ objectKey := object.Key("ConnectivityType")
+ objectKey.String(string(v.ConnectivityType))
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.SubnetId != nil {
+ objectKey := object.Key("SubnetId")
+ objectKey.String(*v.SubnetId)
+ }
+
+ if v.TagSpecifications != nil {
+ objectKey := object.FlatKey("TagSpecification")
+ if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentCreateNetworkAclEntryInput(v *CreateNetworkAclEntryInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.CidrBlock != nil {
+ objectKey := object.Key("CidrBlock")
+ objectKey.String(*v.CidrBlock)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Egress != nil {
+ objectKey := object.Key("Egress")
+ objectKey.Boolean(*v.Egress)
+ }
+
+ if v.IcmpTypeCode != nil {
+ objectKey := object.Key("Icmp")
+ if err := awsEc2query_serializeDocumentIcmpTypeCode(v.IcmpTypeCode, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.Ipv6CidrBlock != nil {
+ objectKey := object.Key("Ipv6CidrBlock")
+ objectKey.String(*v.Ipv6CidrBlock)
+ }
+
+ if v.NetworkAclId != nil {
+ objectKey := object.Key("NetworkAclId")
+ objectKey.String(*v.NetworkAclId)
+ }
+
+ if v.PortRange != nil {
+ objectKey := object.Key("PortRange")
+ if err := awsEc2query_serializeDocumentPortRange(v.PortRange, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.Protocol != nil {
+ objectKey := object.Key("Protocol")
+ objectKey.String(*v.Protocol)
+ }
+
+ if len(v.RuleAction) > 0 {
+ objectKey := object.Key("RuleAction")
+ objectKey.String(string(v.RuleAction))
+ }
+
+ if v.RuleNumber != nil {
+ objectKey := object.Key("RuleNumber")
+ objectKey.Integer(*v.RuleNumber)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentCreateNetworkAclInput(v *CreateNetworkAclInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.TagSpecifications != nil {
+ objectKey := object.FlatKey("TagSpecification")
+ if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.VpcId != nil {
+ objectKey := object.Key("VpcId")
+ objectKey.String(*v.VpcId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentCreateNetworkInsightsPathInput(v *CreateNetworkInsightsPathInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.ClientToken != nil {
+ objectKey := object.Key("ClientToken")
+ objectKey.String(*v.ClientToken)
+ }
+
+ if v.Destination != nil {
+ objectKey := object.Key("Destination")
+ objectKey.String(*v.Destination)
+ }
+
+ if v.DestinationIp != nil {
+ objectKey := object.Key("DestinationIp")
+ objectKey.String(*v.DestinationIp)
+ }
+
+ if v.DestinationPort != nil {
+ objectKey := object.Key("DestinationPort")
+ objectKey.Integer(*v.DestinationPort)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if len(v.Protocol) > 0 {
+ objectKey := object.Key("Protocol")
+ objectKey.String(string(v.Protocol))
+ }
+
+ if v.Source != nil {
+ objectKey := object.Key("Source")
+ objectKey.String(*v.Source)
+ }
+
+ if v.SourceIp != nil {
+ objectKey := object.Key("SourceIp")
+ objectKey.String(*v.SourceIp)
+ }
+
+ if v.TagSpecifications != nil {
+ objectKey := object.FlatKey("TagSpecification")
+ if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentCreateNetworkInterfaceInput(v *CreateNetworkInterfaceInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.ClientToken != nil {
+ objectKey := object.Key("ClientToken")
+ objectKey.String(*v.ClientToken)
+ }
+
+ if v.Description != nil {
+ objectKey := object.Key("Description")
+ objectKey.String(*v.Description)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Groups != nil {
+ objectKey := object.FlatKey("SecurityGroupId")
+ if err := awsEc2query_serializeDocumentSecurityGroupIdStringList(v.Groups, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if len(v.InterfaceType) > 0 {
+ objectKey := object.Key("InterfaceType")
+ objectKey.String(string(v.InterfaceType))
+ }
+
+ if v.Ipv4PrefixCount != nil {
+ objectKey := object.Key("Ipv4PrefixCount")
+ objectKey.Integer(*v.Ipv4PrefixCount)
+ }
+
+ if v.Ipv4Prefixes != nil {
+ objectKey := object.FlatKey("Ipv4Prefix")
+ if err := awsEc2query_serializeDocumentIpv4PrefixList(v.Ipv4Prefixes, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.Ipv6AddressCount != nil {
+ objectKey := object.Key("Ipv6AddressCount")
+ objectKey.Integer(*v.Ipv6AddressCount)
+ }
+
+ if v.Ipv6Addresses != nil {
+ objectKey := object.FlatKey("Ipv6Addresses")
+ if err := awsEc2query_serializeDocumentInstanceIpv6AddressList(v.Ipv6Addresses, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.Ipv6PrefixCount != nil {
+ objectKey := object.Key("Ipv6PrefixCount")
+ objectKey.Integer(*v.Ipv6PrefixCount)
+ }
+
+ if v.Ipv6Prefixes != nil {
+ objectKey := object.FlatKey("Ipv6Prefix")
+ if err := awsEc2query_serializeDocumentIpv6PrefixList(v.Ipv6Prefixes, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.PrivateIpAddress != nil {
+ objectKey := object.Key("PrivateIpAddress")
+ objectKey.String(*v.PrivateIpAddress)
+ }
+
+ if v.PrivateIpAddresses != nil {
+ objectKey := object.FlatKey("PrivateIpAddresses")
+ if err := awsEc2query_serializeDocumentPrivateIpAddressSpecificationList(v.PrivateIpAddresses, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.SecondaryPrivateIpAddressCount != nil {
+ objectKey := object.Key("SecondaryPrivateIpAddressCount")
+ objectKey.Integer(*v.SecondaryPrivateIpAddressCount)
+ }
+
+ if v.SubnetId != nil {
+ objectKey := object.Key("SubnetId")
+ objectKey.String(*v.SubnetId)
+ }
+
+ if v.TagSpecifications != nil {
+ objectKey := object.FlatKey("TagSpecification")
+ if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentCreateNetworkInterfacePermissionInput(v *CreateNetworkInterfacePermissionInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AwsAccountId != nil {
+ objectKey := object.Key("AwsAccountId")
+ objectKey.String(*v.AwsAccountId)
+ }
+
+ if v.AwsService != nil {
+ objectKey := object.Key("AwsService")
+ objectKey.String(*v.AwsService)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.NetworkInterfaceId != nil {
+ objectKey := object.Key("NetworkInterfaceId")
+ objectKey.String(*v.NetworkInterfaceId)
+ }
+
+ if len(v.Permission) > 0 {
+ objectKey := object.Key("Permission")
+ objectKey.String(string(v.Permission))
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentCreatePlacementGroupInput(v *CreatePlacementGroupInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.GroupName != nil {
+ objectKey := object.Key("GroupName")
+ objectKey.String(*v.GroupName)
+ }
+
+ if v.PartitionCount != nil {
+ objectKey := object.Key("PartitionCount")
+ objectKey.Integer(*v.PartitionCount)
+ }
+
+ if len(v.Strategy) > 0 {
+ objectKey := object.Key("Strategy")
+ objectKey.String(string(v.Strategy))
+ }
+
+ if v.TagSpecifications != nil {
+ objectKey := object.FlatKey("TagSpecification")
+ if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentCreateReplaceRootVolumeTaskInput(v *CreateReplaceRootVolumeTaskInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.ClientToken != nil {
+ objectKey := object.Key("ClientToken")
+ objectKey.String(*v.ClientToken)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.InstanceId != nil {
+ objectKey := object.Key("InstanceId")
+ objectKey.String(*v.InstanceId)
+ }
+
+ if v.SnapshotId != nil {
+ objectKey := object.Key("SnapshotId")
+ objectKey.String(*v.SnapshotId)
+ }
+
+ if v.TagSpecifications != nil {
+ objectKey := object.FlatKey("TagSpecification")
+ if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentCreateReservedInstancesListingInput(v *CreateReservedInstancesListingInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.ClientToken != nil {
+ objectKey := object.Key("ClientToken")
+ objectKey.String(*v.ClientToken)
+ }
+
+ if v.InstanceCount != nil {
+ objectKey := object.Key("InstanceCount")
+ objectKey.Integer(*v.InstanceCount)
+ }
+
+ if v.PriceSchedules != nil {
+ objectKey := object.FlatKey("PriceSchedules")
+ if err := awsEc2query_serializeDocumentPriceScheduleSpecificationList(v.PriceSchedules, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.ReservedInstancesId != nil {
+ objectKey := object.Key("ReservedInstancesId")
+ objectKey.String(*v.ReservedInstancesId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentCreateRestoreImageTaskInput(v *CreateRestoreImageTaskInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Bucket != nil {
+ objectKey := object.Key("Bucket")
+ objectKey.String(*v.Bucket)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Name != nil {
+ objectKey := object.Key("Name")
+ objectKey.String(*v.Name)
+ }
+
+ if v.ObjectKey != nil {
+ objectKey := object.Key("ObjectKey")
+ objectKey.String(*v.ObjectKey)
+ }
+
+ if v.TagSpecifications != nil {
+ objectKey := object.FlatKey("TagSpecification")
+ if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentCreateRouteInput(v *CreateRouteInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.CarrierGatewayId != nil {
+ objectKey := object.Key("CarrierGatewayId")
+ objectKey.String(*v.CarrierGatewayId)
+ }
+
+ if v.DestinationCidrBlock != nil {
+ objectKey := object.Key("DestinationCidrBlock")
+ objectKey.String(*v.DestinationCidrBlock)
+ }
+
+ if v.DestinationIpv6CidrBlock != nil {
+ objectKey := object.Key("DestinationIpv6CidrBlock")
+ objectKey.String(*v.DestinationIpv6CidrBlock)
+ }
+
+ if v.DestinationPrefixListId != nil {
+ objectKey := object.Key("DestinationPrefixListId")
+ objectKey.String(*v.DestinationPrefixListId)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.EgressOnlyInternetGatewayId != nil {
+ objectKey := object.Key("EgressOnlyInternetGatewayId")
+ objectKey.String(*v.EgressOnlyInternetGatewayId)
+ }
+
+ if v.GatewayId != nil {
+ objectKey := object.Key("GatewayId")
+ objectKey.String(*v.GatewayId)
+ }
+
+ if v.InstanceId != nil {
+ objectKey := object.Key("InstanceId")
+ objectKey.String(*v.InstanceId)
+ }
+
+ if v.LocalGatewayId != nil {
+ objectKey := object.Key("LocalGatewayId")
+ objectKey.String(*v.LocalGatewayId)
+ }
+
+ if v.NatGatewayId != nil {
+ objectKey := object.Key("NatGatewayId")
+ objectKey.String(*v.NatGatewayId)
+ }
+
+ if v.NetworkInterfaceId != nil {
+ objectKey := object.Key("NetworkInterfaceId")
+ objectKey.String(*v.NetworkInterfaceId)
+ }
+
+ if v.RouteTableId != nil {
+ objectKey := object.Key("RouteTableId")
+ objectKey.String(*v.RouteTableId)
+ }
+
+ if v.TransitGatewayId != nil {
+ objectKey := object.Key("TransitGatewayId")
+ objectKey.String(*v.TransitGatewayId)
+ }
+
+ if v.VpcEndpointId != nil {
+ objectKey := object.Key("VpcEndpointId")
+ objectKey.String(*v.VpcEndpointId)
+ }
+
+ if v.VpcPeeringConnectionId != nil {
+ objectKey := object.Key("VpcPeeringConnectionId")
+ objectKey.String(*v.VpcPeeringConnectionId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentCreateRouteTableInput(v *CreateRouteTableInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.TagSpecifications != nil {
+ objectKey := object.FlatKey("TagSpecification")
+ if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.VpcId != nil {
+ objectKey := object.Key("VpcId")
+ objectKey.String(*v.VpcId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentCreateSecurityGroupInput(v *CreateSecurityGroupInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Description != nil {
+ objectKey := object.Key("GroupDescription")
+ objectKey.String(*v.Description)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.GroupName != nil {
+ objectKey := object.Key("GroupName")
+ objectKey.String(*v.GroupName)
+ }
+
+ if v.TagSpecifications != nil {
+ objectKey := object.FlatKey("TagSpecification")
+ if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.VpcId != nil {
+ objectKey := object.Key("VpcId")
+ objectKey.String(*v.VpcId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentCreateSnapshotInput(v *CreateSnapshotInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Description != nil {
+ objectKey := object.Key("Description")
+ objectKey.String(*v.Description)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.OutpostArn != nil {
+ objectKey := object.Key("OutpostArn")
+ objectKey.String(*v.OutpostArn)
+ }
+
+ if v.TagSpecifications != nil {
+ objectKey := object.FlatKey("TagSpecification")
+ if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.VolumeId != nil {
+ objectKey := object.Key("VolumeId")
+ objectKey.String(*v.VolumeId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentCreateSnapshotsInput(v *CreateSnapshotsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if len(v.CopyTagsFromSource) > 0 {
+ objectKey := object.Key("CopyTagsFromSource")
+ objectKey.String(string(v.CopyTagsFromSource))
+ }
+
+ if v.Description != nil {
+ objectKey := object.Key("Description")
+ objectKey.String(*v.Description)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.InstanceSpecification != nil {
+ objectKey := object.Key("InstanceSpecification")
+ if err := awsEc2query_serializeDocumentInstanceSpecification(v.InstanceSpecification, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.OutpostArn != nil {
+ objectKey := object.Key("OutpostArn")
+ objectKey.String(*v.OutpostArn)
+ }
+
+ if v.TagSpecifications != nil {
+ objectKey := object.FlatKey("TagSpecification")
+ if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentCreateSpotDatafeedSubscriptionInput(v *CreateSpotDatafeedSubscriptionInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Bucket != nil {
+ objectKey := object.Key("Bucket")
+ objectKey.String(*v.Bucket)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Prefix != nil {
+ objectKey := object.Key("Prefix")
+ objectKey.String(*v.Prefix)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentCreateStoreImageTaskInput(v *CreateStoreImageTaskInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Bucket != nil {
+ objectKey := object.Key("Bucket")
+ objectKey.String(*v.Bucket)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.ImageId != nil {
+ objectKey := object.Key("ImageId")
+ objectKey.String(*v.ImageId)
+ }
+
+ if v.S3ObjectTags != nil {
+ objectKey := object.FlatKey("S3ObjectTag")
+ if err := awsEc2query_serializeDocumentS3ObjectTagList(v.S3ObjectTags, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentCreateSubnetCidrReservationInput(v *CreateSubnetCidrReservationInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Cidr != nil {
+ objectKey := object.Key("Cidr")
+ objectKey.String(*v.Cidr)
+ }
+
+ if v.Description != nil {
+ objectKey := object.Key("Description")
+ objectKey.String(*v.Description)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if len(v.ReservationType) > 0 {
+ objectKey := object.Key("ReservationType")
+ objectKey.String(string(v.ReservationType))
+ }
+
+ if v.SubnetId != nil {
+ objectKey := object.Key("SubnetId")
+ objectKey.String(*v.SubnetId)
+ }
+
+ if v.TagSpecifications != nil {
+ objectKey := object.FlatKey("TagSpecification")
+ if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentCreateSubnetInput(v *CreateSubnetInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AvailabilityZone != nil {
+ objectKey := object.Key("AvailabilityZone")
+ objectKey.String(*v.AvailabilityZone)
+ }
+
+ if v.AvailabilityZoneId != nil {
+ objectKey := object.Key("AvailabilityZoneId")
+ objectKey.String(*v.AvailabilityZoneId)
+ }
+
+ if v.CidrBlock != nil {
+ objectKey := object.Key("CidrBlock")
+ objectKey.String(*v.CidrBlock)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Ipv6CidrBlock != nil {
+ objectKey := object.Key("Ipv6CidrBlock")
+ objectKey.String(*v.Ipv6CidrBlock)
+ }
+
+ if v.OutpostArn != nil {
+ objectKey := object.Key("OutpostArn")
+ objectKey.String(*v.OutpostArn)
+ }
+
+ if v.TagSpecifications != nil {
+ objectKey := object.FlatKey("TagSpecification")
+ if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.VpcId != nil {
+ objectKey := object.Key("VpcId")
+ objectKey.String(*v.VpcId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentCreateTagsInput(v *CreateTagsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Resources != nil {
+ objectKey := object.FlatKey("ResourceId")
+ if err := awsEc2query_serializeDocumentResourceIdList(v.Resources, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.Tags != nil {
+ objectKey := object.FlatKey("Tag")
+ if err := awsEc2query_serializeDocumentTagList(v.Tags, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentCreateTrafficMirrorFilterInput(v *CreateTrafficMirrorFilterInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.ClientToken != nil {
+ objectKey := object.Key("ClientToken")
+ objectKey.String(*v.ClientToken)
+ }
+
+ if v.Description != nil {
+ objectKey := object.Key("Description")
+ objectKey.String(*v.Description)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.TagSpecifications != nil {
+ objectKey := object.FlatKey("TagSpecification")
+ if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentCreateTrafficMirrorFilterRuleInput(v *CreateTrafficMirrorFilterRuleInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.ClientToken != nil {
+ objectKey := object.Key("ClientToken")
+ objectKey.String(*v.ClientToken)
+ }
+
+ if v.Description != nil {
+ objectKey := object.Key("Description")
+ objectKey.String(*v.Description)
+ }
+
+ if v.DestinationCidrBlock != nil {
+ objectKey := object.Key("DestinationCidrBlock")
+ objectKey.String(*v.DestinationCidrBlock)
+ }
+
+ if v.DestinationPortRange != nil {
+ objectKey := object.Key("DestinationPortRange")
+ if err := awsEc2query_serializeDocumentTrafficMirrorPortRangeRequest(v.DestinationPortRange, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Protocol != nil {
+ objectKey := object.Key("Protocol")
+ objectKey.Integer(*v.Protocol)
+ }
+
+ if len(v.RuleAction) > 0 {
+ objectKey := object.Key("RuleAction")
+ objectKey.String(string(v.RuleAction))
+ }
+
+ if v.RuleNumber != nil {
+ objectKey := object.Key("RuleNumber")
+ objectKey.Integer(*v.RuleNumber)
+ }
+
+ if v.SourceCidrBlock != nil {
+ objectKey := object.Key("SourceCidrBlock")
+ objectKey.String(*v.SourceCidrBlock)
+ }
+
+ if v.SourcePortRange != nil {
+ objectKey := object.Key("SourcePortRange")
+ if err := awsEc2query_serializeDocumentTrafficMirrorPortRangeRequest(v.SourcePortRange, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if len(v.TrafficDirection) > 0 {
+ objectKey := object.Key("TrafficDirection")
+ objectKey.String(string(v.TrafficDirection))
+ }
+
+ if v.TrafficMirrorFilterId != nil {
+ objectKey := object.Key("TrafficMirrorFilterId")
+ objectKey.String(*v.TrafficMirrorFilterId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentCreateTrafficMirrorSessionInput(v *CreateTrafficMirrorSessionInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.ClientToken != nil {
+ objectKey := object.Key("ClientToken")
+ objectKey.String(*v.ClientToken)
+ }
+
+ if v.Description != nil {
+ objectKey := object.Key("Description")
+ objectKey.String(*v.Description)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.NetworkInterfaceId != nil {
+ objectKey := object.Key("NetworkInterfaceId")
+ objectKey.String(*v.NetworkInterfaceId)
+ }
+
+ if v.PacketLength != nil {
+ objectKey := object.Key("PacketLength")
+ objectKey.Integer(*v.PacketLength)
+ }
+
+ if v.SessionNumber != nil {
+ objectKey := object.Key("SessionNumber")
+ objectKey.Integer(*v.SessionNumber)
+ }
+
+ if v.TagSpecifications != nil {
+ objectKey := object.FlatKey("TagSpecification")
+ if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.TrafficMirrorFilterId != nil {
+ objectKey := object.Key("TrafficMirrorFilterId")
+ objectKey.String(*v.TrafficMirrorFilterId)
+ }
+
+ if v.TrafficMirrorTargetId != nil {
+ objectKey := object.Key("TrafficMirrorTargetId")
+ objectKey.String(*v.TrafficMirrorTargetId)
+ }
+
+ if v.VirtualNetworkId != nil {
+ objectKey := object.Key("VirtualNetworkId")
+ objectKey.Integer(*v.VirtualNetworkId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentCreateTrafficMirrorTargetInput(v *CreateTrafficMirrorTargetInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.ClientToken != nil {
+ objectKey := object.Key("ClientToken")
+ objectKey.String(*v.ClientToken)
+ }
+
+ if v.Description != nil {
+ objectKey := object.Key("Description")
+ objectKey.String(*v.Description)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.NetworkInterfaceId != nil {
+ objectKey := object.Key("NetworkInterfaceId")
+ objectKey.String(*v.NetworkInterfaceId)
+ }
+
+ if v.NetworkLoadBalancerArn != nil {
+ objectKey := object.Key("NetworkLoadBalancerArn")
+ objectKey.String(*v.NetworkLoadBalancerArn)
+ }
+
+ if v.TagSpecifications != nil {
+ objectKey := object.FlatKey("TagSpecification")
+ if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentCreateTransitGatewayConnectInput(v *CreateTransitGatewayConnectInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Options != nil {
+ objectKey := object.Key("Options")
+ if err := awsEc2query_serializeDocumentCreateTransitGatewayConnectRequestOptions(v.Options, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.TagSpecifications != nil {
+ objectKey := object.FlatKey("TagSpecification")
+ if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.TransportTransitGatewayAttachmentId != nil {
+ objectKey := object.Key("TransportTransitGatewayAttachmentId")
+ objectKey.String(*v.TransportTransitGatewayAttachmentId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentCreateTransitGatewayConnectPeerInput(v *CreateTransitGatewayConnectPeerInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.BgpOptions != nil {
+ objectKey := object.Key("BgpOptions")
+ if err := awsEc2query_serializeDocumentTransitGatewayConnectRequestBgpOptions(v.BgpOptions, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.InsideCidrBlocks != nil {
+ objectKey := object.FlatKey("InsideCidrBlocks")
+ if err := awsEc2query_serializeDocumentInsideCidrBlocksStringList(v.InsideCidrBlocks, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.PeerAddress != nil {
+ objectKey := object.Key("PeerAddress")
+ objectKey.String(*v.PeerAddress)
+ }
+
+ if v.TagSpecifications != nil {
+ objectKey := object.FlatKey("TagSpecification")
+ if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.TransitGatewayAddress != nil {
+ objectKey := object.Key("TransitGatewayAddress")
+ objectKey.String(*v.TransitGatewayAddress)
+ }
+
+ if v.TransitGatewayAttachmentId != nil {
+ objectKey := object.Key("TransitGatewayAttachmentId")
+ objectKey.String(*v.TransitGatewayAttachmentId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentCreateTransitGatewayInput(v *CreateTransitGatewayInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Description != nil {
+ objectKey := object.Key("Description")
+ objectKey.String(*v.Description)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Options != nil {
+ objectKey := object.Key("Options")
+ if err := awsEc2query_serializeDocumentTransitGatewayRequestOptions(v.Options, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.TagSpecifications != nil {
+ objectKey := object.FlatKey("TagSpecification")
+ if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentCreateTransitGatewayMulticastDomainInput(v *CreateTransitGatewayMulticastDomainInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Options != nil {
+ objectKey := object.Key("Options")
+ if err := awsEc2query_serializeDocumentCreateTransitGatewayMulticastDomainRequestOptions(v.Options, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.TagSpecifications != nil {
+ objectKey := object.FlatKey("TagSpecification")
+ if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.TransitGatewayId != nil {
+ objectKey := object.Key("TransitGatewayId")
+ objectKey.String(*v.TransitGatewayId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentCreateTransitGatewayPeeringAttachmentInput(v *CreateTransitGatewayPeeringAttachmentInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.PeerAccountId != nil {
+ objectKey := object.Key("PeerAccountId")
+ objectKey.String(*v.PeerAccountId)
+ }
+
+ if v.PeerRegion != nil {
+ objectKey := object.Key("PeerRegion")
+ objectKey.String(*v.PeerRegion)
+ }
+
+ if v.PeerTransitGatewayId != nil {
+ objectKey := object.Key("PeerTransitGatewayId")
+ objectKey.String(*v.PeerTransitGatewayId)
+ }
+
+ if v.TagSpecifications != nil {
+ objectKey := object.FlatKey("TagSpecification")
+ if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.TransitGatewayId != nil {
+ objectKey := object.Key("TransitGatewayId")
+ objectKey.String(*v.TransitGatewayId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentCreateTransitGatewayPrefixListReferenceInput(v *CreateTransitGatewayPrefixListReferenceInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Blackhole != nil {
+ objectKey := object.Key("Blackhole")
+ objectKey.Boolean(*v.Blackhole)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.PrefixListId != nil {
+ objectKey := object.Key("PrefixListId")
+ objectKey.String(*v.PrefixListId)
+ }
+
+ if v.TransitGatewayAttachmentId != nil {
+ objectKey := object.Key("TransitGatewayAttachmentId")
+ objectKey.String(*v.TransitGatewayAttachmentId)
+ }
+
+ if v.TransitGatewayRouteTableId != nil {
+ objectKey := object.Key("TransitGatewayRouteTableId")
+ objectKey.String(*v.TransitGatewayRouteTableId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentCreateTransitGatewayRouteInput(v *CreateTransitGatewayRouteInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Blackhole != nil {
+ objectKey := object.Key("Blackhole")
+ objectKey.Boolean(*v.Blackhole)
+ }
+
+ if v.DestinationCidrBlock != nil {
+ objectKey := object.Key("DestinationCidrBlock")
+ objectKey.String(*v.DestinationCidrBlock)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.TransitGatewayAttachmentId != nil {
+ objectKey := object.Key("TransitGatewayAttachmentId")
+ objectKey.String(*v.TransitGatewayAttachmentId)
+ }
+
+ if v.TransitGatewayRouteTableId != nil {
+ objectKey := object.Key("TransitGatewayRouteTableId")
+ objectKey.String(*v.TransitGatewayRouteTableId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentCreateTransitGatewayRouteTableInput(v *CreateTransitGatewayRouteTableInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.TagSpecifications != nil {
+ objectKey := object.FlatKey("TagSpecifications")
+ if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.TransitGatewayId != nil {
+ objectKey := object.Key("TransitGatewayId")
+ objectKey.String(*v.TransitGatewayId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentCreateTransitGatewayVpcAttachmentInput(v *CreateTransitGatewayVpcAttachmentInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Options != nil {
+ objectKey := object.Key("Options")
+ if err := awsEc2query_serializeDocumentCreateTransitGatewayVpcAttachmentRequestOptions(v.Options, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.SubnetIds != nil {
+ objectKey := object.FlatKey("SubnetIds")
+ if err := awsEc2query_serializeDocumentTransitGatewaySubnetIdList(v.SubnetIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.TagSpecifications != nil {
+ objectKey := object.FlatKey("TagSpecifications")
+ if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.TransitGatewayId != nil {
+ objectKey := object.Key("TransitGatewayId")
+ objectKey.String(*v.TransitGatewayId)
+ }
+
+ if v.VpcId != nil {
+ objectKey := object.Key("VpcId")
+ objectKey.String(*v.VpcId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentCreateVolumeInput(v *CreateVolumeInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AvailabilityZone != nil {
+ objectKey := object.Key("AvailabilityZone")
+ objectKey.String(*v.AvailabilityZone)
+ }
+
+ if v.ClientToken != nil {
+ objectKey := object.Key("ClientToken")
+ objectKey.String(*v.ClientToken)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Encrypted != nil {
+ objectKey := object.Key("Encrypted")
+ objectKey.Boolean(*v.Encrypted)
+ }
+
+ if v.Iops != nil {
+ objectKey := object.Key("Iops")
+ objectKey.Integer(*v.Iops)
+ }
+
+ if v.KmsKeyId != nil {
+ objectKey := object.Key("KmsKeyId")
+ objectKey.String(*v.KmsKeyId)
+ }
+
+ if v.MultiAttachEnabled != nil {
+ objectKey := object.Key("MultiAttachEnabled")
+ objectKey.Boolean(*v.MultiAttachEnabled)
+ }
+
+ if v.OutpostArn != nil {
+ objectKey := object.Key("OutpostArn")
+ objectKey.String(*v.OutpostArn)
+ }
+
+ if v.Size != nil {
+ objectKey := object.Key("Size")
+ objectKey.Integer(*v.Size)
+ }
+
+ if v.SnapshotId != nil {
+ objectKey := object.Key("SnapshotId")
+ objectKey.String(*v.SnapshotId)
+ }
+
+ if v.TagSpecifications != nil {
+ objectKey := object.FlatKey("TagSpecification")
+ if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.Throughput != nil {
+ objectKey := object.Key("Throughput")
+ objectKey.Integer(*v.Throughput)
+ }
+
+ if len(v.VolumeType) > 0 {
+ objectKey := object.Key("VolumeType")
+ objectKey.String(string(v.VolumeType))
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentCreateVpcEndpointConnectionNotificationInput(v *CreateVpcEndpointConnectionNotificationInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.ClientToken != nil {
+ objectKey := object.Key("ClientToken")
+ objectKey.String(*v.ClientToken)
+ }
+
+ if v.ConnectionEvents != nil {
+ objectKey := object.FlatKey("ConnectionEvents")
+ if err := awsEc2query_serializeDocumentValueStringList(v.ConnectionEvents, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.ConnectionNotificationArn != nil {
+ objectKey := object.Key("ConnectionNotificationArn")
+ objectKey.String(*v.ConnectionNotificationArn)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.ServiceId != nil {
+ objectKey := object.Key("ServiceId")
+ objectKey.String(*v.ServiceId)
+ }
+
+ if v.VpcEndpointId != nil {
+ objectKey := object.Key("VpcEndpointId")
+ objectKey.String(*v.VpcEndpointId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentCreateVpcEndpointInput(v *CreateVpcEndpointInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.ClientToken != nil {
+ objectKey := object.Key("ClientToken")
+ objectKey.String(*v.ClientToken)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.PolicyDocument != nil {
+ objectKey := object.Key("PolicyDocument")
+ objectKey.String(*v.PolicyDocument)
+ }
+
+ if v.PrivateDnsEnabled != nil {
+ objectKey := object.Key("PrivateDnsEnabled")
+ objectKey.Boolean(*v.PrivateDnsEnabled)
+ }
+
+ if v.RouteTableIds != nil {
+ objectKey := object.FlatKey("RouteTableId")
+ if err := awsEc2query_serializeDocumentVpcEndpointRouteTableIdList(v.RouteTableIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.SecurityGroupIds != nil {
+ objectKey := object.FlatKey("SecurityGroupId")
+ if err := awsEc2query_serializeDocumentVpcEndpointSecurityGroupIdList(v.SecurityGroupIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.ServiceName != nil {
+ objectKey := object.Key("ServiceName")
+ objectKey.String(*v.ServiceName)
+ }
+
+ if v.SubnetIds != nil {
+ objectKey := object.FlatKey("SubnetId")
+ if err := awsEc2query_serializeDocumentVpcEndpointSubnetIdList(v.SubnetIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.TagSpecifications != nil {
+ objectKey := object.FlatKey("TagSpecification")
+ if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if len(v.VpcEndpointType) > 0 {
+ objectKey := object.Key("VpcEndpointType")
+ objectKey.String(string(v.VpcEndpointType))
+ }
+
+ if v.VpcId != nil {
+ objectKey := object.Key("VpcId")
+ objectKey.String(*v.VpcId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentCreateVpcEndpointServiceConfigurationInput(v *CreateVpcEndpointServiceConfigurationInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AcceptanceRequired != nil {
+ objectKey := object.Key("AcceptanceRequired")
+ objectKey.Boolean(*v.AcceptanceRequired)
+ }
+
+ if v.ClientToken != nil {
+ objectKey := object.Key("ClientToken")
+ objectKey.String(*v.ClientToken)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.GatewayLoadBalancerArns != nil {
+ objectKey := object.FlatKey("GatewayLoadBalancerArn")
+ if err := awsEc2query_serializeDocumentValueStringList(v.GatewayLoadBalancerArns, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.NetworkLoadBalancerArns != nil {
+ objectKey := object.FlatKey("NetworkLoadBalancerArn")
+ if err := awsEc2query_serializeDocumentValueStringList(v.NetworkLoadBalancerArns, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.PrivateDnsName != nil {
+ objectKey := object.Key("PrivateDnsName")
+ objectKey.String(*v.PrivateDnsName)
+ }
+
+ if v.TagSpecifications != nil {
+ objectKey := object.FlatKey("TagSpecification")
+ if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentCreateVpcInput(v *CreateVpcInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AmazonProvidedIpv6CidrBlock != nil {
+ objectKey := object.Key("AmazonProvidedIpv6CidrBlock")
+ objectKey.Boolean(*v.AmazonProvidedIpv6CidrBlock)
+ }
+
+ if v.CidrBlock != nil {
+ objectKey := object.Key("CidrBlock")
+ objectKey.String(*v.CidrBlock)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if len(v.InstanceTenancy) > 0 {
+ objectKey := object.Key("InstanceTenancy")
+ objectKey.String(string(v.InstanceTenancy))
+ }
+
+ if v.Ipv6CidrBlock != nil {
+ objectKey := object.Key("Ipv6CidrBlock")
+ objectKey.String(*v.Ipv6CidrBlock)
+ }
+
+ if v.Ipv6CidrBlockNetworkBorderGroup != nil {
+ objectKey := object.Key("Ipv6CidrBlockNetworkBorderGroup")
+ objectKey.String(*v.Ipv6CidrBlockNetworkBorderGroup)
+ }
+
+ if v.Ipv6Pool != nil {
+ objectKey := object.Key("Ipv6Pool")
+ objectKey.String(*v.Ipv6Pool)
+ }
+
+ if v.TagSpecifications != nil {
+ objectKey := object.FlatKey("TagSpecification")
+ if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentCreateVpcPeeringConnectionInput(v *CreateVpcPeeringConnectionInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.PeerOwnerId != nil {
+ objectKey := object.Key("PeerOwnerId")
+ objectKey.String(*v.PeerOwnerId)
+ }
+
+ if v.PeerRegion != nil {
+ objectKey := object.Key("PeerRegion")
+ objectKey.String(*v.PeerRegion)
+ }
+
+ if v.PeerVpcId != nil {
+ objectKey := object.Key("PeerVpcId")
+ objectKey.String(*v.PeerVpcId)
+ }
+
+ if v.TagSpecifications != nil {
+ objectKey := object.FlatKey("TagSpecification")
+ if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.VpcId != nil {
+ objectKey := object.Key("VpcId")
+ objectKey.String(*v.VpcId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentCreateVpnConnectionInput(v *CreateVpnConnectionInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.CustomerGatewayId != nil {
+ objectKey := object.Key("CustomerGatewayId")
+ objectKey.String(*v.CustomerGatewayId)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Options != nil {
+ objectKey := object.Key("Options")
+ if err := awsEc2query_serializeDocumentVpnConnectionOptionsSpecification(v.Options, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.TagSpecifications != nil {
+ objectKey := object.FlatKey("TagSpecification")
+ if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.TransitGatewayId != nil {
+ objectKey := object.Key("TransitGatewayId")
+ objectKey.String(*v.TransitGatewayId)
+ }
+
+ if v.Type != nil {
+ objectKey := object.Key("Type")
+ objectKey.String(*v.Type)
+ }
+
+ if v.VpnGatewayId != nil {
+ objectKey := object.Key("VpnGatewayId")
+ objectKey.String(*v.VpnGatewayId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentCreateVpnConnectionRouteInput(v *CreateVpnConnectionRouteInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DestinationCidrBlock != nil {
+ objectKey := object.Key("DestinationCidrBlock")
+ objectKey.String(*v.DestinationCidrBlock)
+ }
+
+ if v.VpnConnectionId != nil {
+ objectKey := object.Key("VpnConnectionId")
+ objectKey.String(*v.VpnConnectionId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentCreateVpnGatewayInput(v *CreateVpnGatewayInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AmazonSideAsn != nil {
+ objectKey := object.Key("AmazonSideAsn")
+ objectKey.Long(*v.AmazonSideAsn)
+ }
+
+ if v.AvailabilityZone != nil {
+ objectKey := object.Key("AvailabilityZone")
+ objectKey.String(*v.AvailabilityZone)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.TagSpecifications != nil {
+ objectKey := object.FlatKey("TagSpecification")
+ if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if len(v.Type) > 0 {
+ objectKey := object.Key("Type")
+ objectKey.String(string(v.Type))
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDeleteCarrierGatewayInput(v *DeleteCarrierGatewayInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.CarrierGatewayId != nil {
+ objectKey := object.Key("CarrierGatewayId")
+ objectKey.String(*v.CarrierGatewayId)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDeleteClientVpnEndpointInput(v *DeleteClientVpnEndpointInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.ClientVpnEndpointId != nil {
+ objectKey := object.Key("ClientVpnEndpointId")
+ objectKey.String(*v.ClientVpnEndpointId)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDeleteClientVpnRouteInput(v *DeleteClientVpnRouteInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.ClientVpnEndpointId != nil {
+ objectKey := object.Key("ClientVpnEndpointId")
+ objectKey.String(*v.ClientVpnEndpointId)
+ }
+
+ if v.DestinationCidrBlock != nil {
+ objectKey := object.Key("DestinationCidrBlock")
+ objectKey.String(*v.DestinationCidrBlock)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.TargetVpcSubnetId != nil {
+ objectKey := object.Key("TargetVpcSubnetId")
+ objectKey.String(*v.TargetVpcSubnetId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDeleteCustomerGatewayInput(v *DeleteCustomerGatewayInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.CustomerGatewayId != nil {
+ objectKey := object.Key("CustomerGatewayId")
+ objectKey.String(*v.CustomerGatewayId)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDeleteDhcpOptionsInput(v *DeleteDhcpOptionsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DhcpOptionsId != nil {
+ objectKey := object.Key("DhcpOptionsId")
+ objectKey.String(*v.DhcpOptionsId)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDeleteEgressOnlyInternetGatewayInput(v *DeleteEgressOnlyInternetGatewayInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.EgressOnlyInternetGatewayId != nil {
+ objectKey := object.Key("EgressOnlyInternetGatewayId")
+ objectKey.String(*v.EgressOnlyInternetGatewayId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDeleteFleetsInput(v *DeleteFleetsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.FleetIds != nil {
+ objectKey := object.FlatKey("FleetId")
+ if err := awsEc2query_serializeDocumentFleetIdSet(v.FleetIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.TerminateInstances != nil {
+ objectKey := object.Key("TerminateInstances")
+ objectKey.Boolean(*v.TerminateInstances)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDeleteFlowLogsInput(v *DeleteFlowLogsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.FlowLogIds != nil {
+ objectKey := object.FlatKey("FlowLogId")
+ if err := awsEc2query_serializeDocumentFlowLogIdList(v.FlowLogIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDeleteFpgaImageInput(v *DeleteFpgaImageInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.FpgaImageId != nil {
+ objectKey := object.Key("FpgaImageId")
+ objectKey.String(*v.FpgaImageId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDeleteInstanceEventWindowInput(v *DeleteInstanceEventWindowInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.ForceDelete != nil {
+ objectKey := object.Key("ForceDelete")
+ objectKey.Boolean(*v.ForceDelete)
+ }
+
+ if v.InstanceEventWindowId != nil {
+ objectKey := object.Key("InstanceEventWindowId")
+ objectKey.String(*v.InstanceEventWindowId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDeleteInternetGatewayInput(v *DeleteInternetGatewayInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.InternetGatewayId != nil {
+ objectKey := object.Key("InternetGatewayId")
+ objectKey.String(*v.InternetGatewayId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDeleteKeyPairInput(v *DeleteKeyPairInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.KeyName != nil {
+ objectKey := object.Key("KeyName")
+ objectKey.String(*v.KeyName)
+ }
+
+ if v.KeyPairId != nil {
+ objectKey := object.Key("KeyPairId")
+ objectKey.String(*v.KeyPairId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDeleteLaunchTemplateInput(v *DeleteLaunchTemplateInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.LaunchTemplateId != nil {
+ objectKey := object.Key("LaunchTemplateId")
+ objectKey.String(*v.LaunchTemplateId)
+ }
+
+ if v.LaunchTemplateName != nil {
+ objectKey := object.Key("LaunchTemplateName")
+ objectKey.String(*v.LaunchTemplateName)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDeleteLaunchTemplateVersionsInput(v *DeleteLaunchTemplateVersionsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.LaunchTemplateId != nil {
+ objectKey := object.Key("LaunchTemplateId")
+ objectKey.String(*v.LaunchTemplateId)
+ }
+
+ if v.LaunchTemplateName != nil {
+ objectKey := object.Key("LaunchTemplateName")
+ objectKey.String(*v.LaunchTemplateName)
+ }
+
+ if v.Versions != nil {
+ objectKey := object.FlatKey("LaunchTemplateVersion")
+ if err := awsEc2query_serializeDocumentVersionStringList(v.Versions, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDeleteLocalGatewayRouteInput(v *DeleteLocalGatewayRouteInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DestinationCidrBlock != nil {
+ objectKey := object.Key("DestinationCidrBlock")
+ objectKey.String(*v.DestinationCidrBlock)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.LocalGatewayRouteTableId != nil {
+ objectKey := object.Key("LocalGatewayRouteTableId")
+ objectKey.String(*v.LocalGatewayRouteTableId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDeleteLocalGatewayRouteTableVpcAssociationInput(v *DeleteLocalGatewayRouteTableVpcAssociationInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.LocalGatewayRouteTableVpcAssociationId != nil {
+ objectKey := object.Key("LocalGatewayRouteTableVpcAssociationId")
+ objectKey.String(*v.LocalGatewayRouteTableVpcAssociationId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDeleteManagedPrefixListInput(v *DeleteManagedPrefixListInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.PrefixListId != nil {
+ objectKey := object.Key("PrefixListId")
+ objectKey.String(*v.PrefixListId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDeleteNatGatewayInput(v *DeleteNatGatewayInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.NatGatewayId != nil {
+ objectKey := object.Key("NatGatewayId")
+ objectKey.String(*v.NatGatewayId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDeleteNetworkAclEntryInput(v *DeleteNetworkAclEntryInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Egress != nil {
+ objectKey := object.Key("Egress")
+ objectKey.Boolean(*v.Egress)
+ }
+
+ if v.NetworkAclId != nil {
+ objectKey := object.Key("NetworkAclId")
+ objectKey.String(*v.NetworkAclId)
+ }
+
+ if v.RuleNumber != nil {
+ objectKey := object.Key("RuleNumber")
+ objectKey.Integer(*v.RuleNumber)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDeleteNetworkAclInput(v *DeleteNetworkAclInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.NetworkAclId != nil {
+ objectKey := object.Key("NetworkAclId")
+ objectKey.String(*v.NetworkAclId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDeleteNetworkInsightsAnalysisInput(v *DeleteNetworkInsightsAnalysisInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.NetworkInsightsAnalysisId != nil {
+ objectKey := object.Key("NetworkInsightsAnalysisId")
+ objectKey.String(*v.NetworkInsightsAnalysisId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDeleteNetworkInsightsPathInput(v *DeleteNetworkInsightsPathInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.NetworkInsightsPathId != nil {
+ objectKey := object.Key("NetworkInsightsPathId")
+ objectKey.String(*v.NetworkInsightsPathId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDeleteNetworkInterfaceInput(v *DeleteNetworkInterfaceInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.NetworkInterfaceId != nil {
+ objectKey := object.Key("NetworkInterfaceId")
+ objectKey.String(*v.NetworkInterfaceId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDeleteNetworkInterfacePermissionInput(v *DeleteNetworkInterfacePermissionInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Force != nil {
+ objectKey := object.Key("Force")
+ objectKey.Boolean(*v.Force)
+ }
+
+ if v.NetworkInterfacePermissionId != nil {
+ objectKey := object.Key("NetworkInterfacePermissionId")
+ objectKey.String(*v.NetworkInterfacePermissionId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDeletePlacementGroupInput(v *DeletePlacementGroupInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.GroupName != nil {
+ objectKey := object.Key("GroupName")
+ objectKey.String(*v.GroupName)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDeleteQueuedReservedInstancesInput(v *DeleteQueuedReservedInstancesInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.ReservedInstancesIds != nil {
+ objectKey := object.FlatKey("ReservedInstancesId")
+ if err := awsEc2query_serializeDocumentDeleteQueuedReservedInstancesIdList(v.ReservedInstancesIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDeleteRouteInput(v *DeleteRouteInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DestinationCidrBlock != nil {
+ objectKey := object.Key("DestinationCidrBlock")
+ objectKey.String(*v.DestinationCidrBlock)
+ }
+
+ if v.DestinationIpv6CidrBlock != nil {
+ objectKey := object.Key("DestinationIpv6CidrBlock")
+ objectKey.String(*v.DestinationIpv6CidrBlock)
+ }
+
+ if v.DestinationPrefixListId != nil {
+ objectKey := object.Key("DestinationPrefixListId")
+ objectKey.String(*v.DestinationPrefixListId)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.RouteTableId != nil {
+ objectKey := object.Key("RouteTableId")
+ objectKey.String(*v.RouteTableId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDeleteRouteTableInput(v *DeleteRouteTableInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.RouteTableId != nil {
+ objectKey := object.Key("RouteTableId")
+ objectKey.String(*v.RouteTableId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDeleteSecurityGroupInput(v *DeleteSecurityGroupInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.GroupId != nil {
+ objectKey := object.Key("GroupId")
+ objectKey.String(*v.GroupId)
+ }
+
+ if v.GroupName != nil {
+ objectKey := object.Key("GroupName")
+ objectKey.String(*v.GroupName)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDeleteSnapshotInput(v *DeleteSnapshotInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.SnapshotId != nil {
+ objectKey := object.Key("SnapshotId")
+ objectKey.String(*v.SnapshotId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDeleteSpotDatafeedSubscriptionInput(v *DeleteSpotDatafeedSubscriptionInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDeleteSubnetCidrReservationInput(v *DeleteSubnetCidrReservationInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.SubnetCidrReservationId != nil {
+ objectKey := object.Key("SubnetCidrReservationId")
+ objectKey.String(*v.SubnetCidrReservationId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDeleteSubnetInput(v *DeleteSubnetInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.SubnetId != nil {
+ objectKey := object.Key("SubnetId")
+ objectKey.String(*v.SubnetId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDeleteTagsInput(v *DeleteTagsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Resources != nil {
+ objectKey := object.FlatKey("ResourceId")
+ if err := awsEc2query_serializeDocumentResourceIdList(v.Resources, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.Tags != nil {
+ objectKey := object.FlatKey("Tag")
+ if err := awsEc2query_serializeDocumentTagList(v.Tags, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDeleteTrafficMirrorFilterInput(v *DeleteTrafficMirrorFilterInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.TrafficMirrorFilterId != nil {
+ objectKey := object.Key("TrafficMirrorFilterId")
+ objectKey.String(*v.TrafficMirrorFilterId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDeleteTrafficMirrorFilterRuleInput(v *DeleteTrafficMirrorFilterRuleInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.TrafficMirrorFilterRuleId != nil {
+ objectKey := object.Key("TrafficMirrorFilterRuleId")
+ objectKey.String(*v.TrafficMirrorFilterRuleId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDeleteTrafficMirrorSessionInput(v *DeleteTrafficMirrorSessionInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.TrafficMirrorSessionId != nil {
+ objectKey := object.Key("TrafficMirrorSessionId")
+ objectKey.String(*v.TrafficMirrorSessionId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDeleteTrafficMirrorTargetInput(v *DeleteTrafficMirrorTargetInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.TrafficMirrorTargetId != nil {
+ objectKey := object.Key("TrafficMirrorTargetId")
+ objectKey.String(*v.TrafficMirrorTargetId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDeleteTransitGatewayConnectInput(v *DeleteTransitGatewayConnectInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.TransitGatewayAttachmentId != nil {
+ objectKey := object.Key("TransitGatewayAttachmentId")
+ objectKey.String(*v.TransitGatewayAttachmentId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDeleteTransitGatewayConnectPeerInput(v *DeleteTransitGatewayConnectPeerInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.TransitGatewayConnectPeerId != nil {
+ objectKey := object.Key("TransitGatewayConnectPeerId")
+ objectKey.String(*v.TransitGatewayConnectPeerId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDeleteTransitGatewayInput(v *DeleteTransitGatewayInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.TransitGatewayId != nil {
+ objectKey := object.Key("TransitGatewayId")
+ objectKey.String(*v.TransitGatewayId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDeleteTransitGatewayMulticastDomainInput(v *DeleteTransitGatewayMulticastDomainInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.TransitGatewayMulticastDomainId != nil {
+ objectKey := object.Key("TransitGatewayMulticastDomainId")
+ objectKey.String(*v.TransitGatewayMulticastDomainId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDeleteTransitGatewayPeeringAttachmentInput(v *DeleteTransitGatewayPeeringAttachmentInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.TransitGatewayAttachmentId != nil {
+ objectKey := object.Key("TransitGatewayAttachmentId")
+ objectKey.String(*v.TransitGatewayAttachmentId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDeleteTransitGatewayPrefixListReferenceInput(v *DeleteTransitGatewayPrefixListReferenceInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.PrefixListId != nil {
+ objectKey := object.Key("PrefixListId")
+ objectKey.String(*v.PrefixListId)
+ }
+
+ if v.TransitGatewayRouteTableId != nil {
+ objectKey := object.Key("TransitGatewayRouteTableId")
+ objectKey.String(*v.TransitGatewayRouteTableId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDeleteTransitGatewayRouteInput(v *DeleteTransitGatewayRouteInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DestinationCidrBlock != nil {
+ objectKey := object.Key("DestinationCidrBlock")
+ objectKey.String(*v.DestinationCidrBlock)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.TransitGatewayRouteTableId != nil {
+ objectKey := object.Key("TransitGatewayRouteTableId")
+ objectKey.String(*v.TransitGatewayRouteTableId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDeleteTransitGatewayRouteTableInput(v *DeleteTransitGatewayRouteTableInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.TransitGatewayRouteTableId != nil {
+ objectKey := object.Key("TransitGatewayRouteTableId")
+ objectKey.String(*v.TransitGatewayRouteTableId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDeleteTransitGatewayVpcAttachmentInput(v *DeleteTransitGatewayVpcAttachmentInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.TransitGatewayAttachmentId != nil {
+ objectKey := object.Key("TransitGatewayAttachmentId")
+ objectKey.String(*v.TransitGatewayAttachmentId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDeleteVolumeInput(v *DeleteVolumeInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.VolumeId != nil {
+ objectKey := object.Key("VolumeId")
+ objectKey.String(*v.VolumeId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDeleteVpcEndpointConnectionNotificationsInput(v *DeleteVpcEndpointConnectionNotificationsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.ConnectionNotificationIds != nil {
+ objectKey := object.FlatKey("ConnectionNotificationId")
+ if err := awsEc2query_serializeDocumentConnectionNotificationIdsList(v.ConnectionNotificationIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDeleteVpcEndpointServiceConfigurationsInput(v *DeleteVpcEndpointServiceConfigurationsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.ServiceIds != nil {
+ objectKey := object.FlatKey("ServiceId")
+ if err := awsEc2query_serializeDocumentVpcEndpointServiceIdList(v.ServiceIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDeleteVpcEndpointsInput(v *DeleteVpcEndpointsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.VpcEndpointIds != nil {
+ objectKey := object.FlatKey("VpcEndpointId")
+ if err := awsEc2query_serializeDocumentVpcEndpointIdList(v.VpcEndpointIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDeleteVpcInput(v *DeleteVpcInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.VpcId != nil {
+ objectKey := object.Key("VpcId")
+ objectKey.String(*v.VpcId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDeleteVpcPeeringConnectionInput(v *DeleteVpcPeeringConnectionInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.VpcPeeringConnectionId != nil {
+ objectKey := object.Key("VpcPeeringConnectionId")
+ objectKey.String(*v.VpcPeeringConnectionId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDeleteVpnConnectionInput(v *DeleteVpnConnectionInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.VpnConnectionId != nil {
+ objectKey := object.Key("VpnConnectionId")
+ objectKey.String(*v.VpnConnectionId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDeleteVpnConnectionRouteInput(v *DeleteVpnConnectionRouteInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DestinationCidrBlock != nil {
+ objectKey := object.Key("DestinationCidrBlock")
+ objectKey.String(*v.DestinationCidrBlock)
+ }
+
+ if v.VpnConnectionId != nil {
+ objectKey := object.Key("VpnConnectionId")
+ objectKey.String(*v.VpnConnectionId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDeleteVpnGatewayInput(v *DeleteVpnGatewayInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.VpnGatewayId != nil {
+ objectKey := object.Key("VpnGatewayId")
+ objectKey.String(*v.VpnGatewayId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDeprovisionByoipCidrInput(v *DeprovisionByoipCidrInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Cidr != nil {
+ objectKey := object.Key("Cidr")
+ objectKey.String(*v.Cidr)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDeregisterImageInput(v *DeregisterImageInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.ImageId != nil {
+ objectKey := object.Key("ImageId")
+ objectKey.String(*v.ImageId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDeregisterInstanceEventNotificationAttributesInput(v *DeregisterInstanceEventNotificationAttributesInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.InstanceTagAttribute != nil {
+ objectKey := object.Key("InstanceTagAttribute")
+ if err := awsEc2query_serializeDocumentDeregisterInstanceTagAttributeRequest(v.InstanceTagAttribute, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDeregisterTransitGatewayMulticastGroupMembersInput(v *DeregisterTransitGatewayMulticastGroupMembersInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.GroupIpAddress != nil {
+ objectKey := object.Key("GroupIpAddress")
+ objectKey.String(*v.GroupIpAddress)
+ }
+
+ if v.NetworkInterfaceIds != nil {
+ objectKey := object.FlatKey("NetworkInterfaceIds")
+ if err := awsEc2query_serializeDocumentTransitGatewayNetworkInterfaceIdList(v.NetworkInterfaceIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.TransitGatewayMulticastDomainId != nil {
+ objectKey := object.Key("TransitGatewayMulticastDomainId")
+ objectKey.String(*v.TransitGatewayMulticastDomainId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDeregisterTransitGatewayMulticastGroupSourcesInput(v *DeregisterTransitGatewayMulticastGroupSourcesInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.GroupIpAddress != nil {
+ objectKey := object.Key("GroupIpAddress")
+ objectKey.String(*v.GroupIpAddress)
+ }
+
+ if v.NetworkInterfaceIds != nil {
+ objectKey := object.FlatKey("NetworkInterfaceIds")
+ if err := awsEc2query_serializeDocumentTransitGatewayNetworkInterfaceIdList(v.NetworkInterfaceIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.TransitGatewayMulticastDomainId != nil {
+ objectKey := object.Key("TransitGatewayMulticastDomainId")
+ objectKey.String(*v.TransitGatewayMulticastDomainId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeAccountAttributesInput(v *DescribeAccountAttributesInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AttributeNames != nil {
+ objectKey := object.FlatKey("AttributeName")
+ if err := awsEc2query_serializeDocumentAccountAttributeNameStringList(v.AttributeNames, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeAddressesAttributeInput(v *DescribeAddressesAttributeInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AllocationIds != nil {
+ objectKey := object.FlatKey("AllocationId")
+ if err := awsEc2query_serializeDocumentAllocationIds(v.AllocationIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if len(v.Attribute) > 0 {
+ objectKey := object.Key("Attribute")
+ objectKey.String(string(v.Attribute))
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeAddressesInput(v *DescribeAddressesInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AllocationIds != nil {
+ objectKey := object.FlatKey("AllocationId")
+ if err := awsEc2query_serializeDocumentAllocationIdList(v.AllocationIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.PublicIps != nil {
+ objectKey := object.FlatKey("PublicIp")
+ if err := awsEc2query_serializeDocumentPublicIpStringList(v.PublicIps, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeAggregateIdFormatInput(v *DescribeAggregateIdFormatInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeAvailabilityZonesInput(v *DescribeAvailabilityZonesInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AllAvailabilityZones != nil {
+ objectKey := object.Key("AllAvailabilityZones")
+ objectKey.Boolean(*v.AllAvailabilityZones)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.ZoneIds != nil {
+ objectKey := object.FlatKey("ZoneId")
+ if err := awsEc2query_serializeDocumentZoneIdStringList(v.ZoneIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.ZoneNames != nil {
+ objectKey := object.FlatKey("ZoneName")
+ if err := awsEc2query_serializeDocumentZoneNameStringList(v.ZoneNames, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeBundleTasksInput(v *DescribeBundleTasksInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.BundleIds != nil {
+ objectKey := object.FlatKey("BundleId")
+ if err := awsEc2query_serializeDocumentBundleIdStringList(v.BundleIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeByoipCidrsInput(v *DescribeByoipCidrsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeCapacityReservationsInput(v *DescribeCapacityReservationsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.CapacityReservationIds != nil {
+ objectKey := object.FlatKey("CapacityReservationId")
+ if err := awsEc2query_serializeDocumentCapacityReservationIdSet(v.CapacityReservationIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeCarrierGatewaysInput(v *DescribeCarrierGatewaysInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.CarrierGatewayIds != nil {
+ objectKey := object.FlatKey("CarrierGatewayId")
+ if err := awsEc2query_serializeDocumentCarrierGatewayIdSet(v.CarrierGatewayIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeClassicLinkInstancesInput(v *DescribeClassicLinkInstancesInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.InstanceIds != nil {
+ objectKey := object.FlatKey("InstanceId")
+ if err := awsEc2query_serializeDocumentInstanceIdStringList(v.InstanceIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeClientVpnAuthorizationRulesInput(v *DescribeClientVpnAuthorizationRulesInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.ClientVpnEndpointId != nil {
+ objectKey := object.Key("ClientVpnEndpointId")
+ objectKey.String(*v.ClientVpnEndpointId)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeClientVpnConnectionsInput(v *DescribeClientVpnConnectionsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.ClientVpnEndpointId != nil {
+ objectKey := object.Key("ClientVpnEndpointId")
+ objectKey.String(*v.ClientVpnEndpointId)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeClientVpnEndpointsInput(v *DescribeClientVpnEndpointsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.ClientVpnEndpointIds != nil {
+ objectKey := object.FlatKey("ClientVpnEndpointId")
+ if err := awsEc2query_serializeDocumentClientVpnEndpointIdList(v.ClientVpnEndpointIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeClientVpnRoutesInput(v *DescribeClientVpnRoutesInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.ClientVpnEndpointId != nil {
+ objectKey := object.Key("ClientVpnEndpointId")
+ objectKey.String(*v.ClientVpnEndpointId)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeClientVpnTargetNetworksInput(v *DescribeClientVpnTargetNetworksInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AssociationIds != nil {
+ objectKey := object.FlatKey("AssociationIds")
+ if err := awsEc2query_serializeDocumentValueStringList(v.AssociationIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.ClientVpnEndpointId != nil {
+ objectKey := object.Key("ClientVpnEndpointId")
+ objectKey.String(*v.ClientVpnEndpointId)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeCoipPoolsInput(v *DescribeCoipPoolsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ if v.PoolIds != nil {
+ objectKey := object.FlatKey("PoolId")
+ if err := awsEc2query_serializeDocumentCoipPoolIdSet(v.PoolIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeConversionTasksInput(v *DescribeConversionTasksInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.ConversionTaskIds != nil {
+ objectKey := object.FlatKey("ConversionTaskId")
+ if err := awsEc2query_serializeDocumentConversionIdStringList(v.ConversionTaskIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeCustomerGatewaysInput(v *DescribeCustomerGatewaysInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.CustomerGatewayIds != nil {
+ objectKey := object.FlatKey("CustomerGatewayId")
+ if err := awsEc2query_serializeDocumentCustomerGatewayIdStringList(v.CustomerGatewayIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeDhcpOptionsInput(v *DescribeDhcpOptionsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DhcpOptionsIds != nil {
+ objectKey := object.FlatKey("DhcpOptionsId")
+ if err := awsEc2query_serializeDocumentDhcpOptionsIdStringList(v.DhcpOptionsIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeEgressOnlyInternetGatewaysInput(v *DescribeEgressOnlyInternetGatewaysInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.EgressOnlyInternetGatewayIds != nil {
+ objectKey := object.FlatKey("EgressOnlyInternetGatewayId")
+ if err := awsEc2query_serializeDocumentEgressOnlyInternetGatewayIdList(v.EgressOnlyInternetGatewayIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeElasticGpusInput(v *DescribeElasticGpusInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.ElasticGpuIds != nil {
+ objectKey := object.FlatKey("ElasticGpuId")
+ if err := awsEc2query_serializeDocumentElasticGpuIdSet(v.ElasticGpuIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeExportImageTasksInput(v *DescribeExportImageTasksInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.ExportImageTaskIds != nil {
+ objectKey := object.FlatKey("ExportImageTaskId")
+ if err := awsEc2query_serializeDocumentExportImageTaskIdList(v.ExportImageTaskIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeExportTasksInput(v *DescribeExportTasksInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.ExportTaskIds != nil {
+ objectKey := object.FlatKey("ExportTaskId")
+ if err := awsEc2query_serializeDocumentExportTaskIdStringList(v.ExportTaskIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeFastSnapshotRestoresInput(v *DescribeFastSnapshotRestoresInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeFleetHistoryInput(v *DescribeFleetHistoryInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if len(v.EventType) > 0 {
+ objectKey := object.Key("EventType")
+ objectKey.String(string(v.EventType))
+ }
+
+ if v.FleetId != nil {
+ objectKey := object.Key("FleetId")
+ objectKey.String(*v.FleetId)
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ if v.StartTime != nil {
+ objectKey := object.Key("StartTime")
+ objectKey.String(smithytime.FormatDateTime(*v.StartTime))
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeFleetInstancesInput(v *DescribeFleetInstancesInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.FleetId != nil {
+ objectKey := object.Key("FleetId")
+ objectKey.String(*v.FleetId)
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeFleetsInput(v *DescribeFleetsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.FleetIds != nil {
+ objectKey := object.FlatKey("FleetId")
+ if err := awsEc2query_serializeDocumentFleetIdSet(v.FleetIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeFlowLogsInput(v *DescribeFlowLogsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filter != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filter, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.FlowLogIds != nil {
+ objectKey := object.FlatKey("FlowLogId")
+ if err := awsEc2query_serializeDocumentFlowLogIdList(v.FlowLogIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeFpgaImageAttributeInput(v *DescribeFpgaImageAttributeInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if len(v.Attribute) > 0 {
+ objectKey := object.Key("Attribute")
+ objectKey.String(string(v.Attribute))
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.FpgaImageId != nil {
+ objectKey := object.Key("FpgaImageId")
+ objectKey.String(*v.FpgaImageId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeFpgaImagesInput(v *DescribeFpgaImagesInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.FpgaImageIds != nil {
+ objectKey := object.FlatKey("FpgaImageId")
+ if err := awsEc2query_serializeDocumentFpgaImageIdList(v.FpgaImageIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ if v.Owners != nil {
+ objectKey := object.FlatKey("Owner")
+ if err := awsEc2query_serializeDocumentOwnerStringList(v.Owners, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeHostReservationOfferingsInput(v *DescribeHostReservationOfferingsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Filter != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filter, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxDuration != nil {
+ objectKey := object.Key("MaxDuration")
+ objectKey.Integer(*v.MaxDuration)
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.MinDuration != nil {
+ objectKey := object.Key("MinDuration")
+ objectKey.Integer(*v.MinDuration)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ if v.OfferingId != nil {
+ objectKey := object.Key("OfferingId")
+ objectKey.String(*v.OfferingId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeHostReservationsInput(v *DescribeHostReservationsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Filter != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filter, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.HostReservationIdSet != nil {
+ objectKey := object.FlatKey("HostReservationIdSet")
+ if err := awsEc2query_serializeDocumentHostReservationIdSet(v.HostReservationIdSet, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeHostsInput(v *DescribeHostsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Filter != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filter, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.HostIds != nil {
+ objectKey := object.FlatKey("HostId")
+ if err := awsEc2query_serializeDocumentRequestHostIdList(v.HostIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeIamInstanceProfileAssociationsInput(v *DescribeIamInstanceProfileAssociationsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AssociationIds != nil {
+ objectKey := object.FlatKey("AssociationId")
+ if err := awsEc2query_serializeDocumentAssociationIdList(v.AssociationIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeIdentityIdFormatInput(v *DescribeIdentityIdFormatInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.PrincipalArn != nil {
+ objectKey := object.Key("PrincipalArn")
+ objectKey.String(*v.PrincipalArn)
+ }
+
+ if v.Resource != nil {
+ objectKey := object.Key("Resource")
+ objectKey.String(*v.Resource)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeIdFormatInput(v *DescribeIdFormatInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Resource != nil {
+ objectKey := object.Key("Resource")
+ objectKey.String(*v.Resource)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeImageAttributeInput(v *DescribeImageAttributeInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if len(v.Attribute) > 0 {
+ objectKey := object.Key("Attribute")
+ objectKey.String(string(v.Attribute))
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.ImageId != nil {
+ objectKey := object.Key("ImageId")
+ objectKey.String(*v.ImageId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeImagesInput(v *DescribeImagesInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.ExecutableUsers != nil {
+ objectKey := object.FlatKey("ExecutableBy")
+ if err := awsEc2query_serializeDocumentExecutableByStringList(v.ExecutableUsers, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.ImageIds != nil {
+ objectKey := object.FlatKey("ImageId")
+ if err := awsEc2query_serializeDocumentImageIdStringList(v.ImageIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.IncludeDeprecated != nil {
+ objectKey := object.Key("IncludeDeprecated")
+ objectKey.Boolean(*v.IncludeDeprecated)
+ }
+
+ if v.Owners != nil {
+ objectKey := object.FlatKey("Owner")
+ if err := awsEc2query_serializeDocumentOwnerStringList(v.Owners, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeImportImageTasksInput(v *DescribeImportImageTasksInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filters")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.ImportTaskIds != nil {
+ objectKey := object.FlatKey("ImportTaskId")
+ if err := awsEc2query_serializeDocumentImportTaskIdList(v.ImportTaskIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeImportSnapshotTasksInput(v *DescribeImportSnapshotTasksInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filters")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.ImportTaskIds != nil {
+ objectKey := object.FlatKey("ImportTaskId")
+ if err := awsEc2query_serializeDocumentImportSnapshotTaskIdList(v.ImportTaskIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeInstanceAttributeInput(v *DescribeInstanceAttributeInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if len(v.Attribute) > 0 {
+ objectKey := object.Key("Attribute")
+ objectKey.String(string(v.Attribute))
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.InstanceId != nil {
+ objectKey := object.Key("InstanceId")
+ objectKey.String(*v.InstanceId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeInstanceCreditSpecificationsInput(v *DescribeInstanceCreditSpecificationsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.InstanceIds != nil {
+ objectKey := object.FlatKey("InstanceId")
+ if err := awsEc2query_serializeDocumentInstanceIdStringList(v.InstanceIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeInstanceEventNotificationAttributesInput(v *DescribeInstanceEventNotificationAttributesInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeInstanceEventWindowsInput(v *DescribeInstanceEventWindowsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.InstanceEventWindowIds != nil {
+ objectKey := object.FlatKey("InstanceEventWindowId")
+ if err := awsEc2query_serializeDocumentInstanceEventWindowIdSet(v.InstanceEventWindowIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeInstancesInput(v *DescribeInstancesInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.InstanceIds != nil {
+ objectKey := object.FlatKey("InstanceId")
+ if err := awsEc2query_serializeDocumentInstanceIdStringList(v.InstanceIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeInstanceStatusInput(v *DescribeInstanceStatusInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.IncludeAllInstances != nil {
+ objectKey := object.Key("IncludeAllInstances")
+ objectKey.Boolean(*v.IncludeAllInstances)
+ }
+
+ if v.InstanceIds != nil {
+ objectKey := object.FlatKey("InstanceId")
+ if err := awsEc2query_serializeDocumentInstanceIdStringList(v.InstanceIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeInstanceTypeOfferingsInput(v *DescribeInstanceTypeOfferingsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if len(v.LocationType) > 0 {
+ objectKey := object.Key("LocationType")
+ objectKey.String(string(v.LocationType))
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeInstanceTypesInput(v *DescribeInstanceTypesInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.InstanceTypes != nil {
+ objectKey := object.FlatKey("InstanceType")
+ if err := awsEc2query_serializeDocumentRequestInstanceTypeList(v.InstanceTypes, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeInternetGatewaysInput(v *DescribeInternetGatewaysInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.InternetGatewayIds != nil {
+ objectKey := object.FlatKey("InternetGatewayId")
+ if err := awsEc2query_serializeDocumentInternetGatewayIdList(v.InternetGatewayIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeIpv6PoolsInput(v *DescribeIpv6PoolsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ if v.PoolIds != nil {
+ objectKey := object.FlatKey("PoolId")
+ if err := awsEc2query_serializeDocumentIpv6PoolIdList(v.PoolIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeKeyPairsInput(v *DescribeKeyPairsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.KeyNames != nil {
+ objectKey := object.FlatKey("KeyName")
+ if err := awsEc2query_serializeDocumentKeyNameStringList(v.KeyNames, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.KeyPairIds != nil {
+ objectKey := object.FlatKey("KeyPairId")
+ if err := awsEc2query_serializeDocumentKeyPairIdStringList(v.KeyPairIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeLaunchTemplatesInput(v *DescribeLaunchTemplatesInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.LaunchTemplateIds != nil {
+ objectKey := object.FlatKey("LaunchTemplateId")
+ if err := awsEc2query_serializeDocumentLaunchTemplateIdStringList(v.LaunchTemplateIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.LaunchTemplateNames != nil {
+ objectKey := object.FlatKey("LaunchTemplateName")
+ if err := awsEc2query_serializeDocumentLaunchTemplateNameStringList(v.LaunchTemplateNames, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeLaunchTemplateVersionsInput(v *DescribeLaunchTemplateVersionsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.LaunchTemplateId != nil {
+ objectKey := object.Key("LaunchTemplateId")
+ objectKey.String(*v.LaunchTemplateId)
+ }
+
+ if v.LaunchTemplateName != nil {
+ objectKey := object.Key("LaunchTemplateName")
+ objectKey.String(*v.LaunchTemplateName)
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.MaxVersion != nil {
+ objectKey := object.Key("MaxVersion")
+ objectKey.String(*v.MaxVersion)
+ }
+
+ if v.MinVersion != nil {
+ objectKey := object.Key("MinVersion")
+ objectKey.String(*v.MinVersion)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ if v.Versions != nil {
+ objectKey := object.FlatKey("LaunchTemplateVersion")
+ if err := awsEc2query_serializeDocumentVersionStringList(v.Versions, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeLocalGatewayRouteTablesInput(v *DescribeLocalGatewayRouteTablesInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.LocalGatewayRouteTableIds != nil {
+ objectKey := object.FlatKey("LocalGatewayRouteTableId")
+ if err := awsEc2query_serializeDocumentLocalGatewayRouteTableIdSet(v.LocalGatewayRouteTableIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsInput(v *DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.LocalGatewayRouteTableVirtualInterfaceGroupAssociationIds != nil {
+ objectKey := object.FlatKey("LocalGatewayRouteTableVirtualInterfaceGroupAssociationId")
+ if err := awsEc2query_serializeDocumentLocalGatewayRouteTableVirtualInterfaceGroupAssociationIdSet(v.LocalGatewayRouteTableVirtualInterfaceGroupAssociationIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeLocalGatewayRouteTableVpcAssociationsInput(v *DescribeLocalGatewayRouteTableVpcAssociationsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.LocalGatewayRouteTableVpcAssociationIds != nil {
+ objectKey := object.FlatKey("LocalGatewayRouteTableVpcAssociationId")
+ if err := awsEc2query_serializeDocumentLocalGatewayRouteTableVpcAssociationIdSet(v.LocalGatewayRouteTableVpcAssociationIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeLocalGatewaysInput(v *DescribeLocalGatewaysInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.LocalGatewayIds != nil {
+ objectKey := object.FlatKey("LocalGatewayId")
+ if err := awsEc2query_serializeDocumentLocalGatewayIdSet(v.LocalGatewayIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeLocalGatewayVirtualInterfaceGroupsInput(v *DescribeLocalGatewayVirtualInterfaceGroupsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.LocalGatewayVirtualInterfaceGroupIds != nil {
+ objectKey := object.FlatKey("LocalGatewayVirtualInterfaceGroupId")
+ if err := awsEc2query_serializeDocumentLocalGatewayVirtualInterfaceGroupIdSet(v.LocalGatewayVirtualInterfaceGroupIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeLocalGatewayVirtualInterfacesInput(v *DescribeLocalGatewayVirtualInterfacesInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.LocalGatewayVirtualInterfaceIds != nil {
+ objectKey := object.FlatKey("LocalGatewayVirtualInterfaceId")
+ if err := awsEc2query_serializeDocumentLocalGatewayVirtualInterfaceIdSet(v.LocalGatewayVirtualInterfaceIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeManagedPrefixListsInput(v *DescribeManagedPrefixListsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ if v.PrefixListIds != nil {
+ objectKey := object.FlatKey("PrefixListId")
+ if err := awsEc2query_serializeDocumentValueStringList(v.PrefixListIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeMovingAddressesInput(v *DescribeMovingAddressesInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ if v.PublicIps != nil {
+ objectKey := object.FlatKey("PublicIp")
+ if err := awsEc2query_serializeDocumentValueStringList(v.PublicIps, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeNatGatewaysInput(v *DescribeNatGatewaysInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filter != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filter, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NatGatewayIds != nil {
+ objectKey := object.FlatKey("NatGatewayId")
+ if err := awsEc2query_serializeDocumentNatGatewayIdStringList(v.NatGatewayIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeNetworkAclsInput(v *DescribeNetworkAclsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NetworkAclIds != nil {
+ objectKey := object.FlatKey("NetworkAclId")
+ if err := awsEc2query_serializeDocumentNetworkAclIdStringList(v.NetworkAclIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeNetworkInsightsAnalysesInput(v *DescribeNetworkInsightsAnalysesInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AnalysisEndTime != nil {
+ objectKey := object.Key("AnalysisEndTime")
+ objectKey.String(smithytime.FormatDateTime(*v.AnalysisEndTime))
+ }
+
+ if v.AnalysisStartTime != nil {
+ objectKey := object.Key("AnalysisStartTime")
+ objectKey.String(smithytime.FormatDateTime(*v.AnalysisStartTime))
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NetworkInsightsAnalysisIds != nil {
+ objectKey := object.FlatKey("NetworkInsightsAnalysisId")
+ if err := awsEc2query_serializeDocumentNetworkInsightsAnalysisIdList(v.NetworkInsightsAnalysisIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.NetworkInsightsPathId != nil {
+ objectKey := object.Key("NetworkInsightsPathId")
+ objectKey.String(*v.NetworkInsightsPathId)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeNetworkInsightsPathsInput(v *DescribeNetworkInsightsPathsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NetworkInsightsPathIds != nil {
+ objectKey := object.FlatKey("NetworkInsightsPathId")
+ if err := awsEc2query_serializeDocumentNetworkInsightsPathIdList(v.NetworkInsightsPathIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeNetworkInterfaceAttributeInput(v *DescribeNetworkInterfaceAttributeInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if len(v.Attribute) > 0 {
+ objectKey := object.Key("Attribute")
+ objectKey.String(string(v.Attribute))
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.NetworkInterfaceId != nil {
+ objectKey := object.Key("NetworkInterfaceId")
+ objectKey.String(*v.NetworkInterfaceId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeNetworkInterfacePermissionsInput(v *DescribeNetworkInterfacePermissionsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NetworkInterfacePermissionIds != nil {
+ objectKey := object.FlatKey("NetworkInterfacePermissionId")
+ if err := awsEc2query_serializeDocumentNetworkInterfacePermissionIdList(v.NetworkInterfacePermissionIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeNetworkInterfacesInput(v *DescribeNetworkInterfacesInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NetworkInterfaceIds != nil {
+ objectKey := object.FlatKey("NetworkInterfaceId")
+ if err := awsEc2query_serializeDocumentNetworkInterfaceIdList(v.NetworkInterfaceIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribePlacementGroupsInput(v *DescribePlacementGroupsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.GroupIds != nil {
+ objectKey := object.FlatKey("GroupId")
+ if err := awsEc2query_serializeDocumentPlacementGroupIdStringList(v.GroupIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.GroupNames != nil {
+ objectKey := object.FlatKey("GroupName")
+ if err := awsEc2query_serializeDocumentPlacementGroupStringList(v.GroupNames, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribePrefixListsInput(v *DescribePrefixListsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ if v.PrefixListIds != nil {
+ objectKey := object.FlatKey("PrefixListId")
+ if err := awsEc2query_serializeDocumentPrefixListResourceIdStringList(v.PrefixListIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribePrincipalIdFormatInput(v *DescribePrincipalIdFormatInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ if v.Resources != nil {
+ objectKey := object.FlatKey("Resource")
+ if err := awsEc2query_serializeDocumentResourceList(v.Resources, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribePublicIpv4PoolsInput(v *DescribePublicIpv4PoolsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ if v.PoolIds != nil {
+ objectKey := object.FlatKey("PoolId")
+ if err := awsEc2query_serializeDocumentPublicIpv4PoolIdStringList(v.PoolIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeRegionsInput(v *DescribeRegionsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AllRegions != nil {
+ objectKey := object.Key("AllRegions")
+ objectKey.Boolean(*v.AllRegions)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.RegionNames != nil {
+ objectKey := object.FlatKey("RegionName")
+ if err := awsEc2query_serializeDocumentRegionNameStringList(v.RegionNames, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeReplaceRootVolumeTasksInput(v *DescribeReplaceRootVolumeTasksInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ if v.ReplaceRootVolumeTaskIds != nil {
+ objectKey := object.FlatKey("ReplaceRootVolumeTaskId")
+ if err := awsEc2query_serializeDocumentReplaceRootVolumeTaskIds(v.ReplaceRootVolumeTaskIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeReservedInstancesInput(v *DescribeReservedInstancesInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if len(v.OfferingClass) > 0 {
+ objectKey := object.Key("OfferingClass")
+ objectKey.String(string(v.OfferingClass))
+ }
+
+ if len(v.OfferingType) > 0 {
+ objectKey := object.Key("OfferingType")
+ objectKey.String(string(v.OfferingType))
+ }
+
+ if v.ReservedInstancesIds != nil {
+ objectKey := object.FlatKey("ReservedInstancesId")
+ if err := awsEc2query_serializeDocumentReservedInstancesIdStringList(v.ReservedInstancesIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeReservedInstancesListingsInput(v *DescribeReservedInstancesListingsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.ReservedInstancesId != nil {
+ objectKey := object.Key("ReservedInstancesId")
+ objectKey.String(*v.ReservedInstancesId)
+ }
+
+ if v.ReservedInstancesListingId != nil {
+ objectKey := object.Key("ReservedInstancesListingId")
+ objectKey.String(*v.ReservedInstancesListingId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeReservedInstancesModificationsInput(v *DescribeReservedInstancesModificationsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ if v.ReservedInstancesModificationIds != nil {
+ objectKey := object.FlatKey("ReservedInstancesModificationId")
+ if err := awsEc2query_serializeDocumentReservedInstancesModificationIdStringList(v.ReservedInstancesModificationIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeReservedInstancesOfferingsInput(v *DescribeReservedInstancesOfferingsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AvailabilityZone != nil {
+ objectKey := object.Key("AvailabilityZone")
+ objectKey.String(*v.AvailabilityZone)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.IncludeMarketplace != nil {
+ objectKey := object.Key("IncludeMarketplace")
+ objectKey.Boolean(*v.IncludeMarketplace)
+ }
+
+ if len(v.InstanceTenancy) > 0 {
+ objectKey := object.Key("InstanceTenancy")
+ objectKey.String(string(v.InstanceTenancy))
+ }
+
+ if len(v.InstanceType) > 0 {
+ objectKey := object.Key("InstanceType")
+ objectKey.String(string(v.InstanceType))
+ }
+
+ if v.MaxDuration != nil {
+ objectKey := object.Key("MaxDuration")
+ objectKey.Long(*v.MaxDuration)
+ }
+
+ if v.MaxInstanceCount != nil {
+ objectKey := object.Key("MaxInstanceCount")
+ objectKey.Integer(*v.MaxInstanceCount)
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.MinDuration != nil {
+ objectKey := object.Key("MinDuration")
+ objectKey.Long(*v.MinDuration)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ if len(v.OfferingClass) > 0 {
+ objectKey := object.Key("OfferingClass")
+ objectKey.String(string(v.OfferingClass))
+ }
+
+ if len(v.OfferingType) > 0 {
+ objectKey := object.Key("OfferingType")
+ objectKey.String(string(v.OfferingType))
+ }
+
+ if len(v.ProductDescription) > 0 {
+ objectKey := object.Key("ProductDescription")
+ objectKey.String(string(v.ProductDescription))
+ }
+
+ if v.ReservedInstancesOfferingIds != nil {
+ objectKey := object.FlatKey("ReservedInstancesOfferingId")
+ if err := awsEc2query_serializeDocumentReservedInstancesOfferingIdStringList(v.ReservedInstancesOfferingIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeRouteTablesInput(v *DescribeRouteTablesInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ if v.RouteTableIds != nil {
+ objectKey := object.FlatKey("RouteTableId")
+ if err := awsEc2query_serializeDocumentRouteTableIdStringList(v.RouteTableIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeScheduledInstanceAvailabilityInput(v *DescribeScheduledInstanceAvailabilityInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.FirstSlotStartTimeRange != nil {
+ objectKey := object.Key("FirstSlotStartTimeRange")
+ if err := awsEc2query_serializeDocumentSlotDateTimeRangeRequest(v.FirstSlotStartTimeRange, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.MaxSlotDurationInHours != nil {
+ objectKey := object.Key("MaxSlotDurationInHours")
+ objectKey.Integer(*v.MaxSlotDurationInHours)
+ }
+
+ if v.MinSlotDurationInHours != nil {
+ objectKey := object.Key("MinSlotDurationInHours")
+ objectKey.Integer(*v.MinSlotDurationInHours)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ if v.Recurrence != nil {
+ objectKey := object.Key("Recurrence")
+ if err := awsEc2query_serializeDocumentScheduledInstanceRecurrenceRequest(v.Recurrence, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeScheduledInstancesInput(v *DescribeScheduledInstancesInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ if v.ScheduledInstanceIds != nil {
+ objectKey := object.FlatKey("ScheduledInstanceId")
+ if err := awsEc2query_serializeDocumentScheduledInstanceIdRequestSet(v.ScheduledInstanceIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.SlotStartTimeRange != nil {
+ objectKey := object.Key("SlotStartTimeRange")
+ if err := awsEc2query_serializeDocumentSlotStartTimeRangeRequest(v.SlotStartTimeRange, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeSecurityGroupReferencesInput(v *DescribeSecurityGroupReferencesInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.GroupId != nil {
+ objectKey := object.FlatKey("GroupId")
+ if err := awsEc2query_serializeDocumentGroupIds(v.GroupId, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeSecurityGroupRulesInput(v *DescribeSecurityGroupRulesInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ if v.SecurityGroupRuleIds != nil {
+ objectKey := object.FlatKey("SecurityGroupRuleId")
+ if err := awsEc2query_serializeDocumentSecurityGroupRuleIdList(v.SecurityGroupRuleIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeSecurityGroupsInput(v *DescribeSecurityGroupsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.GroupIds != nil {
+ objectKey := object.FlatKey("GroupId")
+ if err := awsEc2query_serializeDocumentGroupIdStringList(v.GroupIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.GroupNames != nil {
+ objectKey := object.FlatKey("GroupName")
+ if err := awsEc2query_serializeDocumentGroupNameStringList(v.GroupNames, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeSnapshotAttributeInput(v *DescribeSnapshotAttributeInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if len(v.Attribute) > 0 {
+ objectKey := object.Key("Attribute")
+ objectKey.String(string(v.Attribute))
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.SnapshotId != nil {
+ objectKey := object.Key("SnapshotId")
+ objectKey.String(*v.SnapshotId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeSnapshotsInput(v *DescribeSnapshotsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ if v.OwnerIds != nil {
+ objectKey := object.FlatKey("Owner")
+ if err := awsEc2query_serializeDocumentOwnerStringList(v.OwnerIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.RestorableByUserIds != nil {
+ objectKey := object.FlatKey("RestorableBy")
+ if err := awsEc2query_serializeDocumentRestorableByStringList(v.RestorableByUserIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.SnapshotIds != nil {
+ objectKey := object.FlatKey("SnapshotId")
+ if err := awsEc2query_serializeDocumentSnapshotIdStringList(v.SnapshotIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeSpotDatafeedSubscriptionInput(v *DescribeSpotDatafeedSubscriptionInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeSpotFleetInstancesInput(v *DescribeSpotFleetInstancesInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ if v.SpotFleetRequestId != nil {
+ objectKey := object.Key("SpotFleetRequestId")
+ objectKey.String(*v.SpotFleetRequestId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeSpotFleetRequestHistoryInput(v *DescribeSpotFleetRequestHistoryInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if len(v.EventType) > 0 {
+ objectKey := object.Key("EventType")
+ objectKey.String(string(v.EventType))
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ if v.SpotFleetRequestId != nil {
+ objectKey := object.Key("SpotFleetRequestId")
+ objectKey.String(*v.SpotFleetRequestId)
+ }
+
+ if v.StartTime != nil {
+ objectKey := object.Key("StartTime")
+ objectKey.String(smithytime.FormatDateTime(*v.StartTime))
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeSpotFleetRequestsInput(v *DescribeSpotFleetRequestsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ if v.SpotFleetRequestIds != nil {
+ objectKey := object.FlatKey("SpotFleetRequestId")
+ if err := awsEc2query_serializeDocumentSpotFleetRequestIdList(v.SpotFleetRequestIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeSpotInstanceRequestsInput(v *DescribeSpotInstanceRequestsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ if v.SpotInstanceRequestIds != nil {
+ objectKey := object.FlatKey("SpotInstanceRequestId")
+ if err := awsEc2query_serializeDocumentSpotInstanceRequestIdList(v.SpotInstanceRequestIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeSpotPriceHistoryInput(v *DescribeSpotPriceHistoryInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AvailabilityZone != nil {
+ objectKey := object.Key("AvailabilityZone")
+ objectKey.String(*v.AvailabilityZone)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.EndTime != nil {
+ objectKey := object.Key("EndTime")
+ objectKey.String(smithytime.FormatDateTime(*v.EndTime))
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.InstanceTypes != nil {
+ objectKey := object.FlatKey("InstanceType")
+ if err := awsEc2query_serializeDocumentInstanceTypeList(v.InstanceTypes, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ if v.ProductDescriptions != nil {
+ objectKey := object.FlatKey("ProductDescription")
+ if err := awsEc2query_serializeDocumentProductDescriptionList(v.ProductDescriptions, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.StartTime != nil {
+ objectKey := object.Key("StartTime")
+ objectKey.String(smithytime.FormatDateTime(*v.StartTime))
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeStaleSecurityGroupsInput(v *DescribeStaleSecurityGroupsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ if v.VpcId != nil {
+ objectKey := object.Key("VpcId")
+ objectKey.String(*v.VpcId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeStoreImageTasksInput(v *DescribeStoreImageTasksInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.ImageIds != nil {
+ objectKey := object.FlatKey("ImageId")
+ if err := awsEc2query_serializeDocumentImageIdList(v.ImageIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeSubnetsInput(v *DescribeSubnetsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ if v.SubnetIds != nil {
+ objectKey := object.FlatKey("SubnetId")
+ if err := awsEc2query_serializeDocumentSubnetIdStringList(v.SubnetIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeTagsInput(v *DescribeTagsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeTrafficMirrorFiltersInput(v *DescribeTrafficMirrorFiltersInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ if v.TrafficMirrorFilterIds != nil {
+ objectKey := object.FlatKey("TrafficMirrorFilterId")
+ if err := awsEc2query_serializeDocumentTrafficMirrorFilterIdList(v.TrafficMirrorFilterIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeTrafficMirrorSessionsInput(v *DescribeTrafficMirrorSessionsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ if v.TrafficMirrorSessionIds != nil {
+ objectKey := object.FlatKey("TrafficMirrorSessionId")
+ if err := awsEc2query_serializeDocumentTrafficMirrorSessionIdList(v.TrafficMirrorSessionIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeTrafficMirrorTargetsInput(v *DescribeTrafficMirrorTargetsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ if v.TrafficMirrorTargetIds != nil {
+ objectKey := object.FlatKey("TrafficMirrorTargetId")
+ if err := awsEc2query_serializeDocumentTrafficMirrorTargetIdList(v.TrafficMirrorTargetIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeTransitGatewayAttachmentsInput(v *DescribeTransitGatewayAttachmentsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ if v.TransitGatewayAttachmentIds != nil {
+ objectKey := object.FlatKey("TransitGatewayAttachmentIds")
+ if err := awsEc2query_serializeDocumentTransitGatewayAttachmentIdStringList(v.TransitGatewayAttachmentIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeTransitGatewayConnectPeersInput(v *DescribeTransitGatewayConnectPeersInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ if v.TransitGatewayConnectPeerIds != nil {
+ objectKey := object.FlatKey("TransitGatewayConnectPeerIds")
+ if err := awsEc2query_serializeDocumentTransitGatewayConnectPeerIdStringList(v.TransitGatewayConnectPeerIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeTransitGatewayConnectsInput(v *DescribeTransitGatewayConnectsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ if v.TransitGatewayAttachmentIds != nil {
+ objectKey := object.FlatKey("TransitGatewayAttachmentIds")
+ if err := awsEc2query_serializeDocumentTransitGatewayAttachmentIdStringList(v.TransitGatewayAttachmentIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeTransitGatewayMulticastDomainsInput(v *DescribeTransitGatewayMulticastDomainsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ if v.TransitGatewayMulticastDomainIds != nil {
+ objectKey := object.FlatKey("TransitGatewayMulticastDomainIds")
+ if err := awsEc2query_serializeDocumentTransitGatewayMulticastDomainIdStringList(v.TransitGatewayMulticastDomainIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeTransitGatewayPeeringAttachmentsInput(v *DescribeTransitGatewayPeeringAttachmentsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ if v.TransitGatewayAttachmentIds != nil {
+ objectKey := object.FlatKey("TransitGatewayAttachmentIds")
+ if err := awsEc2query_serializeDocumentTransitGatewayAttachmentIdStringList(v.TransitGatewayAttachmentIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeTransitGatewayRouteTablesInput(v *DescribeTransitGatewayRouteTablesInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ if v.TransitGatewayRouteTableIds != nil {
+ objectKey := object.FlatKey("TransitGatewayRouteTableIds")
+ if err := awsEc2query_serializeDocumentTransitGatewayRouteTableIdStringList(v.TransitGatewayRouteTableIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeTransitGatewaysInput(v *DescribeTransitGatewaysInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ if v.TransitGatewayIds != nil {
+ objectKey := object.FlatKey("TransitGatewayIds")
+ if err := awsEc2query_serializeDocumentTransitGatewayIdStringList(v.TransitGatewayIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeTransitGatewayVpcAttachmentsInput(v *DescribeTransitGatewayVpcAttachmentsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ if v.TransitGatewayAttachmentIds != nil {
+ objectKey := object.FlatKey("TransitGatewayAttachmentIds")
+ if err := awsEc2query_serializeDocumentTransitGatewayAttachmentIdStringList(v.TransitGatewayAttachmentIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeTrunkInterfaceAssociationsInput(v *DescribeTrunkInterfaceAssociationsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AssociationIds != nil {
+ objectKey := object.FlatKey("AssociationId")
+ if err := awsEc2query_serializeDocumentTrunkInterfaceAssociationIdList(v.AssociationIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeVolumeAttributeInput(v *DescribeVolumeAttributeInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if len(v.Attribute) > 0 {
+ objectKey := object.Key("Attribute")
+ objectKey.String(string(v.Attribute))
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.VolumeId != nil {
+ objectKey := object.Key("VolumeId")
+ objectKey.String(*v.VolumeId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeVolumesInput(v *DescribeVolumesInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ if v.VolumeIds != nil {
+ objectKey := object.FlatKey("VolumeId")
+ if err := awsEc2query_serializeDocumentVolumeIdStringList(v.VolumeIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeVolumesModificationsInput(v *DescribeVolumesModificationsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ if v.VolumeIds != nil {
+ objectKey := object.FlatKey("VolumeId")
+ if err := awsEc2query_serializeDocumentVolumeIdStringList(v.VolumeIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeVolumeStatusInput(v *DescribeVolumeStatusInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ if v.VolumeIds != nil {
+ objectKey := object.FlatKey("VolumeId")
+ if err := awsEc2query_serializeDocumentVolumeIdStringList(v.VolumeIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeVpcAttributeInput(v *DescribeVpcAttributeInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if len(v.Attribute) > 0 {
+ objectKey := object.Key("Attribute")
+ objectKey.String(string(v.Attribute))
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.VpcId != nil {
+ objectKey := object.Key("VpcId")
+ objectKey.String(*v.VpcId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeVpcClassicLinkDnsSupportInput(v *DescribeVpcClassicLinkDnsSupportInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ if v.VpcIds != nil {
+ objectKey := object.FlatKey("VpcIds")
+ if err := awsEc2query_serializeDocumentVpcClassicLinkIdList(v.VpcIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeVpcClassicLinkInput(v *DescribeVpcClassicLinkInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.VpcIds != nil {
+ objectKey := object.FlatKey("VpcId")
+ if err := awsEc2query_serializeDocumentVpcClassicLinkIdList(v.VpcIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeVpcEndpointConnectionNotificationsInput(v *DescribeVpcEndpointConnectionNotificationsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.ConnectionNotificationId != nil {
+ objectKey := object.Key("ConnectionNotificationId")
+ objectKey.String(*v.ConnectionNotificationId)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeVpcEndpointConnectionsInput(v *DescribeVpcEndpointConnectionsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeVpcEndpointServiceConfigurationsInput(v *DescribeVpcEndpointServiceConfigurationsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ if v.ServiceIds != nil {
+ objectKey := object.FlatKey("ServiceId")
+ if err := awsEc2query_serializeDocumentVpcEndpointServiceIdList(v.ServiceIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeVpcEndpointServicePermissionsInput(v *DescribeVpcEndpointServicePermissionsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ if v.ServiceId != nil {
+ objectKey := object.Key("ServiceId")
+ objectKey.String(*v.ServiceId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeVpcEndpointServicesInput(v *DescribeVpcEndpointServicesInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ if v.ServiceNames != nil {
+ objectKey := object.FlatKey("ServiceName")
+ if err := awsEc2query_serializeDocumentValueStringList(v.ServiceNames, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeVpcEndpointsInput(v *DescribeVpcEndpointsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ if v.VpcEndpointIds != nil {
+ objectKey := object.FlatKey("VpcEndpointId")
+ if err := awsEc2query_serializeDocumentVpcEndpointIdList(v.VpcEndpointIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeVpcPeeringConnectionsInput(v *DescribeVpcPeeringConnectionsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ if v.VpcPeeringConnectionIds != nil {
+ objectKey := object.FlatKey("VpcPeeringConnectionId")
+ if err := awsEc2query_serializeDocumentVpcPeeringConnectionIdList(v.VpcPeeringConnectionIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeVpcsInput(v *DescribeVpcsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ if v.VpcIds != nil {
+ objectKey := object.FlatKey("VpcId")
+ if err := awsEc2query_serializeDocumentVpcIdStringList(v.VpcIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeVpnConnectionsInput(v *DescribeVpnConnectionsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.VpnConnectionIds != nil {
+ objectKey := object.FlatKey("VpnConnectionId")
+ if err := awsEc2query_serializeDocumentVpnConnectionIdStringList(v.VpnConnectionIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDescribeVpnGatewaysInput(v *DescribeVpnGatewaysInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.VpnGatewayIds != nil {
+ objectKey := object.FlatKey("VpnGatewayId")
+ if err := awsEc2query_serializeDocumentVpnGatewayIdStringList(v.VpnGatewayIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDetachClassicLinkVpcInput(v *DetachClassicLinkVpcInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.InstanceId != nil {
+ objectKey := object.Key("InstanceId")
+ objectKey.String(*v.InstanceId)
+ }
+
+ if v.VpcId != nil {
+ objectKey := object.Key("VpcId")
+ objectKey.String(*v.VpcId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDetachInternetGatewayInput(v *DetachInternetGatewayInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.InternetGatewayId != nil {
+ objectKey := object.Key("InternetGatewayId")
+ objectKey.String(*v.InternetGatewayId)
+ }
+
+ if v.VpcId != nil {
+ objectKey := object.Key("VpcId")
+ objectKey.String(*v.VpcId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDetachNetworkInterfaceInput(v *DetachNetworkInterfaceInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AttachmentId != nil {
+ objectKey := object.Key("AttachmentId")
+ objectKey.String(*v.AttachmentId)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Force != nil {
+ objectKey := object.Key("Force")
+ objectKey.Boolean(*v.Force)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDetachVolumeInput(v *DetachVolumeInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Device != nil {
+ objectKey := object.Key("Device")
+ objectKey.String(*v.Device)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Force != nil {
+ objectKey := object.Key("Force")
+ objectKey.Boolean(*v.Force)
+ }
+
+ if v.InstanceId != nil {
+ objectKey := object.Key("InstanceId")
+ objectKey.String(*v.InstanceId)
+ }
+
+ if v.VolumeId != nil {
+ objectKey := object.Key("VolumeId")
+ objectKey.String(*v.VolumeId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDetachVpnGatewayInput(v *DetachVpnGatewayInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.VpcId != nil {
+ objectKey := object.Key("VpcId")
+ objectKey.String(*v.VpcId)
+ }
+
+ if v.VpnGatewayId != nil {
+ objectKey := object.Key("VpnGatewayId")
+ objectKey.String(*v.VpnGatewayId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDisableEbsEncryptionByDefaultInput(v *DisableEbsEncryptionByDefaultInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDisableFastSnapshotRestoresInput(v *DisableFastSnapshotRestoresInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AvailabilityZones != nil {
+ objectKey := object.FlatKey("AvailabilityZone")
+ if err := awsEc2query_serializeDocumentAvailabilityZoneStringList(v.AvailabilityZones, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.SourceSnapshotIds != nil {
+ objectKey := object.FlatKey("SourceSnapshotId")
+ if err := awsEc2query_serializeDocumentSnapshotIdStringList(v.SourceSnapshotIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDisableImageDeprecationInput(v *DisableImageDeprecationInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.ImageId != nil {
+ objectKey := object.Key("ImageId")
+ objectKey.String(*v.ImageId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDisableSerialConsoleAccessInput(v *DisableSerialConsoleAccessInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDisableTransitGatewayRouteTablePropagationInput(v *DisableTransitGatewayRouteTablePropagationInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.TransitGatewayAttachmentId != nil {
+ objectKey := object.Key("TransitGatewayAttachmentId")
+ objectKey.String(*v.TransitGatewayAttachmentId)
+ }
+
+ if v.TransitGatewayRouteTableId != nil {
+ objectKey := object.Key("TransitGatewayRouteTableId")
+ objectKey.String(*v.TransitGatewayRouteTableId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDisableVgwRoutePropagationInput(v *DisableVgwRoutePropagationInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.GatewayId != nil {
+ objectKey := object.Key("GatewayId")
+ objectKey.String(*v.GatewayId)
+ }
+
+ if v.RouteTableId != nil {
+ objectKey := object.Key("RouteTableId")
+ objectKey.String(*v.RouteTableId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDisableVpcClassicLinkDnsSupportInput(v *DisableVpcClassicLinkDnsSupportInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.VpcId != nil {
+ objectKey := object.Key("VpcId")
+ objectKey.String(*v.VpcId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDisableVpcClassicLinkInput(v *DisableVpcClassicLinkInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.VpcId != nil {
+ objectKey := object.Key("VpcId")
+ objectKey.String(*v.VpcId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDisassociateAddressInput(v *DisassociateAddressInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AssociationId != nil {
+ objectKey := object.Key("AssociationId")
+ objectKey.String(*v.AssociationId)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.PublicIp != nil {
+ objectKey := object.Key("PublicIp")
+ objectKey.String(*v.PublicIp)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDisassociateClientVpnTargetNetworkInput(v *DisassociateClientVpnTargetNetworkInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AssociationId != nil {
+ objectKey := object.Key("AssociationId")
+ objectKey.String(*v.AssociationId)
+ }
+
+ if v.ClientVpnEndpointId != nil {
+ objectKey := object.Key("ClientVpnEndpointId")
+ objectKey.String(*v.ClientVpnEndpointId)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDisassociateEnclaveCertificateIamRoleInput(v *DisassociateEnclaveCertificateIamRoleInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.CertificateArn != nil {
+ objectKey := object.Key("CertificateArn")
+ objectKey.String(*v.CertificateArn)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.RoleArn != nil {
+ objectKey := object.Key("RoleArn")
+ objectKey.String(*v.RoleArn)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDisassociateIamInstanceProfileInput(v *DisassociateIamInstanceProfileInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AssociationId != nil {
+ objectKey := object.Key("AssociationId")
+ objectKey.String(*v.AssociationId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDisassociateInstanceEventWindowInput(v *DisassociateInstanceEventWindowInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AssociationTarget != nil {
+ objectKey := object.Key("AssociationTarget")
+ if err := awsEc2query_serializeDocumentInstanceEventWindowDisassociationRequest(v.AssociationTarget, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.InstanceEventWindowId != nil {
+ objectKey := object.Key("InstanceEventWindowId")
+ objectKey.String(*v.InstanceEventWindowId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDisassociateRouteTableInput(v *DisassociateRouteTableInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AssociationId != nil {
+ objectKey := object.Key("AssociationId")
+ objectKey.String(*v.AssociationId)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDisassociateSubnetCidrBlockInput(v *DisassociateSubnetCidrBlockInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AssociationId != nil {
+ objectKey := object.Key("AssociationId")
+ objectKey.String(*v.AssociationId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDisassociateTransitGatewayMulticastDomainInput(v *DisassociateTransitGatewayMulticastDomainInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.SubnetIds != nil {
+ objectKey := object.FlatKey("SubnetIds")
+ if err := awsEc2query_serializeDocumentTransitGatewaySubnetIdList(v.SubnetIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.TransitGatewayAttachmentId != nil {
+ objectKey := object.Key("TransitGatewayAttachmentId")
+ objectKey.String(*v.TransitGatewayAttachmentId)
+ }
+
+ if v.TransitGatewayMulticastDomainId != nil {
+ objectKey := object.Key("TransitGatewayMulticastDomainId")
+ objectKey.String(*v.TransitGatewayMulticastDomainId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDisassociateTransitGatewayRouteTableInput(v *DisassociateTransitGatewayRouteTableInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.TransitGatewayAttachmentId != nil {
+ objectKey := object.Key("TransitGatewayAttachmentId")
+ objectKey.String(*v.TransitGatewayAttachmentId)
+ }
+
+ if v.TransitGatewayRouteTableId != nil {
+ objectKey := object.Key("TransitGatewayRouteTableId")
+ objectKey.String(*v.TransitGatewayRouteTableId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDisassociateTrunkInterfaceInput(v *DisassociateTrunkInterfaceInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AssociationId != nil {
+ objectKey := object.Key("AssociationId")
+ objectKey.String(*v.AssociationId)
+ }
+
+ if v.ClientToken != nil {
+ objectKey := object.Key("ClientToken")
+ objectKey.String(*v.ClientToken)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentDisassociateVpcCidrBlockInput(v *DisassociateVpcCidrBlockInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AssociationId != nil {
+ objectKey := object.Key("AssociationId")
+ objectKey.String(*v.AssociationId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentEnableEbsEncryptionByDefaultInput(v *EnableEbsEncryptionByDefaultInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentEnableFastSnapshotRestoresInput(v *EnableFastSnapshotRestoresInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AvailabilityZones != nil {
+ objectKey := object.FlatKey("AvailabilityZone")
+ if err := awsEc2query_serializeDocumentAvailabilityZoneStringList(v.AvailabilityZones, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.SourceSnapshotIds != nil {
+ objectKey := object.FlatKey("SourceSnapshotId")
+ if err := awsEc2query_serializeDocumentSnapshotIdStringList(v.SourceSnapshotIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentEnableImageDeprecationInput(v *EnableImageDeprecationInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DeprecateAt != nil {
+ objectKey := object.Key("DeprecateAt")
+ objectKey.String(smithytime.FormatDateTime(*v.DeprecateAt))
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.ImageId != nil {
+ objectKey := object.Key("ImageId")
+ objectKey.String(*v.ImageId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentEnableSerialConsoleAccessInput(v *EnableSerialConsoleAccessInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentEnableTransitGatewayRouteTablePropagationInput(v *EnableTransitGatewayRouteTablePropagationInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.TransitGatewayAttachmentId != nil {
+ objectKey := object.Key("TransitGatewayAttachmentId")
+ objectKey.String(*v.TransitGatewayAttachmentId)
+ }
+
+ if v.TransitGatewayRouteTableId != nil {
+ objectKey := object.Key("TransitGatewayRouteTableId")
+ objectKey.String(*v.TransitGatewayRouteTableId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentEnableVgwRoutePropagationInput(v *EnableVgwRoutePropagationInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.GatewayId != nil {
+ objectKey := object.Key("GatewayId")
+ objectKey.String(*v.GatewayId)
+ }
+
+ if v.RouteTableId != nil {
+ objectKey := object.Key("RouteTableId")
+ objectKey.String(*v.RouteTableId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentEnableVolumeIOInput(v *EnableVolumeIOInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.VolumeId != nil {
+ objectKey := object.Key("VolumeId")
+ objectKey.String(*v.VolumeId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentEnableVpcClassicLinkDnsSupportInput(v *EnableVpcClassicLinkDnsSupportInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.VpcId != nil {
+ objectKey := object.Key("VpcId")
+ objectKey.String(*v.VpcId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentEnableVpcClassicLinkInput(v *EnableVpcClassicLinkInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.VpcId != nil {
+ objectKey := object.Key("VpcId")
+ objectKey.String(*v.VpcId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentExportClientVpnClientCertificateRevocationListInput(v *ExportClientVpnClientCertificateRevocationListInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.ClientVpnEndpointId != nil {
+ objectKey := object.Key("ClientVpnEndpointId")
+ objectKey.String(*v.ClientVpnEndpointId)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentExportClientVpnClientConfigurationInput(v *ExportClientVpnClientConfigurationInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.ClientVpnEndpointId != nil {
+ objectKey := object.Key("ClientVpnEndpointId")
+ objectKey.String(*v.ClientVpnEndpointId)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentExportImageInput(v *ExportImageInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.ClientToken != nil {
+ objectKey := object.Key("ClientToken")
+ objectKey.String(*v.ClientToken)
+ }
+
+ if v.Description != nil {
+ objectKey := object.Key("Description")
+ objectKey.String(*v.Description)
+ }
+
+ if len(v.DiskImageFormat) > 0 {
+ objectKey := object.Key("DiskImageFormat")
+ objectKey.String(string(v.DiskImageFormat))
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.ImageId != nil {
+ objectKey := object.Key("ImageId")
+ objectKey.String(*v.ImageId)
+ }
+
+ if v.RoleName != nil {
+ objectKey := object.Key("RoleName")
+ objectKey.String(*v.RoleName)
+ }
+
+ if v.S3ExportLocation != nil {
+ objectKey := object.Key("S3ExportLocation")
+ if err := awsEc2query_serializeDocumentExportTaskS3LocationRequest(v.S3ExportLocation, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.TagSpecifications != nil {
+ objectKey := object.FlatKey("TagSpecification")
+ if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentExportTransitGatewayRoutesInput(v *ExportTransitGatewayRoutesInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.S3Bucket != nil {
+ objectKey := object.Key("S3Bucket")
+ objectKey.String(*v.S3Bucket)
+ }
+
+ if v.TransitGatewayRouteTableId != nil {
+ objectKey := object.Key("TransitGatewayRouteTableId")
+ objectKey.String(*v.TransitGatewayRouteTableId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentGetAssociatedEnclaveCertificateIamRolesInput(v *GetAssociatedEnclaveCertificateIamRolesInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.CertificateArn != nil {
+ objectKey := object.Key("CertificateArn")
+ objectKey.String(*v.CertificateArn)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentGetAssociatedIpv6PoolCidrsInput(v *GetAssociatedIpv6PoolCidrsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ if v.PoolId != nil {
+ objectKey := object.Key("PoolId")
+ objectKey.String(*v.PoolId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentGetCapacityReservationUsageInput(v *GetCapacityReservationUsageInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.CapacityReservationId != nil {
+ objectKey := object.Key("CapacityReservationId")
+ objectKey.String(*v.CapacityReservationId)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentGetCoipPoolUsageInput(v *GetCoipPoolUsageInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ if v.PoolId != nil {
+ objectKey := object.Key("PoolId")
+ objectKey.String(*v.PoolId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentGetConsoleOutputInput(v *GetConsoleOutputInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.InstanceId != nil {
+ objectKey := object.Key("InstanceId")
+ objectKey.String(*v.InstanceId)
+ }
+
+ if v.Latest != nil {
+ objectKey := object.Key("Latest")
+ objectKey.Boolean(*v.Latest)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentGetConsoleScreenshotInput(v *GetConsoleScreenshotInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.InstanceId != nil {
+ objectKey := object.Key("InstanceId")
+ objectKey.String(*v.InstanceId)
+ }
+
+ if v.WakeUp != nil {
+ objectKey := object.Key("WakeUp")
+ objectKey.Boolean(*v.WakeUp)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentGetDefaultCreditSpecificationInput(v *GetDefaultCreditSpecificationInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if len(v.InstanceFamily) > 0 {
+ objectKey := object.Key("InstanceFamily")
+ objectKey.String(string(v.InstanceFamily))
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentGetEbsDefaultKmsKeyIdInput(v *GetEbsDefaultKmsKeyIdInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentGetEbsEncryptionByDefaultInput(v *GetEbsEncryptionByDefaultInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentGetFlowLogsIntegrationTemplateInput(v *GetFlowLogsIntegrationTemplateInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.ConfigDeliveryS3DestinationArn != nil {
+ objectKey := object.Key("ConfigDeliveryS3DestinationArn")
+ objectKey.String(*v.ConfigDeliveryS3DestinationArn)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.FlowLogId != nil {
+ objectKey := object.Key("FlowLogId")
+ objectKey.String(*v.FlowLogId)
+ }
+
+ if v.IntegrateServices != nil {
+ objectKey := object.Key("IntegrateService")
+ if err := awsEc2query_serializeDocumentIntegrateServices(v.IntegrateServices, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentGetGroupsForCapacityReservationInput(v *GetGroupsForCapacityReservationInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.CapacityReservationId != nil {
+ objectKey := object.Key("CapacityReservationId")
+ objectKey.String(*v.CapacityReservationId)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentGetHostReservationPurchasePreviewInput(v *GetHostReservationPurchasePreviewInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.HostIdSet != nil {
+ objectKey := object.FlatKey("HostIdSet")
+ if err := awsEc2query_serializeDocumentRequestHostIdSet(v.HostIdSet, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.OfferingId != nil {
+ objectKey := object.Key("OfferingId")
+ objectKey.String(*v.OfferingId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentGetLaunchTemplateDataInput(v *GetLaunchTemplateDataInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.InstanceId != nil {
+ objectKey := object.Key("InstanceId")
+ objectKey.String(*v.InstanceId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentGetManagedPrefixListAssociationsInput(v *GetManagedPrefixListAssociationsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ if v.PrefixListId != nil {
+ objectKey := object.Key("PrefixListId")
+ objectKey.String(*v.PrefixListId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentGetManagedPrefixListEntriesInput(v *GetManagedPrefixListEntriesInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ if v.PrefixListId != nil {
+ objectKey := object.Key("PrefixListId")
+ objectKey.String(*v.PrefixListId)
+ }
+
+ if v.TargetVersion != nil {
+ objectKey := object.Key("TargetVersion")
+ objectKey.Long(*v.TargetVersion)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentGetPasswordDataInput(v *GetPasswordDataInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.InstanceId != nil {
+ objectKey := object.Key("InstanceId")
+ objectKey.String(*v.InstanceId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentGetReservedInstancesExchangeQuoteInput(v *GetReservedInstancesExchangeQuoteInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.ReservedInstanceIds != nil {
+ objectKey := object.FlatKey("ReservedInstanceId")
+ if err := awsEc2query_serializeDocumentReservedInstanceIdSet(v.ReservedInstanceIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.TargetConfigurations != nil {
+ objectKey := object.FlatKey("TargetConfiguration")
+ if err := awsEc2query_serializeDocumentTargetConfigurationRequestSet(v.TargetConfigurations, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentGetSerialConsoleAccessStatusInput(v *GetSerialConsoleAccessStatusInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentGetSubnetCidrReservationsInput(v *GetSubnetCidrReservationsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ if v.SubnetId != nil {
+ objectKey := object.Key("SubnetId")
+ objectKey.String(*v.SubnetId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentGetTransitGatewayAttachmentPropagationsInput(v *GetTransitGatewayAttachmentPropagationsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ if v.TransitGatewayAttachmentId != nil {
+ objectKey := object.Key("TransitGatewayAttachmentId")
+ objectKey.String(*v.TransitGatewayAttachmentId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentGetTransitGatewayMulticastDomainAssociationsInput(v *GetTransitGatewayMulticastDomainAssociationsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ if v.TransitGatewayMulticastDomainId != nil {
+ objectKey := object.Key("TransitGatewayMulticastDomainId")
+ objectKey.String(*v.TransitGatewayMulticastDomainId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentGetTransitGatewayPrefixListReferencesInput(v *GetTransitGatewayPrefixListReferencesInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ if v.TransitGatewayRouteTableId != nil {
+ objectKey := object.Key("TransitGatewayRouteTableId")
+ objectKey.String(*v.TransitGatewayRouteTableId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentGetTransitGatewayRouteTableAssociationsInput(v *GetTransitGatewayRouteTableAssociationsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ if v.TransitGatewayRouteTableId != nil {
+ objectKey := object.Key("TransitGatewayRouteTableId")
+ objectKey.String(*v.TransitGatewayRouteTableId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentGetTransitGatewayRouteTablePropagationsInput(v *GetTransitGatewayRouteTablePropagationsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ if v.TransitGatewayRouteTableId != nil {
+ objectKey := object.Key("TransitGatewayRouteTableId")
+ objectKey.String(*v.TransitGatewayRouteTableId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentGetVpnConnectionDeviceSampleConfigurationInput(v *GetVpnConnectionDeviceSampleConfigurationInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.InternetKeyExchangeVersion != nil {
+ objectKey := object.Key("InternetKeyExchangeVersion")
+ objectKey.String(*v.InternetKeyExchangeVersion)
+ }
+
+ if v.VpnConnectionDeviceTypeId != nil {
+ objectKey := object.Key("VpnConnectionDeviceTypeId")
+ objectKey.String(*v.VpnConnectionDeviceTypeId)
+ }
+
+ if v.VpnConnectionId != nil {
+ objectKey := object.Key("VpnConnectionId")
+ objectKey.String(*v.VpnConnectionId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentGetVpnConnectionDeviceTypesInput(v *GetVpnConnectionDeviceTypesInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentImportClientVpnClientCertificateRevocationListInput(v *ImportClientVpnClientCertificateRevocationListInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.CertificateRevocationList != nil {
+ objectKey := object.Key("CertificateRevocationList")
+ objectKey.String(*v.CertificateRevocationList)
+ }
+
+ if v.ClientVpnEndpointId != nil {
+ objectKey := object.Key("ClientVpnEndpointId")
+ objectKey.String(*v.ClientVpnEndpointId)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentImportImageInput(v *ImportImageInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Architecture != nil {
+ objectKey := object.Key("Architecture")
+ objectKey.String(*v.Architecture)
+ }
+
+ if len(v.BootMode) > 0 {
+ objectKey := object.Key("BootMode")
+ objectKey.String(string(v.BootMode))
+ }
+
+ if v.ClientData != nil {
+ objectKey := object.Key("ClientData")
+ if err := awsEc2query_serializeDocumentClientData(v.ClientData, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.ClientToken != nil {
+ objectKey := object.Key("ClientToken")
+ objectKey.String(*v.ClientToken)
+ }
+
+ if v.Description != nil {
+ objectKey := object.Key("Description")
+ objectKey.String(*v.Description)
+ }
+
+ if v.DiskContainers != nil {
+ objectKey := object.FlatKey("DiskContainer")
+ if err := awsEc2query_serializeDocumentImageDiskContainerList(v.DiskContainers, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Encrypted != nil {
+ objectKey := object.Key("Encrypted")
+ objectKey.Boolean(*v.Encrypted)
+ }
+
+ if v.Hypervisor != nil {
+ objectKey := object.Key("Hypervisor")
+ objectKey.String(*v.Hypervisor)
+ }
+
+ if v.KmsKeyId != nil {
+ objectKey := object.Key("KmsKeyId")
+ objectKey.String(*v.KmsKeyId)
+ }
+
+ if v.LicenseSpecifications != nil {
+ objectKey := object.FlatKey("LicenseSpecifications")
+ if err := awsEc2query_serializeDocumentImportImageLicenseSpecificationListRequest(v.LicenseSpecifications, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.LicenseType != nil {
+ objectKey := object.Key("LicenseType")
+ objectKey.String(*v.LicenseType)
+ }
+
+ if v.Platform != nil {
+ objectKey := object.Key("Platform")
+ objectKey.String(*v.Platform)
+ }
+
+ if v.RoleName != nil {
+ objectKey := object.Key("RoleName")
+ objectKey.String(*v.RoleName)
+ }
+
+ if v.TagSpecifications != nil {
+ objectKey := object.FlatKey("TagSpecification")
+ if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.UsageOperation != nil {
+ objectKey := object.Key("UsageOperation")
+ objectKey.String(*v.UsageOperation)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentImportInstanceInput(v *ImportInstanceInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Description != nil {
+ objectKey := object.Key("Description")
+ objectKey.String(*v.Description)
+ }
+
+ if v.DiskImages != nil {
+ objectKey := object.FlatKey("DiskImage")
+ if err := awsEc2query_serializeDocumentDiskImageList(v.DiskImages, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.LaunchSpecification != nil {
+ objectKey := object.Key("LaunchSpecification")
+ if err := awsEc2query_serializeDocumentImportInstanceLaunchSpecification(v.LaunchSpecification, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if len(v.Platform) > 0 {
+ objectKey := object.Key("Platform")
+ objectKey.String(string(v.Platform))
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentImportKeyPairInput(v *ImportKeyPairInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.KeyName != nil {
+ objectKey := object.Key("KeyName")
+ objectKey.String(*v.KeyName)
+ }
+
+ if v.PublicKeyMaterial != nil {
+ objectKey := object.Key("PublicKeyMaterial")
+ objectKey.Base64EncodeBytes(v.PublicKeyMaterial)
+ }
+
+ if v.TagSpecifications != nil {
+ objectKey := object.FlatKey("TagSpecification")
+ if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentImportSnapshotInput(v *ImportSnapshotInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.ClientData != nil {
+ objectKey := object.Key("ClientData")
+ if err := awsEc2query_serializeDocumentClientData(v.ClientData, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.ClientToken != nil {
+ objectKey := object.Key("ClientToken")
+ objectKey.String(*v.ClientToken)
+ }
+
+ if v.Description != nil {
+ objectKey := object.Key("Description")
+ objectKey.String(*v.Description)
+ }
+
+ if v.DiskContainer != nil {
+ objectKey := object.Key("DiskContainer")
+ if err := awsEc2query_serializeDocumentSnapshotDiskContainer(v.DiskContainer, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Encrypted != nil {
+ objectKey := object.Key("Encrypted")
+ objectKey.Boolean(*v.Encrypted)
+ }
+
+ if v.KmsKeyId != nil {
+ objectKey := object.Key("KmsKeyId")
+ objectKey.String(*v.KmsKeyId)
+ }
+
+ if v.RoleName != nil {
+ objectKey := object.Key("RoleName")
+ objectKey.String(*v.RoleName)
+ }
+
+ if v.TagSpecifications != nil {
+ objectKey := object.FlatKey("TagSpecification")
+ if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentImportVolumeInput(v *ImportVolumeInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AvailabilityZone != nil {
+ objectKey := object.Key("AvailabilityZone")
+ objectKey.String(*v.AvailabilityZone)
+ }
+
+ if v.Description != nil {
+ objectKey := object.Key("Description")
+ objectKey.String(*v.Description)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Image != nil {
+ objectKey := object.Key("Image")
+ if err := awsEc2query_serializeDocumentDiskImageDetail(v.Image, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.Volume != nil {
+ objectKey := object.Key("Volume")
+ if err := awsEc2query_serializeDocumentVolumeDetail(v.Volume, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentModifyAddressAttributeInput(v *ModifyAddressAttributeInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AllocationId != nil {
+ objectKey := object.Key("AllocationId")
+ objectKey.String(*v.AllocationId)
+ }
+
+ if v.DomainName != nil {
+ objectKey := object.Key("DomainName")
+ objectKey.String(*v.DomainName)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentModifyAvailabilityZoneGroupInput(v *ModifyAvailabilityZoneGroupInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.GroupName != nil {
+ objectKey := object.Key("GroupName")
+ objectKey.String(*v.GroupName)
+ }
+
+ if len(v.OptInStatus) > 0 {
+ objectKey := object.Key("OptInStatus")
+ objectKey.String(string(v.OptInStatus))
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentModifyCapacityReservationInput(v *ModifyCapacityReservationInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Accept != nil {
+ objectKey := object.Key("Accept")
+ objectKey.Boolean(*v.Accept)
+ }
+
+ if v.CapacityReservationId != nil {
+ objectKey := object.Key("CapacityReservationId")
+ objectKey.String(*v.CapacityReservationId)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.EndDate != nil {
+ objectKey := object.Key("EndDate")
+ objectKey.String(smithytime.FormatDateTime(*v.EndDate))
+ }
+
+ if len(v.EndDateType) > 0 {
+ objectKey := object.Key("EndDateType")
+ objectKey.String(string(v.EndDateType))
+ }
+
+ if v.InstanceCount != nil {
+ objectKey := object.Key("InstanceCount")
+ objectKey.Integer(*v.InstanceCount)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentModifyClientVpnEndpointInput(v *ModifyClientVpnEndpointInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.ClientConnectOptions != nil {
+ objectKey := object.Key("ClientConnectOptions")
+ if err := awsEc2query_serializeDocumentClientConnectOptions(v.ClientConnectOptions, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.ClientVpnEndpointId != nil {
+ objectKey := object.Key("ClientVpnEndpointId")
+ objectKey.String(*v.ClientVpnEndpointId)
+ }
+
+ if v.ConnectionLogOptions != nil {
+ objectKey := object.Key("ConnectionLogOptions")
+ if err := awsEc2query_serializeDocumentConnectionLogOptions(v.ConnectionLogOptions, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.Description != nil {
+ objectKey := object.Key("Description")
+ objectKey.String(*v.Description)
+ }
+
+ if v.DnsServers != nil {
+ objectKey := object.Key("DnsServers")
+ if err := awsEc2query_serializeDocumentDnsServersOptionsModifyStructure(v.DnsServers, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.SecurityGroupIds != nil {
+ objectKey := object.FlatKey("SecurityGroupId")
+ if err := awsEc2query_serializeDocumentClientVpnSecurityGroupIdSet(v.SecurityGroupIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if len(v.SelfServicePortal) > 0 {
+ objectKey := object.Key("SelfServicePortal")
+ objectKey.String(string(v.SelfServicePortal))
+ }
+
+ if v.ServerCertificateArn != nil {
+ objectKey := object.Key("ServerCertificateArn")
+ objectKey.String(*v.ServerCertificateArn)
+ }
+
+ if v.SplitTunnel != nil {
+ objectKey := object.Key("SplitTunnel")
+ objectKey.Boolean(*v.SplitTunnel)
+ }
+
+ if v.VpcId != nil {
+ objectKey := object.Key("VpcId")
+ objectKey.String(*v.VpcId)
+ }
+
+ if v.VpnPort != nil {
+ objectKey := object.Key("VpnPort")
+ objectKey.Integer(*v.VpnPort)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentModifyDefaultCreditSpecificationInput(v *ModifyDefaultCreditSpecificationInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.CpuCredits != nil {
+ objectKey := object.Key("CpuCredits")
+ objectKey.String(*v.CpuCredits)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if len(v.InstanceFamily) > 0 {
+ objectKey := object.Key("InstanceFamily")
+ objectKey.String(string(v.InstanceFamily))
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentModifyEbsDefaultKmsKeyIdInput(v *ModifyEbsDefaultKmsKeyIdInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.KmsKeyId != nil {
+ objectKey := object.Key("KmsKeyId")
+ objectKey.String(*v.KmsKeyId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentModifyFleetInput(v *ModifyFleetInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Context != nil {
+ objectKey := object.Key("Context")
+ objectKey.String(*v.Context)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if len(v.ExcessCapacityTerminationPolicy) > 0 {
+ objectKey := object.Key("ExcessCapacityTerminationPolicy")
+ objectKey.String(string(v.ExcessCapacityTerminationPolicy))
+ }
+
+ if v.FleetId != nil {
+ objectKey := object.Key("FleetId")
+ objectKey.String(*v.FleetId)
+ }
+
+ if v.LaunchTemplateConfigs != nil {
+ objectKey := object.FlatKey("LaunchTemplateConfig")
+ if err := awsEc2query_serializeDocumentFleetLaunchTemplateConfigListRequest(v.LaunchTemplateConfigs, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.TargetCapacitySpecification != nil {
+ objectKey := object.Key("TargetCapacitySpecification")
+ if err := awsEc2query_serializeDocumentTargetCapacitySpecificationRequest(v.TargetCapacitySpecification, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentModifyFpgaImageAttributeInput(v *ModifyFpgaImageAttributeInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if len(v.Attribute) > 0 {
+ objectKey := object.Key("Attribute")
+ objectKey.String(string(v.Attribute))
+ }
+
+ if v.Description != nil {
+ objectKey := object.Key("Description")
+ objectKey.String(*v.Description)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.FpgaImageId != nil {
+ objectKey := object.Key("FpgaImageId")
+ objectKey.String(*v.FpgaImageId)
+ }
+
+ if v.LoadPermission != nil {
+ objectKey := object.Key("LoadPermission")
+ if err := awsEc2query_serializeDocumentLoadPermissionModifications(v.LoadPermission, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.Name != nil {
+ objectKey := object.Key("Name")
+ objectKey.String(*v.Name)
+ }
+
+ if len(v.OperationType) > 0 {
+ objectKey := object.Key("OperationType")
+ objectKey.String(string(v.OperationType))
+ }
+
+ if v.ProductCodes != nil {
+ objectKey := object.FlatKey("ProductCode")
+ if err := awsEc2query_serializeDocumentProductCodeStringList(v.ProductCodes, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.UserGroups != nil {
+ objectKey := object.FlatKey("UserGroup")
+ if err := awsEc2query_serializeDocumentUserGroupStringList(v.UserGroups, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.UserIds != nil {
+ objectKey := object.FlatKey("UserId")
+ if err := awsEc2query_serializeDocumentUserIdStringList(v.UserIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentModifyHostsInput(v *ModifyHostsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if len(v.AutoPlacement) > 0 {
+ objectKey := object.Key("AutoPlacement")
+ objectKey.String(string(v.AutoPlacement))
+ }
+
+ if v.HostIds != nil {
+ objectKey := object.FlatKey("HostId")
+ if err := awsEc2query_serializeDocumentRequestHostIdList(v.HostIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if len(v.HostRecovery) > 0 {
+ objectKey := object.Key("HostRecovery")
+ objectKey.String(string(v.HostRecovery))
+ }
+
+ if v.InstanceFamily != nil {
+ objectKey := object.Key("InstanceFamily")
+ objectKey.String(*v.InstanceFamily)
+ }
+
+ if v.InstanceType != nil {
+ objectKey := object.Key("InstanceType")
+ objectKey.String(*v.InstanceType)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentModifyIdentityIdFormatInput(v *ModifyIdentityIdFormatInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.PrincipalArn != nil {
+ objectKey := object.Key("PrincipalArn")
+ objectKey.String(*v.PrincipalArn)
+ }
+
+ if v.Resource != nil {
+ objectKey := object.Key("Resource")
+ objectKey.String(*v.Resource)
+ }
+
+ if v.UseLongIds != nil {
+ objectKey := object.Key("UseLongIds")
+ objectKey.Boolean(*v.UseLongIds)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentModifyIdFormatInput(v *ModifyIdFormatInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Resource != nil {
+ objectKey := object.Key("Resource")
+ objectKey.String(*v.Resource)
+ }
+
+ if v.UseLongIds != nil {
+ objectKey := object.Key("UseLongIds")
+ objectKey.Boolean(*v.UseLongIds)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentModifyImageAttributeInput(v *ModifyImageAttributeInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Attribute != nil {
+ objectKey := object.Key("Attribute")
+ objectKey.String(*v.Attribute)
+ }
+
+ if v.Description != nil {
+ objectKey := object.Key("Description")
+ if err := awsEc2query_serializeDocumentAttributeValue(v.Description, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.ImageId != nil {
+ objectKey := object.Key("ImageId")
+ objectKey.String(*v.ImageId)
+ }
+
+ if v.LaunchPermission != nil {
+ objectKey := object.Key("LaunchPermission")
+ if err := awsEc2query_serializeDocumentLaunchPermissionModifications(v.LaunchPermission, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if len(v.OperationType) > 0 {
+ objectKey := object.Key("OperationType")
+ objectKey.String(string(v.OperationType))
+ }
+
+ if v.ProductCodes != nil {
+ objectKey := object.FlatKey("ProductCode")
+ if err := awsEc2query_serializeDocumentProductCodeStringList(v.ProductCodes, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.UserGroups != nil {
+ objectKey := object.FlatKey("UserGroup")
+ if err := awsEc2query_serializeDocumentUserGroupStringList(v.UserGroups, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.UserIds != nil {
+ objectKey := object.FlatKey("UserId")
+ if err := awsEc2query_serializeDocumentUserIdStringList(v.UserIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.Value != nil {
+ objectKey := object.Key("Value")
+ objectKey.String(*v.Value)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentModifyInstanceAttributeInput(v *ModifyInstanceAttributeInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if len(v.Attribute) > 0 {
+ objectKey := object.Key("Attribute")
+ objectKey.String(string(v.Attribute))
+ }
+
+ if v.BlockDeviceMappings != nil {
+ objectKey := object.FlatKey("BlockDeviceMapping")
+ if err := awsEc2query_serializeDocumentInstanceBlockDeviceMappingSpecificationList(v.BlockDeviceMappings, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.DisableApiTermination != nil {
+ objectKey := object.Key("DisableApiTermination")
+ if err := awsEc2query_serializeDocumentAttributeBooleanValue(v.DisableApiTermination, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.EbsOptimized != nil {
+ objectKey := object.Key("EbsOptimized")
+ if err := awsEc2query_serializeDocumentAttributeBooleanValue(v.EbsOptimized, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.EnaSupport != nil {
+ objectKey := object.Key("EnaSupport")
+ if err := awsEc2query_serializeDocumentAttributeBooleanValue(v.EnaSupport, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.Groups != nil {
+ objectKey := object.FlatKey("GroupId")
+ if err := awsEc2query_serializeDocumentGroupIdStringList(v.Groups, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.InstanceId != nil {
+ objectKey := object.Key("InstanceId")
+ objectKey.String(*v.InstanceId)
+ }
+
+ if v.InstanceInitiatedShutdownBehavior != nil {
+ objectKey := object.Key("InstanceInitiatedShutdownBehavior")
+ if err := awsEc2query_serializeDocumentAttributeValue(v.InstanceInitiatedShutdownBehavior, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.InstanceType != nil {
+ objectKey := object.Key("InstanceType")
+ if err := awsEc2query_serializeDocumentAttributeValue(v.InstanceType, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.Kernel != nil {
+ objectKey := object.Key("Kernel")
+ if err := awsEc2query_serializeDocumentAttributeValue(v.Kernel, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.Ramdisk != nil {
+ objectKey := object.Key("Ramdisk")
+ if err := awsEc2query_serializeDocumentAttributeValue(v.Ramdisk, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.SourceDestCheck != nil {
+ objectKey := object.Key("SourceDestCheck")
+ if err := awsEc2query_serializeDocumentAttributeBooleanValue(v.SourceDestCheck, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.SriovNetSupport != nil {
+ objectKey := object.Key("SriovNetSupport")
+ if err := awsEc2query_serializeDocumentAttributeValue(v.SriovNetSupport, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.UserData != nil {
+ objectKey := object.Key("UserData")
+ if err := awsEc2query_serializeDocumentBlobAttributeValue(v.UserData, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.Value != nil {
+ objectKey := object.Key("Value")
+ objectKey.String(*v.Value)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentModifyInstanceCapacityReservationAttributesInput(v *ModifyInstanceCapacityReservationAttributesInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.CapacityReservationSpecification != nil {
+ objectKey := object.Key("CapacityReservationSpecification")
+ if err := awsEc2query_serializeDocumentCapacityReservationSpecification(v.CapacityReservationSpecification, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.InstanceId != nil {
+ objectKey := object.Key("InstanceId")
+ objectKey.String(*v.InstanceId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentModifyInstanceCreditSpecificationInput(v *ModifyInstanceCreditSpecificationInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.ClientToken != nil {
+ objectKey := object.Key("ClientToken")
+ objectKey.String(*v.ClientToken)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.InstanceCreditSpecifications != nil {
+ objectKey := object.FlatKey("InstanceCreditSpecification")
+ if err := awsEc2query_serializeDocumentInstanceCreditSpecificationListRequest(v.InstanceCreditSpecifications, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentModifyInstanceEventStartTimeInput(v *ModifyInstanceEventStartTimeInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.InstanceEventId != nil {
+ objectKey := object.Key("InstanceEventId")
+ objectKey.String(*v.InstanceEventId)
+ }
+
+ if v.InstanceId != nil {
+ objectKey := object.Key("InstanceId")
+ objectKey.String(*v.InstanceId)
+ }
+
+ if v.NotBefore != nil {
+ objectKey := object.Key("NotBefore")
+ objectKey.String(smithytime.FormatDateTime(*v.NotBefore))
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentModifyInstanceEventWindowInput(v *ModifyInstanceEventWindowInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.CronExpression != nil {
+ objectKey := object.Key("CronExpression")
+ objectKey.String(*v.CronExpression)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.InstanceEventWindowId != nil {
+ objectKey := object.Key("InstanceEventWindowId")
+ objectKey.String(*v.InstanceEventWindowId)
+ }
+
+ if v.Name != nil {
+ objectKey := object.Key("Name")
+ objectKey.String(*v.Name)
+ }
+
+ if v.TimeRanges != nil {
+ objectKey := object.FlatKey("TimeRange")
+ if err := awsEc2query_serializeDocumentInstanceEventWindowTimeRangeRequestSet(v.TimeRanges, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentModifyInstanceMetadataOptionsInput(v *ModifyInstanceMetadataOptionsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if len(v.HttpEndpoint) > 0 {
+ objectKey := object.Key("HttpEndpoint")
+ objectKey.String(string(v.HttpEndpoint))
+ }
+
+ if len(v.HttpProtocolIpv6) > 0 {
+ objectKey := object.Key("HttpProtocolIpv6")
+ objectKey.String(string(v.HttpProtocolIpv6))
+ }
+
+ if v.HttpPutResponseHopLimit != nil {
+ objectKey := object.Key("HttpPutResponseHopLimit")
+ objectKey.Integer(*v.HttpPutResponseHopLimit)
+ }
+
+ if len(v.HttpTokens) > 0 {
+ objectKey := object.Key("HttpTokens")
+ objectKey.String(string(v.HttpTokens))
+ }
+
+ if v.InstanceId != nil {
+ objectKey := object.Key("InstanceId")
+ objectKey.String(*v.InstanceId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentModifyInstancePlacementInput(v *ModifyInstancePlacementInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if len(v.Affinity) > 0 {
+ objectKey := object.Key("Affinity")
+ objectKey.String(string(v.Affinity))
+ }
+
+ if v.GroupName != nil {
+ objectKey := object.Key("GroupName")
+ objectKey.String(*v.GroupName)
+ }
+
+ if v.HostId != nil {
+ objectKey := object.Key("HostId")
+ objectKey.String(*v.HostId)
+ }
+
+ if v.HostResourceGroupArn != nil {
+ objectKey := object.Key("HostResourceGroupArn")
+ objectKey.String(*v.HostResourceGroupArn)
+ }
+
+ if v.InstanceId != nil {
+ objectKey := object.Key("InstanceId")
+ objectKey.String(*v.InstanceId)
+ }
+
+ if v.PartitionNumber != nil {
+ objectKey := object.Key("PartitionNumber")
+ objectKey.Integer(*v.PartitionNumber)
+ }
+
+ if len(v.Tenancy) > 0 {
+ objectKey := object.Key("Tenancy")
+ objectKey.String(string(v.Tenancy))
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentModifyLaunchTemplateInput(v *ModifyLaunchTemplateInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.ClientToken != nil {
+ objectKey := object.Key("ClientToken")
+ objectKey.String(*v.ClientToken)
+ }
+
+ if v.DefaultVersion != nil {
+ objectKey := object.Key("SetDefaultVersion")
+ objectKey.String(*v.DefaultVersion)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.LaunchTemplateId != nil {
+ objectKey := object.Key("LaunchTemplateId")
+ objectKey.String(*v.LaunchTemplateId)
+ }
+
+ if v.LaunchTemplateName != nil {
+ objectKey := object.Key("LaunchTemplateName")
+ objectKey.String(*v.LaunchTemplateName)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentModifyManagedPrefixListInput(v *ModifyManagedPrefixListInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AddEntries != nil {
+ objectKey := object.FlatKey("AddEntry")
+ if err := awsEc2query_serializeDocumentAddPrefixListEntries(v.AddEntries, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.CurrentVersion != nil {
+ objectKey := object.Key("CurrentVersion")
+ objectKey.Long(*v.CurrentVersion)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.MaxEntries != nil {
+ objectKey := object.Key("MaxEntries")
+ objectKey.Integer(*v.MaxEntries)
+ }
+
+ if v.PrefixListId != nil {
+ objectKey := object.Key("PrefixListId")
+ objectKey.String(*v.PrefixListId)
+ }
+
+ if v.PrefixListName != nil {
+ objectKey := object.Key("PrefixListName")
+ objectKey.String(*v.PrefixListName)
+ }
+
+ if v.RemoveEntries != nil {
+ objectKey := object.FlatKey("RemoveEntry")
+ if err := awsEc2query_serializeDocumentRemovePrefixListEntries(v.RemoveEntries, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentModifyNetworkInterfaceAttributeInput(v *ModifyNetworkInterfaceAttributeInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Attachment != nil {
+ objectKey := object.Key("Attachment")
+ if err := awsEc2query_serializeDocumentNetworkInterfaceAttachmentChanges(v.Attachment, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.Description != nil {
+ objectKey := object.Key("Description")
+ if err := awsEc2query_serializeDocumentAttributeValue(v.Description, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Groups != nil {
+ objectKey := object.FlatKey("SecurityGroupId")
+ if err := awsEc2query_serializeDocumentSecurityGroupIdStringList(v.Groups, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.NetworkInterfaceId != nil {
+ objectKey := object.Key("NetworkInterfaceId")
+ objectKey.String(*v.NetworkInterfaceId)
+ }
+
+ if v.SourceDestCheck != nil {
+ objectKey := object.Key("SourceDestCheck")
+ if err := awsEc2query_serializeDocumentAttributeBooleanValue(v.SourceDestCheck, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentModifyReservedInstancesInput(v *ModifyReservedInstancesInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.ClientToken != nil {
+ objectKey := object.Key("ClientToken")
+ objectKey.String(*v.ClientToken)
+ }
+
+ if v.ReservedInstancesIds != nil {
+ objectKey := object.FlatKey("ReservedInstancesId")
+ if err := awsEc2query_serializeDocumentReservedInstancesIdStringList(v.ReservedInstancesIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.TargetConfigurations != nil {
+ objectKey := object.FlatKey("ReservedInstancesConfigurationSetItemType")
+ if err := awsEc2query_serializeDocumentReservedInstancesConfigurationList(v.TargetConfigurations, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentModifySecurityGroupRulesInput(v *ModifySecurityGroupRulesInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.GroupId != nil {
+ objectKey := object.Key("GroupId")
+ objectKey.String(*v.GroupId)
+ }
+
+ if v.SecurityGroupRules != nil {
+ objectKey := object.FlatKey("SecurityGroupRule")
+ if err := awsEc2query_serializeDocumentSecurityGroupRuleUpdateList(v.SecurityGroupRules, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentModifySnapshotAttributeInput(v *ModifySnapshotAttributeInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if len(v.Attribute) > 0 {
+ objectKey := object.Key("Attribute")
+ objectKey.String(string(v.Attribute))
+ }
+
+ if v.CreateVolumePermission != nil {
+ objectKey := object.Key("CreateVolumePermission")
+ if err := awsEc2query_serializeDocumentCreateVolumePermissionModifications(v.CreateVolumePermission, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.GroupNames != nil {
+ objectKey := object.FlatKey("UserGroup")
+ if err := awsEc2query_serializeDocumentGroupNameStringList(v.GroupNames, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if len(v.OperationType) > 0 {
+ objectKey := object.Key("OperationType")
+ objectKey.String(string(v.OperationType))
+ }
+
+ if v.SnapshotId != nil {
+ objectKey := object.Key("SnapshotId")
+ objectKey.String(*v.SnapshotId)
+ }
+
+ if v.UserIds != nil {
+ objectKey := object.FlatKey("UserId")
+ if err := awsEc2query_serializeDocumentUserIdStringList(v.UserIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentModifySpotFleetRequestInput(v *ModifySpotFleetRequestInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Context != nil {
+ objectKey := object.Key("Context")
+ objectKey.String(*v.Context)
+ }
+
+ if len(v.ExcessCapacityTerminationPolicy) > 0 {
+ objectKey := object.Key("ExcessCapacityTerminationPolicy")
+ objectKey.String(string(v.ExcessCapacityTerminationPolicy))
+ }
+
+ if v.LaunchTemplateConfigs != nil {
+ objectKey := object.FlatKey("LaunchTemplateConfig")
+ if err := awsEc2query_serializeDocumentLaunchTemplateConfigList(v.LaunchTemplateConfigs, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.OnDemandTargetCapacity != nil {
+ objectKey := object.Key("OnDemandTargetCapacity")
+ objectKey.Integer(*v.OnDemandTargetCapacity)
+ }
+
+ if v.SpotFleetRequestId != nil {
+ objectKey := object.Key("SpotFleetRequestId")
+ objectKey.String(*v.SpotFleetRequestId)
+ }
+
+ if v.TargetCapacity != nil {
+ objectKey := object.Key("TargetCapacity")
+ objectKey.Integer(*v.TargetCapacity)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentModifySubnetAttributeInput(v *ModifySubnetAttributeInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AssignIpv6AddressOnCreation != nil {
+ objectKey := object.Key("AssignIpv6AddressOnCreation")
+ if err := awsEc2query_serializeDocumentAttributeBooleanValue(v.AssignIpv6AddressOnCreation, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.CustomerOwnedIpv4Pool != nil {
+ objectKey := object.Key("CustomerOwnedIpv4Pool")
+ objectKey.String(*v.CustomerOwnedIpv4Pool)
+ }
+
+ if v.MapCustomerOwnedIpOnLaunch != nil {
+ objectKey := object.Key("MapCustomerOwnedIpOnLaunch")
+ if err := awsEc2query_serializeDocumentAttributeBooleanValue(v.MapCustomerOwnedIpOnLaunch, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MapPublicIpOnLaunch != nil {
+ objectKey := object.Key("MapPublicIpOnLaunch")
+ if err := awsEc2query_serializeDocumentAttributeBooleanValue(v.MapPublicIpOnLaunch, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.SubnetId != nil {
+ objectKey := object.Key("SubnetId")
+ objectKey.String(*v.SubnetId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentModifyTrafficMirrorFilterNetworkServicesInput(v *ModifyTrafficMirrorFilterNetworkServicesInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AddNetworkServices != nil {
+ objectKey := object.FlatKey("AddNetworkService")
+ if err := awsEc2query_serializeDocumentTrafficMirrorNetworkServiceList(v.AddNetworkServices, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.RemoveNetworkServices != nil {
+ objectKey := object.FlatKey("RemoveNetworkService")
+ if err := awsEc2query_serializeDocumentTrafficMirrorNetworkServiceList(v.RemoveNetworkServices, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.TrafficMirrorFilterId != nil {
+ objectKey := object.Key("TrafficMirrorFilterId")
+ objectKey.String(*v.TrafficMirrorFilterId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentModifyTrafficMirrorFilterRuleInput(v *ModifyTrafficMirrorFilterRuleInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Description != nil {
+ objectKey := object.Key("Description")
+ objectKey.String(*v.Description)
+ }
+
+ if v.DestinationCidrBlock != nil {
+ objectKey := object.Key("DestinationCidrBlock")
+ objectKey.String(*v.DestinationCidrBlock)
+ }
+
+ if v.DestinationPortRange != nil {
+ objectKey := object.Key("DestinationPortRange")
+ if err := awsEc2query_serializeDocumentTrafficMirrorPortRangeRequest(v.DestinationPortRange, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Protocol != nil {
+ objectKey := object.Key("Protocol")
+ objectKey.Integer(*v.Protocol)
+ }
+
+ if v.RemoveFields != nil {
+ objectKey := object.FlatKey("RemoveField")
+ if err := awsEc2query_serializeDocumentTrafficMirrorFilterRuleFieldList(v.RemoveFields, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if len(v.RuleAction) > 0 {
+ objectKey := object.Key("RuleAction")
+ objectKey.String(string(v.RuleAction))
+ }
+
+ if v.RuleNumber != nil {
+ objectKey := object.Key("RuleNumber")
+ objectKey.Integer(*v.RuleNumber)
+ }
+
+ if v.SourceCidrBlock != nil {
+ objectKey := object.Key("SourceCidrBlock")
+ objectKey.String(*v.SourceCidrBlock)
+ }
+
+ if v.SourcePortRange != nil {
+ objectKey := object.Key("SourcePortRange")
+ if err := awsEc2query_serializeDocumentTrafficMirrorPortRangeRequest(v.SourcePortRange, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if len(v.TrafficDirection) > 0 {
+ objectKey := object.Key("TrafficDirection")
+ objectKey.String(string(v.TrafficDirection))
+ }
+
+ if v.TrafficMirrorFilterRuleId != nil {
+ objectKey := object.Key("TrafficMirrorFilterRuleId")
+ objectKey.String(*v.TrafficMirrorFilterRuleId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentModifyTrafficMirrorSessionInput(v *ModifyTrafficMirrorSessionInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Description != nil {
+ objectKey := object.Key("Description")
+ objectKey.String(*v.Description)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.PacketLength != nil {
+ objectKey := object.Key("PacketLength")
+ objectKey.Integer(*v.PacketLength)
+ }
+
+ if v.RemoveFields != nil {
+ objectKey := object.FlatKey("RemoveField")
+ if err := awsEc2query_serializeDocumentTrafficMirrorSessionFieldList(v.RemoveFields, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.SessionNumber != nil {
+ objectKey := object.Key("SessionNumber")
+ objectKey.Integer(*v.SessionNumber)
+ }
+
+ if v.TrafficMirrorFilterId != nil {
+ objectKey := object.Key("TrafficMirrorFilterId")
+ objectKey.String(*v.TrafficMirrorFilterId)
+ }
+
+ if v.TrafficMirrorSessionId != nil {
+ objectKey := object.Key("TrafficMirrorSessionId")
+ objectKey.String(*v.TrafficMirrorSessionId)
+ }
+
+ if v.TrafficMirrorTargetId != nil {
+ objectKey := object.Key("TrafficMirrorTargetId")
+ objectKey.String(*v.TrafficMirrorTargetId)
+ }
+
+ if v.VirtualNetworkId != nil {
+ objectKey := object.Key("VirtualNetworkId")
+ objectKey.Integer(*v.VirtualNetworkId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentModifyTransitGatewayInput(v *ModifyTransitGatewayInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Description != nil {
+ objectKey := object.Key("Description")
+ objectKey.String(*v.Description)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Options != nil {
+ objectKey := object.Key("Options")
+ if err := awsEc2query_serializeDocumentModifyTransitGatewayOptions(v.Options, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.TransitGatewayId != nil {
+ objectKey := object.Key("TransitGatewayId")
+ objectKey.String(*v.TransitGatewayId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentModifyTransitGatewayPrefixListReferenceInput(v *ModifyTransitGatewayPrefixListReferenceInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Blackhole != nil {
+ objectKey := object.Key("Blackhole")
+ objectKey.Boolean(*v.Blackhole)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.PrefixListId != nil {
+ objectKey := object.Key("PrefixListId")
+ objectKey.String(*v.PrefixListId)
+ }
+
+ if v.TransitGatewayAttachmentId != nil {
+ objectKey := object.Key("TransitGatewayAttachmentId")
+ objectKey.String(*v.TransitGatewayAttachmentId)
+ }
+
+ if v.TransitGatewayRouteTableId != nil {
+ objectKey := object.Key("TransitGatewayRouteTableId")
+ objectKey.String(*v.TransitGatewayRouteTableId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentModifyTransitGatewayVpcAttachmentInput(v *ModifyTransitGatewayVpcAttachmentInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AddSubnetIds != nil {
+ objectKey := object.FlatKey("AddSubnetIds")
+ if err := awsEc2query_serializeDocumentTransitGatewaySubnetIdList(v.AddSubnetIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Options != nil {
+ objectKey := object.Key("Options")
+ if err := awsEc2query_serializeDocumentModifyTransitGatewayVpcAttachmentRequestOptions(v.Options, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.RemoveSubnetIds != nil {
+ objectKey := object.FlatKey("RemoveSubnetIds")
+ if err := awsEc2query_serializeDocumentTransitGatewaySubnetIdList(v.RemoveSubnetIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.TransitGatewayAttachmentId != nil {
+ objectKey := object.Key("TransitGatewayAttachmentId")
+ objectKey.String(*v.TransitGatewayAttachmentId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentModifyVolumeAttributeInput(v *ModifyVolumeAttributeInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AutoEnableIO != nil {
+ objectKey := object.Key("AutoEnableIO")
+ if err := awsEc2query_serializeDocumentAttributeBooleanValue(v.AutoEnableIO, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.VolumeId != nil {
+ objectKey := object.Key("VolumeId")
+ objectKey.String(*v.VolumeId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentModifyVolumeInput(v *ModifyVolumeInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Iops != nil {
+ objectKey := object.Key("Iops")
+ objectKey.Integer(*v.Iops)
+ }
+
+ if v.MultiAttachEnabled != nil {
+ objectKey := object.Key("MultiAttachEnabled")
+ objectKey.Boolean(*v.MultiAttachEnabled)
+ }
+
+ if v.Size != nil {
+ objectKey := object.Key("Size")
+ objectKey.Integer(*v.Size)
+ }
+
+ if v.Throughput != nil {
+ objectKey := object.Key("Throughput")
+ objectKey.Integer(*v.Throughput)
+ }
+
+ if v.VolumeId != nil {
+ objectKey := object.Key("VolumeId")
+ objectKey.String(*v.VolumeId)
+ }
+
+ if len(v.VolumeType) > 0 {
+ objectKey := object.Key("VolumeType")
+ objectKey.String(string(v.VolumeType))
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentModifyVpcAttributeInput(v *ModifyVpcAttributeInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.EnableDnsHostnames != nil {
+ objectKey := object.Key("EnableDnsHostnames")
+ if err := awsEc2query_serializeDocumentAttributeBooleanValue(v.EnableDnsHostnames, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.EnableDnsSupport != nil {
+ objectKey := object.Key("EnableDnsSupport")
+ if err := awsEc2query_serializeDocumentAttributeBooleanValue(v.EnableDnsSupport, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.VpcId != nil {
+ objectKey := object.Key("VpcId")
+ objectKey.String(*v.VpcId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentModifyVpcEndpointConnectionNotificationInput(v *ModifyVpcEndpointConnectionNotificationInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.ConnectionEvents != nil {
+ objectKey := object.FlatKey("ConnectionEvents")
+ if err := awsEc2query_serializeDocumentValueStringList(v.ConnectionEvents, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.ConnectionNotificationArn != nil {
+ objectKey := object.Key("ConnectionNotificationArn")
+ objectKey.String(*v.ConnectionNotificationArn)
+ }
+
+ if v.ConnectionNotificationId != nil {
+ objectKey := object.Key("ConnectionNotificationId")
+ objectKey.String(*v.ConnectionNotificationId)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentModifyVpcEndpointInput(v *ModifyVpcEndpointInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AddRouteTableIds != nil {
+ objectKey := object.FlatKey("AddRouteTableId")
+ if err := awsEc2query_serializeDocumentVpcEndpointRouteTableIdList(v.AddRouteTableIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.AddSecurityGroupIds != nil {
+ objectKey := object.FlatKey("AddSecurityGroupId")
+ if err := awsEc2query_serializeDocumentVpcEndpointSecurityGroupIdList(v.AddSecurityGroupIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.AddSubnetIds != nil {
+ objectKey := object.FlatKey("AddSubnetId")
+ if err := awsEc2query_serializeDocumentVpcEndpointSubnetIdList(v.AddSubnetIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.PolicyDocument != nil {
+ objectKey := object.Key("PolicyDocument")
+ objectKey.String(*v.PolicyDocument)
+ }
+
+ if v.PrivateDnsEnabled != nil {
+ objectKey := object.Key("PrivateDnsEnabled")
+ objectKey.Boolean(*v.PrivateDnsEnabled)
+ }
+
+ if v.RemoveRouteTableIds != nil {
+ objectKey := object.FlatKey("RemoveRouteTableId")
+ if err := awsEc2query_serializeDocumentVpcEndpointRouteTableIdList(v.RemoveRouteTableIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.RemoveSecurityGroupIds != nil {
+ objectKey := object.FlatKey("RemoveSecurityGroupId")
+ if err := awsEc2query_serializeDocumentVpcEndpointSecurityGroupIdList(v.RemoveSecurityGroupIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.RemoveSubnetIds != nil {
+ objectKey := object.FlatKey("RemoveSubnetId")
+ if err := awsEc2query_serializeDocumentVpcEndpointSubnetIdList(v.RemoveSubnetIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.ResetPolicy != nil {
+ objectKey := object.Key("ResetPolicy")
+ objectKey.Boolean(*v.ResetPolicy)
+ }
+
+ if v.VpcEndpointId != nil {
+ objectKey := object.Key("VpcEndpointId")
+ objectKey.String(*v.VpcEndpointId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentModifyVpcEndpointServiceConfigurationInput(v *ModifyVpcEndpointServiceConfigurationInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AcceptanceRequired != nil {
+ objectKey := object.Key("AcceptanceRequired")
+ objectKey.Boolean(*v.AcceptanceRequired)
+ }
+
+ if v.AddGatewayLoadBalancerArns != nil {
+ objectKey := object.FlatKey("AddGatewayLoadBalancerArn")
+ if err := awsEc2query_serializeDocumentValueStringList(v.AddGatewayLoadBalancerArns, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.AddNetworkLoadBalancerArns != nil {
+ objectKey := object.FlatKey("AddNetworkLoadBalancerArn")
+ if err := awsEc2query_serializeDocumentValueStringList(v.AddNetworkLoadBalancerArns, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.PrivateDnsName != nil {
+ objectKey := object.Key("PrivateDnsName")
+ objectKey.String(*v.PrivateDnsName)
+ }
+
+ if v.RemoveGatewayLoadBalancerArns != nil {
+ objectKey := object.FlatKey("RemoveGatewayLoadBalancerArn")
+ if err := awsEc2query_serializeDocumentValueStringList(v.RemoveGatewayLoadBalancerArns, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.RemoveNetworkLoadBalancerArns != nil {
+ objectKey := object.FlatKey("RemoveNetworkLoadBalancerArn")
+ if err := awsEc2query_serializeDocumentValueStringList(v.RemoveNetworkLoadBalancerArns, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.RemovePrivateDnsName != nil {
+ objectKey := object.Key("RemovePrivateDnsName")
+ objectKey.Boolean(*v.RemovePrivateDnsName)
+ }
+
+ if v.ServiceId != nil {
+ objectKey := object.Key("ServiceId")
+ objectKey.String(*v.ServiceId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentModifyVpcEndpointServicePermissionsInput(v *ModifyVpcEndpointServicePermissionsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AddAllowedPrincipals != nil {
+ objectKey := object.FlatKey("AddAllowedPrincipals")
+ if err := awsEc2query_serializeDocumentValueStringList(v.AddAllowedPrincipals, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.RemoveAllowedPrincipals != nil {
+ objectKey := object.FlatKey("RemoveAllowedPrincipals")
+ if err := awsEc2query_serializeDocumentValueStringList(v.RemoveAllowedPrincipals, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.ServiceId != nil {
+ objectKey := object.Key("ServiceId")
+ objectKey.String(*v.ServiceId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentModifyVpcPeeringConnectionOptionsInput(v *ModifyVpcPeeringConnectionOptionsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AccepterPeeringConnectionOptions != nil {
+ objectKey := object.Key("AccepterPeeringConnectionOptions")
+ if err := awsEc2query_serializeDocumentPeeringConnectionOptionsRequest(v.AccepterPeeringConnectionOptions, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.RequesterPeeringConnectionOptions != nil {
+ objectKey := object.Key("RequesterPeeringConnectionOptions")
+ if err := awsEc2query_serializeDocumentPeeringConnectionOptionsRequest(v.RequesterPeeringConnectionOptions, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.VpcPeeringConnectionId != nil {
+ objectKey := object.Key("VpcPeeringConnectionId")
+ objectKey.String(*v.VpcPeeringConnectionId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentModifyVpcTenancyInput(v *ModifyVpcTenancyInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if len(v.InstanceTenancy) > 0 {
+ objectKey := object.Key("InstanceTenancy")
+ objectKey.String(string(v.InstanceTenancy))
+ }
+
+ if v.VpcId != nil {
+ objectKey := object.Key("VpcId")
+ objectKey.String(*v.VpcId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentModifyVpnConnectionInput(v *ModifyVpnConnectionInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.CustomerGatewayId != nil {
+ objectKey := object.Key("CustomerGatewayId")
+ objectKey.String(*v.CustomerGatewayId)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.TransitGatewayId != nil {
+ objectKey := object.Key("TransitGatewayId")
+ objectKey.String(*v.TransitGatewayId)
+ }
+
+ if v.VpnConnectionId != nil {
+ objectKey := object.Key("VpnConnectionId")
+ objectKey.String(*v.VpnConnectionId)
+ }
+
+ if v.VpnGatewayId != nil {
+ objectKey := object.Key("VpnGatewayId")
+ objectKey.String(*v.VpnGatewayId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentModifyVpnConnectionOptionsInput(v *ModifyVpnConnectionOptionsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.LocalIpv4NetworkCidr != nil {
+ objectKey := object.Key("LocalIpv4NetworkCidr")
+ objectKey.String(*v.LocalIpv4NetworkCidr)
+ }
+
+ if v.LocalIpv6NetworkCidr != nil {
+ objectKey := object.Key("LocalIpv6NetworkCidr")
+ objectKey.String(*v.LocalIpv6NetworkCidr)
+ }
+
+ if v.RemoteIpv4NetworkCidr != nil {
+ objectKey := object.Key("RemoteIpv4NetworkCidr")
+ objectKey.String(*v.RemoteIpv4NetworkCidr)
+ }
+
+ if v.RemoteIpv6NetworkCidr != nil {
+ objectKey := object.Key("RemoteIpv6NetworkCidr")
+ objectKey.String(*v.RemoteIpv6NetworkCidr)
+ }
+
+ if v.VpnConnectionId != nil {
+ objectKey := object.Key("VpnConnectionId")
+ objectKey.String(*v.VpnConnectionId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentModifyVpnTunnelCertificateInput(v *ModifyVpnTunnelCertificateInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.VpnConnectionId != nil {
+ objectKey := object.Key("VpnConnectionId")
+ objectKey.String(*v.VpnConnectionId)
+ }
+
+ if v.VpnTunnelOutsideIpAddress != nil {
+ objectKey := object.Key("VpnTunnelOutsideIpAddress")
+ objectKey.String(*v.VpnTunnelOutsideIpAddress)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentModifyVpnTunnelOptionsInput(v *ModifyVpnTunnelOptionsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.TunnelOptions != nil {
+ objectKey := object.Key("TunnelOptions")
+ if err := awsEc2query_serializeDocumentModifyVpnTunnelOptionsSpecification(v.TunnelOptions, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.VpnConnectionId != nil {
+ objectKey := object.Key("VpnConnectionId")
+ objectKey.String(*v.VpnConnectionId)
+ }
+
+ if v.VpnTunnelOutsideIpAddress != nil {
+ objectKey := object.Key("VpnTunnelOutsideIpAddress")
+ objectKey.String(*v.VpnTunnelOutsideIpAddress)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentMonitorInstancesInput(v *MonitorInstancesInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.InstanceIds != nil {
+ objectKey := object.FlatKey("InstanceId")
+ if err := awsEc2query_serializeDocumentInstanceIdStringList(v.InstanceIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentMoveAddressToVpcInput(v *MoveAddressToVpcInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.PublicIp != nil {
+ objectKey := object.Key("PublicIp")
+ objectKey.String(*v.PublicIp)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentProvisionByoipCidrInput(v *ProvisionByoipCidrInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Cidr != nil {
+ objectKey := object.Key("Cidr")
+ objectKey.String(*v.Cidr)
+ }
+
+ if v.CidrAuthorizationContext != nil {
+ objectKey := object.Key("CidrAuthorizationContext")
+ if err := awsEc2query_serializeDocumentCidrAuthorizationContext(v.CidrAuthorizationContext, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.Description != nil {
+ objectKey := object.Key("Description")
+ objectKey.String(*v.Description)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.MultiRegion != nil {
+ objectKey := object.Key("MultiRegion")
+ objectKey.Boolean(*v.MultiRegion)
+ }
+
+ if v.PoolTagSpecifications != nil {
+ objectKey := object.FlatKey("PoolTagSpecification")
+ if err := awsEc2query_serializeDocumentTagSpecificationList(v.PoolTagSpecifications, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.PubliclyAdvertisable != nil {
+ objectKey := object.Key("PubliclyAdvertisable")
+ objectKey.Boolean(*v.PubliclyAdvertisable)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentPurchaseHostReservationInput(v *PurchaseHostReservationInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.ClientToken != nil {
+ objectKey := object.Key("ClientToken")
+ objectKey.String(*v.ClientToken)
+ }
+
+ if len(v.CurrencyCode) > 0 {
+ objectKey := object.Key("CurrencyCode")
+ objectKey.String(string(v.CurrencyCode))
+ }
+
+ if v.HostIdSet != nil {
+ objectKey := object.FlatKey("HostIdSet")
+ if err := awsEc2query_serializeDocumentRequestHostIdSet(v.HostIdSet, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.LimitPrice != nil {
+ objectKey := object.Key("LimitPrice")
+ objectKey.String(*v.LimitPrice)
+ }
+
+ if v.OfferingId != nil {
+ objectKey := object.Key("OfferingId")
+ objectKey.String(*v.OfferingId)
+ }
+
+ if v.TagSpecifications != nil {
+ objectKey := object.FlatKey("TagSpecification")
+ if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentPurchaseReservedInstancesOfferingInput(v *PurchaseReservedInstancesOfferingInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.InstanceCount != nil {
+ objectKey := object.Key("InstanceCount")
+ objectKey.Integer(*v.InstanceCount)
+ }
+
+ if v.LimitPrice != nil {
+ objectKey := object.Key("LimitPrice")
+ if err := awsEc2query_serializeDocumentReservedInstanceLimitPrice(v.LimitPrice, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.PurchaseTime != nil {
+ objectKey := object.Key("PurchaseTime")
+ objectKey.String(smithytime.FormatDateTime(*v.PurchaseTime))
+ }
+
+ if v.ReservedInstancesOfferingId != nil {
+ objectKey := object.Key("ReservedInstancesOfferingId")
+ objectKey.String(*v.ReservedInstancesOfferingId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentPurchaseScheduledInstancesInput(v *PurchaseScheduledInstancesInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.ClientToken != nil {
+ objectKey := object.Key("ClientToken")
+ objectKey.String(*v.ClientToken)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.PurchaseRequests != nil {
+ objectKey := object.FlatKey("PurchaseRequest")
+ if err := awsEc2query_serializeDocumentPurchaseRequestSet(v.PurchaseRequests, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentRebootInstancesInput(v *RebootInstancesInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.InstanceIds != nil {
+ objectKey := object.FlatKey("InstanceId")
+ if err := awsEc2query_serializeDocumentInstanceIdStringList(v.InstanceIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentRegisterImageInput(v *RegisterImageInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if len(v.Architecture) > 0 {
+ objectKey := object.Key("Architecture")
+ objectKey.String(string(v.Architecture))
+ }
+
+ if v.BillingProducts != nil {
+ objectKey := object.FlatKey("BillingProduct")
+ if err := awsEc2query_serializeDocumentBillingProductList(v.BillingProducts, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.BlockDeviceMappings != nil {
+ objectKey := object.FlatKey("BlockDeviceMapping")
+ if err := awsEc2query_serializeDocumentBlockDeviceMappingRequestList(v.BlockDeviceMappings, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if len(v.BootMode) > 0 {
+ objectKey := object.Key("BootMode")
+ objectKey.String(string(v.BootMode))
+ }
+
+ if v.Description != nil {
+ objectKey := object.Key("Description")
+ objectKey.String(*v.Description)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.EnaSupport != nil {
+ objectKey := object.Key("EnaSupport")
+ objectKey.Boolean(*v.EnaSupport)
+ }
+
+ if v.ImageLocation != nil {
+ objectKey := object.Key("ImageLocation")
+ objectKey.String(*v.ImageLocation)
+ }
+
+ if v.KernelId != nil {
+ objectKey := object.Key("KernelId")
+ objectKey.String(*v.KernelId)
+ }
+
+ if v.Name != nil {
+ objectKey := object.Key("Name")
+ objectKey.String(*v.Name)
+ }
+
+ if v.RamdiskId != nil {
+ objectKey := object.Key("RamdiskId")
+ objectKey.String(*v.RamdiskId)
+ }
+
+ if v.RootDeviceName != nil {
+ objectKey := object.Key("RootDeviceName")
+ objectKey.String(*v.RootDeviceName)
+ }
+
+ if v.SriovNetSupport != nil {
+ objectKey := object.Key("SriovNetSupport")
+ objectKey.String(*v.SriovNetSupport)
+ }
+
+ if v.VirtualizationType != nil {
+ objectKey := object.Key("VirtualizationType")
+ objectKey.String(*v.VirtualizationType)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentRegisterInstanceEventNotificationAttributesInput(v *RegisterInstanceEventNotificationAttributesInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.InstanceTagAttribute != nil {
+ objectKey := object.Key("InstanceTagAttribute")
+ if err := awsEc2query_serializeDocumentRegisterInstanceTagAttributeRequest(v.InstanceTagAttribute, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentRegisterTransitGatewayMulticastGroupMembersInput(v *RegisterTransitGatewayMulticastGroupMembersInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.GroupIpAddress != nil {
+ objectKey := object.Key("GroupIpAddress")
+ objectKey.String(*v.GroupIpAddress)
+ }
+
+ if v.NetworkInterfaceIds != nil {
+ objectKey := object.FlatKey("NetworkInterfaceIds")
+ if err := awsEc2query_serializeDocumentTransitGatewayNetworkInterfaceIdList(v.NetworkInterfaceIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.TransitGatewayMulticastDomainId != nil {
+ objectKey := object.Key("TransitGatewayMulticastDomainId")
+ objectKey.String(*v.TransitGatewayMulticastDomainId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentRegisterTransitGatewayMulticastGroupSourcesInput(v *RegisterTransitGatewayMulticastGroupSourcesInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.GroupIpAddress != nil {
+ objectKey := object.Key("GroupIpAddress")
+ objectKey.String(*v.GroupIpAddress)
+ }
+
+ if v.NetworkInterfaceIds != nil {
+ objectKey := object.FlatKey("NetworkInterfaceIds")
+ if err := awsEc2query_serializeDocumentTransitGatewayNetworkInterfaceIdList(v.NetworkInterfaceIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.TransitGatewayMulticastDomainId != nil {
+ objectKey := object.Key("TransitGatewayMulticastDomainId")
+ objectKey.String(*v.TransitGatewayMulticastDomainId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentRejectTransitGatewayMulticastDomainAssociationsInput(v *RejectTransitGatewayMulticastDomainAssociationsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.SubnetIds != nil {
+ objectKey := object.FlatKey("SubnetIds")
+ if err := awsEc2query_serializeDocumentValueStringList(v.SubnetIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.TransitGatewayAttachmentId != nil {
+ objectKey := object.Key("TransitGatewayAttachmentId")
+ objectKey.String(*v.TransitGatewayAttachmentId)
+ }
+
+ if v.TransitGatewayMulticastDomainId != nil {
+ objectKey := object.Key("TransitGatewayMulticastDomainId")
+ objectKey.String(*v.TransitGatewayMulticastDomainId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentRejectTransitGatewayPeeringAttachmentInput(v *RejectTransitGatewayPeeringAttachmentInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.TransitGatewayAttachmentId != nil {
+ objectKey := object.Key("TransitGatewayAttachmentId")
+ objectKey.String(*v.TransitGatewayAttachmentId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentRejectTransitGatewayVpcAttachmentInput(v *RejectTransitGatewayVpcAttachmentInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.TransitGatewayAttachmentId != nil {
+ objectKey := object.Key("TransitGatewayAttachmentId")
+ objectKey.String(*v.TransitGatewayAttachmentId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentRejectVpcEndpointConnectionsInput(v *RejectVpcEndpointConnectionsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.ServiceId != nil {
+ objectKey := object.Key("ServiceId")
+ objectKey.String(*v.ServiceId)
+ }
+
+ if v.VpcEndpointIds != nil {
+ objectKey := object.FlatKey("VpcEndpointId")
+ if err := awsEc2query_serializeDocumentVpcEndpointIdList(v.VpcEndpointIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentRejectVpcPeeringConnectionInput(v *RejectVpcPeeringConnectionInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.VpcPeeringConnectionId != nil {
+ objectKey := object.Key("VpcPeeringConnectionId")
+ objectKey.String(*v.VpcPeeringConnectionId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentReleaseAddressInput(v *ReleaseAddressInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AllocationId != nil {
+ objectKey := object.Key("AllocationId")
+ objectKey.String(*v.AllocationId)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.NetworkBorderGroup != nil {
+ objectKey := object.Key("NetworkBorderGroup")
+ objectKey.String(*v.NetworkBorderGroup)
+ }
+
+ if v.PublicIp != nil {
+ objectKey := object.Key("PublicIp")
+ objectKey.String(*v.PublicIp)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentReleaseHostsInput(v *ReleaseHostsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.HostIds != nil {
+ objectKey := object.FlatKey("HostId")
+ if err := awsEc2query_serializeDocumentRequestHostIdList(v.HostIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentReplaceIamInstanceProfileAssociationInput(v *ReplaceIamInstanceProfileAssociationInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AssociationId != nil {
+ objectKey := object.Key("AssociationId")
+ objectKey.String(*v.AssociationId)
+ }
+
+ if v.IamInstanceProfile != nil {
+ objectKey := object.Key("IamInstanceProfile")
+ if err := awsEc2query_serializeDocumentIamInstanceProfileSpecification(v.IamInstanceProfile, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentReplaceNetworkAclAssociationInput(v *ReplaceNetworkAclAssociationInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AssociationId != nil {
+ objectKey := object.Key("AssociationId")
+ objectKey.String(*v.AssociationId)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.NetworkAclId != nil {
+ objectKey := object.Key("NetworkAclId")
+ objectKey.String(*v.NetworkAclId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentReplaceNetworkAclEntryInput(v *ReplaceNetworkAclEntryInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.CidrBlock != nil {
+ objectKey := object.Key("CidrBlock")
+ objectKey.String(*v.CidrBlock)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Egress != nil {
+ objectKey := object.Key("Egress")
+ objectKey.Boolean(*v.Egress)
+ }
+
+ if v.IcmpTypeCode != nil {
+ objectKey := object.Key("Icmp")
+ if err := awsEc2query_serializeDocumentIcmpTypeCode(v.IcmpTypeCode, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.Ipv6CidrBlock != nil {
+ objectKey := object.Key("Ipv6CidrBlock")
+ objectKey.String(*v.Ipv6CidrBlock)
+ }
+
+ if v.NetworkAclId != nil {
+ objectKey := object.Key("NetworkAclId")
+ objectKey.String(*v.NetworkAclId)
+ }
+
+ if v.PortRange != nil {
+ objectKey := object.Key("PortRange")
+ if err := awsEc2query_serializeDocumentPortRange(v.PortRange, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.Protocol != nil {
+ objectKey := object.Key("Protocol")
+ objectKey.String(*v.Protocol)
+ }
+
+ if len(v.RuleAction) > 0 {
+ objectKey := object.Key("RuleAction")
+ objectKey.String(string(v.RuleAction))
+ }
+
+ if v.RuleNumber != nil {
+ objectKey := object.Key("RuleNumber")
+ objectKey.Integer(*v.RuleNumber)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentReplaceRouteInput(v *ReplaceRouteInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.CarrierGatewayId != nil {
+ objectKey := object.Key("CarrierGatewayId")
+ objectKey.String(*v.CarrierGatewayId)
+ }
+
+ if v.DestinationCidrBlock != nil {
+ objectKey := object.Key("DestinationCidrBlock")
+ objectKey.String(*v.DestinationCidrBlock)
+ }
+
+ if v.DestinationIpv6CidrBlock != nil {
+ objectKey := object.Key("DestinationIpv6CidrBlock")
+ objectKey.String(*v.DestinationIpv6CidrBlock)
+ }
+
+ if v.DestinationPrefixListId != nil {
+ objectKey := object.Key("DestinationPrefixListId")
+ objectKey.String(*v.DestinationPrefixListId)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.EgressOnlyInternetGatewayId != nil {
+ objectKey := object.Key("EgressOnlyInternetGatewayId")
+ objectKey.String(*v.EgressOnlyInternetGatewayId)
+ }
+
+ if v.GatewayId != nil {
+ objectKey := object.Key("GatewayId")
+ objectKey.String(*v.GatewayId)
+ }
+
+ if v.InstanceId != nil {
+ objectKey := object.Key("InstanceId")
+ objectKey.String(*v.InstanceId)
+ }
+
+ if v.LocalGatewayId != nil {
+ objectKey := object.Key("LocalGatewayId")
+ objectKey.String(*v.LocalGatewayId)
+ }
+
+ if v.LocalTarget != nil {
+ objectKey := object.Key("LocalTarget")
+ objectKey.Boolean(*v.LocalTarget)
+ }
+
+ if v.NatGatewayId != nil {
+ objectKey := object.Key("NatGatewayId")
+ objectKey.String(*v.NatGatewayId)
+ }
+
+ if v.NetworkInterfaceId != nil {
+ objectKey := object.Key("NetworkInterfaceId")
+ objectKey.String(*v.NetworkInterfaceId)
+ }
+
+ if v.RouteTableId != nil {
+ objectKey := object.Key("RouteTableId")
+ objectKey.String(*v.RouteTableId)
+ }
+
+ if v.TransitGatewayId != nil {
+ objectKey := object.Key("TransitGatewayId")
+ objectKey.String(*v.TransitGatewayId)
+ }
+
+ if v.VpcEndpointId != nil {
+ objectKey := object.Key("VpcEndpointId")
+ objectKey.String(*v.VpcEndpointId)
+ }
+
+ if v.VpcPeeringConnectionId != nil {
+ objectKey := object.Key("VpcPeeringConnectionId")
+ objectKey.String(*v.VpcPeeringConnectionId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentReplaceRouteTableAssociationInput(v *ReplaceRouteTableAssociationInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AssociationId != nil {
+ objectKey := object.Key("AssociationId")
+ objectKey.String(*v.AssociationId)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.RouteTableId != nil {
+ objectKey := object.Key("RouteTableId")
+ objectKey.String(*v.RouteTableId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentReplaceTransitGatewayRouteInput(v *ReplaceTransitGatewayRouteInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Blackhole != nil {
+ objectKey := object.Key("Blackhole")
+ objectKey.Boolean(*v.Blackhole)
+ }
+
+ if v.DestinationCidrBlock != nil {
+ objectKey := object.Key("DestinationCidrBlock")
+ objectKey.String(*v.DestinationCidrBlock)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.TransitGatewayAttachmentId != nil {
+ objectKey := object.Key("TransitGatewayAttachmentId")
+ objectKey.String(*v.TransitGatewayAttachmentId)
+ }
+
+ if v.TransitGatewayRouteTableId != nil {
+ objectKey := object.Key("TransitGatewayRouteTableId")
+ objectKey.String(*v.TransitGatewayRouteTableId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentReportInstanceStatusInput(v *ReportInstanceStatusInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Description != nil {
+ objectKey := object.Key("Description")
+ objectKey.String(*v.Description)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.EndTime != nil {
+ objectKey := object.Key("EndTime")
+ objectKey.String(smithytime.FormatDateTime(*v.EndTime))
+ }
+
+ if v.Instances != nil {
+ objectKey := object.FlatKey("InstanceId")
+ if err := awsEc2query_serializeDocumentInstanceIdStringList(v.Instances, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.ReasonCodes != nil {
+ objectKey := object.FlatKey("ReasonCode")
+ if err := awsEc2query_serializeDocumentReasonCodesList(v.ReasonCodes, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.StartTime != nil {
+ objectKey := object.Key("StartTime")
+ objectKey.String(smithytime.FormatDateTime(*v.StartTime))
+ }
+
+ if len(v.Status) > 0 {
+ objectKey := object.Key("Status")
+ objectKey.String(string(v.Status))
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentRequestSpotFleetInput(v *RequestSpotFleetInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.SpotFleetRequestConfig != nil {
+ objectKey := object.Key("SpotFleetRequestConfig")
+ if err := awsEc2query_serializeDocumentSpotFleetRequestConfigData(v.SpotFleetRequestConfig, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentRequestSpotInstancesInput(v *RequestSpotInstancesInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AvailabilityZoneGroup != nil {
+ objectKey := object.Key("AvailabilityZoneGroup")
+ objectKey.String(*v.AvailabilityZoneGroup)
+ }
+
+ if v.BlockDurationMinutes != nil {
+ objectKey := object.Key("BlockDurationMinutes")
+ objectKey.Integer(*v.BlockDurationMinutes)
+ }
+
+ if v.ClientToken != nil {
+ objectKey := object.Key("ClientToken")
+ objectKey.String(*v.ClientToken)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.InstanceCount != nil {
+ objectKey := object.Key("InstanceCount")
+ objectKey.Integer(*v.InstanceCount)
+ }
+
+ if len(v.InstanceInterruptionBehavior) > 0 {
+ objectKey := object.Key("InstanceInterruptionBehavior")
+ objectKey.String(string(v.InstanceInterruptionBehavior))
+ }
+
+ if v.LaunchGroup != nil {
+ objectKey := object.Key("LaunchGroup")
+ objectKey.String(*v.LaunchGroup)
+ }
+
+ if v.LaunchSpecification != nil {
+ objectKey := object.Key("LaunchSpecification")
+ if err := awsEc2query_serializeDocumentRequestSpotLaunchSpecification(v.LaunchSpecification, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.SpotPrice != nil {
+ objectKey := object.Key("SpotPrice")
+ objectKey.String(*v.SpotPrice)
+ }
+
+ if v.TagSpecifications != nil {
+ objectKey := object.FlatKey("TagSpecification")
+ if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if len(v.Type) > 0 {
+ objectKey := object.Key("Type")
+ objectKey.String(string(v.Type))
+ }
+
+ if v.ValidFrom != nil {
+ objectKey := object.Key("ValidFrom")
+ objectKey.String(smithytime.FormatDateTime(*v.ValidFrom))
+ }
+
+ if v.ValidUntil != nil {
+ objectKey := object.Key("ValidUntil")
+ objectKey.String(smithytime.FormatDateTime(*v.ValidUntil))
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentResetAddressAttributeInput(v *ResetAddressAttributeInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AllocationId != nil {
+ objectKey := object.Key("AllocationId")
+ objectKey.String(*v.AllocationId)
+ }
+
+ if len(v.Attribute) > 0 {
+ objectKey := object.Key("Attribute")
+ objectKey.String(string(v.Attribute))
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentResetEbsDefaultKmsKeyIdInput(v *ResetEbsDefaultKmsKeyIdInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentResetFpgaImageAttributeInput(v *ResetFpgaImageAttributeInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if len(v.Attribute) > 0 {
+ objectKey := object.Key("Attribute")
+ objectKey.String(string(v.Attribute))
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.FpgaImageId != nil {
+ objectKey := object.Key("FpgaImageId")
+ objectKey.String(*v.FpgaImageId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentResetImageAttributeInput(v *ResetImageAttributeInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if len(v.Attribute) > 0 {
+ objectKey := object.Key("Attribute")
+ objectKey.String(string(v.Attribute))
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.ImageId != nil {
+ objectKey := object.Key("ImageId")
+ objectKey.String(*v.ImageId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentResetInstanceAttributeInput(v *ResetInstanceAttributeInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if len(v.Attribute) > 0 {
+ objectKey := object.Key("Attribute")
+ objectKey.String(string(v.Attribute))
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.InstanceId != nil {
+ objectKey := object.Key("InstanceId")
+ objectKey.String(*v.InstanceId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentResetNetworkInterfaceAttributeInput(v *ResetNetworkInterfaceAttributeInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.NetworkInterfaceId != nil {
+ objectKey := object.Key("NetworkInterfaceId")
+ objectKey.String(*v.NetworkInterfaceId)
+ }
+
+ if v.SourceDestCheck != nil {
+ objectKey := object.Key("SourceDestCheck")
+ objectKey.String(*v.SourceDestCheck)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentResetSnapshotAttributeInput(v *ResetSnapshotAttributeInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if len(v.Attribute) > 0 {
+ objectKey := object.Key("Attribute")
+ objectKey.String(string(v.Attribute))
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.SnapshotId != nil {
+ objectKey := object.Key("SnapshotId")
+ objectKey.String(*v.SnapshotId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentRestoreAddressToClassicInput(v *RestoreAddressToClassicInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.PublicIp != nil {
+ objectKey := object.Key("PublicIp")
+ objectKey.String(*v.PublicIp)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentRestoreManagedPrefixListVersionInput(v *RestoreManagedPrefixListVersionInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.CurrentVersion != nil {
+ objectKey := object.Key("CurrentVersion")
+ objectKey.Long(*v.CurrentVersion)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.PrefixListId != nil {
+ objectKey := object.Key("PrefixListId")
+ objectKey.String(*v.PrefixListId)
+ }
+
+ if v.PreviousVersion != nil {
+ objectKey := object.Key("PreviousVersion")
+ objectKey.Long(*v.PreviousVersion)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentRevokeClientVpnIngressInput(v *RevokeClientVpnIngressInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AccessGroupId != nil {
+ objectKey := object.Key("AccessGroupId")
+ objectKey.String(*v.AccessGroupId)
+ }
+
+ if v.ClientVpnEndpointId != nil {
+ objectKey := object.Key("ClientVpnEndpointId")
+ objectKey.String(*v.ClientVpnEndpointId)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.RevokeAllGroups != nil {
+ objectKey := object.Key("RevokeAllGroups")
+ objectKey.Boolean(*v.RevokeAllGroups)
+ }
+
+ if v.TargetNetworkCidr != nil {
+ objectKey := object.Key("TargetNetworkCidr")
+ objectKey.String(*v.TargetNetworkCidr)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentRevokeSecurityGroupEgressInput(v *RevokeSecurityGroupEgressInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.CidrIp != nil {
+ objectKey := object.Key("CidrIp")
+ objectKey.String(*v.CidrIp)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.FromPort != nil {
+ objectKey := object.Key("FromPort")
+ objectKey.Integer(*v.FromPort)
+ }
+
+ if v.GroupId != nil {
+ objectKey := object.Key("GroupId")
+ objectKey.String(*v.GroupId)
+ }
+
+ if v.IpPermissions != nil {
+ objectKey := object.FlatKey("IpPermissions")
+ if err := awsEc2query_serializeDocumentIpPermissionList(v.IpPermissions, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.IpProtocol != nil {
+ objectKey := object.Key("IpProtocol")
+ objectKey.String(*v.IpProtocol)
+ }
+
+ if v.SecurityGroupRuleIds != nil {
+ objectKey := object.FlatKey("SecurityGroupRuleId")
+ if err := awsEc2query_serializeDocumentSecurityGroupRuleIdList(v.SecurityGroupRuleIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.SourceSecurityGroupName != nil {
+ objectKey := object.Key("SourceSecurityGroupName")
+ objectKey.String(*v.SourceSecurityGroupName)
+ }
+
+ if v.SourceSecurityGroupOwnerId != nil {
+ objectKey := object.Key("SourceSecurityGroupOwnerId")
+ objectKey.String(*v.SourceSecurityGroupOwnerId)
+ }
+
+ if v.ToPort != nil {
+ objectKey := object.Key("ToPort")
+ objectKey.Integer(*v.ToPort)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentRevokeSecurityGroupIngressInput(v *RevokeSecurityGroupIngressInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.CidrIp != nil {
+ objectKey := object.Key("CidrIp")
+ objectKey.String(*v.CidrIp)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.FromPort != nil {
+ objectKey := object.Key("FromPort")
+ objectKey.Integer(*v.FromPort)
+ }
+
+ if v.GroupId != nil {
+ objectKey := object.Key("GroupId")
+ objectKey.String(*v.GroupId)
+ }
+
+ if v.GroupName != nil {
+ objectKey := object.Key("GroupName")
+ objectKey.String(*v.GroupName)
+ }
+
+ if v.IpPermissions != nil {
+ objectKey := object.FlatKey("IpPermissions")
+ if err := awsEc2query_serializeDocumentIpPermissionList(v.IpPermissions, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.IpProtocol != nil {
+ objectKey := object.Key("IpProtocol")
+ objectKey.String(*v.IpProtocol)
+ }
+
+ if v.SecurityGroupRuleIds != nil {
+ objectKey := object.FlatKey("SecurityGroupRuleId")
+ if err := awsEc2query_serializeDocumentSecurityGroupRuleIdList(v.SecurityGroupRuleIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.SourceSecurityGroupName != nil {
+ objectKey := object.Key("SourceSecurityGroupName")
+ objectKey.String(*v.SourceSecurityGroupName)
+ }
+
+ if v.SourceSecurityGroupOwnerId != nil {
+ objectKey := object.Key("SourceSecurityGroupOwnerId")
+ objectKey.String(*v.SourceSecurityGroupOwnerId)
+ }
+
+ if v.ToPort != nil {
+ objectKey := object.Key("ToPort")
+ objectKey.Integer(*v.ToPort)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentRunInstancesInput(v *RunInstancesInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AdditionalInfo != nil {
+ objectKey := object.Key("AdditionalInfo")
+ objectKey.String(*v.AdditionalInfo)
+ }
+
+ if v.BlockDeviceMappings != nil {
+ objectKey := object.FlatKey("BlockDeviceMapping")
+ if err := awsEc2query_serializeDocumentBlockDeviceMappingRequestList(v.BlockDeviceMappings, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.CapacityReservationSpecification != nil {
+ objectKey := object.Key("CapacityReservationSpecification")
+ if err := awsEc2query_serializeDocumentCapacityReservationSpecification(v.CapacityReservationSpecification, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.ClientToken != nil {
+ objectKey := object.Key("ClientToken")
+ objectKey.String(*v.ClientToken)
+ }
+
+ if v.CpuOptions != nil {
+ objectKey := object.Key("CpuOptions")
+ if err := awsEc2query_serializeDocumentCpuOptionsRequest(v.CpuOptions, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.CreditSpecification != nil {
+ objectKey := object.Key("CreditSpecification")
+ if err := awsEc2query_serializeDocumentCreditSpecificationRequest(v.CreditSpecification, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.DisableApiTermination != nil {
+ objectKey := object.Key("DisableApiTermination")
+ objectKey.Boolean(*v.DisableApiTermination)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.EbsOptimized != nil {
+ objectKey := object.Key("EbsOptimized")
+ objectKey.Boolean(*v.EbsOptimized)
+ }
+
+ if v.ElasticGpuSpecification != nil {
+ objectKey := object.FlatKey("ElasticGpuSpecification")
+ if err := awsEc2query_serializeDocumentElasticGpuSpecifications(v.ElasticGpuSpecification, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.ElasticInferenceAccelerators != nil {
+ objectKey := object.FlatKey("ElasticInferenceAccelerator")
+ if err := awsEc2query_serializeDocumentElasticInferenceAccelerators(v.ElasticInferenceAccelerators, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.EnclaveOptions != nil {
+ objectKey := object.Key("EnclaveOptions")
+ if err := awsEc2query_serializeDocumentEnclaveOptionsRequest(v.EnclaveOptions, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.HibernationOptions != nil {
+ objectKey := object.Key("HibernationOptions")
+ if err := awsEc2query_serializeDocumentHibernationOptionsRequest(v.HibernationOptions, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.IamInstanceProfile != nil {
+ objectKey := object.Key("IamInstanceProfile")
+ if err := awsEc2query_serializeDocumentIamInstanceProfileSpecification(v.IamInstanceProfile, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.ImageId != nil {
+ objectKey := object.Key("ImageId")
+ objectKey.String(*v.ImageId)
+ }
+
+ if len(v.InstanceInitiatedShutdownBehavior) > 0 {
+ objectKey := object.Key("InstanceInitiatedShutdownBehavior")
+ objectKey.String(string(v.InstanceInitiatedShutdownBehavior))
+ }
+
+ if v.InstanceMarketOptions != nil {
+ objectKey := object.Key("InstanceMarketOptions")
+ if err := awsEc2query_serializeDocumentInstanceMarketOptionsRequest(v.InstanceMarketOptions, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if len(v.InstanceType) > 0 {
+ objectKey := object.Key("InstanceType")
+ objectKey.String(string(v.InstanceType))
+ }
+
+ if v.Ipv6AddressCount != nil {
+ objectKey := object.Key("Ipv6AddressCount")
+ objectKey.Integer(*v.Ipv6AddressCount)
+ }
+
+ if v.Ipv6Addresses != nil {
+ objectKey := object.FlatKey("Ipv6Address")
+ if err := awsEc2query_serializeDocumentInstanceIpv6AddressList(v.Ipv6Addresses, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.KernelId != nil {
+ objectKey := object.Key("KernelId")
+ objectKey.String(*v.KernelId)
+ }
+
+ if v.KeyName != nil {
+ objectKey := object.Key("KeyName")
+ objectKey.String(*v.KeyName)
+ }
+
+ if v.LaunchTemplate != nil {
+ objectKey := object.Key("LaunchTemplate")
+ if err := awsEc2query_serializeDocumentLaunchTemplateSpecification(v.LaunchTemplate, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.LicenseSpecifications != nil {
+ objectKey := object.FlatKey("LicenseSpecification")
+ if err := awsEc2query_serializeDocumentLicenseSpecificationListRequest(v.LicenseSpecifications, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxCount != nil {
+ objectKey := object.Key("MaxCount")
+ objectKey.Integer(*v.MaxCount)
+ }
+
+ if v.MetadataOptions != nil {
+ objectKey := object.Key("MetadataOptions")
+ if err := awsEc2query_serializeDocumentInstanceMetadataOptionsRequest(v.MetadataOptions, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MinCount != nil {
+ objectKey := object.Key("MinCount")
+ objectKey.Integer(*v.MinCount)
+ }
+
+ if v.Monitoring != nil {
+ objectKey := object.Key("Monitoring")
+ if err := awsEc2query_serializeDocumentRunInstancesMonitoringEnabled(v.Monitoring, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.NetworkInterfaces != nil {
+ objectKey := object.FlatKey("NetworkInterface")
+ if err := awsEc2query_serializeDocumentInstanceNetworkInterfaceSpecificationList(v.NetworkInterfaces, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.Placement != nil {
+ objectKey := object.Key("Placement")
+ if err := awsEc2query_serializeDocumentPlacement(v.Placement, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.PrivateIpAddress != nil {
+ objectKey := object.Key("PrivateIpAddress")
+ objectKey.String(*v.PrivateIpAddress)
+ }
+
+ if v.RamdiskId != nil {
+ objectKey := object.Key("RamdiskId")
+ objectKey.String(*v.RamdiskId)
+ }
+
+ if v.SecurityGroupIds != nil {
+ objectKey := object.FlatKey("SecurityGroupId")
+ if err := awsEc2query_serializeDocumentSecurityGroupIdStringList(v.SecurityGroupIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.SecurityGroups != nil {
+ objectKey := object.FlatKey("SecurityGroup")
+ if err := awsEc2query_serializeDocumentSecurityGroupStringList(v.SecurityGroups, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.SubnetId != nil {
+ objectKey := object.Key("SubnetId")
+ objectKey.String(*v.SubnetId)
+ }
+
+ if v.TagSpecifications != nil {
+ objectKey := object.FlatKey("TagSpecification")
+ if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.UserData != nil {
+ objectKey := object.Key("UserData")
+ objectKey.String(*v.UserData)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentRunScheduledInstancesInput(v *RunScheduledInstancesInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.ClientToken != nil {
+ objectKey := object.Key("ClientToken")
+ objectKey.String(*v.ClientToken)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.InstanceCount != nil {
+ objectKey := object.Key("InstanceCount")
+ objectKey.Integer(*v.InstanceCount)
+ }
+
+ if v.LaunchSpecification != nil {
+ objectKey := object.Key("LaunchSpecification")
+ if err := awsEc2query_serializeDocumentScheduledInstancesLaunchSpecification(v.LaunchSpecification, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.ScheduledInstanceId != nil {
+ objectKey := object.Key("ScheduledInstanceId")
+ objectKey.String(*v.ScheduledInstanceId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentSearchLocalGatewayRoutesInput(v *SearchLocalGatewayRoutesInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.LocalGatewayRouteTableId != nil {
+ objectKey := object.Key("LocalGatewayRouteTableId")
+ objectKey.String(*v.LocalGatewayRouteTableId)
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentSearchTransitGatewayMulticastGroupsInput(v *SearchTransitGatewayMulticastGroupsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ objectKey := object.Key("NextToken")
+ objectKey.String(*v.NextToken)
+ }
+
+ if v.TransitGatewayMulticastDomainId != nil {
+ objectKey := object.Key("TransitGatewayMulticastDomainId")
+ objectKey.String(*v.TransitGatewayMulticastDomainId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentSearchTransitGatewayRoutesInput(v *SearchTransitGatewayRoutesInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Filters != nil {
+ objectKey := object.FlatKey("Filter")
+ if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxResults != nil {
+ objectKey := object.Key("MaxResults")
+ objectKey.Integer(*v.MaxResults)
+ }
+
+ if v.TransitGatewayRouteTableId != nil {
+ objectKey := object.Key("TransitGatewayRouteTableId")
+ objectKey.String(*v.TransitGatewayRouteTableId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentSendDiagnosticInterruptInput(v *SendDiagnosticInterruptInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.InstanceId != nil {
+ objectKey := object.Key("InstanceId")
+ objectKey.String(*v.InstanceId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentStartInstancesInput(v *StartInstancesInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AdditionalInfo != nil {
+ objectKey := object.Key("AdditionalInfo")
+ objectKey.String(*v.AdditionalInfo)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.InstanceIds != nil {
+ objectKey := object.FlatKey("InstanceId")
+ if err := awsEc2query_serializeDocumentInstanceIdStringList(v.InstanceIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentStartNetworkInsightsAnalysisInput(v *StartNetworkInsightsAnalysisInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.ClientToken != nil {
+ objectKey := object.Key("ClientToken")
+ objectKey.String(*v.ClientToken)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.FilterInArns != nil {
+ objectKey := object.FlatKey("FilterInArn")
+ if err := awsEc2query_serializeDocumentArnList(v.FilterInArns, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.NetworkInsightsPathId != nil {
+ objectKey := object.Key("NetworkInsightsPathId")
+ objectKey.String(*v.NetworkInsightsPathId)
+ }
+
+ if v.TagSpecifications != nil {
+ objectKey := object.FlatKey("TagSpecification")
+ if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentStartVpcEndpointServicePrivateDnsVerificationInput(v *StartVpcEndpointServicePrivateDnsVerificationInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.ServiceId != nil {
+ objectKey := object.Key("ServiceId")
+ objectKey.String(*v.ServiceId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentStopInstancesInput(v *StopInstancesInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Force != nil {
+ objectKey := object.Key("Force")
+ objectKey.Boolean(*v.Force)
+ }
+
+ if v.Hibernate != nil {
+ objectKey := object.Key("Hibernate")
+ objectKey.Boolean(*v.Hibernate)
+ }
+
+ if v.InstanceIds != nil {
+ objectKey := object.FlatKey("InstanceId")
+ if err := awsEc2query_serializeDocumentInstanceIdStringList(v.InstanceIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentTerminateClientVpnConnectionsInput(v *TerminateClientVpnConnectionsInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.ClientVpnEndpointId != nil {
+ objectKey := object.Key("ClientVpnEndpointId")
+ objectKey.String(*v.ClientVpnEndpointId)
+ }
+
+ if v.ConnectionId != nil {
+ objectKey := object.Key("ConnectionId")
+ objectKey.String(*v.ConnectionId)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.Username != nil {
+ objectKey := object.Key("Username")
+ objectKey.String(*v.Username)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentTerminateInstancesInput(v *TerminateInstancesInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.InstanceIds != nil {
+ objectKey := object.FlatKey("InstanceId")
+ if err := awsEc2query_serializeDocumentInstanceIdStringList(v.InstanceIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentUnassignIpv6AddressesInput(v *UnassignIpv6AddressesInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Ipv6Addresses != nil {
+ objectKey := object.FlatKey("Ipv6Addresses")
+ if err := awsEc2query_serializeDocumentIpv6AddressList(v.Ipv6Addresses, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.Ipv6Prefixes != nil {
+ objectKey := object.FlatKey("Ipv6Prefix")
+ if err := awsEc2query_serializeDocumentIpPrefixList(v.Ipv6Prefixes, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.NetworkInterfaceId != nil {
+ objectKey := object.Key("NetworkInterfaceId")
+ objectKey.String(*v.NetworkInterfaceId)
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentUnassignPrivateIpAddressesInput(v *UnassignPrivateIpAddressesInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Ipv4Prefixes != nil {
+ objectKey := object.FlatKey("Ipv4Prefix")
+ if err := awsEc2query_serializeDocumentIpPrefixList(v.Ipv4Prefixes, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.NetworkInterfaceId != nil {
+ objectKey := object.Key("NetworkInterfaceId")
+ objectKey.String(*v.NetworkInterfaceId)
+ }
+
+ if v.PrivateIpAddresses != nil {
+ objectKey := object.FlatKey("PrivateIpAddress")
+ if err := awsEc2query_serializeDocumentPrivateIpAddressStringList(v.PrivateIpAddresses, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentUnmonitorInstancesInput(v *UnmonitorInstancesInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.InstanceIds != nil {
+ objectKey := object.FlatKey("InstanceId")
+ if err := awsEc2query_serializeDocumentInstanceIdStringList(v.InstanceIds, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentUpdateSecurityGroupRuleDescriptionsEgressInput(v *UpdateSecurityGroupRuleDescriptionsEgressInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.GroupId != nil {
+ objectKey := object.Key("GroupId")
+ objectKey.String(*v.GroupId)
+ }
+
+ if v.GroupName != nil {
+ objectKey := object.Key("GroupName")
+ objectKey.String(*v.GroupName)
+ }
+
+ if v.IpPermissions != nil {
+ objectKey := object.FlatKey("IpPermissions")
+ if err := awsEc2query_serializeDocumentIpPermissionList(v.IpPermissions, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.SecurityGroupRuleDescriptions != nil {
+ objectKey := object.FlatKey("SecurityGroupRuleDescription")
+ if err := awsEc2query_serializeDocumentSecurityGroupRuleDescriptionList(v.SecurityGroupRuleDescriptions, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentUpdateSecurityGroupRuleDescriptionsIngressInput(v *UpdateSecurityGroupRuleDescriptionsIngressInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ if v.GroupId != nil {
+ objectKey := object.Key("GroupId")
+ objectKey.String(*v.GroupId)
+ }
+
+ if v.GroupName != nil {
+ objectKey := object.Key("GroupName")
+ objectKey.String(*v.GroupName)
+ }
+
+ if v.IpPermissions != nil {
+ objectKey := object.FlatKey("IpPermissions")
+ if err := awsEc2query_serializeDocumentIpPermissionList(v.IpPermissions, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.SecurityGroupRuleDescriptions != nil {
+ objectKey := object.FlatKey("SecurityGroupRuleDescription")
+ if err := awsEc2query_serializeDocumentSecurityGroupRuleDescriptionList(v.SecurityGroupRuleDescriptions, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsEc2query_serializeOpDocumentWithdrawByoipCidrInput(v *WithdrawByoipCidrInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Cidr != nil {
+ objectKey := object.Key("Cidr")
+ objectKey.String(*v.Cidr)
+ }
+
+ if v.DryRun != nil {
+ objectKey := object.Key("DryRun")
+ objectKey.Boolean(*v.DryRun)
+ }
+
+ return nil
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/types/enums.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/types/enums.go
new file mode 100644
index 00000000..0cbed3c5
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/types/enums.go
@@ -0,0 +1,5718 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package types
+
+type AccountAttributeName string
+
+// Enum values for AccountAttributeName
+const (
+ AccountAttributeNameSupportedPlatforms AccountAttributeName = "supported-platforms"
+ AccountAttributeNameDefaultVpc AccountAttributeName = "default-vpc"
+)
+
+// Values returns all known values for AccountAttributeName. 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 (AccountAttributeName) Values() []AccountAttributeName {
+ return []AccountAttributeName{
+ "supported-platforms",
+ "default-vpc",
+ }
+}
+
+type ActivityStatus string
+
+// Enum values for ActivityStatus
+const (
+ ActivityStatusError ActivityStatus = "error"
+ ActivityStatusPendingFulfillment ActivityStatus = "pending_fulfillment"
+ ActivityStatusPendingTermination ActivityStatus = "pending_termination"
+ ActivityStatusFulfilled ActivityStatus = "fulfilled"
+)
+
+// Values returns all known values for ActivityStatus. 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 (ActivityStatus) Values() []ActivityStatus {
+ return []ActivityStatus{
+ "error",
+ "pending_fulfillment",
+ "pending_termination",
+ "fulfilled",
+ }
+}
+
+type AddressAttributeName string
+
+// Enum values for AddressAttributeName
+const (
+ AddressAttributeNameDomainName AddressAttributeName = "domain-name"
+)
+
+// Values returns all known values for AddressAttributeName. 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 (AddressAttributeName) Values() []AddressAttributeName {
+ return []AddressAttributeName{
+ "domain-name",
+ }
+}
+
+type Affinity string
+
+// Enum values for Affinity
+const (
+ AffinityDefault Affinity = "default"
+ AffinityHost Affinity = "host"
+)
+
+// Values returns all known values for Affinity. 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 (Affinity) Values() []Affinity {
+ return []Affinity{
+ "default",
+ "host",
+ }
+}
+
+type AllocationState string
+
+// Enum values for AllocationState
+const (
+ AllocationStateAvailable AllocationState = "available"
+ AllocationStateUnderAssessment AllocationState = "under-assessment"
+ AllocationStatePermanentFailure AllocationState = "permanent-failure"
+ AllocationStateReleased AllocationState = "released"
+ AllocationStateReleasedPermanentFailure AllocationState = "released-permanent-failure"
+ AllocationStatePending AllocationState = "pending"
+)
+
+// Values returns all known values for AllocationState. 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 (AllocationState) Values() []AllocationState {
+ return []AllocationState{
+ "available",
+ "under-assessment",
+ "permanent-failure",
+ "released",
+ "released-permanent-failure",
+ "pending",
+ }
+}
+
+type AllocationStrategy string
+
+// Enum values for AllocationStrategy
+const (
+ AllocationStrategyLowestPrice AllocationStrategy = "lowestPrice"
+ AllocationStrategyDiversified AllocationStrategy = "diversified"
+ AllocationStrategyCapacityOptimized AllocationStrategy = "capacityOptimized"
+ AllocationStrategyCapacityOptimizedPrioritized AllocationStrategy = "capacityOptimizedPrioritized"
+)
+
+// Values returns all known values for AllocationStrategy. 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 (AllocationStrategy) Values() []AllocationStrategy {
+ return []AllocationStrategy{
+ "lowestPrice",
+ "diversified",
+ "capacityOptimized",
+ "capacityOptimizedPrioritized",
+ }
+}
+
+type AllowsMultipleInstanceTypes string
+
+// Enum values for AllowsMultipleInstanceTypes
+const (
+ AllowsMultipleInstanceTypesOn AllowsMultipleInstanceTypes = "on"
+ AllowsMultipleInstanceTypesOff AllowsMultipleInstanceTypes = "off"
+)
+
+// Values returns all known values for AllowsMultipleInstanceTypes. 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 (AllowsMultipleInstanceTypes) Values() []AllowsMultipleInstanceTypes {
+ return []AllowsMultipleInstanceTypes{
+ "on",
+ "off",
+ }
+}
+
+type AnalysisStatus string
+
+// Enum values for AnalysisStatus
+const (
+ AnalysisStatusRunning AnalysisStatus = "running"
+ AnalysisStatusSucceeded AnalysisStatus = "succeeded"
+ AnalysisStatusFailed AnalysisStatus = "failed"
+)
+
+// Values returns all known values for AnalysisStatus. 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 (AnalysisStatus) Values() []AnalysisStatus {
+ return []AnalysisStatus{
+ "running",
+ "succeeded",
+ "failed",
+ }
+}
+
+type ApplianceModeSupportValue string
+
+// Enum values for ApplianceModeSupportValue
+const (
+ ApplianceModeSupportValueEnable ApplianceModeSupportValue = "enable"
+ ApplianceModeSupportValueDisable ApplianceModeSupportValue = "disable"
+)
+
+// Values returns all known values for ApplianceModeSupportValue. 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 (ApplianceModeSupportValue) Values() []ApplianceModeSupportValue {
+ return []ApplianceModeSupportValue{
+ "enable",
+ "disable",
+ }
+}
+
+type ArchitectureType string
+
+// Enum values for ArchitectureType
+const (
+ ArchitectureTypeI386 ArchitectureType = "i386"
+ ArchitectureTypeX8664 ArchitectureType = "x86_64"
+ ArchitectureTypeArm64 ArchitectureType = "arm64"
+)
+
+// Values returns all known values for ArchitectureType. 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 (ArchitectureType) Values() []ArchitectureType {
+ return []ArchitectureType{
+ "i386",
+ "x86_64",
+ "arm64",
+ }
+}
+
+type ArchitectureValues string
+
+// Enum values for ArchitectureValues
+const (
+ ArchitectureValuesI386 ArchitectureValues = "i386"
+ ArchitectureValuesX8664 ArchitectureValues = "x86_64"
+ ArchitectureValuesArm64 ArchitectureValues = "arm64"
+ ArchitectureValuesX8664Mac ArchitectureValues = "x86_64_mac"
+)
+
+// Values returns all known values for ArchitectureValues. 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 (ArchitectureValues) Values() []ArchitectureValues {
+ return []ArchitectureValues{
+ "i386",
+ "x86_64",
+ "arm64",
+ "x86_64_mac",
+ }
+}
+
+type AssociatedNetworkType string
+
+// Enum values for AssociatedNetworkType
+const (
+ AssociatedNetworkTypeVpc AssociatedNetworkType = "vpc"
+)
+
+// Values returns all known values for AssociatedNetworkType. 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 (AssociatedNetworkType) Values() []AssociatedNetworkType {
+ return []AssociatedNetworkType{
+ "vpc",
+ }
+}
+
+type AssociationStatusCode string
+
+// Enum values for AssociationStatusCode
+const (
+ AssociationStatusCodeAssociating AssociationStatusCode = "associating"
+ AssociationStatusCodeAssociated AssociationStatusCode = "associated"
+ AssociationStatusCodeAssociationFailed AssociationStatusCode = "association-failed"
+ AssociationStatusCodeDisassociating AssociationStatusCode = "disassociating"
+ AssociationStatusCodeDisassociated AssociationStatusCode = "disassociated"
+)
+
+// Values returns all known values for AssociationStatusCode. 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 (AssociationStatusCode) Values() []AssociationStatusCode {
+ return []AssociationStatusCode{
+ "associating",
+ "associated",
+ "association-failed",
+ "disassociating",
+ "disassociated",
+ }
+}
+
+type AttachmentStatus string
+
+// Enum values for AttachmentStatus
+const (
+ AttachmentStatusAttaching AttachmentStatus = "attaching"
+ AttachmentStatusAttached AttachmentStatus = "attached"
+ AttachmentStatusDetaching AttachmentStatus = "detaching"
+ AttachmentStatusDetached AttachmentStatus = "detached"
+)
+
+// Values returns all known values for AttachmentStatus. 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 (AttachmentStatus) Values() []AttachmentStatus {
+ return []AttachmentStatus{
+ "attaching",
+ "attached",
+ "detaching",
+ "detached",
+ }
+}
+
+type AutoAcceptSharedAssociationsValue string
+
+// Enum values for AutoAcceptSharedAssociationsValue
+const (
+ AutoAcceptSharedAssociationsValueEnable AutoAcceptSharedAssociationsValue = "enable"
+ AutoAcceptSharedAssociationsValueDisable AutoAcceptSharedAssociationsValue = "disable"
+)
+
+// Values returns all known values for AutoAcceptSharedAssociationsValue. 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 (AutoAcceptSharedAssociationsValue) Values() []AutoAcceptSharedAssociationsValue {
+ return []AutoAcceptSharedAssociationsValue{
+ "enable",
+ "disable",
+ }
+}
+
+type AutoAcceptSharedAttachmentsValue string
+
+// Enum values for AutoAcceptSharedAttachmentsValue
+const (
+ AutoAcceptSharedAttachmentsValueEnable AutoAcceptSharedAttachmentsValue = "enable"
+ AutoAcceptSharedAttachmentsValueDisable AutoAcceptSharedAttachmentsValue = "disable"
+)
+
+// Values returns all known values for AutoAcceptSharedAttachmentsValue. 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 (AutoAcceptSharedAttachmentsValue) Values() []AutoAcceptSharedAttachmentsValue {
+ return []AutoAcceptSharedAttachmentsValue{
+ "enable",
+ "disable",
+ }
+}
+
+type AutoPlacement string
+
+// Enum values for AutoPlacement
+const (
+ AutoPlacementOn AutoPlacement = "on"
+ AutoPlacementOff AutoPlacement = "off"
+)
+
+// Values returns all known values for AutoPlacement. 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 (AutoPlacement) Values() []AutoPlacement {
+ return []AutoPlacement{
+ "on",
+ "off",
+ }
+}
+
+type AvailabilityZoneOptInStatus string
+
+// Enum values for AvailabilityZoneOptInStatus
+const (
+ AvailabilityZoneOptInStatusOptInNotRequired AvailabilityZoneOptInStatus = "opt-in-not-required"
+ AvailabilityZoneOptInStatusOptedIn AvailabilityZoneOptInStatus = "opted-in"
+ AvailabilityZoneOptInStatusNotOptedIn AvailabilityZoneOptInStatus = "not-opted-in"
+)
+
+// Values returns all known values for AvailabilityZoneOptInStatus. 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 (AvailabilityZoneOptInStatus) Values() []AvailabilityZoneOptInStatus {
+ return []AvailabilityZoneOptInStatus{
+ "opt-in-not-required",
+ "opted-in",
+ "not-opted-in",
+ }
+}
+
+type AvailabilityZoneState string
+
+// Enum values for AvailabilityZoneState
+const (
+ AvailabilityZoneStateAvailable AvailabilityZoneState = "available"
+ AvailabilityZoneStateInformation AvailabilityZoneState = "information"
+ AvailabilityZoneStateImpaired AvailabilityZoneState = "impaired"
+ AvailabilityZoneStateUnavailable AvailabilityZoneState = "unavailable"
+)
+
+// Values returns all known values for AvailabilityZoneState. 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 (AvailabilityZoneState) Values() []AvailabilityZoneState {
+ return []AvailabilityZoneState{
+ "available",
+ "information",
+ "impaired",
+ "unavailable",
+ }
+}
+
+type BatchState string
+
+// Enum values for BatchState
+const (
+ BatchStateSubmitted BatchState = "submitted"
+ BatchStateActive BatchState = "active"
+ BatchStateCancelled BatchState = "cancelled"
+ BatchStateFailed BatchState = "failed"
+ BatchStateCancelledRunning BatchState = "cancelled_running"
+ BatchStateCancelledTerminatingInstances BatchState = "cancelled_terminating"
+ BatchStateModifying BatchState = "modifying"
+)
+
+// Values returns all known values for BatchState. 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 (BatchState) Values() []BatchState {
+ return []BatchState{
+ "submitted",
+ "active",
+ "cancelled",
+ "failed",
+ "cancelled_running",
+ "cancelled_terminating",
+ "modifying",
+ }
+}
+
+type BgpStatus string
+
+// Enum values for BgpStatus
+const (
+ BgpStatusUp BgpStatus = "up"
+ BgpStatusDown BgpStatus = "down"
+)
+
+// Values returns all known values for BgpStatus. 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 (BgpStatus) Values() []BgpStatus {
+ return []BgpStatus{
+ "up",
+ "down",
+ }
+}
+
+type BootModeType string
+
+// Enum values for BootModeType
+const (
+ BootModeTypeLegacyBios BootModeType = "legacy-bios"
+ BootModeTypeUefi BootModeType = "uefi"
+)
+
+// Values returns all known values for BootModeType. 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 (BootModeType) Values() []BootModeType {
+ return []BootModeType{
+ "legacy-bios",
+ "uefi",
+ }
+}
+
+type BootModeValues string
+
+// Enum values for BootModeValues
+const (
+ BootModeValuesLegacyBios BootModeValues = "legacy-bios"
+ BootModeValuesUefi BootModeValues = "uefi"
+)
+
+// Values returns all known values for BootModeValues. 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 (BootModeValues) Values() []BootModeValues {
+ return []BootModeValues{
+ "legacy-bios",
+ "uefi",
+ }
+}
+
+type BundleTaskState string
+
+// Enum values for BundleTaskState
+const (
+ BundleTaskStatePending BundleTaskState = "pending"
+ BundleTaskStateWaitingForShutdown BundleTaskState = "waiting-for-shutdown"
+ BundleTaskStateBundling BundleTaskState = "bundling"
+ BundleTaskStateStoring BundleTaskState = "storing"
+ BundleTaskStateCancelling BundleTaskState = "cancelling"
+ BundleTaskStateComplete BundleTaskState = "complete"
+ BundleTaskStateFailed BundleTaskState = "failed"
+)
+
+// Values returns all known values for BundleTaskState. 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 (BundleTaskState) Values() []BundleTaskState {
+ return []BundleTaskState{
+ "pending",
+ "waiting-for-shutdown",
+ "bundling",
+ "storing",
+ "cancelling",
+ "complete",
+ "failed",
+ }
+}
+
+type ByoipCidrState string
+
+// Enum values for ByoipCidrState
+const (
+ ByoipCidrStateAdvertised ByoipCidrState = "advertised"
+ ByoipCidrStateDeprovisioned ByoipCidrState = "deprovisioned"
+ ByoipCidrStateFailedDeprovision ByoipCidrState = "failed-deprovision"
+ ByoipCidrStateFailedProvision ByoipCidrState = "failed-provision"
+ ByoipCidrStatePendingDeprovision ByoipCidrState = "pending-deprovision"
+ ByoipCidrStatePendingProvision ByoipCidrState = "pending-provision"
+ ByoipCidrStateProvisioned ByoipCidrState = "provisioned"
+ ByoipCidrStateProvisionedNotPubliclyAdvertisable ByoipCidrState = "provisioned-not-publicly-advertisable"
+)
+
+// Values returns all known values for ByoipCidrState. 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 (ByoipCidrState) Values() []ByoipCidrState {
+ return []ByoipCidrState{
+ "advertised",
+ "deprovisioned",
+ "failed-deprovision",
+ "failed-provision",
+ "pending-deprovision",
+ "pending-provision",
+ "provisioned",
+ "provisioned-not-publicly-advertisable",
+ }
+}
+
+type CancelBatchErrorCode string
+
+// Enum values for CancelBatchErrorCode
+const (
+ CancelBatchErrorCodeFleetRequestIdDoesNotExist CancelBatchErrorCode = "fleetRequestIdDoesNotExist"
+ CancelBatchErrorCodeFleetRequestIdMalformed CancelBatchErrorCode = "fleetRequestIdMalformed"
+ CancelBatchErrorCodeFleetRequestNotInCancellableState CancelBatchErrorCode = "fleetRequestNotInCancellableState"
+ CancelBatchErrorCodeUnexpectedError CancelBatchErrorCode = "unexpectedError"
+)
+
+// Values returns all known values for CancelBatchErrorCode. 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 (CancelBatchErrorCode) Values() []CancelBatchErrorCode {
+ return []CancelBatchErrorCode{
+ "fleetRequestIdDoesNotExist",
+ "fleetRequestIdMalformed",
+ "fleetRequestNotInCancellableState",
+ "unexpectedError",
+ }
+}
+
+type CancelSpotInstanceRequestState string
+
+// Enum values for CancelSpotInstanceRequestState
+const (
+ CancelSpotInstanceRequestStateActive CancelSpotInstanceRequestState = "active"
+ CancelSpotInstanceRequestStateOpen CancelSpotInstanceRequestState = "open"
+ CancelSpotInstanceRequestStateClosed CancelSpotInstanceRequestState = "closed"
+ CancelSpotInstanceRequestStateCancelled CancelSpotInstanceRequestState = "cancelled"
+ CancelSpotInstanceRequestStateCompleted CancelSpotInstanceRequestState = "completed"
+)
+
+// Values returns all known values for CancelSpotInstanceRequestState. 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 (CancelSpotInstanceRequestState) Values() []CancelSpotInstanceRequestState {
+ return []CancelSpotInstanceRequestState{
+ "active",
+ "open",
+ "closed",
+ "cancelled",
+ "completed",
+ }
+}
+
+type CapacityReservationInstancePlatform string
+
+// Enum values for CapacityReservationInstancePlatform
+const (
+ CapacityReservationInstancePlatformLinuxUnix CapacityReservationInstancePlatform = "Linux/UNIX"
+ CapacityReservationInstancePlatformRedHatEnterpriseLinux CapacityReservationInstancePlatform = "Red Hat Enterprise Linux"
+ CapacityReservationInstancePlatformSuseLinux CapacityReservationInstancePlatform = "SUSE Linux"
+ CapacityReservationInstancePlatformWindows CapacityReservationInstancePlatform = "Windows"
+ CapacityReservationInstancePlatformWindowsWithSqlServer CapacityReservationInstancePlatform = "Windows with SQL Server"
+ CapacityReservationInstancePlatformWindowsWithSqlServerEnterprise CapacityReservationInstancePlatform = "Windows with SQL Server Enterprise"
+ CapacityReservationInstancePlatformWindowsWithSqlServerStandard CapacityReservationInstancePlatform = "Windows with SQL Server Standard"
+ CapacityReservationInstancePlatformWindowsWithSqlServerWeb CapacityReservationInstancePlatform = "Windows with SQL Server Web"
+ CapacityReservationInstancePlatformLinuxWithSqlServerStandard CapacityReservationInstancePlatform = "Linux with SQL Server Standard"
+ CapacityReservationInstancePlatformLinuxWithSqlServerWeb CapacityReservationInstancePlatform = "Linux with SQL Server Web"
+ CapacityReservationInstancePlatformLinuxWithSqlServerEnterprise CapacityReservationInstancePlatform = "Linux with SQL Server Enterprise"
+)
+
+// Values returns all known values for CapacityReservationInstancePlatform. 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 (CapacityReservationInstancePlatform) Values() []CapacityReservationInstancePlatform {
+ return []CapacityReservationInstancePlatform{
+ "Linux/UNIX",
+ "Red Hat Enterprise Linux",
+ "SUSE Linux",
+ "Windows",
+ "Windows with SQL Server",
+ "Windows with SQL Server Enterprise",
+ "Windows with SQL Server Standard",
+ "Windows with SQL Server Web",
+ "Linux with SQL Server Standard",
+ "Linux with SQL Server Web",
+ "Linux with SQL Server Enterprise",
+ }
+}
+
+type CapacityReservationPreference string
+
+// Enum values for CapacityReservationPreference
+const (
+ CapacityReservationPreferenceOpen CapacityReservationPreference = "open"
+ CapacityReservationPreferenceNone CapacityReservationPreference = "none"
+)
+
+// Values returns all known values for CapacityReservationPreference. 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 (CapacityReservationPreference) Values() []CapacityReservationPreference {
+ return []CapacityReservationPreference{
+ "open",
+ "none",
+ }
+}
+
+type CapacityReservationState string
+
+// Enum values for CapacityReservationState
+const (
+ CapacityReservationStateActive CapacityReservationState = "active"
+ CapacityReservationStateExpired CapacityReservationState = "expired"
+ CapacityReservationStateCancelled CapacityReservationState = "cancelled"
+ CapacityReservationStatePending CapacityReservationState = "pending"
+ CapacityReservationStateFailed CapacityReservationState = "failed"
+)
+
+// Values returns all known values for CapacityReservationState. 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 (CapacityReservationState) Values() []CapacityReservationState {
+ return []CapacityReservationState{
+ "active",
+ "expired",
+ "cancelled",
+ "pending",
+ "failed",
+ }
+}
+
+type CapacityReservationTenancy string
+
+// Enum values for CapacityReservationTenancy
+const (
+ CapacityReservationTenancyDefault CapacityReservationTenancy = "default"
+ CapacityReservationTenancyDedicated CapacityReservationTenancy = "dedicated"
+)
+
+// Values returns all known values for CapacityReservationTenancy. 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 (CapacityReservationTenancy) Values() []CapacityReservationTenancy {
+ return []CapacityReservationTenancy{
+ "default",
+ "dedicated",
+ }
+}
+
+type CarrierGatewayState string
+
+// Enum values for CarrierGatewayState
+const (
+ CarrierGatewayStatePending CarrierGatewayState = "pending"
+ CarrierGatewayStateAvailable CarrierGatewayState = "available"
+ CarrierGatewayStateDeleting CarrierGatewayState = "deleting"
+ CarrierGatewayStateDeleted CarrierGatewayState = "deleted"
+)
+
+// Values returns all known values for CarrierGatewayState. 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 (CarrierGatewayState) Values() []CarrierGatewayState {
+ return []CarrierGatewayState{
+ "pending",
+ "available",
+ "deleting",
+ "deleted",
+ }
+}
+
+type ClientCertificateRevocationListStatusCode string
+
+// Enum values for ClientCertificateRevocationListStatusCode
+const (
+ ClientCertificateRevocationListStatusCodePending ClientCertificateRevocationListStatusCode = "pending"
+ ClientCertificateRevocationListStatusCodeActive ClientCertificateRevocationListStatusCode = "active"
+)
+
+// Values returns all known values for ClientCertificateRevocationListStatusCode.
+// 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 (ClientCertificateRevocationListStatusCode) Values() []ClientCertificateRevocationListStatusCode {
+ return []ClientCertificateRevocationListStatusCode{
+ "pending",
+ "active",
+ }
+}
+
+type ClientVpnAuthenticationType string
+
+// Enum values for ClientVpnAuthenticationType
+const (
+ ClientVpnAuthenticationTypeCertificateAuthentication ClientVpnAuthenticationType = "certificate-authentication"
+ ClientVpnAuthenticationTypeDirectoryServiceAuthentication ClientVpnAuthenticationType = "directory-service-authentication"
+ ClientVpnAuthenticationTypeFederatedAuthentication ClientVpnAuthenticationType = "federated-authentication"
+)
+
+// Values returns all known values for ClientVpnAuthenticationType. 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 (ClientVpnAuthenticationType) Values() []ClientVpnAuthenticationType {
+ return []ClientVpnAuthenticationType{
+ "certificate-authentication",
+ "directory-service-authentication",
+ "federated-authentication",
+ }
+}
+
+type ClientVpnAuthorizationRuleStatusCode string
+
+// Enum values for ClientVpnAuthorizationRuleStatusCode
+const (
+ ClientVpnAuthorizationRuleStatusCodeAuthorizing ClientVpnAuthorizationRuleStatusCode = "authorizing"
+ ClientVpnAuthorizationRuleStatusCodeActive ClientVpnAuthorizationRuleStatusCode = "active"
+ ClientVpnAuthorizationRuleStatusCodeFailed ClientVpnAuthorizationRuleStatusCode = "failed"
+ ClientVpnAuthorizationRuleStatusCodeRevoking ClientVpnAuthorizationRuleStatusCode = "revoking"
+)
+
+// Values returns all known values for ClientVpnAuthorizationRuleStatusCode. 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 (ClientVpnAuthorizationRuleStatusCode) Values() []ClientVpnAuthorizationRuleStatusCode {
+ return []ClientVpnAuthorizationRuleStatusCode{
+ "authorizing",
+ "active",
+ "failed",
+ "revoking",
+ }
+}
+
+type ClientVpnConnectionStatusCode string
+
+// Enum values for ClientVpnConnectionStatusCode
+const (
+ ClientVpnConnectionStatusCodeActive ClientVpnConnectionStatusCode = "active"
+ ClientVpnConnectionStatusCodeFailedToTerminate ClientVpnConnectionStatusCode = "failed-to-terminate"
+ ClientVpnConnectionStatusCodeTerminating ClientVpnConnectionStatusCode = "terminating"
+ ClientVpnConnectionStatusCodeTerminated ClientVpnConnectionStatusCode = "terminated"
+)
+
+// Values returns all known values for ClientVpnConnectionStatusCode. 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 (ClientVpnConnectionStatusCode) Values() []ClientVpnConnectionStatusCode {
+ return []ClientVpnConnectionStatusCode{
+ "active",
+ "failed-to-terminate",
+ "terminating",
+ "terminated",
+ }
+}
+
+type ClientVpnEndpointAttributeStatusCode string
+
+// Enum values for ClientVpnEndpointAttributeStatusCode
+const (
+ ClientVpnEndpointAttributeStatusCodeApplying ClientVpnEndpointAttributeStatusCode = "applying"
+ ClientVpnEndpointAttributeStatusCodeApplied ClientVpnEndpointAttributeStatusCode = "applied"
+)
+
+// Values returns all known values for ClientVpnEndpointAttributeStatusCode. 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 (ClientVpnEndpointAttributeStatusCode) Values() []ClientVpnEndpointAttributeStatusCode {
+ return []ClientVpnEndpointAttributeStatusCode{
+ "applying",
+ "applied",
+ }
+}
+
+type ClientVpnEndpointStatusCode string
+
+// Enum values for ClientVpnEndpointStatusCode
+const (
+ ClientVpnEndpointStatusCodePendingAssociate ClientVpnEndpointStatusCode = "pending-associate"
+ ClientVpnEndpointStatusCodeAvailable ClientVpnEndpointStatusCode = "available"
+ ClientVpnEndpointStatusCodeDeleting ClientVpnEndpointStatusCode = "deleting"
+ ClientVpnEndpointStatusCodeDeleted ClientVpnEndpointStatusCode = "deleted"
+)
+
+// Values returns all known values for ClientVpnEndpointStatusCode. 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 (ClientVpnEndpointStatusCode) Values() []ClientVpnEndpointStatusCode {
+ return []ClientVpnEndpointStatusCode{
+ "pending-associate",
+ "available",
+ "deleting",
+ "deleted",
+ }
+}
+
+type ClientVpnRouteStatusCode string
+
+// Enum values for ClientVpnRouteStatusCode
+const (
+ ClientVpnRouteStatusCodeCreating ClientVpnRouteStatusCode = "creating"
+ ClientVpnRouteStatusCodeActive ClientVpnRouteStatusCode = "active"
+ ClientVpnRouteStatusCodeFailed ClientVpnRouteStatusCode = "failed"
+ ClientVpnRouteStatusCodeDeleting ClientVpnRouteStatusCode = "deleting"
+)
+
+// Values returns all known values for ClientVpnRouteStatusCode. 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 (ClientVpnRouteStatusCode) Values() []ClientVpnRouteStatusCode {
+ return []ClientVpnRouteStatusCode{
+ "creating",
+ "active",
+ "failed",
+ "deleting",
+ }
+}
+
+type ConnectionNotificationState string
+
+// Enum values for ConnectionNotificationState
+const (
+ ConnectionNotificationStateEnabled ConnectionNotificationState = "Enabled"
+ ConnectionNotificationStateDisabled ConnectionNotificationState = "Disabled"
+)
+
+// Values returns all known values for ConnectionNotificationState. 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 (ConnectionNotificationState) Values() []ConnectionNotificationState {
+ return []ConnectionNotificationState{
+ "Enabled",
+ "Disabled",
+ }
+}
+
+type ConnectionNotificationType string
+
+// Enum values for ConnectionNotificationType
+const (
+ ConnectionNotificationTypeTopic ConnectionNotificationType = "Topic"
+)
+
+// Values returns all known values for ConnectionNotificationType. 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 (ConnectionNotificationType) Values() []ConnectionNotificationType {
+ return []ConnectionNotificationType{
+ "Topic",
+ }
+}
+
+type ConnectivityType string
+
+// Enum values for ConnectivityType
+const (
+ ConnectivityTypePrivate ConnectivityType = "private"
+ ConnectivityTypePublic ConnectivityType = "public"
+)
+
+// Values returns all known values for ConnectivityType. 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 (ConnectivityType) Values() []ConnectivityType {
+ return []ConnectivityType{
+ "private",
+ "public",
+ }
+}
+
+type ContainerFormat string
+
+// Enum values for ContainerFormat
+const (
+ ContainerFormatOva ContainerFormat = "ova"
+)
+
+// Values returns all known values for ContainerFormat. 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 (ContainerFormat) Values() []ContainerFormat {
+ return []ContainerFormat{
+ "ova",
+ }
+}
+
+type ConversionTaskState string
+
+// Enum values for ConversionTaskState
+const (
+ ConversionTaskStateActive ConversionTaskState = "active"
+ ConversionTaskStateCancelling ConversionTaskState = "cancelling"
+ ConversionTaskStateCancelled ConversionTaskState = "cancelled"
+ ConversionTaskStateCompleted ConversionTaskState = "completed"
+)
+
+// Values returns all known values for ConversionTaskState. 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 (ConversionTaskState) Values() []ConversionTaskState {
+ return []ConversionTaskState{
+ "active",
+ "cancelling",
+ "cancelled",
+ "completed",
+ }
+}
+
+type CopyTagsFromSource string
+
+// Enum values for CopyTagsFromSource
+const (
+ CopyTagsFromSourceVolume CopyTagsFromSource = "volume"
+)
+
+// Values returns all known values for CopyTagsFromSource. 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 (CopyTagsFromSource) Values() []CopyTagsFromSource {
+ return []CopyTagsFromSource{
+ "volume",
+ }
+}
+
+type CurrencyCodeValues string
+
+// Enum values for CurrencyCodeValues
+const (
+ CurrencyCodeValuesUsd CurrencyCodeValues = "USD"
+)
+
+// Values returns all known values for CurrencyCodeValues. 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 (CurrencyCodeValues) Values() []CurrencyCodeValues {
+ return []CurrencyCodeValues{
+ "USD",
+ }
+}
+
+type DatafeedSubscriptionState string
+
+// Enum values for DatafeedSubscriptionState
+const (
+ DatafeedSubscriptionStateActive DatafeedSubscriptionState = "Active"
+ DatafeedSubscriptionStateInactive DatafeedSubscriptionState = "Inactive"
+)
+
+// Values returns all known values for DatafeedSubscriptionState. 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 (DatafeedSubscriptionState) Values() []DatafeedSubscriptionState {
+ return []DatafeedSubscriptionState{
+ "Active",
+ "Inactive",
+ }
+}
+
+type DefaultRouteTableAssociationValue string
+
+// Enum values for DefaultRouteTableAssociationValue
+const (
+ DefaultRouteTableAssociationValueEnable DefaultRouteTableAssociationValue = "enable"
+ DefaultRouteTableAssociationValueDisable DefaultRouteTableAssociationValue = "disable"
+)
+
+// Values returns all known values for DefaultRouteTableAssociationValue. 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 (DefaultRouteTableAssociationValue) Values() []DefaultRouteTableAssociationValue {
+ return []DefaultRouteTableAssociationValue{
+ "enable",
+ "disable",
+ }
+}
+
+type DefaultRouteTablePropagationValue string
+
+// Enum values for DefaultRouteTablePropagationValue
+const (
+ DefaultRouteTablePropagationValueEnable DefaultRouteTablePropagationValue = "enable"
+ DefaultRouteTablePropagationValueDisable DefaultRouteTablePropagationValue = "disable"
+)
+
+// Values returns all known values for DefaultRouteTablePropagationValue. 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 (DefaultRouteTablePropagationValue) Values() []DefaultRouteTablePropagationValue {
+ return []DefaultRouteTablePropagationValue{
+ "enable",
+ "disable",
+ }
+}
+
+type DefaultTargetCapacityType string
+
+// Enum values for DefaultTargetCapacityType
+const (
+ DefaultTargetCapacityTypeSpot DefaultTargetCapacityType = "spot"
+ DefaultTargetCapacityTypeOnDemand DefaultTargetCapacityType = "on-demand"
+)
+
+// Values returns all known values for DefaultTargetCapacityType. 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 (DefaultTargetCapacityType) Values() []DefaultTargetCapacityType {
+ return []DefaultTargetCapacityType{
+ "spot",
+ "on-demand",
+ }
+}
+
+type DeleteFleetErrorCode string
+
+// Enum values for DeleteFleetErrorCode
+const (
+ DeleteFleetErrorCodeFleetIdDoesNotExist DeleteFleetErrorCode = "fleetIdDoesNotExist"
+ DeleteFleetErrorCodeFleetIdMalformed DeleteFleetErrorCode = "fleetIdMalformed"
+ DeleteFleetErrorCodeFleetNotInDeletableState DeleteFleetErrorCode = "fleetNotInDeletableState"
+ DeleteFleetErrorCodeUnexpectedError DeleteFleetErrorCode = "unexpectedError"
+)
+
+// Values returns all known values for DeleteFleetErrorCode. 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 (DeleteFleetErrorCode) Values() []DeleteFleetErrorCode {
+ return []DeleteFleetErrorCode{
+ "fleetIdDoesNotExist",
+ "fleetIdMalformed",
+ "fleetNotInDeletableState",
+ "unexpectedError",
+ }
+}
+
+type DeleteQueuedReservedInstancesErrorCode string
+
+// Enum values for DeleteQueuedReservedInstancesErrorCode
+const (
+ DeleteQueuedReservedInstancesErrorCodeReservedInstancesIdInvalid DeleteQueuedReservedInstancesErrorCode = "reserved-instances-id-invalid"
+ DeleteQueuedReservedInstancesErrorCodeReservedInstancesNotInQueuedState DeleteQueuedReservedInstancesErrorCode = "reserved-instances-not-in-queued-state"
+ DeleteQueuedReservedInstancesErrorCodeUnexpectedError DeleteQueuedReservedInstancesErrorCode = "unexpected-error"
+)
+
+// Values returns all known values for DeleteQueuedReservedInstancesErrorCode. 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 (DeleteQueuedReservedInstancesErrorCode) Values() []DeleteQueuedReservedInstancesErrorCode {
+ return []DeleteQueuedReservedInstancesErrorCode{
+ "reserved-instances-id-invalid",
+ "reserved-instances-not-in-queued-state",
+ "unexpected-error",
+ }
+}
+
+type DeviceType string
+
+// Enum values for DeviceType
+const (
+ DeviceTypeEbs DeviceType = "ebs"
+ DeviceTypeInstanceStore DeviceType = "instance-store"
+)
+
+// Values returns all known values for DeviceType. 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 (DeviceType) Values() []DeviceType {
+ return []DeviceType{
+ "ebs",
+ "instance-store",
+ }
+}
+
+type DiskImageFormat string
+
+// Enum values for DiskImageFormat
+const (
+ DiskImageFormatVmdk DiskImageFormat = "VMDK"
+ DiskImageFormatRaw DiskImageFormat = "RAW"
+ DiskImageFormatVhd DiskImageFormat = "VHD"
+)
+
+// Values returns all known values for DiskImageFormat. 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 (DiskImageFormat) Values() []DiskImageFormat {
+ return []DiskImageFormat{
+ "VMDK",
+ "RAW",
+ "VHD",
+ }
+}
+
+type DiskType string
+
+// Enum values for DiskType
+const (
+ DiskTypeHdd DiskType = "hdd"
+ DiskTypeSsd DiskType = "ssd"
+)
+
+// Values returns all known values for DiskType. 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 (DiskType) Values() []DiskType {
+ return []DiskType{
+ "hdd",
+ "ssd",
+ }
+}
+
+type DnsNameState string
+
+// Enum values for DnsNameState
+const (
+ DnsNameStatePendingVerification DnsNameState = "pendingVerification"
+ DnsNameStateVerified DnsNameState = "verified"
+ DnsNameStateFailed DnsNameState = "failed"
+)
+
+// Values returns all known values for DnsNameState. 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 (DnsNameState) Values() []DnsNameState {
+ return []DnsNameState{
+ "pendingVerification",
+ "verified",
+ "failed",
+ }
+}
+
+type DnsSupportValue string
+
+// Enum values for DnsSupportValue
+const (
+ DnsSupportValueEnable DnsSupportValue = "enable"
+ DnsSupportValueDisable DnsSupportValue = "disable"
+)
+
+// Values returns all known values for DnsSupportValue. 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 (DnsSupportValue) Values() []DnsSupportValue {
+ return []DnsSupportValue{
+ "enable",
+ "disable",
+ }
+}
+
+type DomainType string
+
+// Enum values for DomainType
+const (
+ DomainTypeVpc DomainType = "vpc"
+ DomainTypeStandard DomainType = "standard"
+)
+
+// Values returns all known values for DomainType. 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 (DomainType) Values() []DomainType {
+ return []DomainType{
+ "vpc",
+ "standard",
+ }
+}
+
+type EbsEncryptionSupport string
+
+// Enum values for EbsEncryptionSupport
+const (
+ EbsEncryptionSupportUnsupported EbsEncryptionSupport = "unsupported"
+ EbsEncryptionSupportSupported EbsEncryptionSupport = "supported"
+)
+
+// Values returns all known values for EbsEncryptionSupport. 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 (EbsEncryptionSupport) Values() []EbsEncryptionSupport {
+ return []EbsEncryptionSupport{
+ "unsupported",
+ "supported",
+ }
+}
+
+type EbsNvmeSupport string
+
+// Enum values for EbsNvmeSupport
+const (
+ EbsNvmeSupportUnsupported EbsNvmeSupport = "unsupported"
+ EbsNvmeSupportSupported EbsNvmeSupport = "supported"
+ EbsNvmeSupportRequired EbsNvmeSupport = "required"
+)
+
+// Values returns all known values for EbsNvmeSupport. 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 (EbsNvmeSupport) Values() []EbsNvmeSupport {
+ return []EbsNvmeSupport{
+ "unsupported",
+ "supported",
+ "required",
+ }
+}
+
+type EbsOptimizedSupport string
+
+// Enum values for EbsOptimizedSupport
+const (
+ EbsOptimizedSupportUnsupported EbsOptimizedSupport = "unsupported"
+ EbsOptimizedSupportSupported EbsOptimizedSupport = "supported"
+ EbsOptimizedSupportDefault EbsOptimizedSupport = "default"
+)
+
+// Values returns all known values for EbsOptimizedSupport. 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 (EbsOptimizedSupport) Values() []EbsOptimizedSupport {
+ return []EbsOptimizedSupport{
+ "unsupported",
+ "supported",
+ "default",
+ }
+}
+
+type ElasticGpuState string
+
+// Enum values for ElasticGpuState
+const (
+ ElasticGpuStateAttached ElasticGpuState = "ATTACHED"
+)
+
+// Values returns all known values for ElasticGpuState. 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 (ElasticGpuState) Values() []ElasticGpuState {
+ return []ElasticGpuState{
+ "ATTACHED",
+ }
+}
+
+type ElasticGpuStatus string
+
+// Enum values for ElasticGpuStatus
+const (
+ ElasticGpuStatusOk ElasticGpuStatus = "OK"
+ ElasticGpuStatusImpaired ElasticGpuStatus = "IMPAIRED"
+)
+
+// Values returns all known values for ElasticGpuStatus. 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 (ElasticGpuStatus) Values() []ElasticGpuStatus {
+ return []ElasticGpuStatus{
+ "OK",
+ "IMPAIRED",
+ }
+}
+
+type EnaSupport string
+
+// Enum values for EnaSupport
+const (
+ EnaSupportUnsupported EnaSupport = "unsupported"
+ EnaSupportSupported EnaSupport = "supported"
+ EnaSupportRequired EnaSupport = "required"
+)
+
+// Values returns all known values for EnaSupport. 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 (EnaSupport) Values() []EnaSupport {
+ return []EnaSupport{
+ "unsupported",
+ "supported",
+ "required",
+ }
+}
+
+type EndDateType string
+
+// Enum values for EndDateType
+const (
+ EndDateTypeUnlimited EndDateType = "unlimited"
+ EndDateTypeLimited EndDateType = "limited"
+)
+
+// Values returns all known values for EndDateType. 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 (EndDateType) Values() []EndDateType {
+ return []EndDateType{
+ "unlimited",
+ "limited",
+ }
+}
+
+type EphemeralNvmeSupport string
+
+// Enum values for EphemeralNvmeSupport
+const (
+ EphemeralNvmeSupportUnsupported EphemeralNvmeSupport = "unsupported"
+ EphemeralNvmeSupportSupported EphemeralNvmeSupport = "supported"
+ EphemeralNvmeSupportRequired EphemeralNvmeSupport = "required"
+)
+
+// Values returns all known values for EphemeralNvmeSupport. 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 (EphemeralNvmeSupport) Values() []EphemeralNvmeSupport {
+ return []EphemeralNvmeSupport{
+ "unsupported",
+ "supported",
+ "required",
+ }
+}
+
+type EventCode string
+
+// Enum values for EventCode
+const (
+ EventCodeInstanceReboot EventCode = "instance-reboot"
+ EventCodeSystemReboot EventCode = "system-reboot"
+ EventCodeSystemMaintenance EventCode = "system-maintenance"
+ EventCodeInstanceRetirement EventCode = "instance-retirement"
+ EventCodeInstanceStop EventCode = "instance-stop"
+)
+
+// Values returns all known values for EventCode. 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 (EventCode) Values() []EventCode {
+ return []EventCode{
+ "instance-reboot",
+ "system-reboot",
+ "system-maintenance",
+ "instance-retirement",
+ "instance-stop",
+ }
+}
+
+type EventType string
+
+// Enum values for EventType
+const (
+ EventTypeInstanceChange EventType = "instanceChange"
+ EventTypeBatchChange EventType = "fleetRequestChange"
+ EventTypeError EventType = "error"
+ EventTypeInformation EventType = "information"
+)
+
+// Values returns all known values for EventType. 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 (EventType) Values() []EventType {
+ return []EventType{
+ "instanceChange",
+ "fleetRequestChange",
+ "error",
+ "information",
+ }
+}
+
+type ExcessCapacityTerminationPolicy string
+
+// Enum values for ExcessCapacityTerminationPolicy
+const (
+ ExcessCapacityTerminationPolicyNoTermination ExcessCapacityTerminationPolicy = "noTermination"
+ ExcessCapacityTerminationPolicyDefault ExcessCapacityTerminationPolicy = "default"
+)
+
+// Values returns all known values for ExcessCapacityTerminationPolicy. 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 (ExcessCapacityTerminationPolicy) Values() []ExcessCapacityTerminationPolicy {
+ return []ExcessCapacityTerminationPolicy{
+ "noTermination",
+ "default",
+ }
+}
+
+type ExportEnvironment string
+
+// Enum values for ExportEnvironment
+const (
+ ExportEnvironmentCitrix ExportEnvironment = "citrix"
+ ExportEnvironmentVmware ExportEnvironment = "vmware"
+ ExportEnvironmentMicrosoft ExportEnvironment = "microsoft"
+)
+
+// Values returns all known values for ExportEnvironment. 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 (ExportEnvironment) Values() []ExportEnvironment {
+ return []ExportEnvironment{
+ "citrix",
+ "vmware",
+ "microsoft",
+ }
+}
+
+type ExportTaskState string
+
+// Enum values for ExportTaskState
+const (
+ ExportTaskStateActive ExportTaskState = "active"
+ ExportTaskStateCancelling ExportTaskState = "cancelling"
+ ExportTaskStateCancelled ExportTaskState = "cancelled"
+ ExportTaskStateCompleted ExportTaskState = "completed"
+)
+
+// Values returns all known values for ExportTaskState. 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 (ExportTaskState) Values() []ExportTaskState {
+ return []ExportTaskState{
+ "active",
+ "cancelling",
+ "cancelled",
+ "completed",
+ }
+}
+
+type FastSnapshotRestoreStateCode string
+
+// Enum values for FastSnapshotRestoreStateCode
+const (
+ FastSnapshotRestoreStateCodeEnabling FastSnapshotRestoreStateCode = "enabling"
+ FastSnapshotRestoreStateCodeOptimizing FastSnapshotRestoreStateCode = "optimizing"
+ FastSnapshotRestoreStateCodeEnabled FastSnapshotRestoreStateCode = "enabled"
+ FastSnapshotRestoreStateCodeDisabling FastSnapshotRestoreStateCode = "disabling"
+ FastSnapshotRestoreStateCodeDisabled FastSnapshotRestoreStateCode = "disabled"
+)
+
+// Values returns all known values for FastSnapshotRestoreStateCode. 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 (FastSnapshotRestoreStateCode) Values() []FastSnapshotRestoreStateCode {
+ return []FastSnapshotRestoreStateCode{
+ "enabling",
+ "optimizing",
+ "enabled",
+ "disabling",
+ "disabled",
+ }
+}
+
+type FleetActivityStatus string
+
+// Enum values for FleetActivityStatus
+const (
+ FleetActivityStatusError FleetActivityStatus = "error"
+ FleetActivityStatusPendingFulfillment FleetActivityStatus = "pending_fulfillment"
+ FleetActivityStatusPendingTermination FleetActivityStatus = "pending_termination"
+ FleetActivityStatusFulfilled FleetActivityStatus = "fulfilled"
+)
+
+// Values returns all known values for FleetActivityStatus. 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 (FleetActivityStatus) Values() []FleetActivityStatus {
+ return []FleetActivityStatus{
+ "error",
+ "pending_fulfillment",
+ "pending_termination",
+ "fulfilled",
+ }
+}
+
+type FleetCapacityReservationUsageStrategy string
+
+// Enum values for FleetCapacityReservationUsageStrategy
+const (
+ FleetCapacityReservationUsageStrategyUseCapacityReservationsFirst FleetCapacityReservationUsageStrategy = "use-capacity-reservations-first"
+)
+
+// Values returns all known values for FleetCapacityReservationUsageStrategy. 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 (FleetCapacityReservationUsageStrategy) Values() []FleetCapacityReservationUsageStrategy {
+ return []FleetCapacityReservationUsageStrategy{
+ "use-capacity-reservations-first",
+ }
+}
+
+type FleetEventType string
+
+// Enum values for FleetEventType
+const (
+ FleetEventTypeInstanceChange FleetEventType = "instance-change"
+ FleetEventTypeFleetChange FleetEventType = "fleet-change"
+ FleetEventTypeServiceError FleetEventType = "service-error"
+)
+
+// Values returns all known values for FleetEventType. 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 (FleetEventType) Values() []FleetEventType {
+ return []FleetEventType{
+ "instance-change",
+ "fleet-change",
+ "service-error",
+ }
+}
+
+type FleetExcessCapacityTerminationPolicy string
+
+// Enum values for FleetExcessCapacityTerminationPolicy
+const (
+ FleetExcessCapacityTerminationPolicyNoTermination FleetExcessCapacityTerminationPolicy = "no-termination"
+ FleetExcessCapacityTerminationPolicyTermination FleetExcessCapacityTerminationPolicy = "termination"
+)
+
+// Values returns all known values for FleetExcessCapacityTerminationPolicy. 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 (FleetExcessCapacityTerminationPolicy) Values() []FleetExcessCapacityTerminationPolicy {
+ return []FleetExcessCapacityTerminationPolicy{
+ "no-termination",
+ "termination",
+ }
+}
+
+type FleetOnDemandAllocationStrategy string
+
+// Enum values for FleetOnDemandAllocationStrategy
+const (
+ FleetOnDemandAllocationStrategyLowestPrice FleetOnDemandAllocationStrategy = "lowest-price"
+ FleetOnDemandAllocationStrategyPrioritized FleetOnDemandAllocationStrategy = "prioritized"
+)
+
+// Values returns all known values for FleetOnDemandAllocationStrategy. 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 (FleetOnDemandAllocationStrategy) Values() []FleetOnDemandAllocationStrategy {
+ return []FleetOnDemandAllocationStrategy{
+ "lowest-price",
+ "prioritized",
+ }
+}
+
+type FleetReplacementStrategy string
+
+// Enum values for FleetReplacementStrategy
+const (
+ FleetReplacementStrategyLaunch FleetReplacementStrategy = "launch"
+)
+
+// Values returns all known values for FleetReplacementStrategy. 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 (FleetReplacementStrategy) Values() []FleetReplacementStrategy {
+ return []FleetReplacementStrategy{
+ "launch",
+ }
+}
+
+type FleetStateCode string
+
+// Enum values for FleetStateCode
+const (
+ FleetStateCodeSubmitted FleetStateCode = "submitted"
+ FleetStateCodeActive FleetStateCode = "active"
+ FleetStateCodeDeleted FleetStateCode = "deleted"
+ FleetStateCodeFailed FleetStateCode = "failed"
+ FleetStateCodeDeletedRunning FleetStateCode = "deleted_running"
+ FleetStateCodeDeletedTerminatingInstances FleetStateCode = "deleted_terminating"
+ FleetStateCodeModifying FleetStateCode = "modifying"
+)
+
+// Values returns all known values for FleetStateCode. 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 (FleetStateCode) Values() []FleetStateCode {
+ return []FleetStateCode{
+ "submitted",
+ "active",
+ "deleted",
+ "failed",
+ "deleted_running",
+ "deleted_terminating",
+ "modifying",
+ }
+}
+
+type FleetType string
+
+// Enum values for FleetType
+const (
+ FleetTypeRequest FleetType = "request"
+ FleetTypeMaintain FleetType = "maintain"
+ FleetTypeInstant FleetType = "instant"
+)
+
+// Values returns all known values for FleetType. 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 (FleetType) Values() []FleetType {
+ return []FleetType{
+ "request",
+ "maintain",
+ "instant",
+ }
+}
+
+type FlowLogsResourceType string
+
+// Enum values for FlowLogsResourceType
+const (
+ FlowLogsResourceTypeVpc FlowLogsResourceType = "VPC"
+ FlowLogsResourceTypeSubnet FlowLogsResourceType = "Subnet"
+ FlowLogsResourceTypeNetworkInterface FlowLogsResourceType = "NetworkInterface"
+)
+
+// Values returns all known values for FlowLogsResourceType. 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 (FlowLogsResourceType) Values() []FlowLogsResourceType {
+ return []FlowLogsResourceType{
+ "VPC",
+ "Subnet",
+ "NetworkInterface",
+ }
+}
+
+type FpgaImageAttributeName string
+
+// Enum values for FpgaImageAttributeName
+const (
+ FpgaImageAttributeNameDescription FpgaImageAttributeName = "description"
+ FpgaImageAttributeNameName FpgaImageAttributeName = "name"
+ FpgaImageAttributeNameLoadPermission FpgaImageAttributeName = "loadPermission"
+ FpgaImageAttributeNameProductCodes FpgaImageAttributeName = "productCodes"
+)
+
+// Values returns all known values for FpgaImageAttributeName. 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 (FpgaImageAttributeName) Values() []FpgaImageAttributeName {
+ return []FpgaImageAttributeName{
+ "description",
+ "name",
+ "loadPermission",
+ "productCodes",
+ }
+}
+
+type FpgaImageStateCode string
+
+// Enum values for FpgaImageStateCode
+const (
+ FpgaImageStateCodePending FpgaImageStateCode = "pending"
+ FpgaImageStateCodeFailed FpgaImageStateCode = "failed"
+ FpgaImageStateCodeAvailable FpgaImageStateCode = "available"
+ FpgaImageStateCodeUnavailable FpgaImageStateCode = "unavailable"
+)
+
+// Values returns all known values for FpgaImageStateCode. 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 (FpgaImageStateCode) Values() []FpgaImageStateCode {
+ return []FpgaImageStateCode{
+ "pending",
+ "failed",
+ "available",
+ "unavailable",
+ }
+}
+
+type GatewayType string
+
+// Enum values for GatewayType
+const (
+ GatewayTypeIpsec1 GatewayType = "ipsec.1"
+)
+
+// Values returns all known values for GatewayType. 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 (GatewayType) Values() []GatewayType {
+ return []GatewayType{
+ "ipsec.1",
+ }
+}
+
+type HostRecovery string
+
+// Enum values for HostRecovery
+const (
+ HostRecoveryOn HostRecovery = "on"
+ HostRecoveryOff HostRecovery = "off"
+)
+
+// Values returns all known values for HostRecovery. 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 (HostRecovery) Values() []HostRecovery {
+ return []HostRecovery{
+ "on",
+ "off",
+ }
+}
+
+type HostTenancy string
+
+// Enum values for HostTenancy
+const (
+ HostTenancyDedicated HostTenancy = "dedicated"
+ HostTenancyHost HostTenancy = "host"
+)
+
+// Values returns all known values for HostTenancy. 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 (HostTenancy) Values() []HostTenancy {
+ return []HostTenancy{
+ "dedicated",
+ "host",
+ }
+}
+
+type HttpTokensState string
+
+// Enum values for HttpTokensState
+const (
+ HttpTokensStateOptional HttpTokensState = "optional"
+ HttpTokensStateRequired HttpTokensState = "required"
+)
+
+// Values returns all known values for HttpTokensState. 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 (HttpTokensState) Values() []HttpTokensState {
+ return []HttpTokensState{
+ "optional",
+ "required",
+ }
+}
+
+type HypervisorType string
+
+// Enum values for HypervisorType
+const (
+ HypervisorTypeOvm HypervisorType = "ovm"
+ HypervisorTypeXen HypervisorType = "xen"
+)
+
+// Values returns all known values for HypervisorType. 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 (HypervisorType) Values() []HypervisorType {
+ return []HypervisorType{
+ "ovm",
+ "xen",
+ }
+}
+
+type IamInstanceProfileAssociationState string
+
+// Enum values for IamInstanceProfileAssociationState
+const (
+ IamInstanceProfileAssociationStateAssociating IamInstanceProfileAssociationState = "associating"
+ IamInstanceProfileAssociationStateAssociated IamInstanceProfileAssociationState = "associated"
+ IamInstanceProfileAssociationStateDisassociating IamInstanceProfileAssociationState = "disassociating"
+ IamInstanceProfileAssociationStateDisassociated IamInstanceProfileAssociationState = "disassociated"
+)
+
+// Values returns all known values for IamInstanceProfileAssociationState. 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 (IamInstanceProfileAssociationState) Values() []IamInstanceProfileAssociationState {
+ return []IamInstanceProfileAssociationState{
+ "associating",
+ "associated",
+ "disassociating",
+ "disassociated",
+ }
+}
+
+type Igmpv2SupportValue string
+
+// Enum values for Igmpv2SupportValue
+const (
+ Igmpv2SupportValueEnable Igmpv2SupportValue = "enable"
+ Igmpv2SupportValueDisable Igmpv2SupportValue = "disable"
+)
+
+// Values returns all known values for Igmpv2SupportValue. 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 (Igmpv2SupportValue) Values() []Igmpv2SupportValue {
+ return []Igmpv2SupportValue{
+ "enable",
+ "disable",
+ }
+}
+
+type ImageAttributeName string
+
+// Enum values for ImageAttributeName
+const (
+ ImageAttributeNameDescription ImageAttributeName = "description"
+ ImageAttributeNameKernel ImageAttributeName = "kernel"
+ ImageAttributeNameRamdisk ImageAttributeName = "ramdisk"
+ ImageAttributeNameLaunchPermission ImageAttributeName = "launchPermission"
+ ImageAttributeNameProductCodes ImageAttributeName = "productCodes"
+ ImageAttributeNameBlockDeviceMapping ImageAttributeName = "blockDeviceMapping"
+ ImageAttributeNameSriovNetSupport ImageAttributeName = "sriovNetSupport"
+ ImageAttributeNameBootMode ImageAttributeName = "bootMode"
+)
+
+// Values returns all known values for ImageAttributeName. 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 (ImageAttributeName) Values() []ImageAttributeName {
+ return []ImageAttributeName{
+ "description",
+ "kernel",
+ "ramdisk",
+ "launchPermission",
+ "productCodes",
+ "blockDeviceMapping",
+ "sriovNetSupport",
+ "bootMode",
+ }
+}
+
+type ImageState string
+
+// Enum values for ImageState
+const (
+ ImageStatePending ImageState = "pending"
+ ImageStateAvailable ImageState = "available"
+ ImageStateInvalid ImageState = "invalid"
+ ImageStateDeregistered ImageState = "deregistered"
+ ImageStateTransient ImageState = "transient"
+ ImageStateFailed ImageState = "failed"
+ ImageStateError ImageState = "error"
+)
+
+// Values returns all known values for ImageState. 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 (ImageState) Values() []ImageState {
+ return []ImageState{
+ "pending",
+ "available",
+ "invalid",
+ "deregistered",
+ "transient",
+ "failed",
+ "error",
+ }
+}
+
+type ImageTypeValues string
+
+// Enum values for ImageTypeValues
+const (
+ ImageTypeValuesMachine ImageTypeValues = "machine"
+ ImageTypeValuesKernel ImageTypeValues = "kernel"
+ ImageTypeValuesRamdisk ImageTypeValues = "ramdisk"
+)
+
+// Values returns all known values for ImageTypeValues. 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 (ImageTypeValues) Values() []ImageTypeValues {
+ return []ImageTypeValues{
+ "machine",
+ "kernel",
+ "ramdisk",
+ }
+}
+
+type InstanceAttributeName string
+
+// Enum values for InstanceAttributeName
+const (
+ InstanceAttributeNameInstanceType InstanceAttributeName = "instanceType"
+ InstanceAttributeNameKernel InstanceAttributeName = "kernel"
+ InstanceAttributeNameRamdisk InstanceAttributeName = "ramdisk"
+ InstanceAttributeNameUserData InstanceAttributeName = "userData"
+ InstanceAttributeNameDisableApiTermination InstanceAttributeName = "disableApiTermination"
+ InstanceAttributeNameInstanceInitiatedShutdownBehavior InstanceAttributeName = "instanceInitiatedShutdownBehavior"
+ InstanceAttributeNameRootDeviceName InstanceAttributeName = "rootDeviceName"
+ InstanceAttributeNameBlockDeviceMapping InstanceAttributeName = "blockDeviceMapping"
+ InstanceAttributeNameProductCodes InstanceAttributeName = "productCodes"
+ InstanceAttributeNameSourceDestCheck InstanceAttributeName = "sourceDestCheck"
+ InstanceAttributeNameGroupSet InstanceAttributeName = "groupSet"
+ InstanceAttributeNameEbsOptimized InstanceAttributeName = "ebsOptimized"
+ InstanceAttributeNameSriovNetSupport InstanceAttributeName = "sriovNetSupport"
+ InstanceAttributeNameEnaSupport InstanceAttributeName = "enaSupport"
+ InstanceAttributeNameEnclaveOptions InstanceAttributeName = "enclaveOptions"
+)
+
+// Values returns all known values for InstanceAttributeName. 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 (InstanceAttributeName) Values() []InstanceAttributeName {
+ return []InstanceAttributeName{
+ "instanceType",
+ "kernel",
+ "ramdisk",
+ "userData",
+ "disableApiTermination",
+ "instanceInitiatedShutdownBehavior",
+ "rootDeviceName",
+ "blockDeviceMapping",
+ "productCodes",
+ "sourceDestCheck",
+ "groupSet",
+ "ebsOptimized",
+ "sriovNetSupport",
+ "enaSupport",
+ "enclaveOptions",
+ }
+}
+
+type InstanceEventWindowState string
+
+// Enum values for InstanceEventWindowState
+const (
+ InstanceEventWindowStateCreating InstanceEventWindowState = "creating"
+ InstanceEventWindowStateDeleting InstanceEventWindowState = "deleting"
+ InstanceEventWindowStateActive InstanceEventWindowState = "active"
+ InstanceEventWindowStateDeleted InstanceEventWindowState = "deleted"
+)
+
+// Values returns all known values for InstanceEventWindowState. 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 (InstanceEventWindowState) Values() []InstanceEventWindowState {
+ return []InstanceEventWindowState{
+ "creating",
+ "deleting",
+ "active",
+ "deleted",
+ }
+}
+
+type InstanceHealthStatus string
+
+// Enum values for InstanceHealthStatus
+const (
+ InstanceHealthStatusHealthyStatus InstanceHealthStatus = "healthy"
+ InstanceHealthStatusUnhealthyStatus InstanceHealthStatus = "unhealthy"
+)
+
+// Values returns all known values for InstanceHealthStatus. 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 (InstanceHealthStatus) Values() []InstanceHealthStatus {
+ return []InstanceHealthStatus{
+ "healthy",
+ "unhealthy",
+ }
+}
+
+type InstanceInterruptionBehavior string
+
+// Enum values for InstanceInterruptionBehavior
+const (
+ InstanceInterruptionBehaviorHibernate InstanceInterruptionBehavior = "hibernate"
+ InstanceInterruptionBehaviorStop InstanceInterruptionBehavior = "stop"
+ InstanceInterruptionBehaviorTerminate InstanceInterruptionBehavior = "terminate"
+)
+
+// Values returns all known values for InstanceInterruptionBehavior. 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 (InstanceInterruptionBehavior) Values() []InstanceInterruptionBehavior {
+ return []InstanceInterruptionBehavior{
+ "hibernate",
+ "stop",
+ "terminate",
+ }
+}
+
+type InstanceLifecycle string
+
+// Enum values for InstanceLifecycle
+const (
+ InstanceLifecycleSpot InstanceLifecycle = "spot"
+ InstanceLifecycleOnDemand InstanceLifecycle = "on-demand"
+)
+
+// Values returns all known values for InstanceLifecycle. 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 (InstanceLifecycle) Values() []InstanceLifecycle {
+ return []InstanceLifecycle{
+ "spot",
+ "on-demand",
+ }
+}
+
+type InstanceLifecycleType string
+
+// Enum values for InstanceLifecycleType
+const (
+ InstanceLifecycleTypeSpot InstanceLifecycleType = "spot"
+ InstanceLifecycleTypeScheduled InstanceLifecycleType = "scheduled"
+)
+
+// Values returns all known values for InstanceLifecycleType. 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 (InstanceLifecycleType) Values() []InstanceLifecycleType {
+ return []InstanceLifecycleType{
+ "spot",
+ "scheduled",
+ }
+}
+
+type InstanceMatchCriteria string
+
+// Enum values for InstanceMatchCriteria
+const (
+ InstanceMatchCriteriaOpen InstanceMatchCriteria = "open"
+ InstanceMatchCriteriaTargeted InstanceMatchCriteria = "targeted"
+)
+
+// Values returns all known values for InstanceMatchCriteria. 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 (InstanceMatchCriteria) Values() []InstanceMatchCriteria {
+ return []InstanceMatchCriteria{
+ "open",
+ "targeted",
+ }
+}
+
+type InstanceMetadataEndpointState string
+
+// Enum values for InstanceMetadataEndpointState
+const (
+ InstanceMetadataEndpointStateDisabled InstanceMetadataEndpointState = "disabled"
+ InstanceMetadataEndpointStateEnabled InstanceMetadataEndpointState = "enabled"
+)
+
+// Values returns all known values for InstanceMetadataEndpointState. 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 (InstanceMetadataEndpointState) Values() []InstanceMetadataEndpointState {
+ return []InstanceMetadataEndpointState{
+ "disabled",
+ "enabled",
+ }
+}
+
+type InstanceMetadataOptionsState string
+
+// Enum values for InstanceMetadataOptionsState
+const (
+ InstanceMetadataOptionsStatePending InstanceMetadataOptionsState = "pending"
+ InstanceMetadataOptionsStateApplied InstanceMetadataOptionsState = "applied"
+)
+
+// Values returns all known values for InstanceMetadataOptionsState. 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 (InstanceMetadataOptionsState) Values() []InstanceMetadataOptionsState {
+ return []InstanceMetadataOptionsState{
+ "pending",
+ "applied",
+ }
+}
+
+type InstanceMetadataProtocolState string
+
+// Enum values for InstanceMetadataProtocolState
+const (
+ InstanceMetadataProtocolStateDisabled InstanceMetadataProtocolState = "disabled"
+ InstanceMetadataProtocolStateEnabled InstanceMetadataProtocolState = "enabled"
+)
+
+// Values returns all known values for InstanceMetadataProtocolState. 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 (InstanceMetadataProtocolState) Values() []InstanceMetadataProtocolState {
+ return []InstanceMetadataProtocolState{
+ "disabled",
+ "enabled",
+ }
+}
+
+type InstanceStateName string
+
+// Enum values for InstanceStateName
+const (
+ InstanceStateNamePending InstanceStateName = "pending"
+ InstanceStateNameRunning InstanceStateName = "running"
+ InstanceStateNameShuttingDown InstanceStateName = "shutting-down"
+ InstanceStateNameTerminated InstanceStateName = "terminated"
+ InstanceStateNameStopping InstanceStateName = "stopping"
+ InstanceStateNameStopped InstanceStateName = "stopped"
+)
+
+// Values returns all known values for InstanceStateName. 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 (InstanceStateName) Values() []InstanceStateName {
+ return []InstanceStateName{
+ "pending",
+ "running",
+ "shutting-down",
+ "terminated",
+ "stopping",
+ "stopped",
+ }
+}
+
+type InstanceType string
+
+// Enum values for InstanceType
+const (
+ InstanceTypeT1Micro InstanceType = "t1.micro"
+ InstanceTypeT2Nano InstanceType = "t2.nano"
+ InstanceTypeT2Micro InstanceType = "t2.micro"
+ InstanceTypeT2Small InstanceType = "t2.small"
+ InstanceTypeT2Medium InstanceType = "t2.medium"
+ InstanceTypeT2Large InstanceType = "t2.large"
+ InstanceTypeT2Xlarge InstanceType = "t2.xlarge"
+ InstanceTypeT22xlarge InstanceType = "t2.2xlarge"
+ InstanceTypeT3Nano InstanceType = "t3.nano"
+ InstanceTypeT3Micro InstanceType = "t3.micro"
+ InstanceTypeT3Small InstanceType = "t3.small"
+ InstanceTypeT3Medium InstanceType = "t3.medium"
+ InstanceTypeT3Large InstanceType = "t3.large"
+ InstanceTypeT3Xlarge InstanceType = "t3.xlarge"
+ InstanceTypeT32xlarge InstanceType = "t3.2xlarge"
+ InstanceTypeT3aNano InstanceType = "t3a.nano"
+ InstanceTypeT3aMicro InstanceType = "t3a.micro"
+ InstanceTypeT3aSmall InstanceType = "t3a.small"
+ InstanceTypeT3aMedium InstanceType = "t3a.medium"
+ InstanceTypeT3aLarge InstanceType = "t3a.large"
+ InstanceTypeT3aXlarge InstanceType = "t3a.xlarge"
+ InstanceTypeT3a2xlarge InstanceType = "t3a.2xlarge"
+ InstanceTypeT4gNano InstanceType = "t4g.nano"
+ InstanceTypeT4gMicro InstanceType = "t4g.micro"
+ InstanceTypeT4gSmall InstanceType = "t4g.small"
+ InstanceTypeT4gMedium InstanceType = "t4g.medium"
+ InstanceTypeT4gLarge InstanceType = "t4g.large"
+ InstanceTypeT4gXlarge InstanceType = "t4g.xlarge"
+ InstanceTypeT4g2xlarge InstanceType = "t4g.2xlarge"
+ InstanceTypeM1Small InstanceType = "m1.small"
+ InstanceTypeM1Medium InstanceType = "m1.medium"
+ InstanceTypeM1Large InstanceType = "m1.large"
+ InstanceTypeM1Xlarge InstanceType = "m1.xlarge"
+ InstanceTypeM3Medium InstanceType = "m3.medium"
+ InstanceTypeM3Large InstanceType = "m3.large"
+ InstanceTypeM3Xlarge InstanceType = "m3.xlarge"
+ InstanceTypeM32xlarge InstanceType = "m3.2xlarge"
+ InstanceTypeM4Large InstanceType = "m4.large"
+ InstanceTypeM4Xlarge InstanceType = "m4.xlarge"
+ InstanceTypeM42xlarge InstanceType = "m4.2xlarge"
+ InstanceTypeM44xlarge InstanceType = "m4.4xlarge"
+ InstanceTypeM410xlarge InstanceType = "m4.10xlarge"
+ InstanceTypeM416xlarge InstanceType = "m4.16xlarge"
+ InstanceTypeM2Xlarge InstanceType = "m2.xlarge"
+ InstanceTypeM22xlarge InstanceType = "m2.2xlarge"
+ InstanceTypeM24xlarge InstanceType = "m2.4xlarge"
+ InstanceTypeCr18xlarge InstanceType = "cr1.8xlarge"
+ InstanceTypeR3Large InstanceType = "r3.large"
+ InstanceTypeR3Xlarge InstanceType = "r3.xlarge"
+ InstanceTypeR32xlarge InstanceType = "r3.2xlarge"
+ InstanceTypeR34xlarge InstanceType = "r3.4xlarge"
+ InstanceTypeR38xlarge InstanceType = "r3.8xlarge"
+ InstanceTypeR4Large InstanceType = "r4.large"
+ InstanceTypeR4Xlarge InstanceType = "r4.xlarge"
+ InstanceTypeR42xlarge InstanceType = "r4.2xlarge"
+ InstanceTypeR44xlarge InstanceType = "r4.4xlarge"
+ InstanceTypeR48xlarge InstanceType = "r4.8xlarge"
+ InstanceTypeR416xlarge InstanceType = "r4.16xlarge"
+ InstanceTypeR5Large InstanceType = "r5.large"
+ InstanceTypeR5Xlarge InstanceType = "r5.xlarge"
+ InstanceTypeR52xlarge InstanceType = "r5.2xlarge"
+ InstanceTypeR54xlarge InstanceType = "r5.4xlarge"
+ InstanceTypeR58xlarge InstanceType = "r5.8xlarge"
+ InstanceTypeR512xlarge InstanceType = "r5.12xlarge"
+ InstanceTypeR516xlarge InstanceType = "r5.16xlarge"
+ InstanceTypeR524xlarge InstanceType = "r5.24xlarge"
+ InstanceTypeR5Metal InstanceType = "r5.metal"
+ InstanceTypeR5aLarge InstanceType = "r5a.large"
+ InstanceTypeR5aXlarge InstanceType = "r5a.xlarge"
+ InstanceTypeR5a2xlarge InstanceType = "r5a.2xlarge"
+ InstanceTypeR5a4xlarge InstanceType = "r5a.4xlarge"
+ InstanceTypeR5a8xlarge InstanceType = "r5a.8xlarge"
+ InstanceTypeR5a12xlarge InstanceType = "r5a.12xlarge"
+ InstanceTypeR5a16xlarge InstanceType = "r5a.16xlarge"
+ InstanceTypeR5a24xlarge InstanceType = "r5a.24xlarge"
+ InstanceTypeR5bLarge InstanceType = "r5b.large"
+ InstanceTypeR5bXlarge InstanceType = "r5b.xlarge"
+ InstanceTypeR5b2xlarge InstanceType = "r5b.2xlarge"
+ InstanceTypeR5b4xlarge InstanceType = "r5b.4xlarge"
+ InstanceTypeR5b8xlarge InstanceType = "r5b.8xlarge"
+ InstanceTypeR5b12xlarge InstanceType = "r5b.12xlarge"
+ InstanceTypeR5b16xlarge InstanceType = "r5b.16xlarge"
+ InstanceTypeR5b24xlarge InstanceType = "r5b.24xlarge"
+ InstanceTypeR5bMetal InstanceType = "r5b.metal"
+ InstanceTypeR5dLarge InstanceType = "r5d.large"
+ InstanceTypeR5dXlarge InstanceType = "r5d.xlarge"
+ InstanceTypeR5d2xlarge InstanceType = "r5d.2xlarge"
+ InstanceTypeR5d4xlarge InstanceType = "r5d.4xlarge"
+ InstanceTypeR5d8xlarge InstanceType = "r5d.8xlarge"
+ InstanceTypeR5d12xlarge InstanceType = "r5d.12xlarge"
+ InstanceTypeR5d16xlarge InstanceType = "r5d.16xlarge"
+ InstanceTypeR5d24xlarge InstanceType = "r5d.24xlarge"
+ InstanceTypeR5dMetal InstanceType = "r5d.metal"
+ InstanceTypeR5adLarge InstanceType = "r5ad.large"
+ InstanceTypeR5adXlarge InstanceType = "r5ad.xlarge"
+ InstanceTypeR5ad2xlarge InstanceType = "r5ad.2xlarge"
+ InstanceTypeR5ad4xlarge InstanceType = "r5ad.4xlarge"
+ InstanceTypeR5ad8xlarge InstanceType = "r5ad.8xlarge"
+ InstanceTypeR5ad12xlarge InstanceType = "r5ad.12xlarge"
+ InstanceTypeR5ad16xlarge InstanceType = "r5ad.16xlarge"
+ InstanceTypeR5ad24xlarge InstanceType = "r5ad.24xlarge"
+ InstanceTypeR6gMetal InstanceType = "r6g.metal"
+ InstanceTypeR6gMedium InstanceType = "r6g.medium"
+ InstanceTypeR6gLarge InstanceType = "r6g.large"
+ InstanceTypeR6gXlarge InstanceType = "r6g.xlarge"
+ InstanceTypeR6g2xlarge InstanceType = "r6g.2xlarge"
+ InstanceTypeR6g4xlarge InstanceType = "r6g.4xlarge"
+ InstanceTypeR6g8xlarge InstanceType = "r6g.8xlarge"
+ InstanceTypeR6g12xlarge InstanceType = "r6g.12xlarge"
+ InstanceTypeR6g16xlarge InstanceType = "r6g.16xlarge"
+ InstanceTypeR6gdMetal InstanceType = "r6gd.metal"
+ InstanceTypeR6gdMedium InstanceType = "r6gd.medium"
+ InstanceTypeR6gdLarge InstanceType = "r6gd.large"
+ InstanceTypeR6gdXlarge InstanceType = "r6gd.xlarge"
+ InstanceTypeR6gd2xlarge InstanceType = "r6gd.2xlarge"
+ InstanceTypeR6gd4xlarge InstanceType = "r6gd.4xlarge"
+ InstanceTypeR6gd8xlarge InstanceType = "r6gd.8xlarge"
+ InstanceTypeR6gd12xlarge InstanceType = "r6gd.12xlarge"
+ InstanceTypeR6gd16xlarge InstanceType = "r6gd.16xlarge"
+ InstanceTypeX116xlarge InstanceType = "x1.16xlarge"
+ InstanceTypeX132xlarge InstanceType = "x1.32xlarge"
+ InstanceTypeX1eXlarge InstanceType = "x1e.xlarge"
+ InstanceTypeX1e2xlarge InstanceType = "x1e.2xlarge"
+ InstanceTypeX1e4xlarge InstanceType = "x1e.4xlarge"
+ InstanceTypeX1e8xlarge InstanceType = "x1e.8xlarge"
+ InstanceTypeX1e16xlarge InstanceType = "x1e.16xlarge"
+ InstanceTypeX1e32xlarge InstanceType = "x1e.32xlarge"
+ InstanceTypeI2Xlarge InstanceType = "i2.xlarge"
+ InstanceTypeI22xlarge InstanceType = "i2.2xlarge"
+ InstanceTypeI24xlarge InstanceType = "i2.4xlarge"
+ InstanceTypeI28xlarge InstanceType = "i2.8xlarge"
+ InstanceTypeI3Large InstanceType = "i3.large"
+ InstanceTypeI3Xlarge InstanceType = "i3.xlarge"
+ InstanceTypeI32xlarge InstanceType = "i3.2xlarge"
+ InstanceTypeI34xlarge InstanceType = "i3.4xlarge"
+ InstanceTypeI38xlarge InstanceType = "i3.8xlarge"
+ InstanceTypeI316xlarge InstanceType = "i3.16xlarge"
+ InstanceTypeI3Metal InstanceType = "i3.metal"
+ InstanceTypeI3enLarge InstanceType = "i3en.large"
+ InstanceTypeI3enXlarge InstanceType = "i3en.xlarge"
+ InstanceTypeI3en2xlarge InstanceType = "i3en.2xlarge"
+ InstanceTypeI3en3xlarge InstanceType = "i3en.3xlarge"
+ InstanceTypeI3en6xlarge InstanceType = "i3en.6xlarge"
+ InstanceTypeI3en12xlarge InstanceType = "i3en.12xlarge"
+ InstanceTypeI3en24xlarge InstanceType = "i3en.24xlarge"
+ InstanceTypeI3enMetal InstanceType = "i3en.metal"
+ InstanceTypeHi14xlarge InstanceType = "hi1.4xlarge"
+ InstanceTypeHs18xlarge InstanceType = "hs1.8xlarge"
+ InstanceTypeC1Medium InstanceType = "c1.medium"
+ InstanceTypeC1Xlarge InstanceType = "c1.xlarge"
+ InstanceTypeC3Large InstanceType = "c3.large"
+ InstanceTypeC3Xlarge InstanceType = "c3.xlarge"
+ InstanceTypeC32xlarge InstanceType = "c3.2xlarge"
+ InstanceTypeC34xlarge InstanceType = "c3.4xlarge"
+ InstanceTypeC38xlarge InstanceType = "c3.8xlarge"
+ InstanceTypeC4Large InstanceType = "c4.large"
+ InstanceTypeC4Xlarge InstanceType = "c4.xlarge"
+ InstanceTypeC42xlarge InstanceType = "c4.2xlarge"
+ InstanceTypeC44xlarge InstanceType = "c4.4xlarge"
+ InstanceTypeC48xlarge InstanceType = "c4.8xlarge"
+ InstanceTypeC5Large InstanceType = "c5.large"
+ InstanceTypeC5Xlarge InstanceType = "c5.xlarge"
+ InstanceTypeC52xlarge InstanceType = "c5.2xlarge"
+ InstanceTypeC54xlarge InstanceType = "c5.4xlarge"
+ InstanceTypeC59xlarge InstanceType = "c5.9xlarge"
+ InstanceTypeC512xlarge InstanceType = "c5.12xlarge"
+ InstanceTypeC518xlarge InstanceType = "c5.18xlarge"
+ InstanceTypeC524xlarge InstanceType = "c5.24xlarge"
+ InstanceTypeC5Metal InstanceType = "c5.metal"
+ InstanceTypeC5aLarge InstanceType = "c5a.large"
+ InstanceTypeC5aXlarge InstanceType = "c5a.xlarge"
+ InstanceTypeC5a2xlarge InstanceType = "c5a.2xlarge"
+ InstanceTypeC5a4xlarge InstanceType = "c5a.4xlarge"
+ InstanceTypeC5a8xlarge InstanceType = "c5a.8xlarge"
+ InstanceTypeC5a12xlarge InstanceType = "c5a.12xlarge"
+ InstanceTypeC5a16xlarge InstanceType = "c5a.16xlarge"
+ InstanceTypeC5a24xlarge InstanceType = "c5a.24xlarge"
+ InstanceTypeC5adLarge InstanceType = "c5ad.large"
+ InstanceTypeC5adXlarge InstanceType = "c5ad.xlarge"
+ InstanceTypeC5ad2xlarge InstanceType = "c5ad.2xlarge"
+ InstanceTypeC5ad4xlarge InstanceType = "c5ad.4xlarge"
+ InstanceTypeC5ad8xlarge InstanceType = "c5ad.8xlarge"
+ InstanceTypeC5ad12xlarge InstanceType = "c5ad.12xlarge"
+ InstanceTypeC5ad16xlarge InstanceType = "c5ad.16xlarge"
+ InstanceTypeC5ad24xlarge InstanceType = "c5ad.24xlarge"
+ InstanceTypeC5dLarge InstanceType = "c5d.large"
+ InstanceTypeC5dXlarge InstanceType = "c5d.xlarge"
+ InstanceTypeC5d2xlarge InstanceType = "c5d.2xlarge"
+ InstanceTypeC5d4xlarge InstanceType = "c5d.4xlarge"
+ InstanceTypeC5d9xlarge InstanceType = "c5d.9xlarge"
+ InstanceTypeC5d12xlarge InstanceType = "c5d.12xlarge"
+ InstanceTypeC5d18xlarge InstanceType = "c5d.18xlarge"
+ InstanceTypeC5d24xlarge InstanceType = "c5d.24xlarge"
+ InstanceTypeC5dMetal InstanceType = "c5d.metal"
+ InstanceTypeC5nLarge InstanceType = "c5n.large"
+ InstanceTypeC5nXlarge InstanceType = "c5n.xlarge"
+ InstanceTypeC5n2xlarge InstanceType = "c5n.2xlarge"
+ InstanceTypeC5n4xlarge InstanceType = "c5n.4xlarge"
+ InstanceTypeC5n9xlarge InstanceType = "c5n.9xlarge"
+ InstanceTypeC5n18xlarge InstanceType = "c5n.18xlarge"
+ InstanceTypeC5nMetal InstanceType = "c5n.metal"
+ InstanceTypeC6gMetal InstanceType = "c6g.metal"
+ InstanceTypeC6gMedium InstanceType = "c6g.medium"
+ InstanceTypeC6gLarge InstanceType = "c6g.large"
+ InstanceTypeC6gXlarge InstanceType = "c6g.xlarge"
+ InstanceTypeC6g2xlarge InstanceType = "c6g.2xlarge"
+ InstanceTypeC6g4xlarge InstanceType = "c6g.4xlarge"
+ InstanceTypeC6g8xlarge InstanceType = "c6g.8xlarge"
+ InstanceTypeC6g12xlarge InstanceType = "c6g.12xlarge"
+ InstanceTypeC6g16xlarge InstanceType = "c6g.16xlarge"
+ InstanceTypeC6gdMetal InstanceType = "c6gd.metal"
+ InstanceTypeC6gdMedium InstanceType = "c6gd.medium"
+ InstanceTypeC6gdLarge InstanceType = "c6gd.large"
+ InstanceTypeC6gdXlarge InstanceType = "c6gd.xlarge"
+ InstanceTypeC6gd2xlarge InstanceType = "c6gd.2xlarge"
+ InstanceTypeC6gd4xlarge InstanceType = "c6gd.4xlarge"
+ InstanceTypeC6gd8xlarge InstanceType = "c6gd.8xlarge"
+ InstanceTypeC6gd12xlarge InstanceType = "c6gd.12xlarge"
+ InstanceTypeC6gd16xlarge InstanceType = "c6gd.16xlarge"
+ InstanceTypeC6gnMedium InstanceType = "c6gn.medium"
+ InstanceTypeC6gnLarge InstanceType = "c6gn.large"
+ InstanceTypeC6gnXlarge InstanceType = "c6gn.xlarge"
+ InstanceTypeC6gn2xlarge InstanceType = "c6gn.2xlarge"
+ InstanceTypeC6gn4xlarge InstanceType = "c6gn.4xlarge"
+ InstanceTypeC6gn8xlarge InstanceType = "c6gn.8xlarge"
+ InstanceTypeC6gn12xlarge InstanceType = "c6gn.12xlarge"
+ InstanceTypeC6gn16xlarge InstanceType = "c6gn.16xlarge"
+ InstanceTypeCc14xlarge InstanceType = "cc1.4xlarge"
+ InstanceTypeCc28xlarge InstanceType = "cc2.8xlarge"
+ InstanceTypeG22xlarge InstanceType = "g2.2xlarge"
+ InstanceTypeG28xlarge InstanceType = "g2.8xlarge"
+ InstanceTypeG34xlarge InstanceType = "g3.4xlarge"
+ InstanceTypeG38xlarge InstanceType = "g3.8xlarge"
+ InstanceTypeG316xlarge InstanceType = "g3.16xlarge"
+ InstanceTypeG3sXlarge InstanceType = "g3s.xlarge"
+ InstanceTypeG4adXlarge InstanceType = "g4ad.xlarge"
+ InstanceTypeG4ad2xlarge InstanceType = "g4ad.2xlarge"
+ InstanceTypeG4ad4xlarge InstanceType = "g4ad.4xlarge"
+ InstanceTypeG4ad8xlarge InstanceType = "g4ad.8xlarge"
+ InstanceTypeG4ad16xlarge InstanceType = "g4ad.16xlarge"
+ InstanceTypeG4dnXlarge InstanceType = "g4dn.xlarge"
+ InstanceTypeG4dn2xlarge InstanceType = "g4dn.2xlarge"
+ InstanceTypeG4dn4xlarge InstanceType = "g4dn.4xlarge"
+ InstanceTypeG4dn8xlarge InstanceType = "g4dn.8xlarge"
+ InstanceTypeG4dn12xlarge InstanceType = "g4dn.12xlarge"
+ InstanceTypeG4dn16xlarge InstanceType = "g4dn.16xlarge"
+ InstanceTypeG4dnMetal InstanceType = "g4dn.metal"
+ InstanceTypeCg14xlarge InstanceType = "cg1.4xlarge"
+ InstanceTypeP2Xlarge InstanceType = "p2.xlarge"
+ InstanceTypeP28xlarge InstanceType = "p2.8xlarge"
+ InstanceTypeP216xlarge InstanceType = "p2.16xlarge"
+ InstanceTypeP32xlarge InstanceType = "p3.2xlarge"
+ InstanceTypeP38xlarge InstanceType = "p3.8xlarge"
+ InstanceTypeP316xlarge InstanceType = "p3.16xlarge"
+ InstanceTypeP3dn24xlarge InstanceType = "p3dn.24xlarge"
+ InstanceTypeP4d24xlarge InstanceType = "p4d.24xlarge"
+ InstanceTypeD2Xlarge InstanceType = "d2.xlarge"
+ InstanceTypeD22xlarge InstanceType = "d2.2xlarge"
+ InstanceTypeD24xlarge InstanceType = "d2.4xlarge"
+ InstanceTypeD28xlarge InstanceType = "d2.8xlarge"
+ InstanceTypeD3Xlarge InstanceType = "d3.xlarge"
+ InstanceTypeD32xlarge InstanceType = "d3.2xlarge"
+ InstanceTypeD34xlarge InstanceType = "d3.4xlarge"
+ InstanceTypeD38xlarge InstanceType = "d3.8xlarge"
+ InstanceTypeD3enXlarge InstanceType = "d3en.xlarge"
+ InstanceTypeD3en2xlarge InstanceType = "d3en.2xlarge"
+ InstanceTypeD3en4xlarge InstanceType = "d3en.4xlarge"
+ InstanceTypeD3en6xlarge InstanceType = "d3en.6xlarge"
+ InstanceTypeD3en8xlarge InstanceType = "d3en.8xlarge"
+ InstanceTypeD3en12xlarge InstanceType = "d3en.12xlarge"
+ InstanceTypeF12xlarge InstanceType = "f1.2xlarge"
+ InstanceTypeF14xlarge InstanceType = "f1.4xlarge"
+ InstanceTypeF116xlarge InstanceType = "f1.16xlarge"
+ InstanceTypeM5Large InstanceType = "m5.large"
+ InstanceTypeM5Xlarge InstanceType = "m5.xlarge"
+ InstanceTypeM52xlarge InstanceType = "m5.2xlarge"
+ InstanceTypeM54xlarge InstanceType = "m5.4xlarge"
+ InstanceTypeM58xlarge InstanceType = "m5.8xlarge"
+ InstanceTypeM512xlarge InstanceType = "m5.12xlarge"
+ InstanceTypeM516xlarge InstanceType = "m5.16xlarge"
+ InstanceTypeM524xlarge InstanceType = "m5.24xlarge"
+ InstanceTypeM5Metal InstanceType = "m5.metal"
+ InstanceTypeM5aLarge InstanceType = "m5a.large"
+ InstanceTypeM5aXlarge InstanceType = "m5a.xlarge"
+ InstanceTypeM5a2xlarge InstanceType = "m5a.2xlarge"
+ InstanceTypeM5a4xlarge InstanceType = "m5a.4xlarge"
+ InstanceTypeM5a8xlarge InstanceType = "m5a.8xlarge"
+ InstanceTypeM5a12xlarge InstanceType = "m5a.12xlarge"
+ InstanceTypeM5a16xlarge InstanceType = "m5a.16xlarge"
+ InstanceTypeM5a24xlarge InstanceType = "m5a.24xlarge"
+ InstanceTypeM5dLarge InstanceType = "m5d.large"
+ InstanceTypeM5dXlarge InstanceType = "m5d.xlarge"
+ InstanceTypeM5d2xlarge InstanceType = "m5d.2xlarge"
+ InstanceTypeM5d4xlarge InstanceType = "m5d.4xlarge"
+ InstanceTypeM5d8xlarge InstanceType = "m5d.8xlarge"
+ InstanceTypeM5d12xlarge InstanceType = "m5d.12xlarge"
+ InstanceTypeM5d16xlarge InstanceType = "m5d.16xlarge"
+ InstanceTypeM5d24xlarge InstanceType = "m5d.24xlarge"
+ InstanceTypeM5dMetal InstanceType = "m5d.metal"
+ InstanceTypeM5adLarge InstanceType = "m5ad.large"
+ InstanceTypeM5adXlarge InstanceType = "m5ad.xlarge"
+ InstanceTypeM5ad2xlarge InstanceType = "m5ad.2xlarge"
+ InstanceTypeM5ad4xlarge InstanceType = "m5ad.4xlarge"
+ InstanceTypeM5ad8xlarge InstanceType = "m5ad.8xlarge"
+ InstanceTypeM5ad12xlarge InstanceType = "m5ad.12xlarge"
+ InstanceTypeM5ad16xlarge InstanceType = "m5ad.16xlarge"
+ InstanceTypeM5ad24xlarge InstanceType = "m5ad.24xlarge"
+ InstanceTypeM5znLarge InstanceType = "m5zn.large"
+ InstanceTypeM5znXlarge InstanceType = "m5zn.xlarge"
+ InstanceTypeM5zn2xlarge InstanceType = "m5zn.2xlarge"
+ InstanceTypeM5zn3xlarge InstanceType = "m5zn.3xlarge"
+ InstanceTypeM5zn6xlarge InstanceType = "m5zn.6xlarge"
+ InstanceTypeM5zn12xlarge InstanceType = "m5zn.12xlarge"
+ InstanceTypeM5znMetal InstanceType = "m5zn.metal"
+ InstanceTypeH12xlarge InstanceType = "h1.2xlarge"
+ InstanceTypeH14xlarge InstanceType = "h1.4xlarge"
+ InstanceTypeH18xlarge InstanceType = "h1.8xlarge"
+ InstanceTypeH116xlarge InstanceType = "h1.16xlarge"
+ InstanceTypeZ1dLarge InstanceType = "z1d.large"
+ InstanceTypeZ1dXlarge InstanceType = "z1d.xlarge"
+ InstanceTypeZ1d2xlarge InstanceType = "z1d.2xlarge"
+ InstanceTypeZ1d3xlarge InstanceType = "z1d.3xlarge"
+ InstanceTypeZ1d6xlarge InstanceType = "z1d.6xlarge"
+ InstanceTypeZ1d12xlarge InstanceType = "z1d.12xlarge"
+ InstanceTypeZ1dMetal InstanceType = "z1d.metal"
+ InstanceTypeU6tb156xlarge InstanceType = "u-6tb1.56xlarge"
+ InstanceTypeU6tb1112xlarge InstanceType = "u-6tb1.112xlarge"
+ InstanceTypeU9tb1112xlarge InstanceType = "u-9tb1.112xlarge"
+ InstanceTypeU12tb1112xlarge InstanceType = "u-12tb1.112xlarge"
+ InstanceTypeU6tb1Metal InstanceType = "u-6tb1.metal"
+ InstanceTypeU9tb1Metal InstanceType = "u-9tb1.metal"
+ InstanceTypeU12tb1Metal InstanceType = "u-12tb1.metal"
+ InstanceTypeU18tb1Metal InstanceType = "u-18tb1.metal"
+ InstanceTypeU24tb1Metal InstanceType = "u-24tb1.metal"
+ InstanceTypeA1Medium InstanceType = "a1.medium"
+ InstanceTypeA1Large InstanceType = "a1.large"
+ InstanceTypeA1Xlarge InstanceType = "a1.xlarge"
+ InstanceTypeA12xlarge InstanceType = "a1.2xlarge"
+ InstanceTypeA14xlarge InstanceType = "a1.4xlarge"
+ InstanceTypeA1Metal InstanceType = "a1.metal"
+ InstanceTypeM5dnLarge InstanceType = "m5dn.large"
+ InstanceTypeM5dnXlarge InstanceType = "m5dn.xlarge"
+ InstanceTypeM5dn2xlarge InstanceType = "m5dn.2xlarge"
+ InstanceTypeM5dn4xlarge InstanceType = "m5dn.4xlarge"
+ InstanceTypeM5dn8xlarge InstanceType = "m5dn.8xlarge"
+ InstanceTypeM5dn12xlarge InstanceType = "m5dn.12xlarge"
+ InstanceTypeM5dn16xlarge InstanceType = "m5dn.16xlarge"
+ InstanceTypeM5dn24xlarge InstanceType = "m5dn.24xlarge"
+ InstanceTypeM5dnMetal InstanceType = "m5dn.metal"
+ InstanceTypeM5nLarge InstanceType = "m5n.large"
+ InstanceTypeM5nXlarge InstanceType = "m5n.xlarge"
+ InstanceTypeM5n2xlarge InstanceType = "m5n.2xlarge"
+ InstanceTypeM5n4xlarge InstanceType = "m5n.4xlarge"
+ InstanceTypeM5n8xlarge InstanceType = "m5n.8xlarge"
+ InstanceTypeM5n12xlarge InstanceType = "m5n.12xlarge"
+ InstanceTypeM5n16xlarge InstanceType = "m5n.16xlarge"
+ InstanceTypeM5n24xlarge InstanceType = "m5n.24xlarge"
+ InstanceTypeM5nMetal InstanceType = "m5n.metal"
+ InstanceTypeR5dnLarge InstanceType = "r5dn.large"
+ InstanceTypeR5dnXlarge InstanceType = "r5dn.xlarge"
+ InstanceTypeR5dn2xlarge InstanceType = "r5dn.2xlarge"
+ InstanceTypeR5dn4xlarge InstanceType = "r5dn.4xlarge"
+ InstanceTypeR5dn8xlarge InstanceType = "r5dn.8xlarge"
+ InstanceTypeR5dn12xlarge InstanceType = "r5dn.12xlarge"
+ InstanceTypeR5dn16xlarge InstanceType = "r5dn.16xlarge"
+ InstanceTypeR5dn24xlarge InstanceType = "r5dn.24xlarge"
+ InstanceTypeR5dnMetal InstanceType = "r5dn.metal"
+ InstanceTypeR5nLarge InstanceType = "r5n.large"
+ InstanceTypeR5nXlarge InstanceType = "r5n.xlarge"
+ InstanceTypeR5n2xlarge InstanceType = "r5n.2xlarge"
+ InstanceTypeR5n4xlarge InstanceType = "r5n.4xlarge"
+ InstanceTypeR5n8xlarge InstanceType = "r5n.8xlarge"
+ InstanceTypeR5n12xlarge InstanceType = "r5n.12xlarge"
+ InstanceTypeR5n16xlarge InstanceType = "r5n.16xlarge"
+ InstanceTypeR5n24xlarge InstanceType = "r5n.24xlarge"
+ InstanceTypeR5nMetal InstanceType = "r5n.metal"
+ InstanceTypeInf1Xlarge InstanceType = "inf1.xlarge"
+ InstanceTypeInf12xlarge InstanceType = "inf1.2xlarge"
+ InstanceTypeInf16xlarge InstanceType = "inf1.6xlarge"
+ InstanceTypeInf124xlarge InstanceType = "inf1.24xlarge"
+ InstanceTypeM6gMetal InstanceType = "m6g.metal"
+ InstanceTypeM6gMedium InstanceType = "m6g.medium"
+ InstanceTypeM6gLarge InstanceType = "m6g.large"
+ InstanceTypeM6gXlarge InstanceType = "m6g.xlarge"
+ InstanceTypeM6g2xlarge InstanceType = "m6g.2xlarge"
+ InstanceTypeM6g4xlarge InstanceType = "m6g.4xlarge"
+ InstanceTypeM6g8xlarge InstanceType = "m6g.8xlarge"
+ InstanceTypeM6g12xlarge InstanceType = "m6g.12xlarge"
+ InstanceTypeM6g16xlarge InstanceType = "m6g.16xlarge"
+ InstanceTypeM6gdMetal InstanceType = "m6gd.metal"
+ InstanceTypeM6gdMedium InstanceType = "m6gd.medium"
+ InstanceTypeM6gdLarge InstanceType = "m6gd.large"
+ InstanceTypeM6gdXlarge InstanceType = "m6gd.xlarge"
+ InstanceTypeM6gd2xlarge InstanceType = "m6gd.2xlarge"
+ InstanceTypeM6gd4xlarge InstanceType = "m6gd.4xlarge"
+ InstanceTypeM6gd8xlarge InstanceType = "m6gd.8xlarge"
+ InstanceTypeM6gd12xlarge InstanceType = "m6gd.12xlarge"
+ InstanceTypeM6gd16xlarge InstanceType = "m6gd.16xlarge"
+ InstanceTypeM6iLarge InstanceType = "m6i.large"
+ InstanceTypeM6iXlarge InstanceType = "m6i.xlarge"
+ InstanceTypeM6i2xlarge InstanceType = "m6i.2xlarge"
+ InstanceTypeM6i4xlarge InstanceType = "m6i.4xlarge"
+ InstanceTypeM6i8xlarge InstanceType = "m6i.8xlarge"
+ InstanceTypeM6i12xlarge InstanceType = "m6i.12xlarge"
+ InstanceTypeM6i16xlarge InstanceType = "m6i.16xlarge"
+ InstanceTypeM6i24xlarge InstanceType = "m6i.24xlarge"
+ InstanceTypeM6i32xlarge InstanceType = "m6i.32xlarge"
+ InstanceTypeMac1Metal InstanceType = "mac1.metal"
+ InstanceTypeX2gdMedium InstanceType = "x2gd.medium"
+ InstanceTypeX2gdLarge InstanceType = "x2gd.large"
+ InstanceTypeX2gdXlarge InstanceType = "x2gd.xlarge"
+ InstanceTypeX2gd2xlarge InstanceType = "x2gd.2xlarge"
+ InstanceTypeX2gd4xlarge InstanceType = "x2gd.4xlarge"
+ InstanceTypeX2gd8xlarge InstanceType = "x2gd.8xlarge"
+ InstanceTypeX2gd12xlarge InstanceType = "x2gd.12xlarge"
+ InstanceTypeX2gd16xlarge InstanceType = "x2gd.16xlarge"
+ InstanceTypeX2gdMetal InstanceType = "x2gd.metal"
+ InstanceTypeVt13xlarge InstanceType = "vt1.3xlarge"
+ InstanceTypeVt16xlarge InstanceType = "vt1.6xlarge"
+ InstanceTypeVt124xlarge InstanceType = "vt1.24xlarge"
+)
+
+// Values returns all known values for InstanceType. 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 (InstanceType) Values() []InstanceType {
+ return []InstanceType{
+ "t1.micro",
+ "t2.nano",
+ "t2.micro",
+ "t2.small",
+ "t2.medium",
+ "t2.large",
+ "t2.xlarge",
+ "t2.2xlarge",
+ "t3.nano",
+ "t3.micro",
+ "t3.small",
+ "t3.medium",
+ "t3.large",
+ "t3.xlarge",
+ "t3.2xlarge",
+ "t3a.nano",
+ "t3a.micro",
+ "t3a.small",
+ "t3a.medium",
+ "t3a.large",
+ "t3a.xlarge",
+ "t3a.2xlarge",
+ "t4g.nano",
+ "t4g.micro",
+ "t4g.small",
+ "t4g.medium",
+ "t4g.large",
+ "t4g.xlarge",
+ "t4g.2xlarge",
+ "m1.small",
+ "m1.medium",
+ "m1.large",
+ "m1.xlarge",
+ "m3.medium",
+ "m3.large",
+ "m3.xlarge",
+ "m3.2xlarge",
+ "m4.large",
+ "m4.xlarge",
+ "m4.2xlarge",
+ "m4.4xlarge",
+ "m4.10xlarge",
+ "m4.16xlarge",
+ "m2.xlarge",
+ "m2.2xlarge",
+ "m2.4xlarge",
+ "cr1.8xlarge",
+ "r3.large",
+ "r3.xlarge",
+ "r3.2xlarge",
+ "r3.4xlarge",
+ "r3.8xlarge",
+ "r4.large",
+ "r4.xlarge",
+ "r4.2xlarge",
+ "r4.4xlarge",
+ "r4.8xlarge",
+ "r4.16xlarge",
+ "r5.large",
+ "r5.xlarge",
+ "r5.2xlarge",
+ "r5.4xlarge",
+ "r5.8xlarge",
+ "r5.12xlarge",
+ "r5.16xlarge",
+ "r5.24xlarge",
+ "r5.metal",
+ "r5a.large",
+ "r5a.xlarge",
+ "r5a.2xlarge",
+ "r5a.4xlarge",
+ "r5a.8xlarge",
+ "r5a.12xlarge",
+ "r5a.16xlarge",
+ "r5a.24xlarge",
+ "r5b.large",
+ "r5b.xlarge",
+ "r5b.2xlarge",
+ "r5b.4xlarge",
+ "r5b.8xlarge",
+ "r5b.12xlarge",
+ "r5b.16xlarge",
+ "r5b.24xlarge",
+ "r5b.metal",
+ "r5d.large",
+ "r5d.xlarge",
+ "r5d.2xlarge",
+ "r5d.4xlarge",
+ "r5d.8xlarge",
+ "r5d.12xlarge",
+ "r5d.16xlarge",
+ "r5d.24xlarge",
+ "r5d.metal",
+ "r5ad.large",
+ "r5ad.xlarge",
+ "r5ad.2xlarge",
+ "r5ad.4xlarge",
+ "r5ad.8xlarge",
+ "r5ad.12xlarge",
+ "r5ad.16xlarge",
+ "r5ad.24xlarge",
+ "r6g.metal",
+ "r6g.medium",
+ "r6g.large",
+ "r6g.xlarge",
+ "r6g.2xlarge",
+ "r6g.4xlarge",
+ "r6g.8xlarge",
+ "r6g.12xlarge",
+ "r6g.16xlarge",
+ "r6gd.metal",
+ "r6gd.medium",
+ "r6gd.large",
+ "r6gd.xlarge",
+ "r6gd.2xlarge",
+ "r6gd.4xlarge",
+ "r6gd.8xlarge",
+ "r6gd.12xlarge",
+ "r6gd.16xlarge",
+ "x1.16xlarge",
+ "x1.32xlarge",
+ "x1e.xlarge",
+ "x1e.2xlarge",
+ "x1e.4xlarge",
+ "x1e.8xlarge",
+ "x1e.16xlarge",
+ "x1e.32xlarge",
+ "i2.xlarge",
+ "i2.2xlarge",
+ "i2.4xlarge",
+ "i2.8xlarge",
+ "i3.large",
+ "i3.xlarge",
+ "i3.2xlarge",
+ "i3.4xlarge",
+ "i3.8xlarge",
+ "i3.16xlarge",
+ "i3.metal",
+ "i3en.large",
+ "i3en.xlarge",
+ "i3en.2xlarge",
+ "i3en.3xlarge",
+ "i3en.6xlarge",
+ "i3en.12xlarge",
+ "i3en.24xlarge",
+ "i3en.metal",
+ "hi1.4xlarge",
+ "hs1.8xlarge",
+ "c1.medium",
+ "c1.xlarge",
+ "c3.large",
+ "c3.xlarge",
+ "c3.2xlarge",
+ "c3.4xlarge",
+ "c3.8xlarge",
+ "c4.large",
+ "c4.xlarge",
+ "c4.2xlarge",
+ "c4.4xlarge",
+ "c4.8xlarge",
+ "c5.large",
+ "c5.xlarge",
+ "c5.2xlarge",
+ "c5.4xlarge",
+ "c5.9xlarge",
+ "c5.12xlarge",
+ "c5.18xlarge",
+ "c5.24xlarge",
+ "c5.metal",
+ "c5a.large",
+ "c5a.xlarge",
+ "c5a.2xlarge",
+ "c5a.4xlarge",
+ "c5a.8xlarge",
+ "c5a.12xlarge",
+ "c5a.16xlarge",
+ "c5a.24xlarge",
+ "c5ad.large",
+ "c5ad.xlarge",
+ "c5ad.2xlarge",
+ "c5ad.4xlarge",
+ "c5ad.8xlarge",
+ "c5ad.12xlarge",
+ "c5ad.16xlarge",
+ "c5ad.24xlarge",
+ "c5d.large",
+ "c5d.xlarge",
+ "c5d.2xlarge",
+ "c5d.4xlarge",
+ "c5d.9xlarge",
+ "c5d.12xlarge",
+ "c5d.18xlarge",
+ "c5d.24xlarge",
+ "c5d.metal",
+ "c5n.large",
+ "c5n.xlarge",
+ "c5n.2xlarge",
+ "c5n.4xlarge",
+ "c5n.9xlarge",
+ "c5n.18xlarge",
+ "c5n.metal",
+ "c6g.metal",
+ "c6g.medium",
+ "c6g.large",
+ "c6g.xlarge",
+ "c6g.2xlarge",
+ "c6g.4xlarge",
+ "c6g.8xlarge",
+ "c6g.12xlarge",
+ "c6g.16xlarge",
+ "c6gd.metal",
+ "c6gd.medium",
+ "c6gd.large",
+ "c6gd.xlarge",
+ "c6gd.2xlarge",
+ "c6gd.4xlarge",
+ "c6gd.8xlarge",
+ "c6gd.12xlarge",
+ "c6gd.16xlarge",
+ "c6gn.medium",
+ "c6gn.large",
+ "c6gn.xlarge",
+ "c6gn.2xlarge",
+ "c6gn.4xlarge",
+ "c6gn.8xlarge",
+ "c6gn.12xlarge",
+ "c6gn.16xlarge",
+ "cc1.4xlarge",
+ "cc2.8xlarge",
+ "g2.2xlarge",
+ "g2.8xlarge",
+ "g3.4xlarge",
+ "g3.8xlarge",
+ "g3.16xlarge",
+ "g3s.xlarge",
+ "g4ad.xlarge",
+ "g4ad.2xlarge",
+ "g4ad.4xlarge",
+ "g4ad.8xlarge",
+ "g4ad.16xlarge",
+ "g4dn.xlarge",
+ "g4dn.2xlarge",
+ "g4dn.4xlarge",
+ "g4dn.8xlarge",
+ "g4dn.12xlarge",
+ "g4dn.16xlarge",
+ "g4dn.metal",
+ "cg1.4xlarge",
+ "p2.xlarge",
+ "p2.8xlarge",
+ "p2.16xlarge",
+ "p3.2xlarge",
+ "p3.8xlarge",
+ "p3.16xlarge",
+ "p3dn.24xlarge",
+ "p4d.24xlarge",
+ "d2.xlarge",
+ "d2.2xlarge",
+ "d2.4xlarge",
+ "d2.8xlarge",
+ "d3.xlarge",
+ "d3.2xlarge",
+ "d3.4xlarge",
+ "d3.8xlarge",
+ "d3en.xlarge",
+ "d3en.2xlarge",
+ "d3en.4xlarge",
+ "d3en.6xlarge",
+ "d3en.8xlarge",
+ "d3en.12xlarge",
+ "f1.2xlarge",
+ "f1.4xlarge",
+ "f1.16xlarge",
+ "m5.large",
+ "m5.xlarge",
+ "m5.2xlarge",
+ "m5.4xlarge",
+ "m5.8xlarge",
+ "m5.12xlarge",
+ "m5.16xlarge",
+ "m5.24xlarge",
+ "m5.metal",
+ "m5a.large",
+ "m5a.xlarge",
+ "m5a.2xlarge",
+ "m5a.4xlarge",
+ "m5a.8xlarge",
+ "m5a.12xlarge",
+ "m5a.16xlarge",
+ "m5a.24xlarge",
+ "m5d.large",
+ "m5d.xlarge",
+ "m5d.2xlarge",
+ "m5d.4xlarge",
+ "m5d.8xlarge",
+ "m5d.12xlarge",
+ "m5d.16xlarge",
+ "m5d.24xlarge",
+ "m5d.metal",
+ "m5ad.large",
+ "m5ad.xlarge",
+ "m5ad.2xlarge",
+ "m5ad.4xlarge",
+ "m5ad.8xlarge",
+ "m5ad.12xlarge",
+ "m5ad.16xlarge",
+ "m5ad.24xlarge",
+ "m5zn.large",
+ "m5zn.xlarge",
+ "m5zn.2xlarge",
+ "m5zn.3xlarge",
+ "m5zn.6xlarge",
+ "m5zn.12xlarge",
+ "m5zn.metal",
+ "h1.2xlarge",
+ "h1.4xlarge",
+ "h1.8xlarge",
+ "h1.16xlarge",
+ "z1d.large",
+ "z1d.xlarge",
+ "z1d.2xlarge",
+ "z1d.3xlarge",
+ "z1d.6xlarge",
+ "z1d.12xlarge",
+ "z1d.metal",
+ "u-6tb1.56xlarge",
+ "u-6tb1.112xlarge",
+ "u-9tb1.112xlarge",
+ "u-12tb1.112xlarge",
+ "u-6tb1.metal",
+ "u-9tb1.metal",
+ "u-12tb1.metal",
+ "u-18tb1.metal",
+ "u-24tb1.metal",
+ "a1.medium",
+ "a1.large",
+ "a1.xlarge",
+ "a1.2xlarge",
+ "a1.4xlarge",
+ "a1.metal",
+ "m5dn.large",
+ "m5dn.xlarge",
+ "m5dn.2xlarge",
+ "m5dn.4xlarge",
+ "m5dn.8xlarge",
+ "m5dn.12xlarge",
+ "m5dn.16xlarge",
+ "m5dn.24xlarge",
+ "m5dn.metal",
+ "m5n.large",
+ "m5n.xlarge",
+ "m5n.2xlarge",
+ "m5n.4xlarge",
+ "m5n.8xlarge",
+ "m5n.12xlarge",
+ "m5n.16xlarge",
+ "m5n.24xlarge",
+ "m5n.metal",
+ "r5dn.large",
+ "r5dn.xlarge",
+ "r5dn.2xlarge",
+ "r5dn.4xlarge",
+ "r5dn.8xlarge",
+ "r5dn.12xlarge",
+ "r5dn.16xlarge",
+ "r5dn.24xlarge",
+ "r5dn.metal",
+ "r5n.large",
+ "r5n.xlarge",
+ "r5n.2xlarge",
+ "r5n.4xlarge",
+ "r5n.8xlarge",
+ "r5n.12xlarge",
+ "r5n.16xlarge",
+ "r5n.24xlarge",
+ "r5n.metal",
+ "inf1.xlarge",
+ "inf1.2xlarge",
+ "inf1.6xlarge",
+ "inf1.24xlarge",
+ "m6g.metal",
+ "m6g.medium",
+ "m6g.large",
+ "m6g.xlarge",
+ "m6g.2xlarge",
+ "m6g.4xlarge",
+ "m6g.8xlarge",
+ "m6g.12xlarge",
+ "m6g.16xlarge",
+ "m6gd.metal",
+ "m6gd.medium",
+ "m6gd.large",
+ "m6gd.xlarge",
+ "m6gd.2xlarge",
+ "m6gd.4xlarge",
+ "m6gd.8xlarge",
+ "m6gd.12xlarge",
+ "m6gd.16xlarge",
+ "m6i.large",
+ "m6i.xlarge",
+ "m6i.2xlarge",
+ "m6i.4xlarge",
+ "m6i.8xlarge",
+ "m6i.12xlarge",
+ "m6i.16xlarge",
+ "m6i.24xlarge",
+ "m6i.32xlarge",
+ "mac1.metal",
+ "x2gd.medium",
+ "x2gd.large",
+ "x2gd.xlarge",
+ "x2gd.2xlarge",
+ "x2gd.4xlarge",
+ "x2gd.8xlarge",
+ "x2gd.12xlarge",
+ "x2gd.16xlarge",
+ "x2gd.metal",
+ "vt1.3xlarge",
+ "vt1.6xlarge",
+ "vt1.24xlarge",
+ }
+}
+
+type InstanceTypeHypervisor string
+
+// Enum values for InstanceTypeHypervisor
+const (
+ InstanceTypeHypervisorNitro InstanceTypeHypervisor = "nitro"
+ InstanceTypeHypervisorXen InstanceTypeHypervisor = "xen"
+)
+
+// Values returns all known values for InstanceTypeHypervisor. 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 (InstanceTypeHypervisor) Values() []InstanceTypeHypervisor {
+ return []InstanceTypeHypervisor{
+ "nitro",
+ "xen",
+ }
+}
+
+type InterfacePermissionType string
+
+// Enum values for InterfacePermissionType
+const (
+ InterfacePermissionTypeInstanceAttach InterfacePermissionType = "INSTANCE-ATTACH"
+ InterfacePermissionTypeEipAssociate InterfacePermissionType = "EIP-ASSOCIATE"
+)
+
+// Values returns all known values for InterfacePermissionType. 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 (InterfacePermissionType) Values() []InterfacePermissionType {
+ return []InterfacePermissionType{
+ "INSTANCE-ATTACH",
+ "EIP-ASSOCIATE",
+ }
+}
+
+type InterfaceProtocolType string
+
+// Enum values for InterfaceProtocolType
+const (
+ InterfaceProtocolTypeVlan InterfaceProtocolType = "VLAN"
+ InterfaceProtocolTypeGre InterfaceProtocolType = "GRE"
+)
+
+// Values returns all known values for InterfaceProtocolType. 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 (InterfaceProtocolType) Values() []InterfaceProtocolType {
+ return []InterfaceProtocolType{
+ "VLAN",
+ "GRE",
+ }
+}
+
+type Ipv6SupportValue string
+
+// Enum values for Ipv6SupportValue
+const (
+ Ipv6SupportValueEnable Ipv6SupportValue = "enable"
+ Ipv6SupportValueDisable Ipv6SupportValue = "disable"
+)
+
+// Values returns all known values for Ipv6SupportValue. 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 (Ipv6SupportValue) Values() []Ipv6SupportValue {
+ return []Ipv6SupportValue{
+ "enable",
+ "disable",
+ }
+}
+
+type KeyType string
+
+// Enum values for KeyType
+const (
+ KeyTypeRsa KeyType = "rsa"
+ KeyTypeEd25519 KeyType = "ed25519"
+)
+
+// Values returns all known values for KeyType. 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 (KeyType) Values() []KeyType {
+ return []KeyType{
+ "rsa",
+ "ed25519",
+ }
+}
+
+type LaunchTemplateErrorCode string
+
+// Enum values for LaunchTemplateErrorCode
+const (
+ LaunchTemplateErrorCodeLaunchTemplateIdDoesNotExist LaunchTemplateErrorCode = "launchTemplateIdDoesNotExist"
+ LaunchTemplateErrorCodeLaunchTemplateIdMalformed LaunchTemplateErrorCode = "launchTemplateIdMalformed"
+ LaunchTemplateErrorCodeLaunchTemplateNameDoesNotExist LaunchTemplateErrorCode = "launchTemplateNameDoesNotExist"
+ LaunchTemplateErrorCodeLaunchTemplateNameMalformed LaunchTemplateErrorCode = "launchTemplateNameMalformed"
+ LaunchTemplateErrorCodeLaunchTemplateVersionDoesNotExist LaunchTemplateErrorCode = "launchTemplateVersionDoesNotExist"
+ LaunchTemplateErrorCodeUnexpectedError LaunchTemplateErrorCode = "unexpectedError"
+)
+
+// Values returns all known values for LaunchTemplateErrorCode. 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 (LaunchTemplateErrorCode) Values() []LaunchTemplateErrorCode {
+ return []LaunchTemplateErrorCode{
+ "launchTemplateIdDoesNotExist",
+ "launchTemplateIdMalformed",
+ "launchTemplateNameDoesNotExist",
+ "launchTemplateNameMalformed",
+ "launchTemplateVersionDoesNotExist",
+ "unexpectedError",
+ }
+}
+
+type LaunchTemplateHttpTokensState string
+
+// Enum values for LaunchTemplateHttpTokensState
+const (
+ LaunchTemplateHttpTokensStateOptional LaunchTemplateHttpTokensState = "optional"
+ LaunchTemplateHttpTokensStateRequired LaunchTemplateHttpTokensState = "required"
+)
+
+// Values returns all known values for LaunchTemplateHttpTokensState. 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 (LaunchTemplateHttpTokensState) Values() []LaunchTemplateHttpTokensState {
+ return []LaunchTemplateHttpTokensState{
+ "optional",
+ "required",
+ }
+}
+
+type LaunchTemplateInstanceMetadataEndpointState string
+
+// Enum values for LaunchTemplateInstanceMetadataEndpointState
+const (
+ LaunchTemplateInstanceMetadataEndpointStateDisabled LaunchTemplateInstanceMetadataEndpointState = "disabled"
+ LaunchTemplateInstanceMetadataEndpointStateEnabled LaunchTemplateInstanceMetadataEndpointState = "enabled"
+)
+
+// Values returns all known values for LaunchTemplateInstanceMetadataEndpointState.
+// 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 (LaunchTemplateInstanceMetadataEndpointState) Values() []LaunchTemplateInstanceMetadataEndpointState {
+ return []LaunchTemplateInstanceMetadataEndpointState{
+ "disabled",
+ "enabled",
+ }
+}
+
+type LaunchTemplateInstanceMetadataOptionsState string
+
+// Enum values for LaunchTemplateInstanceMetadataOptionsState
+const (
+ LaunchTemplateInstanceMetadataOptionsStatePending LaunchTemplateInstanceMetadataOptionsState = "pending"
+ LaunchTemplateInstanceMetadataOptionsStateApplied LaunchTemplateInstanceMetadataOptionsState = "applied"
+)
+
+// Values returns all known values for LaunchTemplateInstanceMetadataOptionsState.
+// 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 (LaunchTemplateInstanceMetadataOptionsState) Values() []LaunchTemplateInstanceMetadataOptionsState {
+ return []LaunchTemplateInstanceMetadataOptionsState{
+ "pending",
+ "applied",
+ }
+}
+
+type LaunchTemplateInstanceMetadataProtocolIpv6 string
+
+// Enum values for LaunchTemplateInstanceMetadataProtocolIpv6
+const (
+ LaunchTemplateInstanceMetadataProtocolIpv6Disabled LaunchTemplateInstanceMetadataProtocolIpv6 = "disabled"
+ LaunchTemplateInstanceMetadataProtocolIpv6Enabled LaunchTemplateInstanceMetadataProtocolIpv6 = "enabled"
+)
+
+// Values returns all known values for LaunchTemplateInstanceMetadataProtocolIpv6.
+// 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 (LaunchTemplateInstanceMetadataProtocolIpv6) Values() []LaunchTemplateInstanceMetadataProtocolIpv6 {
+ return []LaunchTemplateInstanceMetadataProtocolIpv6{
+ "disabled",
+ "enabled",
+ }
+}
+
+type ListingState string
+
+// Enum values for ListingState
+const (
+ ListingStateAvailable ListingState = "available"
+ ListingStateSold ListingState = "sold"
+ ListingStateCancelled ListingState = "cancelled"
+ ListingStatePending ListingState = "pending"
+)
+
+// Values returns all known values for ListingState. 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 (ListingState) Values() []ListingState {
+ return []ListingState{
+ "available",
+ "sold",
+ "cancelled",
+ "pending",
+ }
+}
+
+type ListingStatus string
+
+// Enum values for ListingStatus
+const (
+ ListingStatusActive ListingStatus = "active"
+ ListingStatusPending ListingStatus = "pending"
+ ListingStatusCancelled ListingStatus = "cancelled"
+ ListingStatusClosed ListingStatus = "closed"
+)
+
+// Values returns all known values for ListingStatus. 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 (ListingStatus) Values() []ListingStatus {
+ return []ListingStatus{
+ "active",
+ "pending",
+ "cancelled",
+ "closed",
+ }
+}
+
+type LocalGatewayRouteState string
+
+// Enum values for LocalGatewayRouteState
+const (
+ LocalGatewayRouteStatePending LocalGatewayRouteState = "pending"
+ LocalGatewayRouteStateActive LocalGatewayRouteState = "active"
+ LocalGatewayRouteStateBlackhole LocalGatewayRouteState = "blackhole"
+ LocalGatewayRouteStateDeleting LocalGatewayRouteState = "deleting"
+ LocalGatewayRouteStateDeleted LocalGatewayRouteState = "deleted"
+)
+
+// Values returns all known values for LocalGatewayRouteState. 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 (LocalGatewayRouteState) Values() []LocalGatewayRouteState {
+ return []LocalGatewayRouteState{
+ "pending",
+ "active",
+ "blackhole",
+ "deleting",
+ "deleted",
+ }
+}
+
+type LocalGatewayRouteType string
+
+// Enum values for LocalGatewayRouteType
+const (
+ LocalGatewayRouteTypeStatic LocalGatewayRouteType = "static"
+ LocalGatewayRouteTypePropagated LocalGatewayRouteType = "propagated"
+)
+
+// Values returns all known values for LocalGatewayRouteType. 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 (LocalGatewayRouteType) Values() []LocalGatewayRouteType {
+ return []LocalGatewayRouteType{
+ "static",
+ "propagated",
+ }
+}
+
+type LocationType string
+
+// Enum values for LocationType
+const (
+ LocationTypeRegion LocationType = "region"
+ LocationTypeAvailabilityZone LocationType = "availability-zone"
+ LocationTypeAvailabilityZoneId LocationType = "availability-zone-id"
+)
+
+// Values returns all known values for LocationType. 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 (LocationType) Values() []LocationType {
+ return []LocationType{
+ "region",
+ "availability-zone",
+ "availability-zone-id",
+ }
+}
+
+type LogDestinationType string
+
+// Enum values for LogDestinationType
+const (
+ LogDestinationTypeCloudWatchLogs LogDestinationType = "cloud-watch-logs"
+ LogDestinationTypeS3 LogDestinationType = "s3"
+)
+
+// Values returns all known values for LogDestinationType. 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 (LogDestinationType) Values() []LogDestinationType {
+ return []LogDestinationType{
+ "cloud-watch-logs",
+ "s3",
+ }
+}
+
+type MarketType string
+
+// Enum values for MarketType
+const (
+ MarketTypeSpot MarketType = "spot"
+)
+
+// Values returns all known values for MarketType. 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 (MarketType) Values() []MarketType {
+ return []MarketType{
+ "spot",
+ }
+}
+
+type MembershipType string
+
+// Enum values for MembershipType
+const (
+ MembershipTypeStatic MembershipType = "static"
+ MembershipTypeIgmp MembershipType = "igmp"
+)
+
+// Values returns all known values for MembershipType. 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 (MembershipType) Values() []MembershipType {
+ return []MembershipType{
+ "static",
+ "igmp",
+ }
+}
+
+type ModifyAvailabilityZoneOptInStatus string
+
+// Enum values for ModifyAvailabilityZoneOptInStatus
+const (
+ ModifyAvailabilityZoneOptInStatusOptedIn ModifyAvailabilityZoneOptInStatus = "opted-in"
+ ModifyAvailabilityZoneOptInStatusNotOptedIn ModifyAvailabilityZoneOptInStatus = "not-opted-in"
+)
+
+// Values returns all known values for ModifyAvailabilityZoneOptInStatus. 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 (ModifyAvailabilityZoneOptInStatus) Values() []ModifyAvailabilityZoneOptInStatus {
+ return []ModifyAvailabilityZoneOptInStatus{
+ "opted-in",
+ "not-opted-in",
+ }
+}
+
+type MonitoringState string
+
+// Enum values for MonitoringState
+const (
+ MonitoringStateDisabled MonitoringState = "disabled"
+ MonitoringStateDisabling MonitoringState = "disabling"
+ MonitoringStateEnabled MonitoringState = "enabled"
+ MonitoringStatePending MonitoringState = "pending"
+)
+
+// Values returns all known values for MonitoringState. 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 (MonitoringState) Values() []MonitoringState {
+ return []MonitoringState{
+ "disabled",
+ "disabling",
+ "enabled",
+ "pending",
+ }
+}
+
+type MoveStatus string
+
+// Enum values for MoveStatus
+const (
+ MoveStatusMovingToVpc MoveStatus = "movingToVpc"
+ MoveStatusRestoringToClassic MoveStatus = "restoringToClassic"
+)
+
+// Values returns all known values for MoveStatus. 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 (MoveStatus) Values() []MoveStatus {
+ return []MoveStatus{
+ "movingToVpc",
+ "restoringToClassic",
+ }
+}
+
+type MulticastSupportValue string
+
+// Enum values for MulticastSupportValue
+const (
+ MulticastSupportValueEnable MulticastSupportValue = "enable"
+ MulticastSupportValueDisable MulticastSupportValue = "disable"
+)
+
+// Values returns all known values for MulticastSupportValue. 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 (MulticastSupportValue) Values() []MulticastSupportValue {
+ return []MulticastSupportValue{
+ "enable",
+ "disable",
+ }
+}
+
+type NatGatewayState string
+
+// Enum values for NatGatewayState
+const (
+ NatGatewayStatePending NatGatewayState = "pending"
+ NatGatewayStateFailed NatGatewayState = "failed"
+ NatGatewayStateAvailable NatGatewayState = "available"
+ NatGatewayStateDeleting NatGatewayState = "deleting"
+ NatGatewayStateDeleted NatGatewayState = "deleted"
+)
+
+// Values returns all known values for NatGatewayState. 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 (NatGatewayState) Values() []NatGatewayState {
+ return []NatGatewayState{
+ "pending",
+ "failed",
+ "available",
+ "deleting",
+ "deleted",
+ }
+}
+
+type NetworkInterfaceAttribute string
+
+// Enum values for NetworkInterfaceAttribute
+const (
+ NetworkInterfaceAttributeDescription NetworkInterfaceAttribute = "description"
+ NetworkInterfaceAttributeGroupSet NetworkInterfaceAttribute = "groupSet"
+ NetworkInterfaceAttributeSourceDestCheck NetworkInterfaceAttribute = "sourceDestCheck"
+ NetworkInterfaceAttributeAttachment NetworkInterfaceAttribute = "attachment"
+)
+
+// Values returns all known values for NetworkInterfaceAttribute. 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 (NetworkInterfaceAttribute) Values() []NetworkInterfaceAttribute {
+ return []NetworkInterfaceAttribute{
+ "description",
+ "groupSet",
+ "sourceDestCheck",
+ "attachment",
+ }
+}
+
+type NetworkInterfaceCreationType string
+
+// Enum values for NetworkInterfaceCreationType
+const (
+ NetworkInterfaceCreationTypeEfa NetworkInterfaceCreationType = "efa"
+ NetworkInterfaceCreationTypeBranch NetworkInterfaceCreationType = "branch"
+ NetworkInterfaceCreationTypeTrunk NetworkInterfaceCreationType = "trunk"
+)
+
+// Values returns all known values for NetworkInterfaceCreationType. 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 (NetworkInterfaceCreationType) Values() []NetworkInterfaceCreationType {
+ return []NetworkInterfaceCreationType{
+ "efa",
+ "branch",
+ "trunk",
+ }
+}
+
+type NetworkInterfacePermissionStateCode string
+
+// Enum values for NetworkInterfacePermissionStateCode
+const (
+ NetworkInterfacePermissionStateCodePending NetworkInterfacePermissionStateCode = "pending"
+ NetworkInterfacePermissionStateCodeGranted NetworkInterfacePermissionStateCode = "granted"
+ NetworkInterfacePermissionStateCodeRevoking NetworkInterfacePermissionStateCode = "revoking"
+ NetworkInterfacePermissionStateCodeRevoked NetworkInterfacePermissionStateCode = "revoked"
+)
+
+// Values returns all known values for NetworkInterfacePermissionStateCode. 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 (NetworkInterfacePermissionStateCode) Values() []NetworkInterfacePermissionStateCode {
+ return []NetworkInterfacePermissionStateCode{
+ "pending",
+ "granted",
+ "revoking",
+ "revoked",
+ }
+}
+
+type NetworkInterfaceStatus string
+
+// Enum values for NetworkInterfaceStatus
+const (
+ NetworkInterfaceStatusAvailable NetworkInterfaceStatus = "available"
+ NetworkInterfaceStatusAssociated NetworkInterfaceStatus = "associated"
+ NetworkInterfaceStatusAttaching NetworkInterfaceStatus = "attaching"
+ NetworkInterfaceStatusInUse NetworkInterfaceStatus = "in-use"
+ NetworkInterfaceStatusDetaching NetworkInterfaceStatus = "detaching"
+)
+
+// Values returns all known values for NetworkInterfaceStatus. 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 (NetworkInterfaceStatus) Values() []NetworkInterfaceStatus {
+ return []NetworkInterfaceStatus{
+ "available",
+ "associated",
+ "attaching",
+ "in-use",
+ "detaching",
+ }
+}
+
+type NetworkInterfaceType string
+
+// Enum values for NetworkInterfaceType
+const (
+ NetworkInterfaceTypeInterface NetworkInterfaceType = "interface"
+ NetworkInterfaceTypeNatGateway NetworkInterfaceType = "natGateway"
+ NetworkInterfaceTypeEfa NetworkInterfaceType = "efa"
+ NetworkInterfaceTypeTrunk NetworkInterfaceType = "trunk"
+)
+
+// Values returns all known values for NetworkInterfaceType. 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 (NetworkInterfaceType) Values() []NetworkInterfaceType {
+ return []NetworkInterfaceType{
+ "interface",
+ "natGateway",
+ "efa",
+ "trunk",
+ }
+}
+
+type OfferingClassType string
+
+// Enum values for OfferingClassType
+const (
+ OfferingClassTypeStandard OfferingClassType = "standard"
+ OfferingClassTypeConvertible OfferingClassType = "convertible"
+)
+
+// Values returns all known values for OfferingClassType. 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 (OfferingClassType) Values() []OfferingClassType {
+ return []OfferingClassType{
+ "standard",
+ "convertible",
+ }
+}
+
+type OfferingTypeValues string
+
+// Enum values for OfferingTypeValues
+const (
+ OfferingTypeValuesHeavyUtilization OfferingTypeValues = "Heavy Utilization"
+ OfferingTypeValuesMediumUtilization OfferingTypeValues = "Medium Utilization"
+ OfferingTypeValuesLightUtilization OfferingTypeValues = "Light Utilization"
+ OfferingTypeValuesNoUpfront OfferingTypeValues = "No Upfront"
+ OfferingTypeValuesPartialUpfront OfferingTypeValues = "Partial Upfront"
+ OfferingTypeValuesAllUpfront OfferingTypeValues = "All Upfront"
+)
+
+// Values returns all known values for OfferingTypeValues. 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 (OfferingTypeValues) Values() []OfferingTypeValues {
+ return []OfferingTypeValues{
+ "Heavy Utilization",
+ "Medium Utilization",
+ "Light Utilization",
+ "No Upfront",
+ "Partial Upfront",
+ "All Upfront",
+ }
+}
+
+type OnDemandAllocationStrategy string
+
+// Enum values for OnDemandAllocationStrategy
+const (
+ OnDemandAllocationStrategyLowestPrice OnDemandAllocationStrategy = "lowestPrice"
+ OnDemandAllocationStrategyPrioritized OnDemandAllocationStrategy = "prioritized"
+)
+
+// Values returns all known values for OnDemandAllocationStrategy. 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 (OnDemandAllocationStrategy) Values() []OnDemandAllocationStrategy {
+ return []OnDemandAllocationStrategy{
+ "lowestPrice",
+ "prioritized",
+ }
+}
+
+type OperationType string
+
+// Enum values for OperationType
+const (
+ OperationTypeAdd OperationType = "add"
+ OperationTypeRemove OperationType = "remove"
+)
+
+// Values returns all known values for OperationType. 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 (OperationType) Values() []OperationType {
+ return []OperationType{
+ "add",
+ "remove",
+ }
+}
+
+type PartitionLoadFrequency string
+
+// Enum values for PartitionLoadFrequency
+const (
+ PartitionLoadFrequencyNone PartitionLoadFrequency = "none"
+ PartitionLoadFrequencyDaily PartitionLoadFrequency = "daily"
+ PartitionLoadFrequencyWeekly PartitionLoadFrequency = "weekly"
+ PartitionLoadFrequencyMonthly PartitionLoadFrequency = "monthly"
+)
+
+// Values returns all known values for PartitionLoadFrequency. 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 (PartitionLoadFrequency) Values() []PartitionLoadFrequency {
+ return []PartitionLoadFrequency{
+ "none",
+ "daily",
+ "weekly",
+ "monthly",
+ }
+}
+
+type PaymentOption string
+
+// Enum values for PaymentOption
+const (
+ PaymentOptionAllUpfront PaymentOption = "AllUpfront"
+ PaymentOptionPartialUpfront PaymentOption = "PartialUpfront"
+ PaymentOptionNoUpfront PaymentOption = "NoUpfront"
+)
+
+// Values returns all known values for PaymentOption. 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 (PaymentOption) Values() []PaymentOption {
+ return []PaymentOption{
+ "AllUpfront",
+ "PartialUpfront",
+ "NoUpfront",
+ }
+}
+
+type PermissionGroup string
+
+// Enum values for PermissionGroup
+const (
+ PermissionGroupAll PermissionGroup = "all"
+)
+
+// Values returns all known values for PermissionGroup. 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 (PermissionGroup) Values() []PermissionGroup {
+ return []PermissionGroup{
+ "all",
+ }
+}
+
+type PlacementGroupState string
+
+// Enum values for PlacementGroupState
+const (
+ PlacementGroupStatePending PlacementGroupState = "pending"
+ PlacementGroupStateAvailable PlacementGroupState = "available"
+ PlacementGroupStateDeleting PlacementGroupState = "deleting"
+ PlacementGroupStateDeleted PlacementGroupState = "deleted"
+)
+
+// Values returns all known values for PlacementGroupState. 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 (PlacementGroupState) Values() []PlacementGroupState {
+ return []PlacementGroupState{
+ "pending",
+ "available",
+ "deleting",
+ "deleted",
+ }
+}
+
+type PlacementGroupStrategy string
+
+// Enum values for PlacementGroupStrategy
+const (
+ PlacementGroupStrategyCluster PlacementGroupStrategy = "cluster"
+ PlacementGroupStrategyPartition PlacementGroupStrategy = "partition"
+ PlacementGroupStrategySpread PlacementGroupStrategy = "spread"
+)
+
+// Values returns all known values for PlacementGroupStrategy. 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 (PlacementGroupStrategy) Values() []PlacementGroupStrategy {
+ return []PlacementGroupStrategy{
+ "cluster",
+ "partition",
+ "spread",
+ }
+}
+
+type PlacementStrategy string
+
+// Enum values for PlacementStrategy
+const (
+ PlacementStrategyCluster PlacementStrategy = "cluster"
+ PlacementStrategySpread PlacementStrategy = "spread"
+ PlacementStrategyPartition PlacementStrategy = "partition"
+)
+
+// Values returns all known values for PlacementStrategy. 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 (PlacementStrategy) Values() []PlacementStrategy {
+ return []PlacementStrategy{
+ "cluster",
+ "spread",
+ "partition",
+ }
+}
+
+type PlatformValues string
+
+// Enum values for PlatformValues
+const (
+ PlatformValuesWindows PlatformValues = "Windows"
+)
+
+// Values returns all known values for PlatformValues. 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 (PlatformValues) Values() []PlatformValues {
+ return []PlatformValues{
+ "Windows",
+ }
+}
+
+type PrefixListState string
+
+// Enum values for PrefixListState
+const (
+ PrefixListStateCreateInProgress PrefixListState = "create-in-progress"
+ PrefixListStateCreateComplete PrefixListState = "create-complete"
+ PrefixListStateCreateFailed PrefixListState = "create-failed"
+ PrefixListStateModifyInProgress PrefixListState = "modify-in-progress"
+ PrefixListStateModifyComplete PrefixListState = "modify-complete"
+ PrefixListStateModifyFailed PrefixListState = "modify-failed"
+ PrefixListStateRestoreInProgress PrefixListState = "restore-in-progress"
+ PrefixListStateRestoreComplete PrefixListState = "restore-complete"
+ PrefixListStateRestoreFailed PrefixListState = "restore-failed"
+ PrefixListStateDeleteInProgress PrefixListState = "delete-in-progress"
+ PrefixListStateDeleteComplete PrefixListState = "delete-complete"
+ PrefixListStateDeleteFailed PrefixListState = "delete-failed"
+)
+
+// Values returns all known values for PrefixListState. 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 (PrefixListState) Values() []PrefixListState {
+ return []PrefixListState{
+ "create-in-progress",
+ "create-complete",
+ "create-failed",
+ "modify-in-progress",
+ "modify-complete",
+ "modify-failed",
+ "restore-in-progress",
+ "restore-complete",
+ "restore-failed",
+ "delete-in-progress",
+ "delete-complete",
+ "delete-failed",
+ }
+}
+
+type PrincipalType string
+
+// Enum values for PrincipalType
+const (
+ PrincipalTypeAll PrincipalType = "All"
+ PrincipalTypeService PrincipalType = "Service"
+ PrincipalTypeOrganizationUnit PrincipalType = "OrganizationUnit"
+ PrincipalTypeAccount PrincipalType = "Account"
+ PrincipalTypeUser PrincipalType = "User"
+ PrincipalTypeRole PrincipalType = "Role"
+)
+
+// Values returns all known values for PrincipalType. 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 (PrincipalType) Values() []PrincipalType {
+ return []PrincipalType{
+ "All",
+ "Service",
+ "OrganizationUnit",
+ "Account",
+ "User",
+ "Role",
+ }
+}
+
+type ProductCodeValues string
+
+// Enum values for ProductCodeValues
+const (
+ ProductCodeValuesDevpay ProductCodeValues = "devpay"
+ ProductCodeValuesMarketplace ProductCodeValues = "marketplace"
+)
+
+// Values returns all known values for ProductCodeValues. 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 (ProductCodeValues) Values() []ProductCodeValues {
+ return []ProductCodeValues{
+ "devpay",
+ "marketplace",
+ }
+}
+
+type Protocol string
+
+// Enum values for Protocol
+const (
+ ProtocolTcp Protocol = "tcp"
+ ProtocolUdp Protocol = "udp"
+)
+
+// Values returns all known values for Protocol. 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 (Protocol) Values() []Protocol {
+ return []Protocol{
+ "tcp",
+ "udp",
+ }
+}
+
+type ProtocolValue string
+
+// Enum values for ProtocolValue
+const (
+ ProtocolValueGre ProtocolValue = "gre"
+)
+
+// Values returns all known values for ProtocolValue. 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 (ProtocolValue) Values() []ProtocolValue {
+ return []ProtocolValue{
+ "gre",
+ }
+}
+
+type RecurringChargeFrequency string
+
+// Enum values for RecurringChargeFrequency
+const (
+ RecurringChargeFrequencyHourly RecurringChargeFrequency = "Hourly"
+)
+
+// Values returns all known values for RecurringChargeFrequency. 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 (RecurringChargeFrequency) Values() []RecurringChargeFrequency {
+ return []RecurringChargeFrequency{
+ "Hourly",
+ }
+}
+
+type ReplacementStrategy string
+
+// Enum values for ReplacementStrategy
+const (
+ ReplacementStrategyLaunch ReplacementStrategy = "launch"
+)
+
+// Values returns all known values for ReplacementStrategy. 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 (ReplacementStrategy) Values() []ReplacementStrategy {
+ return []ReplacementStrategy{
+ "launch",
+ }
+}
+
+type ReplaceRootVolumeTaskState string
+
+// Enum values for ReplaceRootVolumeTaskState
+const (
+ ReplaceRootVolumeTaskStatePending ReplaceRootVolumeTaskState = "pending"
+ ReplaceRootVolumeTaskStateInProgress ReplaceRootVolumeTaskState = "in-progress"
+ ReplaceRootVolumeTaskStateFailing ReplaceRootVolumeTaskState = "failing"
+ ReplaceRootVolumeTaskStateSucceeded ReplaceRootVolumeTaskState = "succeeded"
+ ReplaceRootVolumeTaskStateFailed ReplaceRootVolumeTaskState = "failed"
+ ReplaceRootVolumeTaskStateFailedDetached ReplaceRootVolumeTaskState = "failed-detached"
+)
+
+// Values returns all known values for ReplaceRootVolumeTaskState. 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 (ReplaceRootVolumeTaskState) Values() []ReplaceRootVolumeTaskState {
+ return []ReplaceRootVolumeTaskState{
+ "pending",
+ "in-progress",
+ "failing",
+ "succeeded",
+ "failed",
+ "failed-detached",
+ }
+}
+
+type ReportInstanceReasonCodes string
+
+// Enum values for ReportInstanceReasonCodes
+const (
+ ReportInstanceReasonCodesInstanceStuckInState ReportInstanceReasonCodes = "instance-stuck-in-state"
+ ReportInstanceReasonCodesUnresponsive ReportInstanceReasonCodes = "unresponsive"
+ ReportInstanceReasonCodesNotAcceptingCredentials ReportInstanceReasonCodes = "not-accepting-credentials"
+ ReportInstanceReasonCodesPasswordNotAvailable ReportInstanceReasonCodes = "password-not-available"
+ ReportInstanceReasonCodesPerformanceNetwork ReportInstanceReasonCodes = "performance-network"
+ ReportInstanceReasonCodesPerformanceInstanceStore ReportInstanceReasonCodes = "performance-instance-store"
+ ReportInstanceReasonCodesPerformanceEbsVolume ReportInstanceReasonCodes = "performance-ebs-volume"
+ ReportInstanceReasonCodesPerformanceOther ReportInstanceReasonCodes = "performance-other"
+ ReportInstanceReasonCodesOther ReportInstanceReasonCodes = "other"
+)
+
+// Values returns all known values for ReportInstanceReasonCodes. 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 (ReportInstanceReasonCodes) Values() []ReportInstanceReasonCodes {
+ return []ReportInstanceReasonCodes{
+ "instance-stuck-in-state",
+ "unresponsive",
+ "not-accepting-credentials",
+ "password-not-available",
+ "performance-network",
+ "performance-instance-store",
+ "performance-ebs-volume",
+ "performance-other",
+ "other",
+ }
+}
+
+type ReportStatusType string
+
+// Enum values for ReportStatusType
+const (
+ ReportStatusTypeOk ReportStatusType = "ok"
+ ReportStatusTypeImpaired ReportStatusType = "impaired"
+)
+
+// Values returns all known values for ReportStatusType. 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 (ReportStatusType) Values() []ReportStatusType {
+ return []ReportStatusType{
+ "ok",
+ "impaired",
+ }
+}
+
+type ReservationState string
+
+// Enum values for ReservationState
+const (
+ ReservationStatePaymentPending ReservationState = "payment-pending"
+ ReservationStatePaymentFailed ReservationState = "payment-failed"
+ ReservationStateActive ReservationState = "active"
+ ReservationStateRetired ReservationState = "retired"
+)
+
+// Values returns all known values for ReservationState. 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 (ReservationState) Values() []ReservationState {
+ return []ReservationState{
+ "payment-pending",
+ "payment-failed",
+ "active",
+ "retired",
+ }
+}
+
+type ReservedInstanceState string
+
+// Enum values for ReservedInstanceState
+const (
+ ReservedInstanceStatePaymentPending ReservedInstanceState = "payment-pending"
+ ReservedInstanceStateActive ReservedInstanceState = "active"
+ ReservedInstanceStatePaymentFailed ReservedInstanceState = "payment-failed"
+ ReservedInstanceStateRetired ReservedInstanceState = "retired"
+ ReservedInstanceStateQueued ReservedInstanceState = "queued"
+ ReservedInstanceStateQueuedDeleted ReservedInstanceState = "queued-deleted"
+)
+
+// Values returns all known values for ReservedInstanceState. 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 (ReservedInstanceState) Values() []ReservedInstanceState {
+ return []ReservedInstanceState{
+ "payment-pending",
+ "active",
+ "payment-failed",
+ "retired",
+ "queued",
+ "queued-deleted",
+ }
+}
+
+type ResetFpgaImageAttributeName string
+
+// Enum values for ResetFpgaImageAttributeName
+const (
+ ResetFpgaImageAttributeNameLoadPermission ResetFpgaImageAttributeName = "loadPermission"
+)
+
+// Values returns all known values for ResetFpgaImageAttributeName. 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 (ResetFpgaImageAttributeName) Values() []ResetFpgaImageAttributeName {
+ return []ResetFpgaImageAttributeName{
+ "loadPermission",
+ }
+}
+
+type ResetImageAttributeName string
+
+// Enum values for ResetImageAttributeName
+const (
+ ResetImageAttributeNameLaunchPermission ResetImageAttributeName = "launchPermission"
+)
+
+// Values returns all known values for ResetImageAttributeName. 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 (ResetImageAttributeName) Values() []ResetImageAttributeName {
+ return []ResetImageAttributeName{
+ "launchPermission",
+ }
+}
+
+type ResourceType string
+
+// Enum values for ResourceType
+const (
+ ResourceTypeCapacityReservation ResourceType = "capacity-reservation"
+ ResourceTypeClientVpnEndpoint ResourceType = "client-vpn-endpoint"
+ ResourceTypeCustomerGateway ResourceType = "customer-gateway"
+ ResourceTypeCarrierGateway ResourceType = "carrier-gateway"
+ ResourceTypeDedicatedHost ResourceType = "dedicated-host"
+ ResourceTypeDhcpOptions ResourceType = "dhcp-options"
+ ResourceTypeEgressOnlyInternetGateway ResourceType = "egress-only-internet-gateway"
+ ResourceTypeElasticIp ResourceType = "elastic-ip"
+ ResourceTypeElasticGpu ResourceType = "elastic-gpu"
+ ResourceTypeExportImageTask ResourceType = "export-image-task"
+ ResourceTypeExportInstanceTask ResourceType = "export-instance-task"
+ ResourceTypeFleet ResourceType = "fleet"
+ ResourceTypeFpgaImage ResourceType = "fpga-image"
+ ResourceTypeHostReservation ResourceType = "host-reservation"
+ ResourceTypeImage ResourceType = "image"
+ ResourceTypeImportImageTask ResourceType = "import-image-task"
+ ResourceTypeImportSnapshotTask ResourceType = "import-snapshot-task"
+ ResourceTypeInstance ResourceType = "instance"
+ ResourceTypeInstanceEventWindow ResourceType = "instance-event-window"
+ ResourceTypeInternetGateway ResourceType = "internet-gateway"
+ ResourceTypeIpv4poolEc2 ResourceType = "ipv4pool-ec2"
+ ResourceTypeIpv6poolEc2 ResourceType = "ipv6pool-ec2"
+ ResourceTypeKeyPair ResourceType = "key-pair"
+ ResourceTypeLaunchTemplate ResourceType = "launch-template"
+ ResourceTypeLocalGateway ResourceType = "local-gateway"
+ ResourceTypeLocalGatewayRouteTable ResourceType = "local-gateway-route-table"
+ ResourceTypeLocalGatewayVirtualInterface ResourceType = "local-gateway-virtual-interface"
+ ResourceTypeLocalGatewayVirtualInterfaceGroup ResourceType = "local-gateway-virtual-interface-group"
+ ResourceTypeLocalGatewayRouteTableVpcAssociation ResourceType = "local-gateway-route-table-vpc-association"
+ ResourceTypeLocalGatewayRouteTableVirtualInterfaceGroupAssociation ResourceType = "local-gateway-route-table-virtual-interface-group-association"
+ ResourceTypeNatgateway ResourceType = "natgateway"
+ ResourceTypeNetworkAcl ResourceType = "network-acl"
+ ResourceTypeNetworkInterface ResourceType = "network-interface"
+ ResourceTypeNetworkInsightsAnalysis ResourceType = "network-insights-analysis"
+ ResourceTypeNetworkInsightsPath ResourceType = "network-insights-path"
+ ResourceTypePlacementGroup ResourceType = "placement-group"
+ ResourceTypePrefixList ResourceType = "prefix-list"
+ ResourceTypeReplaceRootVolumeTask ResourceType = "replace-root-volume-task"
+ ResourceTypeReservedInstances ResourceType = "reserved-instances"
+ ResourceTypeRouteTable ResourceType = "route-table"
+ ResourceTypeSecurityGroup ResourceType = "security-group"
+ ResourceTypeSecurityGroupRule ResourceType = "security-group-rule"
+ ResourceTypeSnapshot ResourceType = "snapshot"
+ ResourceTypeSpotFleetRequest ResourceType = "spot-fleet-request"
+ ResourceTypeSpotInstancesRequest ResourceType = "spot-instances-request"
+ ResourceTypeSubnet ResourceType = "subnet"
+ ResourceTypeTrafficMirrorFilter ResourceType = "traffic-mirror-filter"
+ ResourceTypeTrafficMirrorSession ResourceType = "traffic-mirror-session"
+ ResourceTypeTrafficMirrorTarget ResourceType = "traffic-mirror-target"
+ ResourceTypeTransitGateway ResourceType = "transit-gateway"
+ ResourceTypeTransitGatewayAttachment ResourceType = "transit-gateway-attachment"
+ ResourceTypeTransitGatewayConnectPeer ResourceType = "transit-gateway-connect-peer"
+ ResourceTypeTransitGatewayMulticastDomain ResourceType = "transit-gateway-multicast-domain"
+ ResourceTypeTransitGatewayRouteTable ResourceType = "transit-gateway-route-table"
+ ResourceTypeVolume ResourceType = "volume"
+ ResourceTypeVpc ResourceType = "vpc"
+ ResourceTypeVpcEndpoint ResourceType = "vpc-endpoint"
+ ResourceTypeVpcEndpointService ResourceType = "vpc-endpoint-service"
+ ResourceTypeVpcPeeringConnection ResourceType = "vpc-peering-connection"
+ ResourceTypeVpnConnection ResourceType = "vpn-connection"
+ ResourceTypeVpnGateway ResourceType = "vpn-gateway"
+ ResourceTypeVpcFlowLog ResourceType = "vpc-flow-log"
+)
+
+// Values returns all known values for ResourceType. 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 (ResourceType) Values() []ResourceType {
+ return []ResourceType{
+ "capacity-reservation",
+ "client-vpn-endpoint",
+ "customer-gateway",
+ "carrier-gateway",
+ "dedicated-host",
+ "dhcp-options",
+ "egress-only-internet-gateway",
+ "elastic-ip",
+ "elastic-gpu",
+ "export-image-task",
+ "export-instance-task",
+ "fleet",
+ "fpga-image",
+ "host-reservation",
+ "image",
+ "import-image-task",
+ "import-snapshot-task",
+ "instance",
+ "instance-event-window",
+ "internet-gateway",
+ "ipv4pool-ec2",
+ "ipv6pool-ec2",
+ "key-pair",
+ "launch-template",
+ "local-gateway",
+ "local-gateway-route-table",
+ "local-gateway-virtual-interface",
+ "local-gateway-virtual-interface-group",
+ "local-gateway-route-table-vpc-association",
+ "local-gateway-route-table-virtual-interface-group-association",
+ "natgateway",
+ "network-acl",
+ "network-interface",
+ "network-insights-analysis",
+ "network-insights-path",
+ "placement-group",
+ "prefix-list",
+ "replace-root-volume-task",
+ "reserved-instances",
+ "route-table",
+ "security-group",
+ "security-group-rule",
+ "snapshot",
+ "spot-fleet-request",
+ "spot-instances-request",
+ "subnet",
+ "traffic-mirror-filter",
+ "traffic-mirror-session",
+ "traffic-mirror-target",
+ "transit-gateway",
+ "transit-gateway-attachment",
+ "transit-gateway-connect-peer",
+ "transit-gateway-multicast-domain",
+ "transit-gateway-route-table",
+ "volume",
+ "vpc",
+ "vpc-endpoint",
+ "vpc-endpoint-service",
+ "vpc-peering-connection",
+ "vpn-connection",
+ "vpn-gateway",
+ "vpc-flow-log",
+ }
+}
+
+type RIProductDescription string
+
+// Values returns all known values for RIProductDescription. 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 (RIProductDescription) Values() []RIProductDescription {
+ return []RIProductDescription{
+ "Linux/UNIX",
+ "Linux/UNIX (Amazon VPC)",
+ "Windows",
+ "Windows (Amazon VPC)",
+ }
+}
+
+type RootDeviceType string
+
+// Enum values for RootDeviceType
+const (
+ RootDeviceTypeEbs RootDeviceType = "ebs"
+ RootDeviceTypeInstanceStore RootDeviceType = "instance-store"
+)
+
+// Values returns all known values for RootDeviceType. 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 (RootDeviceType) Values() []RootDeviceType {
+ return []RootDeviceType{
+ "ebs",
+ "instance-store",
+ }
+}
+
+type RouteOrigin string
+
+// Enum values for RouteOrigin
+const (
+ RouteOriginCreateRouteTable RouteOrigin = "CreateRouteTable"
+ RouteOriginCreateRoute RouteOrigin = "CreateRoute"
+ RouteOriginEnableVgwRoutePropagation RouteOrigin = "EnableVgwRoutePropagation"
+)
+
+// Values returns all known values for RouteOrigin. 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 (RouteOrigin) Values() []RouteOrigin {
+ return []RouteOrigin{
+ "CreateRouteTable",
+ "CreateRoute",
+ "EnableVgwRoutePropagation",
+ }
+}
+
+type RouteState string
+
+// Enum values for RouteState
+const (
+ RouteStateActive RouteState = "active"
+ RouteStateBlackhole RouteState = "blackhole"
+)
+
+// Values returns all known values for RouteState. 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 (RouteState) Values() []RouteState {
+ return []RouteState{
+ "active",
+ "blackhole",
+ }
+}
+
+type RouteTableAssociationStateCode string
+
+// Enum values for RouteTableAssociationStateCode
+const (
+ RouteTableAssociationStateCodeAssociating RouteTableAssociationStateCode = "associating"
+ RouteTableAssociationStateCodeAssociated RouteTableAssociationStateCode = "associated"
+ RouteTableAssociationStateCodeDisassociating RouteTableAssociationStateCode = "disassociating"
+ RouteTableAssociationStateCodeDisassociated RouteTableAssociationStateCode = "disassociated"
+ RouteTableAssociationStateCodeFailed RouteTableAssociationStateCode = "failed"
+)
+
+// Values returns all known values for RouteTableAssociationStateCode. 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 (RouteTableAssociationStateCode) Values() []RouteTableAssociationStateCode {
+ return []RouteTableAssociationStateCode{
+ "associating",
+ "associated",
+ "disassociating",
+ "disassociated",
+ "failed",
+ }
+}
+
+type RuleAction string
+
+// Enum values for RuleAction
+const (
+ RuleActionAllow RuleAction = "allow"
+ RuleActionDeny RuleAction = "deny"
+)
+
+// Values returns all known values for RuleAction. 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 (RuleAction) Values() []RuleAction {
+ return []RuleAction{
+ "allow",
+ "deny",
+ }
+}
+
+type Scope string
+
+// Enum values for Scope
+const (
+ ScopeAvailabilityZone Scope = "Availability Zone"
+ ScopeRegional Scope = "Region"
+)
+
+// Values returns all known values for Scope. 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 (Scope) Values() []Scope {
+ return []Scope{
+ "Availability Zone",
+ "Region",
+ }
+}
+
+type SelfServicePortal string
+
+// Enum values for SelfServicePortal
+const (
+ SelfServicePortalEnabled SelfServicePortal = "enabled"
+ SelfServicePortalDisabled SelfServicePortal = "disabled"
+)
+
+// Values returns all known values for SelfServicePortal. 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 (SelfServicePortal) Values() []SelfServicePortal {
+ return []SelfServicePortal{
+ "enabled",
+ "disabled",
+ }
+}
+
+type ServiceState string
+
+// Enum values for ServiceState
+const (
+ ServiceStatePending ServiceState = "Pending"
+ ServiceStateAvailable ServiceState = "Available"
+ ServiceStateDeleting ServiceState = "Deleting"
+ ServiceStateDeleted ServiceState = "Deleted"
+ ServiceStateFailed ServiceState = "Failed"
+)
+
+// Values returns all known values for ServiceState. 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 (ServiceState) Values() []ServiceState {
+ return []ServiceState{
+ "Pending",
+ "Available",
+ "Deleting",
+ "Deleted",
+ "Failed",
+ }
+}
+
+type ServiceType string
+
+// Enum values for ServiceType
+const (
+ ServiceTypeInterface ServiceType = "Interface"
+ ServiceTypeGateway ServiceType = "Gateway"
+ ServiceTypeGatewayLoadBalancer ServiceType = "GatewayLoadBalancer"
+)
+
+// Values returns all known values for ServiceType. 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 (ServiceType) Values() []ServiceType {
+ return []ServiceType{
+ "Interface",
+ "Gateway",
+ "GatewayLoadBalancer",
+ }
+}
+
+type ShutdownBehavior string
+
+// Enum values for ShutdownBehavior
+const (
+ ShutdownBehaviorStop ShutdownBehavior = "stop"
+ ShutdownBehaviorTerminate ShutdownBehavior = "terminate"
+)
+
+// Values returns all known values for ShutdownBehavior. 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 (ShutdownBehavior) Values() []ShutdownBehavior {
+ return []ShutdownBehavior{
+ "stop",
+ "terminate",
+ }
+}
+
+type SnapshotAttributeName string
+
+// Enum values for SnapshotAttributeName
+const (
+ SnapshotAttributeNameProductCodes SnapshotAttributeName = "productCodes"
+ SnapshotAttributeNameCreateVolumePermission SnapshotAttributeName = "createVolumePermission"
+)
+
+// Values returns all known values for SnapshotAttributeName. 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 (SnapshotAttributeName) Values() []SnapshotAttributeName {
+ return []SnapshotAttributeName{
+ "productCodes",
+ "createVolumePermission",
+ }
+}
+
+type SnapshotState string
+
+// Enum values for SnapshotState
+const (
+ SnapshotStatePending SnapshotState = "pending"
+ SnapshotStateCompleted SnapshotState = "completed"
+ SnapshotStateError SnapshotState = "error"
+)
+
+// Values returns all known values for SnapshotState. 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 (SnapshotState) Values() []SnapshotState {
+ return []SnapshotState{
+ "pending",
+ "completed",
+ "error",
+ }
+}
+
+type SpotAllocationStrategy string
+
+// Enum values for SpotAllocationStrategy
+const (
+ SpotAllocationStrategyLowestPrice SpotAllocationStrategy = "lowest-price"
+ SpotAllocationStrategyDiversified SpotAllocationStrategy = "diversified"
+ SpotAllocationStrategyCapacityOptimized SpotAllocationStrategy = "capacity-optimized"
+ SpotAllocationStrategyCapacityOptimizedPrioritized SpotAllocationStrategy = "capacity-optimized-prioritized"
+)
+
+// Values returns all known values for SpotAllocationStrategy. 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 (SpotAllocationStrategy) Values() []SpotAllocationStrategy {
+ return []SpotAllocationStrategy{
+ "lowest-price",
+ "diversified",
+ "capacity-optimized",
+ "capacity-optimized-prioritized",
+ }
+}
+
+type SpotInstanceInterruptionBehavior string
+
+// Enum values for SpotInstanceInterruptionBehavior
+const (
+ SpotInstanceInterruptionBehaviorHibernate SpotInstanceInterruptionBehavior = "hibernate"
+ SpotInstanceInterruptionBehaviorStop SpotInstanceInterruptionBehavior = "stop"
+ SpotInstanceInterruptionBehaviorTerminate SpotInstanceInterruptionBehavior = "terminate"
+)
+
+// Values returns all known values for SpotInstanceInterruptionBehavior. 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 (SpotInstanceInterruptionBehavior) Values() []SpotInstanceInterruptionBehavior {
+ return []SpotInstanceInterruptionBehavior{
+ "hibernate",
+ "stop",
+ "terminate",
+ }
+}
+
+type SpotInstanceState string
+
+// Enum values for SpotInstanceState
+const (
+ SpotInstanceStateOpen SpotInstanceState = "open"
+ SpotInstanceStateActive SpotInstanceState = "active"
+ SpotInstanceStateClosed SpotInstanceState = "closed"
+ SpotInstanceStateCancelled SpotInstanceState = "cancelled"
+ SpotInstanceStateFailed SpotInstanceState = "failed"
+)
+
+// Values returns all known values for SpotInstanceState. 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 (SpotInstanceState) Values() []SpotInstanceState {
+ return []SpotInstanceState{
+ "open",
+ "active",
+ "closed",
+ "cancelled",
+ "failed",
+ }
+}
+
+type SpotInstanceType string
+
+// Enum values for SpotInstanceType
+const (
+ SpotInstanceTypeOneTime SpotInstanceType = "one-time"
+ SpotInstanceTypePersistent SpotInstanceType = "persistent"
+)
+
+// Values returns all known values for SpotInstanceType. 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 (SpotInstanceType) Values() []SpotInstanceType {
+ return []SpotInstanceType{
+ "one-time",
+ "persistent",
+ }
+}
+
+type State string
+
+// Enum values for State
+const (
+ StatePendingAcceptance State = "PendingAcceptance"
+ StatePending State = "Pending"
+ StateAvailable State = "Available"
+ StateDeleting State = "Deleting"
+ StateDeleted State = "Deleted"
+ StateRejected State = "Rejected"
+ StateFailed State = "Failed"
+ StateExpired State = "Expired"
+)
+
+// Values returns all known values for State. 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 (State) Values() []State {
+ return []State{
+ "PendingAcceptance",
+ "Pending",
+ "Available",
+ "Deleting",
+ "Deleted",
+ "Rejected",
+ "Failed",
+ "Expired",
+ }
+}
+
+type StaticSourcesSupportValue string
+
+// Enum values for StaticSourcesSupportValue
+const (
+ StaticSourcesSupportValueEnable StaticSourcesSupportValue = "enable"
+ StaticSourcesSupportValueDisable StaticSourcesSupportValue = "disable"
+)
+
+// Values returns all known values for StaticSourcesSupportValue. 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 (StaticSourcesSupportValue) Values() []StaticSourcesSupportValue {
+ return []StaticSourcesSupportValue{
+ "enable",
+ "disable",
+ }
+}
+
+type Status string
+
+// Enum values for Status
+const (
+ StatusMoveInProgress Status = "MoveInProgress"
+ StatusInVpc Status = "InVpc"
+ StatusInClassic Status = "InClassic"
+)
+
+// Values returns all known values for Status. 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 (Status) Values() []Status {
+ return []Status{
+ "MoveInProgress",
+ "InVpc",
+ "InClassic",
+ }
+}
+
+type StatusName string
+
+// Enum values for StatusName
+const (
+ StatusNameReachability StatusName = "reachability"
+)
+
+// Values returns all known values for StatusName. 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 (StatusName) Values() []StatusName {
+ return []StatusName{
+ "reachability",
+ }
+}
+
+type StatusType string
+
+// Enum values for StatusType
+const (
+ StatusTypePassed StatusType = "passed"
+ StatusTypeFailed StatusType = "failed"
+ StatusTypeInsufficientData StatusType = "insufficient-data"
+ StatusTypeInitializing StatusType = "initializing"
+)
+
+// Values returns all known values for StatusType. 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 (StatusType) Values() []StatusType {
+ return []StatusType{
+ "passed",
+ "failed",
+ "insufficient-data",
+ "initializing",
+ }
+}
+
+type SubnetCidrBlockStateCode string
+
+// Enum values for SubnetCidrBlockStateCode
+const (
+ SubnetCidrBlockStateCodeAssociating SubnetCidrBlockStateCode = "associating"
+ SubnetCidrBlockStateCodeAssociated SubnetCidrBlockStateCode = "associated"
+ SubnetCidrBlockStateCodeDisassociating SubnetCidrBlockStateCode = "disassociating"
+ SubnetCidrBlockStateCodeDisassociated SubnetCidrBlockStateCode = "disassociated"
+ SubnetCidrBlockStateCodeFailing SubnetCidrBlockStateCode = "failing"
+ SubnetCidrBlockStateCodeFailed SubnetCidrBlockStateCode = "failed"
+)
+
+// Values returns all known values for SubnetCidrBlockStateCode. 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 (SubnetCidrBlockStateCode) Values() []SubnetCidrBlockStateCode {
+ return []SubnetCidrBlockStateCode{
+ "associating",
+ "associated",
+ "disassociating",
+ "disassociated",
+ "failing",
+ "failed",
+ }
+}
+
+type SubnetCidrReservationType string
+
+// Enum values for SubnetCidrReservationType
+const (
+ SubnetCidrReservationTypePrefix SubnetCidrReservationType = "prefix"
+ SubnetCidrReservationTypeExplicit SubnetCidrReservationType = "explicit"
+)
+
+// Values returns all known values for SubnetCidrReservationType. 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 (SubnetCidrReservationType) Values() []SubnetCidrReservationType {
+ return []SubnetCidrReservationType{
+ "prefix",
+ "explicit",
+ }
+}
+
+type SubnetState string
+
+// Enum values for SubnetState
+const (
+ SubnetStatePending SubnetState = "pending"
+ SubnetStateAvailable SubnetState = "available"
+)
+
+// Values returns all known values for SubnetState. 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 (SubnetState) Values() []SubnetState {
+ return []SubnetState{
+ "pending",
+ "available",
+ }
+}
+
+type SummaryStatus string
+
+// Enum values for SummaryStatus
+const (
+ SummaryStatusOk SummaryStatus = "ok"
+ SummaryStatusImpaired SummaryStatus = "impaired"
+ SummaryStatusInsufficientData SummaryStatus = "insufficient-data"
+ SummaryStatusNotApplicable SummaryStatus = "not-applicable"
+ SummaryStatusInitializing SummaryStatus = "initializing"
+)
+
+// Values returns all known values for SummaryStatus. 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 (SummaryStatus) Values() []SummaryStatus {
+ return []SummaryStatus{
+ "ok",
+ "impaired",
+ "insufficient-data",
+ "not-applicable",
+ "initializing",
+ }
+}
+
+type TelemetryStatus string
+
+// Enum values for TelemetryStatus
+const (
+ TelemetryStatusUp TelemetryStatus = "UP"
+ TelemetryStatusDown TelemetryStatus = "DOWN"
+)
+
+// Values returns all known values for TelemetryStatus. 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 (TelemetryStatus) Values() []TelemetryStatus {
+ return []TelemetryStatus{
+ "UP",
+ "DOWN",
+ }
+}
+
+type Tenancy string
+
+// Enum values for Tenancy
+const (
+ TenancyDefault Tenancy = "default"
+ TenancyDedicated Tenancy = "dedicated"
+ TenancyHost Tenancy = "host"
+)
+
+// Values returns all known values for Tenancy. 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 (Tenancy) Values() []Tenancy {
+ return []Tenancy{
+ "default",
+ "dedicated",
+ "host",
+ }
+}
+
+type TrafficDirection string
+
+// Enum values for TrafficDirection
+const (
+ TrafficDirectionIngress TrafficDirection = "ingress"
+ TrafficDirectionEgress TrafficDirection = "egress"
+)
+
+// Values returns all known values for TrafficDirection. 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 (TrafficDirection) Values() []TrafficDirection {
+ return []TrafficDirection{
+ "ingress",
+ "egress",
+ }
+}
+
+type TrafficMirrorFilterRuleField string
+
+// Enum values for TrafficMirrorFilterRuleField
+const (
+ TrafficMirrorFilterRuleFieldDestinationPortRange TrafficMirrorFilterRuleField = "destination-port-range"
+ TrafficMirrorFilterRuleFieldSourcePortRange TrafficMirrorFilterRuleField = "source-port-range"
+ TrafficMirrorFilterRuleFieldProtocol TrafficMirrorFilterRuleField = "protocol"
+ TrafficMirrorFilterRuleFieldDescription TrafficMirrorFilterRuleField = "description"
+)
+
+// Values returns all known values for TrafficMirrorFilterRuleField. 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 (TrafficMirrorFilterRuleField) Values() []TrafficMirrorFilterRuleField {
+ return []TrafficMirrorFilterRuleField{
+ "destination-port-range",
+ "source-port-range",
+ "protocol",
+ "description",
+ }
+}
+
+type TrafficMirrorNetworkService string
+
+// Enum values for TrafficMirrorNetworkService
+const (
+ TrafficMirrorNetworkServiceAmazonDns TrafficMirrorNetworkService = "amazon-dns"
+)
+
+// Values returns all known values for TrafficMirrorNetworkService. 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 (TrafficMirrorNetworkService) Values() []TrafficMirrorNetworkService {
+ return []TrafficMirrorNetworkService{
+ "amazon-dns",
+ }
+}
+
+type TrafficMirrorRuleAction string
+
+// Enum values for TrafficMirrorRuleAction
+const (
+ TrafficMirrorRuleActionAccept TrafficMirrorRuleAction = "accept"
+ TrafficMirrorRuleActionReject TrafficMirrorRuleAction = "reject"
+)
+
+// Values returns all known values for TrafficMirrorRuleAction. 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 (TrafficMirrorRuleAction) Values() []TrafficMirrorRuleAction {
+ return []TrafficMirrorRuleAction{
+ "accept",
+ "reject",
+ }
+}
+
+type TrafficMirrorSessionField string
+
+// Enum values for TrafficMirrorSessionField
+const (
+ TrafficMirrorSessionFieldPacketLength TrafficMirrorSessionField = "packet-length"
+ TrafficMirrorSessionFieldDescription TrafficMirrorSessionField = "description"
+ TrafficMirrorSessionFieldVirtualNetworkId TrafficMirrorSessionField = "virtual-network-id"
+)
+
+// Values returns all known values for TrafficMirrorSessionField. 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 (TrafficMirrorSessionField) Values() []TrafficMirrorSessionField {
+ return []TrafficMirrorSessionField{
+ "packet-length",
+ "description",
+ "virtual-network-id",
+ }
+}
+
+type TrafficMirrorTargetType string
+
+// Enum values for TrafficMirrorTargetType
+const (
+ TrafficMirrorTargetTypeNetworkInterface TrafficMirrorTargetType = "network-interface"
+ TrafficMirrorTargetTypeNetworkLoadBalancer TrafficMirrorTargetType = "network-load-balancer"
+)
+
+// Values returns all known values for TrafficMirrorTargetType. 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 (TrafficMirrorTargetType) Values() []TrafficMirrorTargetType {
+ return []TrafficMirrorTargetType{
+ "network-interface",
+ "network-load-balancer",
+ }
+}
+
+type TrafficType string
+
+// Enum values for TrafficType
+const (
+ TrafficTypeAccept TrafficType = "ACCEPT"
+ TrafficTypeReject TrafficType = "REJECT"
+ TrafficTypeAll TrafficType = "ALL"
+)
+
+// Values returns all known values for TrafficType. 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 (TrafficType) Values() []TrafficType {
+ return []TrafficType{
+ "ACCEPT",
+ "REJECT",
+ "ALL",
+ }
+}
+
+type TransitGatewayAssociationState string
+
+// Enum values for TransitGatewayAssociationState
+const (
+ TransitGatewayAssociationStateAssociating TransitGatewayAssociationState = "associating"
+ TransitGatewayAssociationStateAssociated TransitGatewayAssociationState = "associated"
+ TransitGatewayAssociationStateDisassociating TransitGatewayAssociationState = "disassociating"
+ TransitGatewayAssociationStateDisassociated TransitGatewayAssociationState = "disassociated"
+)
+
+// Values returns all known values for TransitGatewayAssociationState. 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 (TransitGatewayAssociationState) Values() []TransitGatewayAssociationState {
+ return []TransitGatewayAssociationState{
+ "associating",
+ "associated",
+ "disassociating",
+ "disassociated",
+ }
+}
+
+type TransitGatewayAttachmentResourceType string
+
+// Enum values for TransitGatewayAttachmentResourceType
+const (
+ TransitGatewayAttachmentResourceTypeVpc TransitGatewayAttachmentResourceType = "vpc"
+ TransitGatewayAttachmentResourceTypeVpn TransitGatewayAttachmentResourceType = "vpn"
+ TransitGatewayAttachmentResourceTypeDirectConnectGateway TransitGatewayAttachmentResourceType = "direct-connect-gateway"
+ TransitGatewayAttachmentResourceTypeConnect TransitGatewayAttachmentResourceType = "connect"
+ TransitGatewayAttachmentResourceTypePeering TransitGatewayAttachmentResourceType = "peering"
+ TransitGatewayAttachmentResourceTypeTgwPeering TransitGatewayAttachmentResourceType = "tgw-peering"
+)
+
+// Values returns all known values for TransitGatewayAttachmentResourceType. 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 (TransitGatewayAttachmentResourceType) Values() []TransitGatewayAttachmentResourceType {
+ return []TransitGatewayAttachmentResourceType{
+ "vpc",
+ "vpn",
+ "direct-connect-gateway",
+ "connect",
+ "peering",
+ "tgw-peering",
+ }
+}
+
+type TransitGatewayAttachmentState string
+
+// Enum values for TransitGatewayAttachmentState
+const (
+ TransitGatewayAttachmentStateInitiating TransitGatewayAttachmentState = "initiating"
+ TransitGatewayAttachmentStateInitiatingRequest TransitGatewayAttachmentState = "initiatingRequest"
+ TransitGatewayAttachmentStatePendingAcceptance TransitGatewayAttachmentState = "pendingAcceptance"
+ TransitGatewayAttachmentStateRollingBack TransitGatewayAttachmentState = "rollingBack"
+ TransitGatewayAttachmentStatePending TransitGatewayAttachmentState = "pending"
+ TransitGatewayAttachmentStateAvailable TransitGatewayAttachmentState = "available"
+ TransitGatewayAttachmentStateModifying TransitGatewayAttachmentState = "modifying"
+ TransitGatewayAttachmentStateDeleting TransitGatewayAttachmentState = "deleting"
+ TransitGatewayAttachmentStateDeleted TransitGatewayAttachmentState = "deleted"
+ TransitGatewayAttachmentStateFailed TransitGatewayAttachmentState = "failed"
+ TransitGatewayAttachmentStateRejected TransitGatewayAttachmentState = "rejected"
+ TransitGatewayAttachmentStateRejecting TransitGatewayAttachmentState = "rejecting"
+ TransitGatewayAttachmentStateFailing TransitGatewayAttachmentState = "failing"
+)
+
+// Values returns all known values for TransitGatewayAttachmentState. 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 (TransitGatewayAttachmentState) Values() []TransitGatewayAttachmentState {
+ return []TransitGatewayAttachmentState{
+ "initiating",
+ "initiatingRequest",
+ "pendingAcceptance",
+ "rollingBack",
+ "pending",
+ "available",
+ "modifying",
+ "deleting",
+ "deleted",
+ "failed",
+ "rejected",
+ "rejecting",
+ "failing",
+ }
+}
+
+type TransitGatewayConnectPeerState string
+
+// Enum values for TransitGatewayConnectPeerState
+const (
+ TransitGatewayConnectPeerStatePending TransitGatewayConnectPeerState = "pending"
+ TransitGatewayConnectPeerStateAvailable TransitGatewayConnectPeerState = "available"
+ TransitGatewayConnectPeerStateDeleting TransitGatewayConnectPeerState = "deleting"
+ TransitGatewayConnectPeerStateDeleted TransitGatewayConnectPeerState = "deleted"
+)
+
+// Values returns all known values for TransitGatewayConnectPeerState. 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 (TransitGatewayConnectPeerState) Values() []TransitGatewayConnectPeerState {
+ return []TransitGatewayConnectPeerState{
+ "pending",
+ "available",
+ "deleting",
+ "deleted",
+ }
+}
+
+type TransitGatewayMulitcastDomainAssociationState string
+
+// Enum values for TransitGatewayMulitcastDomainAssociationState
+const (
+ TransitGatewayMulitcastDomainAssociationStatePendingAcceptance TransitGatewayMulitcastDomainAssociationState = "pendingAcceptance"
+ TransitGatewayMulitcastDomainAssociationStateAssociating TransitGatewayMulitcastDomainAssociationState = "associating"
+ TransitGatewayMulitcastDomainAssociationStateAssociated TransitGatewayMulitcastDomainAssociationState = "associated"
+ TransitGatewayMulitcastDomainAssociationStateDisassociating TransitGatewayMulitcastDomainAssociationState = "disassociating"
+ TransitGatewayMulitcastDomainAssociationStateDisassociated TransitGatewayMulitcastDomainAssociationState = "disassociated"
+ TransitGatewayMulitcastDomainAssociationStateRejected TransitGatewayMulitcastDomainAssociationState = "rejected"
+ TransitGatewayMulitcastDomainAssociationStateFailed TransitGatewayMulitcastDomainAssociationState = "failed"
+)
+
+// Values returns all known values for
+// TransitGatewayMulitcastDomainAssociationState. 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 (TransitGatewayMulitcastDomainAssociationState) Values() []TransitGatewayMulitcastDomainAssociationState {
+ return []TransitGatewayMulitcastDomainAssociationState{
+ "pendingAcceptance",
+ "associating",
+ "associated",
+ "disassociating",
+ "disassociated",
+ "rejected",
+ "failed",
+ }
+}
+
+type TransitGatewayMulticastDomainState string
+
+// Enum values for TransitGatewayMulticastDomainState
+const (
+ TransitGatewayMulticastDomainStatePending TransitGatewayMulticastDomainState = "pending"
+ TransitGatewayMulticastDomainStateAvailable TransitGatewayMulticastDomainState = "available"
+ TransitGatewayMulticastDomainStateDeleting TransitGatewayMulticastDomainState = "deleting"
+ TransitGatewayMulticastDomainStateDeleted TransitGatewayMulticastDomainState = "deleted"
+)
+
+// Values returns all known values for TransitGatewayMulticastDomainState. 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 (TransitGatewayMulticastDomainState) Values() []TransitGatewayMulticastDomainState {
+ return []TransitGatewayMulticastDomainState{
+ "pending",
+ "available",
+ "deleting",
+ "deleted",
+ }
+}
+
+type TransitGatewayPrefixListReferenceState string
+
+// Enum values for TransitGatewayPrefixListReferenceState
+const (
+ TransitGatewayPrefixListReferenceStatePending TransitGatewayPrefixListReferenceState = "pending"
+ TransitGatewayPrefixListReferenceStateAvailable TransitGatewayPrefixListReferenceState = "available"
+ TransitGatewayPrefixListReferenceStateModifying TransitGatewayPrefixListReferenceState = "modifying"
+ TransitGatewayPrefixListReferenceStateDeleting TransitGatewayPrefixListReferenceState = "deleting"
+)
+
+// Values returns all known values for TransitGatewayPrefixListReferenceState. 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 (TransitGatewayPrefixListReferenceState) Values() []TransitGatewayPrefixListReferenceState {
+ return []TransitGatewayPrefixListReferenceState{
+ "pending",
+ "available",
+ "modifying",
+ "deleting",
+ }
+}
+
+type TransitGatewayPropagationState string
+
+// Enum values for TransitGatewayPropagationState
+const (
+ TransitGatewayPropagationStateEnabling TransitGatewayPropagationState = "enabling"
+ TransitGatewayPropagationStateEnabled TransitGatewayPropagationState = "enabled"
+ TransitGatewayPropagationStateDisabling TransitGatewayPropagationState = "disabling"
+ TransitGatewayPropagationStateDisabled TransitGatewayPropagationState = "disabled"
+)
+
+// Values returns all known values for TransitGatewayPropagationState. 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 (TransitGatewayPropagationState) Values() []TransitGatewayPropagationState {
+ return []TransitGatewayPropagationState{
+ "enabling",
+ "enabled",
+ "disabling",
+ "disabled",
+ }
+}
+
+type TransitGatewayRouteState string
+
+// Enum values for TransitGatewayRouteState
+const (
+ TransitGatewayRouteStatePending TransitGatewayRouteState = "pending"
+ TransitGatewayRouteStateActive TransitGatewayRouteState = "active"
+ TransitGatewayRouteStateBlackhole TransitGatewayRouteState = "blackhole"
+ TransitGatewayRouteStateDeleting TransitGatewayRouteState = "deleting"
+ TransitGatewayRouteStateDeleted TransitGatewayRouteState = "deleted"
+)
+
+// Values returns all known values for TransitGatewayRouteState. 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 (TransitGatewayRouteState) Values() []TransitGatewayRouteState {
+ return []TransitGatewayRouteState{
+ "pending",
+ "active",
+ "blackhole",
+ "deleting",
+ "deleted",
+ }
+}
+
+type TransitGatewayRouteTableState string
+
+// Enum values for TransitGatewayRouteTableState
+const (
+ TransitGatewayRouteTableStatePending TransitGatewayRouteTableState = "pending"
+ TransitGatewayRouteTableStateAvailable TransitGatewayRouteTableState = "available"
+ TransitGatewayRouteTableStateDeleting TransitGatewayRouteTableState = "deleting"
+ TransitGatewayRouteTableStateDeleted TransitGatewayRouteTableState = "deleted"
+)
+
+// Values returns all known values for TransitGatewayRouteTableState. 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 (TransitGatewayRouteTableState) Values() []TransitGatewayRouteTableState {
+ return []TransitGatewayRouteTableState{
+ "pending",
+ "available",
+ "deleting",
+ "deleted",
+ }
+}
+
+type TransitGatewayRouteType string
+
+// Enum values for TransitGatewayRouteType
+const (
+ TransitGatewayRouteTypeStatic TransitGatewayRouteType = "static"
+ TransitGatewayRouteTypePropagated TransitGatewayRouteType = "propagated"
+)
+
+// Values returns all known values for TransitGatewayRouteType. 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 (TransitGatewayRouteType) Values() []TransitGatewayRouteType {
+ return []TransitGatewayRouteType{
+ "static",
+ "propagated",
+ }
+}
+
+type TransitGatewayState string
+
+// Enum values for TransitGatewayState
+const (
+ TransitGatewayStatePending TransitGatewayState = "pending"
+ TransitGatewayStateAvailable TransitGatewayState = "available"
+ TransitGatewayStateModifying TransitGatewayState = "modifying"
+ TransitGatewayStateDeleting TransitGatewayState = "deleting"
+ TransitGatewayStateDeleted TransitGatewayState = "deleted"
+)
+
+// Values returns all known values for TransitGatewayState. 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 (TransitGatewayState) Values() []TransitGatewayState {
+ return []TransitGatewayState{
+ "pending",
+ "available",
+ "modifying",
+ "deleting",
+ "deleted",
+ }
+}
+
+type TransportProtocol string
+
+// Enum values for TransportProtocol
+const (
+ TransportProtocolTcp TransportProtocol = "tcp"
+ TransportProtocolUdp TransportProtocol = "udp"
+)
+
+// Values returns all known values for TransportProtocol. 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 (TransportProtocol) Values() []TransportProtocol {
+ return []TransportProtocol{
+ "tcp",
+ "udp",
+ }
+}
+
+type TunnelInsideIpVersion string
+
+// Enum values for TunnelInsideIpVersion
+const (
+ TunnelInsideIpVersionIpv4 TunnelInsideIpVersion = "ipv4"
+ TunnelInsideIpVersionIpv6 TunnelInsideIpVersion = "ipv6"
+)
+
+// Values returns all known values for TunnelInsideIpVersion. 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 (TunnelInsideIpVersion) Values() []TunnelInsideIpVersion {
+ return []TunnelInsideIpVersion{
+ "ipv4",
+ "ipv6",
+ }
+}
+
+type UnlimitedSupportedInstanceFamily string
+
+// Enum values for UnlimitedSupportedInstanceFamily
+const (
+ UnlimitedSupportedInstanceFamilyT2 UnlimitedSupportedInstanceFamily = "t2"
+ UnlimitedSupportedInstanceFamilyT3 UnlimitedSupportedInstanceFamily = "t3"
+ UnlimitedSupportedInstanceFamilyT3a UnlimitedSupportedInstanceFamily = "t3a"
+ UnlimitedSupportedInstanceFamilyT4g UnlimitedSupportedInstanceFamily = "t4g"
+)
+
+// Values returns all known values for UnlimitedSupportedInstanceFamily. 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 (UnlimitedSupportedInstanceFamily) Values() []UnlimitedSupportedInstanceFamily {
+ return []UnlimitedSupportedInstanceFamily{
+ "t2",
+ "t3",
+ "t3a",
+ "t4g",
+ }
+}
+
+type UnsuccessfulInstanceCreditSpecificationErrorCode string
+
+// Enum values for UnsuccessfulInstanceCreditSpecificationErrorCode
+const (
+ UnsuccessfulInstanceCreditSpecificationErrorCodeInvalidInstanceId UnsuccessfulInstanceCreditSpecificationErrorCode = "InvalidInstanceID.Malformed"
+ UnsuccessfulInstanceCreditSpecificationErrorCodeInstanceNotFound UnsuccessfulInstanceCreditSpecificationErrorCode = "InvalidInstanceID.NotFound"
+ UnsuccessfulInstanceCreditSpecificationErrorCodeIncorrectInstanceState UnsuccessfulInstanceCreditSpecificationErrorCode = "IncorrectInstanceState"
+ UnsuccessfulInstanceCreditSpecificationErrorCodeInstanceCreditSpecificationNotSupported UnsuccessfulInstanceCreditSpecificationErrorCode = "InstanceCreditSpecification.NotSupported"
+)
+
+// Values returns all known values for
+// UnsuccessfulInstanceCreditSpecificationErrorCode. 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 (UnsuccessfulInstanceCreditSpecificationErrorCode) Values() []UnsuccessfulInstanceCreditSpecificationErrorCode {
+ return []UnsuccessfulInstanceCreditSpecificationErrorCode{
+ "InvalidInstanceID.Malformed",
+ "InvalidInstanceID.NotFound",
+ "IncorrectInstanceState",
+ "InstanceCreditSpecification.NotSupported",
+ }
+}
+
+type UsageClassType string
+
+// Enum values for UsageClassType
+const (
+ UsageClassTypeSpot UsageClassType = "spot"
+ UsageClassTypeOnDemand UsageClassType = "on-demand"
+)
+
+// Values returns all known values for UsageClassType. 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 (UsageClassType) Values() []UsageClassType {
+ return []UsageClassType{
+ "spot",
+ "on-demand",
+ }
+}
+
+type VirtualizationType string
+
+// Enum values for VirtualizationType
+const (
+ VirtualizationTypeHvm VirtualizationType = "hvm"
+ VirtualizationTypeParavirtual VirtualizationType = "paravirtual"
+)
+
+// Values returns all known values for VirtualizationType. 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 (VirtualizationType) Values() []VirtualizationType {
+ return []VirtualizationType{
+ "hvm",
+ "paravirtual",
+ }
+}
+
+type VolumeAttachmentState string
+
+// Enum values for VolumeAttachmentState
+const (
+ VolumeAttachmentStateAttaching VolumeAttachmentState = "attaching"
+ VolumeAttachmentStateAttached VolumeAttachmentState = "attached"
+ VolumeAttachmentStateDetaching VolumeAttachmentState = "detaching"
+ VolumeAttachmentStateDetached VolumeAttachmentState = "detached"
+ VolumeAttachmentStateBusy VolumeAttachmentState = "busy"
+)
+
+// Values returns all known values for VolumeAttachmentState. 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 (VolumeAttachmentState) Values() []VolumeAttachmentState {
+ return []VolumeAttachmentState{
+ "attaching",
+ "attached",
+ "detaching",
+ "detached",
+ "busy",
+ }
+}
+
+type VolumeAttributeName string
+
+// Enum values for VolumeAttributeName
+const (
+ VolumeAttributeNameAutoEnableIO VolumeAttributeName = "autoEnableIO"
+ VolumeAttributeNameProductCodes VolumeAttributeName = "productCodes"
+)
+
+// Values returns all known values for VolumeAttributeName. 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 (VolumeAttributeName) Values() []VolumeAttributeName {
+ return []VolumeAttributeName{
+ "autoEnableIO",
+ "productCodes",
+ }
+}
+
+type VolumeModificationState string
+
+// Enum values for VolumeModificationState
+const (
+ VolumeModificationStateModifying VolumeModificationState = "modifying"
+ VolumeModificationStateOptimizing VolumeModificationState = "optimizing"
+ VolumeModificationStateCompleted VolumeModificationState = "completed"
+ VolumeModificationStateFailed VolumeModificationState = "failed"
+)
+
+// Values returns all known values for VolumeModificationState. 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 (VolumeModificationState) Values() []VolumeModificationState {
+ return []VolumeModificationState{
+ "modifying",
+ "optimizing",
+ "completed",
+ "failed",
+ }
+}
+
+type VolumeState string
+
+// Enum values for VolumeState
+const (
+ VolumeStateCreating VolumeState = "creating"
+ VolumeStateAvailable VolumeState = "available"
+ VolumeStateInUse VolumeState = "in-use"
+ VolumeStateDeleting VolumeState = "deleting"
+ VolumeStateDeleted VolumeState = "deleted"
+ VolumeStateError VolumeState = "error"
+)
+
+// Values returns all known values for VolumeState. 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 (VolumeState) Values() []VolumeState {
+ return []VolumeState{
+ "creating",
+ "available",
+ "in-use",
+ "deleting",
+ "deleted",
+ "error",
+ }
+}
+
+type VolumeStatusInfoStatus string
+
+// Enum values for VolumeStatusInfoStatus
+const (
+ VolumeStatusInfoStatusOk VolumeStatusInfoStatus = "ok"
+ VolumeStatusInfoStatusImpaired VolumeStatusInfoStatus = "impaired"
+ VolumeStatusInfoStatusInsufficientData VolumeStatusInfoStatus = "insufficient-data"
+)
+
+// Values returns all known values for VolumeStatusInfoStatus. 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 (VolumeStatusInfoStatus) Values() []VolumeStatusInfoStatus {
+ return []VolumeStatusInfoStatus{
+ "ok",
+ "impaired",
+ "insufficient-data",
+ }
+}
+
+type VolumeStatusName string
+
+// Enum values for VolumeStatusName
+const (
+ VolumeStatusNameIoEnabled VolumeStatusName = "io-enabled"
+ VolumeStatusNameIoPerformance VolumeStatusName = "io-performance"
+)
+
+// Values returns all known values for VolumeStatusName. 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 (VolumeStatusName) Values() []VolumeStatusName {
+ return []VolumeStatusName{
+ "io-enabled",
+ "io-performance",
+ }
+}
+
+type VolumeType string
+
+// Enum values for VolumeType
+const (
+ VolumeTypeStandard VolumeType = "standard"
+ VolumeTypeIo1 VolumeType = "io1"
+ VolumeTypeIo2 VolumeType = "io2"
+ VolumeTypeGp2 VolumeType = "gp2"
+ VolumeTypeSc1 VolumeType = "sc1"
+ VolumeTypeSt1 VolumeType = "st1"
+ VolumeTypeGp3 VolumeType = "gp3"
+)
+
+// Values returns all known values for VolumeType. 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 (VolumeType) Values() []VolumeType {
+ return []VolumeType{
+ "standard",
+ "io1",
+ "io2",
+ "gp2",
+ "sc1",
+ "st1",
+ "gp3",
+ }
+}
+
+type VpcAttributeName string
+
+// Enum values for VpcAttributeName
+const (
+ VpcAttributeNameEnableDnsSupport VpcAttributeName = "enableDnsSupport"
+ VpcAttributeNameEnableDnsHostnames VpcAttributeName = "enableDnsHostnames"
+)
+
+// Values returns all known values for VpcAttributeName. 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 (VpcAttributeName) Values() []VpcAttributeName {
+ return []VpcAttributeName{
+ "enableDnsSupport",
+ "enableDnsHostnames",
+ }
+}
+
+type VpcCidrBlockStateCode string
+
+// Enum values for VpcCidrBlockStateCode
+const (
+ VpcCidrBlockStateCodeAssociating VpcCidrBlockStateCode = "associating"
+ VpcCidrBlockStateCodeAssociated VpcCidrBlockStateCode = "associated"
+ VpcCidrBlockStateCodeDisassociating VpcCidrBlockStateCode = "disassociating"
+ VpcCidrBlockStateCodeDisassociated VpcCidrBlockStateCode = "disassociated"
+ VpcCidrBlockStateCodeFailing VpcCidrBlockStateCode = "failing"
+ VpcCidrBlockStateCodeFailed VpcCidrBlockStateCode = "failed"
+)
+
+// Values returns all known values for VpcCidrBlockStateCode. 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 (VpcCidrBlockStateCode) Values() []VpcCidrBlockStateCode {
+ return []VpcCidrBlockStateCode{
+ "associating",
+ "associated",
+ "disassociating",
+ "disassociated",
+ "failing",
+ "failed",
+ }
+}
+
+type VpcEndpointType string
+
+// Enum values for VpcEndpointType
+const (
+ VpcEndpointTypeInterface VpcEndpointType = "Interface"
+ VpcEndpointTypeGateway VpcEndpointType = "Gateway"
+ VpcEndpointTypeGatewayLoadBalancer VpcEndpointType = "GatewayLoadBalancer"
+)
+
+// Values returns all known values for VpcEndpointType. 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 (VpcEndpointType) Values() []VpcEndpointType {
+ return []VpcEndpointType{
+ "Interface",
+ "Gateway",
+ "GatewayLoadBalancer",
+ }
+}
+
+type VpcPeeringConnectionStateReasonCode string
+
+// Enum values for VpcPeeringConnectionStateReasonCode
+const (
+ VpcPeeringConnectionStateReasonCodeInitiatingRequest VpcPeeringConnectionStateReasonCode = "initiating-request"
+ VpcPeeringConnectionStateReasonCodePendingAcceptance VpcPeeringConnectionStateReasonCode = "pending-acceptance"
+ VpcPeeringConnectionStateReasonCodeActive VpcPeeringConnectionStateReasonCode = "active"
+ VpcPeeringConnectionStateReasonCodeDeleted VpcPeeringConnectionStateReasonCode = "deleted"
+ VpcPeeringConnectionStateReasonCodeRejected VpcPeeringConnectionStateReasonCode = "rejected"
+ VpcPeeringConnectionStateReasonCodeFailed VpcPeeringConnectionStateReasonCode = "failed"
+ VpcPeeringConnectionStateReasonCodeExpired VpcPeeringConnectionStateReasonCode = "expired"
+ VpcPeeringConnectionStateReasonCodeProvisioning VpcPeeringConnectionStateReasonCode = "provisioning"
+ VpcPeeringConnectionStateReasonCodeDeleting VpcPeeringConnectionStateReasonCode = "deleting"
+)
+
+// Values returns all known values for VpcPeeringConnectionStateReasonCode. 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 (VpcPeeringConnectionStateReasonCode) Values() []VpcPeeringConnectionStateReasonCode {
+ return []VpcPeeringConnectionStateReasonCode{
+ "initiating-request",
+ "pending-acceptance",
+ "active",
+ "deleted",
+ "rejected",
+ "failed",
+ "expired",
+ "provisioning",
+ "deleting",
+ }
+}
+
+type VpcState string
+
+// Enum values for VpcState
+const (
+ VpcStatePending VpcState = "pending"
+ VpcStateAvailable VpcState = "available"
+)
+
+// Values returns all known values for VpcState. 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 (VpcState) Values() []VpcState {
+ return []VpcState{
+ "pending",
+ "available",
+ }
+}
+
+type VpcTenancy string
+
+// Enum values for VpcTenancy
+const (
+ VpcTenancyDefault VpcTenancy = "default"
+)
+
+// Values returns all known values for VpcTenancy. 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 (VpcTenancy) Values() []VpcTenancy {
+ return []VpcTenancy{
+ "default",
+ }
+}
+
+type VpnEcmpSupportValue string
+
+// Enum values for VpnEcmpSupportValue
+const (
+ VpnEcmpSupportValueEnable VpnEcmpSupportValue = "enable"
+ VpnEcmpSupportValueDisable VpnEcmpSupportValue = "disable"
+)
+
+// Values returns all known values for VpnEcmpSupportValue. 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 (VpnEcmpSupportValue) Values() []VpnEcmpSupportValue {
+ return []VpnEcmpSupportValue{
+ "enable",
+ "disable",
+ }
+}
+
+type VpnProtocol string
+
+// Enum values for VpnProtocol
+const (
+ VpnProtocolOpenvpn VpnProtocol = "openvpn"
+)
+
+// Values returns all known values for VpnProtocol. 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 (VpnProtocol) Values() []VpnProtocol {
+ return []VpnProtocol{
+ "openvpn",
+ }
+}
+
+type VpnState string
+
+// Enum values for VpnState
+const (
+ VpnStatePending VpnState = "pending"
+ VpnStateAvailable VpnState = "available"
+ VpnStateDeleting VpnState = "deleting"
+ VpnStateDeleted VpnState = "deleted"
+)
+
+// Values returns all known values for VpnState. 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 (VpnState) Values() []VpnState {
+ return []VpnState{
+ "pending",
+ "available",
+ "deleting",
+ "deleted",
+ }
+}
+
+type VpnStaticRouteSource string
+
+// Enum values for VpnStaticRouteSource
+const (
+ VpnStaticRouteSourceStatic VpnStaticRouteSource = "Static"
+)
+
+// Values returns all known values for VpnStaticRouteSource. 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 (VpnStaticRouteSource) Values() []VpnStaticRouteSource {
+ return []VpnStaticRouteSource{
+ "Static",
+ }
+}
+
+type WeekDay string
+
+// Enum values for WeekDay
+const (
+ WeekDaySunday WeekDay = "sunday"
+ WeekDayMonday WeekDay = "monday"
+ WeekDayTuesday WeekDay = "tuesday"
+ WeekDayWednesday WeekDay = "wednesday"
+ WeekDayThursday WeekDay = "thursday"
+ WeekDayFriday WeekDay = "friday"
+ WeekDaySaturday WeekDay = "saturday"
+)
+
+// Values returns all known values for WeekDay. 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 (WeekDay) Values() []WeekDay {
+ return []WeekDay{
+ "sunday",
+ "monday",
+ "tuesday",
+ "wednesday",
+ "thursday",
+ "friday",
+ "saturday",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/types/types.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/types/types.go
new file mode 100644
index 00000000..ea6f9471
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/types/types.go
@@ -0,0 +1,13483 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package types
+
+import (
+ smithydocument "github.com/aws/smithy-go/document"
+ "time"
+)
+
+// Describes an account attribute.
+type AccountAttribute struct {
+
+ // The name of the account attribute.
+ AttributeName *string
+
+ // The values for the account attribute.
+ AttributeValues []AccountAttributeValue
+
+ noSmithyDocumentSerde
+}
+
+// Describes a value of an account attribute.
+type AccountAttributeValue struct {
+
+ // The value of the attribute.
+ AttributeValue *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes a running instance in a Spot Fleet.
+type ActiveInstance struct {
+
+ // The health status of the instance. If the status of either the instance status
+ // check or the system status check is impaired, the health status of the instance
+ // is unhealthy. Otherwise, the health status is healthy.
+ InstanceHealth InstanceHealthStatus
+
+ // The ID of the instance.
+ InstanceId *string
+
+ // The instance type.
+ InstanceType *string
+
+ // The ID of the Spot Instance request.
+ SpotInstanceRequestId *string
+
+ noSmithyDocumentSerde
+}
+
+// An entry for a prefix list.
+type AddPrefixListEntry struct {
+
+ // The CIDR block.
+ //
+ // This member is required.
+ Cidr *string
+
+ // A description for the entry. Constraints: Up to 255 characters in length.
+ Description *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes an Elastic IP address, or a carrier IP address.
+type Address struct {
+
+ // The ID representing the allocation of the address for use with EC2-VPC.
+ AllocationId *string
+
+ // The ID representing the association of the address with an instance in a VPC.
+ AssociationId *string
+
+ // The carrier IP address associated. This option is only available for network
+ // interfaces which reside in a subnet in a Wavelength Zone (for example an EC2
+ // instance).
+ CarrierIp *string
+
+ // The customer-owned IP address.
+ CustomerOwnedIp *string
+
+ // The ID of the customer-owned address pool.
+ CustomerOwnedIpv4Pool *string
+
+ // Indicates whether this Elastic IP address is for use with instances in
+ // EC2-Classic (standard) or instances in a VPC (vpc).
+ Domain DomainType
+
+ // The ID of the instance that the address is associated with (if any).
+ InstanceId *string
+
+ // The name of the unique set of Availability Zones, Local Zones, or Wavelength
+ // Zones from which AWS advertises IP addresses.
+ NetworkBorderGroup *string
+
+ // The ID of the network interface.
+ NetworkInterfaceId *string
+
+ // The ID of the Amazon Web Services account that owns the network interface.
+ NetworkInterfaceOwnerId *string
+
+ // The private IP address associated with the Elastic IP address.
+ PrivateIpAddress *string
+
+ // The Elastic IP address.
+ PublicIp *string
+
+ // The ID of an address pool.
+ PublicIpv4Pool *string
+
+ // Any tags assigned to the Elastic IP address.
+ Tags []Tag
+
+ noSmithyDocumentSerde
+}
+
+// The attributes associated with an Elastic IP address.
+type AddressAttribute struct {
+
+ // [EC2-VPC] The allocation ID.
+ AllocationId *string
+
+ // The pointer (PTR) record for the IP address.
+ PtrRecord *string
+
+ // The updated PTR record for the IP address.
+ PtrRecordUpdate *PtrUpdateStatus
+
+ // The public IP address.
+ PublicIp *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes a principal.
+type AllowedPrincipal struct {
+
+ // The Amazon Resource Name (ARN) of the principal.
+ Principal *string
+
+ // The type of principal.
+ PrincipalType PrincipalType
+
+ noSmithyDocumentSerde
+}
+
+// Describes an potential intermediate component of a feasible path.
+type AlternatePathHint struct {
+
+ // The Amazon Resource Name (ARN) of the component.
+ ComponentArn *string
+
+ // The ID of the component.
+ ComponentId *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes a network access control (ACL) rule.
+type AnalysisAclRule struct {
+
+ // The IPv4 address range, in CIDR notation.
+ Cidr *string
+
+ // Indicates whether the rule is an outbound rule.
+ Egress *bool
+
+ // The range of ports.
+ PortRange *PortRange
+
+ // The protocol.
+ Protocol *string
+
+ // Indicates whether to allow or deny traffic that matches the rule.
+ RuleAction *string
+
+ // The rule number.
+ RuleNumber *int32
+
+ noSmithyDocumentSerde
+}
+
+// Describes a path component.
+type AnalysisComponent struct {
+
+ // The Amazon Resource Name (ARN) of the component.
+ Arn *string
+
+ // The ID of the component.
+ Id *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes a load balancer listener.
+type AnalysisLoadBalancerListener struct {
+
+ // [Classic Load Balancers] The back-end port for the listener.
+ InstancePort *int32
+
+ // The port on which the load balancer is listening.
+ LoadBalancerPort *int32
+
+ noSmithyDocumentSerde
+}
+
+// Describes a load balancer target.
+type AnalysisLoadBalancerTarget struct {
+
+ // The IP address.
+ Address *string
+
+ // The Availability Zone.
+ AvailabilityZone *string
+
+ // Information about the instance.
+ Instance *AnalysisComponent
+
+ // The port on which the target is listening.
+ Port *int32
+
+ noSmithyDocumentSerde
+}
+
+// Describes a header. Reflects any changes made by a component as traffic passes
+// through. The fields of an inbound header are null except for the first component
+// of a path.
+type AnalysisPacketHeader struct {
+
+ // The destination addresses.
+ DestinationAddresses []string
+
+ // The destination port ranges.
+ DestinationPortRanges []PortRange
+
+ // The protocol.
+ Protocol *string
+
+ // The source addresses.
+ SourceAddresses []string
+
+ // The source port ranges.
+ SourcePortRanges []PortRange
+
+ noSmithyDocumentSerde
+}
+
+// Describes a route table route.
+type AnalysisRouteTableRoute struct {
+
+ // The destination IPv4 address, in CIDR notation.
+ DestinationCidr *string
+
+ // The prefix of the Amazon Web Service.
+ DestinationPrefixListId *string
+
+ // The ID of an egress-only internet gateway.
+ EgressOnlyInternetGatewayId *string
+
+ // The ID of the gateway, such as an internet gateway or virtual private gateway.
+ GatewayId *string
+
+ // The ID of the instance, such as a NAT instance.
+ InstanceId *string
+
+ // The ID of a NAT gateway.
+ NatGatewayId *string
+
+ // The ID of a network interface.
+ NetworkInterfaceId *string
+
+ // Describes how the route was created. The following are possible values:
+ //
+ // *
+ // CreateRouteTable - The route was automatically created when the route table was
+ // created.
+ //
+ // * CreateRoute - The route was manually added to the route table.
+ //
+ // *
+ // EnableVgwRoutePropagation - The route was propagated by route propagation.
+ Origin *string
+
+ // The ID of a transit gateway.
+ TransitGatewayId *string
+
+ // The ID of a VPC peering connection.
+ VpcPeeringConnectionId *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes a security group rule.
+type AnalysisSecurityGroupRule struct {
+
+ // The IPv4 address range, in CIDR notation.
+ Cidr *string
+
+ // The direction. The following are possible values:
+ //
+ // * egress
+ //
+ // * ingress
+ Direction *string
+
+ // The port range.
+ PortRange *PortRange
+
+ // The prefix list ID.
+ PrefixListId *string
+
+ // The protocol name.
+ Protocol *string
+
+ // The security group ID.
+ SecurityGroupId *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes the private IP addresses assigned to a network interface.
+type AssignedPrivateIpAddress struct {
+
+ // The private IP address assigned to the network interface.
+ PrivateIpAddress *string
+
+ noSmithyDocumentSerde
+}
+
+// Information about the associated IAM roles.
+type AssociatedRole struct {
+
+ // The ARN of the associated IAM role.
+ AssociatedRoleArn *string
+
+ // The name of the Amazon S3 bucket in which the Amazon S3 object is stored.
+ CertificateS3BucketName *string
+
+ // The key of the Amazon S3 object ey where the certificate, certificate chain, and
+ // encrypted private key bundle is stored. The object key is formated as follows:
+ // role_arn/certificate_arn.
+ CertificateS3ObjectKey *string
+
+ // The ID of the KMS customer master key (CMK) used to encrypt the private key.
+ EncryptionKmsKeyId *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes a target network that is associated with a Client VPN endpoint. A
+// target network is a subnet in a VPC.
+type AssociatedTargetNetwork struct {
+
+ // The ID of the subnet.
+ NetworkId *string
+
+ // The target network type.
+ NetworkType AssociatedNetworkType
+
+ noSmithyDocumentSerde
+}
+
+// Describes the state of a target network association.
+type AssociationStatus struct {
+
+ // The state of the target network association.
+ Code AssociationStatusCode
+
+ // A message about the status of the target network association, if applicable.
+ Message *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes integration options for Amazon Athena.
+type AthenaIntegration struct {
+
+ // The location in Amazon S3 to store the generated CloudFormation template.
+ //
+ // This member is required.
+ IntegrationResultS3DestinationArn *string
+
+ // The schedule for adding new partitions to the table.
+ //
+ // This member is required.
+ PartitionLoadFrequency PartitionLoadFrequency
+
+ // The end date for the partition.
+ PartitionEndDate *time.Time
+
+ // The start date for the partition.
+ PartitionStartDate *time.Time
+
+ noSmithyDocumentSerde
+}
+
+// Describes a value for a resource attribute that is a Boolean value.
+type AttributeBooleanValue struct {
+
+ // The attribute value. The valid values are true or false.
+ Value *bool
+
+ noSmithyDocumentSerde
+}
+
+// Describes a value for a resource attribute that is a String.
+type AttributeValue struct {
+
+ // The attribute value. The value is case-sensitive.
+ Value *string
+
+ noSmithyDocumentSerde
+}
+
+// Information about an authorization rule.
+type AuthorizationRule struct {
+
+ // Indicates whether the authorization rule grants access to all clients.
+ AccessAll *bool
+
+ // The ID of the Client VPN endpoint with which the authorization rule is
+ // associated.
+ ClientVpnEndpointId *string
+
+ // A brief description of the authorization rule.
+ Description *string
+
+ // The IPv4 address range, in CIDR notation, of the network to which the
+ // authorization rule applies.
+ DestinationCidr *string
+
+ // The ID of the Active Directory group to which the authorization rule grants
+ // access.
+ GroupId *string
+
+ // The current state of the authorization rule.
+ Status *ClientVpnAuthorizationRuleStatus
+
+ noSmithyDocumentSerde
+}
+
+// Describes Availability Zones, Local Zones, and Wavelength Zones.
+type AvailabilityZone struct {
+
+ // For Availability Zones, this parameter has the same value as the Region name.
+ // For Local Zones, the name of the associated group, for example us-west-2-lax-1.
+ // For Wavelength Zones, the name of the associated group, for example
+ // us-east-1-wl1-bos-wlz-1.
+ GroupName *string
+
+ // Any messages about the Availability Zone, Local Zone, or Wavelength Zone.
+ Messages []AvailabilityZoneMessage
+
+ // The name of the network border group.
+ NetworkBorderGroup *string
+
+ // For Availability Zones, this parameter always has the value of
+ // opt-in-not-required. For Local Zones and Wavelength Zones, this parameter is the
+ // opt-in status. The possible values are opted-in, and not-opted-in.
+ OptInStatus AvailabilityZoneOptInStatus
+
+ // The ID of the zone that handles some of the Local Zone or Wavelength Zone
+ // control plane operations, such as API calls.
+ ParentZoneId *string
+
+ // The name of the zone that handles some of the Local Zone or Wavelength Zone
+ // control plane operations, such as API calls.
+ ParentZoneName *string
+
+ // The name of the Region.
+ RegionName *string
+
+ // The state of the Availability Zone, Local Zone, or Wavelength Zone.
+ State AvailabilityZoneState
+
+ // The ID of the Availability Zone, Local Zone, or Wavelength Zone.
+ ZoneId *string
+
+ // The name of the Availability Zone, Local Zone, or Wavelength Zone.
+ ZoneName *string
+
+ // The type of zone. The valid values are availability-zone, local-zone, and
+ // wavelength-zone.
+ ZoneType *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes a message about an Availability Zone, Local Zone, or Wavelength Zone.
+type AvailabilityZoneMessage struct {
+
+ // The message about the Availability Zone, Local Zone, or Wavelength Zone.
+ Message *string
+
+ noSmithyDocumentSerde
+}
+
+// The capacity information for instances that can be launched onto the Dedicated
+// Host.
+type AvailableCapacity struct {
+
+ // The number of instances that can be launched onto the Dedicated Host depending
+ // on the host's available capacity. For Dedicated Hosts that support multiple
+ // instance types, this parameter represents the number of instances for each
+ // instance size that is supported on the host.
+ AvailableInstanceCapacity []InstanceCapacity
+
+ // The number of vCPUs available for launching instances onto the Dedicated Host.
+ AvailableVCpus *int32
+
+ noSmithyDocumentSerde
+}
+
+type BlobAttributeValue struct {
+ Value []byte
+
+ noSmithyDocumentSerde
+}
+
+// Describes a block device mapping, which defines the EBS volumes and instance
+// store volumes to attach to an instance at launch.
+type BlockDeviceMapping struct {
+
+ // The device name (for example, /dev/sdh or xvdh).
+ DeviceName *string
+
+ // Parameters used to automatically set up EBS volumes when the instance is
+ // launched.
+ Ebs *EbsBlockDevice
+
+ // To omit the device from the block device mapping, specify an empty string. When
+ // this property is specified, the device is removed from the block device mapping
+ // regardless of the assigned value.
+ NoDevice *string
+
+ // The virtual device name (ephemeralN). Instance store volumes are numbered
+ // starting from 0. An instance type with 2 available instance store volumes can
+ // specify mappings for ephemeral0 and ephemeral1. The number of available instance
+ // store volumes depends on the instance type. After you connect to the instance,
+ // you must mount the volume. NVMe instance store volumes are automatically
+ // enumerated and assigned a device name. Including them in your block device
+ // mapping has no effect. Constraints: For M3 instances, you must specify instance
+ // store volumes in the block device mapping for the instance. When you launch an
+ // M3 instance, we ignore any instance store volumes specified in the block device
+ // mapping for the AMI.
+ VirtualName *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes a bundle task.
+type BundleTask struct {
+
+ // The ID of the bundle task.
+ BundleId *string
+
+ // If the task fails, a description of the error.
+ BundleTaskError *BundleTaskError
+
+ // The ID of the instance associated with this bundle task.
+ InstanceId *string
+
+ // The level of task completion, as a percent (for example, 20%).
+ Progress *string
+
+ // The time this task started.
+ StartTime *time.Time
+
+ // The state of the task.
+ State BundleTaskState
+
+ // The Amazon S3 storage locations.
+ Storage *Storage
+
+ // The time of the most recent update for the task.
+ UpdateTime *time.Time
+
+ noSmithyDocumentSerde
+}
+
+// Describes an error for BundleInstance.
+type BundleTaskError struct {
+
+ // The error code.
+ Code *string
+
+ // The error message.
+ Message *string
+
+ noSmithyDocumentSerde
+}
+
+// Information about an address range that is provisioned for use with your Amazon
+// Web Services resources through bring your own IP addresses (BYOIP).
+type ByoipCidr struct {
+
+ // The address range, in CIDR notation.
+ Cidr *string
+
+ // The description of the address range.
+ Description *string
+
+ // The state of the address pool.
+ State ByoipCidrState
+
+ // Upon success, contains the ID of the address pool. Otherwise, contains an error
+ // message.
+ StatusMessage *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes a request to cancel a Spot Instance.
+type CancelledSpotInstanceRequest struct {
+
+ // The ID of the Spot Instance request.
+ SpotInstanceRequestId *string
+
+ // The state of the Spot Instance request.
+ State CancelSpotInstanceRequestState
+
+ noSmithyDocumentSerde
+}
+
+// Describes a Spot Fleet error.
+type CancelSpotFleetRequestsError struct {
+
+ // The error code.
+ Code CancelBatchErrorCode
+
+ // The description for the error code.
+ Message *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes a Spot Fleet request that was not successfully canceled.
+type CancelSpotFleetRequestsErrorItem struct {
+
+ // The error.
+ Error *CancelSpotFleetRequestsError
+
+ // The ID of the Spot Fleet request.
+ SpotFleetRequestId *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes a Spot Fleet request that was successfully canceled.
+type CancelSpotFleetRequestsSuccessItem struct {
+
+ // The current state of the Spot Fleet request.
+ CurrentSpotFleetRequestState BatchState
+
+ // The previous state of the Spot Fleet request.
+ PreviousSpotFleetRequestState BatchState
+
+ // The ID of the Spot Fleet request.
+ SpotFleetRequestId *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes a Capacity Reservation.
+type CapacityReservation struct {
+
+ // The Availability Zone in which the capacity is reserved.
+ AvailabilityZone *string
+
+ // The Availability Zone ID of the Capacity Reservation.
+ AvailabilityZoneId *string
+
+ // The remaining capacity. Indicates the number of instances that can be launched
+ // in the Capacity Reservation.
+ AvailableInstanceCount *int32
+
+ // The Amazon Resource Name (ARN) of the Capacity Reservation.
+ CapacityReservationArn *string
+
+ // The ID of the Capacity Reservation.
+ CapacityReservationId *string
+
+ // The date and time at which the Capacity Reservation was created.
+ CreateDate *time.Time
+
+ // Indicates whether the Capacity Reservation supports EBS-optimized instances.
+ // This optimization provides dedicated throughput to Amazon EBS and an optimized
+ // configuration stack to provide optimal I/O performance. This optimization isn't
+ // available with all instance types. Additional usage charges apply when using an
+ // EBS- optimized instance.
+ EbsOptimized *bool
+
+ // The date and time at which the Capacity Reservation expires. When a Capacity
+ // Reservation expires, the reserved capacity is released and you can no longer
+ // launch instances into it. The Capacity Reservation's state changes to expired
+ // when it reaches its end date and time.
+ EndDate *time.Time
+
+ // Indicates the way in which the Capacity Reservation ends. A Capacity Reservation
+ // can have one of the following end types:
+ //
+ // * unlimited - The Capacity Reservation
+ // remains active until you explicitly cancel it.
+ //
+ // * limited - The Capacity
+ // Reservation expires automatically at a specified date and time.
+ EndDateType EndDateType
+
+ // Indicates whether the Capacity Reservation supports instances with temporary,
+ // block-level storage.
+ EphemeralStorage *bool
+
+ // Indicates the type of instance launches that the Capacity Reservation accepts.
+ // The options include:
+ //
+ // * open - The Capacity Reservation accepts all instances
+ // that have matching attributes (instance type, platform, and Availability Zone).
+ // Instances that have matching attributes launch into the Capacity Reservation
+ // automatically without specifying any additional parameters.
+ //
+ // * targeted - The
+ // Capacity Reservation only accepts instances that have matching attributes
+ // (instance type, platform, and Availability Zone), and explicitly target the
+ // Capacity Reservation. This ensures that only permitted instances can use the
+ // reserved capacity.
+ InstanceMatchCriteria InstanceMatchCriteria
+
+ // The type of operating system for which the Capacity Reservation reserves
+ // capacity.
+ InstancePlatform CapacityReservationInstancePlatform
+
+ // The type of instance for which the Capacity Reservation reserves capacity.
+ InstanceType *string
+
+ // The Amazon Resource Name (ARN) of the Outpost on which the Capacity Reservation
+ // was created.
+ OutpostArn *string
+
+ // The ID of the Amazon Web Services account that owns the Capacity Reservation.
+ OwnerId *string
+
+ // The date and time at which the Capacity Reservation was started.
+ StartDate *time.Time
+
+ // The current state of the Capacity Reservation. A Capacity Reservation can be in
+ // one of the following states:
+ //
+ // * active - The Capacity Reservation is active and
+ // the capacity is available for your use.
+ //
+ // * expired - The Capacity Reservation
+ // expired automatically at the date and time specified in your request. The
+ // reserved capacity is no longer available for your use.
+ //
+ // * cancelled - The
+ // Capacity Reservation was cancelled. The reserved capacity is no longer available
+ // for your use.
+ //
+ // * pending - The Capacity Reservation request was successful but
+ // the capacity provisioning is still pending.
+ //
+ // * failed - The Capacity Reservation
+ // request has failed. A request might fail due to invalid request parameters,
+ // capacity constraints, or instance limit constraints. Failed requests are
+ // retained for 60 minutes.
+ State CapacityReservationState
+
+ // Any tags assigned to the Capacity Reservation.
+ Tags []Tag
+
+ // Indicates the tenancy of the Capacity Reservation. A Capacity Reservation can
+ // have one of the following tenancy settings:
+ //
+ // * default - The Capacity
+ // Reservation is created on hardware that is shared with other Amazon Web Services
+ // accounts.
+ //
+ // * dedicated - The Capacity Reservation is created on single-tenant
+ // hardware that is dedicated to a single Amazon Web Services account.
+ Tenancy CapacityReservationTenancy
+
+ // The total number of instances for which the Capacity Reservation reserves
+ // capacity.
+ TotalInstanceCount *int32
+
+ noSmithyDocumentSerde
+}
+
+// Describes a resource group to which a Capacity Reservation has been added.
+type CapacityReservationGroup struct {
+
+ // The ARN of the resource group.
+ GroupArn *string
+
+ // The ID of the Amazon Web Services account that owns the resource group.
+ OwnerId *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes the strategy for using unused Capacity Reservations for fulfilling
+// On-Demand capacity. This strategy can only be used if the EC2 Fleet is of type
+// instant. For more information about Capacity Reservations, see On-Demand
+// Capacity Reservations
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-capacity-reservations.html)
+// in the Amazon EC2 User Guide. For examples of using Capacity Reservations in an
+// EC2 Fleet, see EC2 Fleet example configurations
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet-examples.html) in
+// the Amazon EC2 User Guide.
+type CapacityReservationOptions struct {
+
+ // Indicates whether to use unused Capacity Reservations for fulfilling On-Demand
+ // capacity. If you specify use-capacity-reservations-first, the fleet uses unused
+ // Capacity Reservations to fulfill On-Demand capacity up to the target On-Demand
+ // capacity. If multiple instance pools have unused Capacity Reservations, the
+ // On-Demand allocation strategy (lowest-price or prioritized) is applied. If the
+ // number of unused Capacity Reservations is less than the On-Demand target
+ // capacity, the remaining On-Demand target capacity is launched according to the
+ // On-Demand allocation strategy (lowest-price or prioritized). If you do not
+ // specify a value, the fleet fulfils the On-Demand capacity according to the
+ // chosen On-Demand allocation strategy.
+ UsageStrategy FleetCapacityReservationUsageStrategy
+
+ noSmithyDocumentSerde
+}
+
+// Describes the strategy for using unused Capacity Reservations for fulfilling
+// On-Demand capacity. This strategy can only be used if the EC2 Fleet is of type
+// instant. For more information about Capacity Reservations, see On-Demand
+// Capacity Reservations
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-capacity-reservations.html)
+// in the Amazon EC2 User Guide. For examples of using Capacity Reservations in an
+// EC2 Fleet, see EC2 Fleet example configurations
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet-examples.html) in
+// the Amazon EC2 User Guide.
+type CapacityReservationOptionsRequest struct {
+
+ // Indicates whether to use unused Capacity Reservations for fulfilling On-Demand
+ // capacity. If you specify use-capacity-reservations-first, the fleet uses unused
+ // Capacity Reservations to fulfill On-Demand capacity up to the target On-Demand
+ // capacity. If multiple instance pools have unused Capacity Reservations, the
+ // On-Demand allocation strategy (lowest-price or prioritized) is applied. If the
+ // number of unused Capacity Reservations is less than the On-Demand target
+ // capacity, the remaining On-Demand target capacity is launched according to the
+ // On-Demand allocation strategy (lowest-price or prioritized). If you do not
+ // specify a value, the fleet fulfils the On-Demand capacity according to the
+ // chosen On-Demand allocation strategy.
+ UsageStrategy FleetCapacityReservationUsageStrategy
+
+ noSmithyDocumentSerde
+}
+
+// Describes an instance's Capacity Reservation targeting option. You can specify
+// only one parameter at a time. If you specify CapacityReservationPreference and
+// CapacityReservationTarget, the request fails. Use the
+// CapacityReservationPreference parameter to configure the instance to run as an
+// On-Demand Instance or to run in any open Capacity Reservation that has matching
+// attributes (instance type, platform, Availability Zone). Use the
+// CapacityReservationTarget parameter to explicitly target a specific Capacity
+// Reservation or a Capacity Reservation group.
+type CapacityReservationSpecification struct {
+
+ // Indicates the instance's Capacity Reservation preferences. Possible preferences
+ // include:
+ //
+ // * open - The instance can run in any open Capacity Reservation that
+ // has matching attributes (instance type, platform, Availability Zone).
+ //
+ // * none -
+ // The instance avoids running in a Capacity Reservation even if one is available.
+ // The instance runs as an On-Demand Instance.
+ CapacityReservationPreference CapacityReservationPreference
+
+ // Information about the target Capacity Reservation or Capacity Reservation group.
+ CapacityReservationTarget *CapacityReservationTarget
+
+ noSmithyDocumentSerde
+}
+
+// Describes the instance's Capacity Reservation targeting preferences. The action
+// returns the capacityReservationPreference response element if the instance is
+// configured to run in On-Demand capacity, or if it is configured in run in any
+// open Capacity Reservation that has matching attributes (instance type, platform,
+// Availability Zone). The action returns the capacityReservationTarget response
+// element if the instance explicily targets a specific Capacity Reservation or
+// Capacity Reservation group.
+type CapacityReservationSpecificationResponse struct {
+
+ // Describes the instance's Capacity Reservation preferences. Possible preferences
+ // include:
+ //
+ // * open - The instance can run in any open Capacity Reservation that
+ // has matching attributes (instance type, platform, Availability Zone).
+ //
+ // * none -
+ // The instance avoids running in a Capacity Reservation even if one is available.
+ // The instance runs in On-Demand capacity.
+ CapacityReservationPreference CapacityReservationPreference
+
+ // Information about the targeted Capacity Reservation or Capacity Reservation
+ // group.
+ CapacityReservationTarget *CapacityReservationTargetResponse
+
+ noSmithyDocumentSerde
+}
+
+// Describes a target Capacity Reservation or Capacity Reservation group.
+type CapacityReservationTarget struct {
+
+ // The ID of the Capacity Reservation in which to run the instance.
+ CapacityReservationId *string
+
+ // The ARN of the Capacity Reservation resource group in which to run the instance.
+ CapacityReservationResourceGroupArn *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes a target Capacity Reservation or Capacity Reservation group.
+type CapacityReservationTargetResponse struct {
+
+ // The ID of the targeted Capacity Reservation.
+ CapacityReservationId *string
+
+ // The ARN of the targeted Capacity Reservation group.
+ CapacityReservationResourceGroupArn *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes a carrier gateway.
+type CarrierGateway struct {
+
+ // The ID of the carrier gateway.
+ CarrierGatewayId *string
+
+ // The Amazon Web Services account ID of the owner of the carrier gateway.
+ OwnerId *string
+
+ // The state of the carrier gateway.
+ State CarrierGatewayState
+
+ // The tags assigned to the carrier gateway.
+ Tags []Tag
+
+ // The ID of the VPC associated with the carrier gateway.
+ VpcId *string
+
+ noSmithyDocumentSerde
+}
+
+// Information about the client certificate used for authentication.
+type CertificateAuthentication struct {
+
+ // The ARN of the client certificate.
+ ClientRootCertificateChain *string
+
+ noSmithyDocumentSerde
+}
+
+// Information about the client certificate to be used for authentication.
+type CertificateAuthenticationRequest struct {
+
+ // The ARN of the client certificate. The certificate must be signed by a
+ // certificate authority (CA) and it must be provisioned in Certificate Manager
+ // (ACM).
+ ClientRootCertificateChainArn *string
+
+ noSmithyDocumentSerde
+}
+
+// Provides authorization for Amazon to bring a specific IP address range to a
+// specific Amazon Web Services account using bring your own IP addresses (BYOIP).
+// For more information, see Configuring your BYOIP address range
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-byoip.html#prepare-for-byoip)
+// in the Amazon Elastic Compute Cloud User Guide.
+type CidrAuthorizationContext struct {
+
+ // The plain-text authorization message for the prefix and account.
+ //
+ // This member is required.
+ Message *string
+
+ // The signed authorization message for the prefix and account.
+ //
+ // This member is required.
+ Signature *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes an IPv4 CIDR block.
+type CidrBlock struct {
+
+ // The IPv4 CIDR block.
+ CidrBlock *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes the ClassicLink DNS support status of a VPC.
+type ClassicLinkDnsSupport struct {
+
+ // Indicates whether ClassicLink DNS support is enabled for the VPC.
+ ClassicLinkDnsSupported *bool
+
+ // The ID of the VPC.
+ VpcId *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes a linked EC2-Classic instance.
+type ClassicLinkInstance struct {
+
+ // A list of security groups.
+ Groups []GroupIdentifier
+
+ // The ID of the instance.
+ InstanceId *string
+
+ // Any tags assigned to the instance.
+ Tags []Tag
+
+ // The ID of the VPC.
+ VpcId *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes a Classic Load Balancer.
+type ClassicLoadBalancer struct {
+
+ // The name of the load balancer.
+ Name *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes the Classic Load Balancers to attach to a Spot Fleet. Spot Fleet
+// registers the running Spot Instances with these Classic Load Balancers.
+type ClassicLoadBalancersConfig struct {
+
+ // One or more Classic Load Balancers.
+ ClassicLoadBalancers []ClassicLoadBalancer
+
+ noSmithyDocumentSerde
+}
+
+// Describes the state of a client certificate revocation list.
+type ClientCertificateRevocationListStatus struct {
+
+ // The state of the client certificate revocation list.
+ Code ClientCertificateRevocationListStatusCode
+
+ // A message about the status of the client certificate revocation list, if
+ // applicable.
+ Message *string
+
+ noSmithyDocumentSerde
+}
+
+// The options for managing connection authorization for new client connections.
+type ClientConnectOptions struct {
+
+ // Indicates whether client connect options are enabled. The default is false (not
+ // enabled).
+ Enabled *bool
+
+ // The Amazon Resource Name (ARN) of the Lambda function used for connection
+ // authorization.
+ LambdaFunctionArn *string
+
+ noSmithyDocumentSerde
+}
+
+// The options for managing connection authorization for new client connections.
+type ClientConnectResponseOptions struct {
+
+ // Indicates whether client connect options are enabled.
+ Enabled *bool
+
+ // The Amazon Resource Name (ARN) of the Lambda function used for connection
+ // authorization.
+ LambdaFunctionArn *string
+
+ // The status of any updates to the client connect options.
+ Status *ClientVpnEndpointAttributeStatus
+
+ noSmithyDocumentSerde
+}
+
+// Describes the client-specific data.
+type ClientData struct {
+
+ // A user-defined comment about the disk upload.
+ Comment *string
+
+ // The time that the disk upload ends.
+ UploadEnd *time.Time
+
+ // The size of the uploaded disk image, in GiB.
+ UploadSize *float64
+
+ // The time that the disk upload starts.
+ UploadStart *time.Time
+
+ noSmithyDocumentSerde
+}
+
+// Describes the authentication methods used by a Client VPN endpoint. For more
+// information, see Authentication
+// (https://docs.aws.amazon.com/vpn/latest/clientvpn-admin/client-authentication.html)
+// in the Client VPN Administrator Guide.
+type ClientVpnAuthentication struct {
+
+ // Information about the Active Directory, if applicable.
+ ActiveDirectory *DirectoryServiceAuthentication
+
+ // Information about the IAM SAML identity provider, if applicable.
+ FederatedAuthentication *FederatedAuthentication
+
+ // Information about the authentication certificates, if applicable.
+ MutualAuthentication *CertificateAuthentication
+
+ // The authentication type used.
+ Type ClientVpnAuthenticationType
+
+ noSmithyDocumentSerde
+}
+
+// Describes the authentication method to be used by a Client VPN endpoint. For
+// more information, see Authentication
+// (https://docs.aws.amazon.com/vpn/latest/clientvpn-admin/authentication-authrization.html#client-authentication)
+// in the Client VPN Administrator Guide.
+type ClientVpnAuthenticationRequest struct {
+
+ // Information about the Active Directory to be used, if applicable. You must
+ // provide this information if Type is directory-service-authentication.
+ ActiveDirectory *DirectoryServiceAuthenticationRequest
+
+ // Information about the IAM SAML identity provider to be used, if applicable. You
+ // must provide this information if Type is federated-authentication.
+ FederatedAuthentication *FederatedAuthenticationRequest
+
+ // Information about the authentication certificates to be used, if applicable. You
+ // must provide this information if Type is certificate-authentication.
+ MutualAuthentication *CertificateAuthenticationRequest
+
+ // The type of client authentication to be used.
+ Type ClientVpnAuthenticationType
+
+ noSmithyDocumentSerde
+}
+
+// Describes the state of an authorization rule.
+type ClientVpnAuthorizationRuleStatus struct {
+
+ // The state of the authorization rule.
+ Code ClientVpnAuthorizationRuleStatusCode
+
+ // A message about the status of the authorization rule, if applicable.
+ Message *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes a client connection.
+type ClientVpnConnection struct {
+
+ // The IP address of the client.
+ ClientIp *string
+
+ // The ID of the Client VPN endpoint to which the client is connected.
+ ClientVpnEndpointId *string
+
+ // The common name associated with the client. This is either the name of the
+ // client certificate, or the Active Directory user name.
+ CommonName *string
+
+ // The date and time the client connection was terminated.
+ ConnectionEndTime *string
+
+ // The date and time the client connection was established.
+ ConnectionEstablishedTime *string
+
+ // The ID of the client connection.
+ ConnectionId *string
+
+ // The number of bytes received by the client.
+ EgressBytes *string
+
+ // The number of packets received by the client.
+ EgressPackets *string
+
+ // The number of bytes sent by the client.
+ IngressBytes *string
+
+ // The number of packets sent by the client.
+ IngressPackets *string
+
+ // The statuses returned by the client connect handler for posture compliance, if
+ // applicable.
+ PostureComplianceStatuses []string
+
+ // The current state of the client connection.
+ Status *ClientVpnConnectionStatus
+
+ // The current date and time.
+ Timestamp *string
+
+ // The username of the client who established the client connection. This
+ // information is only provided if Active Directory client authentication is used.
+ Username *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes the status of a client connection.
+type ClientVpnConnectionStatus struct {
+
+ // The state of the client connection.
+ Code ClientVpnConnectionStatusCode
+
+ // A message about the status of the client connection, if applicable.
+ Message *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes a Client VPN endpoint.
+type ClientVpnEndpoint struct {
+
+ // Information about the associated target networks. A target network is a subnet
+ // in a VPC.
+ //
+ // Deprecated: This property is deprecated. To view the target networks associated
+ // with a Client VPN endpoint, call DescribeClientVpnTargetNetworks and inspect the
+ // clientVpnTargetNetworks response element.
+ AssociatedTargetNetworks []AssociatedTargetNetwork
+
+ // Information about the authentication method used by the Client VPN endpoint.
+ AuthenticationOptions []ClientVpnAuthentication
+
+ // The IPv4 address range, in CIDR notation, from which client IP addresses are
+ // assigned.
+ ClientCidrBlock *string
+
+ // The options for managing connection authorization for new client connections.
+ ClientConnectOptions *ClientConnectResponseOptions
+
+ // The ID of the Client VPN endpoint.
+ ClientVpnEndpointId *string
+
+ // Information about the client connection logging options for the Client VPN
+ // endpoint.
+ ConnectionLogOptions *ConnectionLogResponseOptions
+
+ // The date and time the Client VPN endpoint was created.
+ CreationTime *string
+
+ // The date and time the Client VPN endpoint was deleted, if applicable.
+ DeletionTime *string
+
+ // A brief description of the endpoint.
+ Description *string
+
+ // The DNS name to be used by clients when connecting to the Client VPN endpoint.
+ DnsName *string
+
+ // Information about the DNS servers to be used for DNS resolution.
+ DnsServers []string
+
+ // The IDs of the security groups for the target network.
+ SecurityGroupIds []string
+
+ // The URL of the self-service portal.
+ SelfServicePortalUrl *string
+
+ // The ARN of the server certificate.
+ ServerCertificateArn *string
+
+ // Indicates whether split-tunnel is enabled in the Client VPN endpoint. For
+ // information about split-tunnel VPN endpoints, see Split-Tunnel Client VPN
+ // endpoint
+ // (https://docs.aws.amazon.com/vpn/latest/clientvpn-admin/split-tunnel-vpn.html)
+ // in the Client VPN Administrator Guide.
+ SplitTunnel *bool
+
+ // The current state of the Client VPN endpoint.
+ Status *ClientVpnEndpointStatus
+
+ // Any tags assigned to the Client VPN endpoint.
+ Tags []Tag
+
+ // The transport protocol used by the Client VPN endpoint.
+ TransportProtocol TransportProtocol
+
+ // The ID of the VPC.
+ VpcId *string
+
+ // The port number for the Client VPN endpoint.
+ VpnPort *int32
+
+ // The protocol used by the VPN session.
+ VpnProtocol VpnProtocol
+
+ noSmithyDocumentSerde
+}
+
+// Describes the status of the Client VPN endpoint attribute.
+type ClientVpnEndpointAttributeStatus struct {
+
+ // The status code.
+ Code ClientVpnEndpointAttributeStatusCode
+
+ // The status message.
+ Message *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes the state of a Client VPN endpoint.
+type ClientVpnEndpointStatus struct {
+
+ // The state of the Client VPN endpoint. Possible states include:
+ //
+ // *
+ // pending-associate - The Client VPN endpoint has been created but no target
+ // networks have been associated. The Client VPN endpoint cannot accept
+ // connections.
+ //
+ // * available - The Client VPN endpoint has been created and a
+ // target network has been associated. The Client VPN endpoint can accept
+ // connections.
+ //
+ // * deleting - The Client VPN endpoint is being deleted. The Client
+ // VPN endpoint cannot accept connections.
+ //
+ // * deleted - The Client VPN endpoint has
+ // been deleted. The Client VPN endpoint cannot accept connections.
+ Code ClientVpnEndpointStatusCode
+
+ // A message about the status of the Client VPN endpoint.
+ Message *string
+
+ noSmithyDocumentSerde
+}
+
+// Information about a Client VPN endpoint route.
+type ClientVpnRoute struct {
+
+ // The ID of the Client VPN endpoint with which the route is associated.
+ ClientVpnEndpointId *string
+
+ // A brief description of the route.
+ Description *string
+
+ // The IPv4 address range, in CIDR notation, of the route destination.
+ DestinationCidr *string
+
+ // Indicates how the route was associated with the Client VPN endpoint. associate
+ // indicates that the route was automatically added when the target network was
+ // associated with the Client VPN endpoint. add-route indicates that the route was
+ // manually added using the CreateClientVpnRoute action.
+ Origin *string
+
+ // The current state of the route.
+ Status *ClientVpnRouteStatus
+
+ // The ID of the subnet through which traffic is routed.
+ TargetSubnet *string
+
+ // The route type.
+ Type *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes the state of a Client VPN endpoint route.
+type ClientVpnRouteStatus struct {
+
+ // The state of the Client VPN endpoint route.
+ Code ClientVpnRouteStatusCode
+
+ // A message about the status of the Client VPN endpoint route, if applicable.
+ Message *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes address usage for a customer-owned address pool.
+type CoipAddressUsage struct {
+
+ // The allocation ID of the address.
+ AllocationId *string
+
+ // The AWS account ID.
+ AwsAccountId *string
+
+ // The AWS service.
+ AwsService *string
+
+ // The customer-owned IP address.
+ CoIp *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes a customer-owned address pool.
+type CoipPool struct {
+
+ // The ID of the local gateway route table.
+ LocalGatewayRouteTableId *string
+
+ // The ARN of the address pool.
+ PoolArn *string
+
+ // The address ranges of the address pool.
+ PoolCidrs []string
+
+ // The ID of the address pool.
+ PoolId *string
+
+ // The tags.
+ Tags []Tag
+
+ noSmithyDocumentSerde
+}
+
+// Describes the client connection logging options for the Client VPN endpoint.
+type ConnectionLogOptions struct {
+
+ // The name of the CloudWatch Logs log group. Required if connection logging is
+ // enabled.
+ CloudwatchLogGroup *string
+
+ // The name of the CloudWatch Logs log stream to which the connection data is
+ // published.
+ CloudwatchLogStream *string
+
+ // Indicates whether connection logging is enabled.
+ Enabled *bool
+
+ noSmithyDocumentSerde
+}
+
+// Information about the client connection logging options for a Client VPN
+// endpoint.
+type ConnectionLogResponseOptions struct {
+
+ // The name of the Amazon CloudWatch Logs log group to which connection logging
+ // data is published.
+ CloudwatchLogGroup *string
+
+ // The name of the Amazon CloudWatch Logs log stream to which connection logging
+ // data is published.
+ CloudwatchLogStream *string
+
+ // Indicates whether client connection logging is enabled for the Client VPN
+ // endpoint.
+ Enabled *bool
+
+ noSmithyDocumentSerde
+}
+
+// Describes a connection notification for a VPC endpoint or VPC endpoint service.
+type ConnectionNotification struct {
+
+ // The events for the notification. Valid values are Accept, Connect, Delete, and
+ // Reject.
+ ConnectionEvents []string
+
+ // The ARN of the SNS topic for the notification.
+ ConnectionNotificationArn *string
+
+ // The ID of the notification.
+ ConnectionNotificationId *string
+
+ // The state of the notification.
+ ConnectionNotificationState ConnectionNotificationState
+
+ // The type of notification.
+ ConnectionNotificationType ConnectionNotificationType
+
+ // The ID of the endpoint service.
+ ServiceId *string
+
+ // The ID of the VPC endpoint.
+ VpcEndpointId *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes a conversion task.
+type ConversionTask struct {
+
+ // The ID of the conversion task.
+ ConversionTaskId *string
+
+ // The time when the task expires. If the upload isn't complete before the
+ // expiration time, we automatically cancel the task.
+ ExpirationTime *string
+
+ // If the task is for importing an instance, this contains information about the
+ // import instance task.
+ ImportInstance *ImportInstanceTaskDetails
+
+ // If the task is for importing a volume, this contains information about the
+ // import volume task.
+ ImportVolume *ImportVolumeTaskDetails
+
+ // The state of the conversion task.
+ State ConversionTaskState
+
+ // The status message related to the conversion task.
+ StatusMessage *string
+
+ // Any tags assigned to the task.
+ Tags []Tag
+
+ noSmithyDocumentSerde
+}
+
+// The CPU options for the instance.
+type CpuOptions struct {
+
+ // The number of CPU cores for the instance.
+ CoreCount *int32
+
+ // The number of threads per CPU core.
+ ThreadsPerCore *int32
+
+ noSmithyDocumentSerde
+}
+
+// The CPU options for the instance. Both the core count and threads per core must
+// be specified in the request.
+type CpuOptionsRequest struct {
+
+ // The number of CPU cores for the instance.
+ CoreCount *int32
+
+ // The number of threads per CPU core. To disable multithreading for the instance,
+ // specify a value of 1. Otherwise, specify the default value of 2.
+ ThreadsPerCore *int32
+
+ noSmithyDocumentSerde
+}
+
+// Describes the instances that could not be launched by the fleet.
+type CreateFleetError struct {
+
+ // The error code that indicates why the instance could not be launched. For more
+ // information about error codes, see Error Codes
+ // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/errors-overview.html.html).
+ ErrorCode *string
+
+ // The error message that describes why the instance could not be launched. For
+ // more information about error messages, see Error Codes
+ // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/errors-overview.html.html).
+ ErrorMessage *string
+
+ // The launch templates and overrides that were used for launching the instances.
+ // The values that you specify in the Overrides replace the values in the launch
+ // template.
+ LaunchTemplateAndOverrides *LaunchTemplateAndOverridesResponse
+
+ // Indicates if the instance that could not be launched was a Spot Instance or
+ // On-Demand Instance.
+ Lifecycle InstanceLifecycle
+
+ noSmithyDocumentSerde
+}
+
+// Describes the instances that were launched by the fleet.
+type CreateFleetInstance struct {
+
+ // The IDs of the instances.
+ InstanceIds []string
+
+ // The instance type.
+ InstanceType InstanceType
+
+ // The launch templates and overrides that were used for launching the instances.
+ // The values that you specify in the Overrides replace the values in the launch
+ // template.
+ LaunchTemplateAndOverrides *LaunchTemplateAndOverridesResponse
+
+ // Indicates if the instance that was launched is a Spot Instance or On-Demand
+ // Instance.
+ Lifecycle InstanceLifecycle
+
+ // The value is Windows for Windows instances. Otherwise, the value is blank.
+ Platform PlatformValues
+
+ noSmithyDocumentSerde
+}
+
+// The options for a Connect attachment.
+type CreateTransitGatewayConnectRequestOptions struct {
+
+ // The tunnel protocol.
+ //
+ // This member is required.
+ Protocol ProtocolValue
+
+ noSmithyDocumentSerde
+}
+
+// The options for the transit gateway multicast domain.
+type CreateTransitGatewayMulticastDomainRequestOptions struct {
+
+ // Indicates whether to automatically accept cross-account subnet associations that
+ // are associated with the transit gateway multicast domain.
+ AutoAcceptSharedAssociations AutoAcceptSharedAssociationsValue
+
+ // Specify whether to enable Internet Group Management Protocol (IGMP) version 2
+ // for the transit gateway multicast domain.
+ Igmpv2Support Igmpv2SupportValue
+
+ // Specify whether to enable support for statically configuring multicast group
+ // sources for a domain.
+ StaticSourcesSupport StaticSourcesSupportValue
+
+ noSmithyDocumentSerde
+}
+
+// Describes the options for a VPC attachment.
+type CreateTransitGatewayVpcAttachmentRequestOptions struct {
+
+ // Enable or disable support for appliance mode. If enabled, a traffic flow between
+ // a source and destination uses the same Availability Zone for the VPC attachment
+ // for the lifetime of that flow. The default is disable.
+ ApplianceModeSupport ApplianceModeSupportValue
+
+ // Enable or disable DNS support. The default is enable.
+ DnsSupport DnsSupportValue
+
+ // Enable or disable IPv6 support. The default is disable.
+ Ipv6Support Ipv6SupportValue
+
+ noSmithyDocumentSerde
+}
+
+// Describes the user or group to be added or removed from the list of create
+// volume permissions for a volume.
+type CreateVolumePermission struct {
+
+ // The group to be added or removed. The possible value is all.
+ Group PermissionGroup
+
+ // The ID of the Amazon Web Services account to be added or removed.
+ UserId *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes modifications to the list of create volume permissions for a volume.
+type CreateVolumePermissionModifications struct {
+
+ // Adds the specified Amazon Web Services account ID or group to the list.
+ Add []CreateVolumePermission
+
+ // Removes the specified Amazon Web Services account ID or group from the list.
+ Remove []CreateVolumePermission
+
+ noSmithyDocumentSerde
+}
+
+// Describes the credit option for CPU usage of a T2, T3, or T3a instance.
+type CreditSpecification struct {
+
+ // The credit option for CPU usage of a T2, T3, or T3a instance. Valid values are
+ // standard and unlimited.
+ CpuCredits *string
+
+ noSmithyDocumentSerde
+}
+
+// The credit option for CPU usage of a T2, T3, or T3a instance.
+type CreditSpecificationRequest struct {
+
+ // The credit option for CPU usage of a T2, T3, or T3a instance. Valid values are
+ // standard and unlimited.
+ //
+ // This member is required.
+ CpuCredits *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes a customer gateway.
+type CustomerGateway struct {
+
+ // The customer gateway's Border Gateway Protocol (BGP) Autonomous System Number
+ // (ASN).
+ BgpAsn *string
+
+ // The Amazon Resource Name (ARN) for the customer gateway certificate.
+ CertificateArn *string
+
+ // The ID of the customer gateway.
+ CustomerGatewayId *string
+
+ // The name of customer gateway device.
+ DeviceName *string
+
+ // The Internet-routable IP address of the customer gateway's outside interface.
+ IpAddress *string
+
+ // The current state of the customer gateway (pending | available | deleting |
+ // deleted).
+ State *string
+
+ // Any tags assigned to the customer gateway.
+ Tags []Tag
+
+ // The type of VPN connection the customer gateway supports (ipsec.1).
+ Type *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes an EC2 Fleet error.
+type DeleteFleetError struct {
+
+ // The error code.
+ Code DeleteFleetErrorCode
+
+ // The description for the error code.
+ Message *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes an EC2 Fleet that was not successfully deleted.
+type DeleteFleetErrorItem struct {
+
+ // The error.
+ Error *DeleteFleetError
+
+ // The ID of the EC2 Fleet.
+ FleetId *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes an EC2 Fleet that was successfully deleted.
+type DeleteFleetSuccessItem struct {
+
+ // The current state of the EC2 Fleet.
+ CurrentFleetState FleetStateCode
+
+ // The ID of the EC2 Fleet.
+ FleetId *string
+
+ // The previous state of the EC2 Fleet.
+ PreviousFleetState FleetStateCode
+
+ noSmithyDocumentSerde
+}
+
+// Describes a launch template version that could not be deleted.
+type DeleteLaunchTemplateVersionsResponseErrorItem struct {
+
+ // The ID of the launch template.
+ LaunchTemplateId *string
+
+ // The name of the launch template.
+ LaunchTemplateName *string
+
+ // Information about the error.
+ ResponseError *ResponseError
+
+ // The version number of the launch template.
+ VersionNumber *int64
+
+ noSmithyDocumentSerde
+}
+
+// Describes a launch template version that was successfully deleted.
+type DeleteLaunchTemplateVersionsResponseSuccessItem struct {
+
+ // The ID of the launch template.
+ LaunchTemplateId *string
+
+ // The name of the launch template.
+ LaunchTemplateName *string
+
+ // The version number of the launch template.
+ VersionNumber *int64
+
+ noSmithyDocumentSerde
+}
+
+// Describes the error for a Reserved Instance whose queued purchase could not be
+// deleted.
+type DeleteQueuedReservedInstancesError struct {
+
+ // The error code.
+ Code DeleteQueuedReservedInstancesErrorCode
+
+ // The error message.
+ Message *string
+
+ noSmithyDocumentSerde
+}
+
+// Information about the tag keys to deregister for the current Region. You can
+// either specify individual tag keys or deregister all tag keys in the current
+// Region. You must specify either IncludeAllTagsOfInstance or InstanceTagKeys in
+// the request
+type DeregisterInstanceTagAttributeRequest struct {
+
+ // Indicates whether to deregister all tag keys in the current Region. Specify
+ // false to deregister all tag keys.
+ IncludeAllTagsOfInstance *bool
+
+ // Information about the tag keys to deregister.
+ InstanceTagKeys []string
+
+ noSmithyDocumentSerde
+}
+
+// Describes fast snapshot restores for a snapshot.
+type DescribeFastSnapshotRestoreSuccessItem struct {
+
+ // The Availability Zone.
+ AvailabilityZone *string
+
+ // The time at which fast snapshot restores entered the disabled state.
+ DisabledTime *time.Time
+
+ // The time at which fast snapshot restores entered the disabling state.
+ DisablingTime *time.Time
+
+ // The time at which fast snapshot restores entered the enabled state.
+ EnabledTime *time.Time
+
+ // The time at which fast snapshot restores entered the enabling state.
+ EnablingTime *time.Time
+
+ // The time at which fast snapshot restores entered the optimizing state.
+ OptimizingTime *time.Time
+
+ // The Amazon Web Services owner alias that enabled fast snapshot restores on the
+ // snapshot. This is intended for future use.
+ OwnerAlias *string
+
+ // The ID of the Amazon Web Services account that enabled fast snapshot restores on
+ // the snapshot.
+ OwnerId *string
+
+ // The ID of the snapshot.
+ SnapshotId *string
+
+ // The state of fast snapshot restores.
+ State FastSnapshotRestoreStateCode
+
+ // The reason for the state transition. The possible values are as follows:
+ //
+ // *
+ // Client.UserInitiated - The state successfully transitioned to enabling or
+ // disabling.
+ //
+ // * Client.UserInitiated - Lifecycle state transition - The state
+ // successfully transitioned to optimizing, enabled, or disabled.
+ StateTransitionReason *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes the instances that could not be launched by the fleet.
+type DescribeFleetError struct {
+
+ // The error code that indicates why the instance could not be launched. For more
+ // information about error codes, see Error Codes
+ // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/errors-overview.html.html).
+ ErrorCode *string
+
+ // The error message that describes why the instance could not be launched. For
+ // more information about error messages, see Error Codes
+ // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/errors-overview.html.html).
+ ErrorMessage *string
+
+ // The launch templates and overrides that were used for launching the instances.
+ // The values that you specify in the Overrides replace the values in the launch
+ // template.
+ LaunchTemplateAndOverrides *LaunchTemplateAndOverridesResponse
+
+ // Indicates if the instance that could not be launched was a Spot Instance or
+ // On-Demand Instance.
+ Lifecycle InstanceLifecycle
+
+ noSmithyDocumentSerde
+}
+
+// Describes the instances that were launched by the fleet.
+type DescribeFleetsInstances struct {
+
+ // The IDs of the instances.
+ InstanceIds []string
+
+ // The instance type.
+ InstanceType InstanceType
+
+ // The launch templates and overrides that were used for launching the instances.
+ // The values that you specify in the Overrides replace the values in the launch
+ // template.
+ LaunchTemplateAndOverrides *LaunchTemplateAndOverridesResponse
+
+ // Indicates if the instance that was launched is a Spot Instance or On-Demand
+ // Instance.
+ Lifecycle InstanceLifecycle
+
+ // The value is Windows for Windows instances. Otherwise, the value is blank.
+ Platform PlatformValues
+
+ noSmithyDocumentSerde
+}
+
+// Describes a DHCP configuration option.
+type DhcpConfiguration struct {
+
+ // The name of a DHCP option.
+ Key *string
+
+ // One or more values for the DHCP option.
+ Values []AttributeValue
+
+ noSmithyDocumentSerde
+}
+
+// Describes a set of DHCP options.
+type DhcpOptions struct {
+
+ // One or more DHCP options in the set.
+ DhcpConfigurations []DhcpConfiguration
+
+ // The ID of the set of DHCP options.
+ DhcpOptionsId *string
+
+ // The ID of the Amazon Web Services account that owns the DHCP options set.
+ OwnerId *string
+
+ // Any tags assigned to the DHCP options set.
+ Tags []Tag
+
+ noSmithyDocumentSerde
+}
+
+// Describes an Active Directory.
+type DirectoryServiceAuthentication struct {
+
+ // The ID of the Active Directory used for authentication.
+ DirectoryId *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes the Active Directory to be used for client authentication.
+type DirectoryServiceAuthenticationRequest struct {
+
+ // The ID of the Active Directory to be used for authentication.
+ DirectoryId *string
+
+ noSmithyDocumentSerde
+}
+
+// Contains information about the errors that occurred when disabling fast snapshot
+// restores.
+type DisableFastSnapshotRestoreErrorItem struct {
+
+ // The errors.
+ FastSnapshotRestoreStateErrors []DisableFastSnapshotRestoreStateErrorItem
+
+ // The ID of the snapshot.
+ SnapshotId *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes an error that occurred when disabling fast snapshot restores.
+type DisableFastSnapshotRestoreStateError struct {
+
+ // The error code.
+ Code *string
+
+ // The error message.
+ Message *string
+
+ noSmithyDocumentSerde
+}
+
+// Contains information about an error that occurred when disabling fast snapshot
+// restores.
+type DisableFastSnapshotRestoreStateErrorItem struct {
+
+ // The Availability Zone.
+ AvailabilityZone *string
+
+ // The error.
+ Error *DisableFastSnapshotRestoreStateError
+
+ noSmithyDocumentSerde
+}
+
+// Describes fast snapshot restores that were successfully disabled.
+type DisableFastSnapshotRestoreSuccessItem struct {
+
+ // The Availability Zone.
+ AvailabilityZone *string
+
+ // The time at which fast snapshot restores entered the disabled state.
+ DisabledTime *time.Time
+
+ // The time at which fast snapshot restores entered the disabling state.
+ DisablingTime *time.Time
+
+ // The time at which fast snapshot restores entered the enabled state.
+ EnabledTime *time.Time
+
+ // The time at which fast snapshot restores entered the enabling state.
+ EnablingTime *time.Time
+
+ // The time at which fast snapshot restores entered the optimizing state.
+ OptimizingTime *time.Time
+
+ // The Amazon Web Services owner alias that enabled fast snapshot restores on the
+ // snapshot. This is intended for future use.
+ OwnerAlias *string
+
+ // The ID of the Amazon Web Services account that enabled fast snapshot restores on
+ // the snapshot.
+ OwnerId *string
+
+ // The ID of the snapshot.
+ SnapshotId *string
+
+ // The state of fast snapshot restores for the snapshot.
+ State FastSnapshotRestoreStateCode
+
+ // The reason for the state transition. The possible values are as follows:
+ //
+ // *
+ // Client.UserInitiated - The state successfully transitioned to enabling or
+ // disabling.
+ //
+ // * Client.UserInitiated - Lifecycle state transition - The state
+ // successfully transitioned to optimizing, enabled, or disabled.
+ StateTransitionReason *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes a disk image.
+type DiskImage struct {
+
+ // A description of the disk image.
+ Description *string
+
+ // Information about the disk image.
+ Image *DiskImageDetail
+
+ // Information about the volume.
+ Volume *VolumeDetail
+
+ noSmithyDocumentSerde
+}
+
+// Describes a disk image.
+type DiskImageDescription struct {
+
+ // The checksum computed for the disk image.
+ Checksum *string
+
+ // The disk image format.
+ Format DiskImageFormat
+
+ // A presigned URL for the import manifest stored in Amazon S3. For information
+ // about creating a presigned URL for an Amazon S3 object, read the "Query String
+ // Request Authentication Alternative" section of the Authenticating REST Requests
+ // (https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html) topic
+ // in the Amazon Simple Storage Service Developer Guide. For information about the
+ // import manifest referenced by this API action, see VM Import Manifest
+ // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/manifest.html).
+ ImportManifestUrl *string
+
+ // The size of the disk image, in GiB.
+ Size *int64
+
+ noSmithyDocumentSerde
+}
+
+// Describes a disk image.
+type DiskImageDetail struct {
+
+ // The size of the disk image, in GiB.
+ //
+ // This member is required.
+ Bytes *int64
+
+ // The disk image format.
+ //
+ // This member is required.
+ Format DiskImageFormat
+
+ // A presigned URL for the import manifest stored in Amazon S3 and presented here
+ // as an Amazon S3 presigned URL. For information about creating a presigned URL
+ // for an Amazon S3 object, read the "Query String Request Authentication
+ // Alternative" section of the Authenticating REST Requests
+ // (https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html) topic
+ // in the Amazon Simple Storage Service Developer Guide. For information about the
+ // import manifest referenced by this API action, see VM Import Manifest
+ // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/manifest.html).
+ //
+ // This member is required.
+ ImportManifestUrl *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes a disk image volume.
+type DiskImageVolumeDescription struct {
+
+ // The volume identifier.
+ Id *string
+
+ // The size of the volume, in GiB.
+ Size *int64
+
+ noSmithyDocumentSerde
+}
+
+// Describes the disk.
+type DiskInfo struct {
+
+ // The number of disks with this configuration.
+ Count *int32
+
+ // The size of the disk in GB.
+ SizeInGB *int64
+
+ // The type of disk.
+ Type DiskType
+
+ noSmithyDocumentSerde
+}
+
+// Describes a DNS entry.
+type DnsEntry struct {
+
+ // The DNS name.
+ DnsName *string
+
+ // The ID of the private hosted zone.
+ HostedZoneId *string
+
+ noSmithyDocumentSerde
+}
+
+// Information about the DNS server to be used.
+type DnsServersOptionsModifyStructure struct {
+
+ // The IPv4 address range, in CIDR notation, of the DNS servers to be used. You can
+ // specify up to two DNS servers. Ensure that the DNS servers can be reached by the
+ // clients. The specified values overwrite the existing values.
+ CustomDnsServers []string
+
+ // Indicates whether DNS servers should be used. Specify False to delete the
+ // existing DNS servers.
+ Enabled *bool
+
+ noSmithyDocumentSerde
+}
+
+// Describes a block device for an EBS volume.
+type EbsBlockDevice struct {
+
+ // Indicates whether the EBS volume is deleted on instance termination. For more
+ // information, see Preserving Amazon EBS volumes on instance termination
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/terminating-instances.html#preserving-volumes-on-termination)
+ // in the Amazon EC2 User Guide.
+ DeleteOnTermination *bool
+
+ // Indicates whether the encryption state of an EBS volume is changed while being
+ // restored from a backing snapshot. The effect of setting the encryption state to
+ // true depends on the volume origin (new or from a snapshot), starting encryption
+ // state, ownership, and whether encryption by default is enabled. For more
+ // information, see Amazon EBS encryption
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html#encryption-parameters)
+ // in the Amazon EC2 User Guide. In no case can you remove encryption from an
+ // encrypted volume. Encrypted volumes can only be attached to instances that
+ // support Amazon EBS encryption. For more information, see Supported instance
+ // types
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html#EBSEncryption_supported_instances).
+ // This parameter is not returned by .
+ Encrypted *bool
+
+ // The number of I/O operations per second (IOPS). For gp3, io1, and io2 volumes,
+ // this represents the number of IOPS that are provisioned for the volume. For gp2
+ // volumes, this represents the baseline performance of the volume and the rate at
+ // which the volume accumulates I/O credits for bursting. The following are the
+ // supported values for each volume type:
+ //
+ // * gp3: 3,000-16,000 IOPS
+ //
+ // * io1:
+ // 100-64,000 IOPS
+ //
+ // * io2: 100-64,000 IOPS
+ //
+ // For io1 and io2 volumes, we guarantee
+ // 64,000 IOPS only for Instances built on the Nitro System
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#ec2-nitro-instances).
+ // Other instance families guarantee performance up to 32,000 IOPS. This parameter
+ // is required for io1 and io2 volumes. The default for gp3 volumes is 3,000 IOPS.
+ // This parameter is not supported for gp2, st1, sc1, or standard volumes.
+ Iops *int32
+
+ // Identifier (key ID, key alias, ID ARN, or alias ARN) for a customer managed CMK
+ // under which the EBS volume is encrypted. This parameter is only supported on
+ // BlockDeviceMapping objects called by RunInstances
+ // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RunInstances.html),
+ // RequestSpotFleet
+ // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RequestSpotFleet.html),
+ // and RequestSpotInstances
+ // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RequestSpotInstances.html).
+ KmsKeyId *string
+
+ // The ARN of the Outpost on which the snapshot is stored.
+ OutpostArn *string
+
+ // The ID of the snapshot.
+ SnapshotId *string
+
+ // The throughput that the volume supports, in MiB/s. This parameter is valid only
+ // for gp3 volumes. Valid Range: Minimum value of 125. Maximum value of 1000.
+ Throughput *int32
+
+ // The size of the volume, in GiBs. You must specify either a snapshot ID or a
+ // volume size. If you specify a snapshot, the default is the snapshot size. You
+ // can specify a volume size that is equal to or larger than the snapshot size. The
+ // following are the supported volumes sizes for each volume type:
+ //
+ // * gp2 and
+ // gp3:1-16,384
+ //
+ // * io1 and io2: 4-16,384
+ //
+ // * st1 and sc1: 125-16,384
+ //
+ // * standard:
+ // 1-1,024
+ VolumeSize *int32
+
+ // The volume type. For more information, see Amazon EBS volume types
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html) in the
+ // Amazon EC2 User Guide. If the volume type is io1 or io2, you must specify the
+ // IOPS that the volume supports.
+ VolumeType VolumeType
+
+ noSmithyDocumentSerde
+}
+
+// Describes the Amazon EBS features supported by the instance type.
+type EbsInfo struct {
+
+ // Describes the optimized EBS performance for the instance type.
+ EbsOptimizedInfo *EbsOptimizedInfo
+
+ // Indicates whether the instance type is Amazon EBS-optimized. For more
+ // information, see Amazon EBS-optimized instances
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSOptimized.html) in
+ // Amazon EC2 User Guide.
+ EbsOptimizedSupport EbsOptimizedSupport
+
+ // Indicates whether Amazon EBS encryption is supported.
+ EncryptionSupport EbsEncryptionSupport
+
+ // Indicates whether non-volatile memory express (NVMe) is supported.
+ NvmeSupport EbsNvmeSupport
+
+ noSmithyDocumentSerde
+}
+
+// Describes a parameter used to set up an EBS volume in a block device mapping.
+type EbsInstanceBlockDevice struct {
+
+ // The time stamp when the attachment initiated.
+ AttachTime *time.Time
+
+ // Indicates whether the volume is deleted on instance termination.
+ DeleteOnTermination *bool
+
+ // The attachment state.
+ Status AttachmentStatus
+
+ // The ID of the EBS volume.
+ VolumeId *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes information used to set up an EBS volume specified in a block device
+// mapping.
+type EbsInstanceBlockDeviceSpecification struct {
+
+ // Indicates whether the volume is deleted on instance termination.
+ DeleteOnTermination *bool
+
+ // The ID of the EBS volume.
+ VolumeId *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes the optimized EBS performance for supported instance types.
+type EbsOptimizedInfo struct {
+
+ // The baseline bandwidth performance for an EBS-optimized instance type, in Mbps.
+ BaselineBandwidthInMbps *int32
+
+ // The baseline input/output storage operations per seconds for an EBS-optimized
+ // instance type.
+ BaselineIops *int32
+
+ // The baseline throughput performance for an EBS-optimized instance type, in MB/s.
+ BaselineThroughputInMBps *float64
+
+ // The maximum bandwidth performance for an EBS-optimized instance type, in Mbps.
+ MaximumBandwidthInMbps *int32
+
+ // The maximum input/output storage operations per second for an EBS-optimized
+ // instance type.
+ MaximumIops *int32
+
+ // The maximum throughput performance for an EBS-optimized instance type, in MB/s.
+ MaximumThroughputInMBps *float64
+
+ noSmithyDocumentSerde
+}
+
+// Describes the Elastic Fabric Adapters for the instance type.
+type EfaInfo struct {
+
+ // The maximum number of Elastic Fabric Adapters for the instance type.
+ MaximumEfaInterfaces *int32
+
+ noSmithyDocumentSerde
+}
+
+// Describes an egress-only internet gateway.
+type EgressOnlyInternetGateway struct {
+
+ // Information about the attachment of the egress-only internet gateway.
+ Attachments []InternetGatewayAttachment
+
+ // The ID of the egress-only internet gateway.
+ EgressOnlyInternetGatewayId *string
+
+ // The tags assigned to the egress-only internet gateway.
+ Tags []Tag
+
+ noSmithyDocumentSerde
+}
+
+// Describes the association between an instance and an Elastic Graphics
+// accelerator.
+type ElasticGpuAssociation struct {
+
+ // The ID of the association.
+ ElasticGpuAssociationId *string
+
+ // The state of the association between the instance and the Elastic Graphics
+ // accelerator.
+ ElasticGpuAssociationState *string
+
+ // The time the Elastic Graphics accelerator was associated with the instance.
+ ElasticGpuAssociationTime *string
+
+ // The ID of the Elastic Graphics accelerator.
+ ElasticGpuId *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes the status of an Elastic Graphics accelerator.
+type ElasticGpuHealth struct {
+
+ // The health status.
+ Status ElasticGpuStatus
+
+ noSmithyDocumentSerde
+}
+
+// Describes an Elastic Graphics accelerator.
+type ElasticGpus struct {
+
+ // The Availability Zone in the which the Elastic Graphics accelerator resides.
+ AvailabilityZone *string
+
+ // The status of the Elastic Graphics accelerator.
+ ElasticGpuHealth *ElasticGpuHealth
+
+ // The ID of the Elastic Graphics accelerator.
+ ElasticGpuId *string
+
+ // The state of the Elastic Graphics accelerator.
+ ElasticGpuState ElasticGpuState
+
+ // The type of Elastic Graphics accelerator.
+ ElasticGpuType *string
+
+ // The ID of the instance to which the Elastic Graphics accelerator is attached.
+ InstanceId *string
+
+ // The tags assigned to the Elastic Graphics accelerator.
+ Tags []Tag
+
+ noSmithyDocumentSerde
+}
+
+// A specification for an Elastic Graphics accelerator.
+type ElasticGpuSpecification struct {
+
+ // The type of Elastic Graphics accelerator. For more information about the values
+ // to specify for Type, see Elastic Graphics Basics
+ // (https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/elastic-graphics.html#elastic-graphics-basics),
+ // specifically the Elastic Graphics accelerator column, in the Amazon Elastic
+ // Compute Cloud User Guide for Windows Instances.
+ //
+ // This member is required.
+ Type *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes an elastic GPU.
+type ElasticGpuSpecificationResponse struct {
+
+ // The elastic GPU type.
+ Type *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes an elastic inference accelerator.
+type ElasticInferenceAccelerator struct {
+
+ // The type of elastic inference accelerator. The possible values are eia1.medium,
+ // eia1.large, eia1.xlarge, eia2.medium, eia2.large, and eia2.xlarge.
+ //
+ // This member is required.
+ Type *string
+
+ // The number of elastic inference accelerators to attach to the instance. Default:
+ // 1
+ Count *int32
+
+ noSmithyDocumentSerde
+}
+
+// Describes the association between an instance and an elastic inference
+// accelerator.
+type ElasticInferenceAcceleratorAssociation struct {
+
+ // The Amazon Resource Name (ARN) of the elastic inference accelerator.
+ ElasticInferenceAcceleratorArn *string
+
+ // The ID of the association.
+ ElasticInferenceAcceleratorAssociationId *string
+
+ // The state of the elastic inference accelerator.
+ ElasticInferenceAcceleratorAssociationState *string
+
+ // The time at which the elastic inference accelerator is associated with an
+ // instance.
+ ElasticInferenceAcceleratorAssociationTime *time.Time
+
+ noSmithyDocumentSerde
+}
+
+// Contains information about the errors that occurred when enabling fast snapshot
+// restores.
+type EnableFastSnapshotRestoreErrorItem struct {
+
+ // The errors.
+ FastSnapshotRestoreStateErrors []EnableFastSnapshotRestoreStateErrorItem
+
+ // The ID of the snapshot.
+ SnapshotId *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes an error that occurred when enabling fast snapshot restores.
+type EnableFastSnapshotRestoreStateError struct {
+
+ // The error code.
+ Code *string
+
+ // The error message.
+ Message *string
+
+ noSmithyDocumentSerde
+}
+
+// Contains information about an error that occurred when enabling fast snapshot
+// restores.
+type EnableFastSnapshotRestoreStateErrorItem struct {
+
+ // The Availability Zone.
+ AvailabilityZone *string
+
+ // The error.
+ Error *EnableFastSnapshotRestoreStateError
+
+ noSmithyDocumentSerde
+}
+
+// Describes fast snapshot restores that were successfully enabled.
+type EnableFastSnapshotRestoreSuccessItem struct {
+
+ // The Availability Zone.
+ AvailabilityZone *string
+
+ // The time at which fast snapshot restores entered the disabled state.
+ DisabledTime *time.Time
+
+ // The time at which fast snapshot restores entered the disabling state.
+ DisablingTime *time.Time
+
+ // The time at which fast snapshot restores entered the enabled state.
+ EnabledTime *time.Time
+
+ // The time at which fast snapshot restores entered the enabling state.
+ EnablingTime *time.Time
+
+ // The time at which fast snapshot restores entered the optimizing state.
+ OptimizingTime *time.Time
+
+ // The Amazon Web Services owner alias that enabled fast snapshot restores on the
+ // snapshot. This is intended for future use.
+ OwnerAlias *string
+
+ // The ID of the Amazon Web Services account that enabled fast snapshot restores on
+ // the snapshot.
+ OwnerId *string
+
+ // The ID of the snapshot.
+ SnapshotId *string
+
+ // The state of fast snapshot restores.
+ State FastSnapshotRestoreStateCode
+
+ // The reason for the state transition. The possible values are as follows:
+ //
+ // *
+ // Client.UserInitiated - The state successfully transitioned to enabling or
+ // disabling.
+ //
+ // * Client.UserInitiated - Lifecycle state transition - The state
+ // successfully transitioned to optimizing, enabled, or disabled.
+ StateTransitionReason *string
+
+ noSmithyDocumentSerde
+}
+
+// Indicates whether the instance is enabled for Amazon Web Services Nitro
+// Enclaves.
+type EnclaveOptions struct {
+
+ // If this parameter is set to true, the instance is enabled for Amazon Web
+ // Services Nitro Enclaves; otherwise, it is not enabled for Amazon Web Services
+ // Nitro Enclaves.
+ Enabled *bool
+
+ noSmithyDocumentSerde
+}
+
+// Indicates whether the instance is enabled for Amazon Web Services Nitro
+// Enclaves. For more information, see What is Amazon Web Services Nitro Enclaves?
+// (https://docs.aws.amazon.com/enclaves/latest/user/nitro-enclave.html) in the
+// Amazon Web Services Nitro Enclaves User Guide.
+type EnclaveOptionsRequest struct {
+
+ // To enable the instance for Amazon Web Services Nitro Enclaves, set this
+ // parameter to true.
+ Enabled *bool
+
+ noSmithyDocumentSerde
+}
+
+// Describes an EC2 Fleet or Spot Fleet event.
+type EventInformation struct {
+
+ // The description of the event.
+ EventDescription *string
+
+ // The event. The following are the error events:
+ //
+ // * iamFleetRoleInvalid - The EC2
+ // Fleet or Spot Fleet did not have the required permissions either to launch or
+ // terminate an instance.
+ //
+ // * spotFleetRequestConfigurationInvalid - The
+ // configuration is not valid. For more information, see the description of the
+ // event.
+ //
+ // * spotInstanceCountLimitExceeded - You've reached the limit on the
+ // number of Spot Instances that you can launch.
+ //
+ // The following are the
+ // fleetRequestChange events:
+ //
+ // * active - The EC2 Fleet or Spot Fleet request has
+ // been validated and Amazon EC2 is attempting to maintain the target number of
+ // running Spot Instances.
+ //
+ // * cancelled - The EC2 Fleet or Spot Fleet request is
+ // canceled and has no running Spot Instances. The EC2 Fleet or Spot Fleet will be
+ // deleted two days after its instances were terminated.
+ //
+ // * cancelled_running - The
+ // EC2 Fleet or Spot Fleet request is canceled and does not launch additional Spot
+ // Instances. Existing Spot Instances continue to run until they are interrupted or
+ // terminated.
+ //
+ // * cancelled_terminating - The EC2 Fleet or Spot Fleet request is
+ // canceled and its Spot Instances are terminating.
+ //
+ // * expired - The EC2 Fleet or
+ // Spot Fleet request has expired. A subsequent event indicates that the instances
+ // were terminated, if the request was created with
+ // TerminateInstancesWithExpiration set.
+ //
+ // * modify_in_progress - A request to
+ // modify the EC2 Fleet or Spot Fleet request was accepted and is in progress.
+ //
+ // *
+ // modify_succeeded - The EC2 Fleet or Spot Fleet request was modified.
+ //
+ // *
+ // submitted - The EC2 Fleet or Spot Fleet request is being evaluated and Amazon
+ // EC2 is preparing to launch the target number of Spot Instances.
+ //
+ // The following
+ // are the instanceChange events:
+ //
+ // * launched - A request was fulfilled and a new
+ // instance was launched.
+ //
+ // * terminated - An instance was terminated by the
+ // user.
+ //
+ // The following are the Information events:
+ //
+ // *
+ // launchSpecTemporarilyBlacklisted - The configuration is not valid and several
+ // attempts to launch instances have failed. For more information, see the
+ // description of the event.
+ //
+ // * launchSpecUnusable - The price in a launch
+ // specification is not valid because it is below the Spot price or the Spot price
+ // is above the On-Demand price.
+ //
+ // * fleetProgressHalted - The price in every launch
+ // specification is not valid. A launch specification might become valid if the
+ // Spot price changes.
+ EventSubType *string
+
+ // The ID of the instance. This information is available only for instanceChange
+ // events.
+ InstanceId *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes an explanation code for an unreachable path. For more information, see
+// Reachability Analyzer explanation codes
+// (https://docs.aws.amazon.com/vpc/latest/reachability/explanation-codes.html).
+type Explanation struct {
+
+ // The network ACL.
+ Acl *AnalysisComponent
+
+ // The network ACL rule.
+ AclRule *AnalysisAclRule
+
+ // The IPv4 address, in CIDR notation.
+ Address *string
+
+ // The IPv4 addresses, in CIDR notation.
+ Addresses []string
+
+ // The resource to which the component is attached.
+ AttachedTo *AnalysisComponent
+
+ // The Availability Zones.
+ AvailabilityZones []string
+
+ // The CIDR ranges.
+ Cidrs []string
+
+ // The listener for a Classic Load Balancer.
+ ClassicLoadBalancerListener *AnalysisLoadBalancerListener
+
+ // The component.
+ Component *AnalysisComponent
+
+ // The customer gateway.
+ CustomerGateway *AnalysisComponent
+
+ // The destination.
+ Destination *AnalysisComponent
+
+ // The destination VPC.
+ DestinationVpc *AnalysisComponent
+
+ // The direction. The following are possible values:
+ //
+ // * egress
+ //
+ // * ingress
+ Direction *string
+
+ // The load balancer listener.
+ ElasticLoadBalancerListener *AnalysisComponent
+
+ // The explanation code.
+ ExplanationCode *string
+
+ // The route table.
+ IngressRouteTable *AnalysisComponent
+
+ // The internet gateway.
+ InternetGateway *AnalysisComponent
+
+ // The Amazon Resource Name (ARN) of the load balancer.
+ LoadBalancerArn *string
+
+ // The listener port of the load balancer.
+ LoadBalancerListenerPort *int32
+
+ // The target.
+ LoadBalancerTarget *AnalysisLoadBalancerTarget
+
+ // The target group.
+ LoadBalancerTargetGroup *AnalysisComponent
+
+ // The target groups.
+ LoadBalancerTargetGroups []AnalysisComponent
+
+ // The target port.
+ LoadBalancerTargetPort *int32
+
+ // The missing component.
+ MissingComponent *string
+
+ // The NAT gateway.
+ NatGateway *AnalysisComponent
+
+ // The network interface.
+ NetworkInterface *AnalysisComponent
+
+ // The packet field.
+ PacketField *string
+
+ // The port.
+ Port *int32
+
+ // The port ranges.
+ PortRanges []PortRange
+
+ // The prefix list.
+ PrefixList *AnalysisComponent
+
+ // The protocols.
+ Protocols []string
+
+ // The route table.
+ RouteTable *AnalysisComponent
+
+ // The route table route.
+ RouteTableRoute *AnalysisRouteTableRoute
+
+ // The security group.
+ SecurityGroup *AnalysisComponent
+
+ // The security group rule.
+ SecurityGroupRule *AnalysisSecurityGroupRule
+
+ // The security groups.
+ SecurityGroups []AnalysisComponent
+
+ // The source VPC.
+ SourceVpc *AnalysisComponent
+
+ // The state.
+ State *string
+
+ // The subnet.
+ Subnet *AnalysisComponent
+
+ // The route table for the subnet.
+ SubnetRouteTable *AnalysisComponent
+
+ // The component VPC.
+ Vpc *AnalysisComponent
+
+ // The VPC endpoint.
+ VpcEndpoint *AnalysisComponent
+
+ // The VPC peering connection.
+ VpcPeeringConnection *AnalysisComponent
+
+ // The VPN connection.
+ VpnConnection *AnalysisComponent
+
+ // The VPN gateway.
+ VpnGateway *AnalysisComponent
+
+ noSmithyDocumentSerde
+}
+
+// Describes an export image task.
+type ExportImageTask struct {
+
+ // A description of the image being exported.
+ Description *string
+
+ // The ID of the export image task.
+ ExportImageTaskId *string
+
+ // The ID of the image.
+ ImageId *string
+
+ // The percent complete of the export image task.
+ Progress *string
+
+ // Information about the destination Amazon S3 bucket.
+ S3ExportLocation *ExportTaskS3Location
+
+ // The status of the export image task. The possible values are active, completed,
+ // deleting, and deleted.
+ Status *string
+
+ // The status message for the export image task.
+ StatusMessage *string
+
+ // Any tags assigned to the export image task.
+ Tags []Tag
+
+ noSmithyDocumentSerde
+}
+
+// Describes an export instance task.
+type ExportTask struct {
+
+ // A description of the resource being exported.
+ Description *string
+
+ // The ID of the export task.
+ ExportTaskId *string
+
+ // Information about the export task.
+ ExportToS3Task *ExportToS3Task
+
+ // Information about the instance to export.
+ InstanceExportDetails *InstanceExportDetails
+
+ // The state of the export task.
+ State ExportTaskState
+
+ // The status message related to the export task.
+ StatusMessage *string
+
+ // The tags for the export task.
+ Tags []Tag
+
+ noSmithyDocumentSerde
+}
+
+// Describes the destination for an export image task.
+type ExportTaskS3Location struct {
+
+ // The destination Amazon S3 bucket.
+ S3Bucket *string
+
+ // The prefix (logical hierarchy) in the bucket.
+ S3Prefix *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes the destination for an export image task.
+type ExportTaskS3LocationRequest struct {
+
+ // The destination Amazon S3 bucket.
+ //
+ // This member is required.
+ S3Bucket *string
+
+ // The prefix (logical hierarchy) in the bucket.
+ S3Prefix *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes the format and location for the export task.
+type ExportToS3Task struct {
+
+ // The container format used to combine disk images with metadata (such as OVF). If
+ // absent, only the disk image is exported.
+ ContainerFormat ContainerFormat
+
+ // The format for the exported image.
+ DiskImageFormat DiskImageFormat
+
+ // The Amazon S3 bucket for the destination image. The destination bucket must
+ // exist and grant WRITE and READ_ACP permissions to the Amazon Web Services
+ // account vm-import-export@amazon.com.
+ S3Bucket *string
+
+ // The encryption key for your S3 bucket.
+ S3Key *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes an export instance task.
+type ExportToS3TaskSpecification struct {
+
+ // The container format used to combine disk images with metadata (such as OVF). If
+ // absent, only the disk image is exported.
+ ContainerFormat ContainerFormat
+
+ // The format for the exported image.
+ DiskImageFormat DiskImageFormat
+
+ // The Amazon S3 bucket for the destination image. The destination bucket must
+ // exist and grant WRITE and READ_ACP permissions to the Amazon Web Services
+ // account vm-import-export@amazon.com.
+ S3Bucket *string
+
+ // The image is written to a single object in the Amazon S3 bucket at the S3 key
+ // s3prefix + exportTaskId + '.' + diskImageFormat.
+ S3Prefix *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes a Reserved Instance whose queued purchase was not deleted.
+type FailedQueuedPurchaseDeletion struct {
+
+ // The error.
+ Error *DeleteQueuedReservedInstancesError
+
+ // The ID of the Reserved Instance.
+ ReservedInstancesId *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes the IAM SAML identity providers used for federated authentication.
+type FederatedAuthentication struct {
+
+ // The Amazon Resource Name (ARN) of the IAM SAML identity provider.
+ SamlProviderArn *string
+
+ // The Amazon Resource Name (ARN) of the IAM SAML identity provider for the
+ // self-service portal.
+ SelfServiceSamlProviderArn *string
+
+ noSmithyDocumentSerde
+}
+
+// The IAM SAML identity provider used for federated authentication.
+type FederatedAuthenticationRequest struct {
+
+ // The Amazon Resource Name (ARN) of the IAM SAML identity provider.
+ SAMLProviderArn *string
+
+ // The Amazon Resource Name (ARN) of the IAM SAML identity provider for the
+ // self-service portal.
+ SelfServiceSAMLProviderArn *string
+
+ noSmithyDocumentSerde
+}
+
+// A filter name and value pair that is used to return a more specific list of
+// results from a describe operation. Filters can be used to match a set of
+// resources by specific criteria, such as tags, attributes, or IDs.
+type Filter struct {
+
+ // The name of the filter. Filter names are case-sensitive.
+ Name *string
+
+ // The filter values. Filter values are case-sensitive.
+ Values []string
+
+ noSmithyDocumentSerde
+}
+
+// Describes an EC2 Fleet.
+type FleetData struct {
+
+ // The progress of the EC2 Fleet. If there is an error, the status is error. After
+ // all requests are placed, the status is pending_fulfillment. If the size of the
+ // EC2 Fleet is equal to or greater than its target capacity, the status is
+ // fulfilled. If the size of the EC2 Fleet is decreased, the status is
+ // pending_termination while instances are terminating.
+ ActivityStatus FleetActivityStatus
+
+ // Unique, case-sensitive identifier that you provide to ensure the idempotency of
+ // the request. For more information, see Ensuring Idempotency
+ // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html).
+ // Constraints: Maximum 64 ASCII characters
+ ClientToken *string
+
+ // Reserved.
+ Context *string
+
+ // The creation date and time of the EC2 Fleet.
+ CreateTime *time.Time
+
+ // Information about the instances that could not be launched by the fleet. Valid
+ // only when Type is set to instant.
+ Errors []DescribeFleetError
+
+ // Indicates whether running instances should be terminated if the target capacity
+ // of the EC2 Fleet is decreased below the current size of the EC2 Fleet.
+ ExcessCapacityTerminationPolicy FleetExcessCapacityTerminationPolicy
+
+ // The ID of the EC2 Fleet.
+ FleetId *string
+
+ // The state of the EC2 Fleet.
+ FleetState FleetStateCode
+
+ // The number of units fulfilled by this request compared to the set target
+ // capacity.
+ FulfilledCapacity *float64
+
+ // The number of units fulfilled by this request compared to the set target
+ // On-Demand capacity.
+ FulfilledOnDemandCapacity *float64
+
+ // Information about the instances that were launched by the fleet. Valid only when
+ // Type is set to instant.
+ Instances []DescribeFleetsInstances
+
+ // The launch template and overrides.
+ LaunchTemplateConfigs []FleetLaunchTemplateConfig
+
+ // The allocation strategy of On-Demand Instances in an EC2 Fleet.
+ OnDemandOptions *OnDemandOptions
+
+ // Indicates whether EC2 Fleet should replace unhealthy Spot Instances. Supported
+ // only for fleets of type maintain. For more information, see EC2 Fleet health
+ // checks
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/manage-ec2-fleet.html#ec2-fleet-health-checks)
+ // in the Amazon EC2 User Guide.
+ ReplaceUnhealthyInstances *bool
+
+ // The configuration of Spot Instances in an EC2 Fleet.
+ SpotOptions *SpotOptions
+
+ // The tags for an EC2 Fleet resource.
+ Tags []Tag
+
+ // The number of units to request. You can choose to set the target capacity in
+ // terms of instances or a performance characteristic that is important to your
+ // application workload, such as vCPUs, memory, or I/O. If the request type is
+ // maintain, you can specify a target capacity of 0 and add capacity later.
+ TargetCapacitySpecification *TargetCapacitySpecification
+
+ // Indicates whether running instances should be terminated when the EC2 Fleet
+ // expires.
+ TerminateInstancesWithExpiration *bool
+
+ // The type of request. Indicates whether the EC2 Fleet only requests the target
+ // capacity, or also attempts to maintain it. If you request a certain target
+ // capacity, EC2 Fleet only places the required requests; it does not attempt to
+ // replenish instances if capacity is diminished, and it does not submit requests
+ // in alternative capacity pools if capacity is unavailable. To maintain a certain
+ // target capacity, EC2 Fleet places the required requests to meet this target
+ // capacity. It also automatically replenishes any interrupted Spot Instances.
+ // Default: maintain.
+ Type FleetType
+
+ // The start date and time of the request, in UTC format (for example,
+ // YYYY-MM-DDTHH:MM:SSZ). The default is to start fulfilling the request
+ // immediately.
+ ValidFrom *time.Time
+
+ // The end date and time of the request, in UTC format (for example,
+ // YYYY-MM-DDTHH:MM:SSZ). At this point, no new instance requests are placed or
+ // able to fulfill the request. The default end date is 7 days from the current
+ // date.
+ ValidUntil *time.Time
+
+ noSmithyDocumentSerde
+}
+
+// Describes a launch template and overrides.
+type FleetLaunchTemplateConfig struct {
+
+ // The launch template.
+ LaunchTemplateSpecification *FleetLaunchTemplateSpecification
+
+ // Any parameters that you specify override the same parameters in the launch
+ // template.
+ Overrides []FleetLaunchTemplateOverrides
+
+ noSmithyDocumentSerde
+}
+
+// Describes a launch template and overrides.
+type FleetLaunchTemplateConfigRequest struct {
+
+ // The launch template to use. You must specify either the launch template ID or
+ // launch template name in the request.
+ LaunchTemplateSpecification *FleetLaunchTemplateSpecificationRequest
+
+ // Any parameters that you specify override the same parameters in the launch
+ // template. For fleets of type request and maintain, a maximum of 300 items is
+ // allowed across all launch templates.
+ Overrides []FleetLaunchTemplateOverridesRequest
+
+ noSmithyDocumentSerde
+}
+
+// Describes overrides for a launch template.
+type FleetLaunchTemplateOverrides struct {
+
+ // The Availability Zone in which to launch the instances.
+ AvailabilityZone *string
+
+ // The instance type.
+ InstanceType InstanceType
+
+ // The maximum price per unit hour that you are willing to pay for a Spot Instance.
+ MaxPrice *string
+
+ // The location where the instance launched, if applicable.
+ Placement *PlacementResponse
+
+ // The priority for the launch template override. The highest priority is launched
+ // first. If the On-Demand AllocationStrategy is set to prioritized, EC2 Fleet uses
+ // priority to determine which launch template override to use first in fulfilling
+ // On-Demand capacity. If the Spot AllocationStrategy is set to
+ // capacity-optimized-prioritized, EC2 Fleet uses priority on a best-effort basis
+ // to determine which launch template override to use in fulfilling Spot capacity,
+ // but optimizes for capacity first. Valid values are whole numbers starting at 0.
+ // The lower the number, the higher the priority. If no number is set, the override
+ // has the lowest priority. You can set the same priority for different launch
+ // template overrides.
+ Priority *float64
+
+ // The ID of the subnet in which to launch the instances.
+ SubnetId *string
+
+ // The number of units provided by the specified instance type.
+ WeightedCapacity *float64
+
+ noSmithyDocumentSerde
+}
+
+// Describes overrides for a launch template.
+type FleetLaunchTemplateOverridesRequest struct {
+
+ // The Availability Zone in which to launch the instances.
+ AvailabilityZone *string
+
+ // The instance type.
+ InstanceType InstanceType
+
+ // The maximum price per unit hour that you are willing to pay for a Spot Instance.
+ MaxPrice *string
+
+ // The location where the instance launched, if applicable.
+ Placement *Placement
+
+ // The priority for the launch template override. The highest priority is launched
+ // first. If the On-Demand AllocationStrategy is set to prioritized, EC2 Fleet uses
+ // priority to determine which launch template override to use first in fulfilling
+ // On-Demand capacity. If the Spot AllocationStrategy is set to
+ // capacity-optimized-prioritized, EC2 Fleet uses priority on a best-effort basis
+ // to determine which launch template override to use in fulfilling Spot capacity,
+ // but optimizes for capacity first. Valid values are whole numbers starting at 0.
+ // The lower the number, the higher the priority. If no number is set, the launch
+ // template override has the lowest priority. You can set the same priority for
+ // different launch template overrides.
+ Priority *float64
+
+ // The IDs of the subnets in which to launch the instances. Separate multiple
+ // subnet IDs using commas (for example, subnet-1234abcdeexample1,
+ // subnet-0987cdef6example2). A request of type instant can have only one subnet
+ // ID.
+ SubnetId *string
+
+ // The number of units provided by the specified instance type.
+ WeightedCapacity *float64
+
+ noSmithyDocumentSerde
+}
+
+// Describes the Amazon EC2 launch template and the launch template version that
+// can be used by a Spot Fleet request to configure Amazon EC2 instances. For
+// information about launch templates, see Launching an instance from a launch
+// template
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html)
+// in the Amazon EC2 User Guide for Linux Instances.
+type FleetLaunchTemplateSpecification struct {
+
+ // The ID of the launch template. If you specify the template ID, you can't specify
+ // the template name.
+ LaunchTemplateId *string
+
+ // The name of the launch template. If you specify the template name, you can't
+ // specify the template ID.
+ LaunchTemplateName *string
+
+ // The launch template version number, $Latest, or $Default. You must specify a
+ // value, otherwise the request fails. If the value is $Latest, Amazon EC2 uses the
+ // latest version of the launch template. If the value is $Default, Amazon EC2 uses
+ // the default version of the launch template.
+ Version *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes the Amazon EC2 launch template and the launch template version that
+// can be used by an EC2 Fleet to configure Amazon EC2 instances. For information
+// about launch templates, see Launching an instance from a launch template
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html)
+// in the Amazon EC2 User Guide.
+type FleetLaunchTemplateSpecificationRequest struct {
+
+ // The ID of the launch template. If you specify the template ID, you can't specify
+ // the template name.
+ LaunchTemplateId *string
+
+ // The name of the launch template. If you specify the template name, you can't
+ // specify the template ID.
+ LaunchTemplateName *string
+
+ // The launch template version number, $Latest, or $Default. You must specify a
+ // value, otherwise the request fails. If the value is $Latest, Amazon EC2 uses the
+ // latest version of the launch template. If the value is $Default, Amazon EC2 uses
+ // the default version of the launch template.
+ Version *string
+
+ noSmithyDocumentSerde
+}
+
+// The strategy to use when Amazon EC2 emits a signal that your Spot Instance is at
+// an elevated risk of being interrupted.
+type FleetSpotCapacityRebalance struct {
+
+ // To allow EC2 Fleet to launch a replacement Spot Instance when an instance
+ // rebalance notification is emitted for an existing Spot Instance in the fleet,
+ // specify launch. Only available for fleets of type maintain. When a replacement
+ // instance is launched, the instance marked for rebalance is not automatically
+ // terminated. You can terminate it, or you can leave it running. You are charged
+ // for both instances while they are running.
+ ReplacementStrategy FleetReplacementStrategy
+
+ noSmithyDocumentSerde
+}
+
+// The Spot Instance replacement strategy to use when Amazon EC2 emits a signal
+// that your Spot Instance is at an elevated risk of being interrupted. For more
+// information, see Capacity rebalancing
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet-configuration-strategies.html#ec2-fleet-capacity-rebalance)
+// in the Amazon EC2 User Guide.
+type FleetSpotCapacityRebalanceRequest struct {
+
+ // The replacement strategy to use. Only available for fleets of type maintain. To
+ // allow EC2 Fleet to launch a replacement Spot Instance when an instance rebalance
+ // notification is emitted for an existing Spot Instance in the fleet, specify
+ // launch. You must specify a value, otherwise you get an error. When a replacement
+ // instance is launched, the instance marked for rebalance is not automatically
+ // terminated. You can terminate it, or you can leave it running. You are charged
+ // for all instances while they are running.
+ ReplacementStrategy FleetReplacementStrategy
+
+ noSmithyDocumentSerde
+}
+
+// The strategies for managing your Spot Instances that are at an elevated risk of
+// being interrupted.
+type FleetSpotMaintenanceStrategies struct {
+
+ // The strategy to use when Amazon EC2 emits a signal that your Spot Instance is at
+ // an elevated risk of being interrupted.
+ CapacityRebalance *FleetSpotCapacityRebalance
+
+ noSmithyDocumentSerde
+}
+
+// The strategies for managing your Spot Instances that are at an elevated risk of
+// being interrupted.
+type FleetSpotMaintenanceStrategiesRequest struct {
+
+ // The strategy to use when Amazon EC2 emits a signal that your Spot Instance is at
+ // an elevated risk of being interrupted.
+ CapacityRebalance *FleetSpotCapacityRebalanceRequest
+
+ noSmithyDocumentSerde
+}
+
+// Describes a flow log.
+type FlowLog struct {
+
+ // The date and time the flow log was created.
+ CreationTime *time.Time
+
+ // Information about the error that occurred. Rate limited indicates that
+ // CloudWatch Logs throttling has been applied for one or more network interfaces,
+ // or that you've reached the limit on the number of log groups that you can
+ // create. Access error indicates that the IAM role associated with the flow log
+ // does not have sufficient permissions to publish to CloudWatch Logs. Unknown
+ // error indicates an internal error.
+ DeliverLogsErrorMessage *string
+
+ // The ARN of the IAM role that posts logs to CloudWatch Logs.
+ DeliverLogsPermissionArn *string
+
+ // The status of the logs delivery (SUCCESS | FAILED).
+ DeliverLogsStatus *string
+
+ // The flow log ID.
+ FlowLogId *string
+
+ // The status of the flow log (ACTIVE).
+ FlowLogStatus *string
+
+ // Specifies the destination to which the flow log data is published. Flow log data
+ // can be published to an CloudWatch Logs log group or an Amazon S3 bucket. If the
+ // flow log publishes to CloudWatch Logs, this element indicates the Amazon
+ // Resource Name (ARN) of the CloudWatch Logs log group to which the data is
+ // published. If the flow log publishes to Amazon S3, this element indicates the
+ // ARN of the Amazon S3 bucket to which the data is published.
+ LogDestination *string
+
+ // Specifies the type of destination to which the flow log data is published. Flow
+ // log data can be published to CloudWatch Logs or Amazon S3.
+ LogDestinationType LogDestinationType
+
+ // The format of the flow log record.
+ LogFormat *string
+
+ // The name of the flow log group.
+ LogGroupName *string
+
+ // The maximum interval of time, in seconds, during which a flow of packets is
+ // captured and aggregated into a flow log record. When a network interface is
+ // attached to a Nitro-based instance
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#ec2-nitro-instances),
+ // the aggregation interval is always 60 seconds (1 minute) or less, regardless of
+ // the specified value. Valid Values: 60 | 600
+ MaxAggregationInterval *int32
+
+ // The ID of the resource on which the flow log was created.
+ ResourceId *string
+
+ // The tags for the flow log.
+ Tags []Tag
+
+ // The type of traffic captured for the flow log.
+ TrafficType TrafficType
+
+ noSmithyDocumentSerde
+}
+
+// Describes the FPGA accelerator for the instance type.
+type FpgaDeviceInfo struct {
+
+ // The count of FPGA accelerators for the instance type.
+ Count *int32
+
+ // The manufacturer of the FPGA accelerator.
+ Manufacturer *string
+
+ // Describes the memory for the FPGA accelerator for the instance type.
+ MemoryInfo *FpgaDeviceMemoryInfo
+
+ // The name of the FPGA accelerator.
+ Name *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes the memory for the FPGA accelerator for the instance type.
+type FpgaDeviceMemoryInfo struct {
+
+ // The size of the memory available to the FPGA accelerator, in MiB.
+ SizeInMiB *int32
+
+ noSmithyDocumentSerde
+}
+
+// Describes an Amazon FPGA image (AFI).
+type FpgaImage struct {
+
+ // The date and time the AFI was created.
+ CreateTime *time.Time
+
+ // Indicates whether data retention support is enabled for the AFI.
+ DataRetentionSupport *bool
+
+ // The description of the AFI.
+ Description *string
+
+ // The global FPGA image identifier (AGFI ID).
+ FpgaImageGlobalId *string
+
+ // The FPGA image identifier (AFI ID).
+ FpgaImageId *string
+
+ // The name of the AFI.
+ Name *string
+
+ // The alias of the AFI owner. Possible values include self, amazon, and
+ // aws-marketplace.
+ OwnerAlias *string
+
+ // The AWS account ID of the AFI owner.
+ OwnerId *string
+
+ // Information about the PCI bus.
+ PciId *PciId
+
+ // The product codes for the AFI.
+ ProductCodes []ProductCode
+
+ // Indicates whether the AFI is public.
+ Public *bool
+
+ // The version of the AWS Shell that was used to create the bitstream.
+ ShellVersion *string
+
+ // Information about the state of the AFI.
+ State *FpgaImageState
+
+ // Any tags assigned to the AFI.
+ Tags []Tag
+
+ // The time of the most recent update to the AFI.
+ UpdateTime *time.Time
+
+ noSmithyDocumentSerde
+}
+
+// Describes an Amazon FPGA image (AFI) attribute.
+type FpgaImageAttribute struct {
+
+ // The description of the AFI.
+ Description *string
+
+ // The ID of the AFI.
+ FpgaImageId *string
+
+ // The load permissions.
+ LoadPermissions []LoadPermission
+
+ // The name of the AFI.
+ Name *string
+
+ // The product codes.
+ ProductCodes []ProductCode
+
+ noSmithyDocumentSerde
+}
+
+// Describes the state of the bitstream generation process for an Amazon FPGA image
+// (AFI).
+type FpgaImageState struct {
+
+ // The state. The following are the possible values:
+ //
+ // * pending - AFI bitstream
+ // generation is in progress.
+ //
+ // * available - The AFI is available for use.
+ //
+ // *
+ // failed - AFI bitstream generation failed.
+ //
+ // * unavailable - The AFI is no longer
+ // available for use.
+ Code FpgaImageStateCode
+
+ // If the state is failed, this is the error message.
+ Message *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes the FPGAs for the instance type.
+type FpgaInfo struct {
+
+ // Describes the FPGAs for the instance type.
+ Fpgas []FpgaDeviceInfo
+
+ // The total memory of all FPGA accelerators for the instance type.
+ TotalFpgaMemoryInMiB *int32
+
+ noSmithyDocumentSerde
+}
+
+// Describes the GPU accelerators for the instance type.
+type GpuDeviceInfo struct {
+
+ // The number of GPUs for the instance type.
+ Count *int32
+
+ // The manufacturer of the GPU accelerator.
+ Manufacturer *string
+
+ // Describes the memory available to the GPU accelerator.
+ MemoryInfo *GpuDeviceMemoryInfo
+
+ // The name of the GPU accelerator.
+ Name *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes the memory available to the GPU accelerator.
+type GpuDeviceMemoryInfo struct {
+
+ // The size of the memory available to the GPU accelerator, in MiB.
+ SizeInMiB *int32
+
+ noSmithyDocumentSerde
+}
+
+// Describes the GPU accelerators for the instance type.
+type GpuInfo struct {
+
+ // Describes the GPU accelerators for the instance type.
+ Gpus []GpuDeviceInfo
+
+ // The total size of the memory for the GPU accelerators for the instance type, in
+ // MiB.
+ TotalGpuMemoryInMiB *int32
+
+ noSmithyDocumentSerde
+}
+
+// Describes a security group.
+type GroupIdentifier struct {
+
+ // The ID of the security group.
+ GroupId *string
+
+ // The name of the security group.
+ GroupName *string
+
+ noSmithyDocumentSerde
+}
+
+// Indicates whether your instance is configured for hibernation. This parameter is
+// valid only if the instance meets the hibernation prerequisites
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html#hibernating-prerequisites).
+// For more information, see Hibernate your instance
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html) in the
+// Amazon EC2 User Guide.
+type HibernationOptions struct {
+
+ // If this parameter is set to true, your instance is enabled for hibernation;
+ // otherwise, it is not enabled for hibernation.
+ Configured *bool
+
+ noSmithyDocumentSerde
+}
+
+// Indicates whether your instance is configured for hibernation. This parameter is
+// valid only if the instance meets the hibernation prerequisites
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html#hibernating-prerequisites).
+// For more information, see Hibernate your instance
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html) in the
+// Amazon EC2 User Guide.
+type HibernationOptionsRequest struct {
+
+ // If you set this parameter to true, your instance is enabled for hibernation.
+ // Default: false
+ Configured *bool
+
+ noSmithyDocumentSerde
+}
+
+// Describes an event in the history of the Spot Fleet request.
+type HistoryRecord struct {
+
+ // Information about the event.
+ EventInformation *EventInformation
+
+ // The event type.
+ //
+ // * error - An error with the Spot Fleet request.
+ //
+ // *
+ // fleetRequestChange - A change in the status or configuration of the Spot Fleet
+ // request.
+ //
+ // * instanceChange - An instance was launched or terminated.
+ //
+ // *
+ // Information - An informational event.
+ EventType EventType
+
+ // The date and time of the event, in UTC format (for example,
+ // YYYY-MM-DDTHH:MM:SSZ).
+ Timestamp *time.Time
+
+ noSmithyDocumentSerde
+}
+
+// Describes an event in the history of an EC2 Fleet.
+type HistoryRecordEntry struct {
+
+ // Information about the event.
+ EventInformation *EventInformation
+
+ // The event type.
+ EventType FleetEventType
+
+ // The date and time of the event, in UTC format (for example,
+ // YYYY-MM-DDTHH:MM:SSZ).
+ Timestamp *time.Time
+
+ noSmithyDocumentSerde
+}
+
+// Describes the properties of the Dedicated Host.
+type Host struct {
+
+ // The time that the Dedicated Host was allocated.
+ AllocationTime *time.Time
+
+ // Indicates whether the Dedicated Host supports multiple instance types of the
+ // same instance family. If the value is on, the Dedicated Host supports multiple
+ // instance types in the instance family. If the value is off, the Dedicated Host
+ // supports a single instance type only.
+ AllowsMultipleInstanceTypes AllowsMultipleInstanceTypes
+
+ // Whether auto-placement is on or off.
+ AutoPlacement AutoPlacement
+
+ // The Availability Zone of the Dedicated Host.
+ AvailabilityZone *string
+
+ // The ID of the Availability Zone in which the Dedicated Host is allocated.
+ AvailabilityZoneId *string
+
+ // Information about the instances running on the Dedicated Host.
+ AvailableCapacity *AvailableCapacity
+
+ // Unique, case-sensitive identifier that you provide to ensure the idempotency of
+ // the request. For more information, see Ensuring Idempotency
+ // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html).
+ ClientToken *string
+
+ // The ID of the Dedicated Host.
+ HostId *string
+
+ // The hardware specifications of the Dedicated Host.
+ HostProperties *HostProperties
+
+ // Indicates whether host recovery is enabled or disabled for the Dedicated Host.
+ HostRecovery HostRecovery
+
+ // The reservation ID of the Dedicated Host. This returns a null response if the
+ // Dedicated Host doesn't have an associated reservation.
+ HostReservationId *string
+
+ // The IDs and instance type that are currently running on the Dedicated Host.
+ Instances []HostInstance
+
+ // Indicates whether the Dedicated Host is in a host resource group. If
+ // memberOfServiceLinkedResourceGroup is true, the host is in a host resource
+ // group; otherwise, it is not.
+ MemberOfServiceLinkedResourceGroup *bool
+
+ // The ID of the Amazon Web Services account that owns the Dedicated Host.
+ OwnerId *string
+
+ // The time that the Dedicated Host was released.
+ ReleaseTime *time.Time
+
+ // The Dedicated Host's state.
+ State AllocationState
+
+ // Any tags assigned to the Dedicated Host.
+ Tags []Tag
+
+ noSmithyDocumentSerde
+}
+
+// Describes an instance running on a Dedicated Host.
+type HostInstance struct {
+
+ // The ID of instance that is running on the Dedicated Host.
+ InstanceId *string
+
+ // The instance type (for example, m3.medium) of the running instance.
+ InstanceType *string
+
+ // The ID of the Amazon Web Services account that owns the instance.
+ OwnerId *string
+
+ noSmithyDocumentSerde
+}
+
+// Details about the Dedicated Host Reservation offering.
+type HostOffering struct {
+
+ // The currency of the offering.
+ CurrencyCode CurrencyCodeValues
+
+ // The duration of the offering (in seconds).
+ Duration *int32
+
+ // The hourly price of the offering.
+ HourlyPrice *string
+
+ // The instance family of the offering.
+ InstanceFamily *string
+
+ // The ID of the offering.
+ OfferingId *string
+
+ // The available payment option.
+ PaymentOption PaymentOption
+
+ // The upfront price of the offering. Does not apply to No Upfront offerings.
+ UpfrontPrice *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes the properties of a Dedicated Host.
+type HostProperties struct {
+
+ // The number of cores on the Dedicated Host.
+ Cores *int32
+
+ // The instance family supported by the Dedicated Host. For example, m5.
+ InstanceFamily *string
+
+ // The instance type supported by the Dedicated Host. For example, m5.large. If the
+ // host supports multiple instance types, no instanceType is returned.
+ InstanceType *string
+
+ // The number of sockets on the Dedicated Host.
+ Sockets *int32
+
+ // The total number of vCPUs on the Dedicated Host.
+ TotalVCpus *int32
+
+ noSmithyDocumentSerde
+}
+
+// Details about the Dedicated Host Reservation and associated Dedicated Hosts.
+type HostReservation struct {
+
+ // The number of Dedicated Hosts the reservation is associated with.
+ Count *int32
+
+ // The currency in which the upfrontPrice and hourlyPrice amounts are specified. At
+ // this time, the only supported currency is USD.
+ CurrencyCode CurrencyCodeValues
+
+ // The length of the reservation's term, specified in seconds. Can be 31536000 (1
+ // year) | 94608000 (3 years).
+ Duration *int32
+
+ // The date and time that the reservation ends.
+ End *time.Time
+
+ // The IDs of the Dedicated Hosts associated with the reservation.
+ HostIdSet []string
+
+ // The ID of the reservation that specifies the associated Dedicated Hosts.
+ HostReservationId *string
+
+ // The hourly price of the reservation.
+ HourlyPrice *string
+
+ // The instance family of the Dedicated Host Reservation. The instance family on
+ // the Dedicated Host must be the same in order for it to benefit from the
+ // reservation.
+ InstanceFamily *string
+
+ // The ID of the reservation. This remains the same regardless of which Dedicated
+ // Hosts are associated with it.
+ OfferingId *string
+
+ // The payment option selected for this reservation.
+ PaymentOption PaymentOption
+
+ // The date and time that the reservation started.
+ Start *time.Time
+
+ // The state of the reservation.
+ State ReservationState
+
+ // Any tags assigned to the Dedicated Host Reservation.
+ Tags []Tag
+
+ // The upfront price of the reservation.
+ UpfrontPrice *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes an IAM instance profile.
+type IamInstanceProfile struct {
+
+ // The Amazon Resource Name (ARN) of the instance profile.
+ Arn *string
+
+ // The ID of the instance profile.
+ Id *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes an association between an IAM instance profile and an instance.
+type IamInstanceProfileAssociation struct {
+
+ // The ID of the association.
+ AssociationId *string
+
+ // The IAM instance profile.
+ IamInstanceProfile *IamInstanceProfile
+
+ // The ID of the instance.
+ InstanceId *string
+
+ // The state of the association.
+ State IamInstanceProfileAssociationState
+
+ // The time the IAM instance profile was associated with the instance.
+ Timestamp *time.Time
+
+ noSmithyDocumentSerde
+}
+
+// Describes an IAM instance profile.
+type IamInstanceProfileSpecification struct {
+
+ // The Amazon Resource Name (ARN) of the instance profile.
+ Arn *string
+
+ // The name of the instance profile.
+ Name *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes the ICMP type and code.
+type IcmpTypeCode struct {
+
+ // The ICMP code. A value of -1 means all codes for the specified ICMP type.
+ Code *int32
+
+ // The ICMP type. A value of -1 means all types.
+ Type *int32
+
+ noSmithyDocumentSerde
+}
+
+// Describes the ID format for a resource.
+type IdFormat struct {
+
+ // The date in UTC at which you are permanently switched over to using longer IDs.
+ // If a deadline is not yet available for this resource type, this field is not
+ // returned.
+ Deadline *time.Time
+
+ // The type of resource.
+ Resource *string
+
+ // Indicates whether longer IDs (17-character IDs) are enabled for the resource.
+ UseLongIds *bool
+
+ noSmithyDocumentSerde
+}
+
+// The internet key exchange (IKE) version permitted for the VPN tunnel.
+type IKEVersionsListValue struct {
+
+ // The IKE version.
+ Value *string
+
+ noSmithyDocumentSerde
+}
+
+// The IKE version that is permitted for the VPN tunnel.
+type IKEVersionsRequestListValue struct {
+
+ // The IKE version.
+ Value *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes an image.
+type Image struct {
+
+ // The architecture of the image.
+ Architecture ArchitectureValues
+
+ // Any block device mapping entries.
+ BlockDeviceMappings []BlockDeviceMapping
+
+ // The boot mode of the image. For more information, see Boot modes
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-boot.html) in the
+ // Amazon Elastic Compute Cloud User Guide.
+ BootMode BootModeValues
+
+ // The date and time the image was created.
+ CreationDate *string
+
+ // The date and time to deprecate the AMI, in UTC, in the following format:
+ // YYYY-MM-DDTHH:MM:SSZ. If you specified a value for seconds, Amazon EC2 rounds
+ // the seconds to the nearest minute.
+ DeprecationTime *string
+
+ // The description of the AMI that was provided during image creation.
+ Description *string
+
+ // Specifies whether enhanced networking with ENA is enabled.
+ EnaSupport *bool
+
+ // The hypervisor type of the image.
+ Hypervisor HypervisorType
+
+ // The ID of the AMI.
+ ImageId *string
+
+ // The location of the AMI.
+ ImageLocation *string
+
+ // The Amazon Web Services account alias (for example, amazon, self) or the Amazon
+ // Web Services account ID of the AMI owner.
+ ImageOwnerAlias *string
+
+ // The type of image.
+ ImageType ImageTypeValues
+
+ // The kernel associated with the image, if any. Only applicable for machine
+ // images.
+ KernelId *string
+
+ // The name of the AMI that was provided during image creation.
+ Name *string
+
+ // The ID of the Amazon Web Services account that owns the image.
+ OwnerId *string
+
+ // This value is set to windows for Windows AMIs; otherwise, it is blank.
+ Platform PlatformValues
+
+ // The platform details associated with the billing code of the AMI. For more
+ // information, see Understanding AMI billing
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-billing-info.html) in
+ // the Amazon Elastic Compute Cloud User Guide.
+ PlatformDetails *string
+
+ // Any product codes associated with the AMI.
+ ProductCodes []ProductCode
+
+ // Indicates whether the image has public launch permissions. The value is true if
+ // this image has public launch permissions or false if it has only implicit and
+ // explicit launch permissions.
+ Public *bool
+
+ // The RAM disk associated with the image, if any. Only applicable for machine
+ // images.
+ RamdiskId *string
+
+ // The device name of the root device volume (for example, /dev/sda1).
+ RootDeviceName *string
+
+ // The type of root device used by the AMI. The AMI can use an Amazon EBS volume or
+ // an instance store volume.
+ RootDeviceType DeviceType
+
+ // Specifies whether enhanced networking with the Intel 82599 Virtual Function
+ // interface is enabled.
+ SriovNetSupport *string
+
+ // The current state of the AMI. If the state is available, the image is
+ // successfully registered and can be used to launch an instance.
+ State ImageState
+
+ // The reason for the state change.
+ StateReason *StateReason
+
+ // Any tags assigned to the image.
+ Tags []Tag
+
+ // The operation of the Amazon EC2 instance and the billing code that is associated
+ // with the AMI. usageOperation corresponds to the lineitem/Operation
+ // (https://docs.aws.amazon.com/cur/latest/userguide/Lineitem-columns.html#Lineitem-details-O-Operation)
+ // column on your Amazon Web Services Cost and Usage Report and in the Amazon Web
+ // Services Price List API
+ // (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/price-changes.html).
+ // You can view these fields on the Instances or AMIs pages in the Amazon EC2
+ // console, or in the responses that are returned by the DescribeImages
+ // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeImages.html)
+ // command in the Amazon EC2 API, or the describe-images
+ // (https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-images.html)
+ // command in the CLI.
+ UsageOperation *string
+
+ // The type of virtualization of the AMI.
+ VirtualizationType VirtualizationType
+
+ noSmithyDocumentSerde
+}
+
+// Describes the disk container object for an import image task.
+type ImageDiskContainer struct {
+
+ // The description of the disk image.
+ Description *string
+
+ // The block device mapping for the disk.
+ DeviceName *string
+
+ // The format of the disk image being imported. Valid values: OVA | VHD | VHDX |
+ // VMDK | RAW
+ Format *string
+
+ // The ID of the EBS snapshot to be used for importing the snapshot.
+ SnapshotId *string
+
+ // The URL to the Amazon S3-based disk image being imported. The URL can either be
+ // a https URL (https://..) or an Amazon S3 URL (s3://..)
+ Url *string
+
+ // The S3 bucket for the disk image.
+ UserBucket *UserBucket
+
+ noSmithyDocumentSerde
+}
+
+// The request information of license configurations.
+type ImportImageLicenseConfigurationRequest struct {
+
+ // The ARN of a license configuration.
+ LicenseConfigurationArn *string
+
+ noSmithyDocumentSerde
+}
+
+// The response information for license configurations.
+type ImportImageLicenseConfigurationResponse struct {
+
+ // The ARN of a license configuration.
+ LicenseConfigurationArn *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes an import image task.
+type ImportImageTask struct {
+
+ // The architecture of the virtual machine. Valid values: i386 | x86_64 | arm64
+ Architecture *string
+
+ // The boot mode of the virtual machine.
+ BootMode BootModeValues
+
+ // A description of the import task.
+ Description *string
+
+ // Indicates whether the image is encrypted.
+ Encrypted *bool
+
+ // The target hypervisor for the import task. Valid values: xen
+ Hypervisor *string
+
+ // The ID of the Amazon Machine Image (AMI) of the imported virtual machine.
+ ImageId *string
+
+ // The ID of the import image task.
+ ImportTaskId *string
+
+ // The identifier for the KMS key that was used to create the encrypted image.
+ KmsKeyId *string
+
+ // The ARNs of the license configurations that are associated with the import image
+ // task.
+ LicenseSpecifications []ImportImageLicenseConfigurationResponse
+
+ // The license type of the virtual machine.
+ LicenseType *string
+
+ // The description string for the import image task.
+ Platform *string
+
+ // The percentage of progress of the import image task.
+ Progress *string
+
+ // Information about the snapshots.
+ SnapshotDetails []SnapshotDetail
+
+ // A brief status for the import image task.
+ Status *string
+
+ // A descriptive status message for the import image task.
+ StatusMessage *string
+
+ // The tags for the import image task.
+ Tags []Tag
+
+ // The usage operation value.
+ UsageOperation *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes the launch specification for VM import.
+type ImportInstanceLaunchSpecification struct {
+
+ // Reserved.
+ AdditionalInfo *string
+
+ // The architecture of the instance.
+ Architecture ArchitectureValues
+
+ // The security group IDs.
+ GroupIds []string
+
+ // The security group names.
+ GroupNames []string
+
+ // Indicates whether an instance stops or terminates when you initiate shutdown
+ // from the instance (using the operating system command for system shutdown).
+ InstanceInitiatedShutdownBehavior ShutdownBehavior
+
+ // The instance type. For more information about the instance types that you can
+ // import, see Instance Types
+ // (https://docs.aws.amazon.com/vm-import/latest/userguide/vmie_prereqs.html#vmimport-instance-types)
+ // in the VM Import/Export User Guide.
+ InstanceType InstanceType
+
+ // Indicates whether monitoring is enabled.
+ Monitoring *bool
+
+ // The placement information for the instance.
+ Placement *Placement
+
+ // [EC2-VPC] An available IP address from the IP address range of the subnet.
+ PrivateIpAddress *string
+
+ // [EC2-VPC] The ID of the subnet in which to launch the instance.
+ SubnetId *string
+
+ // The Base64-encoded user data to make available to the instance.
+ UserData *UserData
+
+ noSmithyDocumentSerde
+}
+
+// Describes an import instance task.
+type ImportInstanceTaskDetails struct {
+
+ // A description of the task.
+ Description *string
+
+ // The ID of the instance.
+ InstanceId *string
+
+ // The instance operating system.
+ Platform PlatformValues
+
+ // The volumes.
+ Volumes []ImportInstanceVolumeDetailItem
+
+ noSmithyDocumentSerde
+}
+
+// Describes an import volume task.
+type ImportInstanceVolumeDetailItem struct {
+
+ // The Availability Zone where the resulting instance will reside.
+ AvailabilityZone *string
+
+ // The number of bytes converted so far.
+ BytesConverted *int64
+
+ // A description of the task.
+ Description *string
+
+ // The image.
+ Image *DiskImageDescription
+
+ // The status of the import of this particular disk image.
+ Status *string
+
+ // The status information or errors related to the disk image.
+ StatusMessage *string
+
+ // The volume.
+ Volume *DiskImageVolumeDescription
+
+ noSmithyDocumentSerde
+}
+
+// Describes an import snapshot task.
+type ImportSnapshotTask struct {
+
+ // A description of the import snapshot task.
+ Description *string
+
+ // The ID of the import snapshot task.
+ ImportTaskId *string
+
+ // Describes an import snapshot task.
+ SnapshotTaskDetail *SnapshotTaskDetail
+
+ // The tags for the import snapshot task.
+ Tags []Tag
+
+ noSmithyDocumentSerde
+}
+
+// Describes an import volume task.
+type ImportVolumeTaskDetails struct {
+
+ // The Availability Zone where the resulting volume will reside.
+ AvailabilityZone *string
+
+ // The number of bytes converted so far.
+ BytesConverted *int64
+
+ // The description you provided when starting the import volume task.
+ Description *string
+
+ // The image.
+ Image *DiskImageDescription
+
+ // The volume.
+ Volume *DiskImageVolumeDescription
+
+ noSmithyDocumentSerde
+}
+
+// Describes the Inference accelerators for the instance type.
+type InferenceAcceleratorInfo struct {
+
+ // Describes the Inference accelerators for the instance type.
+ Accelerators []InferenceDeviceInfo
+
+ noSmithyDocumentSerde
+}
+
+// Describes the Inference accelerators for the instance type.
+type InferenceDeviceInfo struct {
+
+ // The number of Inference accelerators for the instance type.
+ Count *int32
+
+ // The manufacturer of the Inference accelerator.
+ Manufacturer *string
+
+ // The name of the Inference accelerator.
+ Name *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes an instance.
+type Instance struct {
+
+ // The AMI launch index, which can be used to find this instance in the launch
+ // group.
+ AmiLaunchIndex *int32
+
+ // The architecture of the image.
+ Architecture ArchitectureValues
+
+ // Any block device mapping entries for the instance.
+ BlockDeviceMappings []InstanceBlockDeviceMapping
+
+ // The boot mode of the instance. For more information, see Boot modes
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-boot.html) in the
+ // Amazon EC2 User Guide.
+ BootMode BootModeValues
+
+ // The ID of the Capacity Reservation.
+ CapacityReservationId *string
+
+ // Information about the Capacity Reservation targeting option.
+ CapacityReservationSpecification *CapacityReservationSpecificationResponse
+
+ // The idempotency token you provided when you launched the instance, if
+ // applicable.
+ ClientToken *string
+
+ // The CPU options for the instance.
+ CpuOptions *CpuOptions
+
+ // Indicates whether the instance is optimized for Amazon EBS I/O. This
+ // optimization provides dedicated throughput to Amazon EBS and an optimized
+ // configuration stack to provide optimal I/O performance. This optimization isn't
+ // available with all instance types. Additional usage charges apply when using an
+ // EBS Optimized instance.
+ EbsOptimized *bool
+
+ // The Elastic GPU associated with the instance.
+ ElasticGpuAssociations []ElasticGpuAssociation
+
+ // The elastic inference accelerator associated with the instance.
+ ElasticInferenceAcceleratorAssociations []ElasticInferenceAcceleratorAssociation
+
+ // Specifies whether enhanced networking with ENA is enabled.
+ EnaSupport *bool
+
+ // Indicates whether the instance is enabled for Amazon Web Services Nitro
+ // Enclaves.
+ EnclaveOptions *EnclaveOptions
+
+ // Indicates whether the instance is enabled for hibernation.
+ HibernationOptions *HibernationOptions
+
+ // The hypervisor type of the instance. The value xen is used for both Xen and
+ // Nitro hypervisors.
+ Hypervisor HypervisorType
+
+ // The IAM instance profile associated with the instance, if applicable.
+ IamInstanceProfile *IamInstanceProfile
+
+ // The ID of the AMI used to launch the instance.
+ ImageId *string
+
+ // The ID of the instance.
+ InstanceId *string
+
+ // Indicates whether this is a Spot Instance or a Scheduled Instance.
+ InstanceLifecycle InstanceLifecycleType
+
+ // The instance type.
+ InstanceType InstanceType
+
+ // The kernel associated with this instance, if applicable.
+ KernelId *string
+
+ // The name of the key pair, if this instance was launched with an associated key
+ // pair.
+ KeyName *string
+
+ // The time the instance was launched.
+ LaunchTime *time.Time
+
+ // The license configurations for the instance.
+ Licenses []LicenseConfiguration
+
+ // The metadata options for the instance.
+ MetadataOptions *InstanceMetadataOptionsResponse
+
+ // The monitoring for the instance.
+ Monitoring *Monitoring
+
+ // [EC2-VPC] The network interfaces for the instance.
+ NetworkInterfaces []InstanceNetworkInterface
+
+ // The Amazon Resource Name (ARN) of the Outpost.
+ OutpostArn *string
+
+ // The location where the instance launched, if applicable.
+ Placement *Placement
+
+ // The value is Windows for Windows instances; otherwise blank.
+ Platform PlatformValues
+
+ // The platform details value for the instance. For more information, see AMI
+ // billing information fields
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/billing-info-fields.html)
+ // in the Amazon EC2 User Guide.
+ PlatformDetails *string
+
+ // (IPv4 only) The private DNS hostname name assigned to the instance. This DNS
+ // hostname can only be used inside the Amazon EC2 network. This name is not
+ // available until the instance enters the running state. [EC2-VPC] The
+ // Amazon-provided DNS server resolves Amazon-provided private DNS hostnames if
+ // you've enabled DNS resolution and DNS hostnames in your VPC. If you are not
+ // using the Amazon-provided DNS server in your VPC, your custom domain name
+ // servers must resolve the hostname as appropriate.
+ PrivateDnsName *string
+
+ // The private IPv4 address assigned to the instance.
+ PrivateIpAddress *string
+
+ // The product codes attached to this instance, if applicable.
+ ProductCodes []ProductCode
+
+ // (IPv4 only) The public DNS name assigned to the instance. This name is not
+ // available until the instance enters the running state. For EC2-VPC, this name is
+ // only available if you've enabled DNS hostnames for your VPC.
+ PublicDnsName *string
+
+ // The public IPv4 address, or the Carrier IP address assigned to the instance, if
+ // applicable. A Carrier IP address only applies to an instance launched in a
+ // subnet associated with a Wavelength Zone.
+ PublicIpAddress *string
+
+ // The RAM disk associated with this instance, if applicable.
+ RamdiskId *string
+
+ // The device name of the root device volume (for example, /dev/sda1).
+ RootDeviceName *string
+
+ // The root device type used by the AMI. The AMI can use an EBS volume or an
+ // instance store volume.
+ RootDeviceType DeviceType
+
+ // The security groups for the instance.
+ SecurityGroups []GroupIdentifier
+
+ // Indicates whether source/destination checking is enabled.
+ SourceDestCheck *bool
+
+ // If the request is a Spot Instance request, the ID of the request.
+ SpotInstanceRequestId *string
+
+ // Specifies whether enhanced networking with the Intel 82599 Virtual Function
+ // interface is enabled.
+ SriovNetSupport *string
+
+ // The current state of the instance.
+ State *InstanceState
+
+ // The reason for the most recent state transition.
+ StateReason *StateReason
+
+ // The reason for the most recent state transition. This might be an empty string.
+ StateTransitionReason *string
+
+ // [EC2-VPC] The ID of the subnet in which the instance is running.
+ SubnetId *string
+
+ // Any tags assigned to the instance.
+ Tags []Tag
+
+ // The usage operation value for the instance. For more information, see AMI
+ // billing information fields
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/billing-info-fields.html)
+ // in the Amazon EC2 User Guide.
+ UsageOperation *string
+
+ // The time that the usage operation was last updated.
+ UsageOperationUpdateTime *time.Time
+
+ // The virtualization type of the instance.
+ VirtualizationType VirtualizationType
+
+ // [EC2-VPC] The ID of the VPC in which the instance is running.
+ VpcId *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes a block device mapping.
+type InstanceBlockDeviceMapping struct {
+
+ // The device name (for example, /dev/sdh or xvdh).
+ DeviceName *string
+
+ // Parameters used to automatically set up EBS volumes when the instance is
+ // launched.
+ Ebs *EbsInstanceBlockDevice
+
+ noSmithyDocumentSerde
+}
+
+// Describes a block device mapping entry.
+type InstanceBlockDeviceMappingSpecification struct {
+
+ // The device name (for example, /dev/sdh or xvdh).
+ DeviceName *string
+
+ // Parameters used to automatically set up EBS volumes when the instance is
+ // launched.
+ Ebs *EbsInstanceBlockDeviceSpecification
+
+ // suppress the specified device included in the block device mapping.
+ NoDevice *string
+
+ // The virtual device name.
+ VirtualName *string
+
+ noSmithyDocumentSerde
+}
+
+// Information about the number of instances that can be launched onto the
+// Dedicated Host.
+type InstanceCapacity struct {
+
+ // The number of instances that can be launched onto the Dedicated Host based on
+ // the host's available capacity.
+ AvailableCapacity *int32
+
+ // The instance type supported by the Dedicated Host.
+ InstanceType *string
+
+ // The total number of instances that can be launched onto the Dedicated Host if
+ // there are no instances running on it.
+ TotalCapacity *int32
+
+ noSmithyDocumentSerde
+}
+
+// Describes a Reserved Instance listing state.
+type InstanceCount struct {
+
+ // The number of listed Reserved Instances in the state specified by the state.
+ InstanceCount *int32
+
+ // The states of the listed Reserved Instances.
+ State ListingState
+
+ noSmithyDocumentSerde
+}
+
+// Describes the credit option for CPU usage of a burstable performance instance.
+type InstanceCreditSpecification struct {
+
+ // The credit option for CPU usage of the instance. Valid values are standard and
+ // unlimited.
+ CpuCredits *string
+
+ // The ID of the instance.
+ InstanceId *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes the credit option for CPU usage of a burstable performance instance.
+type InstanceCreditSpecificationRequest struct {
+
+ // The credit option for CPU usage of the instance. Valid values are standard and
+ // unlimited. T3 instances with host tenancy do not support the unlimited CPU
+ // credit option.
+ CpuCredits *string
+
+ // The ID of the instance.
+ InstanceId *string
+
+ noSmithyDocumentSerde
+}
+
+// The event window.
+type InstanceEventWindow struct {
+
+ // One or more targets associated with the event window.
+ AssociationTarget *InstanceEventWindowAssociationTarget
+
+ // The cron expression defined for the event window.
+ CronExpression *string
+
+ // The ID of the event window.
+ InstanceEventWindowId *string
+
+ // The name of the event window.
+ Name *string
+
+ // The current state of the event window.
+ State InstanceEventWindowState
+
+ // The instance tags associated with the event window.
+ Tags []Tag
+
+ // One or more time ranges defined for the event window.
+ TimeRanges []InstanceEventWindowTimeRange
+
+ noSmithyDocumentSerde
+}
+
+// One or more targets associated with the specified event window. Only one type of
+// target (instance ID, instance tag, or Dedicated Host ID) can be associated with
+// an event window.
+type InstanceEventWindowAssociationRequest struct {
+
+ // The IDs of the Dedicated Hosts to associate with the event window.
+ DedicatedHostIds []string
+
+ // The IDs of the instances to associate with the event window. If the instance is
+ // on a Dedicated Host, you can't specify the Instance ID parameter; you must use
+ // the Dedicated Host ID parameter.
+ InstanceIds []string
+
+ // The instance tags to associate with the event window. Any instances associated
+ // with the tags will be associated with the event window.
+ InstanceTags []Tag
+
+ noSmithyDocumentSerde
+}
+
+// One or more targets associated with the event window.
+type InstanceEventWindowAssociationTarget struct {
+
+ // The IDs of the Dedicated Hosts associated with the event window.
+ DedicatedHostIds []string
+
+ // The IDs of the instances associated with the event window.
+ InstanceIds []string
+
+ // The instance tags associated with the event window. Any instances associated
+ // with the tags will be associated with the event window.
+ Tags []Tag
+
+ noSmithyDocumentSerde
+}
+
+// The targets to disassociate from the specified event window.
+type InstanceEventWindowDisassociationRequest struct {
+
+ // The IDs of the Dedicated Hosts to disassociate from the event window.
+ DedicatedHostIds []string
+
+ // The IDs of the instances to disassociate from the event window.
+ InstanceIds []string
+
+ // The instance tags to disassociate from the event window. Any instances
+ // associated with the tags will be disassociated from the event window.
+ InstanceTags []Tag
+
+ noSmithyDocumentSerde
+}
+
+// The state of the event window.
+type InstanceEventWindowStateChange struct {
+
+ // The ID of the event window.
+ InstanceEventWindowId *string
+
+ // The current state of the event window.
+ State InstanceEventWindowState
+
+ noSmithyDocumentSerde
+}
+
+// The start day and time and the end day and time of the time range, in UTC.
+type InstanceEventWindowTimeRange struct {
+
+ // The hour when the time range ends.
+ EndHour *int32
+
+ // The day on which the time range ends.
+ EndWeekDay WeekDay
+
+ // The hour when the time range begins.
+ StartHour *int32
+
+ // The day on which the time range begins.
+ StartWeekDay WeekDay
+
+ noSmithyDocumentSerde
+}
+
+// The start day and time and the end day and time of the time range, in UTC.
+type InstanceEventWindowTimeRangeRequest struct {
+
+ // The hour when the time range ends.
+ EndHour *int32
+
+ // The day on which the time range ends.
+ EndWeekDay WeekDay
+
+ // The hour when the time range begins.
+ StartHour *int32
+
+ // The day on which the time range begins.
+ StartWeekDay WeekDay
+
+ noSmithyDocumentSerde
+}
+
+// Describes an instance to export.
+type InstanceExportDetails struct {
+
+ // The ID of the resource being exported.
+ InstanceId *string
+
+ // The target virtualization environment.
+ TargetEnvironment ExportEnvironment
+
+ noSmithyDocumentSerde
+}
+
+// Describes the default credit option for CPU usage of a burstable performance
+// instance family.
+type InstanceFamilyCreditSpecification struct {
+
+ // The default credit option for CPU usage of the instance family. Valid values are
+ // standard and unlimited.
+ CpuCredits *string
+
+ // The instance family.
+ InstanceFamily UnlimitedSupportedInstanceFamily
+
+ noSmithyDocumentSerde
+}
+
+// Information about an IPv4 prefix.
+type InstanceIpv4Prefix struct {
+
+ // One or more IPv4 prefixes assigned to the network interface.
+ Ipv4Prefix *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes an IPv6 address.
+type InstanceIpv6Address struct {
+
+ // The IPv6 address.
+ Ipv6Address *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes an IPv6 address.
+type InstanceIpv6AddressRequest struct {
+
+ // The IPv6 address.
+ Ipv6Address *string
+
+ noSmithyDocumentSerde
+}
+
+// Information about an IPv6 prefix.
+type InstanceIpv6Prefix struct {
+
+ // One or more IPv6 prefixes assigned to the network interface.
+ Ipv6Prefix *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes the market (purchasing) option for the instances.
+type InstanceMarketOptionsRequest struct {
+
+ // The market type.
+ MarketType MarketType
+
+ // The options for Spot Instances.
+ SpotOptions *SpotMarketOptions
+
+ noSmithyDocumentSerde
+}
+
+// The metadata options for the instance.
+type InstanceMetadataOptionsRequest struct {
+
+ // This parameter enables or disables the HTTP metadata endpoint on your instances.
+ // If the parameter is not specified, the default state is enabled. If you specify
+ // a value of disabled, you will not be able to access your instance metadata.
+ HttpEndpoint InstanceMetadataEndpointState
+
+ // Enables or disables the IPv6 endpoint for the instance metadata service.
+ HttpProtocolIpv6 InstanceMetadataProtocolState
+
+ // The desired HTTP PUT response hop limit for instance metadata requests. The
+ // larger the number, the further instance metadata requests can travel. Default: 1
+ // Possible values: Integers from 1 to 64
+ HttpPutResponseHopLimit *int32
+
+ // The state of token usage for your instance metadata requests. If the parameter
+ // is not specified in the request, the default state is optional. If the state is
+ // optional, you can choose to retrieve instance metadata with or without a signed
+ // token header on your request. If you retrieve the IAM role credentials without a
+ // token, the version 1.0 role credentials are returned. If you retrieve the IAM
+ // role credentials using a valid signed token, the version 2.0 role credentials
+ // are returned. If the state is required, you must send a signed token header with
+ // any instance metadata retrieval requests. In this state, retrieving the IAM role
+ // credentials always returns the version 2.0 credentials; the version 1.0
+ // credentials are not available.
+ HttpTokens HttpTokensState
+
+ noSmithyDocumentSerde
+}
+
+// The metadata options for the instance.
+type InstanceMetadataOptionsResponse struct {
+
+ // This parameter enables or disables the HTTP metadata endpoint on your instances.
+ // If the parameter is not specified, the default state is enabled. If you specify
+ // a value of disabled, you will not be able to access your instance metadata.
+ HttpEndpoint InstanceMetadataEndpointState
+
+ // Whether or not the IPv6 endpoint for the instance metadata service is enabled or
+ // disabled.
+ HttpProtocolIpv6 InstanceMetadataProtocolState
+
+ // The desired HTTP PUT response hop limit for instance metadata requests. The
+ // larger the number, the further instance metadata requests can travel. Default: 1
+ // Possible values: Integers from 1 to 64
+ HttpPutResponseHopLimit *int32
+
+ // The state of token usage for your instance metadata requests. If the parameter
+ // is not specified in the request, the default state is optional. If the state is
+ // optional, you can choose to retrieve instance metadata with or without a signed
+ // token header on your request. If you retrieve the IAM role credentials without a
+ // token, the version 1.0 role credentials are returned. If you retrieve the IAM
+ // role credentials using a valid signed token, the version 2.0 role credentials
+ // are returned. If the state is required, you must send a signed token header with
+ // any instance metadata retrieval requests. In this state, retrieving the IAM role
+ // credential always returns the version 2.0 credentials; the version 1.0
+ // credentials are not available.
+ HttpTokens HttpTokensState
+
+ // The state of the metadata option changes. pending - The metadata options are
+ // being updated and the instance is not ready to process metadata traffic with the
+ // new selection. applied - The metadata options have been successfully applied on
+ // the instance.
+ State InstanceMetadataOptionsState
+
+ noSmithyDocumentSerde
+}
+
+// Describes the monitoring of an instance.
+type InstanceMonitoring struct {
+
+ // The ID of the instance.
+ InstanceId *string
+
+ // The monitoring for the instance.
+ Monitoring *Monitoring
+
+ noSmithyDocumentSerde
+}
+
+// Describes a network interface.
+type InstanceNetworkInterface struct {
+
+ // The association information for an Elastic IPv4 associated with the network
+ // interface.
+ Association *InstanceNetworkInterfaceAssociation
+
+ // The network interface attachment.
+ Attachment *InstanceNetworkInterfaceAttachment
+
+ // The description.
+ Description *string
+
+ // One or more security groups.
+ Groups []GroupIdentifier
+
+ // Describes the type of network interface. Valid values: interface | efa | trunk
+ InterfaceType *string
+
+ // The IPv4 delegated prefixes that are assigned to the network interface.
+ Ipv4Prefixes []InstanceIpv4Prefix
+
+ // One or more IPv6 addresses associated with the network interface.
+ Ipv6Addresses []InstanceIpv6Address
+
+ // The IPv6 delegated prefixes that are assigned to the network interface.
+ Ipv6Prefixes []InstanceIpv6Prefix
+
+ // The MAC address.
+ MacAddress *string
+
+ // The ID of the network interface.
+ NetworkInterfaceId *string
+
+ // The ID of the Amazon Web Services account that created the network interface.
+ OwnerId *string
+
+ // The private DNS name.
+ PrivateDnsName *string
+
+ // The IPv4 address of the network interface within the subnet.
+ PrivateIpAddress *string
+
+ // One or more private IPv4 addresses associated with the network interface.
+ PrivateIpAddresses []InstancePrivateIpAddress
+
+ // Indicates whether source/destination checking is enabled.
+ SourceDestCheck *bool
+
+ // The status of the network interface.
+ Status NetworkInterfaceStatus
+
+ // The ID of the subnet.
+ SubnetId *string
+
+ // The ID of the VPC.
+ VpcId *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes association information for an Elastic IP address (IPv4).
+type InstanceNetworkInterfaceAssociation struct {
+
+ // The carrier IP address associated with the network interface.
+ CarrierIp *string
+
+ // The ID of the owner of the Elastic IP address.
+ IpOwnerId *string
+
+ // The public DNS name.
+ PublicDnsName *string
+
+ // The public IP address or Elastic IP address bound to the network interface.
+ PublicIp *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes a network interface attachment.
+type InstanceNetworkInterfaceAttachment struct {
+
+ // The time stamp when the attachment initiated.
+ AttachTime *time.Time
+
+ // The ID of the network interface attachment.
+ AttachmentId *string
+
+ // Indicates whether the network interface is deleted when the instance is
+ // terminated.
+ DeleteOnTermination *bool
+
+ // The index of the device on the instance for the network interface attachment.
+ DeviceIndex *int32
+
+ // The index of the network card.
+ NetworkCardIndex *int32
+
+ // The attachment state.
+ Status AttachmentStatus
+
+ noSmithyDocumentSerde
+}
+
+// Describes a network interface.
+type InstanceNetworkInterfaceSpecification struct {
+
+ // Indicates whether to assign a carrier IP address to the network interface. You
+ // can only assign a carrier IP address to a network interface that is in a subnet
+ // in a Wavelength Zone. For more information about carrier IP addresses, see
+ // Carrier IP addresses in the Amazon Web Services Wavelength Developer Guide.
+ AssociateCarrierIpAddress *bool
+
+ // Indicates whether to assign a public IPv4 address to an instance you launch in a
+ // VPC. The public IP address can only be assigned to a network interface for eth0,
+ // and can only be assigned to a new network interface, not an existing one. You
+ // cannot specify more than one network interface in the request. If launching into
+ // a default subnet, the default value is true.
+ AssociatePublicIpAddress *bool
+
+ // If set to true, the interface is deleted when the instance is terminated. You
+ // can specify true only if creating a new network interface when launching an
+ // instance.
+ DeleteOnTermination *bool
+
+ // The description of the network interface. Applies only if creating a network
+ // interface when launching an instance.
+ Description *string
+
+ // The position of the network interface in the attachment order. A primary network
+ // interface has a device index of 0. If you specify a network interface when
+ // launching an instance, you must specify the device index.
+ DeviceIndex *int32
+
+ // The IDs of the security groups for the network interface. Applies only if
+ // creating a network interface when launching an instance.
+ Groups []string
+
+ // The type of network interface. To create an Elastic Fabric Adapter (EFA),
+ // specify efa. For more information, see Elastic Fabric Adapter
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/efa.html) in the Amazon
+ // Elastic Compute Cloud User Guide. Valid values: interface | efa
+ InterfaceType *string
+
+ // The number of IPv4 delegated prefixes to be automatically assigned to the
+ // network interface. You cannot use this option if you use the Ipv4Prefix option.
+ Ipv4PrefixCount *int32
+
+ // One or more IPv4 delegated prefixes to be assigned to the network interface. You
+ // cannot use this option if you use the Ipv4PrefixCount option.
+ Ipv4Prefixes []Ipv4PrefixSpecificationRequest
+
+ // A number of IPv6 addresses to assign to the network interface. Amazon EC2
+ // chooses the IPv6 addresses from the range of the subnet. You cannot specify this
+ // option and the option to assign specific IPv6 addresses in the same request. You
+ // can specify this option if you've specified a minimum number of instances to
+ // launch.
+ Ipv6AddressCount *int32
+
+ // One or more IPv6 addresses to assign to the network interface. You cannot
+ // specify this option and the option to assign a number of IPv6 addresses in the
+ // same request. You cannot specify this option if you've specified a minimum
+ // number of instances to launch.
+ Ipv6Addresses []InstanceIpv6Address
+
+ // The number of IPv6 delegated prefixes to be automatically assigned to the
+ // network interface. You cannot use this option if you use the Ipv6Prefix option.
+ Ipv6PrefixCount *int32
+
+ // One or more IPv6 delegated prefixes to be assigned to the network interface. You
+ // cannot use this option if you use the Ipv6PrefixCount option.
+ Ipv6Prefixes []Ipv6PrefixSpecificationRequest
+
+ // The index of the network card. Some instance types support multiple network
+ // cards. The primary network interface must be assigned to network card index 0.
+ // The default is network card index 0. If you are using RequestSpotInstances
+ // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RequestSpotInstances.html)
+ // to create Spot Instances, omit this parameter because you can’t specify the
+ // network card index when using this API. To specify the network card index, use
+ // RunInstances
+ // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RunInstances.html).
+ NetworkCardIndex *int32
+
+ // The ID of the network interface. If you are creating a Spot Fleet, omit this
+ // parameter because you can’t specify a network interface ID in a launch
+ // specification.
+ NetworkInterfaceId *string
+
+ // The private IPv4 address of the network interface. Applies only if creating a
+ // network interface when launching an instance. You cannot specify this option if
+ // you're launching more than one instance in a RunInstances
+ // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RunInstances.html)
+ // request.
+ PrivateIpAddress *string
+
+ // One or more private IPv4 addresses to assign to the network interface. Only one
+ // private IPv4 address can be designated as primary. You cannot specify this
+ // option if you're launching more than one instance in a RunInstances
+ // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RunInstances.html)
+ // request.
+ PrivateIpAddresses []PrivateIpAddressSpecification
+
+ // The number of secondary private IPv4 addresses. You can't specify this option
+ // and specify more than one private IP address using the private IP addresses
+ // option. You cannot specify this option if you're launching more than one
+ // instance in a RunInstances
+ // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RunInstances.html)
+ // request.
+ SecondaryPrivateIpAddressCount *int32
+
+ // The ID of the subnet associated with the network interface. Applies only if
+ // creating a network interface when launching an instance.
+ SubnetId *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes a private IPv4 address.
+type InstancePrivateIpAddress struct {
+
+ // The association information for an Elastic IP address for the network interface.
+ Association *InstanceNetworkInterfaceAssociation
+
+ // Indicates whether this IPv4 address is the primary private IP address of the
+ // network interface.
+ Primary *bool
+
+ // The private IPv4 DNS name.
+ PrivateDnsName *string
+
+ // The private IPv4 address of the network interface.
+ PrivateIpAddress *string
+
+ noSmithyDocumentSerde
+}
+
+// The instance details to specify which volumes should be snapshotted.
+type InstanceSpecification struct {
+
+ // Excludes the root volume from being snapshotted.
+ ExcludeBootVolume *bool
+
+ // The instance to specify which volumes should be snapshotted.
+ InstanceId *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes the current state of an instance.
+type InstanceState struct {
+
+ // The state of the instance as a 16-bit unsigned integer. The high byte is all of
+ // the bits between 2^8 and (2^16)-1, which equals decimal values between 256 and
+ // 65,535. These numerical values are used for internal purposes and should be
+ // ignored. The low byte is all of the bits between 2^0 and (2^8)-1, which equals
+ // decimal values between 0 and 255. The valid values for instance-state-code will
+ // all be in the range of the low byte and they are:
+ //
+ // * 0 : pending
+ //
+ // * 16 :
+ // running
+ //
+ // * 32 : shutting-down
+ //
+ // * 48 : terminated
+ //
+ // * 64 : stopping
+ //
+ // * 80 :
+ // stopped
+ //
+ // You can ignore the high byte value by zeroing out all of the bits above
+ // 2^8 or 256 in decimal.
+ Code *int32
+
+ // The current state of the instance.
+ Name InstanceStateName
+
+ noSmithyDocumentSerde
+}
+
+// Describes an instance state change.
+type InstanceStateChange struct {
+
+ // The current state of the instance.
+ CurrentState *InstanceState
+
+ // The ID of the instance.
+ InstanceId *string
+
+ // The previous state of the instance.
+ PreviousState *InstanceState
+
+ noSmithyDocumentSerde
+}
+
+// Describes the status of an instance.
+type InstanceStatus struct {
+
+ // The Availability Zone of the instance.
+ AvailabilityZone *string
+
+ // Any scheduled events associated with the instance.
+ Events []InstanceStatusEvent
+
+ // The ID of the instance.
+ InstanceId *string
+
+ // The intended state of the instance. DescribeInstanceStatus requires that an
+ // instance be in the running state.
+ InstanceState *InstanceState
+
+ // Reports impaired functionality that stems from issues internal to the instance,
+ // such as impaired reachability.
+ InstanceStatus *InstanceStatusSummary
+
+ // The Amazon Resource Name (ARN) of the Outpost.
+ OutpostArn *string
+
+ // Reports impaired functionality that stems from issues related to the systems
+ // that support an instance, such as hardware failures and network connectivity
+ // problems.
+ SystemStatus *InstanceStatusSummary
+
+ noSmithyDocumentSerde
+}
+
+// Describes the instance status.
+type InstanceStatusDetails struct {
+
+ // The time when a status check failed. For an instance that was launched and
+ // impaired, this is the time when the instance was launched.
+ ImpairedSince *time.Time
+
+ // The type of instance status.
+ Name StatusName
+
+ // The status.
+ Status StatusType
+
+ noSmithyDocumentSerde
+}
+
+// Describes a scheduled event for an instance.
+type InstanceStatusEvent struct {
+
+ // The event code.
+ Code EventCode
+
+ // A description of the event. After a scheduled event is completed, it can still
+ // be described for up to a week. If the event has been completed, this description
+ // starts with the following text: [Completed].
+ Description *string
+
+ // The ID of the event.
+ InstanceEventId *string
+
+ // The latest scheduled end time for the event.
+ NotAfter *time.Time
+
+ // The earliest scheduled start time for the event.
+ NotBefore *time.Time
+
+ // The deadline for starting the event.
+ NotBeforeDeadline *time.Time
+
+ noSmithyDocumentSerde
+}
+
+// Describes the status of an instance.
+type InstanceStatusSummary struct {
+
+ // The system instance health or application instance health.
+ Details []InstanceStatusDetails
+
+ // The status.
+ Status SummaryStatus
+
+ noSmithyDocumentSerde
+}
+
+// Describes the disks that are available for the instance type.
+type InstanceStorageInfo struct {
+
+ // Describes the disks that are available for the instance type.
+ Disks []DiskInfo
+
+ // Indicates whether non-volatile memory express (NVMe) is supported for instance
+ // store.
+ NvmeSupport EphemeralNvmeSupport
+
+ // The total size of the disks, in GB.
+ TotalSizeInGB *int64
+
+ noSmithyDocumentSerde
+}
+
+// Describes the registered tag keys for the current Region.
+type InstanceTagNotificationAttribute struct {
+
+ // Indicates wheter all tag keys in the current Region are registered to appear in
+ // scheduled event notifications. true indicates that all tag keys in the current
+ // Region are registered.
+ IncludeAllTagsOfInstance *bool
+
+ // The registered tag keys.
+ InstanceTagKeys []string
+
+ noSmithyDocumentSerde
+}
+
+// Describes the instance type.
+type InstanceTypeInfo struct {
+
+ // Indicates whether auto recovery is supported.
+ AutoRecoverySupported *bool
+
+ // Indicates whether the instance is a bare metal instance type.
+ BareMetal *bool
+
+ // Indicates whether the instance type is a burstable performance instance type.
+ BurstablePerformanceSupported *bool
+
+ // Indicates whether the instance type is current generation.
+ CurrentGeneration *bool
+
+ // Indicates whether Dedicated Hosts are supported on the instance type.
+ DedicatedHostsSupported *bool
+
+ // Describes the Amazon EBS settings for the instance type.
+ EbsInfo *EbsInfo
+
+ // Describes the FPGA accelerator settings for the instance type.
+ FpgaInfo *FpgaInfo
+
+ // Indicates whether the instance type is eligible for the free tier.
+ FreeTierEligible *bool
+
+ // Describes the GPU accelerator settings for the instance type.
+ GpuInfo *GpuInfo
+
+ // Indicates whether On-Demand hibernation is supported.
+ HibernationSupported *bool
+
+ // The hypervisor for the instance type.
+ Hypervisor InstanceTypeHypervisor
+
+ // Describes the Inference accelerator settings for the instance type.
+ InferenceAcceleratorInfo *InferenceAcceleratorInfo
+
+ // Describes the instance storage for the instance type.
+ InstanceStorageInfo *InstanceStorageInfo
+
+ // Indicates whether instance storage is supported.
+ InstanceStorageSupported *bool
+
+ // The instance type. For more information, see Instance types
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html) in the
+ // Amazon EC2 User Guide.
+ InstanceType InstanceType
+
+ // Describes the memory for the instance type.
+ MemoryInfo *MemoryInfo
+
+ // Describes the network settings for the instance type.
+ NetworkInfo *NetworkInfo
+
+ // Describes the placement group settings for the instance type.
+ PlacementGroupInfo *PlacementGroupInfo
+
+ // Describes the processor.
+ ProcessorInfo *ProcessorInfo
+
+ // The supported boot modes. For more information, see Boot modes
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-boot.html) in the
+ // Amazon EC2 User Guide.
+ SupportedBootModes []BootModeType
+
+ // The supported root device types.
+ SupportedRootDeviceTypes []RootDeviceType
+
+ // Indicates whether the instance type is offered for spot or On-Demand.
+ SupportedUsageClasses []UsageClassType
+
+ // The supported virtualization types.
+ SupportedVirtualizationTypes []VirtualizationType
+
+ // Describes the vCPU configurations for the instance type.
+ VCpuInfo *VCpuInfo
+
+ noSmithyDocumentSerde
+}
+
+// The instance types offered.
+type InstanceTypeOffering struct {
+
+ // The instance type. For more information, see Instance types
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html) in the
+ // Amazon EC2 User Guide.
+ InstanceType InstanceType
+
+ // The identifier for the location. This depends on the location type. For example,
+ // if the location type is region, the location is the Region code (for example,
+ // us-east-2.)
+ Location *string
+
+ // The location type.
+ LocationType LocationType
+
+ noSmithyDocumentSerde
+}
+
+// Information about the Capacity Reservation usage.
+type InstanceUsage struct {
+
+ // The ID of the Amazon Web Services account that is making use of the Capacity
+ // Reservation.
+ AccountId *string
+
+ // The number of instances the Amazon Web Services account currently has in the
+ // Capacity Reservation.
+ UsedInstanceCount *int32
+
+ noSmithyDocumentSerde
+}
+
+// Describes service integrations with VPC Flow logs.
+type IntegrateServices struct {
+
+ // Information about the integration with Amazon Athena.
+ AthenaIntegrations []AthenaIntegration
+
+ noSmithyDocumentSerde
+}
+
+// Describes an internet gateway.
+type InternetGateway struct {
+
+ // Any VPCs attached to the internet gateway.
+ Attachments []InternetGatewayAttachment
+
+ // The ID of the internet gateway.
+ InternetGatewayId *string
+
+ // The ID of the Amazon Web Services account that owns the internet gateway.
+ OwnerId *string
+
+ // Any tags assigned to the internet gateway.
+ Tags []Tag
+
+ noSmithyDocumentSerde
+}
+
+// Describes the attachment of a VPC to an internet gateway or an egress-only
+// internet gateway.
+type InternetGatewayAttachment struct {
+
+ // The current state of the attachment. For an internet gateway, the state is
+ // available when attached to a VPC; otherwise, this value is not returned.
+ State AttachmentStatus
+
+ // The ID of the VPC.
+ VpcId *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes a set of permissions for a security group rule.
+type IpPermission struct {
+
+ // The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type
+ // number. A value of -1 indicates all ICMP/ICMPv6 types. If you specify all
+ // ICMP/ICMPv6 types, you must specify all codes.
+ FromPort *int32
+
+ // The IP protocol name (tcp, udp, icmp, icmpv6) or number (see Protocol Numbers
+ // (http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml)). [VPC
+ // only] Use -1 to specify all protocols. When authorizing security group rules,
+ // specifying -1 or a protocol number other than tcp, udp, icmp, or icmpv6 allows
+ // traffic on all ports, regardless of any port range you specify. For tcp, udp,
+ // and icmp, you must specify a port range. For icmpv6, the port range is optional;
+ // if you omit the port range, traffic for all types and codes is allowed.
+ IpProtocol *string
+
+ // The IPv4 ranges.
+ IpRanges []IpRange
+
+ // [VPC only] The IPv6 ranges.
+ Ipv6Ranges []Ipv6Range
+
+ // [VPC only] The prefix list IDs.
+ PrefixListIds []PrefixListId
+
+ // The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code. A
+ // value of -1 indicates all ICMP/ICMPv6 codes. If you specify all ICMP/ICMPv6
+ // types, you must specify all codes.
+ ToPort *int32
+
+ // The security group and Amazon Web Services account ID pairs.
+ UserIdGroupPairs []UserIdGroupPair
+
+ noSmithyDocumentSerde
+}
+
+// Describes an IPv4 range.
+type IpRange struct {
+
+ // The IPv4 CIDR range. You can either specify a CIDR range or a source security
+ // group, not both. To specify a single IPv4 address, use the /32 prefix length.
+ CidrIp *string
+
+ // A description for the security group rule that references this IPv4 address
+ // range. Constraints: Up to 255 characters in length. Allowed characters are a-z,
+ // A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*
+ Description *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes an IPv4 prefix.
+type Ipv4PrefixSpecification struct {
+
+ // The IPv4 prefix. For information, see Assigning prefixes to Amazon EC2 network
+ // interfaces
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-prefix-eni.html) in the
+ // Amazon Elastic Compute Cloud User Guide.
+ Ipv4Prefix *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes the IPv4 prefix option for a network interface.
+type Ipv4PrefixSpecificationRequest struct {
+
+ // The IPv4 prefix. For information, see Assigning prefixes to Amazon EC2 network
+ // interfaces
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-prefix-eni.html) in the
+ // Amazon Elastic Compute Cloud User Guide.
+ Ipv4Prefix *string
+
+ noSmithyDocumentSerde
+}
+
+// Information about the IPv4 delegated prefixes assigned to a network interface.
+type Ipv4PrefixSpecificationResponse struct {
+
+ // One or more IPv4 delegated prefixes assigned to the network interface.
+ Ipv4Prefix *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes an IPv6 CIDR block association.
+type Ipv6CidrAssociation struct {
+
+ // The resource that's associated with the IPv6 CIDR block.
+ AssociatedResource *string
+
+ // The IPv6 CIDR block.
+ Ipv6Cidr *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes an IPv6 CIDR block.
+type Ipv6CidrBlock struct {
+
+ // The IPv6 CIDR block.
+ Ipv6CidrBlock *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes an IPv6 address pool.
+type Ipv6Pool struct {
+
+ // The description for the address pool.
+ Description *string
+
+ // The CIDR blocks for the address pool.
+ PoolCidrBlocks []PoolCidrBlock
+
+ // The ID of the address pool.
+ PoolId *string
+
+ // Any tags for the address pool.
+ Tags []Tag
+
+ noSmithyDocumentSerde
+}
+
+// Describes the IPv6 prefix.
+type Ipv6PrefixSpecification struct {
+
+ // The IPv6 prefix.
+ Ipv6Prefix *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes the IPv4 prefix option for a network interface.
+type Ipv6PrefixSpecificationRequest struct {
+
+ // The IPv6 prefix.
+ Ipv6Prefix *string
+
+ noSmithyDocumentSerde
+}
+
+// Information about the IPv6 delegated prefixes assigned to a network interface.
+type Ipv6PrefixSpecificationResponse struct {
+
+ // One or more IPv6 delegated prefixes assigned to the network interface.
+ Ipv6Prefix *string
+
+ noSmithyDocumentSerde
+}
+
+// [EC2-VPC only] Describes an IPv6 range.
+type Ipv6Range struct {
+
+ // The IPv6 CIDR range. You can either specify a CIDR range or a source security
+ // group, not both. To specify a single IPv6 address, use the /128 prefix length.
+ CidrIpv6 *string
+
+ // A description for the security group rule that references this IPv6 address
+ // range. Constraints: Up to 255 characters in length. Allowed characters are a-z,
+ // A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*
+ Description *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes a key pair.
+type KeyPairInfo struct {
+
+ // If you used CreateKeyPair to create the key pair:
+ //
+ // * For RSA key pairs, the key
+ // fingerprint is the SHA-1 digest of the DER encoded private key.
+ //
+ // * For ED25519
+ // key pairs, the key fingerprint is the base64-encoded SHA-256 digest, which is
+ // the default for OpenSSH, starting with OpenSSH 6.8
+ // (http://www.openssh.com/txt/release-6.8).
+ //
+ // If you used ImportKeyPair to provide
+ // Amazon Web Services the public key:
+ //
+ // * For RSA key pairs, the key fingerprint is
+ // the MD5 public key fingerprint as specified in section 4 of RFC4716.
+ //
+ // * For
+ // ED25519 key pairs, the key fingerprint is the base64-encoded SHA-256 digest,
+ // which is the default for OpenSSH, starting with OpenSSH 6.8
+ // (http://www.openssh.com/txt/release-6.8).
+ KeyFingerprint *string
+
+ // The name of the key pair.
+ KeyName *string
+
+ // The ID of the key pair.
+ KeyPairId *string
+
+ // The type of key pair.
+ KeyType KeyType
+
+ // Any tags applied to the key pair.
+ Tags []Tag
+
+ noSmithyDocumentSerde
+}
+
+// The last error that occurred for a VPC endpoint.
+type LastError struct {
+
+ // The error code for the VPC endpoint error.
+ Code *string
+
+ // The error message for the VPC endpoint error.
+ Message *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes a launch permission.
+type LaunchPermission struct {
+
+ // The name of the group.
+ Group PermissionGroup
+
+ // The Amazon Web Services account ID. Constraints: Up to 10 000 account IDs can be
+ // specified in a single request.
+ UserId *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes a launch permission modification.
+type LaunchPermissionModifications struct {
+
+ // The Amazon Web Services account ID to add to the list of launch permissions for
+ // the AMI.
+ Add []LaunchPermission
+
+ // The Amazon Web Services account ID to remove from the list of launch permissions
+ // for the AMI.
+ Remove []LaunchPermission
+
+ noSmithyDocumentSerde
+}
+
+// Describes the launch specification for an instance.
+type LaunchSpecification struct {
+
+ // Deprecated.
+ AddressingType *string
+
+ // One or more block device mapping entries.
+ BlockDeviceMappings []BlockDeviceMapping
+
+ // Indicates whether the instance is optimized for EBS I/O. This optimization
+ // provides dedicated throughput to Amazon EBS and an optimized configuration stack
+ // to provide optimal EBS I/O performance. This optimization isn't available with
+ // all instance types. Additional usage charges apply when using an EBS Optimized
+ // instance. Default: false
+ EbsOptimized *bool
+
+ // The IAM instance profile.
+ IamInstanceProfile *IamInstanceProfileSpecification
+
+ // The ID of the AMI.
+ ImageId *string
+
+ // The instance type.
+ InstanceType InstanceType
+
+ // The ID of the kernel.
+ KernelId *string
+
+ // The name of the key pair.
+ KeyName *string
+
+ // Describes the monitoring of an instance.
+ Monitoring *RunInstancesMonitoringEnabled
+
+ // One or more network interfaces. If you specify a network interface, you must
+ // specify subnet IDs and security group IDs using the network interface.
+ NetworkInterfaces []InstanceNetworkInterfaceSpecification
+
+ // The placement information for the instance.
+ Placement *SpotPlacement
+
+ // The ID of the RAM disk.
+ RamdiskId *string
+
+ // One or more security groups. When requesting instances in a VPC, you must
+ // specify the IDs of the security groups. When requesting instances in
+ // EC2-Classic, you can specify the names or the IDs of the security groups.
+ SecurityGroups []GroupIdentifier
+
+ // The ID of the subnet in which to launch the instance.
+ SubnetId *string
+
+ // The Base64-encoded user data for the instance.
+ UserData *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes a launch template.
+type LaunchTemplate struct {
+
+ // The time launch template was created.
+ CreateTime *time.Time
+
+ // The principal that created the launch template.
+ CreatedBy *string
+
+ // The version number of the default version of the launch template.
+ DefaultVersionNumber *int64
+
+ // The version number of the latest version of the launch template.
+ LatestVersionNumber *int64
+
+ // The ID of the launch template.
+ LaunchTemplateId *string
+
+ // The name of the launch template.
+ LaunchTemplateName *string
+
+ // The tags for the launch template.
+ Tags []Tag
+
+ noSmithyDocumentSerde
+}
+
+// Describes a launch template and overrides.
+type LaunchTemplateAndOverridesResponse struct {
+
+ // The launch template.
+ LaunchTemplateSpecification *FleetLaunchTemplateSpecification
+
+ // Any parameters that you specify override the same parameters in the launch
+ // template.
+ Overrides *FleetLaunchTemplateOverrides
+
+ noSmithyDocumentSerde
+}
+
+// Describes a block device mapping.
+type LaunchTemplateBlockDeviceMapping struct {
+
+ // The device name.
+ DeviceName *string
+
+ // Information about the block device for an EBS volume.
+ Ebs *LaunchTemplateEbsBlockDevice
+
+ // To omit the device from the block device mapping, specify an empty string.
+ NoDevice *string
+
+ // The virtual device name (ephemeralN).
+ VirtualName *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes a block device mapping.
+type LaunchTemplateBlockDeviceMappingRequest struct {
+
+ // The device name (for example, /dev/sdh or xvdh).
+ DeviceName *string
+
+ // Parameters used to automatically set up EBS volumes when the instance is
+ // launched.
+ Ebs *LaunchTemplateEbsBlockDeviceRequest
+
+ // To omit the device from the block device mapping, specify an empty string.
+ NoDevice *string
+
+ // The virtual device name (ephemeralN). Instance store volumes are numbered
+ // starting from 0. An instance type with 2 available instance store volumes can
+ // specify mappings for ephemeral0 and ephemeral1. The number of available instance
+ // store volumes depends on the instance type. After you connect to the instance,
+ // you must mount the volume.
+ VirtualName *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes an instance's Capacity Reservation targeting option. You can specify
+// only one option at a time. Use the CapacityReservationPreference parameter to
+// configure the instance to run in On-Demand capacity or to run in any open
+// Capacity Reservation that has matching attributes (instance type, platform,
+// Availability Zone). Use the CapacityReservationTarget parameter to explicitly
+// target a specific Capacity Reservation or a Capacity Reservation group.
+type LaunchTemplateCapacityReservationSpecificationRequest struct {
+
+ // Indicates the instance's Capacity Reservation preferences. Possible preferences
+ // include:
+ //
+ // * open - The instance can run in any open Capacity Reservation that
+ // has matching attributes (instance type, platform, Availability Zone).
+ //
+ // * none -
+ // The instance avoids running in a Capacity Reservation even if one is available.
+ // The instance runs in On-Demand capacity.
+ CapacityReservationPreference CapacityReservationPreference
+
+ // Information about the target Capacity Reservation or Capacity Reservation group.
+ CapacityReservationTarget *CapacityReservationTarget
+
+ noSmithyDocumentSerde
+}
+
+// Information about the Capacity Reservation targeting option.
+type LaunchTemplateCapacityReservationSpecificationResponse struct {
+
+ // Indicates the instance's Capacity Reservation preferences. Possible preferences
+ // include:
+ //
+ // * open - The instance can run in any open Capacity Reservation that
+ // has matching attributes (instance type, platform, Availability Zone).
+ //
+ // * none -
+ // The instance avoids running in a Capacity Reservation even if one is available.
+ // The instance runs in On-Demand capacity.
+ CapacityReservationPreference CapacityReservationPreference
+
+ // Information about the target Capacity Reservation or Capacity Reservation group.
+ CapacityReservationTarget *CapacityReservationTargetResponse
+
+ noSmithyDocumentSerde
+}
+
+// Describes a launch template and overrides.
+type LaunchTemplateConfig struct {
+
+ // The launch template.
+ LaunchTemplateSpecification *FleetLaunchTemplateSpecification
+
+ // Any parameters that you specify override the same parameters in the launch
+ // template.
+ Overrides []LaunchTemplateOverrides
+
+ noSmithyDocumentSerde
+}
+
+// The CPU options for the instance.
+type LaunchTemplateCpuOptions struct {
+
+ // The number of CPU cores for the instance.
+ CoreCount *int32
+
+ // The number of threads per CPU core.
+ ThreadsPerCore *int32
+
+ noSmithyDocumentSerde
+}
+
+// The CPU options for the instance. Both the core count and threads per core must
+// be specified in the request.
+type LaunchTemplateCpuOptionsRequest struct {
+
+ // The number of CPU cores for the instance.
+ CoreCount *int32
+
+ // The number of threads per CPU core. To disable multithreading for the instance,
+ // specify a value of 1. Otherwise, specify the default value of 2.
+ ThreadsPerCore *int32
+
+ noSmithyDocumentSerde
+}
+
+// Describes a block device for an EBS volume.
+type LaunchTemplateEbsBlockDevice struct {
+
+ // Indicates whether the EBS volume is deleted on instance termination.
+ DeleteOnTermination *bool
+
+ // Indicates whether the EBS volume is encrypted.
+ Encrypted *bool
+
+ // The number of I/O operations per second (IOPS) that the volume supports.
+ Iops *int32
+
+ // The ARN of the Key Management Service (KMS) CMK used for encryption.
+ KmsKeyId *string
+
+ // The ID of the snapshot.
+ SnapshotId *string
+
+ // The throughput that the volume supports, in MiB/s.
+ Throughput *int32
+
+ // The size of the volume, in GiB.
+ VolumeSize *int32
+
+ // The volume type.
+ VolumeType VolumeType
+
+ noSmithyDocumentSerde
+}
+
+// The parameters for a block device for an EBS volume.
+type LaunchTemplateEbsBlockDeviceRequest struct {
+
+ // Indicates whether the EBS volume is deleted on instance termination.
+ DeleteOnTermination *bool
+
+ // Indicates whether the EBS volume is encrypted. Encrypted volumes can only be
+ // attached to instances that support Amazon EBS encryption. If you are creating a
+ // volume from a snapshot, you can't specify an encryption value.
+ Encrypted *bool
+
+ // The number of I/O operations per second (IOPS). For gp3, io1, and io2 volumes,
+ // this represents the number of IOPS that are provisioned for the volume. For gp2
+ // volumes, this represents the baseline performance of the volume and the rate at
+ // which the volume accumulates I/O credits for bursting. The following are the
+ // supported values for each volume type:
+ //
+ // * gp3: 3,000-16,000 IOPS
+ //
+ // * io1:
+ // 100-64,000 IOPS
+ //
+ // * io2: 100-64,000 IOPS
+ //
+ // For io1 and io2 volumes, we guarantee
+ // 64,000 IOPS only for Instances built on the Nitro System
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#ec2-nitro-instances).
+ // Other instance families guarantee performance up to 32,000 IOPS. This parameter
+ // is supported for io1, io2, and gp3 volumes only. This parameter is not supported
+ // for gp2, st1, sc1, or standard volumes.
+ Iops *int32
+
+ // The ARN of the symmetric Key Management Service (KMS) CMK used for encryption.
+ KmsKeyId *string
+
+ // The ID of the snapshot.
+ SnapshotId *string
+
+ // The throughput to provision for a gp3 volume, with a maximum of 1,000 MiB/s.
+ // Valid Range: Minimum value of 125. Maximum value of 1000.
+ Throughput *int32
+
+ // The size of the volume, in GiBs. You must specify either a snapshot ID or a
+ // volume size. The following are the supported volumes sizes for each volume
+ // type:
+ //
+ // * gp2 and gp3: 1-16,384
+ //
+ // * io1 and io2: 4-16,384
+ //
+ // * st1 and sc1:
+ // 125-16,384
+ //
+ // * standard: 1-1,024
+ VolumeSize *int32
+
+ // The volume type. For more information, see Amazon EBS volume types
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html) in the
+ // Amazon Elastic Compute Cloud User Guide.
+ VolumeType VolumeType
+
+ noSmithyDocumentSerde
+}
+
+// Describes an elastic inference accelerator.
+type LaunchTemplateElasticInferenceAccelerator struct {
+
+ // The type of elastic inference accelerator. The possible values are eia1.medium,
+ // eia1.large, and eia1.xlarge.
+ //
+ // This member is required.
+ Type *string
+
+ // The number of elastic inference accelerators to attach to the instance. Default:
+ // 1
+ Count *int32
+
+ noSmithyDocumentSerde
+}
+
+// Describes an elastic inference accelerator.
+type LaunchTemplateElasticInferenceAcceleratorResponse struct {
+
+ // The number of elastic inference accelerators to attach to the instance. Default:
+ // 1
+ Count *int32
+
+ // The type of elastic inference accelerator. The possible values are eia1.medium,
+ // eia1.large, and eia1.xlarge.
+ Type *string
+
+ noSmithyDocumentSerde
+}
+
+// Indicates whether the instance is enabled for Amazon Web Services Nitro
+// Enclaves.
+type LaunchTemplateEnclaveOptions struct {
+
+ // If this parameter is set to true, the instance is enabled for Amazon Web
+ // Services Nitro Enclaves; otherwise, it is not enabled for Amazon Web Services
+ // Nitro Enclaves.
+ Enabled *bool
+
+ noSmithyDocumentSerde
+}
+
+// Indicates whether the instance is enabled for Amazon Web Services Nitro
+// Enclaves. For more information, see What is Amazon Web Services Nitro Enclaves?
+// (https://docs.aws.amazon.com/enclaves/latest/user/nitro-enclave.html) in the
+// Amazon Web Services Nitro Enclaves User Guide.
+type LaunchTemplateEnclaveOptionsRequest struct {
+
+ // To enable the instance for Amazon Web Services Nitro Enclaves, set this
+ // parameter to true.
+ Enabled *bool
+
+ noSmithyDocumentSerde
+}
+
+// Indicates whether an instance is configured for hibernation.
+type LaunchTemplateHibernationOptions struct {
+
+ // If this parameter is set to true, the instance is enabled for hibernation;
+ // otherwise, it is not enabled for hibernation.
+ Configured *bool
+
+ noSmithyDocumentSerde
+}
+
+// Indicates whether the instance is configured for hibernation. This parameter is
+// valid only if the instance meets the hibernation prerequisites
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html#hibernating-prerequisites).
+type LaunchTemplateHibernationOptionsRequest struct {
+
+ // If you set this parameter to true, the instance is enabled for hibernation.
+ // Default: false
+ Configured *bool
+
+ noSmithyDocumentSerde
+}
+
+// Describes an IAM instance profile.
+type LaunchTemplateIamInstanceProfileSpecification struct {
+
+ // The Amazon Resource Name (ARN) of the instance profile.
+ Arn *string
+
+ // The name of the instance profile.
+ Name *string
+
+ noSmithyDocumentSerde
+}
+
+// An IAM instance profile.
+type LaunchTemplateIamInstanceProfileSpecificationRequest struct {
+
+ // The Amazon Resource Name (ARN) of the instance profile.
+ Arn *string
+
+ // The name of the instance profile.
+ Name *string
+
+ noSmithyDocumentSerde
+}
+
+// The market (purchasing) option for the instances.
+type LaunchTemplateInstanceMarketOptions struct {
+
+ // The market type.
+ MarketType MarketType
+
+ // The options for Spot Instances.
+ SpotOptions *LaunchTemplateSpotMarketOptions
+
+ noSmithyDocumentSerde
+}
+
+// The market (purchasing) option for the instances.
+type LaunchTemplateInstanceMarketOptionsRequest struct {
+
+ // The market type.
+ MarketType MarketType
+
+ // The options for Spot Instances.
+ SpotOptions *LaunchTemplateSpotMarketOptionsRequest
+
+ noSmithyDocumentSerde
+}
+
+// The metadata options for the instance. For more information, see Instance
+// Metadata and User Data
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html)
+// in the Amazon Elastic Compute Cloud User Guide.
+type LaunchTemplateInstanceMetadataOptions struct {
+
+ // This parameter enables or disables the HTTP metadata endpoint on your instances.
+ // If the parameter is not specified, the default state is enabled. If you specify
+ // a value of disabled, you will not be able to access your instance metadata.
+ HttpEndpoint LaunchTemplateInstanceMetadataEndpointState
+
+ // Enables or disables the IPv6 endpoint for the instance metadata service.
+ // Default: disabled
+ HttpProtocolIpv6 LaunchTemplateInstanceMetadataProtocolIpv6
+
+ // The desired HTTP PUT response hop limit for instance metadata requests. The
+ // larger the number, the further instance metadata requests can travel. Default: 1
+ // Possible values: Integers from 1 to 64
+ HttpPutResponseHopLimit *int32
+
+ // The state of token usage for your instance metadata requests. If the parameter
+ // is not specified in the request, the default state is optional. If the state is
+ // optional, you can choose to retrieve instance metadata with or without a signed
+ // token header on your request. If you retrieve the IAM role credentials without a
+ // token, the version 1.0 role credentials are returned. If you retrieve the IAM
+ // role credentials using a valid signed token, the version 2.0 role credentials
+ // are returned. If the state is required, you must send a signed token header with
+ // any instance metadata retrieval requests. In this state, retrieving the IAM role
+ // credentials always returns the version 2.0 credentials; the version 1.0
+ // credentials are not available.
+ HttpTokens LaunchTemplateHttpTokensState
+
+ // The state of the metadata option changes. pending - The metadata options are
+ // being updated and the instance is not ready to process metadata traffic with the
+ // new selection. applied - The metadata options have been successfully applied on
+ // the instance.
+ State LaunchTemplateInstanceMetadataOptionsState
+
+ noSmithyDocumentSerde
+}
+
+// The metadata options for the instance. For more information, see Instance
+// Metadata and User Data
+// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html)
+// in the Amazon Elastic Compute Cloud User Guide.
+type LaunchTemplateInstanceMetadataOptionsRequest struct {
+
+ // This parameter enables or disables the HTTP metadata endpoint on your instances.
+ // If the parameter is not specified, the default state is enabled. If you specify
+ // a value of disabled, you will not be able to access your instance metadata.
+ HttpEndpoint LaunchTemplateInstanceMetadataEndpointState
+
+ // Enables or disables the IPv6 endpoint for the instance metadata service.
+ // Default: disabled
+ HttpProtocolIpv6 LaunchTemplateInstanceMetadataProtocolIpv6
+
+ // The desired HTTP PUT response hop limit for instance metadata requests. The
+ // larger the number, the further instance metadata requests can travel. Default: 1
+ // Possible values: Integers from 1 to 64
+ HttpPutResponseHopLimit *int32
+
+ // The state of token usage for your instance metadata requests. If the parameter
+ // is not specified in the request, the default state is optional. If the state is
+ // optional, you can choose to retrieve instance metadata with or without a signed
+ // token header on your request. If you retrieve the IAM role credentials without a
+ // token, the version 1.0 role credentials are returned. If you retrieve the IAM
+ // role credentials using a valid signed token, the version 2.0 role credentials
+ // are returned. If the state is required, you must send a signed token header with
+ // any instance metadata retrieval requests. In this state, retrieving the IAM role
+ // credentials always returns the version 2.0 credentials; the version 1.0
+ // credentials are not available.
+ HttpTokens LaunchTemplateHttpTokensState
+
+ noSmithyDocumentSerde
+}
+
+// Describes a network interface.
+type LaunchTemplateInstanceNetworkInterfaceSpecification struct {
+
+ // Indicates whether to associate a Carrier IP address with eth0 for a new network
+ // interface. Use this option when you launch an instance in a Wavelength Zone and
+ // want to associate a Carrier IP address with the network interface. For more
+ // information about Carrier IP addresses, see Carrier IP addresses
+ // (https://docs.aws.amazon.com/wavelength/latest/developerguide/how-wavelengths-work.html#provider-owned-ip)
+ // in the Wavelength Developer Guide.
+ AssociateCarrierIpAddress *bool
+
+ // Indicates whether to associate a public IPv4 address with eth0 for a new network
+ // interface.
+ AssociatePublicIpAddress *bool
+
+ // Indicates whether the network interface is deleted when the instance is
+ // terminated.
+ DeleteOnTermination *bool
+
+ // A description for the network interface.
+ Description *string
+
+ // The device index for the network interface attachment.
+ DeviceIndex *int32
+
+ // The IDs of one or more security groups.
+ Groups []string
+
+ // The type of network interface.
+ InterfaceType *string
+
+ // The number of IPv4 prefixes that Amazon Web Services automatically assigned to
+ // the network interface.
+ Ipv4PrefixCount *int32
+
+ // One or more IPv4 prefixes assigned to the network interface.
+ Ipv4Prefixes []Ipv4PrefixSpecificationResponse
+
+ // The number of IPv6 addresses for the network interface.
+ Ipv6AddressCount *int32
+
+ // The IPv6 addresses for the network interface.
+ Ipv6Addresses []InstanceIpv6Address
+
+ // The number of IPv6 prefixes that Amazon Web Services automatically assigned to
+ // the network interface.
+ Ipv6PrefixCount *int32
+
+ // One or more IPv6 prefixes assigned to the network interface.
+ Ipv6Prefixes []Ipv6PrefixSpecificationResponse
+
+ // The index of the network card.
+ NetworkCardIndex *int32
+
+ // The ID of the network interface.
+ NetworkInterfaceId *string
+
+ // The primary private IPv4 address of the network interface.
+ PrivateIpAddress *string
+
+ // One or more private IPv4 addresses.
+ PrivateIpAddresses []PrivateIpAddressSpecification
+
+ // The number of secondary private IPv4 addresses for the network interface.
+ SecondaryPrivateIpAddressCount *int32
+
+ // The ID of the subnet for the network interface.
+ SubnetId *string
+
+ noSmithyDocumentSerde
+}
+
+// The parameters for a network interface.
+type LaunchTemplateInstanceNetworkInterfaceSpecificationRequest struct {
+
+ // Associates a Carrier IP address with eth0 for a new network interface. Use this
+ // option when you launch an instance in a Wavelength Zone and want to associate a
+ // Carrier IP address with the network interface. For more information about
+ // Carrier IP addresses, see Carrier IP addresses
+ // (https://docs.aws.amazon.com/wavelength/latest/developerguide/how-wavelengths-work.html#provider-owned-ip)
+ // in the Wavelength Developer Guide.
+ AssociateCarrierIpAddress *bool
+
+ // Associates a public IPv4 address with eth0 for a new network interface.
+ AssociatePublicIpAddress *bool
+
+ // Indicates whether the network interface is deleted when the instance is
+ // terminated.
+ DeleteOnTermination *bool
+
+ // A description for the network interface.
+ Description *string
+
+ // The device index for the network interface attachment.
+ DeviceIndex *int32
+
+ // The IDs of one or more security groups.
+ Groups []string
+
+ // The type of network interface. To create an Elastic Fabric Adapter (EFA),
+ // specify efa. For more information, see Elastic Fabric Adapter
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/efa.html) in the Amazon
+ // Elastic Compute Cloud User Guide. If you are not creating an EFA, specify
+ // interface or omit this parameter. Valid values: interface | efa
+ InterfaceType *string
+
+ // The number of IPv4 prefixes to be automatically assigned to the network
+ // interface. You cannot use this option if you use the Ipv4Prefix option.
+ Ipv4PrefixCount *int32
+
+ // One or more IPv4 prefixes to be assigned to the network interface. You cannot
+ // use this option if you use the Ipv4PrefixCount option.
+ Ipv4Prefixes []Ipv4PrefixSpecificationRequest
+
+ // The number of IPv6 addresses to assign to a network interface. Amazon EC2
+ // automatically selects the IPv6 addresses from the subnet range. You can't use
+ // this option if specifying specific IPv6 addresses.
+ Ipv6AddressCount *int32
+
+ // One or more specific IPv6 addresses from the IPv6 CIDR block range of your
+ // subnet. You can't use this option if you're specifying a number of IPv6
+ // addresses.
+ Ipv6Addresses []InstanceIpv6AddressRequest
+
+ // The number of IPv6 prefixes to be automatically assigned to the network
+ // interface. You cannot use this option if you use the Ipv6Prefix option.
+ Ipv6PrefixCount *int32
+
+ // One or more IPv6 prefixes to be assigned to the network interface. You cannot
+ // use this option if you use the Ipv6PrefixCount option.
+ Ipv6Prefixes []Ipv6PrefixSpecificationRequest
+
+ // The index of the network card. Some instance types support multiple network
+ // cards. The primary network interface must be assigned to network card index 0.
+ // The default is network card index 0.
+ NetworkCardIndex *int32
+
+ // The ID of the network interface.
+ NetworkInterfaceId *string
+
+ // The primary private IPv4 address of the network interface.
+ PrivateIpAddress *string
+
+ // One or more private IPv4 addresses.
+ PrivateIpAddresses []PrivateIpAddressSpecification
+
+ // The number of secondary private IPv4 addresses to assign to a network interface.
+ SecondaryPrivateIpAddressCount *int32
+
+ // The ID of the subnet for the network interface.
+ SubnetId *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes a license configuration.
+type LaunchTemplateLicenseConfiguration struct {
+
+ // The Amazon Resource Name (ARN) of the license configuration.
+ LicenseConfigurationArn *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes a license configuration.
+type LaunchTemplateLicenseConfigurationRequest struct {
+
+ // The Amazon Resource Name (ARN) of the license configuration.
+ LicenseConfigurationArn *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes overrides for a launch template.
+type LaunchTemplateOverrides struct {
+
+ // The Availability Zone in which to launch the instances.
+ AvailabilityZone *string
+
+ // The instance type.
+ InstanceType InstanceType
+
+ // The priority for the launch template override. The highest priority is launched
+ // first. If OnDemandAllocationStrategy is set to prioritized, Spot Fleet uses
+ // priority to determine which launch template override to use first in fulfilling
+ // On-Demand capacity. If the Spot AllocationStrategy is set to
+ // capacityOptimizedPrioritized, Spot Fleet uses priority on a best-effort basis to
+ // determine which launch template override to use in fulfilling Spot capacity, but
+ // optimizes for capacity first. Valid values are whole numbers starting at 0. The
+ // lower the number, the higher the priority. If no number is set, the launch
+ // template override has the lowest priority. You can set the same priority for
+ // different launch template overrides.
+ Priority *float64
+
+ // The maximum price per unit hour that you are willing to pay for a Spot Instance.
+ SpotPrice *string
+
+ // The ID of the subnet in which to launch the instances.
+ SubnetId *string
+
+ // The number of units provided by the specified instance type.
+ WeightedCapacity *float64
+
+ noSmithyDocumentSerde
+}
+
+// Describes the placement of an instance.
+type LaunchTemplatePlacement struct {
+
+ // The affinity setting for the instance on the Dedicated Host.
+ Affinity *string
+
+ // The Availability Zone of the instance.
+ AvailabilityZone *string
+
+ // The name of the placement group for the instance.
+ GroupName *string
+
+ // The ID of the Dedicated Host for the instance.
+ HostId *string
+
+ // The ARN of the host resource group in which to launch the instances.
+ HostResourceGroupArn *string
+
+ // The number of the partition the instance should launch in. Valid only if the
+ // placement group strategy is set to partition.
+ PartitionNumber *int32
+
+ // Reserved for future use.
+ SpreadDomain *string
+
+ // The tenancy of the instance (if the instance is running in a VPC). An instance
+ // with a tenancy of dedicated runs on single-tenant hardware.
+ Tenancy Tenancy
+
+ noSmithyDocumentSerde
+}
+
+// Describes the placement of an instance.
+type LaunchTemplatePlacementRequest struct {
+
+ // The affinity setting for an instance on a Dedicated Host.
+ Affinity *string
+
+ // The Availability Zone for the instance.
+ AvailabilityZone *string
+
+ // The name of the placement group for the instance.
+ GroupName *string
+
+ // The ID of the Dedicated Host for the instance.
+ HostId *string
+
+ // The ARN of the host resource group in which to launch the instances. If you
+ // specify a host resource group ARN, omit the Tenancy parameter or set it to host.
+ HostResourceGroupArn *string
+
+ // The number of the partition the instance should launch in. Valid only if the
+ // placement group strategy is set to partition.
+ PartitionNumber *int32
+
+ // Reserved for future use.
+ SpreadDomain *string
+
+ // The tenancy of the instance (if the instance is running in a VPC). An instance
+ // with a tenancy of dedicated runs on single-tenant hardware.
+ Tenancy Tenancy
+
+ noSmithyDocumentSerde
+}
+
+// Describes the monitoring for the instance.
+type LaunchTemplatesMonitoring struct {
+
+ // Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring is
+ // enabled.
+ Enabled *bool
+
+ noSmithyDocumentSerde
+}
+
+// Describes the monitoring for the instance.
+type LaunchTemplatesMonitoringRequest struct {
+
+ // Specify true to enable detailed monitoring. Otherwise, basic monitoring is
+ // enabled.
+ Enabled *bool
+
+ noSmithyDocumentSerde
+}
+
+// The launch template to use. You must specify either the launch template ID or
+// launch template name in the request, but not both.
+type LaunchTemplateSpecification struct {
+
+ // The ID of the launch template.
+ LaunchTemplateId *string
+
+ // The name of the launch template.
+ LaunchTemplateName *string
+
+ // The version number of the launch template. Default: The default version for the
+ // launch template.
+ Version *string
+
+ noSmithyDocumentSerde
+}
+
+// The options for Spot Instances.
+type LaunchTemplateSpotMarketOptions struct {
+
+ // The required duration for the Spot Instances (also known as Spot blocks), in
+ // minutes. This value must be a multiple of 60 (60, 120, 180, 240, 300, or 360).
+ BlockDurationMinutes *int32
+
+ // The behavior when a Spot Instance is interrupted.
+ InstanceInterruptionBehavior InstanceInterruptionBehavior
+
+ // The maximum hourly price you're willing to pay for the Spot Instances.
+ MaxPrice *string
+
+ // The Spot Instance request type.
+ SpotInstanceType SpotInstanceType
+
+ // The end date of the request. For a one-time request, the request remains active
+ // until all instances launch, the request is canceled, or this date is reached. If
+ // the request is persistent, it remains active until it is canceled or this date
+ // and time is reached.
+ ValidUntil *time.Time
+
+ noSmithyDocumentSerde
+}
+
+// The options for Spot Instances.
+type LaunchTemplateSpotMarketOptionsRequest struct {
+
+ // The required duration for the Spot Instances (also known as Spot blocks), in
+ // minutes. This value must be a multiple of 60 (60, 120, 180, 240, 300, or 360).
+ BlockDurationMinutes *int32
+
+ // The behavior when a Spot Instance is interrupted. The default is terminate.
+ InstanceInterruptionBehavior InstanceInterruptionBehavior
+
+ // The maximum hourly price you're willing to pay for the Spot Instances.
+ MaxPrice *string
+
+ // The Spot Instance request type.
+ SpotInstanceType SpotInstanceType
+
+ // The end date of the request. For a one-time request, the request remains active
+ // until all instances launch, the request is canceled, or this date is reached. If
+ // the request is persistent, it remains active until it is canceled or this date
+ // and time is reached. The default end date is 7 days from the current date.
+ ValidUntil *time.Time
+
+ noSmithyDocumentSerde
+}
+
+// The tag specification for the launch template.
+type LaunchTemplateTagSpecification struct {
+
+ // The type of resource.
+ ResourceType ResourceType
+
+ // The tags for the resource.
+ Tags []Tag
+
+ noSmithyDocumentSerde
+}
+
+// The tags specification for the launch template.
+type LaunchTemplateTagSpecificationRequest struct {
+
+ // The type of resource to tag. Currently, the resource types that support tagging
+ // on creation are instance and volume. To tag a resource after it has been
+ // created, see CreateTags
+ // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateTags.html).
+ ResourceType ResourceType
+
+ // The tags to apply to the resource.
+ Tags []Tag
+
+ noSmithyDocumentSerde
+}
+
+// Describes a launch template version.
+type LaunchTemplateVersion struct {
+
+ // The time the version was created.
+ CreateTime *time.Time
+
+ // The principal that created the version.
+ CreatedBy *string
+
+ // Indicates whether the version is the default version.
+ DefaultVersion *bool
+
+ // Information about the launch template.
+ LaunchTemplateData *ResponseLaunchTemplateData
+
+ // The ID of the launch template.
+ LaunchTemplateId *string
+
+ // The name of the launch template.
+ LaunchTemplateName *string
+
+ // The description for the version.
+ VersionDescription *string
+
+ // The version number.
+ VersionNumber *int64
+
+ noSmithyDocumentSerde
+}
+
+// Describes a license configuration.
+type LicenseConfiguration struct {
+
+ // The Amazon Resource Name (ARN) of the license configuration.
+ LicenseConfigurationArn *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes a license configuration.
+type LicenseConfigurationRequest struct {
+
+ // The Amazon Resource Name (ARN) of the license configuration.
+ LicenseConfigurationArn *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes the Classic Load Balancers and target groups to attach to a Spot Fleet
+// request.
+type LoadBalancersConfig struct {
+
+ // The Classic Load Balancers.
+ ClassicLoadBalancersConfig *ClassicLoadBalancersConfig
+
+ // The target groups.
+ TargetGroupsConfig *TargetGroupsConfig
+
+ noSmithyDocumentSerde
+}
+
+// Describes a load permission.
+type LoadPermission struct {
+
+ // The name of the group.
+ Group PermissionGroup
+
+ // The AWS account ID.
+ UserId *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes modifications to the load permissions of an Amazon FPGA image (AFI).
+type LoadPermissionModifications struct {
+
+ // The load permissions to add.
+ Add []LoadPermissionRequest
+
+ // The load permissions to remove.
+ Remove []LoadPermissionRequest
+
+ noSmithyDocumentSerde
+}
+
+// Describes a load permission.
+type LoadPermissionRequest struct {
+
+ // The name of the group.
+ Group PermissionGroup
+
+ // The AWS account ID.
+ UserId *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes a local gateway.
+type LocalGateway struct {
+
+ // The ID of the local gateway.
+ LocalGatewayId *string
+
+ // The Amazon Resource Name (ARN) of the Outpost.
+ OutpostArn *string
+
+ // The AWS account ID that owns the local gateway.
+ OwnerId *string
+
+ // The state of the local gateway.
+ State *string
+
+ // The tags assigned to the local gateway.
+ Tags []Tag
+
+ noSmithyDocumentSerde
+}
+
+// Describes a route for a local gateway route table.
+type LocalGatewayRoute struct {
+
+ // The CIDR block used for destination matches.
+ DestinationCidrBlock *string
+
+ // The Amazon Resource Name (ARN) of the local gateway route table.
+ LocalGatewayRouteTableArn *string
+
+ // The ID of the local gateway route table.
+ LocalGatewayRouteTableId *string
+
+ // The ID of the virtual interface group.
+ LocalGatewayVirtualInterfaceGroupId *string
+
+ // The AWS account ID that owns the local gateway route.
+ OwnerId *string
+
+ // The state of the route.
+ State LocalGatewayRouteState
+
+ // The route type.
+ Type LocalGatewayRouteType
+
+ noSmithyDocumentSerde
+}
+
+// Describes a local gateway route table.
+type LocalGatewayRouteTable struct {
+
+ // The ID of the local gateway.
+ LocalGatewayId *string
+
+ // The Amazon Resource Name (ARN) of the local gateway route table.
+ LocalGatewayRouteTableArn *string
+
+ // The ID of the local gateway route table.
+ LocalGatewayRouteTableId *string
+
+ // The Amazon Resource Name (ARN) of the Outpost.
+ OutpostArn *string
+
+ // The AWS account ID that owns the local gateway route table.
+ OwnerId *string
+
+ // The state of the local gateway route table.
+ State *string
+
+ // The tags assigned to the local gateway route table.
+ Tags []Tag
+
+ noSmithyDocumentSerde
+}
+
+// Describes an association between a local gateway route table and a virtual
+// interface group.
+type LocalGatewayRouteTableVirtualInterfaceGroupAssociation struct {
+
+ // The ID of the local gateway.
+ LocalGatewayId *string
+
+ // The Amazon Resource Name (ARN) of the local gateway route table for the virtual
+ // interface group.
+ LocalGatewayRouteTableArn *string
+
+ // The ID of the local gateway route table.
+ LocalGatewayRouteTableId *string
+
+ // The ID of the association.
+ LocalGatewayRouteTableVirtualInterfaceGroupAssociationId *string
+
+ // The ID of the virtual interface group.
+ LocalGatewayVirtualInterfaceGroupId *string
+
+ // The AWS account ID that owns the local gateway virtual interface group
+ // association.
+ OwnerId *string
+
+ // The state of the association.
+ State *string
+
+ // The tags assigned to the association.
+ Tags []Tag
+
+ noSmithyDocumentSerde
+}
+
+// Describes an association between a local gateway route table and a VPC.
+type LocalGatewayRouteTableVpcAssociation struct {
+
+ // The ID of the local gateway.
+ LocalGatewayId *string
+
+ // The Amazon Resource Name (ARN) of the local gateway route table for the
+ // association.
+ LocalGatewayRouteTableArn *string
+
+ // The ID of the local gateway route table.
+ LocalGatewayRouteTableId *string
+
+ // The ID of the association.
+ LocalGatewayRouteTableVpcAssociationId *string
+
+ // The AWS account ID that owns the local gateway route table for the association.
+ OwnerId *string
+
+ // The state of the association.
+ State *string
+
+ // The tags assigned to the association.
+ Tags []Tag
+
+ // The ID of the VPC.
+ VpcId *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes a local gateway virtual interface.
+type LocalGatewayVirtualInterface struct {
+
+ // The local address.
+ LocalAddress *string
+
+ // The Border Gateway Protocol (BGP) Autonomous System Number (ASN) of the local
+ // gateway.
+ LocalBgpAsn *int32
+
+ // The ID of the local gateway.
+ LocalGatewayId *string
+
+ // The ID of the virtual interface.
+ LocalGatewayVirtualInterfaceId *string
+
+ // The AWS account ID that owns the local gateway virtual interface.
+ OwnerId *string
+
+ // The peer address.
+ PeerAddress *string
+
+ // The peer BGP ASN.
+ PeerBgpAsn *int32
+
+ // The tags assigned to the virtual interface.
+ Tags []Tag
+
+ // The ID of the VLAN.
+ Vlan *int32
+
+ noSmithyDocumentSerde
+}
+
+// Describes a local gateway virtual interface group.
+type LocalGatewayVirtualInterfaceGroup struct {
+
+ // The ID of the local gateway.
+ LocalGatewayId *string
+
+ // The ID of the virtual interface group.
+ LocalGatewayVirtualInterfaceGroupId *string
+
+ // The IDs of the virtual interfaces.
+ LocalGatewayVirtualInterfaceIds []string
+
+ // The AWS account ID that owns the local gateway virtual interface group.
+ OwnerId *string
+
+ // The tags assigned to the virtual interface group.
+ Tags []Tag
+
+ noSmithyDocumentSerde
+}
+
+// Describes a managed prefix list.
+type ManagedPrefixList struct {
+
+ // The IP address version.
+ AddressFamily *string
+
+ // The maximum number of entries for the prefix list.
+ MaxEntries *int32
+
+ // The ID of the owner of the prefix list.
+ OwnerId *string
+
+ // The Amazon Resource Name (ARN) for the prefix list.
+ PrefixListArn *string
+
+ // The ID of the prefix list.
+ PrefixListId *string
+
+ // The name of the prefix list.
+ PrefixListName *string
+
+ // The current state of the prefix list.
+ State PrefixListState
+
+ // The state message.
+ StateMessage *string
+
+ // The tags for the prefix list.
+ Tags []Tag
+
+ // The version of the prefix list.
+ Version *int64
+
+ noSmithyDocumentSerde
+}
+
+// Describes the memory for the instance type.
+type MemoryInfo struct {
+
+ // The size of the memory, in MiB.
+ SizeInMiB *int64
+
+ noSmithyDocumentSerde
+}
+
+// The transit gateway options.
+type ModifyTransitGatewayOptions struct {
+
+ // Adds IPv4 or IPv6 CIDR blocks for the transit gateway. Must be a size /24 CIDR
+ // block or larger for IPv4, or a size /64 CIDR block or larger for IPv6.
+ AddTransitGatewayCidrBlocks []string
+
+ // The ID of the default association route table.
+ AssociationDefaultRouteTableId *string
+
+ // Enable or disable automatic acceptance of attachment requests.
+ AutoAcceptSharedAttachments AutoAcceptSharedAttachmentsValue
+
+ // Enable or disable automatic association with the default association route
+ // table.
+ DefaultRouteTableAssociation DefaultRouteTableAssociationValue
+
+ // Enable or disable automatic propagation of routes to the default propagation
+ // route table.
+ DefaultRouteTablePropagation DefaultRouteTablePropagationValue
+
+ // Enable or disable DNS support.
+ DnsSupport DnsSupportValue
+
+ // The ID of the default propagation route table.
+ PropagationDefaultRouteTableId *string
+
+ // Removes CIDR blocks for the transit gateway.
+ RemoveTransitGatewayCidrBlocks []string
+
+ // Enable or disable Equal Cost Multipath Protocol support.
+ VpnEcmpSupport VpnEcmpSupportValue
+
+ noSmithyDocumentSerde
+}
+
+// Describes the options for a VPC attachment.
+type ModifyTransitGatewayVpcAttachmentRequestOptions struct {
+
+ // Enable or disable support for appliance mode. If enabled, a traffic flow between
+ // a source and destination uses the same Availability Zone for the VPC attachment
+ // for the lifetime of that flow. The default is disable.
+ ApplianceModeSupport ApplianceModeSupportValue
+
+ // Enable or disable DNS support. The default is enable.
+ DnsSupport DnsSupportValue
+
+ // Enable or disable IPv6 support. The default is enable.
+ Ipv6Support Ipv6SupportValue
+
+ noSmithyDocumentSerde
+}
+
+// The Amazon Web Services Site-to-Site VPN tunnel options to modify.
+type ModifyVpnTunnelOptionsSpecification struct {
+
+ // The action to take after DPD timeout occurs. Specify restart to restart the IKE
+ // initiation. Specify clear to end the IKE session. Valid Values: clear | none |
+ // restart Default: clear
+ DPDTimeoutAction *string
+
+ // The number of seconds after which a DPD timeout occurs. Constraints: A value
+ // between 0 and 30. Default: 30
+ DPDTimeoutSeconds *int32
+
+ // The IKE versions that are permitted for the VPN tunnel. Valid values: ikev1 |
+ // ikev2
+ IKEVersions []IKEVersionsRequestListValue
+
+ // One or more Diffie-Hellman group numbers that are permitted for the VPN tunnel
+ // for phase 1 IKE negotiations. Valid values: 2 | 14 | 15 | 16 | 17 | 18 | 19 | 20
+ // | 21 | 22 | 23 | 24
+ Phase1DHGroupNumbers []Phase1DHGroupNumbersRequestListValue
+
+ // One or more encryption algorithms that are permitted for the VPN tunnel for
+ // phase 1 IKE negotiations. Valid values: AES128 | AES256 | AES128-GCM-16 |
+ // AES256-GCM-16
+ Phase1EncryptionAlgorithms []Phase1EncryptionAlgorithmsRequestListValue
+
+ // One or more integrity algorithms that are permitted for the VPN tunnel for phase
+ // 1 IKE negotiations. Valid values: SHA1 | SHA2-256 | SHA2-384 | SHA2-512
+ Phase1IntegrityAlgorithms []Phase1IntegrityAlgorithmsRequestListValue
+
+ // The lifetime for phase 1 of the IKE negotiation, in seconds. Constraints: A
+ // value between 900 and 28,800. Default: 28800
+ Phase1LifetimeSeconds *int32
+
+ // One or more Diffie-Hellman group numbers that are permitted for the VPN tunnel
+ // for phase 2 IKE negotiations. Valid values: 2 | 5 | 14 | 15 | 16 | 17 | 18 | 19
+ // | 20 | 21 | 22 | 23 | 24
+ Phase2DHGroupNumbers []Phase2DHGroupNumbersRequestListValue
+
+ // One or more encryption algorithms that are permitted for the VPN tunnel for
+ // phase 2 IKE negotiations. Valid values: AES128 | AES256 | AES128-GCM-16 |
+ // AES256-GCM-16
+ Phase2EncryptionAlgorithms []Phase2EncryptionAlgorithmsRequestListValue
+
+ // One or more integrity algorithms that are permitted for the VPN tunnel for phase
+ // 2 IKE negotiations. Valid values: SHA1 | SHA2-256 | SHA2-384 | SHA2-512
+ Phase2IntegrityAlgorithms []Phase2IntegrityAlgorithmsRequestListValue
+
+ // The lifetime for phase 2 of the IKE negotiation, in seconds. Constraints: A
+ // value between 900 and 3,600. The value must be less than the value for
+ // Phase1LifetimeSeconds. Default: 3600
+ Phase2LifetimeSeconds *int32
+
+ // The pre-shared key (PSK) to establish initial authentication between the virtual
+ // private gateway and the customer gateway. Constraints: Allowed characters are
+ // alphanumeric characters, periods (.), and underscores (_). Must be between 8 and
+ // 64 characters in length and cannot start with zero (0).
+ PreSharedKey *string
+
+ // The percentage of the rekey window (determined by RekeyMarginTimeSeconds) during
+ // which the rekey time is randomly selected. Constraints: A value between 0 and
+ // 100. Default: 100
+ RekeyFuzzPercentage *int32
+
+ // The margin time, in seconds, before the phase 2 lifetime expires, during which
+ // the Amazon Web Services side of the VPN connection performs an IKE rekey. The
+ // exact time of the rekey is randomly selected based on the value for
+ // RekeyFuzzPercentage. Constraints: A value between 60 and half of
+ // Phase2LifetimeSeconds. Default: 540
+ RekeyMarginTimeSeconds *int32
+
+ // The number of packets in an IKE replay window. Constraints: A value between 64
+ // and 2048. Default: 1024
+ ReplayWindowSize *int32
+
+ // The action to take when the establishing the tunnel for the VPN connection. By
+ // default, your customer gateway device must initiate the IKE negotiation and
+ // bring up the tunnel. Specify start for Amazon Web Services to initiate the IKE
+ // negotiation. Valid Values: add | start Default: add
+ StartupAction *string
+
+ // The range of inside IPv4 addresses for the tunnel. Any specified CIDR blocks
+ // must be unique across all VPN connections that use the same virtual private
+ // gateway. Constraints: A size /30 CIDR block from the 169.254.0.0/16 range. The
+ // following CIDR blocks are reserved and cannot be used:
+ //
+ // * 169.254.0.0/30
+ //
+ // *
+ // 169.254.1.0/30
+ //
+ // * 169.254.2.0/30
+ //
+ // * 169.254.3.0/30
+ //
+ // * 169.254.4.0/30
+ //
+ // *
+ // 169.254.5.0/30
+ //
+ // * 169.254.169.252/30
+ TunnelInsideCidr *string
+
+ // The range of inside IPv6 addresses for the tunnel. Any specified CIDR blocks
+ // must be unique across all VPN connections that use the same transit gateway.
+ // Constraints: A size /126 CIDR block from the local fd00::/8 range.
+ TunnelInsideIpv6Cidr *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes the monitoring of an instance.
+type Monitoring struct {
+
+ // Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring is
+ // enabled.
+ State MonitoringState
+
+ noSmithyDocumentSerde
+}
+
+// Describes the status of a moving Elastic IP address.
+type MovingAddressStatus struct {
+
+ // The status of the Elastic IP address that's being moved to the EC2-VPC platform,
+ // or restored to the EC2-Classic platform.
+ MoveStatus MoveStatus
+
+ // The Elastic IP address.
+ PublicIp *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes a NAT gateway.
+type NatGateway struct {
+
+ // Indicates whether the NAT gateway supports public or private connectivity.
+ ConnectivityType ConnectivityType
+
+ // The date and time the NAT gateway was created.
+ CreateTime *time.Time
+
+ // The date and time the NAT gateway was deleted, if applicable.
+ DeleteTime *time.Time
+
+ // If the NAT gateway could not be created, specifies the error code for the
+ // failure. (InsufficientFreeAddressesInSubnet | Gateway.NotAttached |
+ // InvalidAllocationID.NotFound | Resource.AlreadyAssociated | InternalError |
+ // InvalidSubnetID.NotFound)
+ FailureCode *string
+
+ // If the NAT gateway could not be created, specifies the error message for the
+ // failure, that corresponds to the error code.
+ //
+ // * For
+ // InsufficientFreeAddressesInSubnet: "Subnet has insufficient free addresses to
+ // create this NAT gateway"
+ //
+ // * For Gateway.NotAttached: "Network vpc-xxxxxxxx has
+ // no Internet gateway attached"
+ //
+ // * For InvalidAllocationID.NotFound: "Elastic IP
+ // address eipalloc-xxxxxxxx could not be associated with this NAT gateway"
+ //
+ // * For
+ // Resource.AlreadyAssociated: "Elastic IP address eipalloc-xxxxxxxx is already
+ // associated"
+ //
+ // * For InternalError: "Network interface eni-xxxxxxxx, created and
+ // used internally by this NAT gateway is in an invalid state. Please try
+ // again."
+ //
+ // * For InvalidSubnetID.NotFound: "The specified subnet subnet-xxxxxxxx
+ // does not exist or could not be found."
+ FailureMessage *string
+
+ // Information about the IP addresses and network interface associated with the NAT
+ // gateway.
+ NatGatewayAddresses []NatGatewayAddress
+
+ // The ID of the NAT gateway.
+ NatGatewayId *string
+
+ // Reserved. If you need to sustain traffic greater than the documented limits
+ // (https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html), contact
+ // us through the Support Center (https://console.aws.amazon.com/support/home?).
+ ProvisionedBandwidth *ProvisionedBandwidth
+
+ // The state of the NAT gateway.
+ //
+ // * pending: The NAT gateway is being created and
+ // is not ready to process traffic.
+ //
+ // * failed: The NAT gateway could not be
+ // created. Check the failureCode and failureMessage fields for the reason.
+ //
+ // *
+ // available: The NAT gateway is able to process traffic. This status remains until
+ // you delete the NAT gateway, and does not indicate the health of the NAT
+ // gateway.
+ //
+ // * deleting: The NAT gateway is in the process of being terminated and
+ // may still be processing traffic.
+ //
+ // * deleted: The NAT gateway has been terminated
+ // and is no longer processing traffic.
+ State NatGatewayState
+
+ // The ID of the subnet in which the NAT gateway is located.
+ SubnetId *string
+
+ // The tags for the NAT gateway.
+ Tags []Tag
+
+ // The ID of the VPC in which the NAT gateway is located.
+ VpcId *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes the IP addresses and network interface associated with a NAT gateway.
+type NatGatewayAddress struct {
+
+ // [Public NAT gateway only] The allocation ID of the Elastic IP address that's
+ // associated with the NAT gateway.
+ AllocationId *string
+
+ // The ID of the network interface associated with the NAT gateway.
+ NetworkInterfaceId *string
+
+ // The private IP address associated with the NAT gateway.
+ PrivateIp *string
+
+ // [Public NAT gateway only] The Elastic IP address associated with the NAT
+ // gateway.
+ PublicIp *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes a network ACL.
+type NetworkAcl struct {
+
+ // Any associations between the network ACL and one or more subnets
+ Associations []NetworkAclAssociation
+
+ // One or more entries (rules) in the network ACL.
+ Entries []NetworkAclEntry
+
+ // Indicates whether this is the default network ACL for the VPC.
+ IsDefault *bool
+
+ // The ID of the network ACL.
+ NetworkAclId *string
+
+ // The ID of the Amazon Web Services account that owns the network ACL.
+ OwnerId *string
+
+ // Any tags assigned to the network ACL.
+ Tags []Tag
+
+ // The ID of the VPC for the network ACL.
+ VpcId *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes an association between a network ACL and a subnet.
+type NetworkAclAssociation struct {
+
+ // The ID of the association between a network ACL and a subnet.
+ NetworkAclAssociationId *string
+
+ // The ID of the network ACL.
+ NetworkAclId *string
+
+ // The ID of the subnet.
+ SubnetId *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes an entry in a network ACL.
+type NetworkAclEntry struct {
+
+ // The IPv4 network range to allow or deny, in CIDR notation.
+ CidrBlock *string
+
+ // Indicates whether the rule is an egress rule (applied to traffic leaving the
+ // subnet).
+ Egress *bool
+
+ // ICMP protocol: The ICMP type and code.
+ IcmpTypeCode *IcmpTypeCode
+
+ // The IPv6 network range to allow or deny, in CIDR notation.
+ Ipv6CidrBlock *string
+
+ // TCP or UDP protocols: The range of ports the rule applies to.
+ PortRange *PortRange
+
+ // The protocol number. A value of "-1" means all protocols.
+ Protocol *string
+
+ // Indicates whether to allow or deny the traffic that matches the rule.
+ RuleAction RuleAction
+
+ // The rule number for the entry. ACL entries are processed in ascending order by
+ // rule number.
+ RuleNumber *int32
+
+ noSmithyDocumentSerde
+}
+
+// Describes the network card support of the instance type.
+type NetworkCardInfo struct {
+
+ // The maximum number of network interfaces for the network card.
+ MaximumNetworkInterfaces *int32
+
+ // The index of the network card.
+ NetworkCardIndex *int32
+
+ // The network performance of the network card.
+ NetworkPerformance *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes the networking features of the instance type.
+type NetworkInfo struct {
+
+ // The index of the default network card, starting at 0.
+ DefaultNetworkCardIndex *int32
+
+ // Describes the Elastic Fabric Adapters for the instance type.
+ EfaInfo *EfaInfo
+
+ // Indicates whether Elastic Fabric Adapter (EFA) is supported.
+ EfaSupported *bool
+
+ // Indicates whether Elastic Network Adapter (ENA) is supported.
+ EnaSupport EnaSupport
+
+ // Indicates whether the instance type automatically encrypts in-transit traffic
+ // between instances.
+ EncryptionInTransitSupported *bool
+
+ // The maximum number of IPv4 addresses per network interface.
+ Ipv4AddressesPerInterface *int32
+
+ // The maximum number of IPv6 addresses per network interface.
+ Ipv6AddressesPerInterface *int32
+
+ // Indicates whether IPv6 is supported.
+ Ipv6Supported *bool
+
+ // The maximum number of physical network cards that can be allocated to the
+ // instance.
+ MaximumNetworkCards *int32
+
+ // The maximum number of network interfaces for the instance type.
+ MaximumNetworkInterfaces *int32
+
+ // Describes the network cards for the instance type.
+ NetworkCards []NetworkCardInfo
+
+ // The network performance.
+ NetworkPerformance *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes a network insights analysis.
+type NetworkInsightsAnalysis struct {
+
+ // Potential intermediate components.
+ AlternatePathHints []AlternatePathHint
+
+ // The explanations. For more information, see Reachability Analyzer explanation
+ // codes
+ // (https://docs.aws.amazon.com/vpc/latest/reachability/explanation-codes.html).
+ Explanations []Explanation
+
+ // The Amazon Resource Names (ARN) of the Amazon Web Services resources that the
+ // path must traverse.
+ FilterInArns []string
+
+ // The components in the path from source to destination.
+ ForwardPathComponents []PathComponent
+
+ // The Amazon Resource Name (ARN) of the network insights analysis.
+ NetworkInsightsAnalysisArn *string
+
+ // The ID of the network insights analysis.
+ NetworkInsightsAnalysisId *string
+
+ // The ID of the path.
+ NetworkInsightsPathId *string
+
+ // Indicates whether the destination is reachable from the source.
+ NetworkPathFound *bool
+
+ // The components in the path from destination to source.
+ ReturnPathComponents []PathComponent
+
+ // The time the analysis started.
+ StartDate *time.Time
+
+ // The status of the network insights analysis.
+ Status AnalysisStatus
+
+ // The status message, if the status is failed.
+ StatusMessage *string
+
+ // The tags.
+ Tags []Tag
+
+ noSmithyDocumentSerde
+}
+
+// Describes a path.
+type NetworkInsightsPath struct {
+
+ // The time stamp when the path was created.
+ CreatedDate *time.Time
+
+ // The Amazon Web Services resource that is the destination of the path.
+ Destination *string
+
+ // The IP address of the Amazon Web Services resource that is the destination of
+ // the path.
+ DestinationIp *string
+
+ // The destination port.
+ DestinationPort *int32
+
+ // The Amazon Resource Name (ARN) of the path.
+ NetworkInsightsPathArn *string
+
+ // The ID of the path.
+ NetworkInsightsPathId *string
+
+ // The protocol.
+ Protocol Protocol
+
+ // The Amazon Web Services resource that is the source of the path.
+ Source *string
+
+ // The IP address of the Amazon Web Services resource that is the source of the
+ // path.
+ SourceIp *string
+
+ // The tags associated with the path.
+ Tags []Tag
+
+ noSmithyDocumentSerde
+}
+
+// Describes a network interface.
+type NetworkInterface struct {
+
+ // The association information for an Elastic IP address (IPv4) associated with the
+ // network interface.
+ Association *NetworkInterfaceAssociation
+
+ // The network interface attachment.
+ Attachment *NetworkInterfaceAttachment
+
+ // The Availability Zone.
+ AvailabilityZone *string
+
+ // A description.
+ Description *string
+
+ // Any security groups for the network interface.
+ Groups []GroupIdentifier
+
+ // The type of network interface.
+ InterfaceType NetworkInterfaceType
+
+ // The IPv4 prefixes that are assigned to the network interface.
+ Ipv4Prefixes []Ipv4PrefixSpecification
+
+ // The IPv6 addresses associated with the network interface.
+ Ipv6Addresses []NetworkInterfaceIpv6Address
+
+ // The IPv6 prefixes that are assigned to the network interface.
+ Ipv6Prefixes []Ipv6PrefixSpecification
+
+ // The MAC address.
+ MacAddress *string
+
+ // The ID of the network interface.
+ NetworkInterfaceId *string
+
+ // The Amazon Resource Name (ARN) of the Outpost.
+ OutpostArn *string
+
+ // The Amazon Web Services account ID of the owner of the network interface.
+ OwnerId *string
+
+ // The private DNS name.
+ PrivateDnsName *string
+
+ // The IPv4 address of the network interface within the subnet.
+ PrivateIpAddress *string
+
+ // The private IPv4 addresses associated with the network interface.
+ PrivateIpAddresses []NetworkInterfacePrivateIpAddress
+
+ // The alias or Amazon Web Services account ID of the principal or service that
+ // created the network interface.
+ RequesterId *string
+
+ // Indicates whether the network interface is being managed by Amazon Web Services.
+ RequesterManaged *bool
+
+ // Indicates whether source/destination checking is enabled.
+ SourceDestCheck *bool
+
+ // The status of the network interface.
+ Status NetworkInterfaceStatus
+
+ // The ID of the subnet.
+ SubnetId *string
+
+ // Any tags assigned to the network interface.
+ TagSet []Tag
+
+ // The ID of the VPC.
+ VpcId *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes association information for an Elastic IP address (IPv4 only), or a
+// Carrier IP address (for a network interface which resides in a subnet in a
+// Wavelength Zone).
+type NetworkInterfaceAssociation struct {
+
+ // The allocation ID.
+ AllocationId *string
+
+ // The association ID.
+ AssociationId *string
+
+ // The carrier IP address associated with the network interface. This option is
+ // only available when the network interface is in a subnet which is associated
+ // with a Wavelength Zone.
+ CarrierIp *string
+
+ // The customer-owned IP address associated with the network interface.
+ CustomerOwnedIp *string
+
+ // The ID of the Elastic IP address owner.
+ IpOwnerId *string
+
+ // The public DNS name.
+ PublicDnsName *string
+
+ // The address of the Elastic IP address bound to the network interface.
+ PublicIp *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes a network interface attachment.
+type NetworkInterfaceAttachment struct {
+
+ // The timestamp indicating when the attachment initiated.
+ AttachTime *time.Time
+
+ // The ID of the network interface attachment.
+ AttachmentId *string
+
+ // Indicates whether the network interface is deleted when the instance is
+ // terminated.
+ DeleteOnTermination *bool
+
+ // The device index of the network interface attachment on the instance.
+ DeviceIndex *int32
+
+ // The ID of the instance.
+ InstanceId *string
+
+ // The Amazon Web Services account ID of the owner of the instance.
+ InstanceOwnerId *string
+
+ // The index of the network card.
+ NetworkCardIndex *int32
+
+ // The attachment state.
+ Status AttachmentStatus
+
+ noSmithyDocumentSerde
+}
+
+// Describes an attachment change.
+type NetworkInterfaceAttachmentChanges struct {
+
+ // The ID of the network interface attachment.
+ AttachmentId *string
+
+ // Indicates whether the network interface is deleted when the instance is
+ // terminated.
+ DeleteOnTermination *bool
+
+ noSmithyDocumentSerde
+}
+
+// Describes an IPv6 address associated with a network interface.
+type NetworkInterfaceIpv6Address struct {
+
+ // The IPv6 address.
+ Ipv6Address *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes a permission for a network interface.
+type NetworkInterfacePermission struct {
+
+ // The Amazon Web Services account ID.
+ AwsAccountId *string
+
+ // The Amazon Web Service.
+ AwsService *string
+
+ // The ID of the network interface.
+ NetworkInterfaceId *string
+
+ // The ID of the network interface permission.
+ NetworkInterfacePermissionId *string
+
+ // The type of permission.
+ Permission InterfacePermissionType
+
+ // Information about the state of the permission.
+ PermissionState *NetworkInterfacePermissionState
+
+ noSmithyDocumentSerde
+}
+
+// Describes the state of a network interface permission.
+type NetworkInterfacePermissionState struct {
+
+ // The state of the permission.
+ State NetworkInterfacePermissionStateCode
+
+ // A status message, if applicable.
+ StatusMessage *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes the private IPv4 address of a network interface.
+type NetworkInterfacePrivateIpAddress struct {
+
+ // The association information for an Elastic IP address (IPv4) associated with the
+ // network interface.
+ Association *NetworkInterfaceAssociation
+
+ // Indicates whether this IPv4 address is the primary private IPv4 address of the
+ // network interface.
+ Primary *bool
+
+ // The private DNS name.
+ PrivateDnsName *string
+
+ // The private IPv4 address.
+ PrivateIpAddress *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes a DHCP configuration option.
+type NewDhcpConfiguration struct {
+
+ // The name of a DHCP option.
+ Key *string
+
+ // One or more values for the DHCP option.
+ Values []string
+
+ noSmithyDocumentSerde
+}
+
+// Describes the configuration of On-Demand Instances in an EC2 Fleet.
+type OnDemandOptions struct {
+
+ // The order of the launch template overrides to use in fulfilling On-Demand
+ // capacity. If you specify lowest-price, EC2 Fleet uses price to determine the
+ // order, launching the lowest price first. If you specify prioritized, EC2 Fleet
+ // uses the priority that you assigned to each launch template override, launching
+ // the highest priority first. If you do not specify a value, EC2 Fleet defaults to
+ // lowest-price.
+ AllocationStrategy FleetOnDemandAllocationStrategy
+
+ // The strategy for using unused Capacity Reservations for fulfilling On-Demand
+ // capacity. Supported only for fleets of type instant.
+ CapacityReservationOptions *CapacityReservationOptions
+
+ // The maximum amount per hour for On-Demand Instances that you're willing to pay.
+ MaxTotalPrice *string
+
+ // The minimum target capacity for On-Demand Instances in the fleet. If the minimum
+ // target capacity is not reached, the fleet launches no instances.
+ MinTargetCapacity *int32
+
+ // Indicates that the fleet launches all On-Demand Instances into a single
+ // Availability Zone. Supported only for fleets of type instant.
+ SingleAvailabilityZone *bool
+
+ // Indicates that the fleet uses a single instance type to launch all On-Demand
+ // Instances in the fleet. Supported only for fleets of type instant.
+ SingleInstanceType *bool
+
+ noSmithyDocumentSerde
+}
+
+// Describes the configuration of On-Demand Instances in an EC2 Fleet.
+type OnDemandOptionsRequest struct {
+
+ // The order of the launch template overrides to use in fulfilling On-Demand
+ // capacity. If you specify lowest-price, EC2 Fleet uses price to determine the
+ // order, launching the lowest price first. If you specify prioritized, EC2 Fleet
+ // uses the priority that you assigned to each launch template override, launching
+ // the highest priority first. If you do not specify a value, EC2 Fleet defaults to
+ // lowest-price.
+ AllocationStrategy FleetOnDemandAllocationStrategy
+
+ // The strategy for using unused Capacity Reservations for fulfilling On-Demand
+ // capacity. Supported only for fleets of type instant.
+ CapacityReservationOptions *CapacityReservationOptionsRequest
+
+ // The maximum amount per hour for On-Demand Instances that you're willing to pay.
+ MaxTotalPrice *string
+
+ // The minimum target capacity for On-Demand Instances in the fleet. If the minimum
+ // target capacity is not reached, the fleet launches no instances.
+ MinTargetCapacity *int32
+
+ // Indicates that the fleet launches all On-Demand Instances into a single
+ // Availability Zone. Supported only for fleets of type instant.
+ SingleAvailabilityZone *bool
+
+ // Indicates that the fleet uses a single instance type to launch all On-Demand
+ // Instances in the fleet. Supported only for fleets of type instant.
+ SingleInstanceType *bool
+
+ noSmithyDocumentSerde
+}
+
+// Describes a path component.
+type PathComponent struct {
+
+ // The network ACL rule.
+ AclRule *AnalysisAclRule
+
+ // The component.
+ Component *AnalysisComponent
+
+ // The destination VPC.
+ DestinationVpc *AnalysisComponent
+
+ // The inbound header.
+ InboundHeader *AnalysisPacketHeader
+
+ // The outbound header.
+ OutboundHeader *AnalysisPacketHeader
+
+ // The route table route.
+ RouteTableRoute *AnalysisRouteTableRoute
+
+ // The security group rule.
+ SecurityGroupRule *AnalysisSecurityGroupRule
+
+ // The sequence number.
+ SequenceNumber *int32
+
+ // The source VPC.
+ SourceVpc *AnalysisComponent
+
+ // The subnet.
+ Subnet *AnalysisComponent
+
+ // The component VPC.
+ Vpc *AnalysisComponent
+
+ noSmithyDocumentSerde
+}
+
+// Describes the data that identifies an Amazon FPGA image (AFI) on the PCI bus.
+type PciId struct {
+
+ // The ID of the device.
+ DeviceId *string
+
+ // The ID of the subsystem.
+ SubsystemId *string
+
+ // The ID of the vendor for the subsystem.
+ SubsystemVendorId *string
+
+ // The ID of the vendor.
+ VendorId *string
+
+ noSmithyDocumentSerde
+}
+
+// The status of the transit gateway peering attachment.
+type PeeringAttachmentStatus struct {
+
+ // The status code.
+ Code *string
+
+ // The status message, if applicable.
+ Message *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes the VPC peering connection options.
+type PeeringConnectionOptions struct {
+
+ // If true, the public DNS hostnames of instances in the specified VPC resolve to
+ // private IP addresses when queried from instances in the peer VPC.
+ AllowDnsResolutionFromRemoteVpc *bool
+
+ // If true, enables outbound communication from an EC2-Classic instance that's
+ // linked to a local VPC using ClassicLink to instances in a peer VPC.
+ AllowEgressFromLocalClassicLinkToRemoteVpc *bool
+
+ // If true, enables outbound communication from instances in a local VPC to an
+ // EC2-Classic instance that's linked to a peer VPC using ClassicLink.
+ AllowEgressFromLocalVpcToRemoteClassicLink *bool
+
+ noSmithyDocumentSerde
+}
+
+// The VPC peering connection options.
+type PeeringConnectionOptionsRequest struct {
+
+ // If true, enables a local VPC to resolve public DNS hostnames to private IP
+ // addresses when queried from instances in the peer VPC.
+ AllowDnsResolutionFromRemoteVpc *bool
+
+ // If true, enables outbound communication from an EC2-Classic instance that's
+ // linked to a local VPC using ClassicLink to instances in a peer VPC.
+ AllowEgressFromLocalClassicLinkToRemoteVpc *bool
+
+ // If true, enables outbound communication from instances in a local VPC to an
+ // EC2-Classic instance that's linked to a peer VPC using ClassicLink.
+ AllowEgressFromLocalVpcToRemoteClassicLink *bool
+
+ noSmithyDocumentSerde
+}
+
+// Information about the transit gateway in the peering attachment.
+type PeeringTgwInfo struct {
+
+ // The ID of the Amazon Web Services account that owns the transit gateway.
+ OwnerId *string
+
+ // The Region of the transit gateway.
+ Region *string
+
+ // The ID of the transit gateway.
+ TransitGatewayId *string
+
+ noSmithyDocumentSerde
+}
+
+// The Diffie-Hellmann group number for phase 1 IKE negotiations.
+type Phase1DHGroupNumbersListValue struct {
+
+ // The Diffie-Hellmann group number.
+ Value *int32
+
+ noSmithyDocumentSerde
+}
+
+// Specifies a Diffie-Hellman group number for the VPN tunnel for phase 1 IKE
+// negotiations.
+type Phase1DHGroupNumbersRequestListValue struct {
+
+ // The Diffie-Hellmann group number.
+ Value *int32
+
+ noSmithyDocumentSerde
+}
+
+// The encryption algorithm for phase 1 IKE negotiations.
+type Phase1EncryptionAlgorithmsListValue struct {
+
+ // The value for the encryption algorithm.
+ Value *string
+
+ noSmithyDocumentSerde
+}
+
+// Specifies the encryption algorithm for the VPN tunnel for phase 1 IKE
+// negotiations.
+type Phase1EncryptionAlgorithmsRequestListValue struct {
+
+ // The value for the encryption algorithm.
+ Value *string
+
+ noSmithyDocumentSerde
+}
+
+// The integrity algorithm for phase 1 IKE negotiations.
+type Phase1IntegrityAlgorithmsListValue struct {
+
+ // The value for the integrity algorithm.
+ Value *string
+
+ noSmithyDocumentSerde
+}
+
+// Specifies the integrity algorithm for the VPN tunnel for phase 1 IKE
+// negotiations.
+type Phase1IntegrityAlgorithmsRequestListValue struct {
+
+ // The value for the integrity algorithm.
+ Value *string
+
+ noSmithyDocumentSerde
+}
+
+// The Diffie-Hellmann group number for phase 2 IKE negotiations.
+type Phase2DHGroupNumbersListValue struct {
+
+ // The Diffie-Hellmann group number.
+ Value *int32
+
+ noSmithyDocumentSerde
+}
+
+// Specifies a Diffie-Hellman group number for the VPN tunnel for phase 2 IKE
+// negotiations.
+type Phase2DHGroupNumbersRequestListValue struct {
+
+ // The Diffie-Hellmann group number.
+ Value *int32
+
+ noSmithyDocumentSerde
+}
+
+// The encryption algorithm for phase 2 IKE negotiations.
+type Phase2EncryptionAlgorithmsListValue struct {
+
+ // The encryption algorithm.
+ Value *string
+
+ noSmithyDocumentSerde
+}
+
+// Specifies the encryption algorithm for the VPN tunnel for phase 2 IKE
+// negotiations.
+type Phase2EncryptionAlgorithmsRequestListValue struct {
+
+ // The encryption algorithm.
+ Value *string
+
+ noSmithyDocumentSerde
+}
+
+// The integrity algorithm for phase 2 IKE negotiations.
+type Phase2IntegrityAlgorithmsListValue struct {
+
+ // The integrity algorithm.
+ Value *string
+
+ noSmithyDocumentSerde
+}
+
+// Specifies the integrity algorithm for the VPN tunnel for phase 2 IKE
+// negotiations.
+type Phase2IntegrityAlgorithmsRequestListValue struct {
+
+ // The integrity algorithm.
+ Value *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes the placement of an instance.
+type Placement struct {
+
+ // The affinity setting for the instance on the Dedicated Host. This parameter is
+ // not supported for the ImportInstance
+ // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ImportInstance.html)
+ // command. This parameter is not supported by CreateFleet
+ // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateFleet).
+ Affinity *string
+
+ // The Availability Zone of the instance. If not specified, an Availability Zone
+ // will be automatically chosen for you based on the load balancing criteria for
+ // the Region. This parameter is not supported by CreateFleet
+ // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateFleet).
+ AvailabilityZone *string
+
+ // The name of the placement group the instance is in.
+ GroupName *string
+
+ // The ID of the Dedicated Host on which the instance resides. This parameter is
+ // not supported for the ImportInstance
+ // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ImportInstance.html)
+ // command. This parameter is not supported by CreateFleet
+ // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateFleet).
+ HostId *string
+
+ // The ARN of the host resource group in which to launch the instances. If you
+ // specify a host resource group ARN, omit the Tenancy parameter or set it to host.
+ // This parameter is not supported by CreateFleet
+ // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateFleet).
+ HostResourceGroupArn *string
+
+ // The number of the partition the instance is in. Valid only if the placement
+ // group strategy is set to partition. This parameter is not supported by
+ // CreateFleet
+ // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateFleet).
+ PartitionNumber *int32
+
+ // Reserved for future use. This parameter is not supported by CreateFleet
+ // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateFleet).
+ SpreadDomain *string
+
+ // The tenancy of the instance (if the instance is running in a VPC). An instance
+ // with a tenancy of dedicated runs on single-tenant hardware. The host tenancy is
+ // not supported for the ImportInstance
+ // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ImportInstance.html)
+ // command. This parameter is not supported by CreateFleet
+ // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateFleet). T3
+ // instances that use the unlimited CPU credit option do not support host tenancy.
+ Tenancy Tenancy
+
+ noSmithyDocumentSerde
+}
+
+// Describes a placement group.
+type PlacementGroup struct {
+
+ // The ID of the placement group.
+ GroupId *string
+
+ // The name of the placement group.
+ GroupName *string
+
+ // The number of partitions. Valid only if strategy is set to partition.
+ PartitionCount *int32
+
+ // The state of the placement group.
+ State PlacementGroupState
+
+ // The placement strategy.
+ Strategy PlacementStrategy
+
+ // Any tags applied to the placement group.
+ Tags []Tag
+
+ noSmithyDocumentSerde
+}
+
+// Describes the placement group support of the instance type.
+type PlacementGroupInfo struct {
+
+ // The supported placement group types.
+ SupportedStrategies []PlacementGroupStrategy
+
+ noSmithyDocumentSerde
+}
+
+// Describes the placement of an instance.
+type PlacementResponse struct {
+
+ // The name of the placement group that the instance is in.
+ GroupName *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes a CIDR block for an address pool.
+type PoolCidrBlock struct {
+
+ // The CIDR block.
+ Cidr *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes a range of ports.
+type PortRange struct {
+
+ // The first port in the range.
+ From *int32
+
+ // The last port in the range.
+ To *int32
+
+ noSmithyDocumentSerde
+}
+
+// Describes prefixes for Amazon Web Services services.
+type PrefixList struct {
+
+ // The IP address range of the Amazon Web Service.
+ Cidrs []string
+
+ // The ID of the prefix.
+ PrefixListId *string
+
+ // The name of the prefix.
+ PrefixListName *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes the resource with which a prefix list is associated.
+type PrefixListAssociation struct {
+
+ // The ID of the resource.
+ ResourceId *string
+
+ // The owner of the resource.
+ ResourceOwner *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes a prefix list entry.
+type PrefixListEntry struct {
+
+ // The CIDR block.
+ Cidr *string
+
+ // The description.
+ Description *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes a prefix list ID.
+type PrefixListId struct {
+
+ // A description for the security group rule that references this prefix list ID.
+ // Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z,
+ // 0-9, spaces, and ._-:/()#,@[]+=;{}!$*
+ Description *string
+
+ // The ID of the prefix.
+ PrefixListId *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes the price for a Reserved Instance.
+type PriceSchedule struct {
+
+ // The current price schedule, as determined by the term remaining for the Reserved
+ // Instance in the listing. A specific price schedule is always in effect, but only
+ // one price schedule can be active at any time. Take, for example, a Reserved
+ // Instance listing that has five months remaining in its term. When you specify
+ // price schedules for five months and two months, this means that schedule 1,
+ // covering the first three months of the remaining term, will be active during
+ // months 5, 4, and 3. Then schedule 2, covering the last two months of the term,
+ // will be active for months 2 and 1.
+ Active *bool
+
+ // The currency for transacting the Reserved Instance resale. At this time, the
+ // only supported currency is USD.
+ CurrencyCode CurrencyCodeValues
+
+ // The fixed price for the term.
+ Price *float64
+
+ // The number of months remaining in the reservation. For example, 2 is the second
+ // to the last month before the capacity reservation expires.
+ Term *int64
+
+ noSmithyDocumentSerde
+}
+
+// Describes the price for a Reserved Instance.
+type PriceScheduleSpecification struct {
+
+ // The currency for transacting the Reserved Instance resale. At this time, the
+ // only supported currency is USD.
+ CurrencyCode CurrencyCodeValues
+
+ // The fixed price for the term.
+ Price *float64
+
+ // The number of months remaining in the reservation